aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/messages.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-04 15:01:27 +0200
committerEugene Sandulenko2014-01-04 15:01:27 +0200
commita230368de597e291ac4321fc77e3a6b5ffaafc12 (patch)
tree6fbefb709fab02e345bc17eb7dd9c3d4f4458546 /engines/fullpipe/messages.cpp
parent37123c16333d6aa9c3dadc3bda4a6a11371a11b1 (diff)
downloadscummvm-rg350-a230368de597e291ac4321fc77e3a6b5ffaafc12.tar.gz
scummvm-rg350-a230368de597e291ac4321fc77e3a6b5ffaafc12.tar.bz2
scummvm-rg350-a230368de597e291ac4321fc77e3a6b5ffaafc12.zip
FULLPIPE: More code to ExCommand class
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r--engines/fullpipe/messages.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index cdb457e59e..7db168d92d 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -41,7 +41,10 @@ ExCommand::ExCommand(ExCommand *src) : Message(src) {
_messageNum = src->_messageNum;
_excFlags = src->_excFlags;
_parId = src->_parId;
+}
+ExCommand *ExCommand::createClone(ExCommand *src) {
+ return new ExCommand(src);
}
ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) :
@@ -78,6 +81,8 @@ bool ExCommand::load(MfcArchive &file) {
_parId = file.readUint32LE();
}
+ _objtype = kObjTypeExCommand;
+
return true;
}
@@ -120,6 +125,50 @@ void ExCommand::handle() {
}
}
+void ExCommand::setf3c(int val) {
+ if (val != -1)
+ _field_3C = val;
+
+ _field_34 = 1;
+}
+
+void ExCommand::firef34() {
+ if (_field_34) {
+ if (_field_3C >= _keyCode) {
+ _field_34 = 0;
+
+ sendMessage();
+
+ if (!_field_30 )
+ setf3c(_field_2C);
+ }
+ }
+}
+
+ExCommand2::ExCommand2(int messageKind, int parentId, const Common::Point *points, int pointsSize) : ExCommand(parentId, messageKind, 0, 0, 0, 0, 1, 0, 0, 0) {
+ _points = 0;
+ _objtype = kObjTypeExCommand2;
+
+ warning("STUB: ExCommand2::ExCommand2()");
+}
+
+ExCommand2::ExCommand2(ExCommand2 *src) : ExCommand(src) {
+ warning("STUB: ExCommand2::ExCommand2()");
+}
+
+ExCommand2::~ExCommand2() {
+ free(_points);
+}
+
+ExCommand *ExCommand2::createClone(ExCommand *src) {
+ if (_objtype == kObjTypeExCommand)
+ return new ExCommand(src);
+ else if (_objtype == kObjTypeExCommand2)
+ return new ExCommand2((ExCommand2 *)src);
+
+ error("ExCommand2::createClone(): Wrong object type: %d", _objtype);
+}
+
Message::Message() {
_messageKind = 0;
_parentId = 0;