[Scummvm-tracker] [ScummVM] #10873: QFG4 CD: Hero stutters when running
ScummVM
trac at scummvm.org
Wed Jan 16 22:00:14 CET 2019
#10873: QFG4 CD: Hero stutters when running
--------------------------------+-------------------------
Reporter: Vhati | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCI
Resolution: | Keywords: SCI32
Game: Quest for Glory 4 |
--------------------------------+-------------------------
Comment (by Vhati):
"bp_write hero::cycler log" reports that the cycler is repeatedly being
nulled and replaced.
\\
\\
Script 64977 - Grooper::doit()
{{{
# ...
(client
cycler: 0
mover: 0
setMotion: 0
setCycle: Grycler self temp0
)
}}}
I'm still unclear about Grooper's purpose. I looked further up the
backtrace...
\\
\\
Floppy edition, script 64998 - Actor::doit()
{{{
(if script (script doit:))
(if code (code doit: self))
(if (& signal notUpd)
(if viewer (viewer doit: self))
(if avoider (avoider doit:))
(if mover
(if
(and (& scaleSignal $0001) (not (& scaleSignal $0004)))
(= temp5 (>> origStep $0008))
(= temp6 (& origStep $00ff))
(= temp3
(if (= temp7 (/ (* temp5 scaleX) 128))
else 1)
)
(= temp4
(if (= temp7 (/ (* temp6 scaleY) 128))
else 1)
)
(if (or (!= temp3 xStep) (!= temp4 yStep))
(self setStep: temp3 temp4 1)
)
)
(if mover (mover doit:))
)
(if scaler (scaler doit:))
(if cycler
(= temp1 brLeft)
(= temp2 brRight)
(cycler doit:)
(cond
((not (& signal $0020)))
(baseSetter (baseSetter doit: self))
(else (BaseSetter self))
)
)
)
(= xLast x)
(= yLast y)
(if (and (& -info- $0008) (self isNotHidden:))
(UpdateScreenItem self)
)
}}}
\\
\\
CD edition, script 64998 - Actor::doit()
{{{
(if robot (robot doit:))
(if script (script doit:))
(if code (code doit: self))
(if (& signal notUpd)
(if viewer (viewer doit: self))
(if avoider (avoider doit:))
(if mover (mover doit:))
(if cycler (cycler doit:))
(if (& -info- $0008)
(if scaler (scaler doit:))
(= xLast x)
(= yLast y)
(if (self isNotHidden:) (UpdateScreenItem self))
(if
(and
(& scaleSignal $0001)
(not (& scaleSignal $0004))
(!= scaleX oldScaleX)
)
(= oldScaleX scaleX)
(= temp2
(if
(= temp4
(>> (+ (* (>> origStep
$0008) scaleX) 64) $0007)
)
else
1
)
)
(= temp3
(if
(= temp4
(>> (+ (* (& origStep
$00ff) scaleY) 64) $0007)
)
else
1
)
)
(if (or (!= temp2 xStep) (!= temp3 yStep))
(self setStep: temp2 temp3 1)
)
)
(cond
((not (& signal $0020)))
(baseSetter (baseSetter doit: self))
(else (BaseSetter self))
)
)
)
}}}
\\
\\
When the scaler changes hero's size, setStep() re-inits the mover creating
a new PolyPath, setHeading(), etc.
\\
\\
script 64998 - Actor::setStep()
{{{
(= temp0 (>> origStep $0008))
(= temp1 (& origStep $00ff))
(if (and (>= argc 1) (!= param1 -1)) (= temp0 param1))
(if (and (>= argc 2) (!= param2 -1)) (= temp1 param2))
(if (or (< argc 3) (not param3))
(= origStep (+ (<< temp0 $0008) temp1))
)
(= xStep temp0)
(= yStep temp1)
(if
(and
mover
(or
(mover isMemberOf: MoveTo)
(mover isMemberOf: PolyPath)
)
)
(mover init:)
)
}}}
\\
\\
"send hero scaleSignal 0"
Problem goes away.
"send hero scaleSignal 1"
Problem returns.
\\
\\
I built ScummVM with "./configure --enable-text-console" to get live
debugger feedback in the status window. (Tip: To return to the game, gotta
type "go" instead of escape.)
"bp_write hero::scaleY log"
Scaling definitely coincides with stuttering.
--
Ticket URL: <https://bugs.scummvm.org/ticket/10873#comment:3>
ScummVM <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list