[Scummvm-tracker] [ScummVM :: Bugs] #14468: SCUMM: SAMNMAX: copyRectToSurface() assert triggered in 2.8.0git when loading a save
ScummVM :: Bugs
trac at scummvm.org
Sat May 20 21:56:48 UTC 2023
#14468: SCUMM: SAMNMAX: copyRectToSurface() assert triggered in 2.8.0git when
loading a save
--------------------------------------------+----------------------------
Reporter: dwatteau | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: copyRectToSurface,cursor,assert | Game: Sam and Max
--------------------------------------------+----------------------------
Comment (by AndywinXp):
Thanks athrxx! I have yet to fully reconstruct the strange course of
events which consciously led me to do
[https://github.com/scummvm/scummvm/commit/9c2e357172e407f5f49ecf30d9b1ee8bbfcf7b65
this], here's what I roughly tested as a fix between some real code and
some debugger magic:
- Removing this section from gfx_gui.cpp (because, again, I can't figure
out my rationale from 8 months ago):
{{{
else if (_game.version == 6 && _game.id != GID_TENTACLE) {
setCursorHotspot(_curCursorHotspotX, _curCursorHotspotY);
_cursor.width = _curCursorWidth;
_cursor.height = _curCursorHeight;
}
}}}
- Patching savegame loading in saveload.cpp by inserting some valid values
after line 1440:
{{{
s.syncAsSint16LE(_cursor.width, VER(20));
s.syncAsSint16LE(_cursor.height, VER(20));
s.syncAsSint16LE(_cursor.hotspotX, VER(20));
s.syncAsSint16LE(_cursor.hotspotY, VER(20));
if (_game.version == 6 && (_cursor.width == 0 || _cursor.height ==
0 || ...)) {
/* Apply decent values, the value of which I frankly do not
know... */
}
}}}
I'm going to take some time to properly figure this out (for the third
time, why did I put the code there in the first place? :-) ), and it's
kind of late right now so I also need to rest.
--
Ticket URL: <https://bugs.scummvm.org/ticket/14468#comment:6>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list