diff options
author | Strangerke | 2013-07-23 10:51:42 +0200 |
---|---|---|
committer | Strangerke | 2013-07-23 10:51:42 +0200 |
commit | 95ade596a1104e12171df58031bdb88391f2518e (patch) | |
tree | 2a9e9424a8c649105a2bc0b6943da5df9ed5d839 /engines | |
parent | be886b4e380a20aa6e3d06c98142bc4d0f604103 (diff) | |
download | scummvm-rg350-95ade596a1104e12171df58031bdb88391f2518e.tar.gz scummvm-rg350-95ade596a1104e12171df58031bdb88391f2518e.tar.bz2 scummvm-rg350-95ade596a1104e12171df58031bdb88391f2518e.zip |
MORTEVIELLE: Renaming fields and functions related to the number of answers per character
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mortevielle/actions.cpp | 4 | ||||
-rw-r--r-- | engines/mortevielle/debugger.cpp | 4 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 2 | ||||
-rw-r--r-- | engines/mortevielle/mortevielle.h | 6 | ||||
-rw-r--r-- | engines/mortevielle/utils.cpp | 20 |
5 files changed, 20 insertions, 16 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index 0d2d8b4d1c..9a29bbfd29 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -1484,10 +1484,10 @@ void MortevielleEngine::fctDiscuss() { displId = 138; _coreVar._faithScore += (3 * (_coreVar._faithScore / 10)); } - } else if (_nbrep[_caff - 69] < _nbrepm[_caff - 69]) { + } else if (_charAnswerCount[_caff - 69] < _charAnswerMax[_caff - 69]) { displId = _tabdon[kArep + (ix << 3) + (_caff - 70)]; _coreVar._faithScore += _tabdon[kArcf + ix]; - ++_nbrep[_caff - 69]; + ++_charAnswerCount[_caff - 69]; } else { _coreVar._faithScore += 3; displId = 139; diff --git a/engines/mortevielle/debugger.cpp b/engines/mortevielle/debugger.cpp index 5e1e33575f..4ef5151c81 100644 --- a/engines/mortevielle/debugger.cpp +++ b/engines/mortevielle/debugger.cpp @@ -39,8 +39,8 @@ bool Debugger::Cmd_showAllQuestions(int argc, const char **argv) { _vm->_coreVar._availableQuestion[i] = '*'; for (int i = 0; i < 9; i++) { - _vm->_nbrep[i] = 0; - _vm->_nbrepm[i] = 999; + _vm->_charAnswerCount[i] = 0; + _vm->_charAnswerMax[i] = 999; } return true; diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 3a839a23da..c13eba4a4a 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -206,7 +206,7 @@ Common::ErrorCode MortevielleEngine::initialize() { loadCFIEC(); decodeNumber(&_cfiecBuffer[161 * 16], (_cfiecBufferSize - (161 * 16)) / 64); _x26KeyCount = 1; - init_nbrepm(); + initMaxAnswer(); initMouse(); loadPlaces(); diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h index c198b246ba..45a06144cd 100644 --- a/engines/mortevielle/mortevielle.h +++ b/engines/mortevielle/mortevielle.h @@ -443,7 +443,7 @@ private: void premtet(); void ajchai(); void ecr2(Common::String text); - void init_nbrepm(); + void initMaxAnswer(); void aniof(int ouf, int num); void tlu(int af, int ob); void mennor(); @@ -456,6 +456,8 @@ public: int _currMenu; int _currAction; int _drawingSizeArr[108]; + int _charAnswerCount[9]; + int _charAnswerMax[9]; byte _tabdon[4001]; bool _soundOff; bool _blo; @@ -469,8 +471,6 @@ public: int _key; SaveStruct _coreVar, _saveStruct; - int _nbrep[9]; - int _nbrepm[9]; int _maff; int _caff; int _crep; diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp index e07623bdb7..094e1020d1 100644 --- a/engines/mortevielle/utils.cpp +++ b/engines/mortevielle/utils.cpp @@ -1983,9 +1983,9 @@ void MortevielleEngine::resetVariables() { _coreVar._availableQuestion[33] = '*'; for (int i = 1; i <= 8; ++i) - _nbrep[i] = 0; + _charAnswerCount[i] = 0; - init_nbrepm(); + initMaxAnswer(); } /** @@ -2301,9 +2301,9 @@ void MortevielleEngine::prepareRoom() { if (day != _day) { _day = day; for (int i = 0; i < 9; i++) { - if (_nbrepm[i] > 0) - --_nbrepm[i]; - _nbrep[i] = 0; + if (_charAnswerMax[i] > 0) + --_charAnswerMax[i]; + _charAnswerCount[i] = 0; } } if ((hour > _hour) || ((hour == 0) && (_hour == 23))) { @@ -2879,11 +2879,15 @@ void MortevielleEngine::setPresenceFlags(int roomId) { _room9PresenceLeo = true; } -void MortevielleEngine::init_nbrepm() { - static const byte ipm[9] = { 0, 4, 5, 6, 7, 5, 6, 5, 8 }; +/** + * Initialize max answers per character + * @remarks Originally called 'init_nbrepm' + */ +void MortevielleEngine::initMaxAnswer() { + static const byte maxAnswer[9] = { 0, 4, 5, 6, 7, 5, 6, 5, 8 }; for (int idx = 0; idx < 9; ++idx) - _nbrepm[idx] = ipm[idx]; + _charAnswerMax[idx] = maxAnswer[idx]; } void MortevielleEngine::phaz(int &rand, int &p, int cf) { |