diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/pet_control/pet_glyphs.h | 2 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms.cpp | 9 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.cpp | 14 | ||||
-rw-r--r-- | engines/titanic/pet_control/pet_rooms_glyphs.h | 10 |
4 files changed, 30 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_glyphs.h b/engines/titanic/pet_control/pet_glyphs.h index 12f66870c6..0163f39a7e 100644 --- a/engines/titanic/pet_control/pet_glyphs.h +++ b/engines/titanic/pet_control/pet_glyphs.h @@ -193,7 +193,7 @@ public: */ virtual void getTooltip(CPetText *text) {} - virtual void proc32() {} + virtual void save2(SimpleFile *file, int indent) {} virtual int proc33() { return 1; } virtual int proc34() { return 1; } diff --git a/engines/titanic/pet_control/pet_rooms.cpp b/engines/titanic/pet_control/pet_rooms.cpp index 71fa01ee77..0a403e66d6 100644 --- a/engines/titanic/pet_control/pet_rooms.cpp +++ b/engines/titanic/pet_control/pet_rooms.cpp @@ -134,7 +134,14 @@ void CPetRooms::postLoad() { } void CPetRooms::save(SimpleFile *file, int indent) const { - warning("TODO: CPetRooms::save"); + _glyphs.save(file, indent); + _glyphItem.save2(file, indent); + file->writeNumberLine(_field1C0, indent); + file->writeNumberLine(_field1C4, indent); + file->writeNumberLine(_field1C8, indent); + file->writeNumberLine(_field1CC, indent); + file->writeNumberLine(_field1D0, indent); + file->writeNumberLine(_field1D4, indent); } void CPetRooms::enter(PetArea oldArea) { diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp index c45e0389ce..6b762d890b 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp +++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp @@ -72,8 +72,9 @@ int CPetRoomsGlyph::proc29(const Point &pt) { return 0; } -void CPetRoomsGlyph::proc32() { - +void CPetRoomsGlyph::save2(SimpleFile *file, int indent) const { + file->writeNumberLine(_field34, indent); + file->writeNumberLine(_field3C, indent); } int CPetRoomsGlyph::proc33() { @@ -84,4 +85,13 @@ void CPetRoomsGlyph::proc39() { } +/*------------------------------------------------------------------------*/ + +void CPetRoomsGlyphs::save(SimpleFile *file, int indent) const { + file->writeNumberLine(size(), indent); + + for (const_iterator i = begin(); i != end(); ++i) + (*i)->save2(file, indent); +} + } // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.h b/engines/titanic/pet_control/pet_rooms_glyphs.h index d08be131c8..2e8ede2287 100644 --- a/engines/titanic/pet_control/pet_rooms_glyphs.h +++ b/engines/titanic/pet_control/pet_rooms_glyphs.h @@ -68,12 +68,20 @@ public: virtual void proc28(const Point &pt); virtual int proc29(const Point &pt); - virtual void proc32(); + + virtual void save2(SimpleFile *file, int indent) const; + virtual int proc33(); + virtual void proc39(); }; class CPetRoomsGlyphs : public CPetGlyphs { +public: + /** + * Save the list + */ + void save(SimpleFile *file, int indent) const; }; } // End of namespace Titanic |