[Scummvm-tracker] [ScummVM] #10753: QFG4: Talking to absent innkeeper

Vhati trac at scummvm.org
Thu Nov 15 03:41:02 CET 2018


#10753: QFG4: Talking to absent innkeeper
--------------------------------+----------------------------
  Reporter:  Vhati              |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  low                |  Component:  Engine: SCI
Resolution:                     |   Keywords:  SCI32 original
      Game:  Quest for Glory 4  |
--------------------------------+----------------------------

Comment (by Vhati):

 script 7 - fixTime::init() sets some time globals.
 * global123
   * Simplified time of day, the nth 3-hour span: 6,7,0,1,2,3,4,5.
   * Where 6 is midnight aka "You are getting tired". The sun rises in 0
 and sets in 4.
 \\
 \\
 Exported utility functions set and test numbered plot flags.
 * "proc0_2(n)", "proc0_3(n)"
   * Not clear on what they each do, but definitely setters.
 * "proc0_4(n)"
   * Tests the given flag.
 * "proc64999_5(global123 4 5)"
   * Tests if a variable has one of a list of desired values. So this
 example would test for evening pre-midnight.
 \\
 \\
 script 320 - rm320::init() sets local2 based on a huge if-elsey "cond"
 block. That block tests a bunch of flags and globals.

 Later in sInitShit::changeState(1)...
 * heroTeller is constructed with a local2-decided list of dialogue
 options, via script 324.
 * Then another switch block uses local2 to react to hero's entry. It sets
 new flags and makes announcements. Those flags will take effect after re-
 entering.
 \\
 \\
 This bug occurs when local2 == 11. Based on flags (132 && !134) after
 failing most of the other switch cases.

 {{{
 (= local2
         (cond
 # ...
                 (
                         (and
                                 (proc0_4 48)
                                 (proc0_4 39)
                                 (not (proc0_4 132))
                                 (proc64999_5 global123 4 5)
                         )
                         7
                 )
 # ...
                 (
                         (and
                                 (not (proc0_4 132))
                                 (or (<= global123 3) (proc64999_5
 global123 4 5))
                         )
                         10
                 )

 # Next line's the bug.
 # Missing a global123 check that it isn't midnight or later, empty room.

                 ((and (proc0_4 132) (not (proc0_4 134))) 11)
                 ((proc0_4 134) 12)
                 (else 0)
         )
 )
 }}}

 * Flag 48.
   * As Igor is rescued (script 500 - sIgorLeaves).
 * Flag 39.
   * Burgomeister at window, "Since you have found and rescued Igor, I have
 released our gypsy prisoner. It seems he was not a Werewolf after all! All
 the peasant fears were for nothing." (script 260 - sEnterScr)
   * Break Davy out of the Burgomeister's office (script 300 -
 sLetGypsyOut).
 * Flag 132.
   * When the inn init() decides local2 = 7. "So Dmitri says the gypsy
 didn't really kill Igor after all." (script 320 - sInitShit)
 * Flag 134.
   * When the inn init() decides local2 = 9. "I must thank you for saving
 our Tanya. You have brought joy again into our lives. We are in your
 debt."  (script 320 - sInitShit)
 \\
 \\
 When the inn init() decides local2 = 11, heroTeller is constructed with a
 dialogue option list that includes "Tell about yourself".

--
Ticket URL: <https://bugs.scummvm.org/ticket/10753#comment:11>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list