diff options
author | Martin Kiewitz | 2016-01-31 01:04:53 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-01-31 01:04:53 +0100 |
commit | 428df3e6cb1e3d37c6b596ecd7049c1430905667 (patch) | |
tree | 11aec8931289faef5ac718cd61b59435d6abdaa7 /engines/agi/cycle.cpp | |
parent | 26cb39beeefa03c7d0343b60b058334752527a08 (diff) | |
download | scummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.tar.gz scummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.tar.bz2 scummvm-rg350-428df3e6cb1e3d37c6b596ecd7049c1430905667.zip |
AGI: copying between var + ego screen obj fixed
We copied the wrong way see cycle.cpp
This fixes the fan game 13th disciple. bug #3563
Also cleanup
playercontrol variable is now a boolean
Diffstat (limited to 'engines/agi/cycle.cpp')
-rw-r--r-- | engines/agi/cycle.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 060dcd356c..6b70019082 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -104,7 +104,7 @@ void AgiEngine::newRoom(int16 newRoomNr) { // this was only done in AGI3 if (screenObjEgo->motionType == kMotionEgo) { screenObjEgo->motionType = kMotionNormal; - _game.vars[VM_VAR_EGO_DIRECTION] = 0; + setVar(VM_VAR_EGO_DIRECTION, 0); } } @@ -130,10 +130,10 @@ void AgiEngine::interpretCycle() { ScreenObjEntry *screenObjEgo = &_game.screenObjTable[SCREENOBJECTS_EGO_ENTRY]; int oldSound, oldScore; - if (_game.playerControl) - _game.vars[VM_VAR_EGO_DIRECTION] = screenObjEgo->direction; + if (!_game.playerControl) + setVar(VM_VAR_EGO_DIRECTION, screenObjEgo->direction); else - screenObjEgo->direction = _game.vars[VM_VAR_EGO_DIRECTION]; + screenObjEgo->direction = getVar(VM_VAR_EGO_DIRECTION); checkAllMotions(); @@ -154,7 +154,7 @@ void AgiEngine::interpretCycle() { nonBlockingText_CycleDone(); resetControllers(); - screenObjEgo->direction = _game.vars[VM_VAR_EGO_DIRECTION]; + screenObjEgo->direction = getVar(VM_VAR_EGO_DIRECTION); if (_game.vars[VM_VAR_SCORE] != oldScore || getflag(VM_FLAG_SOUND_ON) != oldSound) _game._vm->_text->statusDraw(); |