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?
(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))
)
)
)