diff options
author | Torbjörn Andersson | 2013-05-01 07:47:56 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2013-05-01 07:47:56 +0200 |
commit | ce79ff4f2e53fa577a0c221de6423561e827cab2 (patch) | |
tree | 49b14153bf40cebac3052ea6731c740053dd435a /engines/scumm | |
parent | f70087dc90255166e9cd8cf38b80d34a3a4e6494 (diff) | |
download | scummvm-rg350-ce79ff4f2e53fa577a0c221de6423561e827cab2.tar.gz scummvm-rg350-ce79ff4f2e53fa577a0c221de6423561e827cab2.tar.bz2 scummvm-rg350-ce79ff4f2e53fa577a0c221de6423561e827cab2.zip |
SCUMM: Change NUM_SCRIPT_LOCALS to NUM_SCRIPT_LOCAL
For consistency with NUM_SCRIPT_SLOT.
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/script.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/script.h | 4 | ||||
-rw-r--r-- | engines/scumm/script_v5.cpp | 14 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 96c55146fd..c8eabdd61c 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -140,10 +140,10 @@ void ScummEngine::runObjectScript(int object, int entry, bool freezeResistant, b void ScummEngine::initializeLocals(int slot, int *vars) { int i; if (!vars) { - for (i = 0; i < NUM_SCRIPT_LOCALS; i++) + for (i = 0; i < NUM_SCRIPT_LOCAL; i++) vm.localvar[slot][i] = 0; } else { - for (i = 0; i < NUM_SCRIPT_LOCALS; i++) + for (i = 0; i < NUM_SCRIPT_LOCAL; i++) vm.localvar[slot][i] = vars[i]; } } @@ -761,7 +761,7 @@ void ScummEngine::runInventoryScript(int i) { if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) { inventoryScriptIndy3Mac(); } else { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; memset(args, 0, sizeof(args)); args[0] = i; runScript(VAR(VAR_INVENTORY_SCRIPT), 0, 0, args); @@ -1062,7 +1062,7 @@ void ScummEngine::doSentence(int verb, int objectA, int objectB) { void ScummEngine::checkAndRunSentenceScript() { int i; - int localParamList[NUM_SCRIPT_LOCALS]; + int localParamList[NUM_SCRIPT_LOCAL]; const ScriptSlot *ss; int sentenceScript; @@ -1310,7 +1310,7 @@ void ScummEngine_v0::runSentenceScript() { } void ScummEngine_v2::runInputScript(int clickArea, int val, int mode) { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; int verbScript; verbScript = 4; @@ -1334,7 +1334,7 @@ void ScummEngine_v2::runInputScript(int clickArea, int val, int mode) { } void ScummEngine::runInputScript(int clickArea, int val, int mode) { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; int verbScript; verbScript = VAR(VAR_VERB_SCRIPT); @@ -1492,7 +1492,7 @@ void ScummEngine::beginCutscene(int *args) { void ScummEngine::endCutscene() { ScriptSlot *ss = &vm.slot[_currentScript]; - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; if (ss->cutsceneOverride > 0) // Only terminate if active ss->cutsceneOverride--; diff --git a/engines/scumm/script.h b/engines/scumm/script.h index dd7368c196..74ffaaf426 100644 --- a/engines/scumm/script.h +++ b/engines/scumm/script.h @@ -74,7 +74,7 @@ struct OpcodeEntry : Common::NonCopyable { */ enum { NUM_SCRIPT_SLOT = 80, - NUM_SCRIPT_LOCALS = 25 + NUM_SCRIPT_LOCAL = 25 }; /* Script status type (slot.status) */ @@ -125,7 +125,7 @@ struct VirtualMachineState { byte cutSceneStackPointer; ScriptSlot slot[NUM_SCRIPT_SLOT]; // Why does localvar have space for one extra local variable? - int32 localvar[NUM_SCRIPT_SLOT][NUM_SCRIPT_LOCALS + 1]; + int32 localvar[NUM_SCRIPT_SLOT][NUM_SCRIPT_LOCAL + 1]; NestedScript nest[kMaxScriptNesting]; byte numNestedScripts; diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 0d3c2c9107..017f30817b 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -630,7 +630,7 @@ void ScummEngine_v5::o5_breakHere() { } void ScummEngine_v5::o5_chainScript() { - int vars[NUM_SCRIPT_LOCALS]; + int vars[NUM_SCRIPT_LOCAL]; int script; int cur; @@ -663,7 +663,7 @@ void ScummEngine_v5::o5_chainScript() { void ScummEngine_v5::o5_cursorCommand() { int i, j, k; - int table[NUM_SCRIPT_LOCALS]; + int table[NUM_SCRIPT_LOCAL]; switch ((_opcode = fetchScriptByte()) & 0x1F) { case 1: // SO_CURSOR_ON _cursor.state = 1; @@ -736,7 +736,7 @@ void ScummEngine_v5::o5_cursorCommand() { } void ScummEngine_v5::o5_cutscene() { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; getWordVararg(args); beginCutscene(args); } @@ -2083,14 +2083,14 @@ void ScummEngine_v5::o5_isSoundRunning() { } void ScummEngine_v5::o5_soundKludge() { - int items[NUM_SCRIPT_LOCALS]; + int items[NUM_SCRIPT_LOCAL]; int num = getWordVararg(items); _sound->soundKludge(items, num); } void ScummEngine_v5::o5_startObject() { int obj, script; - int data[NUM_SCRIPT_LOCALS]; + int data[NUM_SCRIPT_LOCAL]; obj = getVarOrDirectWord(PARAM_1); script = getVarOrDirectByte(PARAM_2); @@ -2101,7 +2101,7 @@ void ScummEngine_v5::o5_startObject() { void ScummEngine_v5::o5_startScript() { int op, script; - int data[NUM_SCRIPT_LOCALS]; + int data[NUM_SCRIPT_LOCAL]; op = _opcode; script = getVarOrDirectByte(PARAM_1); @@ -2556,7 +2556,7 @@ void ScummEngine_v5::o5_walkActorToObject() { int ScummEngine_v5::getWordVararg(int *ptr) { int i; - for (i = 0; i < NUM_SCRIPT_LOCALS; i++) + for (i = 0; i < NUM_SCRIPT_LOCAL; i++) ptr[i] = 0; i = 0; diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index ee459c07f5..df1c38e1f8 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -2124,7 +2124,7 @@ load_game: // HACK as in game save stuff isn't supported currently if (_game.id == GID_LOOM) { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; uint var; memset(args, 0, sizeof(args)); args[0] = 2; @@ -2512,7 +2512,7 @@ void ScummEngine::restart() { } void ScummEngine::runBootscript() { - int args[NUM_SCRIPT_LOCALS]; + int args[NUM_SCRIPT_LOCAL]; memset(args, 0, sizeof(args)); args[0] = _bootParam; if (_game.id == GID_MANIAC && (_game.features & GF_DEMO)) |