[Scummvm-git-logs] scummvm master -> c5a374f37ff8f249900ae72af86bd9ef46d4435b
elasota
noreply at scummvm.org
Sat May 27 06:14:23 UTC 2023
This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
efb203a563 VCRUISE: Update save logic, only permit snapshots and hero changes on screens with horizontal panoramas. Always refresh
98dfdec591 VCRUISE: Link vars to the load room number instead of file room number when the room script is duplicated.
8487e55be8 VCRUISE: Apply backStart immediately instead of attempting to change screen
cc89113481 VCRUISE: Add pause menu text for Schizm
b60ad00044 VCRUISE: Fix keybound menu pages in Schizm
c64258aecd VCRUISE: Switch to arrow cursor when going from in-game to a menu page (in case the user pauses while moused over an int
f9c8ee41eb VCRUISE: Fix mouse not resetting when clicking mechanical computer pegs
c5a374f37f VCRUISE: Don't allow saving while not in-game. This also fixes a bug where exiting the game to the main menu would caus
Commit: efb203a563c1bfa5b3208abcc9fc3db28ba6f874
https://github.com/scummvm/scummvm/commit/efb203a563c1bfa5b3208abcc9fc3db28ba6f874
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:58-04:00
Commit Message:
VCRUISE: Update save logic, only permit snapshots and hero changes on screens with horizontal panoramas. Always refresh the frame after changing heroes in Schizm, which should fix the prisoner room showing water after turning the valve off.
Changed paths:
engines/vcruise/runtime.cpp
engines/vcruise/runtime.h
engines/vcruise/script.cpp
engines/vcruise/script.h
engines/vcruise/vcruise.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b6709e7710f..82cb58b88d4 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -129,7 +129,7 @@ Common::Point RuntimeMenuInterface::getMouseCoordinate() const {
void RuntimeMenuInterface::restartGame() const {
Common::SharedPtr<SaveGameSnapshot> snapshot = _runtime->generateNewGameSnapshot();
- _runtime->_saveGame = snapshot;
+ _runtime->_mostRecentValidSaveState = snapshot;
_runtime->restoreSaveGameSnapshot();
}
@@ -160,11 +160,11 @@ void RuntimeMenuInterface::quitGame() const {
}
bool RuntimeMenuInterface::canSave() const {
- return _runtime->canSave();
+ return _runtime->canSave(false);
}
bool RuntimeMenuInterface::reloadFromCheckpoint() const {
- if (!_runtime->canSave())
+ if (!_runtime->canSave(false))
return false;
_runtime->restoreSaveGameSnapshot();
@@ -1371,7 +1371,7 @@ bool Runtime::bootGame(bool newGame) {
if (newGame) {
if (ConfMan.hasKey("vcruise_skip_menu") && ConfMan.getBool("vcruise_skip_menu")) {
- _saveGame = generateNewGameSnapshot();
+ _mostRecentValidSaveState = generateNewGameSnapshot();
restoreSaveGameSnapshot();
} else {
changeToScreen(1, 0xb1);
@@ -2226,6 +2226,7 @@ bool Runtime::runScript() {
DISPATCH_OP(SaveAs);
DISPATCH_OP(Save0);
DISPATCH_OP(Exit);
+ DISPATCH_OP(BlockSaves);
DISPATCH_OP(AnimName);
DISPATCH_OP(ValueName);
@@ -3072,10 +3073,14 @@ void Runtime::clearIdleAnimations() {
}
void Runtime::changeHero() {
+ assert(canSave(true));
+
recordSaveGameSnapshot();
- Common::SharedPtr<SaveGameSwappableState> currentState = _saveGame->states[0];
- Common::SharedPtr<SaveGameSwappableState> alternateState = _saveGame->states[1];
+ SaveGameSnapshot *snapshot = _mostRecentlyRecordedSaveState.get();
+
+ Common::SharedPtr<SaveGameSwappableState> currentState = snapshot->states[0];
+ Common::SharedPtr<SaveGameSwappableState> alternateState = snapshot->states[1];
if (_swapOutRoom && _swapOutScreen) {
// Some scripts may kick the player out to another location on swap back,
@@ -3087,13 +3092,15 @@ void Runtime::changeHero() {
currentState->havePendingPostSwapScreenReset = true;
}
- _saveGame->states[0] = alternateState;
- _saveGame->states[1] = currentState;
+ snapshot->states[0] = alternateState;
+ snapshot->states[1] = currentState;
- _saveGame->hero ^= 1u;
+ snapshot->hero ^= 1u;
changeToCursor(_cursors[kCursorArrow]);
+ _mostRecentValidSaveState = _mostRecentlyRecordedSaveState;
+
restoreSaveGameSnapshot();
}
@@ -3146,6 +3153,9 @@ bool Runtime::triggerPreIdleActions() {
void Runtime::returnToIdleState() {
debug(1, "Returned to idle state in room %u screen 0%x facing direction %u", _roomNumber, _screenNumber, _direction);
+
+ if (canSave(true))
+ _mostRecentValidSaveState = _mostRecentlyRecordedSaveState;
_idleIsOnInteraction = false;
_idleHaveClickInteraction = false;
@@ -3231,7 +3241,7 @@ bool Runtime::dischargeIdleMouseMove() {
}
if (_gameID == GID_SCHIZM && !isOnInteraction) {
- if (_traySection.rect.contains(_mousePos) && (_traySection.rect.right - _mousePos.x) < (int) 88u) {
+ if (_traySection.rect.contains(_mousePos) && (_traySection.rect.right - _mousePos.x) < (int) 88u && canSave(true)) {
isOnInteraction = true;
interactionID = kHeroChangeInteractionID;
}
@@ -3758,6 +3768,9 @@ void Runtime::triggerSound(SoundLoopBehavior soundLoopBehavior, SoundInstance &s
cache->player->setVolumeAndBalance(snd.effectiveVolume, snd.effectiveBalance);
}
} else {
+ if (!snd.isLooping)
+ cache->stream->rewind();
+
cache->player.reset(new AudioPlayer(_mixer, snd.isLooping ? cache->loopingStream.staticCast<Audio::AudioStream>() : cache->stream.staticCast<Audio::AudioStream>(), soundType));
cache->player->play(snd.effectiveVolume, snd.effectiveBalance);
}
@@ -4702,7 +4715,9 @@ void Runtime::drawCompass() {
break;
}
- haveLocation = (haveUp || haveDown || haveHorizontalRotate);
+ // Try to keep this logic in sync with canSave(true)
+ haveLocation = haveHorizontalRotate;
+ //haveLocation = haveLocation || haveUp || haveDown;
const Common::Rect blackoutRects[4] = {
Common::Rect(0, 40, 36, 62), // Left
@@ -5006,7 +5021,7 @@ void Runtime::checkInGameMenuHover() {
_inGameMenuButtonActive[0] = true;
// Save
- _inGameMenuButtonActive[1] = (_saveGame != nullptr);
+ _inGameMenuButtonActive[1] = (_mostRecentlyRecordedSaveState != nullptr);
// Load
_inGameMenuButtonActive[2] = static_cast<VCruiseEngine *>(g_engine)->hasAnySave();
@@ -5287,8 +5302,12 @@ void Runtime::onKeymappedEvent(KeymappedEvent kme) {
queueOSEvent(evt);
}
-bool Runtime::canSave() const {
- return !!_saveGame;
+bool Runtime::canSave(bool onCurrentScreen) const {
+ if (onCurrentScreen) {
+ return (_mostRecentlyRecordedSaveState.get() != nullptr && _haveHorizPanAnimations);
+ } else {
+ return _mostRecentValidSaveState.get() != nullptr;
+ }
}
bool Runtime::canLoad() const {
@@ -5299,13 +5318,13 @@ void Runtime::recordSaveGameSnapshot() {
if (!_isInGame)
return;
- _saveGame.reset();
+ _mostRecentlyRecordedSaveState.reset();
uint32 timeBase = g_system->getMillis();
Common::SharedPtr<SaveGameSnapshot> snapshot(new SaveGameSnapshot());
- _saveGame = snapshot;
+ _mostRecentlyRecordedSaveState = snapshot;
snapshot->states[0].reset(new SaveGameSwappableState());
if (_gameID == GID_REAH)
@@ -5406,11 +5425,15 @@ void Runtime::recordSounds(SaveGameSwappableState &state) {
}
void Runtime::restoreSaveGameSnapshot() {
+ _mostRecentlyRecordedSaveState = _mostRecentValidSaveState;
+
+ SaveGameSnapshot *snapshot = _mostRecentValidSaveState.get();
+
uint32 timeBase = g_system->getMillis();
- _altState = _saveGame->states[1];
+ _altState = snapshot->states[1];
- SaveGameSwappableState *mainState = _saveGame->states[0].get();
+ SaveGameSwappableState *mainState = snapshot->states[0].get();
for (uint i = 0; i < kNumInventorySlots && i < mainState->inventory.size(); i++) {
const SaveGameSwappableState::InventoryItem &saveItem = mainState->inventory[i];
@@ -5430,22 +5453,24 @@ void Runtime::restoreSaveGameSnapshot() {
_screenNumber = mainState->screenNumber;
_direction = mainState->direction;
_havePendingPostSwapScreenReset = mainState->havePendingPostSwapScreenReset;
- _hero = _saveGame->hero;
- _swapOutRoom = _saveGame->swapOutRoom;
- _swapOutScreen = _saveGame->swapOutScreen;
- _swapOutDirection = _saveGame->swapOutDirection;
+ _hero = snapshot->hero;
+ _swapOutRoom = snapshot->swapOutRoom;
+ _swapOutScreen = snapshot->swapOutScreen;
+ _swapOutDirection = snapshot->swapOutDirection;
- _pendingStaticAnimParams = _saveGame->pendingStaticAnimParams;
+ _pendingStaticAnimParams = snapshot->pendingStaticAnimParams;
_variables.clear();
- _variables = _saveGame->variables;
+ _variables = snapshot->variables;
_timers.clear();
- for (const Common::HashMap<uint, uint32>::Node &timerNode : _saveGame->timers)
+ _havePendingPostSwapScreenReset = true;
+
+ for (const Common::HashMap<uint, uint32>::Node &timerNode : snapshot->timers)
_timers[timerNode._key] = timerNode._value + timeBase;
- _escOn = _saveGame->escOn;
+ _escOn = snapshot->escOn;
_musicVolume = mainState->musicVolume;
_musicVolumeRampStartTime = 0;
@@ -5454,16 +5479,31 @@ void Runtime::restoreSaveGameSnapshot() {
_musicVolumeRampEnd = _musicVolume;
_musicActive = mainState->musicActive;
- _musicMuteDisabled = mainState->musicMuteDisabled;
- if (_gameID == GID_REAH)
- changeMusicTrack(mainState->musicTrack);
- if (_gameID == GID_SCHIZM) {
- if (_musicActive) {
- _scoreSection = mainState->scoreSection;
- _scoreTrack = mainState->scoreTrack;
- startScoreSection();
+ if (_musicActive) {
+ bool musicMutedBeforeRestore = (_musicMute && _musicMuteDisabled);
+ bool musicMutedAfterRestore = (_musicMute && mainState->musicMuteDisabled);
+ bool isNewTrack = (_scoreTrack != mainState->scoreTrack);
+
+ _musicMuteDisabled = mainState->musicMuteDisabled;
+ _scoreTrack = mainState->scoreTrack;
+
+ if (_gameID == GID_REAH)
+ changeMusicTrack(mainState->musicTrack);
+ if (_gameID == GID_SCHIZM) {
+ // Only restart music if a new track is playing
+ if (isNewTrack)
+ _scoreSection = mainState->scoreSection;
+
+ if (!musicMutedBeforeRestore && musicMutedAfterRestore) {
+ _musicPlayer.reset();
+ _scoreSectionEndTime = 0;
+ } else if (!musicMutedAfterRestore && (isNewTrack || musicMutedBeforeRestore))
+ startScoreSection();
}
+ } else {
+ _musicPlayer.reset();
+ _scoreSectionEndTime = 0;
}
// Stop all sounds since the player instances are stored in the sound cache.
@@ -5472,14 +5512,14 @@ void Runtime::restoreSaveGameSnapshot() {
_activeSounds.clear();
- _pendingSoundParams3D = _saveGame->pendingSoundParams3D;
+ _pendingSoundParams3D = snapshot->pendingSoundParams3D;
- _triggeredOneShots = _saveGame->triggeredOneShots;
- _sayCycles = _saveGame->sayCycles;
+ _triggeredOneShots = snapshot->triggeredOneShots;
+ _sayCycles = snapshot->sayCycles;
- _listenerX = _saveGame->listenerX;
- _listenerY = _saveGame->listenerY;
- _listenerAngle = _saveGame->listenerAngle;
+ _listenerX = snapshot->listenerX;
+ _listenerY = snapshot->listenerY;
+ _listenerAngle = snapshot->listenerAngle;
_randomAmbientSounds = mainState->randomAmbientSounds;
@@ -5559,7 +5599,7 @@ Common::SharedPtr<SaveGameSnapshot> Runtime::generateNewGameSnapshot() const {
}
void Runtime::saveGame(Common::WriteStream *stream) const {
- _saveGame->write(stream);
+ _mostRecentValidSaveState->write(stream);
}
LoadGameOutcome Runtime::loadGame(Common::ReadStream *stream) {
@@ -5571,7 +5611,7 @@ LoadGameOutcome Runtime::loadGame(Common::ReadStream *stream) {
if (outcome != kLoadGameOutcomeSucceeded)
return outcome;
- _saveGame = snapshot;
+ _mostRecentValidSaveState = snapshot;
restoreSaveGameSnapshot();
return outcome;
@@ -6718,7 +6758,8 @@ void Runtime::scriptOpSave0(ScriptArg_t arg) {
void Runtime::scriptOpExit(ScriptArg_t arg) {
_isInGame = false;
- _saveGame.reset();
+ _mostRecentlyRecordedSaveState.reset();
+ _mostRecentValidSaveState.reset();
if (_gameID == GID_REAH) {
_havePendingScreenChange = true;
@@ -6908,6 +6949,10 @@ void Runtime::scriptOpBackStart(ScriptArg_t arg) {
_scriptEnv.exitToMenu = true;
}
+void Runtime::scriptOpBlockSaves(ScriptArg_t arg) {
+ warning("SAVES SHOULD BE BLOCKED ON THIS SCREEN");
+}
+
void Runtime::scriptOpAnimName(ScriptArg_t arg) {
if (_roomNumber >= _roomDefs.size())
error("Can't resolve animation for room, room number was invalid");
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index f2782c078bf..3a45cf18b71 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -582,7 +582,7 @@ public:
void onKeyDown(Common::KeyCode keyCode);
void onKeymappedEvent(KeymappedEvent evt);
- bool canSave() const;
+ bool canSave(bool onCurrentScreen) const;
bool canLoad() const;
void recordSaveGameSnapshot();
@@ -1019,6 +1019,7 @@ private:
void scriptOpSaveAs(ScriptArg_t arg);
void scriptOpSave0(ScriptArg_t arg);
void scriptOpExit(ScriptArg_t arg);
+ void scriptOpBlockSaves(ScriptArg_t arg);
void scriptOpAnimName(ScriptArg_t arg);
void scriptOpValueName(ScriptArg_t arg);
@@ -1308,7 +1309,8 @@ private:
Common::Pair<Common::String, Common::SharedPtr<SoundCache> > _soundCache[kSoundCacheSize];
uint _soundCacheIndex;
- Common::SharedPtr<SaveGameSnapshot> _saveGame;
+ Common::SharedPtr<SaveGameSnapshot> _mostRecentValidSaveState; // Always valid
+ Common::SharedPtr<SaveGameSnapshot> _mostRecentlyRecordedSaveState; // Might be invalid, becomes valid if the player returns to idle
Common::SharedPtr<SaveGameSwappableState> _altState;
bool _isInGame;
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index 420dca34160..8838b74613e 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -683,7 +683,7 @@ static ScriptNamedInstruction g_reahNamedInstructions[] = {
{"saveAs", ProtoOp::kProtoOpScript, ScriptOps::kSaveAs},
{"save0", ProtoOp::kProtoOpNoop, ScriptOps::kSave0},
{"exit", ProtoOp::kProtoOpScript, ScriptOps::kExit},
- {"allowedSave", ProtoOp::kProtoOpNoop, ScriptOps::kInvalid},
+ {"allowedSave", ProtoOp::kProtoOpScript, ScriptOps::kBlockSaves},
};
@@ -811,7 +811,7 @@ static ScriptNamedInstruction g_schizmNamedInstructions[] = {
{"ret", ProtoOp::kProtoOpScript, ScriptOps::kReturn},
{"backStart", ProtoOp::kProtoOpScript, ScriptOps::kBackStart},
- {"allowedSave", ProtoOp::kProtoOpNoop, ScriptOps::kInvalid},
+ {"allowedSave", ProtoOp::kProtoOpScript, ScriptOps::kBlockSaves},
};
bool ScriptCompiler::compileInstructionToken(ProtoScript &script, const Common::String &token) {
diff --git a/engines/vcruise/script.h b/engines/vcruise/script.h
index 55710b64053..04cc87bcc75 100644
--- a/engines/vcruise/script.h
+++ b/engines/vcruise/script.h
@@ -146,6 +146,7 @@ enum ScriptOp {
kSaveAs,
kSave0,
kExit,
+ kBlockSaves,
kAnimName,
kValueName,
diff --git a/engines/vcruise/vcruise.cpp b/engines/vcruise/vcruise.cpp
index d80e1e0fe67..106a47c788b 100644
--- a/engines/vcruise/vcruise.cpp
+++ b/engines/vcruise/vcruise.cpp
@@ -308,11 +308,11 @@ Common::Error VCruiseEngine::loadGameStream(Common::SeekableReadStream *stream)
}
bool VCruiseEngine::canSaveAutosaveCurrently() {
- return _runtime->canSave();
+ return _runtime->canSave(false);
}
bool VCruiseEngine::canSaveGameStateCurrently() {
- return _runtime->canSave();
+ return _runtime->canSave(false);
}
bool VCruiseEngine::canLoadGameStateCurrently() {
Commit: 98dfdec5913ed41efa8a14d6e71a8679a83b8f13
https://github.com/scummvm/scummvm/commit/98dfdec5913ed41efa8a14d6e71a8679a83b8f13
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:58-04:00
Commit Message:
VCRUISE: Link vars to the load room number instead of file room number when the room script is duplicated.
Changed paths:
engines/vcruise/script.cpp
diff --git a/engines/vcruise/script.cpp b/engines/vcruise/script.cpp
index 8838b74613e..3d19e9b22db 100644
--- a/engines/vcruise/script.cpp
+++ b/engines/vcruise/script.cpp
@@ -445,8 +445,8 @@ void ScriptCompiler::compileRoomScriptSet(RoomScriptSet *rss) {
if (isNegative)
signedNumber = -signedNumber;
- // TODO: Figure out if the vars should be scoped in _fileRoom or _loadAsRoom in the case of duplicate rooms
- _gs->define(key, _fileRoom, signedNumber);
+ // Based on testing, this should be _loadAsRoom
+ _gs->define(key, _loadAsRoom, signedNumber);
} else if (_dialect == kScriptDialectSchizm && token == "~Fun") {
Common::String fnName;
if (!_parser.parseToken(fnName, state))
Commit: 8487e55be8d2dd47be0d10d6763902643433f209
https://github.com/scummvm/scummvm/commit/8487e55be8d2dd47be0d10d6763902643433f209
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:58-04:00
Commit Message:
VCRUISE: Apply backStart immediately instead of attempting to change screen
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 82cb58b88d4..b93ec681be2 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -2341,6 +2341,11 @@ void Runtime::terminateScript() {
drawCompass();
+ if (exitToMenu && _gameState == kGameStateIdle) {
+ quitToMenu();
+ return;
+ }
+
if (_havePendingScreenChange) {
// TODO: Check Reah to see if this condition is okay there too.
// This is needed to avoid resetting static animations twice, which causes problems with,
@@ -2357,9 +2362,6 @@ void Runtime::terminateScript() {
changeToScreen(_roomNumber, _screenNumber);
}
-
- if (exitToMenu && _gameState == kGameStateIdle)
- quitToMenu();
}
void Runtime::quitToMenu() {
Commit: cc89113481cfd2dc38b1b479b9837dde5d099f46
https://github.com/scummvm/scummvm/commit/cc89113481cfd2dc38b1b479b9837dde5d099f46
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:58-04:00
Commit Message:
VCRUISE: Add pause menu text for Schizm
Changed paths:
engines/vcruise/menu.cpp
diff --git a/engines/vcruise/menu.cpp b/engines/vcruise/menu.cpp
index 81b373134c2..2a4ff60d76e 100644
--- a/engines/vcruise/menu.cpp
+++ b/engines/vcruise/menu.cpp
@@ -1016,6 +1016,14 @@ void ReahPauseMenuPage::addPageContents() {
if (pauseGraphic)
menuSurf->blitFrom(*pauseGraphic, Common::Point(164, 186));
+ if (_isSchizm) {
+ Common::Rect labelRect1 = Common::Rect(164, 192, 476, 216);
+ Common::Rect labelRect2 = Common::Rect(164, 216, 476, 240);
+
+ _menuInterface->drawLabel(menuSurf, "szData020_01", labelRect1);
+ _menuInterface->drawLabel(menuSurf, "szData020_02", labelRect2);
+ }
+
_menuInterface->commitRect(Common::Rect(0, 44, 640, 392));
}
Commit: b60ad00044a3c8984d3f97d9d77460699421ad99
https://github.com/scummvm/scummvm/commit/b60ad00044a3c8984d3f97d9d77460699421ad99
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:58-04:00
Commit Message:
VCRUISE: Fix keybound menu pages in Schizm
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b93ec681be2..b66e4b7e3f7 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -1575,10 +1575,7 @@ bool Runtime::runIdle() {
if (!_lmbDown) {
switch (osEvent.keymappedEvent) {
case kKeymappedEventHelp:
- if (_gameID == GID_REAH)
- changeToMenuPage(createMenuHelp(_gameID == GID_SCHIZM));
- else
- error("Don't have a help menu for this game");
+ changeToMenuPage(createMenuHelp(_gameID == GID_SCHIZM));
return true;
case kKeymappedEventLoadGame:
if (g_engine->loadGameDialog())
@@ -1589,18 +1586,11 @@ bool Runtime::runIdle() {
return true;
break;
case kKeymappedEventPause:
- if (_gameID == GID_REAH)
- changeToMenuPage(createMenuPause(_gameID == GID_SCHIZM));
- else
- error("Don't have a pause menu for this game");
+ changeToMenuPage(createMenuPause(_gameID == GID_SCHIZM));
return true;
case kKeymappedEventQuit:
- if (_gameID == GID_REAH)
- changeToMenuPage(createMenuQuit(_gameID == GID_SCHIZM));
- else
- error("Don't have a quit menu for this game");
+ changeToMenuPage(createMenuQuit(_gameID == GID_SCHIZM));
return true;
-
default:
break;
}
Commit: c64258aecdaad29f0f5b4831cc3f5ab553494061
https://github.com/scummvm/scummvm/commit/c64258aecdaad29f0f5b4831cc3f5ab553494061
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:59-04:00
Commit Message:
VCRUISE: Switch to arrow cursor when going from in-game to a menu page (in case the user pauses while moused over an interaction)
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b66e4b7e3f7..5b9f75329a3 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -5000,6 +5000,8 @@ void Runtime::changeToMenuPage(MenuPage *menuPage) {
_gameState = kGameStateMenu;
+ changeToCursor(_cursors[kCursorArrow]);
+
menuPage->init(_menuInterface.get());
menuPage->start();
}
Commit: f9c8ee41eb560879b0b61b56253e8662c6b0b9b7
https://github.com/scummvm/scummvm/commit/f9c8ee41eb560879b0b61b56253e8662c6b0b9b7
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:59-04:00
Commit Message:
VCRUISE: Fix mouse not resetting when clicking mechanical computer pegs
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 5b9f75329a3..8b345e25b08 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -2351,6 +2351,13 @@ void Runtime::terminateScript() {
}
changeToScreen(_roomNumber, _screenNumber);
+
+ // Run any return-to-idle actions so idle mouse moves are discharged again, even if the screen didn't change.
+ // This is necessary to ensure that dischargeIdleMouseMove is called after animS even if it goes back to the same
+ // screen, which is necessary to make sure that clicking the pegs on top of the mechanical computer in Schizm
+ // resets the mouse cursor to interactive again.
+ if (_gameID == GID_SCHIZM)
+ _havePendingReturnToIdleState = true;
}
}
Commit: c5a374f37ff8f249900ae72af86bd9ef46d4435b
https://github.com/scummvm/scummvm/commit/c5a374f37ff8f249900ae72af86bd9ef46d4435b
Author: elasota (ejlasota at gmail.com)
Date: 2023-05-27T02:13:59-04:00
Commit Message:
VCRUISE: Don't allow saving while not in-game. This also fixes a bug where exiting the game to the main menu would cause clicking Return in any submenu to resume the game.
Changed paths:
engines/vcruise/runtime.cpp
diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 8b345e25b08..ad56d7b6f7a 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -5307,7 +5307,7 @@ bool Runtime::canSave(bool onCurrentScreen) const {
if (onCurrentScreen) {
return (_mostRecentlyRecordedSaveState.get() != nullptr && _haveHorizPanAnimations);
} else {
- return _mostRecentValidSaveState.get() != nullptr;
+ return _mostRecentValidSaveState.get() != nullptr && _isInGame;
}
}
More information about the Scummvm-git-logs
mailing list