diff options
author | Eugene Sandulenko | 2013-12-10 01:12:23 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2013-12-10 01:13:47 +0200 |
commit | f4fd1d40380e3c7e3a549c514d074c02578c9f86 (patch) | |
tree | 7df9216d614821d9ec07c20e1eda656309c1bd6f /engines/fullpipe | |
parent | 1ecf42748f2b1a0fc3b83bf6badd129155258d8d (diff) | |
download | scummvm-rg350-f4fd1d40380e3c7e3a549c514d074c02578c9f86.tar.gz scummvm-rg350-f4fd1d40380e3c7e3a549c514d074c02578c9f86.tar.bz2 scummvm-rg350-f4fd1d40380e3c7e3a549c514d074c02578c9f86.zip |
FULLPIPE: Finished sceneHandler04_sub4()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/constants.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 51 |
4 files changed, 22 insertions, 33 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index b774c89ed0..c7969daf90 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -133,6 +133,7 @@ namespace Fullpipe { #define MV_PNK_WEIGHTRIGHT 502 #define MV_SC4_COIN_default 1029 #define MV_SPK4_PLAY 3276 +#define MV_SPR_LOWER 543 #define PIC_CMN_EVAL 3468 #define PIC_CSR_DEFAULT 4891 #define PIC_CSR_DEFAULT_INV 4892 @@ -299,6 +300,7 @@ namespace Fullpipe { #define ST_MAN_SIT 1164 #define ST_MAN_STANDLADDER 453 #define ST_PNK_WEIGHTLEFT 503 +#define ST_SPR_UP 544 #define TrubaDown 697 #define TrubaLeft 474 #define TrubaRight 696 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 9dc4c74b15..e4998e78a1 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -99,6 +99,7 @@ Vars::Vars() { scene04_var19 = 0; scene04_var20 = 0; scene04_var24 = 0; + scene04_var25 = 0; scene04_bottleY = 0; scene04_ladderOffset = 0; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index e7960fe010..e3edebfc5a 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -129,6 +129,7 @@ public: int scene04_var19; int scene04_var20; StaticANIObject *scene04_var24; + int scene04_var25; PictureObject *selector; }; diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 3c2c02298a..377ebd4c17 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -441,43 +441,39 @@ void sceneHandler04_walkKozyawka() { } } +void sceneHandler04_bottleUpdateObjects(int off) { + for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) { + GameObject *obj = *it; + + obj->setOXY(obj->_field_8 + 20, off + obj->_field_8 + 24); + } +} + void sceneHandler04_sub4() { -#if 0 - int var20 = g_vars->scene04_var20; int oldDynIndex = g_vars->scene04_dynamicPhaseIndex; - v2 = g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex; + int v2 = g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex; + g_vars->scene04_dynamicPhaseIndex += g_vars->scene04_var20; if (g_vars->scene04_var20 + g_vars->scene04_dynamicPhaseIndex < 0) { v2 = 0; - var20 = 0; g_vars->scene04_dynamicPhaseIndex = 0; g_vars->scene04_var20 = 0; } if (v2 > 14) { v2 = 14; - var20 = 0; g_vars->scene04_dynamicPhaseIndex = 14; g_vars->scene04_var20 = 0; } - v4 = __OFSUB__(g_vars->scene04_var06, v2); - v3 = g_vars->scene04_var06 - v2 < 0; - - if (g_vars->scene04_var06 > v2) { - ++var20; - v4 = __OFSUB__(g_vars->scene04_var06, v2); - v3 = g_vars->scene04_var06 - v2 < 0; - g_vars->scene04_var20 = var20; - } + if (g_vars->scene04_var06 > v2) + g_vars->scene04_var20++; - if (v3 ^ v4) { - --var20; - g_vars->scene04_var20 = var20; - } + if (g_vars->scene04_var06 < v2) + g_vars->scene04_var20--; - if (oldDynIndex <= g_vars->scene04_var06) + if (oldDynIndex <= g_vars->scene04_var06) { if (v2 <= g_vars->scene04_var06) goto LABEL_16; } else if (v2 > g_vars->scene04_var06) { @@ -486,7 +482,7 @@ void sceneHandler04_sub4() { g_vars->scene04_var25++; - if (var20 && g_vars->scene04_var25 > 1) { + if (g_vars->scene04_var20 && g_vars->scene04_var25 > 1) { g_vars->scene04_var25 = 0; g_vars->scene04_var20--; } @@ -494,7 +490,7 @@ void sceneHandler04_sub4() { Common::Point point; - int curdelta = g_vars->scene04_spring->getCurrDimensions(&point)->y - g_vars->scene04_dynamicPhaseIndex; + int curdelta = g_vars->scene04_spring->getCurrDimensions(point)->y - g_vars->scene04_dynamicPhaseIndex; if (g_vars->scene04_dynamicPhaseIndex) { if (!g_vars->scene04_spring->_movement) @@ -506,24 +502,13 @@ void sceneHandler04_sub4() { } if (g_vars->scene04_dynamicPhaseIndex != oldDynIndex) - sceneHandler04_bottleUpdateObjects(curdelta - (g_vars->scene04_spring->getCurrDimensions(&point)->y - g_vars->scene04_dynamicPhaseIndex)); -#endif - - warning("STUB: sceneHandler04_sub4()"); + sceneHandler04_bottleUpdateObjects(curdelta - (g_vars->scene04_spring->getCurrDimensions(point)->y - g_vars->scene04_dynamicPhaseIndex)); } void sceneHandler04_sub5() { warning("STUB: sceneHandler04_sub5()"); } -void sceneHandler04_bottleUpdateObjects(int off) { - for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) { - GameObject *obj = *it; - - obj->setOXY(obj->_field_8 + 20, off + obj->_field_8 + 24); - } -} - void sceneHandler04_liftBottle() { int newy = g_vars->scene04_bottleY + g_vars->scene04_spring->_oy; |