FULLPIPE: Remaining scene03 functions

This commit is contained in:
Eugene Sandulenko 2013-11-06 00:21:30 +02:00
parent 38dfb4da38
commit b895a88a4f
2 changed files with 51 additions and 0 deletions

View File

@ -108,6 +108,7 @@ namespace Fullpipe {
#define PIC_SC1_OSK 1018
#define PIC_SC1_OSK2 2932
#define PIC_SC3_DOMIN 5182
#define PIC_SC3_LADDER 1102
#define PIC_SCD_SEL 734
#define QU_EGTR_MD2_SHOW 4698
#define QU_EGTR_MD1_SHOW 4697

View File

@ -1655,6 +1655,56 @@ void sceneHandler03_getCoin(ExCommand *ex) {
}
}
void sceneHandler03_goLadder() {
handleObjectInteraction(g_fullpipe->_aniMan, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC3_LADDER, 0), 0);
}
void sceneHandler03_pushEggStack() {
g_vars->swallowedEgg1->_value.intValue = g_vars->swallowedEgg2->_value.intValue;
g_vars->swallowedEgg2->_value.intValue = g_vars->swallowedEgg3->_value.intValue;
g_vars->swallowedEgg3->_value.intValue = 0;
if (g_vars->swallowedEgg2->_value.intValue == ANI_INV_EGGBOOT
&& g_vars->swallowedEgg1->_value.intValue == ANI_INV_EGGAPL) {
g_vars->swallowedEgg1->_value.intValue = ANI_INV_EGGBOOT;
g_vars->swallowedEgg2->_value.intValue = ANI_INV_EGGAPL;
}
}
void sceneHandler03_releaseEgg() {
g_vars->scene03_eggeater->_flags &= 0xFF7F;
g_vars->scene03_eggeater->show1(-1, -1, -1, 0);
}
void sceneHandler03_takeEgg(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);
int egg1 = sceneHandler03_swallowedEgg1State();
if (egg1 && ex0) {
ex0->_parentId = egg1;
sceneHandler03_pushEggStack();
}
if ( g_vars->swallowedEgg1->_value.intValue == ANI_INV_EGGAPL
&& !g_vars->swallowedEgg2->_value.intValue
&& !g_vars->swallowedEgg3->_value.intValue
&& ex1) {
if (ex1->_objtype == kObjTypeObjstateCommand) {
ObjstateCommand *com = (ObjstateCommand *)ex1;
com->_value = g_fullpipe->getObjectEnumState(sO_EggGulper, sO_WantsNothing);
}
}
}
}
int sceneHandler03(ExCommand *ex) {
#if 0
if (ex->_messageKind != 17) {