aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-11-23 21:00:58 -0500
committerEugene Sandulenko2013-11-23 21:01:15 -0500
commit6a2ee82699d7467e2e698d5d1ce6a388f49bb883 (patch)
treef4079d316f01bb93510723a49368f61a7f5cb30e /engines/fullpipe
parent14cb73789e1f79e94d3b579f2b3d5c74f8b8c60f (diff)
downloadscummvm-rg350-6a2ee82699d7467e2e698d5d1ce6a388f49bb883.tar.gz
scummvm-rg350-6a2ee82699d7467e2e698d5d1ce6a388f49bb883.tar.bz2
scummvm-rg350-6a2ee82699d7467e2e698d5d1ce6a388f49bb883.zip
FULLPIPE: Implement sceneHandler04_sub1()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/behavior.cpp13
-rw-r--r--engines/fullpipe/behavior.h2
-rw-r--r--engines/fullpipe/constants.h2
-rw-r--r--engines/fullpipe/scenes/scene04.cpp16
4 files changed, 32 insertions, 1 deletions
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index c7b526d2c1..c27f1082f5 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 4fd1454351..1ac0b5bbfe 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 087a768156..53eec3ad7c 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 dbcff07003..01069eab1f 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() {