[Scummvm-cvs-logs] scummvm master -> 6a2ee82699d7467e2e698d5d1ce6a388f49bb883
sev-
sev at scummvm.org
Sun Nov 24 03:01:39 CET 2013
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:
6a2ee82699 FULLPIPE: Implement sceneHandler04_sub1()
Commit: 6a2ee82699d7467e2e698d5d1ce6a388f49bb883
https://github.com/scummvm/scummvm/commit/6a2ee82699d7467e2e698d5d1ce6a388f49bb883
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-11-23T18:01:15-08:00
Commit Message:
FULLPIPE: Implement sceneHandler04_sub1()
Changed paths:
engines/fullpipe/behavior.cpp
engines/fullpipe/behavior.h
engines/fullpipe/constants.h
engines/fullpipe/scenes/scene04.cpp
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index c7b526d..c27f108 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -185,6 +185,19 @@ bool BehaviorManager::setBehaviorEnabled(StaticANIObject *obj, int aniId, int qu
return true;
}
+void BehaviorManager::setFlagByStaticAniObject(StaticANIObject *ani, int flag) {
+ for (uint i = 0; i < _behaviors.size(); i++) {
+ BehaviorInfo *beh = _behaviors[i];
+
+ if (ani == beh->_ani) {
+ if (flag)
+ beh->_flags &= 0xfe;
+ else
+ beh->_flags |= 1;
+ }
+ }
+}
+
void BehaviorInfo::clear() {
_ani = 0;
_staticsId = 0;
diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h
index 4fd1454..1ac0b5b 100644
--- a/engines/fullpipe/behavior.h
+++ b/engines/fullpipe/behavior.h
@@ -79,6 +79,8 @@ class BehaviorManager : public CObject {
void updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *beh);
bool setBehaviorEnabled(StaticANIObject *obj, int aniId, int quId, int flag);
+
+ void setFlagByStaticAniObject(StaticANIObject *ani, int flag);
};
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 087a768..53eec3a 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -189,6 +189,7 @@ namespace Fullpipe {
#define QU_PNK_CLICK 550
#define QU_SC3_ENTERLIFT 2779
#define QU_SC3_EXITLIFT 2808
+#define QU_SC4_MANFROMBOTTLE 2851
#define SC_1 301
#define SC_10 653
#define SC_11 654
@@ -276,6 +277,7 @@ namespace Fullpipe {
#define ST_LBN_9P 2778
#define ST_MAN_EMPTY 476
#define ST_MAN_RIGHT 325
+#define ST_MAN_SIT 1164
#define TrubaDown 697
#define TrubaLeft 474
#define TrubaRight 696
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index dbcff07..01069ea 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -289,7 +289,21 @@ void sceneHandler04_stopSound() {
}
void sceneHandler04_sub1(ExCommand *ex) {
- warning("sceneHandler04_sub1()");
+ g_fullpipe->_aniMan->changeStatics2(ST_MAN_SIT);
+
+ MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC4_MANFROMBOTTLE), 0, 0);
+
+ if (ex) {
+ ExCommand *newex = new ExCommand(ex);
+
+ mq->_exCommands.push_back(newex);
+ }
+
+ mq->_flags |= 1;
+ mq->chain(0);
+
+ g_vars->scene04_var10 = 0;
+ g_fullpipe->_behaviorManager->setFlagByStaticAniObject(g_fullpipe->_aniMan, 1);
}
void sceneHandler04_sub3() {
More information about the Scummvm-git-logs
mailing list