aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2012-10-10 08:19:54 +0200
committerStrangerke2012-10-10 08:19:54 +0200
commitb2f2f8d7b08b40e43702e8db325f8136066f10be (patch)
tree69f5eb5399d8ae73e4eb923f5bcc09f30439b8fe /engines
parente0ca30ad3da63f8dee025244b4ec6d4a719c1258 (diff)
downloadscummvm-rg350-b2f2f8d7b08b40e43702e8db325f8136066f10be.tar.gz
scummvm-rg350-b2f2f8d7b08b40e43702e8db325f8136066f10be.tar.bz2
scummvm-rg350-b2f2f8d7b08b40e43702e8db325f8136066f10be.zip
MORTEVIELLE: Some renaming
Diffstat (limited to 'engines')
-rw-r--r--engines/mortevielle/actions.cpp50
-rw-r--r--engines/mortevielle/mortevielle.cpp30
-rw-r--r--engines/mortevielle/mortevielle.h14
3 files changed, 47 insertions, 47 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp
index bff5d638ee..f53dd91497 100644
--- a/engines/mortevielle/actions.cpp
+++ b/engines/mortevielle/actions.cpp
@@ -72,9 +72,9 @@ void MortevielleEngine::fctMove() {
_coreVar._currPlace = ROOM26;
if ((_num > 1) && (_num < 6))
- _ment = _num - 1;
+ _roomDoorId = _num - 1;
else if (_num > 7)
- _ment = _num - 3;
+ _roomDoorId = _num - 3;
if (_num != 6)
affrep();
@@ -207,10 +207,10 @@ void MortevielleEngine::fctTake() {
} else {
_tabdon[kAcha + ((_mchai - 1) * 10) + _cs - 1] = 0;
tsuiv();
- ++_dobj;
- if (_dobj > 6) {
+ ++_takeObjCount;
+ if (_takeObjCount > 6) {
_coreVar._faithScore += 2;
- _dobj = 0;
+ _takeObjCount = 0;
}
}
}
@@ -583,7 +583,7 @@ void MortevielleEngine::fctOpen() {
ecr3(getEngineString(S_OPEN));
if (_caff == ROOM26) {
- if (_ment != 0) {
+ if (_roomDoorId != OWN_ROOM) {
_msg[4] = OPCODE_ENTER;
_syn = true;
} else
@@ -604,7 +604,7 @@ void MortevielleEngine::fctOpen() {
if (_num != 0) {
if (_currBitIndex > 0)
_coreVar._faithScore += 2;
- ++_iouv;
+ ++_openObjCount;
int tmpPlace = 0;
do {
++tmpPlace;
@@ -880,9 +880,9 @@ void MortevielleEngine::fctClose() {
aniof(2, _num);
_crep = 998;
_touv[cx] = chr(0);
- --_iouv;
- if (_iouv < 0)
- _iouv = 0;
+ --_openObjCount;
+ if (_openObjCount < 0)
+ _openObjCount = 0;
int chai = 9999;
rechai(chai);
if (_mchai == chai)
@@ -924,8 +924,8 @@ void MortevielleEngine::fctKnock() {
if (_coreVar._currPlace == ROOM26) {
int rand = (getRandomNumber(0, 8)) - 4;
_speechManager.startSpeech(11, rand, 1);
- int p = getPresenceStats(rand, _coreVar._faithScore, _ment);
- int l = _ment;
+ int p = getPresenceStats(rand, _coreVar._faithScore, _roomDoorId);
+ int l = _roomDoorId;
if (l != OWN_ROOM) {
if (p != -500) {
if (rand > p)
@@ -938,7 +938,7 @@ void MortevielleEngine::fctKnock() {
getKnockAnswer();
}
- if (_ment == GREEN_ROOM2)
+ if (_roomDoorId == GREEN_ROOM2)
_crep = 190;
}
}
@@ -1048,8 +1048,8 @@ void MortevielleEngine::fctListen() {
if (_currBitIndex != 0)
++_coreVar._faithScore;
int rand;
- int p = getPresenceStats(rand, _coreVar._faithScore, _ment);
- int l = _ment;
+ int p = getPresenceStats(rand, _coreVar._faithScore, _roomDoorId);
+ int l = _roomDoorId;
if (l != OWN_ROOM) {
if (p != -500) {
if (rand > p)
@@ -1126,17 +1126,17 @@ void MortevielleEngine::fctEnter() {
_menu.setDestinationText(_coreVar._currPlace);
} else if (_coreVar._currPlace == LANDING)
showMoveMenuAlert();
- else if (_ment == 0)
+ else if (_roomDoorId == OWN_ROOM)
_crep = 997;
- else if ((_ment == 9) && (_coreVar._selectedObjectId != 136)) {
+ else if ((_roomDoorId == ROOM9) && (_coreVar._selectedObjectId != 136)) {
_crep = 189;
_coreVar._teauto[8] = '*';
} else {
int z = 0;
if (!_blo)
- z = getPresence(_ment);
+ z = getPresence(_roomDoorId);
if (z != 0) {
- if ((_ment == 3) || (_ment == 7))
+ if ((_roomDoorId == TOILETS) || (_roomDoorId == BATHROOM))
_crep = 179;
else {
_x = (getRandomNumber(0, 10)) - 5;
@@ -1149,26 +1149,26 @@ void MortevielleEngine::fctEnter() {
_msg[3] = MENU_DISCUSS;
_msg[4] = _menu._discussMenu[_x];
_syn = true;
- if (_ment == 9) {
+ if (_roomDoorId == ROOM9) {
_col = true;
_caff = 70;
afdes();
repon(2, _caff);
} else
_col = false;
- resetRoomVariables(_ment);
- _ment = 0;
+ resetRoomVariables(_roomDoorId);
+ _roomDoorId = OWN_ROOM;
}
} else {
_x = (getRandomNumber(0, 10)) - 5;
_speechManager.startSpeech(7, _x, 1);
aniof(1, 1);
- _coreVar._currPlace = _ment;
+ _coreVar._currPlace = _roomDoorId;
affrep();
resetRoomVariables(_coreVar._currPlace);
_menu.setDestinationText(_coreVar._currPlace);
- _ment = 0;
+ _roomDoorId = OWN_ROOM;
_savedBitIndex = 0;
_currBitIndex = 0;
}
@@ -1460,7 +1460,7 @@ void MortevielleEngine::fctDiscuss() {
if (_col) {
_col = false;
_coreVar._currPlace = 15;
- if (_iouv > 0)
+ if (_openObjCount > 0)
max = 8;
else
max = 4;
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 58708f3bcb..9f41292f49 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -111,7 +111,7 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *g
_newGraphicalDevice = -1;
_place = -1;
- _c_zzz = -1;
+ _x26KeyCount = -1;
_caff = -1;
_day = 0;
@@ -207,7 +207,7 @@ Common::ErrorCode MortevielleEngine::initialise() {
loadCFIPH();
loadCFIEC();
decodeNumber(&_cfiecBuffer[161 * 16], (_cfiecBufferSize - (161 * 16)) / 64);
- _c_zzz = 1;
+ _x26KeyCount = 1;
init_nbrepm();
initMouse();
@@ -587,7 +587,7 @@ void MortevielleEngine::mainGame() {
if (_reloadCFIEC)
loadCFIEC();
- for (_crep = 1; _crep <= _c_zzz; ++_crep)
+ for (_crep = 1; _crep <= _x26KeyCount; ++_crep)
decodeNumber(&_cfiecBuffer[161 * 16], ((822 * 128) - (161 * 16)) / 64);
loadBRUIT5();
@@ -1679,8 +1679,8 @@ void MortevielleEngine::startMusicOrSpeech(int so) {
*/
void MortevielleEngine::loseGame() {
initouv();
- _ment = 0;
- _iouv = 0;
+ _roomDoorId = OWN_ROOM;
+ _openObjCount = 0;
_mchai = 0;
_menu.unsetSearchMenu();
if (!_blo)
@@ -1892,14 +1892,14 @@ void MortevielleEngine::gameLoaded() {
_endHour = 0;
_cs = 0;
_is = 0;
- _ment = 0;
+ _roomDoorId = OWN_ROOM;
_syn = true;
_heroSearching = true;
_mchai = 0;
_manorDistance = 0;
initouv();
- _iouv = 0;
- _dobj = 0;
+ _openObjCount = 0;
+ _takeObjCount = 0;
affrep();
_hintPctMessage = getString(580);
@@ -3393,7 +3393,7 @@ void MortevielleEngine::affrep() {
* @remarks Originally called 'tsort'
*/
void MortevielleEngine::exitRoom() {
- if ((_iouv > 0) && (_coreVar._currPlace != OWN_ROOM)) {
+ if ((_openObjCount > 0) && (_coreVar._currPlace != OWN_ROOM)) {
if (_coreVar._faithScore < 50)
_coreVar._faithScore += 2;
else
@@ -3402,8 +3402,8 @@ void MortevielleEngine::exitRoom() {
for (int cx = 1; cx <= 7; ++cx)
_touv[cx] = chr(0);
- _ment = 0;
- _iouv = 0;
+ _roomDoorId = OWN_ROOM;
+ _openObjCount = 0;
_mchai = 0;
resetRoomVariables(_coreVar._currPlace);
}
@@ -3523,7 +3523,7 @@ L1:
else
_speechManager.startSpeech(4, 4, 1);
- if (_iouv == 0)
+ if (_openObjCount == 0)
_coreVar._faithScore += 2;
else if (_coreVar._faithScore < 50)
_coreVar._faithScore += 4;
@@ -3568,7 +3568,7 @@ void MortevielleEngine::tsuiv() {
tbcl = _tabdon[cl];
} while ((tbcl == 0) && (_cs <= 9));
- if ((tbcl != 0) && (_cs < 11)) {
+ if ((tbcl != 0) && (_cs < 11)) { // 2nd check useless as _cs is <= 10
++_is;
_caff = tbcl;
_crep = _caff + 400;
@@ -3759,9 +3759,9 @@ int MortevielleEngine::testou() {
_soundOff = !_soundOff;
break;
case '\26' :
- if ((_c_zzz == 1) || (_c_zzz == 2)) {
+ if ((_x26KeyCount == 1) || (_x26KeyCount == 2)) {
decodeNumber(&_cfiecBuffer[161 * 16], (_cfiecBufferSize - (161 * 16)) / 64);
- ++_c_zzz;
+ ++_x26KeyCount;
return 61;
}
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index 3f5c133010..ec7e86f1fa 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -157,7 +157,7 @@ static const int _actionMenu[12] = { OPCODE_NONE,
26 "A photograph$",
27 "The coat of arms$",
*/
-enum places {
+enum Places {
OWN_ROOM = 0, GREEN_ROOM = 1, PURPLE_ROOM = 2, TOILETS = 3, DARKBLUE_ROOM = 4,
BLUE_ROOM = 5, RED_ROOM = 6, BATHROOM = 7, GREEN_ROOM2 = 8, ROOM9 = 9,
DINING_ROOM = 10, BUREAU = 11, KITCHEN = 12, ATTIC = 13, CELLAR = 14,
@@ -173,7 +173,7 @@ struct nhom {
byte _hom[4];
};
-struct t_pcga {
+struct CgaPalette {
byte _p;
nhom _a[16];
};
@@ -260,12 +260,12 @@ private:
int _startHour;
int _endHour;
Common::Point _stdPal[91][17];
- t_pcga _cgaPal[91];
+ CgaPalette _cgaPal[91];
- int _c_zzz;
- int _ment;
- int _iouv;
- int _dobj;
+ int _x26KeyCount;
+ int _roomDoorId;
+ int _openObjCount;
+ int _takeObjCount;
int _num;
int _cs;
int _prebru;