diff options
-rw-r--r-- | engines/fullpipe/behavior.cpp | 13 | ||||
-rw-r--r-- | engines/fullpipe/behavior.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/constants.h | 2 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 16 |
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() { |