Opened 3 months ago

Closed 3 months ago

#15549 closed defect (fixed)

SCUMM: MI2 Macintosh crashes in scrollEffect() if Mac GUI/Menus are disabled

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: high Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 2

Description

Steps to reproduce:

With the Macintosh version of Monkey Island 2, start the game with boot param 1977. This will start you at the scene where Guybrush dives for the Mad Monkey. (He won't find it, but that's beside the point.)

With the Mac GUI/Menus enabled, this works fine.

With the Mac GUI/Menus disabled, it crashes with the following assertion:

scummvm: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:1674: virtual void SurfaceSdlGraphicsManager::copyRectToScreen(const void*, int, int, int, int, int): Assertion `y >= 0 && y < _videoMode.screenHeight' failed.

I think it would be nice to have fixed for 2.9, but it's too close to release for me to investigate it by myself.

Change History (2)

comment:1 by eriktorbjorn, 3 months ago

It may be as simple as this:

diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 59431fe3d0a..b57759935ba 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -4803,7 +4803,7 @@ void ScummEngine::scrollEffect(int dir) {
        byte *src;
        int m = _textSurfaceMultiplier;

-       if (m == 1 && _game.platform == Common::kPlatformMacintosh)
+       if (m == 1 && _game.platform == Common::kPlatformMacintosh && _macScreen)
                m = 2;

        int vsPitch = vs->pitch;

comment:2 by eriktorbjorn, 3 months ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

I've committed my fix. I've tested the Mac version with and without original GUI, and the DOS version. They all seem to work fine now. (I don't have any other version, but the change I made can only affect the Mac version anyway.)

Note: See TracTickets for help on using tickets.