[Scummvm-cvs-logs] scummvm master -> 00369347e03d801fad7be673f03512bc5ce5220c

sev- sev at scummvm.org
Tue Jan 28 20:31:39 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:
00369347e0 FULLPIPE: Implement lift_goAnimation()


Commit: 00369347e03d801fad7be673f03512bc5ce5220c
    https://github.com/scummvm/scummvm/commit/00369347e03d801fad7be673f03512bc5ce5220c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-28T11:30:33-08:00

Commit Message:
FULLPIPE: Implement lift_goAnimation()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/lift.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 408f765..b2ed962 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -41,6 +41,8 @@ namespace Fullpipe {
 #define MV_FLY_FLY 4917
 #define MV_MAN_GOLADDER 451
 #define MV_MAN_GOLADDER2 2844
+#define MV_MAN_LIFTDOWN 1052
+#define MV_MAN_LIFTUP 1051
 #define MV_MAN_LOOKUP 4773
 #define rMV_MAN_LOOKUP 4775
 #define MV_MAN_TOLADDER 448
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index aa0c19e..6484aca 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -29,6 +29,7 @@
 #include "fullpipe/scene.h"
 #include "fullpipe/statics.h"
 #include "fullpipe/messages.h"
+#include "fullpipe/gameloader.h"
 
 namespace Fullpipe {
 
@@ -234,8 +235,52 @@ void FullpipeEngine::lift_clickButton() {
 		lift_walkAndGo();
 }
 
-void FullpipeEngine::lift_goAnimation() {
-	warning("STUB: FullpipeEngine::lift_goAnimation()");
+void FullpipeEngine::lift_goAnimation() {	if (_lastLiftButton) {
+		int parentId = _currentScene->_sceneId;
+		int buttonId = lift_getButtonIdN(_lastLiftButton->_statics->_staticsId);
+
+		if (!buttonId)
+			return;
+
+		int numItems = _gameLoader->_preloadItems.size();
+
+		for (int i = 0; i < numItems; i++) {
+			PreloadItem *pre = _gameLoader->_preloadItems[i];
+
+			if (pre->preloadId2 == buttonId && pre->preloadId1 == _currentScene->_sceneId) {
+				MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+
+				ExCommand *ex = new ExCommand(ANI_MAN, 1, (pre->keyCode != LiftDown ? MV_MAN_LIFTDOWN : MV_MAN_LIFTUP), 0, 0, 0, 1, 0, 0, 0);
+
+				ex->_keyCode = -1;
+				ex->_field_24 = 1;
+				ex->_excFlags |= 2;
+
+				mq->addExCommandToEnd(ex);
+
+				ex = new ExCommand(parentId, 17, 61, 0, 0, 0, 1, 0, 0, 0);
+
+				ex->_keyCode = buttonId;
+				ex->_excFlags |= 3;
+
+				mq->addExCommandToEnd(ex);
+
+				_aniMan->_flags &= 0xFEFF;
+
+				if (!mq->chain(_aniMan))
+					delete mq;
+
+				_aniMan->_flags |= 1;
+			}
+		}
+	}
+
+	lift_exitSeq(0);
+
+	if (_lastLiftButton) {
+		_lastLiftButton->_statics = _lastLiftButton->getStaticsById(lift_getButtonIdN(_lastLiftButton->_statics->_staticsId));
+		_lastLiftButton = 0;
+	}
 }
 
 void FullpipeEngine::lift_sub1(StaticANIObject *ani) {






More information about the Scummvm-git-logs mailing list