diff options
author | Strangerke | 2012-03-09 20:09:19 +0100 |
---|---|---|
committer | Strangerke | 2012-04-06 08:23:01 +0200 |
commit | 61afdadcb6493d0e349104ccb467faa4905d7eb7 (patch) | |
tree | e0c25ad69a0c194be25876be7aa36fca13064bf2 | |
parent | 24866fe395ebee1e127e749ee9209f45b98e729d (diff) | |
download | scummvm-rg350-61afdadcb6493d0e349104ccb467faa4905d7eb7.tar.gz scummvm-rg350-61afdadcb6493d0e349104ccb467faa4905d7eb7.tar.bz2 scummvm-rg350-61afdadcb6493d0e349104ccb467faa4905d7eb7.zip |
MORTEVIELLE: Some more renaming, fix a couple of GCC warnings
-rw-r--r-- | engines/mortevielle/actions.cpp | 50 | ||||
-rw-r--r-- | engines/mortevielle/mor2.cpp | 16 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 10 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 4 | ||||
-rw-r--r-- | engines/mortevielle/mouse.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/prog.cpp | 8 | ||||
-rw-r--r-- | engines/mortevielle/var_mor.cpp | 6 | ||||
-rw-r--r-- | engines/mortevielle/var_mor.h | 4 |
8 files changed, 46 insertions, 54 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index cd08177bcc..cabd0522dd 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -54,7 +54,7 @@ void fctMove() { repon(2, g_s._currPlace); } if ((g_s._currPlace == LANDING) && (g_msg[4] == g_vm->_menu._moveMenu[6])) { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_GO_TO)); tfleche(); if (g_vm->_keyPressedEsc) @@ -189,7 +189,7 @@ void fctTake() { if (g_crep != 139) { if (g_ipers > 0) g_s._faithScore += 3; - if (g_obpart) { + if (g_vm->_obpart) { if (g_s._currPlace == PURPLE_ROOM) g_s._purpleRoomObjectId = 0; if (g_s._currPlace == ATTIC) { @@ -207,7 +207,7 @@ void fctTake() { if (g_s._currPlace == WELL) g_s._wellObjectId = 0; unsetSearchMenu(); - g_obpart = false; + g_vm->_obpart = false; affrep(); } else { g_tabdon[acha + ((g_mchai - 1) * 10) + g_cs - 1] = 0; @@ -221,7 +221,7 @@ void fctTake() { } return; } - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_TAKE)); tfleche(); if ((g_anyone) || (g_vm->_keyPressedEsc)) @@ -322,7 +322,7 @@ void fctInventoryTake() { * @remarks Originally called 'tsoulever' */ void fctLift() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_LIFT)); tfleche(); if ((g_anyone) || (g_vm->_keyPressedEsc)) @@ -359,7 +359,7 @@ void fctRead() { if (g_caff > 99) st4(g_caff); else { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_READ)); tfleche(); if (!(g_anyone) && !(g_vm->_keyPressedEsc)) { @@ -392,7 +392,7 @@ void fctLook() { g_crep = 103; return; } - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_LOOK)); tfleche(); if ((g_anyone) || (g_vm->_keyPressedEsc)) @@ -482,7 +482,7 @@ void fctSearch() { return; } - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_SEARCH)); tfleche(); @@ -513,7 +513,7 @@ void fctSearch() { if (g_mchai != 0) { g_cs = 0; g_is = 0; - g_heroSearching = true; + g_vm->_heroSearching = true; setSearchMenu(); tsuiv(); } else @@ -579,13 +579,13 @@ void fctSelfSearch() { * @remarks Originally called 'touvrir' */ void fctOpen() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_OPEN)); if (g_caff == 26) { if (g_ment != 0) { g_msg[4] = OPCODE_ENTER; - g_syn = true; + g_vm->_syn = true; } else g_crep = 997; return; @@ -646,7 +646,7 @@ void fctPlace() { return; } - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_PUT)); tfleche(); @@ -779,7 +779,7 @@ void fctTurn() { g_crep = 149; return; } - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_TURN)); tfleche(); if ((g_anyone) || (g_vm->_keyPressedEsc)) @@ -815,7 +815,7 @@ void fctTurn() { * @remarks Originally called 'tcacher' */ void fctSelfHide() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_HIDE_SELF)); tfleche(); if (!(g_anyone) && !(g_vm->_keyPressedEsc)) { @@ -837,7 +837,7 @@ void fctAttach() { if (g_s._selectedObjectId == 0) g_crep = 186; else { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_TIE)); tfleche(); if (!(g_anyone) && !(g_vm->_keyPressedEsc)) { @@ -861,7 +861,7 @@ void fctAttach() { * @remarks Originally called 'tfermer' */ void fctClose() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_CLOSE)); if (g_caff < 26) { @@ -903,7 +903,7 @@ void fctClose() { void fctKnock() { warning("Knock - _currPlace %d", g_s._currPlace); - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_HIT)); if (g_s._currPlace == LANDING) { @@ -951,7 +951,7 @@ void fctKnock() { * @remarks Originally called 'tposer' */ void fctSelfPut() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_POSE)); if (g_s._selectedObjectId == 0) g_crep = 186; @@ -1151,7 +1151,7 @@ void fctEnter() { g_s._currPlace = LANDING; g_msg[3] = MENU_DISCUSS; g_msg[4] = g_vm->_menu._discussMenu[g_x]; - g_syn = true; + g_vm->_syn = true; if (g_ment == 9) { g_vm->_col = true; g_caff = 70; @@ -1230,7 +1230,7 @@ void fctSleep() { * @remarks Originally called 'tdefoncer' */ void fctForce() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_SMASH)); if (g_caff < 25) tfleche(); @@ -1286,8 +1286,6 @@ void fctLeave() { * @remarks Originally called 'tattendre' */ void fctWait() { - int quel; - g_mpers = 0; clsf3(); @@ -1296,7 +1294,7 @@ void fctWait() { ++g_jh; tinke(); if (!g_vm->_blo) - quel = t11(g_s._currPlace); + t11(g_s._currPlace); if ((g_ipers != 0) && (g_mpers == 0)) { g_crep = 998; if ((g_s._currPlace == ATTIC) || (g_s._currPlace == CELLAR)) @@ -1321,7 +1319,7 @@ void fctWait() { * @remarks Originally called 'tsonder' */ void fctSound() { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_PROBE2)); if (g_caff < 27) { tfleche(); @@ -1536,7 +1534,7 @@ void fctDiscuss() { void fctSmell() { g_crep = 119; if (g_caff < 26) { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_SMELL)); tfleche(); if (!(g_anyone) && !(g_vm->_keyPressedEsc)) @@ -1554,7 +1552,7 @@ void fctSmell() { void fctScratch() { g_crep = 155; if (g_caff < 27) { - if (!g_syn) + if (!g_vm->_syn) ecr3(g_vm->getEngineString(S_SCRATCH)); tfleche(); } diff --git a/engines/mortevielle/mor2.cpp b/engines/mortevielle/mor2.cpp index 4c3342b900..bf62fe3857 100644 --- a/engines/mortevielle/mor2.cpp +++ b/engines/mortevielle/mor2.cpp @@ -301,10 +301,8 @@ void tperd() { g_iouv = 0; g_mchai = 0; unsetSearchMenu(); - if (!g_vm->_blo) { - int cx; - cx = t11(21); - } + if (!g_vm->_blo) + t11(21); g_vm->_loseGame = true; clsf1(); @@ -313,7 +311,7 @@ void tperd() { clearScreenType2(); clsf3(); g_vm->_col = false; - g_syn = false; + g_vm->_syn = false; g_okdes = false; } @@ -425,8 +423,8 @@ void sparl(float adr, float rep) { * @remarks Originally called 'finfouill' */ void endSearch() { - g_heroSearching = false; - g_obpart = false; + g_vm->_heroSearching = false; + g_vm->_obpart = false; g_cs = 0; g_is = 0; unsetSearchMenu(); @@ -591,7 +589,7 @@ L1: g_crep = g_caff; g_msg[3] = MENU_DISCUSS; g_msg[4] = g_vm->_menu._discussMenu[cx]; - g_syn = true; + g_vm->_syn = true; g_vm->_col = true; } else { if (getRandomNumber(1, 3) == 2) { @@ -763,7 +761,7 @@ void treg(int ob) { g_msg[3] = 0; g_crep = 998; } else { - g_obpart = true; + g_vm->_obpart = true; g_crep = g_caff + 400; setSearchMenu(); } diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 42c714e456..8677798477 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -144,7 +144,7 @@ Common::ErrorCode MortevielleEngine::initialise() { g_currGraphicalDevice = MODE_EGA; g_newGraphicalDevice = g_currGraphicalDevice; - g_zuul = false; + _zuul = false; charpal(); charge_cfiph(); charge_cfiec(); @@ -613,13 +613,13 @@ void MortevielleEngine::handleAction() { if ((g_msg[3] == MENU_ACTION) || (g_msg[3] == MENU_SELF)) g_mnumo = g_msg[4]; if (!g_anyone) { - if ((g_heroSearching) || (g_obpart)) { + if ((g_vm->_heroSearching) || (_obpart)) { if (y_s < 12) return; if ((g_msg[4] == OPCODE_SOUND) || (g_msg[4] == OPCODE_LIFT)) { oo = true; - if ((g_msg[4] == OPCODE_LIFT) || (g_obpart)) { + if ((g_msg[4] == OPCODE_LIFT) || (_obpart)) { endSearch(); g_caff = g_s._currPlace; g_crep = 998; @@ -639,10 +639,10 @@ void MortevielleEngine::handleAction() { g_okdes = false; dessin(0); } - if ((!g_syn) || (_col)) + if ((!g_vm->_syn) || (_col)) repon(2, g_crep); } - } while (g_syn); + } while (g_vm->_syn); if (g_ctrm != 0) tctrm(); } diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index 30b1b982e9..b2a8ff6b9b 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -117,10 +117,14 @@ public: bool _soundOff; bool _largestClearScreen; bool _hiddenHero; + bool _heroSearching; bool _keyPressedEsc; bool _blo; bool _col; + bool _syn; + bool _zuul; + bool _obpart; ScreenSurface _screenSurface; diff --git a/engines/mortevielle/mouse.cpp b/engines/mortevielle/mouse.cpp index d6ffb116de..55edea5738 100644 --- a/engines/mortevielle/mouse.cpp +++ b/engines/mortevielle/mouse.cpp @@ -421,7 +421,7 @@ void moveMouse(bool &funct, char &key) { return; break; case '\26': - g_zuul = true; + g_vm->_zuul = true; return; break; case '\24': // ^T => mode tandy diff --git a/engines/mortevielle/prog.cpp b/engines/mortevielle/prog.cpp index a74def2eb4..eb6b979368 100644 --- a/engines/mortevielle/prog.cpp +++ b/engines/mortevielle/prog.cpp @@ -88,8 +88,8 @@ void MortevielleEngine::gameLoaded() { g_cs = 0; g_is = 0; g_ment = 0; - g_syn = true; - g_heroSearching = true; + g_vm->_syn = true; + g_vm->_heroSearching = true; g_mchai = 0; g_inei = 0; initouv(); @@ -101,7 +101,7 @@ void MortevielleEngine::gameLoaded() { g_okdes = false; _endGame = true; _loseGame = false; - g_heroSearching = false; + g_vm->_heroSearching = false; displayAloneText(); tinke(); @@ -134,7 +134,7 @@ void tmaj3() { void tsitu() { if (!g_vm->_col) clearScreenType2(); - g_syn = false; + g_vm->_syn = false; g_vm->_keyPressedEsc = false; if (!g_anyone) { if (g_brt) diff --git a/engines/mortevielle/var_mor.cpp b/engines/mortevielle/var_mor.cpp index d9aa291e3f..2903abfc43 100644 --- a/engines/mortevielle/var_mor.cpp +++ b/engines/mortevielle/var_mor.cpp @@ -78,11 +78,7 @@ const byte g_rang[16] = {15, 14, 11, 7, 13, 12, 10, 6, 9, 5, 3, 1, 2, 4, 8, 0}; /*------------------------------ VARIABLES ------------------------------*/ /*---------------------------------------------------------------------------*/ -bool g_syn, - g_heroSearching, - g_zuul, - g_obpart, - g_okdes, +bool g_okdes, g_arret, g_anyone, g_brt, diff --git a/engines/mortevielle/var_mor.h b/engines/mortevielle/var_mor.h index 610b302e45..0402cd6d48 100644 --- a/engines/mortevielle/var_mor.h +++ b/engines/mortevielle/var_mor.h @@ -224,10 +224,6 @@ enum GraphicModes { MODE_AMSTRAD1512 = 0, MODE_CGA = 1, MODE_EGA = 2, MODE_HERCU /*---------------------------------------------------------------------------*/ extern bool - g_syn, - g_heroSearching, - g_zuul, - g_obpart, g_okdes, g_anyone, g_brt, |