FULLPIPE: Started implementation of sceneHandler38_animateAlcoholics()

This commit is contained in:
Eugene Sandulenko 2014-01-21 07:27:59 -08:00
parent 33b6d0878b
commit 711522eeeb

View File

@ -164,6 +164,166 @@ void sceneHandler38_drink() {
void sceneHandler38_animateAlcoholics() {
warning("STUB: sceneHandler38_animateAlcoholics()");
#if 0
MessageQueue *mq;
if (g_vars->scene38_boss->_movement || !(g_vars->scene38_boss->_flags & 4) || (g_vars->scene38_boss->_flags & 2)) {
g_vars->scene38_var05 = 0;
} else {
g_vars->scene38_var05++;
}
if (g_vars->scene38_var05 >= 50) {
int bossSt = g_vars->scene38_boss->_statics->_staticsId;
if (bossSt == ST_GLV_SLEEP2) {
g_vars->scene38_var05 = 0;
} else if ((g_vars->scene38_domino0->_flags & 4) && g_vars->scene38_domino0->_statics->_staticsId == ST_DMN38_6) {
if (bossSt == ST_GLV_HAMMER) {
chainQueue(QU_GLV_TAKEDOMINO, 1);
g_vars->scene38_var05 = 0;
}
if (bossSt == ST_GLV_NOHAMMER) {
chainQueue(QU_GLV_TAKEDOMINO_NOHMR, 1);
g_vars->scene38_var05 = 0;
}
} else {
if ((g_vars->scene38_bottle->_flags & 4) && g_vars->scene38_bottle->_statics->_staticsId == ST_BTL38_FULL && bossSt == ST_GLV_NOHAMMER) {
chainQueue(QU_GLV_DRINKBOTTLE, 1);
g_vars->scene38_var05 = 0;
} else {
int bossAnim = 0;
if (g_fp->_rnd->getRandomNumber(32767) >= 1310 || g_vars->scene38_boss->_statics->_staticsId != ST_GLV_HAMMER) {
if (g_fp->_rnd->getRandomNumber(32767) >= 1310) {
if (g_fp->_rnd->getRandomNumber(32767) < 1310) {
if (bossSt == ST_GLV_HAMMER)
bossAnim = QU_GLV_DRINK;
else if (bossSt == ST_GLV_NOHAMMER)
bossAnim = QU_GLV_DRINK_NOHMR;
}
} else {
if (bossSt == ST_GLV_HAMMER)
bossAnim = QU_GLV_PROPOSE;
else if (bossSt == ST_GLV_NOHAMMER)
bossAnim = QU_GLV_PROPOSE_NOHMR;
}
} else {
bossAnim = QU_GLV_HMRKICK;
}
if (g_vars->scene38_var06 == bossAnim) {
g_vars->scene38_var07++;
if (g_vars->scene38_var07 > 2)
bossAnim = 0;
} else {
g_vars->scene38_var06 = bossAnim;
g_vars->scene38_var07 = 1;
}
if (bossAnim > 0) {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(bossAnim), 0, 0);
mq->chain(0);
g_vars->scene38_var05 = 0;
}
}
}
}
if (g_vars->scene38_tally->_movement || !(g_vars->scene38_tally->_flags & 4) || (g_vars->scene38_tally->_flags & 2)) {
g_vars->scene38_var08 = 0;
} else {
g_vars->scene38_var08++;
}
if (g_vars->scene38_var08 >= 50) {
int tallyAnim = 0;
if (g_fp->_rnd->getRandomNumber(32767) >= 1310) {
if (g_fp->_rnd->getRandomNumber(32767) >= 1310) {
if (g_fp->_rnd->getRandomNumber(32767) >= 1310) {
if (g_fp->_rnd->getRandomNumber(32767) < 1310)
tallyAnim = QU_DLD_ICK;
} else {
tallyAnim = QU_DLD_GLOT;
}
} else {
tallyAnim = QU_DLD_BLINK;
}
} else {
if (g_vars->scene38_domino1->_statics->_staticsId == ST_DMN38_NORM3) {
tallyAnim = QU_DLD_TAKE1;
} else if (g_vars->scene38_domino1->_statics->_staticsId == ST_DMN38_NORM4) {
tallyAnim = QU_DLD_TAKE2;
}
}
if (g_vars->scene38_var09 == tallyAnim) {
g_vars->scene38_var10++;
if (g_vars->scene38_var10++ > 2)
tallyAnim = 0;
} else {
g_vars->scene38_var09 = tallyAnim;
g_vars->scene38_var10 = 1;
}
if (tallyAnim > 0) {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(tallyAnim), 0, 0);
mq->chain(0);
g_vars->scene38_var08 = 0;
}
}
if (g_vars->scene38_shorty->_movement || !(g_vars->scene38_shorty->_flags & 4) || (g_vars->scene38_shorty->_flags & 2)) {
g_vars->scene38_var11 = 0;
return;
}
g_vars->scene38_var11++;
if (g_vars->scene38_var11 < 50)
return;
int shortyAnim = 0;
if (g_fp->_rnd->getRandomNumber(32767) >= 1310) {
if (g_fp->_rnd->getRandomNumber(32767) >= 1310 || g_vars->scene38_shorty->_statics->_staticsId != ST_MLS_LEFT2) {
if (g_vars->scene38_boss->_statics->_staticsId != ST_GLV_SLEEP2 && g_vars->scene38_var05 > 30 && g_fp->_rnd->getRandomNumber(32767) < 0x3FFF && g_vars->scene38_shorty->_statics->_staticsId == ST_MLS_LEFT2)
shortyAnim = QU_MLS_HAND;
} else {
shortyAnim = QU_MLS_BLINK;
}
} else {
if (g_vars->scene38_shorty->_statics->_staticsId == ST_MLS_RIGHT2) {
shortyAnim = QU_MLS_TURNL;
} else if (g_vars->scene38_shorty->_statics->_staticsId == ST_MLS_LEFT2) {
shortyAnim = QU_MLS_TURNR;
}
}
if (g_vars->scene38_var12 == shortyAnim) {
g_vars->scene38_var13++;
if (g_vars->scene38_var13 > 2)
return;
} else {
g_vars->scene38_var12 = shortyAnim;
g_vars->scene38_var13 = 1;
}
if (shortyAnim > 0) {
mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(shortyAnim), 0, 0);
mq->chain(0);
g_vars->scene38_var11 = 0;
}
#endif
}
int sceneHandler38(ExCommand *cmd) {
@ -238,7 +398,7 @@ int sceneHandler38(ExCommand *cmd) {
if (x < g_fp->_sceneRect.left + g_vars->scene38_var01)
g_fp->_currentScene->_x = x - g_vars->scene38_var03 - g_fp->_sceneRect.left;
if (x > g_fp->_sceneRect.right - g_vars->scene38_var01 )
if (x > g_fp->_sceneRect.right - g_vars->scene38_var01)
g_fp->_currentScene->_x = x + g_vars->scene38_var03 - g_fp->_sceneRect.right;
}