diff options
author | Eugene Sandulenko | 2014-02-05 00:18:11 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-02-05 00:18:49 +0200 |
commit | a1a4e809f8645f76ede82a78d288f7cf5fc8f12d (patch) | |
tree | 08487729eb649a90875ae9e9978a487124e06503 /engines/fullpipe/scenes | |
parent | 5a1c9bc717ef4fb4d70c73c57d867591495de826 (diff) | |
download | scummvm-rg350-a1a4e809f8645f76ede82a78d288f7cf5fc8f12d.tar.gz scummvm-rg350-a1a4e809f8645f76ede82a78d288f7cf5fc8f12d.tar.bz2 scummvm-rg350-a1a4e809f8645f76ede82a78d288f7cf5fc8f12d.zip |
FULLPIPE: Implement sceneHandler27_batFallLogic()
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r-- | engines/fullpipe/scenes/scene27.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp index e8c9db0fb7..52dc42f37c 100644 --- a/engines/fullpipe/scenes/scene27.cpp +++ b/engines/fullpipe/scenes/scene27.cpp @@ -332,10 +332,24 @@ void sceneHandler27_sub07() { } } -bool sceneHandler27_batFallLogic(int bat) { - warning("STUB: sceneHandler27_batFallLogic()"); +bool sceneHandler27_batFallLogic(int batn) { + Bat *bat = g_vars->scene27_bats[batn]; - return false; + int y = (bat->currY - 458.0) * 0.4848484848484849 + 734.0; + + if (y >= bat->currX) + return false; + + if (bat->currX - y > 15.0 || bat->ani->_statics->_staticsId == ST_BTA_FALL) { + bat->ani->_priority = 2020; + + g_vars->scene27_var07.remove_at(batn); + g_vars->scene27_var07.push_back(bat); + } else if (!bat->ani->_movement) { + bat->ani->startAnim(MV_BTA_FALL, 0, -1); + } + + return true; } bool sceneHandler27_batCalcDistance(int bat1, int bat2) { |