MORTEVIELLE: Some more renaming, introduce MENU_NONE constant

This commit is contained in:
Strangerke 2013-06-28 21:13:01 +02:00
parent 7be196865b
commit 554e04535f
4 changed files with 27 additions and 22 deletions

View File

@ -77,7 +77,7 @@ void MortevielleEngine::fctMove() {
_roomDoorId = _num - 3;
if (_num != 6)
affrep();
prepareDisplayText();
else
showMoveMenuAlert();
return;
@ -164,11 +164,11 @@ void MortevielleEngine::fctMove() {
loseGame();
} else {
_coreVar._currPlace = INSIDE_WELL;
affrep();
prepareDisplayText();
}
}
if ((menuChoice < 5) || (menuChoice == 13) || (menuChoice == 14))
affrep();
prepareDisplayText();
resetRoomVariables(_coreVar._currPlace);
_menu.setDestinationText(_coreVar._currPlace);
}
@ -203,7 +203,7 @@ void MortevielleEngine::fctTake() {
_coreVar._wellObjectId = 0;
_menu.unsetSearchMenu();
_obpart = false;
affrep();
prepareDisplayText();
} else {
_tabdon[kAcha + ((_mchai - 1) * 10) + _searchCount - 1] = 0;
tsuiv();
@ -735,7 +735,7 @@ void MortevielleEngine::fctPlace() {
aniof(2, 1);
_crep = 166;
}
affrep();
prepareDisplayText();
} else {
aniof(2, 1);
_crep = 166;
@ -813,7 +813,7 @@ void MortevielleEngine::fctTurn() {
int answer = _dialogManager.show(getEngineString(S_YES_NO), 1);
if (answer == 1) {
_coreVar._currPlace = CRYPT;
affrep();
prepareDisplayText();
} else
_crep = 176;
}
@ -1175,7 +1175,7 @@ void MortevielleEngine::fctEnter() {
aniof(1, 1);
_coreVar._currPlace = _roomDoorId;
affrep();
prepareDisplayText();
resetRoomVariables(_coreVar._currPlace);
_menu.setDestinationText(_coreVar._currPlace);
_roomDoorId = OWN_ROOM;
@ -1199,7 +1199,7 @@ void MortevielleEngine::fctSleep() {
if (_coreVar._currPlace != OWN_ROOM) {
exitRoom();
_coreVar._currPlace = OWN_ROOM;
affrep();
prepareDisplayText();
drawPictureWithText();
resetRoomVariables(_coreVar._currPlace);
_menu.setDestinationText(_coreVar._currPlace);
@ -1537,7 +1537,7 @@ void MortevielleEngine::fctDiscuss() {
showPeoplePresent(_currBitIndex);
prepareRoom();
drawClock();
affrep();
prepareDisplayText();
/* chech;*/
_menu.setDestinationText(_coreVar._currPlace);
clearVerbBar();

View File

@ -35,8 +35,9 @@ namespace Mortevielle {
class MortevielleEngine;
enum {
MENU_INVENTORY = 1, MENU_MOVE = 2, MENU_ACTION = 3, MENU_SELF = 4,
MENU_DISCUSS = 5, MENU_FILE = 6, MENU_SAVE = 7, MENU_LOAD = 8
MENU_NONE = 0, MENU_INVENTORY = 1, MENU_MOVE = 2, MENU_ACTION = 3,
MENU_SELF = 4, MENU_DISCUSS = 5, MENU_FILE = 6, MENU_SAVE = 7,
MENU_LOAD = 8
};
class Menu {

View File

@ -444,7 +444,7 @@ private:
void init_nbrepm();
void aniof(int ouf, int num);
void tlu(int af, int ob);
void affrep();
void prepareDisplayText();
void mennor();
void tsuiv();
void treg(int objId);

View File

@ -1338,7 +1338,7 @@ bool MortevielleEngine::checkInventory(int objectId) {
*/
void MortevielleEngine::displayDiningRoom() {
_coreVar._currPlace = DINING_ROOM;
affrep();
prepareDisplayText();
}
/**
@ -1409,7 +1409,7 @@ void MortevielleEngine::gotoDiningRoom() {
drawClock();
_mouse.showMouse();
_coreVar._currPlace = OWN_ROOM;
affrep();
prepareDisplayText();
resetPresenceInRooms(DINING_ROOM);
if (!_blo)
getPresence(OWN_ROOM);
@ -1432,7 +1432,7 @@ void MortevielleEngine::checkManorDistance() {
} else {
_destinationOk = true;
_coreVar._currPlace = MOUNTAIN;
affrep();
prepareDisplayText();
}
}
@ -1443,7 +1443,7 @@ void MortevielleEngine::checkManorDistance() {
void MortevielleEngine::gotoManorFront() {
_manorDistance = 0;
_coreVar._currPlace = MANOR_FRONT;
affrep();
prepareDisplayText();
}
/**
@ -1452,7 +1452,7 @@ void MortevielleEngine::gotoManorFront() {
*/
void MortevielleEngine::gotoManorBack() {
_coreVar._currPlace = MANOR_BACK;
affrep();
prepareDisplayText();
}
/**
@ -1518,7 +1518,7 @@ void MortevielleEngine::gameLoaded() {
_manorDistance = 0;
resetOpenObjects();
_takeObjCount = 0;
affrep();
prepareDisplayText();
_hintPctMessage = getString(580);
_destinationOk = false;
@ -3038,7 +3038,11 @@ void MortevielleEngine::tlu(int af, int ob) {
_crep = 998;
}
void MortevielleEngine::affrep() {
/**
* Prepare Display Text
* @remarks Originally called 'affrep'
*/
void MortevielleEngine::prepareDisplayText() {
_caff = _coreVar._currPlace;
_crep = _coreVar._currPlace;
}
@ -3209,7 +3213,7 @@ L1:
clearDescriptionBar();
displayAloneText();
resetRoomVariables(MANOR_FRONT);
affrep();
prepareDisplayText();
}
}
if (_menu._menuDisplayed)
@ -3233,7 +3237,7 @@ void MortevielleEngine::tsuiv() {
if (_currBitIndex != 0)
_coreVar._faithScore += 2;
} else {
affrep();
prepareDisplayText();
endSearch();
if (cx > 9)
_crep = 131;
@ -3347,7 +3351,7 @@ void MortevielleEngine::treg(int objId) {
handleDescriptionText(2, _caff + 400);
testKey(true);
_caff = mdes;
_msg[3] = 0;
_msg[3] = MENU_NONE;
_crep = 998;
} else {
_obpart = true;