Author Topic: SQ5 room 100, how to trigger debug thing?  (Read 2671 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

SQ5 room 100, how to trigger debug thing?
« on: May 08, 2015, 09:06:30 AM »
Here's a puzzle for someone to figure out (or maybe it's already known?)

In room 100 (the title screen), the code puts up a dialog with 5 buttons (play new game, restore old game, see intro, etc...).

As a result, Print should return a number from 0 to 4 inclusive. The calling code reacts to those numbers, but if 5 is returned, it looks like it pops up a dialog asking which room you want to go to. What would cause Print to return that sixth option when it only has 5 buttons?

Code: [Select]
                (Print:
                    dialog(myDialog)
                    font(gFont)
                    width(150)
                    mode(1)
                    addColorButton(0 8 1 0 6 0 30 0 0 15 23 5 5 5)
                    addColorButton(1 8 1 0 1 0 40 0 0 15 23 5 5 5)
                    addColorButton(2 8 1 0 2 0 50 0 0 15 23 5 5 5)
                    addText(8 1 0 4 0 0 0)
                    addText(8 1 0 5 0 10 0)
                )
                (switch (= temp0 (Print:
                        addColorButton(4 8 1 0 7 0 70 0 0 15 23 5 5 5)
                        addColorButton(3 8 1 0 3 0 60 0 0 15 23 6 6 6)
                        init()
                    )
)
                    (case 0
                        (send global2:newRoom(104))
                    )
                    (case 1
                        (send global2:newRoom(110))
                    )
                    (case 2
                        (send gSQ5:restore())
                        (self:changeState(state))
                    )
                    (case 3
                        = global4 1
                    )
                    (case 4
                        = state (- state 2)
                        (send gTestMessager:say(1 0 0 0 self 100))
                    )
                    (case 5
                        = temp1 0
                        = temp0 (Print:
                                addText("Which room do you want?")
                                addText("Other" 110 25)
                                addEdit(@temp1 6 115 35)
                                posn(50 30)
                                addButton(100 "Start 100" 5 35)
                                init()
                            )
                        (if (temp1)
                            = temp0 ReadNumber(@temp1)
                            (send global2:newRoom(temp0))
                        )(else
                            (self:changeState(state))
                        )
                    )
                )


Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Cloudee1

Re: SQ5 room 100, how to trigger debug thing?
« Reply #1 on: May 08, 2015, 09:11:30 AM »
I don't know the answer, but I saw that as well when I looked at the code when you first posted it. I had assumed that they just deleted the line that displays the button prior to release. Without that there, there was no reason to bother removing any other code. Since this bit of code is so specific to the title screens print statement, it didn't feel like it was a real debug kind of option.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: SQ5 room 100, how to trigger debug thing?
« Reply #2 on: May 08, 2015, 09:51:53 AM »
Remember though that the beta of SQ4 had a dialog at the beginning asking which room to go to. Maybe we should check the SQ5 beta.
Brass Lantern Prop Competition

Offline Collector

Re: SQ5 room 100, how to trigger debug thing?
« Reply #3 on: May 08, 2015, 12:18:52 PM »
I should have a copy of the SQ5 beta if needed.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.036 seconds with 22 queries.