diff options
-rw-r--r-- | engines/fullpipe/constants.h | 6 | ||||
-rw-r--r-- | engines/fullpipe/messages.cpp | 4 | ||||
-rw-r--r-- | engines/fullpipe/messages.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene16.cpp | 56 |
4 files changed, 64 insertions, 3 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index fcd974e249..07b761bd2c 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -660,7 +660,9 @@ namespace Fullpipe { #define MSG_SC16_SHOWMUGFULL 1396 #define MSG_SC16_SHOWWIRE 1350 #define MSG_SC16_STARTLAUGH 1374 +#define MV_BOY_DRINK 1333 #define MV_BT16_FILL 3286 +#define MV_GRL_DRINK 1339 #define MV_GRL_FALL 3115 #define MV_GRL_LAUGH_POPA 3278 #define MV_JTI_FLOWBY 1393 @@ -668,15 +670,19 @@ namespace Fullpipe { #define MV_MAN16_TAKEMUG 1362 #define PIC_SC16_TUMBA 1368 #define QU_BRD16_STARTBEARDED 4948 +#define QU_SC16_BOYKICK 1367 #define QU_SC16_BOYOUT 1364 #define QU_SC16_GIRLLAUGH 1375 #define QU_SC16_GIRLOUT 1365 #define QU_SC16_GOBOY 1347 #define QU_SC16_GOGIRL 1348 +#define QU_SC16_MANDRINK 5200 #define QU_SC16_SHOWMUG 1361 +#define QU_SC16_TAKEMUG 1435 #define SND_16_034 3854 #define SND_16_035 3855 #define SND_16_037 3857 +#define ST_BOY_STAND 1331 #define ST_GRL_LAUGH 1342 #define ST_GRL_STAND 1337 #define ST_MUG_EMPTY 1298 diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 36b89f8615..cdb457e59e 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -331,6 +331,10 @@ void MessageQueue::addExCommandToEnd(ExCommand *ex) { _exCommands.push_back(ex); } +void MessageQueue::insertExCommandAt(int pos, ExCommand *ex) { + warning("STUB: MessageQueue::insertExCommandAt()"); +} + ExCommand *MessageQueue::getExCommandByIndex(uint idx) { if (idx >= getCount()) return 0; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 44245bcf19..30ded96f08 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -124,6 +124,7 @@ class MessageQueue : public CObject { void addExCommand(ExCommand *ex); void addExCommandToEnd(ExCommand *ex); + void insertExCommandAt(int pos, ExCommand *ex); ExCommand *getExCommandByIndex(uint idx); void deleteExCommandByIndex(uint idx, bool doFree); diff --git a/engines/fullpipe/scenes/scene16.cpp b/engines/fullpipe/scenes/scene16.cpp index fd764c2cfb..1ba4920082 100644 --- a/engines/fullpipe/scenes/scene16.cpp +++ b/engines/fullpipe/scenes/scene16.cpp @@ -245,8 +245,58 @@ void sceneHandler16_startLaugh() { g_vars->scene16_var09 = 1; } -void sceneHandler16_sub02() { - warning("STUB: sceneHandler16_sub02()"); +void sceneHandler16_drink() { + if (g_vars->scene16_mug->_flags & 4) { + if (!g_vars->scene16_jettie->_movement) { + if (!g_vars->scene16_var06 || !g_vars->scene16_var06->_movement || g_vars->scene16_var06->_movement->_id != MV_BOY_DRINK) { + if (!g_vars->scene16_var07 || !g_vars->scene16_var07->_movement || g_vars->scene16_var07->_movement->_id != MV_GRL_DRINK) { + if (g_vars->scene16_mug->_statics->_staticsId == ST_MUG_FULL) { + MessageQueue *mq; + ExCommand *ex; + + if (g_vars->scene16_var06) { + g_fp->_aniMan->_flags |= 0x180; + + g_vars->scene16_var06->changeStatics2(ST_BOY_STAND); + g_vars->scene16_var06->queueMessageQueue(0); + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_BOYKICK), 0, 1); + + mq->replaceKeyCode(-1, g_vars->scene16_var06->_okeyCode); + + ex = new ExCommand(ANI_MAN, 34, 384, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3u; + ex->_field_14 = 384; + ex->_messageNum = 0; + + mq->insertExCommandAt(2, ex); + mq->setFlags(mq->getFlags() | 1); + mq->chain(0); + } else { + g_fp->_aniMan->_flags |= 1; + + mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC16_MANDRINK), 0, 1); + + ex = new ExCommand(ANI_MAN, 34, 256, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3u; + ex->_field_14 = 256; + ex->_messageNum = 0; + + mq->addExCommandToEnd(ex); + mq->setFlags(mq->getFlags() | 1); + mq->chain(0); + + g_fp->_currentScene->getStaticANIObject1ById(ANI_GIRL, -1)->changeStatics2(ST_GRL_STAND); + } + + g_fp->_currentScene->getStaticANIObject1ById(ANI_WIRE16, -1)->show1(-1, -1, -1, 0); + } else { + chainObjQueue(g_fp->_aniMan, QU_SC16_TAKEMUG, 1); + } + } + } + } + } } void sceneHandler16_mugClick() { @@ -262,7 +312,7 @@ void sceneHandler16_mugClick() { postExCommand(g_fp->_aniMan->_id, 2, 310, 449, 0, -1); } } else { - sceneHandler16_sub02(); + sceneHandler16_drink(); } } |