diff options
author | Eugene Sandulenko | 2014-04-13 11:32:20 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-04-13 11:33:05 +0300 |
commit | 42f4bb6b1ed04499eba0a15275521bdafcdb2cd5 (patch) | |
tree | 77517870531da2679432e6904928d61aed72e1a3 | |
parent | b2c6483d1a22bcffd0f561f32a868371483c286b (diff) | |
download | scummvm-rg350-42f4bb6b1ed04499eba0a15275521bdafcdb2cd5.tar.gz scummvm-rg350-42f4bb6b1ed04499eba0a15275521bdafcdb2cd5.tar.bz2 scummvm-rg350-42f4bb6b1ed04499eba0a15275521bdafcdb2cd5.zip |
FULLPIPE: Implement StepArray::insertPoints()
-rw-r--r-- | engines/fullpipe/messagehandlers.cpp | 4 | ||||
-rw-r--r-- | engines/fullpipe/statics.cpp | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp index b8e7b5c1db..17af2bf4fd 100644 --- a/engines/fullpipe/messagehandlers.cpp +++ b/engines/fullpipe/messagehandlers.cpp @@ -528,9 +528,9 @@ int global_messageHandler4(ExCommand *cmd) { ExCommand2 *cmd2 = (ExCommand2 *)cmd; if (cmd->_excFlags & 1) { - ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags); + ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags); } else { - ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags); + ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize, flags); } break; } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7e66132664..0b13e539d7 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -106,7 +106,16 @@ bool StepArray::gotoNextPoint() { } void StepArray::insertPoints(Common::Point **points, int pointsCount) { - warning("STUB: StepArray::insertPoints()"); + if (_currPointIndex + pointsCount >= _pointsCount) + realloc(_points, sizeof(Common::Point *) * (_currPointIndex + pointsCount)); + + _maxPointIndex = _currPointIndex + pointsCount; + + for (int i = 0; i < pointsCount; i++) { + _points[_currPointIndex + i] = new Common::Point; + + *_points[_currPointIndex + i] = *points[i]; + } } StaticANIObject::StaticANIObject() { |