aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/messages.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2014-01-04 15:15:05 +0200
committerEugene Sandulenko2014-01-04 15:15:05 +0200
commit0745e61e70ae37a9c10448ad2c96d9e632c8ee58 (patch)
tree9f30068b93343688fff06e5486015b69117dff3f /engines/fullpipe/messages.cpp
parenta230368de597e291ac4321fc77e3a6b5ffaafc12 (diff)
downloadscummvm-rg350-0745e61e70ae37a9c10448ad2c96d9e632c8ee58.tar.gz
scummvm-rg350-0745e61e70ae37a9c10448ad2c96d9e632c8ee58.tar.bz2
scummvm-rg350-0745e61e70ae37a9c10448ad2c96d9e632c8ee58.zip
FULLPIPE: Implement ExCommand2 methods
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r--engines/fullpipe/messages.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 7db168d92d..dcca925226 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -145,18 +145,34 @@ void ExCommand::firef34() {
}
}
-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;
+ExCommand2::ExCommand2(int messageKind, int parentId, const Common::Point **points, int pointsSize) : ExCommand(parentId, messageKind, 0, 0, 0, 0, 1, 0, 0, 0) {
_objtype = kObjTypeExCommand2;
- warning("STUB: ExCommand2::ExCommand2()");
+ _pointsSize = pointsSize;
+ _points = (Common::Point **)malloc(sizeof(Common::Point *) * pointsSize);
+
+ for (int i = 0; i < pointsSize; i++) {
+ _points[i] = new Common::Point;
+
+ *_points[i] = *points[i];
+ }
}
ExCommand2::ExCommand2(ExCommand2 *src) : ExCommand(src) {
- warning("STUB: ExCommand2::ExCommand2()");
+ _pointsSize = src->_pointsSize;
+ _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointsSize);
+
+ for (int i = 0; i < _pointsSize; i++) {
+ _points[i] = new Common::Point;
+
+ *_points[i] = *src->_points[i];
+ }
}
ExCommand2::~ExCommand2() {
+ for (int i = 0; i < _pointsSize; i++)
+ delete _points[i];
+
free(_points);
}