[Scummvm-git-logs] scummvm master -> 7bf184ba32b6919292dd9582291b026a3b81bd62
bluegr
noreply at scummvm.org
Tue Aug 23 18:40:34 UTC 2022
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:
7bf184ba32 SCUMM: Convert if/else if in o4_saveLoadGame to switch; fix typos
Commit: 7bf184ba32b6919292dd9582291b026a3b81bd62
https://github.com/scummvm/scummvm/commit/7bf184ba32b6919292dd9582291b026a3b81bd62
Author: eientei (einstein95 at users.noreply.github.com)
Date: 2022-08-23T21:40:29+03:00
Commit Message:
SCUMM: Convert if/else if in o4_saveLoadGame to switch; fix typos
Changed paths:
engines/scumm/input.cpp
engines/scumm/script_v4.cpp
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 8f1caa9f4af..9fb7c2ead59 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -797,10 +797,10 @@ void ScummEngine_v6::processKeyboard(Common::KeyState lastKeyHit) {
}
void ScummEngine_v2::processKeyboard(Common::KeyState lastKeyHit) {
- // RETURN is used to skip cutscenes in the Commodote 64 version of Zak McKracken
+ // RETURN is used to skip cutscenes in the Commodore 64 version of Zak McKracken
if (_game.id == GID_ZAK &&_game.platform == Common::kPlatformC64 && lastKeyHit.keycode == Common::KEYCODE_RETURN && lastKeyHit.hasFlags(0)) {
lastKeyHit = Common::KeyState(Common::KEYCODE_ESCAPE);
- // F7 is used to skip cutscenes in the Commodote 64 version of Maniac Mansion
+ // F7 is used to skip cutscenes in the Commodore 64 version of Maniac Mansion
} else if (_game.id == GID_MANIAC &&_game.platform == Common::kPlatformC64) {
// Demo always F7 to be pressed to restart
if (_game.features & GF_DEMO) {
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 7af59703df8..4d3896d9ba5 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -374,10 +374,16 @@ void ScummEngine_v4::o4_saveLoadGame() {
// 1 Load
// 2 Save
slot = 1;
- if (a == 1)
+ switch (a) {
+ case 1:
_opcode = 0x40;
- else if ((a == 2) || (_game.platform == Common::kPlatformNES))
+ break;
+ case 2:
_opcode = 0x80;
+ break;
+ default:
+ error("o4_saveLoadGame: unknown param %d", a);
+ }
} else {
slot = a & 0x1F;
// Slot numbers in older games start with 0, in newer games with 1
More information about the Scummvm-git-logs
mailing list