aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst.cpp
diff options
context:
space:
mode:
authordafioram2018-04-25 12:46:50 -0400
committerBastien Bouclet2018-04-25 18:46:50 +0200
commit519e02da47ff972776350fa77ad1e6876a714106 (patch)
treed3c8233cc2f667d607fca0be2c36b9d8c07938ad /engines/mohawk/myst.cpp
parent09dbb50ee4a48bd3b6ab075c09d92f0a8ac2e77a (diff)
downloadscummvm-rg350-519e02da47ff972776350fa77ad1e6876a714106.tar.gz
scummvm-rg350-519e02da47ff972776350fa77ad1e6876a714106.tar.bz2
scummvm-rg350-519e02da47ff972776350fa77ad1e6876a714106.zip
MOHAWK: MYST: Turn held page state into an enum
Previously, the held page stage was an unsigned int 16 with values 0-13. The enum will make its state more clear.
Diffstat (limited to 'engines/mohawk/myst.cpp')
-rw-r--r--engines/mohawk/myst.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 11279ec376..730c979d0e 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -1196,8 +1196,8 @@ bool MohawkEngine_Myst::canSaveGameStateCurrently() {
}
void MohawkEngine_Myst::dropPage() {
- uint16 page = _gameState->_globals.heldPage;
- bool whitePage = page == 13;
+ HeldPage page = _gameState->_globals.heldPage;
+ bool whitePage = page == kWhitePage;
bool bluePage = page - 1 < 6;
bool redPage = page - 7 < 6;
@@ -1205,24 +1205,24 @@ void MohawkEngine_Myst::dropPage() {
_sound->playEffect(800);
// Drop page
- _gameState->_globals.heldPage = 0;
+ _gameState->_globals.heldPage = kNoPage;
// Redraw page area
if (whitePage && _gameState->_globals.currentAge == 2) {
_scriptParser->toggleVar(41);
redrawArea(41);
} else if (bluePage) {
- if (page == 6) {
+ if (page == kBlueFirePlacePage) {
if (_gameState->_globals.currentAge == 2)
redrawArea(24);
} else {
redrawArea(103);
}
} else if (redPage) {
- if (page == 12) {
+ if (page == kRedFirePlacePage) {
if (_gameState->_globals.currentAge == 2)
redrawArea(25);
- } else if (page == 10) {
+ } else if (page == kRedStoneshipPage) {
if (_gameState->_globals.currentAge == 1)
redrawArea(35);
} else {