aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle
diff options
context:
space:
mode:
authorStrangerke2013-07-22 23:59:43 +0200
committerStrangerke2013-07-22 23:59:43 +0200
commita5b18d79051a2cf660ffcffbc30dcd5f7dc69795 (patch)
tree168aba4404c393e2c87ec4f60bf6b773fe5fe8bd /engines/mortevielle
parent4abc37de3fa7006e8dd934ead5e032ab5ed60b18 (diff)
downloadscummvm-rg350-a5b18d79051a2cf660ffcffbc30dcd5f7dc69795.tar.gz
scummvm-rg350-a5b18d79051a2cf660ffcffbc30dcd5f7dc69795.tar.bz2
scummvm-rg350-a5b18d79051a2cf660ffcffbc30dcd5f7dc69795.zip
MORTEVIELLE: Remove _msg array
Diffstat (limited to 'engines/mortevielle')
-rw-r--r--engines/mortevielle/actions.cpp16
-rw-r--r--engines/mortevielle/menu.cpp8
-rw-r--r--engines/mortevielle/mortevielle.h3
-rw-r--r--engines/mortevielle/outtext.cpp2
-rw-r--r--engines/mortevielle/utils.cpp96
5 files changed, 63 insertions, 62 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index b95e3eb902..b2adebfe83 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -41,13 +41,13 @@ namespace Mortevielle {
* @remarks Originally called 'taller'
*/
void MortevielleEngine::fctMove() {
- if ((_coreVar._currPlace == ROOM26) && (_msg[4] == _menu._moveMenu[6])) {
+ if ((_coreVar._currPlace == ROOM26) && (_currAction == _menu._moveMenu[6])) {
_coreVar._currPlace = LANDING;
_caff = _coreVar._currPlace;
drawPictureWithText();
handleDescriptionText(2, _coreVar._currPlace);
}
- if ((_coreVar._currPlace == LANDING) && (_msg[4] == _menu._moveMenu[6])) {
+ if ((_coreVar._currPlace == LANDING) && (_currAction == _menu._moveMenu[6])) {
if (!_syn)
displayTextInVerbBar(getEngineString(S_GO_TO));
displayStatusArrow();
@@ -86,7 +86,7 @@ void MortevielleEngine::fctMove() {
exitRoom();
int menuChoice = 1;
- while (_menu._moveMenu[menuChoice] != _msg[4])
+ while (_menu._moveMenu[menuChoice] != _currAction)
++menuChoice;
if (_coreVar._currPlace == MOUNTAIN) {
@@ -302,7 +302,7 @@ void MortevielleEngine::fctInventoryTake() {
int inventIndex = 0;
do {
++inventIndex;
- } while (_menu._inventoryMenu[inventIndex] != _msg[4]);
+ } while (_menu._inventoryMenu[inventIndex] != _currAction);
int cz = 0;
int cy = 0;
do {
@@ -582,7 +582,7 @@ void MortevielleEngine::fctOpen() {
if (_caff == ROOM26) {
if (_roomDoorId != OWN_ROOM) {
- _msg[4] = OPCODE_ENTER;
+ _currAction = OPCODE_ENTER;
_syn = true;
} else
_crep = 997;
@@ -1153,8 +1153,8 @@ void MortevielleEngine::fctEnter() {
int charIndex = convertBitIndexToCharacterIndex(z);
++_coreVar._faithScore;
_coreVar._currPlace = LANDING;
- _msg[3] = MENU_DISCUSS;
- _msg[4] = _menu._discussMenu[charIndex];
+ _currMenu = MENU_DISCUSS;
+ _currAction = _menu._discussMenu[charIndex];
_syn = true;
if (_roomDoorId == ROOM9) {
_col = true;
@@ -1354,7 +1354,7 @@ void MortevielleEngine::fctDiscuss() {
cx = 0;
do {
++cx;
- } while (_menu._discussMenu[cx] != _msg[4]);
+ } while (_menu._discussMenu[cx] != _currAction);
_caff = 69 + cx;
drawPictureWithText();
handleDescriptionText(2, _caff);
diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp
index a28965523a..a1f628992d 100644
--- a/engines/mortevielle/menu.cpp
+++ b/engines/mortevielle/menu.cpp
@@ -482,8 +482,8 @@ void Menu::updateMenu() {
// A menu was clicked on
_menuSelected = (_multiTitle) && (_msg4 != OPCODE_NONE);
menuUp(_msg3);
- _vm->_msg[4] = _msg4;
- _vm->_msg[3] = _msg3;
+ _vm->_currAction = _msg4;
+ _vm->_currMenu = _msg3;
_msg3 = OPCODE_NONE;
_msg4 = OPCODE_NONE;
@@ -540,8 +540,8 @@ void Menu::initMenu(MortevielleEngine *vm) {
}
_msg3 = OPCODE_NONE;
_msg4 = OPCODE_NONE;
- _vm->_msg[3] = OPCODE_NONE;
- _vm->_msg[4] = OPCODE_NONE;
+ _vm->_currMenu = OPCODE_NONE;
+ _vm->_currAction = OPCODE_NONE;
_vm->setMouseClick(false);
}
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index 5c4389483c..f12d55baea 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -455,7 +455,8 @@ private:
public:
Common::Point _prevPos;
- int _msg[5];
+ int _currMenu;
+ int _currAction;
int _fxxBuffer[108];
byte _tabdon[4001];
bool _soundOff;
diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp
index c998e68e3f..9673917741 100644
--- a/engines/mortevielle/outtext.cpp
+++ b/engines/mortevielle/outtext.cpp
@@ -293,7 +293,7 @@ void TextHandler::taffich() {
loadAniFile(filename, lgt, handle);
}
_vm->_mouse.showMouse();
- if ((a < 27) && ((_vm->_maff < 27) || (_vm->_coreVar._currPlace == LANDING)) && (_vm->_msg[4] != OPCODE_ENTER)) {
+ if ((a < 27) && ((_vm->_maff < 27) || (_vm->_coreVar._currPlace == LANDING)) && (_vm->_currAction != OPCODE_ENTER)) {
if ((a == 13) || (a == 14))
_vm->displayAloneText();
else if (!_vm->_blo)
diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp
index 4111a7ce55..63cd7b3661 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -284,18 +284,18 @@ void MortevielleEngine::handleAction() {
changeGraphicalDevice((uint)(ord(inkey) - 1) >> 1);
return;
}
- if (_menu._menuSelected && (_msg[3] == MENU_SAVE)) {
- Common::String saveName = Common::String::format("Savegame #%d", _msg[4] & 15);
- _savegameManager.saveGame(_msg[4] & 15, saveName);
+ if (_menu._menuSelected && (_currMenu == MENU_SAVE)) {
+ Common::String saveName = Common::String::format("Savegame #%d", _currAction & 15);
+ _savegameManager.saveGame(_currAction & 15, saveName);
}
- if (_menu._menuSelected && (_msg[3] == MENU_LOAD))
- _savegameManager.loadGame((_msg[4] & 15) - 1);
+ if (_menu._menuSelected && (_currMenu == MENU_LOAD))
+ _savegameManager.loadGame((_currAction & 15) - 1);
if (inkey == '\103') { /* F9 */
temps = _dialogManager.show(_hintPctMessage, 1);
return;
} else if (inkey == '\77') {
- if ((_menuOpcode != OPCODE_NONE) && ((_msg[3] == MENU_ACTION) || (_msg[3] == MENU_SELF))) {
- _msg[4] = _menuOpcode;
+ if ((_menuOpcode != OPCODE_NONE) && ((_currMenu == MENU_ACTION) || (_currMenu == MENU_SELF))) {
+ _currAction = _menuOpcode;
displayTextInVerbBar(getEngineString(S_IDEM));
} else
return;
@@ -316,17 +316,17 @@ void MortevielleEngine::handleAction() {
if (_num == 9999)
_num = 0;
} else {
- _menuOpcode = _msg[3];
- if ((_msg[3] == MENU_ACTION) || (_msg[3] == MENU_SELF))
- _menuOpcode = _msg[4];
+ _menuOpcode = _currMenu;
+ if ((_currMenu == MENU_ACTION) || (_currMenu == MENU_SELF))
+ _menuOpcode = _currAction;
if (!_anyone) {
if ((_heroSearching) || (_obpart)) {
if (_mouse._pos.y < 12)
return;
- if ((_msg[4] == OPCODE_SOUND) || (_msg[4] == OPCODE_LIFT)) {
+ if ((_currAction == OPCODE_SOUND) || (_currAction == OPCODE_LIFT)) {
oo = true;
- if ((_msg[4] == OPCODE_LIFT) || (_obpart)) {
+ if ((_currAction == OPCODE_LIFT) || (_obpart)) {
endSearch();
_caff = _coreVar._currPlace;
_crep = 998;
@@ -1552,71 +1552,71 @@ void MortevielleEngine::handleOpcode() {
_keyPressedEsc = false;
if (!_anyone) {
if (_uptodatePresence) {
- if ((_msg[3] == MENU_MOVE) || (_msg[4] == OPCODE_LEAVE) || (_msg[4] == OPCODE_SLEEP) || (_msg[4] == OPCODE_EAT)) {
+ if ((_currMenu == MENU_MOVE) || (_currAction == OPCODE_LEAVE) || (_currAction == OPCODE_SLEEP) || (_currAction == OPCODE_EAT)) {
_controlMenu = 4;
mennor();
return;
}
}
- if (_msg[3] == MENU_MOVE)
+ if (_currMenu == MENU_MOVE)
fctMove();
- if (_msg[3] == MENU_DISCUSS)
+ if (_currMenu == MENU_DISCUSS)
fctDiscuss();
- if (_msg[3] == MENU_INVENTORY)
+ if (_currMenu == MENU_INVENTORY)
fctInventoryTake();
- if (_msg[4] == OPCODE_ATTACH)
+ if (_currAction == OPCODE_ATTACH)
fctAttach();
- if (_msg[4] == OPCODE_WAIT)
+ if (_currAction == OPCODE_WAIT)
fctWait();
- if (_msg[4] == OPCODE_FORCE)
+ if (_currAction == OPCODE_FORCE)
fctForce();
- if (_msg[4] == OPCODE_SLEEP)
+ if (_currAction == OPCODE_SLEEP)
fctSleep();
- if (_msg[4] == OPCODE_LISTEN)
+ if (_currAction == OPCODE_LISTEN)
fctListen();
- if (_msg[4] == OPCODE_ENTER)
+ if (_currAction == OPCODE_ENTER)
fctEnter();
- if (_msg[4] == OPCODE_CLOSE)
+ if (_currAction == OPCODE_CLOSE)
fctClose();
- if (_msg[4] == OPCODE_SEARCH)
+ if (_currAction == OPCODE_SEARCH)
fctSearch();
- if (_msg[4] == OPCODE_KNOCK)
+ if (_currAction == OPCODE_KNOCK)
fctKnock();
- if (_msg[4] == OPCODE_SCRATCH)
+ if (_currAction == OPCODE_SCRATCH)
fctScratch();
- if (_msg[4] == OPCODE_READ)
+ if (_currAction == OPCODE_READ)
fctRead();
- if (_msg[4] == OPCODE_EAT)
+ if (_currAction == OPCODE_EAT)
fctEat();
- if (_msg[4] == OPCODE_PLACE)
+ if (_currAction == OPCODE_PLACE)
fctPlace();
- if (_msg[4] == OPCODE_OPEN)
+ if (_currAction == OPCODE_OPEN)
fctOpen();
- if (_msg[4] == OPCODE_TAKE)
+ if (_currAction == OPCODE_TAKE)
fctTake();
- if (_msg[4] == OPCODE_LOOK)
+ if (_currAction == OPCODE_LOOK)
fctLook();
- if (_msg[4] == OPCODE_SMELL)
+ if (_currAction == OPCODE_SMELL)
fctSmell();
- if (_msg[4] == OPCODE_SOUND)
+ if (_currAction == OPCODE_SOUND)
fctSound();
- if (_msg[4] == OPCODE_LEAVE)
+ if (_currAction == OPCODE_LEAVE)
fctLeave();
- if (_msg[4] == OPCODE_LIFT)
+ if (_currAction == OPCODE_LIFT)
fctLift();
- if (_msg[4] == OPCODE_TURN)
+ if (_currAction == OPCODE_TURN)
fctTurn();
- if (_msg[4] == OPCODE_SSEARCH)
+ if (_currAction == OPCODE_SSEARCH)
fctSelfSearch();
- if (_msg[4] == OPCODE_SREAD)
+ if (_currAction == OPCODE_SREAD)
fctSelfRead();
- if (_msg[4] == OPCODE_SPUT)
+ if (_currAction == OPCODE_SPUT)
fctSelfPut();
- if (_msg[4] == OPCODE_SLOOK)
+ if (_currAction == OPCODE_SLOOK)
fctSelftLook();
_hiddenHero = false;
- if (_msg[4] == OPCODE_SHIDE)
+ if (_currAction == OPCODE_SHIDE)
fctSelfHide();
} else {
if (_anyone) {
@@ -3078,7 +3078,7 @@ void MortevielleEngine::tlu(int af, int ob) {
handleDescriptionText(2, 999);
testKey(true);
_caff = af;
- _msg[3] = OPCODE_NONE;
+ _currMenu = OPCODE_NONE;
_crep = 998;
}
@@ -3171,7 +3171,7 @@ void MortevielleEngine::getSearchDescription(int objId) {
}
void MortevielleEngine::mennor() {
- _menu.menuUp(_msg[3]);
+ _menu.menuUp(_currMenu);
}
void MortevielleEngine::premtet() {
@@ -3241,8 +3241,8 @@ L1:
int cx = convertBitIndexToCharacterIndex(_currBitIndex);
_caff = 69 + cx;
_crep = _caff;
- _msg[3] = MENU_DISCUSS;
- _msg[4] = _menu._discussMenu[cx];
+ _currMenu = MENU_DISCUSS;
+ _currAction = _menu._discussMenu[cx];
_syn = true;
_col = true;
} else {
@@ -3387,7 +3387,7 @@ void MortevielleEngine::treg(int objId) {
int mdes = _caff;
_caff = objId;
- if (((_caff > 29) && (_caff < 33)) || (_caff == 144) || (_caff == 147) || (_caff == 149) || (_msg[4] == OPCODE_SLOOK)) {
+ if (((_caff > 29) && (_caff < 33)) || (_caff == 144) || (_caff == 147) || (_caff == 149) || (_currAction == OPCODE_SLOOK)) {
drawPictureWithText();
if ((_caff > 29) && (_caff < 33))
handleDescriptionText(2, _caff);
@@ -3395,7 +3395,7 @@ void MortevielleEngine::treg(int objId) {
handleDescriptionText(2, _caff + 400);
testKey(true);
_caff = mdes;
- _msg[3] = MENU_NONE;
+ _currMenu = MENU_NONE;
_crep = 998;
} else {
_obpart = true;