Skip to content

Commit

Permalink
PINK: Again small fix for ActionLoop
Browse files Browse the repository at this point in the history
  • Loading branch information
whitertandrek authored and sev- committed Jun 28, 2018
1 parent 05992bf commit 74437ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions engines/pink/archive.cpp
Expand Up @@ -297,6 +297,10 @@ uint32 Archive::readDWORD() {
return _file.readUint32LE();
}

uint16 Archive::readWORD() {
return _file.readUint16LE();
}

} // End of namespace Pink


7 changes: 7 additions & 0 deletions engines/pink/archive.h
Expand Up @@ -43,6 +43,8 @@ class Archive {

int readCount();
uint32 readDWORD();
uint16 readWORD();

Object *readObject();
Common::String readString();

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion engines/pink/objects/actions/action_loop.cpp
Expand Up @@ -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:
Expand Down

0 comments on commit 74437ee

Please sign in to comment.