mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-18 23:57:32 +00:00
FULLPIPE: Implement sceneHandler04_jumpOnLadder()
This commit is contained in:
parent
5e3bbb8156
commit
7cbe0fa210
@ -119,6 +119,8 @@ namespace Fullpipe {
|
||||
#define MV_MAN_GOLADDER 451
|
||||
#define MV_MAN_GOLADDER2 2844
|
||||
#define MV_MAN_GOU 460
|
||||
#define MV_MAN_JUMPONPLANK 551
|
||||
#define MV_MAN_LOOKLADDER 520
|
||||
#define MV_MAN_LOOKUP 4773
|
||||
#define MV_MAN_STARTLADDER 452
|
||||
#define MV_MAN_STARTLADDER2 2842
|
||||
@ -291,8 +293,11 @@ namespace Fullpipe {
|
||||
#define ST_LBN_9N 2777
|
||||
#define ST_LBN_9P 2778
|
||||
#define ST_MAN_EMPTY 476
|
||||
#define ST_MAN_LADDERDOWN 521
|
||||
#define ST_MAN_ONPLANK 552
|
||||
#define ST_MAN_RIGHT 325
|
||||
#define ST_MAN_SIT 1164
|
||||
#define ST_MAN_STANDLADDER 453
|
||||
#define ST_PNK_WEIGHTLEFT 503
|
||||
#define TrubaDown 697
|
||||
#define TrubaLeft 474
|
||||
|
@ -100,6 +100,7 @@ Vars::Vars() {
|
||||
scene04_var20 = 0;
|
||||
scene04_var24 = 0;
|
||||
scene04_bottleY = 0;
|
||||
scene04_ladderOffset = 0;
|
||||
|
||||
selector = 0;
|
||||
}
|
||||
|
@ -95,6 +95,8 @@ public:
|
||||
Common::List<StaticANIObject *> scene04_kozyawkiAni;
|
||||
|
||||
MctlLadder *scene04_ladder;
|
||||
int scene04_ladderOffset;
|
||||
|
||||
bool scene04_coinPut;
|
||||
bool scene04_soundPlaying;
|
||||
int scene04_dynamicPhaseIndex;
|
||||
@ -102,11 +104,16 @@ public:
|
||||
int scene04_sceneClickY;
|
||||
int scene04_dudePosX;
|
||||
int scene04_dudePosY;
|
||||
int scene04_bottleY;
|
||||
|
||||
StaticANIObject *scene04_walkingKozyawka;
|
||||
|
||||
int scene04_speakerVariant;
|
||||
int scene04_speakerPhase;
|
||||
|
||||
int scene04_var01;
|
||||
int scene04_var02;
|
||||
int scene04_var04;
|
||||
StaticANIObject *scene04_walkingKozyawka;
|
||||
int scene04_var06;
|
||||
int scene04_var07;
|
||||
int scene04_var08;
|
||||
@ -117,13 +124,10 @@ public:
|
||||
int scene04_var13;
|
||||
int scene04_var14;
|
||||
int scene04_var15;
|
||||
int scene04_speakerVariant;
|
||||
int scene04_speakerPhase;
|
||||
int scene04_var18;
|
||||
int scene04_var19;
|
||||
int scene04_var20;
|
||||
StaticANIObject *scene04_var24;
|
||||
int scene04_bottleY;
|
||||
|
||||
PictureObject *selector;
|
||||
};
|
||||
|
@ -282,13 +282,48 @@ void sceneHandler04_clickLadder() {
|
||||
warning("sceneHandler04_clickLadder()");
|
||||
}
|
||||
|
||||
void sceneHandler04_sub13() {
|
||||
warning("sceneHandler04_sub13()");
|
||||
void sceneHandler04_jumpOnLadder() {
|
||||
if (g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_movement->_id != MV_MAN_LOOKLADDER)
|
||||
return;
|
||||
|
||||
if (g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_STANDLADDER && g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_LADDERDOWN)
|
||||
return;
|
||||
|
||||
g_fullpipe->_aniMan->changeStatics2(ST_MAN_LADDERDOWN);
|
||||
|
||||
g_fullpipe->_aniMan->_flags |= 1;
|
||||
|
||||
MGM mgm;
|
||||
MGMInfo mgminfo;
|
||||
|
||||
mgm.addItem(ANI_MAN);
|
||||
|
||||
mgminfo.ani = g_fullpipe->_aniMan;
|
||||
mgminfo.staticsId2 = ST_MAN_ONPLANK;
|
||||
mgminfo.x1 = 938;
|
||||
mgminfo.y1 = 442;
|
||||
mgminfo.field_1C = 10;
|
||||
mgminfo.field_10 = 1;
|
||||
mgminfo.flags = 78;
|
||||
mgminfo.movementId = MV_MAN_JUMPONPLANK;
|
||||
|
||||
MessageQueue *mq = mgm.genMovement(&mgminfo);
|
||||
|
||||
if (mq) {
|
||||
mq->_flags |= 1;
|
||||
|
||||
if (!mq->chain(g_fullpipe->_aniMan))
|
||||
delete mq;
|
||||
|
||||
g_fullpipe->_aniMan->_priority = 10;
|
||||
}
|
||||
|
||||
g_vars->scene04_ladderOffset = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
|
||||
}
|
||||
|
||||
void sceneHandler04_clickPlank() {
|
||||
if (sceneHandler04_friesAreWalking())
|
||||
sceneHandler04_sub13();
|
||||
sceneHandler04_jumpOnLadder();
|
||||
else if (g_vars->scene04_var01)
|
||||
g_fullpipe->playSound(SND_4_033, 0);
|
||||
else if (!g_vars->scene04_soundPlaying)
|
||||
|
Loading…
Reference in New Issue
Block a user