[Scummvm-tracker] [ScummVM] #10829: QFG4: Iron safe room, door to the east sends hero west
Vhati
trac at scummvm.org
Sat Dec 8 02:35:50 CET 2018
#10829: QFG4: Iron safe room, door to the east sends hero west
--------------------------------+----------------------------
Reporter: Vhati | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCI
Resolution: | Keywords: SCI32 original
Game: Quest for Glory 4 |
--------------------------------+----------------------------
Comment (by Vhati):
The safe room uses local2 to remember which door it last decided hero was
closer to.
\\
\\
script 643 - sOpenTheDoor::changeState()
{{{
(0
(g1_glory handsOff:)
(doorSound play:)
(if (< (g0_hero x?) 160)
(= local2 1)
(if (not (proc0_4 214)) # test plot flag for oiled left
door
# The door hinges squeak in protest as you open
the door.
(g91_gloryMessager say: 1 4 3 1 0 640)
(squeakSound play:)
)
(pLeftDoor setCycle: End self)
else
# local2 is inside the if!?
(if (not (proc0_4 215)) # test plot flag for oiled right
door
(= local2 0)
# The door hinges squeak in protest as you open
the door.
(g91_gloryMessager say: 1 4 3 1 0 640)
(squeakSound play:)
)
(pRightDoor setCycle: End self)
)
)
# ...
(2
(if local2
(g2_myCurrentRoom newRoom: 625)
else
(g2_myCurrentRoom newRoom: 624)
)
)
}}}
The right side isn't reliably setting local2.
\\
\\
That means if the right door isn't oiled, local2 was last set by init()
depending on the previous room number.
\\
\\
script 643 - rm643::init()
{{{
(switch g12_myPrevRoomNum
(625
(= local2 1)
(= local0 55)
(= local1 164)
(g0_hero posn: 9 130)
)
(else
(= local0 257)
(= local1 166)
(g0_hero posn: 288 146)
)
}}}
Thus if hero enters from the left (setting local2 = 1) and opens the
righthand door, with flag 215, hero is sent west to the haunted stairway
(265), not east to the empty stairway (624).
\\
\\
To add more confusion...
* The west room sets flag 214 to oil the left door.
* The east room sets flag 215 to oil the right door.
* Within the the safe room, both doors' doVerb(oil) methods swapped the
flags!
* The left door sets 215, right door sets 214.
\\
\\
Unrelated: if a rogue picks either lock, one oiled door mutes both doors.
\\
\\
scipt 643 - sPickLock::changeState(1)
{{{
(1
(cond
((proc0_4 215) (self cue:))
((proc0_4 214) (self cue:))
(else
(squeakSound play:)
# The door hinges squeak in protest as you open
the door.
(g91_gloryMessager say: 1 4 3 1 0 640)
(self cue:)
)
)
)
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/10829#comment:3>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list