diff options
author | Eugene Sandulenko | 2013-06-09 12:51:23 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:48:10 +0300 |
commit | 67d30f29f9e658ce760b8a1a5f413fef4d2d586e (patch) | |
tree | d53a91e6e72f1f8d0bf7dc82b782ee59a7892588 | |
parent | 9395ab11d2020779dd27c7720ef1cb791b030116 (diff) | |
download | scummvm-rg350-67d30f29f9e658ce760b8a1a5f413fef4d2d586e.tar.gz scummvm-rg350-67d30f29f9e658ce760b8a1a5f413fef4d2d586e.tar.bz2 scummvm-rg350-67d30f29f9e658ce760b8a1a5f413fef4d2d586e.zip |
FULLPIPE: Added ObjstateCommand loader
-rw-r--r-- | engines/fullpipe/objects.h | 10 | ||||
-rw-r--r-- | engines/fullpipe/stateloader.cpp | 14 | ||||
-rw-r--r-- | engines/fullpipe/utils.cpp | 6 |
3 files changed, 29 insertions, 1 deletions
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 6b615ffcba..36f6996062 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -396,6 +396,16 @@ class CGameLoader { int _preloadId2; }; +class CObjstateCommand : public CObject { + ExCommand _cmd; + char *_stringObj; + int _value; + + public: + CObjstateCommand(); + virtual bool load(MfcArchive &file); +}; + } // End of namespace Fullpipe #endif /* FULLPIPE_OBJECTS_H */ diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4e54aa3d5d..fe67bf9b7d 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -384,4 +384,18 @@ Message::Message() { _field_34 = 0; } +CObjstateCommand::CObjstateCommand() { + _value = 0; +} + +bool CObjstateCommand::load(MfcArchive &file) { + _cmd.load(file); + + _value = file.readUint32LE(); + + _stringObj = file.readPascalString(); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 36eb86c56e..1c324a020c 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -56,7 +56,8 @@ int MfcArchive::readCount() { enum { kCInteraction = 0, kMessageQueue = 1, - kExCommand = 2 + kExCommand = 2, + kCObjstateCommand = 3 }; const struct { @@ -66,6 +67,7 @@ const struct { { "CInteraction", kCInteraction }, { "MessageQueue", kMessageQueue }, { "ExCommand", kExCommand }, + { "CObjstateCommand", kCObjstateCommand }, { 0, 0 } }; @@ -125,6 +127,8 @@ CObject *MfcArchive::parseClass() { return new MessageQueue(); case kExCommand: return new ExCommand(); + case kCObjstateCommand: + return new CObjstateCommand(); default: error("Unknown objectId: %d", objectId); } |