[Scummvm-cvs-logs] scummvm master -> a1a4e809f8645f76ede82a78d288f7cf5fc8f12d

sev- sev at scummvm.org
Tue Feb 4 23:19:24 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a1a4e809f8 FULLPIPE: Implement sceneHandler27_batFallLogic()


Commit: a1a4e809f8645f76ede82a78d288f7cf5fc8f12d
    https://github.com/scummvm/scummvm/commit/a1a4e809f8645f76ede82a78d288f7cf5fc8f12d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-04T14:18:49-08:00

Commit Message:
FULLPIPE: Implement sceneHandler27_batFallLogic()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/scenes/scene27.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 1525991..f61444e 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1095,6 +1095,7 @@ namespace Fullpipe {
 #define MSG_SC27_STARTBET 2047
 #define MSG_SC27_STARTWIPE 2057
 #define MSG_SC27_TAKEVENT 4584
+#define MV_BTA_FALL 2049
 #define MV_MAN27_FLOW 1990
 #define MV_MAN27_THROWBET 1989
 #define PIC_SC27_HITZONE2 4756
@@ -1103,6 +1104,7 @@ namespace Fullpipe {
 #define QU_SC27_SHOWBET 3368
 #define SND_27_027 4128
 #define SND_27_044 4687
+#define ST_BTA_FALL 2054
 #define ST_DRV_VENT 1996
 #define ST_MID_BROOM 2022
 #define ST_MID_SPADE 3489
diff --git a/engines/fullpipe/scenes/scene27.cpp b/engines/fullpipe/scenes/scene27.cpp
index e8c9db0..52dc42f 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) {






More information about the Scummvm-git-logs mailing list