[Scummvm-tracker] [ScummVM :: Bugs] #13113: Humongous Games crash when loading save

ScummVM :: Bugs trac at scummvm.org
Mon Nov 29 06:21:30 UTC 2021


#13113: Humongous Games crash when loading save
---------------------+--------------------------------------
Reporter:  Satertek  |       Owner:  (none)
    Type:  defect    |      Status:  new
Priority:  normal    |   Component:  Engine: SCUMM
 Version:            |  Resolution:
Keywords:  puttzoo   |        Game:  Putt-Putt Saves the Zoo
---------------------+--------------------------------------
Comment (by eriktorbjorn):

 Some more thinking out loud...

 While loading the savegame, it will apparently load a list of resources.
 See saveLoadWithSerializer():

 {{{
                         uint16 tmp;
                         while (s.syncAsUint16LE(tmp), tmp != 0xFFFF) {
                                 type = (ResType)tmp;
                                 while (s.syncAsUint16LE(idx), idx !=
 0xFFFF) {
                                         assert(idx <
 _res->_types[type].size());
                                         loadResource(s, type, idx);
                                         applyWorkaroundIfNeeded(type,
 idx);
                                 }
                         }
 }}}

 But loadResource() has a special case for Humongous Games and sound
 resources:

 {{{
         } else if (type == rtSound) {
                 // HE Games use sound resource 1 for speech
                 if (_game.heversion >= 60 && idx == 1)
                         return;

                 ensureResourceLoaded(rtSound, idx);
         } else if (_res->_types[type]._mode == kDynamicResTypeMode) {
 }}}

 Which apparently means that sound resource 1 isn't (and shouldn't) loaded
 after all.

 The applyWorkaroundIfNeeded() function was added recently to work around
 some script problems. Initially for allowing FM Towns games to be cropped
 to 320x200 pixels, but later it was extended for other things as well.

 This function assumes that the resource is loaded. I guess it shouldn't do
 that.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/13113#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list