From b2518bdadf6d927faa449135c617e0dd1048721d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 3 Feb 2014 22:09:21 +0200 Subject: FULLPIPE: Implement sceneHandler27_sub04() and sceneHandler27_sub07() --- engines/fullpipe/scenes/scene27.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe/scenes') 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; -- cgit v1.2.3