FULLPIPE: Implement sceneHandler10_clickGum(). This completes scene10

This commit is contained in:
Eugene Sandulenko 2013-12-23 15:06:44 +02:00
parent eaa9d8a2e0
commit fec15ed2cc
2 changed files with 35 additions and 1 deletions

View File

@ -229,6 +229,8 @@ namespace Fullpipe {
#define MV_MOM_TAKE4 2888
#define MV_MOM_TAKE5 2889
#define MV_NDV_BLOW2 2855
#define MV_NDV_DENIES 952
#define MV_NDV_DENY_NOGUM 3022
#define MV_OTM_BOXHANDLEDOWN 626
#define MV_OTM_BOXHANDLEUP 627
#define MV_OTM_HANDLEDOWN 620
@ -345,6 +347,7 @@ namespace Fullpipe {
#define QU_SC8_STANDUP 2975
#define QU_SC10_ENTERLIFT 1067
#define QU_SC10_EXITLIFT 2809
#define QU_SC10_TAKEGUM 3026
#define SC_1 301
#define SC_10 653
#define SC_11 654
@ -469,6 +472,7 @@ namespace Fullpipe {
#define ST_MOM_SITS 659
#define ST_MOM_STANDS 658
#define ST_NBL_NORM 1076
#define ST_NDV_SIT 946
#define ST_OTM_BOX_LEFT 429
#define ST_OTM_GLS_LEFT 421
#define ST_OTM_VNT_LEFT 434

View File

@ -31,6 +31,7 @@
#include "fullpipe/behavior.h"
#include "fullpipe/interaction.h"
#include "fullpipe/motion.h"
namespace Fullpipe {
@ -74,7 +75,36 @@ int scene10_updateCursor() {
}
void sceneHandler10_clickGum() {
warning("STUB: sceneHandler10_clickGum()");
if (g_vars->scene10_hasGum) {
if (sceneHandler10_inflaterIsBlind()) {
if (g_vars->scene10_hasGum) {
int x = g_vars->scene10_gum->_ox - 139;
int y = g_vars->scene10_gum->_oy - 48;
if (abs(x - g_fp->_aniMan->_ox) > 1 || abs(y - g_fp->_aniMan->_oy) > 1) {
MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, x, y, 1, ST_MAN_RIGHT);
if (mq) {
ExCommand *ex = new ExCommand(0, 17, MSG_SC10_CLICKGUM, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 2;
mq->addExCommandToEnd(ex);
postExCommand(g_fp->_aniMan->_id, 2, x, y, 0, -1);
}
} else {
g_vars->scene10_hasGum = 0;
chainQueue(QU_SC10_TAKEGUM, 1);
}
}
} else {
g_vars->scene10_inflater->changeStatics2(ST_NDV_SIT);
if (g_fp->getObjectState(sO_Inflater) == g_fp->getObjectEnumState(sO_Inflater, sO_WithGum))
g_vars->scene10_inflater->startAnim(MV_NDV_DENIES, 0, -1);
else
g_vars->scene10_inflater->startAnim(MV_NDV_DENY_NOGUM, 0, -1);
}
}
}
void sceneHandler10_hideGum() {