aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2013-07-23 10:44:33 +0200
committerStrangerke2013-07-23 10:44:33 +0200
commitbe886b4e380a20aa6e3d06c98142bc4d0f604103 (patch)
treea203d1717a8b5274bf5f19b23f4388006d869607 /engines
parentde3566e82e4cf0db2e05c538bc3793389ad14e40 (diff)
downloadscummvm-rg350-be886b4e380a20aa6e3d06c98142bc4d0f604103.tar.gz
scummvm-rg350-be886b4e380a20aa6e3d06c98142bc4d0f604103.tar.bz2
scummvm-rg350-be886b4e380a20aa6e3d06c98142bc4d0f604103.zip
MORTEVIELLE: Improve question cheat in debugger
Diffstat (limited to 'engines')
-rw-r--r--engines/mortevielle/debugger.cpp5
-rw-r--r--engines/mortevielle/mortevielle.h4
-rw-r--r--engines/mortevielle/utils.cpp8
3 files changed, 10 insertions, 7 deletions
diff --git a/engines/mortevielle/debugger.cpp b/engines/mortevielle/debugger.cpp
index 042eb0e224..5e1e33575f 100644
--- a/engines/mortevielle/debugger.cpp
+++ b/engines/mortevielle/debugger.cpp
@@ -38,6 +38,11 @@ bool Debugger::Cmd_showAllQuestions(int argc, const char **argv) {
for (int i = 1; i <= 42; ++i)
_vm->_coreVar._availableQuestion[i] = '*';
+ for (int i = 0; i < 9; i++) {
+ _vm->_nbrep[i] = 0;
+ _vm->_nbrepm[i] = 999;
+ }
+
return true;
}
diff --git a/engines/mortevielle/mortevielle.h b/engines/mortevielle/mortevielle.h
index 04ecd56ea5..c198b246ba 100644
--- a/engines/mortevielle/mortevielle.h
+++ b/engines/mortevielle/mortevielle.h
@@ -285,8 +285,6 @@ private:
byte *_cfiecBuffer;
int _cfiecBufferSize;
int _openObjects[8];
- int _nbrep[9];
- int _nbrepm[9];
uint16 _dialogIndexArray[kMaxDialogIndex + 1];
Hint _dialogHintArray[kMaxDialogHint + 1];
@@ -471,6 +469,8 @@ 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 c9b40c475f..e07623bdb7 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -2300,13 +2300,11 @@ void MortevielleEngine::prepareRoom() {
updateHour(day, hour, minute);
if (day != _day) {
_day = day;
- int i = 0;
- do {
- ++i;
- if (_nbrepm[i] != 0)
+ for (int i = 0; i < 9; i++) {
+ if (_nbrepm[i] > 0)
--_nbrepm[i];
_nbrep[i] = 0;
- } while (i != 8);
+ }
}
if ((hour > _hour) || ((hour == 0) && (_hour == 23))) {
_hour = hour;