diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/constants.h | 1 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 9816ec9968..c7bb33a22d 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -29,6 +29,7 @@ namespace Fullpipe { #define ANI_DOMINO_3 2732 #define ANI_EGGEATER 334 #define ANI_IN1MAN 5110 +#define ANI_INV_COIN 875 #define ANI_INV_EGGAPL 1564 #define ANI_INV_EGGBOOT 1570 #define ANI_INV_EGGCOIN 1567 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index ce53e91024..f951cac2ef 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1627,6 +1627,34 @@ void sceneHandler03_giveItem(ExCommand *ex) { sceneHandler03_swallowEgg(ex->_parentId); } +int sceneHandler03_swallowedEgg1State() { + return g_vars->swallowedEgg1->_value.intValue; +} + +void sceneHandler03_getCoin(ExCommand *ex) { + MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId); + + if (mq && mq->getCount() > 0) { + ExCommand *ex0 = mq->getExCommandByIndex(0); + ExCommand *ex1 = mq->getExCommandByIndex(1); + + if (sceneHandler03_swallowedEgg1State()) { + ex0->_messageKind = 1; + ex1->_messageKind = 1; + + getGameLoaderInventory()->removeItem(ANI_INV_COIN, 1); + } else { + ex0->_messageKind = 0; + ex0->_excFlags |= 1; + + ex1->_messageKind = 0; + ex1->_excFlags |= 1; + + g_vars->scene03_eggeater->_flags &= 0xFF7Fu; + } + } +} + int sceneHandler03(ExCommand *ex) { #if 0 if (ex->_messageKind != 17) { |