aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2014-02-03 22:09:21 +0200
committerEugene Sandulenko2014-02-03 22:09:21 +0200
commitb2518bdadf6d927faa449135c617e0dd1048721d (patch)
tree1316089b1c712e7e271e00931f1a4f7a78b5c05c
parent2ed9d0da3e05f316bcb0fd50204e209479996275 (diff)
downloadscummvm-rg350-b2518bdadf6d927faa449135c617e0dd1048721d.tar.gz
scummvm-rg350-b2518bdadf6d927faa449135c617e0dd1048721d.tar.bz2
scummvm-rg350-b2518bdadf6d927faa449135c617e0dd1048721d.zip
FULLPIPE: Implement sceneHandler27_sub04() and sceneHandler27_sub07()
-rw-r--r--engines/fullpipe/scenes.cpp1
-rw-r--r--engines/fullpipe/scenes.h3
-rw-r--r--engines/fullpipe/scenes/scene27.cpp17
3 files changed, 14 insertions, 7 deletions
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 8e76ffd1cc..a94f176030 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -317,6 +317,7 @@ Vars::Vars() {
scene27_var12 = 0;
scene27_var13 = 0;
scene27_var16 = 0;
+ scene27_var17 = 0;
scene27_launchPhase = 0;
scene28_fliesArePresent = true;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 9b476a7a9c..393f0e522b 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -503,9 +503,10 @@ public:
int scene27_var12;
int scene27_var13;
int scene27_var16;
+ int scene27_var17;
int scene27_launchPhase;
BallChain scene27_balls;
- Common::List<Bat *> scene27_bats;
+ Common::Array<Bat *> scene27_bats;
Common::List<Bat *> scene27_var07;
bool scene28_fliesArePresent;
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
index 2d75445219..d143577e32 100644
--- a/engines/fullpipe/scenes/scene27.cpp
+++ b/engines/fullpipe/scenes/scene27.cpp
@@ -40,8 +40,7 @@ struct Bat {
StaticANIObject *ani;
int field_4;
double power;
- int field_10;
- int field_14;
+ double field_10;
double currX;
double currY;
double powerCos;
@@ -284,7 +283,10 @@ void sceneHandler27_startAiming() {
}
void sceneHandler27_sub04(ExCommand *cmd) {
- warning("STUB: sceneHandler27_sub04()");
+ g_vars->scene27_var16 = cmd->_x;
+ g_vars->scene27_var17 = cmd->_y;
+ g_vars->scene27_var08 = 1;
+ g_vars->scene27_var09 = 0;
}
void sceneHandler27_aimDude() {
@@ -301,15 +303,18 @@ void sceneHandler27_aimDude() {
}
void sceneHandler27_sub07() {
- warning("STUB: sceneHandler27_sub07()");
+ for (uint i = 0; i < g_vars->scene27_bats.size(); i++) {
+ if (g_vars->scene27_bats[i]->currX < 800.0 ) {
+ g_vars->scene27_bats[i]->field_10 = atan2(800.0 - g_vars->scene27_bats[i]->currX, 520.0 - g_vars->scene27_bats[i]->currY);
+ g_vars->scene27_bats[i]->power += 1.0;
+ }
+ }
}
void sceneHandler27_animateBats() {
warning("STUB: sceneHandler27_animateBats()");
}
-
-
int sceneHandler27(ExCommand *cmd) {
if (cmd->_messageKind != 17)
return 0;