diff options
author | Thomas Fach-Pedersen | 2018-03-17 16:14:48 +0100 |
---|---|---|
committer | Peter Kohaut | 2018-03-24 17:07:06 +0100 |
commit | 2a646f8cc287a98f90e561ce8072c2af4322fd22 (patch) | |
tree | 8511469fd92c125a91c71b246bf122c45b425030 /engines/bladerunner/script | |
parent | a70c59f90d43ce31c548c68416bf0ab5385f15a9 (diff) | |
download | scummvm-rg350-2a646f8cc287a98f90e561ce8072c2af4322fd22.tar.gz scummvm-rg350-2a646f8cc287a98f90e561ce8072c2af4322fd22.tar.bz2 scummvm-rg350-2a646f8cc287a98f90e561ce8072c2af4322fd22.zip |
BLADERUNNER: Save game methods
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r-- | engines/bladerunner/script/ai_script.cpp | 27 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_script.h | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp index c960ff180f..257e323c5b 100644 --- a/engines/bladerunner/script/ai_script.cpp +++ b/engines/bladerunner/script/ai_script.cpp @@ -345,4 +345,31 @@ void AIScripts::fledCombat(int actor) { _inScriptCounter--; } +void AIScripts::setAnimationState(int actor, int animationState, int animationFrame, int animationStateNext, int animationNext) { + if (actor >= _actorCount) { + return; + } + + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->SetAnimationState(animationState, animationFrame, animationStateNext, animationNext); + } + _inScriptCounter--; +} + + +void AIScripts::queryAnimationState(int actor, int *animationState, int *animationFrame, int *animationStateNext, int *nextAnimation) { + if (actor >= _actorCount) { + return; + } + + _inScriptCounter++; + if (_AIScripts[actor]) { + _AIScripts[actor]->FledCombat(); + _AIScripts[actor]->QueryAnimationState(animationState, animationFrame, animationStateNext, nextAnimation); + } + _inScriptCounter--; +} + + } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h index cfd3fe5e1a..5e782d0820 100644 --- a/engines/bladerunner/script/ai_script.h +++ b/engines/bladerunner/script/ai_script.h @@ -566,6 +566,8 @@ public: bool reachedMovementTrackWaypoint(int actor, int waypointId); void updateAnimation(int actor, int *animation, int *frame); void changeAnimationMode(int actor, int mode); + void queryAnimationState(int actor, int *animationState, int *animationFrame, int *animationStateNext, int *nextAnimation); + void setAnimationState(int actor, int animationState, int animationFrame, int animationStateNext, int animationNext); void fledCombat(int actor); bool isInsideScript() const { return _inScriptCounter > 0; } |