diff options
-rw-r--r-- | engines/pink/archive.cpp | 4 | ||||
-rw-r--r-- | engines/pink/archive.h | 7 | ||||
-rw-r--r-- | engines/pink/objects/actions/action_loop.cpp | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/engines/pink/archive.cpp b/engines/pink/archive.cpp index 9e0642050e..031658141b 100644 --- a/engines/pink/archive.cpp +++ b/engines/pink/archive.cpp @@ -297,6 +297,10 @@ uint32 Archive::readDWORD() { return _file.readUint32LE(); } +uint16 Archive::readWORD() { + return _file.readUint16LE(); +} + } // End of namespace Pink diff --git a/engines/pink/archive.h b/engines/pink/archive.h index 906169b373..5e6c091c99 100644 --- a/engines/pink/archive.h +++ b/engines/pink/archive.h @@ -43,6 +43,8 @@ public: int readCount(); uint32 readDWORD(); + uint16 readWORD(); + Object *readObject(); Common::String readString(); @@ -82,6 +84,11 @@ inline Archive &operator>>(Archive &archive, uint32 &num){ return archive; } +inline Archive &operator>>(Archive &archive, uint16 &num){ + num = archive.readWORD(); + return archive; +} + inline Archive &operator>>(Archive &archive, Common::StringArray &array){ uint32 size = archive.readCount(); array.resize(size); diff --git a/engines/pink/objects/actions/action_loop.cpp b/engines/pink/objects/actions/action_loop.cpp index 6ea41100a7..98d95ee139 100644 --- a/engines/pink/objects/actions/action_loop.cpp +++ b/engines/pink/objects/actions/action_loop.cpp @@ -29,7 +29,7 @@ namespace Pink { void ActionLoop::deserialize(Archive &archive) { ActionPlay::deserialize(archive); - uint32 style; + uint16 style; archive >> _intro >> style; switch (style) { case kPingPong: |