diff options
Diffstat (limited to 'engines/bladerunner/items.cpp')
-rw-r--r-- | engines/bladerunner/items.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/bladerunner/items.cpp b/engines/bladerunner/items.cpp index 0348efc4fe..7fe769cb93 100644 --- a/engines/bladerunner/items.cpp +++ b/engines/bladerunner/items.cpp @@ -23,6 +23,7 @@ #include "bladerunner/items.h" #include "bladerunner/game_constants.h" +#include "bladerunner/savefile.h" #include "bladerunner/scene.h" #include "bladerunner/scene_objects.h" #include "bladerunner/zbuffer.h" @@ -242,4 +243,19 @@ int Items::findItem(int itemId) const { return -1; } +void Items::save(SaveFile &f) { + int size = (int)_items.size(); + + f.write(size); + int i; + for (i = 0; i != size; ++i) { + _items[i]->save(f); + } + + // Always write out 100 items + for (; i != 100; ++i) { + f.padBytes(0x174); // bbox + rect + 18 float fields + } +} + } // End of namespace BladeRunner |