[Scummvm-tracker] [ScummVM] #10857: QFG4: Pathfinding in forest 1S 1W from town, east entry

ScummVM trac at scummvm.org
Wed Jan 2 14:48:50 CET 2019


#10857: QFG4: Pathfinding in forest 1S 1W from town, east entry
--------------------------------+-------------------------
  Reporter:  tomasz89           |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  normal             |  Component:  Engine: SCI
Resolution:                     |   Keywords:  SCI32
      Game:  Quest for Glory 4  |
--------------------------------+-------------------------

Comment (by Vhati):

 SCI Companion got confused, so I decompiled forest::init() by hand.
 It was quite long and, as it turns out, not especially relevant to this
 bug.

 The decompiled code and raw disasm from ScummVM are attached.
 It's primarily concerned with random monster encounters.
 \\
 \\
 script 50 - forest::init()
 {{{
 (switch myPrevRoomNum
 # ...
         ((g2_myCurrentRoom east?)
                 (g0_hero posn: 335 136 setHeading: 270)
                 (= loc1
                         (-
                                 313
                                 (if g365_myFoeScriptNum 1 else 21)
                         )
                 )
                 (= loc2 136)
                 (g2_myCurrentRoom setScript: enterRoomScr)
         )
 # ...
 )
 }}}
 \\
 loc1 and loc2 are x,y coords that hero is sent to by
 enterRoomScr::changeState(1).

 In this case, hero starts at (335,136) and is sent to (292,136).

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


More information about the Scummvm-tracker mailing list