diff options
author | Le Philousophe | 2019-05-30 12:18:10 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-06-01 22:43:48 +0200 |
commit | d5a6c1c9cbf071c6b5a8f23334bdfb87808a4ab3 (patch) | |
tree | bc5df46021ce432a658e335a5c544e85286d58eb | |
parent | 5ed893bb6ab73384d647f3b20defa87e81a4c970 (diff) | |
download | scummvm-rg350-d5a6c1c9cbf071c6b5a8f23334bdfb87808a4ab3.tar.gz scummvm-rg350-d5a6c1c9cbf071c6b5a8f23334bdfb87808a4ab3.tar.bz2 scummvm-rg350-d5a6c1c9cbf071c6b5a8f23334bdfb87808a4ab3.zip |
CRYOMNI3D: Fix abort constants names
-rw-r--r-- | engines/cryomni3d/versailles/engine.cpp | 36 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/engine.h | 16 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/logic.cpp | 2 | ||||
-rw-r--r-- | engines/cryomni3d/versailles/menus.cpp | 10 |
4 files changed, 32 insertions, 32 deletions
diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index 2ab47c0a1b..d03bd958a4 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -191,33 +191,33 @@ Common::Error CryOmni3DEngine_Versailles::run() { _isPlaying = true; _toolbar.setInventoryEnabled(!_isVisiting); nextStep = 0; - _abortCommand = AbortNoAbort; + _abortCommand = kAbortNoAbort; gameStep(); // We shouldn't return from gameStep without an abort command - assert(_abortCommand != AbortNoAbort); + assert(_abortCommand != kAbortNoAbort); switch (_abortCommand) { default: error("Invalid abortCommand: %d", _abortCommand); // Shouldn't return return Common::kUnknownError; - case AbortFinished: - case AbortGameOver: + case kAbortFinished: + case kAbortGameOver: // Go back to menu exitLoop = true; break; - case AbortQuit: + case kAbortQuit: exitLoop = true; stopGame = true; break; - case AbortNewGame: + case kAbortNewGame: nextStep = 27; break; - case AbortLoadGame: + case kAbortLoadGame: nextStep = 28; break; - case AbortNextLevel: + case kAbortNextLevel: nextStep = 65; break; } @@ -564,7 +564,7 @@ void CryOmni3DEngine_Versailles::playTransitionEndLevel(int level) { fadeOutPalette(); if (g_engine->shouldQuit()) { - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; return; } @@ -578,13 +578,13 @@ void CryOmni3DEngine_Versailles::playTransitionEndLevel(int level) { clearKeys(); if (g_engine->shouldQuit()) { - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; return; } fadeOutPalette(); if (g_engine->shouldQuit()) { - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; return; } @@ -594,9 +594,9 @@ void CryOmni3DEngine_Versailles::playTransitionEndLevel(int level) { fillSurface(0); if (level == 7 || level == 8) { - _abortCommand = AbortFinished; + _abortCommand = kAbortFinished; } else { - _abortCommand = AbortNextLevel; + _abortCommand = kAbortNextLevel; } } @@ -862,7 +862,7 @@ void CryOmni3DEngine_Versailles::gameStep() { } } else if (actionId == 66666) { // Abort - assert(_abortCommand != AbortNoAbort); + assert(_abortCommand != kAbortNoAbort); return; } } else if (!actionId) { @@ -883,7 +883,7 @@ void CryOmni3DEngine_Versailles::doGameOver() { playInGameVideo("4gameove"); } fillSurface(0); - _abortCommand = AbortGameOver; + _abortCommand = kAbortGameOver; } void CryOmni3DEngine_Versailles::doPlaceChange() { @@ -1150,7 +1150,7 @@ int CryOmni3DEngine_Versailles::handleWarp() { exit = handleWarpMouse(&actionId, movingCursor); if (g_engine->shouldQuit()) { - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; exit = true; } if (exit) { @@ -1216,7 +1216,7 @@ bool CryOmni3DEngine_Versailles::handleWarpMouse(uint *actionId, bool mustRedraw = displayToolbar(original); // Don't redraw if we abort game - if (_abortCommand != AbortNoAbort) { + if (_abortCommand != kAbortNoAbort) { return true; } if (mustRedraw) { @@ -1230,7 +1230,7 @@ bool CryOmni3DEngine_Versailles::handleWarpMouse(uint *actionId, if (countDown()) { // Time has changed: need redraw // Don't redraw if we abort game - if (_abortCommand != AbortNoAbort) { + if (_abortCommand != kAbortNoAbort) { return true; } diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h index 841145174a..1d92d38fcd 100644 --- a/engines/cryomni3d/versailles/engine.h +++ b/engines/cryomni3d/versailles/engine.h @@ -100,13 +100,13 @@ namespace Versailles { class CryOmni3DEngine_Versailles; enum AbortCommand { - AbortNoAbort = 0, - AbortQuit = 1, - AbortLoadGame = 2, - AbortNewGame = 3, - AbortNextLevel = 5, - AbortFinished = 6, - AbortGameOver = 7 + kAbortNoAbort = 0, + kAbortQuit = 1, + kAbortLoadGame = 2, + kAbortNewGame = 3, + kAbortNextLevel = 5, + kAbortFinished = 6, + kAbortGameOver = 7 }; struct GameVariables { @@ -231,7 +231,7 @@ public: virtual bool hasPlaceDocumentation() override; virtual bool displayPlaceDocumentation() override; virtual uint displayOptions() override; - virtual bool shouldAbort() override { return g_engine->shouldQuit() || _abortCommand != AbortNoAbort; } + virtual bool shouldAbort() override { return g_engine->shouldQuit() || _abortCommand != kAbortNoAbort; } private: void setupFonts(); diff --git a/engines/cryomni3d/versailles/logic.cpp b/engines/cryomni3d/versailles/logic.cpp index 559f296cb1..5d0eea2172 100644 --- a/engines/cryomni3d/versailles/logic.cpp +++ b/engines/cryomni3d/versailles/logic.cpp @@ -4612,7 +4612,7 @@ bool CryOmni3DEngine_Versailles::doCountDown() { // Finished! _countingDown = false; playTransitionEndLevel(8); - _abortCommand = AbortGameOver; + _abortCommand = kAbortGameOver; } } } diff --git a/engines/cryomni3d/versailles/menus.cpp b/engines/cryomni3d/versailles/menus.cpp index 7e88d67a94..79d7aa209c 100644 --- a/engines/cryomni3d/versailles/menus.cpp +++ b/engines/cryomni3d/versailles/menus.cpp @@ -451,20 +451,20 @@ uint CryOmni3DEngine_Versailles::displayOptions() { g_system->showMouse(false); if (selectedMsg == 42) { - _abortCommand = AbortLoadGame; + _abortCommand = kAbortLoadGame; // For return value selectedMsg = 28; } else if (selectedMsg == 28) { - _abortCommand = AbortLoadGame; + _abortCommand = kAbortLoadGame; } else if (selectedMsg == 40) { - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; } else if (selectedMsg == 27) { - _abortCommand = AbortNewGame; + _abortCommand = kAbortNewGame; _isVisiting = false; } else if (g_engine->shouldQuit()) { // Fake a quit selectedMsg = 40; - _abortCommand = AbortQuit; + _abortCommand = kAbortQuit; } ConfMan.flushToDisk(); |