[Scummvm-tracker] [ScummVM] #10837: QFG4: Crash casting Trigger on squid monolith after using grapnel

Vhati trac at scummvm.org
Sun Dec 16 23:56:37 CET 2018


#10837: QFG4: Crash casting Trigger on squid monolith after using grapnel
--------------------------------+----------------------------
  Reporter:  Vhati              |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  high               |  Component:  Engine: SCI
Resolution:                     |   Keywords:  SCI32 original
      Game:  Quest for Glory 4  |
--------------------------------+----------------------------

Comment (by Vhati):

 Eh, leaving the scaler on during the climb isn't so bad.
 If all else fails, I can do that.
 \\
 \\
 I see.
 * sUseTheGrapnel::changeState() climbs up.
   * State 4 moves hero to 242 y_145.
   * State 5 freezes hero's scale.
 * sGetDown::changeState() climbs down.
   * State 6 moves back to x:242 y:145.
   * State 7 would be the time to put a scaler on.
     * Same y pos: no sudden scale change.

 As luck would have it, local19 is never used.
 We can stash the scaler there while it's not on hero!
 \\
 \\
 I experimented with the debugger.
 * I nulled hero's "scaler" property to see what would happen.
 * Recklessly stashed its address in a global - in case there was garbage
 collection going on.
 * hero didn't shrink during the climb up, didn't grow during the climb
 down.
 * I reattached the scaler. Dynamic shrinking resumed, and Trigger worked.

 Should be able to assign hero's scaler to local19 in the room's init(),
 then put it back on hero in sGetDown.

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


More information about the Scummvm-tracker mailing list