diff options
author | Strangerke | 2013-08-15 20:03:27 +0200 |
---|---|---|
committer | Strangerke | 2013-08-15 20:03:27 +0200 |
commit | 3af7b8d8724bbefb3f3943d0402d7d0c0f83dd43 (patch) | |
tree | a7b0de6b429bc57c75af904086b74020892480bc /engines | |
parent | 28b60781d0d912bcc4fe1f71016049315a254133 (diff) | |
download | scummvm-rg350-3af7b8d8724bbefb3f3943d0402d7d0c0f83dd43.tar.gz scummvm-rg350-3af7b8d8724bbefb3f3943d0402d7d0c0f83dd43.tar.bz2 scummvm-rg350-3af7b8d8724bbefb3f3943d0402d7d0c0f83dd43.zip |
MORTEVIELLE: Rename opcode variables
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mortevielle/actions.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/menu.cpp | 118 | ||||
-rw-r--r-- | engines/mortevielle/menu.h | 52 | ||||
-rw-r--r-- | engines/mortevielle/outtext.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/utils.cpp | 60 |
5 files changed, 117 insertions, 117 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index 1b1e10daa2..2035f4307f 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -584,7 +584,7 @@ void MortevielleEngine::fctOpen() { if (_caff == ROOM26) { if (_roomDoorId != OWN_ROOM) { - _currAction = _menu.OPCODE_ENTER; + _currAction = _menu._opcodeEnter; _syn = true; } else _crep = 997; diff --git a/engines/mortevielle/menu.cpp b/engines/mortevielle/menu.cpp index c8f34991bd..67199b97bc 100644 --- a/engines/mortevielle/menu.cpp +++ b/engines/mortevielle/menu.cpp @@ -49,13 +49,13 @@ const byte menuConstants[8][4] = { }; Menu::Menu() { - OPCODE_ATTACH = OPCODE_WAIT = OPCODE_FORCE = OPCODE_SLEEP = OPCODE_NONE; - OPCODE_LISTEN = OPCODE_ENTER = OPCODE_CLOSE = OPCODE_SEARCH = OPCODE_NONE; - OPCODE_KNOCK = OPCODE_SCRATCH = OPCODE_READ = OPCODE_EAT = OPCODE_NONE; - OPCODE_PLACE = OPCODE_OPEN = OPCODE_TAKE = OPCODE_LOOK = OPCODE_NONE; - OPCODE_SMELL = OPCODE_SOUND = OPCODE_LEAVE = OPCODE_LIFT = OPCODE_NONE; - OPCODE_TURN = OPCODE_SHIDE = OPCODE_SSEARCH = OPCODE_SREAD = OPCODE_NONE; - OPCODE_SPUT = OPCODE_SLOOK = OPCODE_NONE; + _opcodeAttach = _opcodeWait = _opcodeForce = _opcodeSleep = OPCODE_NONE; + _opcodeListen = _opcodeEnter = _opcodeClose = _opcodeSearch = OPCODE_NONE; + _opcodeKnock = _opcodeScratch = _opcodeRead = _opcodeEat = OPCODE_NONE; + _opcodePlace = _opcodeOpen = _opcodeTake = _opcodeLook = OPCODE_NONE; + _opcodeSmell = _opcodeSound = _opcodeLeave = _opcodeLift = OPCODE_NONE; + _opcodeTurn = _opcodeSHide = _opcodeSSearch = _opcodeSRead = OPCODE_NONE; + _opcodeSPut = _opcodeSLook = OPCODE_NONE; } void Menu::readVerbNums(Common::File &f, int dataSize) { @@ -87,68 +87,68 @@ void Menu::readVerbNums(Common::File &f, int dataSize) { } assert(dataSize == 52); - OPCODE_ATTACH = f.readUint16LE(); - OPCODE_WAIT = f.readUint16LE(); - OPCODE_FORCE = f.readUint16LE(); - OPCODE_SLEEP = f.readUint16LE(); - OPCODE_LISTEN = f.readUint16LE(); - OPCODE_ENTER = f.readUint16LE(); - OPCODE_CLOSE = f.readUint16LE(); - OPCODE_SEARCH = f.readUint16LE(); - OPCODE_KNOCK = f.readUint16LE(); - OPCODE_SCRATCH = f.readUint16LE(); - OPCODE_READ = f.readUint16LE(); - OPCODE_EAT = f.readUint16LE(); - OPCODE_PLACE = f.readUint16LE(); - OPCODE_OPEN = f.readUint16LE(); - OPCODE_TAKE = f.readUint16LE(); - OPCODE_LOOK = f.readUint16LE(); - OPCODE_SMELL = f.readUint16LE(); - OPCODE_SOUND = f.readUint16LE(); - OPCODE_LEAVE = f.readUint16LE(); - OPCODE_LIFT = f.readUint16LE(); - OPCODE_TURN = f.readUint16LE(); - OPCODE_SHIDE = f.readUint16LE(); - OPCODE_SSEARCH = f.readUint16LE(); - OPCODE_SREAD = f.readUint16LE(); - OPCODE_SPUT = f.readUint16LE(); - OPCODE_SLOOK = f.readUint16LE(); + _opcodeAttach = f.readUint16LE(); + _opcodeWait = f.readUint16LE(); + _opcodeForce = f.readUint16LE(); + _opcodeSleep = f.readUint16LE(); + _opcodeListen = f.readUint16LE(); + _opcodeEnter = f.readUint16LE(); + _opcodeClose = f.readUint16LE(); + _opcodeSearch = f.readUint16LE(); + _opcodeKnock = f.readUint16LE(); + _opcodeScratch = f.readUint16LE(); + _opcodeRead = f.readUint16LE(); + _opcodeEat = f.readUint16LE(); + _opcodePlace = f.readUint16LE(); + _opcodeOpen = f.readUint16LE(); + _opcodeTake = f.readUint16LE(); + _opcodeLook = f.readUint16LE(); + _opcodeSmell = f.readUint16LE(); + _opcodeSound = f.readUint16LE(); + _opcodeLeave = f.readUint16LE(); + _opcodeLift = f.readUint16LE(); + _opcodeTurn = f.readUint16LE(); + _opcodeSHide = f.readUint16LE(); + _opcodeSSearch = f.readUint16LE(); + _opcodeSRead = f.readUint16LE(); + _opcodeSPut = f.readUint16LE(); + _opcodeSLook = f.readUint16LE(); _actionMenu[0]._menuId = OPCODE_NONE >> 8; _actionMenu[0]._actionId = OPCODE_NONE & 0xFF; - _actionMenu[1]._menuId = OPCODE_SHIDE >> 8; - _actionMenu[1]._actionId = OPCODE_SHIDE & 0xFF; + _actionMenu[1]._menuId = _opcodeSHide >> 8; + _actionMenu[1]._actionId = _opcodeSHide & 0xFF; - _actionMenu[2]._menuId = OPCODE_ATTACH >> 8; - _actionMenu[2]._actionId = OPCODE_ATTACH & 0xFF; + _actionMenu[2]._menuId = _opcodeAttach >> 8; + _actionMenu[2]._actionId = _opcodeAttach & 0xFF; - _actionMenu[3]._menuId = OPCODE_FORCE >> 8; - _actionMenu[3]._actionId = OPCODE_FORCE & 0xFF; + _actionMenu[3]._menuId = _opcodeForce >> 8; + _actionMenu[3]._actionId = _opcodeForce & 0xFF; - _actionMenu[4]._menuId = OPCODE_SLEEP >> 8; - _actionMenu[4]._actionId = OPCODE_SLEEP & 0xFF; + _actionMenu[4]._menuId = _opcodeSleep >> 8; + _actionMenu[4]._actionId = _opcodeSleep & 0xFF; - _actionMenu[5]._menuId = OPCODE_ENTER >> 8; - _actionMenu[5]._actionId = OPCODE_ENTER & 0xFF; + _actionMenu[5]._menuId = _opcodeEnter >> 8; + _actionMenu[5]._actionId = _opcodeEnter & 0xFF; - _actionMenu[6]._menuId = OPCODE_CLOSE >> 8; - _actionMenu[6]._menuId = OPCODE_CLOSE & 0xFF; + _actionMenu[6]._menuId = _opcodeClose >> 8; + _actionMenu[6]._menuId = _opcodeClose & 0xFF; - _actionMenu[7]._menuId = OPCODE_KNOCK >> 8; - _actionMenu[7]._menuId = OPCODE_KNOCK & 0xFF; + _actionMenu[7]._menuId = _opcodeKnock >> 8; + _actionMenu[7]._menuId = _opcodeKnock & 0xFF; - _actionMenu[8]._menuId = OPCODE_EAT >> 8; - _actionMenu[8]._menuId = OPCODE_EAT & 0xFF; + _actionMenu[8]._menuId = _opcodeEat >> 8; + _actionMenu[8]._menuId = _opcodeEat & 0xFF; - _actionMenu[9]._menuId = OPCODE_PLACE >> 8; - _actionMenu[9]._menuId = OPCODE_PLACE & 0xFF; + _actionMenu[9]._menuId = _opcodePlace >> 8; + _actionMenu[9]._menuId = _opcodePlace & 0xFF; - _actionMenu[10]._menuId = OPCODE_OPEN >> 8; - _actionMenu[10]._menuId = OPCODE_OPEN & 0xFF; + _actionMenu[10]._menuId = _opcodeOpen >> 8; + _actionMenu[10]._menuId = _opcodeOpen & 0xFF; - _actionMenu[11]._menuId = OPCODE_LEAVE >> 8; - _actionMenu[11]._menuId = OPCODE_LEAVE & 0xFF; + _actionMenu[11]._menuId = _opcodeLeave >> 8; + _actionMenu[11]._menuId = _opcodeLeave & 0xFF; } /** @@ -701,8 +701,8 @@ void Menu::setSearchMenu() { for (int i = 1; i <= 11; ++i) disableMenuItem(_actionMenu[i]._menuId, _actionMenu[i]._actionId); - setText(OPCODE_SOUND >> 8, OPCODE_SOUND & 0xFF, _vm->getEngineString(S_SUITE)); - setText(OPCODE_LIFT >> 8, OPCODE_LIFT & 0xFF, _vm->getEngineString(S_STOP)); + setText(_opcodeSound >> 8, _opcodeSound & 0xFF, _vm->getEngineString(S_SUITE)); + setText(_opcodeLift >> 8, _opcodeLift & 0xFF, _vm->getEngineString(S_STOP)); } /** @@ -714,8 +714,8 @@ void Menu::unsetSearchMenu() { for (int i = 1; i <= 11; ++i) enableMenuItem(_actionMenu[i]._menuId, _actionMenu[i]._actionId); - setText(OPCODE_SOUND >> 8, OPCODE_SOUND & 0xFF, _vm->getEngineString(S_PROBE)); - setText(OPCODE_LIFT >> 8, OPCODE_LIFT & 0xFF, _vm->getEngineString(S_RAISE)); + setText(_opcodeSound >> 8, _opcodeSound & 0xFF, _vm->getEngineString(S_PROBE)); + setText(_opcodeLift >> 8, _opcodeLift & 0xFF, _vm->getEngineString(S_RAISE)); } /** diff --git a/engines/mortevielle/menu.h b/engines/mortevielle/menu.h index a1b654ccaf..9afa99cfa8 100644 --- a/engines/mortevielle/menu.h +++ b/engines/mortevielle/menu.h @@ -75,32 +75,32 @@ public: menuItem _inventoryMenu[9]; menuItem _moveMenu[8]; - int OPCODE_ATTACH; - int OPCODE_WAIT; - int OPCODE_FORCE; - int OPCODE_SLEEP; - int OPCODE_LISTEN; - int OPCODE_ENTER; - int OPCODE_CLOSE; - int OPCODE_SEARCH; - int OPCODE_KNOCK; - int OPCODE_SCRATCH; - int OPCODE_READ; - int OPCODE_EAT; - int OPCODE_PLACE; - int OPCODE_OPEN; - int OPCODE_TAKE; - int OPCODE_LOOK; - int OPCODE_SMELL; - int OPCODE_SOUND; - int OPCODE_LEAVE; - int OPCODE_LIFT; - int OPCODE_TURN; - int OPCODE_SHIDE; - int OPCODE_SSEARCH; - int OPCODE_SREAD; - int OPCODE_SPUT; - int OPCODE_SLOOK; + int _opcodeAttach; + int _opcodeWait; + int _opcodeForce; + int _opcodeSleep; + int _opcodeListen; + int _opcodeEnter; + int _opcodeClose; + int _opcodeSearch; + int _opcodeKnock; + int _opcodeScratch; + int _opcodeRead; + int _opcodeEat; + int _opcodePlace; + int _opcodeOpen; + int _opcodeTake; + int _opcodeLook; + int _opcodeSmell; + int _opcodeSound; + int _opcodeLeave; + int _opcodeLift; + int _opcodeTurn; + int _opcodeSHide; + int _opcodeSSearch; + int _opcodeSRead; + int _opcodeSPut; + int _opcodeSLook; menuItem _actionMenu[12]; void setParent(MortevielleEngine *vm); diff --git a/engines/mortevielle/outtext.cpp b/engines/mortevielle/outtext.cpp index 9451e655dd..d1cbeea683 100644 --- a/engines/mortevielle/outtext.cpp +++ b/engines/mortevielle/outtext.cpp @@ -314,7 +314,7 @@ void TextHandler::taffich() { loadAniFile(filename, drawingStartPos, drawingSize); } _vm->_mouse.showMouse(); - if ((a < COAT_ARMS) && ((_vm->_maff < COAT_ARMS) || (_vm->_coreVar._currPlace == LANDING)) && (_vm->_currAction != _vm->_menu.OPCODE_ENTER)) { + if ((a < COAT_ARMS) && ((_vm->_maff < COAT_ARMS) || (_vm->_coreVar._currPlace == LANDING)) && (_vm->_currAction != _vm->_menu._opcodeEnter)) { if ((a == ATTIC) || (a == CELLAR)) _vm->displayAloneText(); else if (!_vm->_blo) diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index 3cacbec630..356b6a830d 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -327,9 +327,9 @@ void MortevielleEngine::handleAction() { if (_mouse._pos.y < 12) return; - if ((_currAction == _menu.OPCODE_SOUND) || (_currAction == _menu.OPCODE_LIFT)) { + if ((_currAction == _menu._opcodeSound) || (_currAction == _menu._opcodeLift)) { handledOpcodeFl = true; - if ((_currAction == _menu.OPCODE_LIFT) || (_obpart)) { + if ((_currAction == _menu._opcodeLift) || (_obpart)) { endSearch(); _caff = _coreVar._currPlace; _crep = 998; @@ -1536,7 +1536,7 @@ void MortevielleEngine::handleOpcode() { _keyPressedEsc = false; if (!_anyone) { if (_uptodatePresence) { - if ((_currMenu == MENU_MOVE) || (_currAction == _menu.OPCODE_LEAVE) || (_currAction == _menu.OPCODE_SLEEP) || (_currAction == _menu.OPCODE_EAT)) { + if ((_currMenu == MENU_MOVE) || (_currAction == _menu._opcodeLeave) || (_currAction == _menu._opcodeSleep) || (_currAction == _menu._opcodeEat)) { _controlMenu = 4; menuUp(); return; @@ -1548,59 +1548,59 @@ void MortevielleEngine::handleOpcode() { fctDiscuss(); if (_currMenu == MENU_INVENTORY) fctInventoryTake(); - if (_currAction == _menu.OPCODE_ATTACH) + if (_currAction == _menu._opcodeAttach) fctAttach(); - if (_currAction == _menu.OPCODE_WAIT) + if (_currAction == _menu._opcodeWait) fctWait(); - if (_currAction == _menu.OPCODE_FORCE) + if (_currAction == _menu._opcodeForce) fctForce(); - if (_currAction == _menu.OPCODE_SLEEP) + if (_currAction == _menu._opcodeSleep) fctSleep(); - if (_currAction == _menu.OPCODE_LISTEN) + if (_currAction == _menu._opcodeListen) fctListen(); - if (_currAction == _menu.OPCODE_ENTER) + if (_currAction == _menu._opcodeEnter) fctEnter(); - if (_currAction == _menu.OPCODE_CLOSE) + if (_currAction == _menu._opcodeClose) fctClose(); - if (_currAction == _menu.OPCODE_SEARCH) + if (_currAction == _menu._opcodeSearch) fctSearch(); - if (_currAction == _menu.OPCODE_KNOCK) + if (_currAction == _menu._opcodeKnock) fctKnock(); - if (_currAction == _menu.OPCODE_SCRATCH) + if (_currAction == _menu._opcodeScratch) fctScratch(); - if (_currAction == _menu.OPCODE_READ) + if (_currAction == _menu._opcodeRead) fctRead(); - if (_currAction == _menu.OPCODE_EAT) + if (_currAction == _menu._opcodeEat) fctEat(); - if (_currAction == _menu.OPCODE_PLACE) + if (_currAction == _menu._opcodePlace) fctPlace(); - if (_currAction == _menu.OPCODE_OPEN) + if (_currAction == _menu._opcodeOpen) fctOpen(); - if (_currAction == _menu.OPCODE_TAKE) + if (_currAction == _menu._opcodeTake) fctTake(); - if (_currAction == _menu.OPCODE_LOOK) + if (_currAction == _menu._opcodeLook) fctLook(); - if (_currAction == _menu.OPCODE_SMELL) + if (_currAction == _menu._opcodeSmell) fctSmell(); - if (_currAction == _menu.OPCODE_SOUND) + if (_currAction == _menu._opcodeSound) fctSound(); - if (_currAction == _menu.OPCODE_LEAVE) + if (_currAction == _menu._opcodeLeave) fctLeave(); - if (_currAction == _menu.OPCODE_LIFT) + if (_currAction == _menu._opcodeLift) fctLift(); - if (_currAction == _menu.OPCODE_TURN) + if (_currAction == _menu._opcodeTurn) fctTurn(); - if (_currAction == _menu.OPCODE_SSEARCH) + if (_currAction == _menu._opcodeSSearch) fctSelfSearch(); - if (_currAction == _menu.OPCODE_SREAD) + if (_currAction == _menu._opcodeSRead) fctSelfRead(); - if (_currAction == _menu.OPCODE_SPUT) + if (_currAction == _menu._opcodeSPut) fctSelfPut(); - if (_currAction == _menu.OPCODE_SLOOK) + if (_currAction == _menu._opcodeSLook) fctSelftLook(); _hiddenHero = false; - if (_currAction == _menu.OPCODE_SHIDE) + if (_currAction == _menu._opcodeSHide) fctSelfHide(); } else { if (_anyone) { @@ -3400,7 +3400,7 @@ void MortevielleEngine::displayLookScreen(int objId) { int mdes = _caff; _caff = objId; - if (((_caff > 29) && (_caff < 33)) || (_caff == 144) || (_caff == 147) || (_caff == 149) || (_currAction == _menu.OPCODE_SLOOK)) { + if (((_caff > 29) && (_caff < 33)) || (_caff == 144) || (_caff == 147) || (_caff == 149) || (_currAction == _menu._opcodeSLook)) { drawPictureWithText(); if ((_caff > 29) && (_caff < 33)) handleDescriptionText(2, _caff); |