[Scummvm-cvs-logs] scummvm master -> 19f427f9a510866cecdeed896a4724401e1167bd

sev- sev at scummvm.org
Thu Mar 27 22:54:20 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:
19f427f9a5 FULLPIPE: Implement sceneHandler29_clickPorter()


Commit: 19f427f9a510866cecdeed896a4724401e1167bd
    https://github.com/scummvm/scummvm/commit/19f427f9a510866cecdeed896a4724401e1167bd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-03-27T23:53:36+02:00

Commit Message:
FULLPIPE: Implement sceneHandler29_clickPorter()

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



diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index 0820f76..9108686 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -183,10 +183,6 @@ void sceneHandler29_shootRed() {
 	warning("STUB: sceneHandler29_shootRed()");
 }
 
-void sceneHandler29_clickPorter(ExCommand *cmd) {
-	warning("STUB: sceneHandler29_clickPorter()");
-}
-
 void sceneHandler29_manJump() {
 	if (!g_fp->_aniMan->_movement || g_fp->_aniMan->_movement->_id == MV_MAN29_RUN || g_fp->_aniMan->_movement->_id == MV_MAN29_STANDUP) {
 		g_vars->scene29_var12 = 0;
@@ -286,6 +282,49 @@ void sceneHandler29_manToR() {
 	g_fp->_scrollSpeed = 4;
 }
 
+void sceneHandler29_clickPorter(ExCommand *cmd) {
+	if (!g_fp->_aniMan->isIdle() || g_fp->_aniMan->_flags & 0x100) {
+		cmd->_messageKind = 0;
+
+		return;
+	}
+
+	if (g_vars->scene29_var20 <= g_vars->scene29_porter->_ox) {
+		if (ABS(351 - g_vars->scene29_var20) > 1 || ABS(443 - g_vars->scene29_var21) > 1
+			|| g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != ST_MAN_RIGHT) {
+			if (g_fp->_msgX != 351 || g_fp->_msgY != 443) {
+				MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 351, 443, 1, ST_MAN_RIGHT);
+
+				if (mq) {
+					mq->addExCommandToEnd(cmd->createClone());
+
+					postExCommand(g_fp->_aniMan->_id, 2, 351, 443, 0, -1);
+				}
+			}
+		} else {
+			sceneHandler29_manToL();
+		}
+	} else {
+		g_vars->scene29_var20 = g_fp->_aniMan->_ox;
+		g_vars->scene29_var21 = g_fp->_aniMan->_oy;
+
+		if (ABS(1582 - g_vars->scene29_var20) > 1 || ABS(445 - g_fp->_aniMan->_oy) > 1
+			|| g_fp->_aniMan->_movement || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) {
+			if (g_fp->_msgX != 1582 || g_fp->_msgY != 445) {
+				MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 1582, 445, 1, (0x4000 | ST_MAN_RIGHT));
+
+				if (mq) {
+					mq->addExCommandToEnd(cmd->createClone());
+
+					postExCommand(g_fp->_aniMan->_id, 2, 1582, 445, 0, -1);
+				}
+			}
+		} else {
+			sceneHandler29_manToR();
+		}
+	}
+}
+
 void sceneHandler29_sub05() {
 	warning("STUB: sceneHandler29_sub05()");
 }






More information about the Scummvm-git-logs mailing list