aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/actions.cpp
diff options
context:
space:
mode:
authorStrangerke2014-01-09 08:21:52 +0100
committerStrangerke2014-01-09 08:21:52 +0100
commitd8d4a2c3bb635151e3c044ab7b87496eb6854305 (patch)
tree81cd1f110e3750f81c8f9375cb47a24f61082296 /engines/mortevielle/actions.cpp
parent0a5d92527dae7c8b0fc49dbfef186016d16da499 (diff)
downloadscummvm-rg350-d8d4a2c3bb635151e3c044ab7b87496eb6854305.tar.gz
scummvm-rg350-d8d4a2c3bb635151e3c044ab7b87496eb6854305.tar.bz2
scummvm-rg350-d8d4a2c3bb635151e3c044ab7b87496eb6854305.zip
MORTEVIELLE: Get rid of setParent() in Menu and MouseHandler
Diffstat (limited to 'engines/mortevielle/actions.cpp')
-rw-r--r--engines/mortevielle/actions.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index b68dd48b0f..0c45f8dba5 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -40,7 +40,7 @@ namespace Mortevielle {
* @remarks Originally called 'taller'
*/
void MortevielleEngine::fctMove() {
- int oldMenu = (_menu._moveMenu[6]._menuId << 8) | _menu._moveMenu[6]._actionId;
+ int oldMenu = (_menu->_moveMenu[6]._menuId << 8) | _menu->_moveMenu[6]._actionId;
if ((_coreVar._currPlace == ROOM26) && (_currAction == oldMenu)) {
_coreVar._currPlace = LANDING;
_caff = _coreVar._currPlace;
@@ -65,10 +65,10 @@ void MortevielleEngine::fctMove() {
if (_num == 1) {
_coreVar._currPlace = OWN_ROOM;
- _menu.setDestinationText(OWN_ROOM);
+ _menu->setDestinationText(OWN_ROOM);
} else if (_num == 7) {
_coreVar._currPlace = ATTIC;
- _menu.setDestinationText(ATTIC);
+ _menu->setDestinationText(ATTIC);
} else if (_num != 6)
_coreVar._currPlace = ROOM26;
@@ -85,10 +85,10 @@ void MortevielleEngine::fctMove() {
}
exitRoom();
int menuChoice = 1;
- oldMenu = (_menu._moveMenu[menuChoice]._menuId << 8) | _menu._moveMenu[menuChoice]._actionId;
+ oldMenu = (_menu->_moveMenu[menuChoice]._menuId << 8) | _menu->_moveMenu[menuChoice]._actionId;
while (oldMenu != _currAction) {
++menuChoice;
- oldMenu = (_menu._moveMenu[menuChoice]._menuId << 8) | _menu._moveMenu[menuChoice]._actionId;
+ oldMenu = (_menu->_moveMenu[menuChoice]._menuId << 8) | _menu->_moveMenu[menuChoice]._actionId;
}
switch (_coreVar._currPlace) {
@@ -97,14 +97,14 @@ void MortevielleEngine::fctMove() {
gotoManorFront();
else if (menuChoice == 2)
checkManorDistance();
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
return;
case INSIDE_WELL:
if (menuChoice == 1)
floodedInWell();
else if (menuChoice == 2)
gotoManorBack();
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
return;
case BUREAU:
if (menuChoice == 1)
@@ -193,7 +193,7 @@ void MortevielleEngine::fctMove() {
if ((menuChoice < 5) || (menuChoice == 13) || (menuChoice == 14))
prepareDisplayText();
resetRoomVariables(_coreVar._currPlace);
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
}
/**
@@ -224,7 +224,7 @@ void MortevielleEngine::fctTake() {
_coreVar._secretPassageObjectId = 0;
if (_coreVar._currPlace == WELL)
_coreVar._wellObjectId = 0;
- _menu.unsetSearchMenu();
+ _menu->unsetSearchMenu();
_obpart = false;
prepareDisplayText();
} else {
@@ -325,7 +325,7 @@ void MortevielleEngine::fctInventoryTake() {
int oldMenu = 0;
do {
++inventIndex;
- oldMenu = (_menu._inventoryMenu[inventIndex]._menuId << 8) | _menu._inventoryMenu[inventIndex]._actionId;
+ oldMenu = (_menu->_inventoryMenu[inventIndex]._menuId << 8) | _menu->_inventoryMenu[inventIndex]._actionId;
} while (oldMenu != _currAction);
int cz = 0;
int cy = 0;
@@ -336,7 +336,7 @@ void MortevielleEngine::fctInventoryTake() {
} while (cz != inventIndex);
cz = _coreVar._inventory[cy];
_coreVar._inventory[cy] = 0;
- _menu.setInventoryText();
+ _menu->setInventoryText();
putInHand(cz);
_crep = 998;
clearDescriptionBar();
@@ -536,7 +536,7 @@ void MortevielleEngine::fctSearch() {
if (_curSearchObjId != 0) {
_searchCount = 0;
_heroSearching = true;
- _menu.setSearchMenu();
+ _menu->setSearchMenu();
prepareNextObject();
} else
_crep = 997;
@@ -607,7 +607,7 @@ void MortevielleEngine::fctOpen() {
if (_caff == ROOM26) {
if (_roomDoorId != OWN_ROOM) {
- _currAction = _menu._opcodeEnter;
+ _currAction = _menu->_opcodeEnter;
_syn = true;
} else
_crep = 997;
@@ -740,12 +740,12 @@ void MortevielleEngine::fctPlace() {
_dialogManager.show(alertTxt);
bool enterPassageFl = _dialogManager.showKnowledgeCheck();
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
drawRightFrame();
clearDescriptionBar();
clearVerbBar();
- _mouse.showMouse();
+ _mouse->showMouse();
prepareRoom();
drawClock();
if (_currBitIndex != 0)
@@ -753,12 +753,12 @@ void MortevielleEngine::fctPlace() {
else
displayAloneText();
- _menu.displayMenu();
+ _menu->displayMenu();
if (enterPassageFl) {
_coreVar._currPlace = SECRET_PASSAGE;
- _menu.setDestinationText(SECRET_PASSAGE);
+ _menu->setDestinationText(SECRET_PASSAGE);
} else {
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
setPal(14);
drawPicture();
displayAnimFrame(1, 2);
@@ -1132,7 +1132,7 @@ void MortevielleEngine::fctEat() {
_coreVar._currPlace = DINING_ROOM;
_caff = DINING_ROOM;
resetRoomVariables(_coreVar._currPlace);
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
int day, hour, minute;
updateHour(day, hour, minute);
@@ -1168,7 +1168,7 @@ void MortevielleEngine::fctEat() {
void MortevielleEngine::fctEnter() {
if ((_coreVar._currPlace == MANOR_FRONT) || (_coreVar._currPlace == MANOR_BACK)) {
gotoDiningRoom();
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
} else if (_coreVar._currPlace == LANDING)
showMoveMenuAlert();
else if (_roomDoorId == OWN_ROOM)
@@ -1193,7 +1193,7 @@ void MortevielleEngine::fctEnter() {
++_coreVar._faithScore;
_coreVar._currPlace = LANDING;
_currMenu = MENU_DISCUSS;
- _currAction = (_menu._discussMenu[charIndex]._menuId << 8) | _menu._discussMenu[charIndex]._actionId;
+ _currAction = (_menu->_discussMenu[charIndex]._menuId << 8) | _menu->_discussMenu[charIndex]._actionId;
_syn = true;
if (_roomDoorId == JULIA_ROOM) {
_col = true;
@@ -1214,7 +1214,7 @@ void MortevielleEngine::fctEnter() {
_coreVar._currPlace = _roomDoorId;
prepareDisplayText();
resetRoomVariables(_coreVar._currPlace);
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
_roomDoorId = OWN_ROOM;
_savedBitIndex = 0;
_currBitIndex = 0;
@@ -1237,7 +1237,7 @@ void MortevielleEngine::fctSleep() {
prepareDisplayText();
drawPictureWithText();
resetRoomVariables(_coreVar._currPlace);
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
}
clearVerbBar();
clearDescriptionBar();
@@ -1321,7 +1321,7 @@ void MortevielleEngine::fctLeave() {
if (_crep == 0)
_crep = nextPlace;
resetRoomVariables(nextPlace);
- _menu.setDestinationText(nextPlace);
+ _menu->setDestinationText(nextPlace);
}
}
@@ -1394,7 +1394,7 @@ void MortevielleEngine::fctDiscuss() {
int oldMenu;
do {
++cx;
- oldMenu = (_menu._discussMenu[cx]._menuId << 8) | _menu._discussMenu[cx]._actionId;
+ oldMenu = (_menu->_discussMenu[cx]._menuId << 8) | _menu->_discussMenu[cx]._actionId;
} while (oldMenu != _currAction);
_caff = 69 + cx;
drawPictureWithText();
@@ -1403,7 +1403,7 @@ void MortevielleEngine::fctDiscuss() {
}
testKey(false);
menuUp();
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
drawDiscussionBox();
startDialog(displId);
@@ -1417,7 +1417,7 @@ void MortevielleEngine::fctDiscuss() {
}
lib[46] = lib[45];
lib[45] = ' ';
- _mouse.showMouse();
+ _mouse->showMouse();
do {
choice = 0;
int posX = 0;
@@ -1444,11 +1444,11 @@ void MortevielleEngine::fctDiscuss() {
bool click;
do {
bool dummyFl;
- _mouse.moveMouse(dummyFl, retKey);
+ _mouse->moveMouse(dummyFl, retKey);
if (shouldQuit())
return;
- _mouse.getMousePosition(x, y, click);
+ _mouse->getMousePosition(x, y, click);
x *= (3 - kResolutionScaler);
if (x > 319)
cx = 41;
@@ -1533,11 +1533,11 @@ void MortevielleEngine::fctDiscuss() {
_coreVar._faithScore += 3;
displId = 139;
}
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
drawDiscussionBox();
startDialog(displId);
- _mouse.showMouse();
+ _mouse->showMouse();
if ((displId == 84) || (displId == 86)) {
_coreVar._pctHintFound[5] = '*';
_coreVar._availableQuestion[7] = '*';
@@ -1551,32 +1551,32 @@ void MortevielleEngine::fctDiscuss() {
_coreVar._pctHintFound[8] = '*';
_coreVar._availableQuestion[32] = '*';
}
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
- _mouse.showMouse();
+ _mouse->showMouse();
}
} while ((choice != 46) && (displId != 138));
if (_col) {
_coreVar._faithScore += (3 * (_coreVar._faithScore / 10));
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
drawDiscussionBox();
startDialog(138);
- _mouse.showMouse();
+ _mouse->showMouse();
_col = false;
_coreVar._currPlace = LANDING;
}
_controlMenu = 0;
- _mouse.hideMouse();
+ _mouse->hideMouse();
clearScreen();
drawRightFrame();
- _mouse.showMouse();
+ _mouse->showMouse();
showPeoplePresent(_currBitIndex);
prepareRoom();
drawClock();
prepareDisplayText();
/* chech;*/
- _menu.setDestinationText(_coreVar._currPlace);
+ _menu->setDestinationText(_coreVar._currPlace);
clearVerbBar();
}
@@ -1625,13 +1625,13 @@ void MortevielleEngine::endGame() {
clearVerbBar();
handleDescriptionText(9, 1509);
testKey(false);
- _mouse.hideMouse();
+ _mouse->hideMouse();
_caff = 70;
_text.taffich();
clearScreen();
drawDiscussionBox();
startDialog(141);
- _mouse.showMouse();
+ _mouse->showMouse();
clearUpperLeftPart();
handleDescriptionText(9, 1509);
handleDescriptionText(2, 142);