[Scummvm-tracker] [ScummVM] #10772: QFG4: Rations icon persists in toolbar after all are eaten
Vhati
trac at scummvm.org
Sun Dec 23 04:53:23 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):
script 28 - Patch pseudocode
{{{
(method (eatMeal &tmp temp0 temp1 temp2)
(= temp0 0)
# (cond 1)
(if global136
(-- global136)
(= temp0 1) # Eaten.
[Skip the other conditions] # Patch begins.
)
# (cond 2)
# theRations
(= temp1 (g9_gloryInv at: 4))
(= temp2 (theRations amount?))
(if temp2
(temp1 amount: (-- temp2))
(if (== temp2 0)
(temp1 owner: 0)
(if (== (g69_mainIconBar curInvIcon?) temp1)
# theRations was the active inventory
item.
(g69_mainIconBar
curInvIcon: 0
advanceCurIcon:
disable: 6
)
# invItem
((ScriptID 36 1) hide:)
)
)
(= temp0 1)
[Skip the other conditions]
)
# The following blocks are the same, except say() is a subroutine.
# (cond 3, "hungry" flag)
((proc0_4 3)
(if (self useStamina: 8 0)
(mySub 5) # "You're starving."
else
(proc26_0 8 28 995 1) # hero dies.
)
[Skip the other conditions]
)
# (cond 4, "missed meal" flag)
((proc0_4 2)
(proc0_2 3)
(mySub 6) # "Really getting hungry."
[Skip the other conditions]
)
# (cond else)
(else
(proc0_2 2)
(mysub 4) # "Get food soon."
)
(subroutine (mySub param1)
(g91_gloryMessager say: 1 6 param1 1 0 28)
)
# Patch ends.
(if temp0
(cond
((proc0_4 3) (proc0_3 3))
((proc0_4 2) (proc0_3 2))
)
)
)
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/10772#comment:6>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list