diff options
author | Johannes Schickel | 2007-07-08 12:50:24 +0000 |
---|---|---|
committer | Johannes Schickel | 2007-07-08 12:50:24 +0000 |
commit | c6c06a922e25a09ad78508ba476bf18cfa16c10f (patch) | |
tree | 0cebccb50e43bb6db891ff54db57d0edec97a993 | |
parent | 373cadce5b5f4e58d77e366f5e4ef7f00ec1394d (diff) | |
download | scummvm-rg350-c6c06a922e25a09ad78508ba476bf18cfa16c10f.tar.gz scummvm-rg350-c6c06a922e25a09ad78508ba476bf18cfa16c10f.tar.bz2 scummvm-rg350-c6c06a922e25a09ad78508ba476bf18cfa16c10f.zip |
Little renaming.
svn-id: r27963
-rw-r--r-- | engines/kyra/gui.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 24 | ||||
-rw-r--r-- | engines/kyra/scene.cpp | 10 | ||||
-rw-r--r-- | engines/kyra/script.cpp | 12 | ||||
-rw-r--r-- | engines/kyra/script.h | 10 | ||||
-rw-r--r-- | engines/kyra/script_v1.cpp | 4 |
6 files changed, 33 insertions, 33 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 8cafb54fb8..6fc347158f 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -230,14 +230,14 @@ int KyraEngine::buttonAmuletCallback(Button *caller) { drawJewelsFadeOutEnd(jewel); _scriptInterpreter->initScript(_scriptClick, _scriptClickData); - _scriptClick->variables[3] = 0; - _scriptClick->variables[6] = jewel; + _scriptClick->regs[3] = 0; + _scriptClick->regs[6] = jewel; _scriptInterpreter->startScript(_scriptClick, 4); while (_scriptInterpreter->validScript(_scriptClick)) _scriptInterpreter->runScript(_scriptClick); - if (_scriptClick->variables[3]) + if (_scriptClick->regs[3]) return 1; _unkAmuletVar = 1; diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 249a5f6c21..1664ce144f 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -923,16 +923,16 @@ int KyraEngine::processInputHelper(int xpos, int ypos) { int KyraEngine::clickEventHandler(int xpos, int ypos) { debugC(9, kDebugLevelMain, "KyraEngine::clickEventHandler(%d, %d)", xpos, ypos); _scriptInterpreter->initScript(_scriptClick, _scriptClickData); - _scriptClick->variables[1] = xpos; - _scriptClick->variables[2] = ypos; - _scriptClick->variables[3] = 0; - _scriptClick->variables[4] = _itemInHand; + _scriptClick->regs[1] = xpos; + _scriptClick->regs[2] = ypos; + _scriptClick->regs[3] = 0; + _scriptClick->regs[4] = _itemInHand; _scriptInterpreter->startScript(_scriptClick, 1); while (_scriptInterpreter->validScript(_scriptClick)) _scriptInterpreter->runScript(_scriptClick); - return _scriptClick->variables[3]; + return _scriptClick->regs[3]; } void KyraEngine::updateMousePointer(bool forceUpdate) { @@ -1068,10 +1068,10 @@ void KyraEngine::clickEventHandler2() { Common::Point mouse = getMousePos(); _scriptInterpreter->initScript(_scriptClick, _scriptClickData); - _scriptClick->variables[0] = _currentCharacter->sceneId; - _scriptClick->variables[1] = mouse.x; - _scriptClick->variables[2] = mouse.y; - _scriptClick->variables[4] = _itemInHand; + _scriptClick->regs[0] = _currentCharacter->sceneId; + _scriptClick->regs[1] = mouse.x; + _scriptClick->regs[2] = mouse.y; + _scriptClick->regs[4] = _itemInHand; _scriptInterpreter->startScript(_scriptClick, 6); while (_scriptInterpreter->validScript(_scriptClick)) @@ -1132,9 +1132,9 @@ void KyraEngine::runNpcScript(int func) { debugC(9, kDebugLevelMain, "KyraEngine::runNpcScript(%d)", func); _scriptInterpreter->initScript(_npcScript, _npcScriptData); _scriptInterpreter->startScript(_npcScript, func); - _npcScript->variables[0] = _currentCharacter->sceneId; - _npcScript->variables[4] = _itemInHand; - _npcScript->variables[5] = func; + _npcScript->regs[0] = _currentCharacter->sceneId; + _npcScript->regs[4] = _itemInHand; + _npcScript->regs[5] = func; while (_scriptInterpreter->validScript(_npcScript)) _scriptInterpreter->runScript(_npcScript); diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp index 2ba1870fcd..a92fd9ce7c 100644 --- a/engines/kyra/scene.cpp +++ b/engines/kyra/scene.cpp @@ -450,8 +450,8 @@ void KyraEngine::startSceneScript(int brandonAlive) { _scriptInterpreter->unloadScript(_scriptClickData); _scriptInterpreter->loadScript(fileNameBuffer, _scriptClickData, &_opcodes); _scriptInterpreter->startScript(_scriptClick, 0); - _scriptClick->variables[0] = _currentCharacter->sceneId; - _scriptClick->variables[7] = brandonAlive; + _scriptClick->regs[0] = _currentCharacter->sceneId; + _scriptClick->regs[7] = brandonAlive; while (_scriptInterpreter->validScript(_scriptClick)) _scriptInterpreter->runScript(_scriptClick); @@ -620,8 +620,8 @@ void KyraEngine::initSceneData(int facing, int unk1, int brandonAlive) { if (unk1 && brandonAlive == 0) moveCharacterToPos(0, facing, xpos2, ypos2); - _scriptClick->variables[4] = _itemInHand; - _scriptClick->variables[7] = brandonAlive; + _scriptClick->regs[4] = _itemInHand; + _scriptClick->regs[7] = brandonAlive; _scriptInterpreter->startScript(_scriptClick, 3); while (_scriptInterpreter->validScript(_scriptClick)) _scriptInterpreter->runScript(_scriptClick); @@ -852,7 +852,7 @@ void KyraEngine::initSceneScreen(int brandonAlive) { if (!_scriptInterpreter->startScript(_scriptClick, 2)) error("Could not start script function 2 of scene script"); - _scriptClick->variables[7] = brandonAlive; + _scriptClick->regs[7] = brandonAlive; while (_scriptInterpreter->validScript(_scriptClick)) _scriptInterpreter->runScript(_scriptClick); diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp index c2ec984d5c..b43cd3b471 100644 --- a/engines/kyra/script.cpp +++ b/engines/kyra/script.cpp @@ -49,12 +49,12 @@ ScriptHelper::ScriptHelper(KyraEngine *vm) : _vm(vm) { COMMAND(c1_push), // 0x04 COMMAND(c1_push), - COMMAND(c1_pushVar), + COMMAND(c1_pushReg), COMMAND(c1_pushBPNeg), COMMAND(c1_pushBPAdd), // 0x08 COMMAND(c1_popRetOrPos), - COMMAND(c1_popVar), + COMMAND(c1_popReg), COMMAND(c1_popBPNeg), COMMAND(c1_popBPAdd), // 0x0C @@ -324,8 +324,8 @@ void ScriptHelper::c1_push(ScriptState* script) { script->stack[--script->sp] = _parameter; } -void ScriptHelper::c1_pushVar(ScriptState* script) { - script->stack[--script->sp] = script->variables[_parameter]; +void ScriptHelper::c1_pushReg(ScriptState* script) { + script->stack[--script->sp] = script->regs[_parameter]; } void ScriptHelper::c1_pushBPNeg(ScriptState* script) { @@ -359,8 +359,8 @@ void ScriptHelper::c1_popRetOrPos(ScriptState* script) { } } -void ScriptHelper::c1_popVar(ScriptState* script) { - script->variables[_parameter] = script->stack[script->sp++]; +void ScriptHelper::c1_popReg(ScriptState* script) { + script->regs[_parameter] = script->stack[script->sp++]; } void ScriptHelper::c1_popBPNeg(ScriptState* script) { diff --git a/engines/kyra/script.h b/engines/kyra/script.h index dfca7700a1..5e43039110 100644 --- a/engines/kyra/script.h +++ b/engines/kyra/script.h @@ -70,8 +70,8 @@ struct ScriptState { int16 retValue; uint16 bp; uint16 sp; - int16 variables[30]; - int16 stack[61]; + int16 regs[30]; // VM registers + int16 stack[61]; // VM stack }; class ScriptHelper { @@ -99,7 +99,7 @@ protected: typedef void (ScriptHelper::*CommandProc)(ScriptState*); struct CommandEntry { CommandProc proc; - const char* desc; + const char *desc; }; const CommandEntry *_commands; @@ -109,11 +109,11 @@ private: void c1_pushRetOrPos(ScriptState*); void c1_push(ScriptState*); //void c1_push(); same as 03 - void c1_pushVar(ScriptState*); + void c1_pushReg(ScriptState*); void c1_pushBPNeg(ScriptState*); void c1_pushBPAdd(ScriptState*); void c1_popRetOrPos(ScriptState*); - void c1_popVar(ScriptState*); + void c1_popReg(ScriptState*); void c1_popBPNeg(ScriptState*); void c1_popBPAdd(ScriptState*); void c1_addSP(ScriptState*); diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 8e604b972b..87123222fb 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -1379,8 +1379,8 @@ int KyraEngine_v1::o1_waitForConfirmationMouseClick(ScriptState *script) { processButtonList(_buttonList); _skipFlag = false; Common::Point mouse = getMousePos(); - script->variables[1] = mouse.x; - script->variables[2] = mouse.y; + script->regs[1] = mouse.x; + script->regs[2] = mouse.y; return 0; } |