aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-26 15:47:12 +0300
committerEugene Sandulenko2013-09-06 14:51:06 +0300
commit4dc3481ec1c8ff5cabdf9000e5d62a6d79537f9b (patch)
treec4bd9dd185f1263aa62656ef86324d911a0e0e60
parent67bbf26ecd546d59304ec437125508eb70aab9a1 (diff)
downloadscummvm-rg350-4dc3481ec1c8ff5cabdf9000e5d62a6d79537f9b.tar.gz
scummvm-rg350-4dc3481ec1c8ff5cabdf9000e5d62a6d79537f9b.tar.bz2
scummvm-rg350-4dc3481ec1c8ff5cabdf9000e5d62a6d79537f9b.zip
FULLPIPE: Moved Messge class to messages.cpp
-rw-r--r--engines/fullpipe/gameloader.h1
-rw-r--r--engines/fullpipe/messages.cpp92
-rw-r--r--engines/fullpipe/messages.h45
-rw-r--r--engines/fullpipe/objects.h45
-rw-r--r--engines/fullpipe/stateloader.cpp92
-rw-r--r--engines/fullpipe/statics.h2
6 files changed, 140 insertions, 137 deletions
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index 3a96a53d6f..fa1bb33b7c 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -25,6 +25,7 @@
#include "fullpipe/objects.h"
#include "fullpipe/inventory.h"
+#include "fullpipe/messages.h"
namespace Fullpipe {
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 7f5f3b4fd8..6b07a4ef69 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -27,6 +27,98 @@
namespace Fullpipe {
+ExCommand::ExCommand() {
+ _field_3C = 1;
+ _messageNum = 0;
+ _excFlags = 0;
+ _parId = 0;
+}
+
+ExCommand::ExCommand(ExCommand *src) : Message(src) {
+ _field_3C = 1;
+ _messageNum = src->_messageNum;
+ _excFlags = src->_excFlags;
+ _parId = src->_parId;
+
+}
+
+bool ExCommand::load(MfcArchive &file) {
+ debug(5, "ExCommand::load()");
+
+ _parentId = file.readUint16LE();
+ _messageKind = file.readUint32LE();
+ _x = file.readUint32LE();
+ _y = file.readUint32LE();
+ _field_14 = file.readUint32LE();
+ _sceneClickX = file.readUint32LE();
+ _sceneClickY = file.readUint32LE();
+ _field_20 = file.readUint32LE();
+ _field_24 = file.readUint32LE();
+ _param28 = file.readUint32LE();
+ _field_2C = file.readUint32LE();
+ _field_30 = file.readUint32LE();
+ _field_34 = file.readUint32LE();
+
+ _messageNum = file.readUint32LE();
+
+ _field_3C = 0;
+
+ if (g_fullpipe->_gameProjectVersion >= 12) {
+ _excFlags = file.readUint32LE();
+ _parId = file.readUint32LE();
+ }
+
+ return true;
+}
+
+Message::Message() {
+ _messageKind = 0;
+ _parentId = 0;
+ _x = 0;
+ _y = 0;
+ _field_14 = 0;
+ _sceneClickX = 0;
+ _sceneClickY = 0;
+ _field_20 = 0;
+ _field_24 = 0;
+ _param28 = 0;
+ _field_2C = 0;
+ _field_30 = 0;
+ _field_34 = 0;
+}
+
+Message::Message(Message *src) {
+ _parentId = src->_parentId;
+ _messageKind = src->_messageKind;
+ _x = src->_x;
+ _y = src->_y;
+ _field_14 = src->_field_14;
+ _sceneClickX = src->_sceneClickX;
+ _sceneClickY = src->_sceneClickY;
+ _field_20 = src->_field_20;
+ _field_24 = src->_field_24;
+ _param28 = src->_param28;
+ _field_2C = src->_field_2C;
+ _field_30 = src->_field_30;
+ _field_34 = src->_field_34;
+}
+
+CObjstateCommand::CObjstateCommand() {
+ _value = 0;
+}
+
+bool CObjstateCommand::load(MfcArchive &file) {
+ debug(5, "CObjStateCommand::load()");
+
+ _cmd.load(file);
+
+ _value = file.readUint32LE();
+
+ _objCommandName = file.readPascalString();
+
+ return true;
+}
+
MessageQueue::MessageQueue() {
_field_14 = 0;
_parId = 0;
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index b47bf49049..97e416426b 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -31,6 +31,51 @@
namespace Fullpipe {
+class Message : public CObject {
+ public:
+ int _messageKind;
+ int16 _parentId;
+ int _x;
+ int _y;
+ int _field_14;
+ int _sceneClickX;
+ int _sceneClickY;
+ int _field_20;
+ int _field_24;
+ int _param28;
+ int _field_2C;
+ int _field_30;
+ int _field_34;
+
+ public:
+ Message();
+ Message(Message *src);
+};
+
+class ExCommand : public Message {
+ int _messageNum;
+ int _field_3C;
+ int _excFlags;
+ int _parId;
+
+ public:
+ ExCommand();
+ ExCommand(ExCommand *src);
+ virtual ~ExCommand() {}
+
+ virtual bool load(MfcArchive &file);
+};
+
+class CObjstateCommand : public CObject {
+ ExCommand _cmd;
+ char *_objCommandName;
+ int _value;
+
+ public:
+ CObjstateCommand();
+ virtual bool load(MfcArchive &file);
+};
+
class MessageQueue : public CObject {
friend class GlobalMessageQueueList;
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index 9acedc98e0..cc6fef581c 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -143,41 +143,6 @@ union VarValue {
char *stringValue;
};
-class Message : public CObject {
- public:
- int _messageKind;
- int16 _parentId;
- int _x;
- int _y;
- int _field_14;
- int _sceneClickX;
- int _sceneClickY;
- int _field_20;
- int _field_24;
- int _param28;
- int _field_2C;
- int _field_30;
- int _field_34;
-
- public:
- Message();
- Message(Message *src);
-};
-
-class ExCommand : public Message {
- int _messageNum;
- int _field_3C;
- int _excFlags;
- int _parId;
-
- public:
- ExCommand();
- ExCommand(ExCommand *src);
- virtual ~ExCommand() {}
-
- virtual bool load(MfcArchive &file);
-};
-
class CGameVar : public CObject {
public:
CGameVar *_nextVarObj;
@@ -212,16 +177,6 @@ class PreloadItems : public Common::Array<PreloadItem>, public CObject {
virtual bool load(MfcArchive &file);
};
-class CObjstateCommand : public CObject {
- ExCommand _cmd;
- char *_objCommandName;
- 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 c1da2d5997..00d46198d9 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -210,98 +210,6 @@ bool CInteraction::load(MfcArchive &file) {
return true;
}
-ExCommand::ExCommand() {
- _field_3C = 1;
- _messageNum = 0;
- _excFlags = 0;
- _parId = 0;
-}
-
-ExCommand::ExCommand(ExCommand *src) : Message(src) {
- _field_3C = 1;
- _messageNum = src->_messageNum;
- _excFlags = src->_excFlags;
- _parId = src->_parId;
-
-}
-
-bool ExCommand::load(MfcArchive &file) {
- debug(5, "ExCommand::load()");
-
- _parentId = file.readUint16LE();
- _messageKind = file.readUint32LE();
- _x = file.readUint32LE();
- _y = file.readUint32LE();
- _field_14 = file.readUint32LE();
- _sceneClickX = file.readUint32LE();
- _sceneClickY = file.readUint32LE();
- _field_20 = file.readUint32LE();
- _field_24 = file.readUint32LE();
- _param28 = file.readUint32LE();
- _field_2C = file.readUint32LE();
- _field_30 = file.readUint32LE();
- _field_34 = file.readUint32LE();
-
- _messageNum = file.readUint32LE();
-
- _field_3C = 0;
-
- if (g_fullpipe->_gameProjectVersion >= 12) {
- _excFlags = file.readUint32LE();
- _parId = file.readUint32LE();
- }
-
- return true;
-}
-
-Message::Message() {
- _messageKind = 0;
- _parentId = 0;
- _x = 0;
- _y = 0;
- _field_14 = 0;
- _sceneClickX = 0;
- _sceneClickY = 0;
- _field_20 = 0;
- _field_24 = 0;
- _param28 = 0;
- _field_2C = 0;
- _field_30 = 0;
- _field_34 = 0;
-}
-
-Message::Message(Message *src) {
- _parentId = src->_parentId;
- _messageKind = src->_messageKind;
- _x = src->_x;
- _y = src->_y;
- _field_14 = src->_field_14;
- _sceneClickX = src->_sceneClickX;
- _sceneClickY = src->_sceneClickY;
- _field_20 = src->_field_20;
- _field_24 = src->_field_24;
- _param28 = src->_param28;
- _field_2C = src->_field_2C;
- _field_30 = src->_field_30;
- _field_34 = src->_field_34;
-}
-
-CObjstateCommand::CObjstateCommand() {
- _value = 0;
-}
-
-bool CObjstateCommand::load(MfcArchive &file) {
- debug(5, "CObjStateCommand::load()");
-
- _cmd.load(file);
-
- _value = file.readUint32LE();
-
- _objCommandName = file.readPascalString();
-
- return true;
-}
-
bool PreloadItems::load(MfcArchive &file) {
debug(5, "PreloadItems::load()");
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index 128f0f522e..83bdc73e8c 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -27,6 +27,8 @@
namespace Fullpipe {
+class ExCommand;
+
class CStepArray : public CObject {
int _currPointIndex;
Common::Point **_points;