aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-08-04 03:46:50 +0300
committerEugene Sandulenko2013-09-06 14:51:10 +0300
commit766c5552fe7162246afc46070c1bb27aa2ef2963 (patch)
tree0540ba72d00db0e6cd963dbbf23cdb868e83b657 /engines/fullpipe
parentce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d (diff)
downloadscummvm-rg350-766c5552fe7162246afc46070c1bb27aa2ef2963.tar.gz
scummvm-rg350-766c5552fe7162246afc46070c1bb27aa2ef2963.tar.bz2
scummvm-rg350-766c5552fe7162246afc46070c1bb27aa2ef2963.zip
FULLPIPE: Implement Movement::gotoLastFrame() and Movement::setDynamicPhaseIndex()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/statics.cpp18
-rw-r--r--engines/fullpipe/statics.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 5b889d7818..20ce75f365 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -599,7 +599,11 @@ void Movement::updateCurrDynamicPhase() {
}
void Movement::setDynamicPhaseIndex(int index) {
- warning("STUB: Movement::setDynamicPhaseIndex(%d)", index);
+ while (_currDynamicPhaseIndex < index)
+ gotoNextFrame(0, 0);
+
+ while (_currDynamicPhaseIndex > index)
+ gotoPrevFrame(0, 0);
}
void Movement::loadPixelData() {
@@ -640,8 +644,18 @@ void Movement::gotoNextFrame(int callback1, int callback2) {
warning("STUB: Movement::gotoNextFrame()");
}
+void Movement::gotoPrevFrame(int callback1, int callback2) {
+ warning("STUB: Movement::gotoPrevFrame()");
+}
+
void Movement::gotoLastFrame() {
- warning("STUB: Movement::gotoLastFrame()");
+ if (_currMovement) {
+ while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size())
+ gotoNextFrame(0, 0);
+ } else {
+ while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size())
+ gotoNextFrame(0, 0);
+ }
}
Common::Point *Movement::getCenter(Common::Point *p) {
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index e3711e6501..5366f71acd 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -147,6 +147,7 @@ class Movement : public GameObject {
void removeFirstPhase();
void gotoNextFrame(int callback1, int callback2);
+ void gotoPrevFrame(int callback1, int callback2);
void gotoLastFrame();
void loadPixelData();