diff options
Diffstat (limited to 'engines/bladerunner/actor_walk.cpp')
-rw-r--r-- | engines/bladerunner/actor_walk.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/bladerunner/actor_walk.cpp b/engines/bladerunner/actor_walk.cpp index 16009aa65b..d376e36785 100644 --- a/engines/bladerunner/actor_walk.cpp +++ b/engines/bladerunner/actor_walk.cpp @@ -28,6 +28,7 @@ #include "bladerunner/game_constants.h" #include "bladerunner/game_info.h" #include "bladerunner/obstacles.h" +#include "bladerunner/savefile.h" #include "bladerunner/scene.h" #include "bladerunner/scene_objects.h" #include "bladerunner/set.h" @@ -238,6 +239,27 @@ void ActorWalk::run(int actorId) { _vm->_actors[actorId]->changeAnimationMode(animationMode, false); } +void ActorWalk::save(SaveFile &f) { + f.write(_walking); + f.write(_running); + f.write(_destination); + // _originalDestination is not saved + f.write(_current); + f.write(_next); + f.write(_facing); + + assert(_nearActors.size() <= 20); + for (Common::HashMap<int, bool>::const_iterator it = _nearActors.begin(); it != _nearActors.end(); ++it) { + f.write(it->_key); + f.write(it->_value); + } + f.padBytes(8 * (20 - _nearActors.size())); + f.write((int)_nearActors.size()); + + f.write(0); // _notUsed + f.write(_status); +} + bool ActorWalk::isXYZEmpty(float x, float y, float z, int actorId) const { if (_vm->_scene->_set->findWalkbox(x, z) == -1) { return true; |