diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/messages.cpp | 49 | ||||
-rw-r--r-- | engines/fullpipe/messages.h | 12 | ||||
-rw-r--r-- | engines/fullpipe/motion.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/statics.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/utils.h | 2 |
5 files changed, 65 insertions, 2 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; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 30ded96f08..d03cb77334 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -57,7 +57,6 @@ class Message : public CObject { class ExCommand : public Message { public: - int _messageNum; int _field_3C; int _excFlags; @@ -70,16 +69,27 @@ class ExCommand : public Message { virtual bool load(MfcArchive &file); + virtual ExCommand *createClone(ExCommand *src); + bool handleMessage(); void sendMessage(); void postMessage(); void handle(); + + void firef34(); + void setf3c(int val); }; class ExCommand2 : public ExCommand { public: Common::Point **_points; int _pointsSize; + + ExCommand2(int messageKind, int parentId, const Common::Point *points, int pointsSize); + ExCommand2(ExCommand2 *src); + virtual ~ExCommand2(); + + virtual ExCommand *createClone(ExCommand *src); }; class ObjstateCommand : public CObject { diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 570ab67e20..960ff45904 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -1907,7 +1907,7 @@ Common::Point *MGM::calcLength(Common::Point *point, Movement *mov, int x, int y } ExCommand2 *MGM::buildExCommand2(Movement *mov, int objId, int x1, int y1, int *x2, int *y2, int len) { - ExCommand2 *ex2 = new ExCommand2; + ExCommand2 *ex2 = new ExCommand2(20, objId, 0, 0); warning("STUB: MGM::buildExCommand2()"); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index e7bc2b9ba6..1c3d11ac54 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1923,6 +1923,8 @@ bool StaticPhase::load(MfcArchive &file) { assert (g_fp->_gameProjectVersion >= 12); + warning("StaticPhase::load(): Code continues here"); + return true; } diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 427cd67963..5714fd3b4c 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -66,6 +66,8 @@ class MfcArchive : public Common::SeekableReadStream { enum ObjType { kObjTypeDefault, + kObjTypeExCommand, + kObjTypeExCommand2, kObjTypeMovGraph, kObjTypeMovGraphLink, kObjTypeMovGraphNode, |