[Scummvm-tracker] [ScummVM :: Bugs] #15379: ADL: HIRES5: Game unsolvable after loading savegame. Save state not properly restored?

ScummVM :: Bugs trac at scummvm.org
Sat Sep 21 20:15:35 UTC 2024


#15379: ADL: HIRES5: Game unsolvable after loading savegame. Save state not
properly restored?
-------------------------+---------------------------------------------
Reporter:  eriktorbjorn  |       Owner:  (none)
    Type:  defect        |      Status:  new
Priority:  normal        |   Component:  Engine: ADL
 Version:                |  Resolution:
Keywords:                |        Game:  Hi-Res Adventure #5: Time Zone
-------------------------+---------------------------------------------
Comment (by eriktorbjorn):

 The `AdlEngine_v4` implementation of `saveState()` and `loadState()` are
 used by the following games, as far as I can tell:

 * Time Zone
 * The Dark Crystal

 The latter defines its own version, but it's just a minor extension. So at
 least it's all games that I own copies of.

 The way I understand `loadState()`:

 It loads the header of the save file. This tells it which room and region
 the player is in and, for whatever reason, the previous region as well.
 Then it loads all the saved data, which consists of:

 * Each room's `picture` and `isFirstTime` values.
 * Each region's variables.
 * The `room`, `region` and `state` of every object.
 * Another list of variables, possibly global ones?

 Then it calls `loadRegion()` for the current region. This is presumably to
 load the constant data for the region (vocabulary, map connections, etc.).
 That includes the `picture`, but it probably won't overwrite what was read
 from the savefile. The current rooms are loaded into `_state.rooms` while
 the ones loaded from the savegame are in `_state.regions.rooms`.

 Finally it calls `restoreRoomState(_state.room)` which will set the
 `picture` and `curPicture` (haven't checked what the difference between
 the two are) to what was read from the savegame, though only if the room's
 `isFirstTime` flag is false. I'm not sure what that's about either.

 It seems to me that when loading a saved game, it should fix the `picture`
 of ''every'' room in the current region?
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15379#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list