[Scummvm-git-logs] scummvm master -> 5b8dd68d2123bf85f3a092bd6126ba94d89ee395
sluicebox
22204938+sluicebox at users.noreply.github.com
Sat Apr 18 00:50:05 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5b8dd68d21 SCI32: Add PQ4 Mac save/restore workarounds
Commit: 5b8dd68d2123bf85f3a092bd6126ba94d89ee395
https://github.com/scummvm/scummvm/commit/5b8dd68d2123bf85f3a092bd6126ba94d89ee395
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-04-17T17:47:58-07:00
Commit Message:
SCI32: Add PQ4 Mac save/restore workarounds
Changed paths:
engines/sci/engine/guest_additions.cpp
engines/sci/engine/workarounds.cpp
diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp
index dd0448f4a0..dbb0306e6e 100644
--- a/engines/sci/engine/guest_additions.cpp
+++ b/engines/sci/engine/guest_additions.cpp
@@ -756,11 +756,13 @@ bool GuestAdditions::restoreFromLauncher() const {
return false;
}
- // Delayed restore should not happen in LSL6 hires until the room number is set.
- // LSL6:restore tests room numbers to determine if restoring is allowed, but the
- // Mac version adds a call to kGetEvent in LSL6:init before the initial call to
- // LSL6:newRoom. If the room number isn't set yet then restoring isn't allowed.
- if (g_sci->getGameId() == GID_LSL6HIRES && _state->variables[VAR_GLOBAL][kGlobalVarCurrentRoomNo] == NULL_REG) {
+ // Delayed restore should not happen in LSL6 hires or PQ4 until the room number is set.
+ // LSL6:restore and pq4:restore assume the room number has already been set, but the
+ // Mac versions of these game add a call to kGetEvent in the games' init method before
+ // the initial call to newRoom. If the room number isn't set yet then LSL6 doesn't
+ // allow the restore and PQ4 sends a message to an invalid object.
+ if ((g_sci->getGameId() == GID_LSL6HIRES || g_sci->getGameId() == GID_PQ4) &&
+ _state->variables[VAR_GLOBAL][kGlobalVarCurrentRoomNo] == NULL_REG) {
return false;
}
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index be4b9184a7..a921833708 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -492,6 +492,8 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_PQ4, 2010, 2010, -1, "enemyShip1", "cantBeHere", NULL, 7, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
{ GID_PQ4, 2010, 2010, -1, "enemyShip2", "cantBeHere", NULL, 7, 7, { WORKAROUND_FAKE, 0 } }, // when crashing into a UFO in the asteroids minigame in the Shortstop Bar
{ GID_PQ4, -1, 64950, -1, "Feature", "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // floppy: when walking within room 395 (city hall, day 3)
+ { GID_PQ4, -1, 64994, -1, "Game", "save", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // when saving in Mac version
+ { GID_PQ4, -1, 0, -1, "pq4", "restore", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // when restoring in Mac version
{ GID_PQSWAT, -1, 64950, 0, NULL, "handleEvent", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Using any menus in-game
{ GID_PQSWAT, -1, 73, 0, "theLashInterface", "transmit", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // Clicking the transmit button in LASH
{ GID_PQSWAT, 2990, 2990, 0, "talkToSchienbly", "changeState", NULL, 1, 1, { WORKAROUND_FAKE, 0 } }, // When the video of Schienbly talking for the first time ends
More information about the Scummvm-git-logs
mailing list