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

sev- sev at scummvm.org
Mon Mar 31 22:11:44 CEST 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:
ee9ad6cfb5 FULLPIPE: Implement sceneHandler29_animBearded()


Commit: ee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994
    https://github.com/scummvm/scummvm/commit/ee9ad6cfb5a75e1bf76a49b7d2bd36ea76dd7994
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-03-31T23:10:55+03:00

Commit Message:
FULLPIPE: Implement sceneHandler29_animBearded()

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 3f568fd..59c4ded 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -1295,6 +1295,7 @@ namespace Fullpipe {
 #define MSG_SC29_STOPRIDE 2107
 #define MV_ASS_HITGREEN 2138
 #define MV_ASS_HITRED 2139
+#define MV_BRDCMN_GOR 4735
 #define MV_MAN29_BEND 2091
 #define MV_MAN29_HIT 2088
 #define MV_MAN29_JUMP 2090
@@ -1307,6 +1308,10 @@ namespace Fullpipe {
 #define MV_STR1_SHOOT 2109
 #define MV_STR2_SHOOT 2112
 #define PIC_SC29_LTRUBA 2081
+#define QU_SC29_BRD1 4741
+#define QU_SC29_BRD2 4742
+#define QU_SC29_BRDOUT1 4743
+#define QU_SC29_BRDOUT2 4744
 #define QU_SC29_ESCAPE 2129
 #define QU_SC29_MANFROM_L 2101
 #define QU_SC29_MANFROM_R 2104
@@ -1315,6 +1320,8 @@ namespace Fullpipe {
 #define SND_29_028 4758
 #define SND_29_029 4759
 #define ST_ASS_NORM 2122
+#define ST_BRDCMN_GOR 4734
+#define ST_BRDCMN_RIGHT 4732
 #define ST_MAN29_RUNR 2140
 #define ST_MAN29_SITR 2141
 #define ST_STR1_RIGHT 2143
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 8d0fb5d..3fe1cac 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -498,7 +498,91 @@ void sceneHandler29_shoot() {
 }
 
 void sceneHandler29_animBearded() {
-	warning("STUB: sceneHandler29_animBearded()");
+	MessageQueue *mq;
+
+	for (uint i = 0; i < g_vars->scene29_var19.size(); i++) {
+		StaticANIObject *ani = g_vars->scene29_var19[i]->ani;
+
+		if (g_vars->scene29_var19[i]->wbflag) {
+			int x = ani->_ox;
+			int y = ani->_oy;
+
+			if (!ani->_movement && ani->_statics->_staticsId == (ST_BRDCMN_RIGHT | 0x4000)) {
+				x -= 4;
+
+				if (x - g_vars->scene29_var20 < 100 || !g_vars->scene29_var10) {
+					mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT1), 0, 1);
+
+					mq->replaceKeyCode(-1, ani->_okeyCode);
+					mq->chain(0);
+
+					g_vars->scene29_var19[i]->wbflag = 0;
+					g_vars->scene29_var19[i]->wbcounter = 0;
+				}
+			}
+
+			if (!ani->_movement && ani->_statics->_staticsId == ST_BRDCMN_GOR)
+				ani->startAnim(MV_BRDCMN_GOR, 0, -1);
+
+			if (ani->_movement) {
+				if (ani->_movement->_id == MV_BRDCMN_GOR) {
+					x -= 4;
+
+					if (g_vars->scene29_var20 - x < 60 || x - g_vars->scene29_var20 < -260 || !g_vars->scene29_var10) {
+						ani->changeStatics2(ST_BRDCMN_RIGHT);
+
+						mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRDOUT2), 0, 1);
+
+						mq->replaceKeyCode(-1, ani->_okeyCode);
+						mq->chain(0);
+
+						g_vars->scene29_var19[i]->wbflag = 0;
+						g_vars->scene29_var19[i]->wbcounter = 0;
+					}
+				}
+			}
+
+			ani->setOXY(x, y);
+			continue;
+		}
+
+		if (g_vars->scene29_var10 && g_vars->scene29_var19[i]->wbcounter > 30) {
+			int newx;
+
+			if (g_fp->_rnd->getRandomNumber(1))
+				goto dostuff;
+
+			if (g_vars->scene29_var20 <= 700) {
+				g_vars->scene29_var19[i]->wbcounter++;
+				continue;
+			}
+
+			if (g_vars->scene29_var20 >= 1100) {
+			dostuff:
+				if (g_vars->scene29_var20 <= 700 || g_vars->scene29_var20 >= 1350) {
+					g_vars->scene29_var19[i]->wbcounter++;
+					continue;
+				}
+
+				mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD2), 0, 1);
+
+				newx = g_vars->scene29_var20 - 200;
+			} else {
+				mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC29_BRD1), 0, 1);
+
+				newx = g_vars->scene29_var20 + 350;
+			}
+
+			mq->getExCommandByIndex(0)->_x = newx;
+			mq->replaceKeyCode(-1, ani->_okeyCode);
+			mq->chain(0);
+
+			g_vars->scene29_var19[i]->wbflag = 1;
+			g_vars->scene29_var19[i]->wbcounter = 0;
+		}
+
+		g_vars->scene29_var19[i]->wbcounter++;
+	}
 }
 
 






More information about the Scummvm-git-logs mailing list