[Scummvm-tracker] [ScummVM] #10772: QFG4: Rations icon persists in toolbar after all are eaten

Vhati trac at scummvm.org
Mon Nov 12 23:39:32 CET 2018


#10772: QFG4: Rations icon persists in toolbar after all are eaten
--------------------------------+----------------------------
  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):

 * gloryInv (global9) is a collection of inventory items. "global9 at: 4"
 is theRations.
 * "proc0_4(n)" - Tests the given plot flag.
 * "proc0_2(n)", "proc0_3(n)" - Not clear on what they each do, but
 definitely setters.
 \\
 \\
 script 7 - advanceTime::init() calls hero::eatMeal().
 \\
 \\
 script 28 - hero::eatMeal()
 {{{
         (method (eatMeal &tmp temp0)
                 (= temp0 0)
                 (cond
                         (global136 (-- global136) (= temp0 1))
                         (((global9 at: 4) amount?)
                                 ((global9 at: 4)
                                         amount: (- ((global9 at: 4)
 amount?) 1)
                                 )
                                 (if (not ((global9 at: 4) amount?))
                                         ((global9 at: 4) owner: 0)
 # More needs to be done here!
                                 )
                                 (= temp0 1)
                         )
                         ((proc0_4 3)
                                 (if (self useStamina: 8 0)
                                         (global91 say: 1 6 5 1 0 28)
                                 else
                                         (proc26_0 8 28 995 1)
                                 )
                         )
                         ((proc0_4 2) (proc0_2 3) (global91 say: 1 6 6 1 0
 28))
                         (else (proc0_2 2) (global91 say: 1 6 4 1 0 28))
                 )
                 (if temp0
                         (cond
                                 ((proc0_4 3) (proc0_3 3))
                                 ((proc0_4 2) (proc0_3 2))
                         )
                 )
         )
 }}}
 \\
 \\
 script 16 has a procedure to cleanup mainIconBar (global69) when it sets
 amount to 0 on an item.
 {{{
 (procedure (localproc_00cc &tmp temp0)
         (global69 curInvIcon: 0 advanceCurIcon:)
         (global69 disableIcon: (global69 at: 6))
         (= temp0 (ScriptID 36 1))
         (temp0 signal: (| (temp0 signal?) $0008))
         (DeleteScreenItem temp0)
 )
 // ...
                                 (if (== (global69 curInvIcon?) theBerries)
                                         (localproc_00cc)
                                 )
                                 (theBerries amount: 0)
 }}}
 \\
 \\
 Something like that should be happening.

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


More information about the Scummvm-tracker mailing list