Merge pull request #202 from gamemasterplc/main
Nearly match board/player.c
This commit is contained in:
commit
4008d02dda
16 changed files with 389 additions and 57 deletions
|
|
@ -1181,7 +1181,7 @@ PlayerPosLerpFunc = .text:0x80067374; // type:function size:0x218 scope:local
|
|||
BoardPlayerDiceJumpStart = .text:0x8006758C; // type:function size:0x1D4
|
||||
BoardPlayerDiceJumpCheck = .text:0x80067760; // type:function size:0x54
|
||||
DiceJumpFunc = .text:0x800677B4; // type:function size:0x3E4 scope:local
|
||||
BoardRotateDiceNumbers = .text:0x80067B98; // type:function size:0xF8
|
||||
BoardPlayerIdleSet = .text:0x80067B98; // type:function size:0xF8
|
||||
BoardPlayerMotBlendSet = .text:0x80067C90; // type:function size:0x5A0
|
||||
BoardPlayerMotBlendExec = .text:0x80068230; // type:function size:0x51C
|
||||
BoardPlayerMotBlendCheck = .text:0x8006874C; // type:function size:0x2C
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void BoardPlayerMoveToAsync(s32, s32);
|
|||
void BoardPlayerPosLerpStart(s32, Vec*, Vec*, s16);
|
||||
void BoardPlayerDiceJumpStart(s32);
|
||||
s32 BoardPlayerDiceJumpCheck(s32);
|
||||
void BoardRotateDiceNumbers(s32);
|
||||
void BoardPlayerIdleSet(s32);
|
||||
void BoardPlayerMotBlendSet(s32 arg0, s16 arg1, s16 arg2);
|
||||
|
||||
void BoardPlayerBtnDownWait(s32, u32);
|
||||
|
|
@ -151,7 +151,5 @@ s32 BoardPlayerMotBlendCheck(s32);
|
|||
void BoardPlayerMoveAwayStartCurr(s32, s32);
|
||||
void BoardBowserSuitMotionSetWalk(void);
|
||||
s16 BoardBowserSuitModelGet(void);
|
||||
void MoveAwayObjFunc(omObjData*);
|
||||
void UpdateBowserSuit(omObjData*);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ void fn_1_9044(omObjData* arg0, someBits3* arg1) {
|
|||
arg0->trans.x *= 0.5f;
|
||||
if (arg0->trans.x <= 1.0f) {
|
||||
arg0->trans.y = 0.0f;
|
||||
BoardRotateDiceNumbers(arg1->unk00_bit5);
|
||||
BoardPlayerIdleSet(arg1->unk00_bit5);
|
||||
BoardModelMotionShiftSet(lbl_1_bss_C[10], 1, 0.0f, 10.0f, 0x40000001U);
|
||||
arg1->unk00_bit0 = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ s32 fn_1_9CF4(s32 arg0) {
|
|||
while (GWPlayer[arg0].moving != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
HuPrcSleep(0x3C);
|
||||
fn_1_B0A4(arg0);
|
||||
fn_1_9F78();
|
||||
|
|
@ -526,7 +526,7 @@ void fn_1_ACD8(s32 arg0) {
|
|||
temp_r31->unk00_bit1 = arg0;
|
||||
switch (arg0) {
|
||||
case 0:
|
||||
BoardRotateDiceNumbers(temp_r31->unk00_bit4);
|
||||
BoardPlayerIdleSet(temp_r31->unk00_bit4);
|
||||
return;
|
||||
case 2:
|
||||
temp_r31->unk00_bit6 = 1;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ s32 fn_1_6898(s32 arg0) {
|
|||
s32 i, j;
|
||||
s32 temp, temp2;
|
||||
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
BoardCameraViewSet(2);
|
||||
BoardCameraMotionWait();
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ void fn_1_6F9C(s32 arg0) {
|
|||
|
||||
BoardPlayerMotionShiftSet(arg0, 5, 0.0f, 8.0f, 0U);
|
||||
HuPrcSleep(10);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelHookSet(lbl_1_data_388, "chara01", BoardPlayerModelGet(arg0));
|
||||
} else {
|
||||
|
|
@ -410,7 +410,7 @@ void fn_1_735C(s32 arg0) {
|
|||
while (BoardPlayerMotBlendCheck(arg0) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
GWPlayer[arg0].space_curr = temp_r29;
|
||||
GWPlayer[arg0].space_prev = -1;
|
||||
BoardPlayerPostTurnHookSet(arg0, fn_1_6698);
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ s32 fn_1_1650(s32 arg0) {
|
|||
f32 temp;
|
||||
s32 temp2;
|
||||
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
|
||||
if (lbl_1_bss_0->unk2) {
|
||||
BoardWinCreate(0, 0x160000, -1);
|
||||
|
|
@ -207,7 +207,7 @@ s32 fn_1_1650(s32 arg0) {
|
|||
HuPrcVSleep();
|
||||
}
|
||||
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
BoardWinCreate(2, 0x160001, 2);
|
||||
BoardWinWait();
|
||||
BoardWinCreateChoice(0, 0x160002, -1, 0);
|
||||
|
|
@ -284,7 +284,7 @@ void fn_1_19DC(s32 arg0, s32 arg1) {
|
|||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
HuPrcSleep(0x14);
|
||||
temp = (180.0f + BoardPlayerRotYGet(arg0));
|
||||
BoardPlayerMotBlendSet(arg0, temp, 0xF);
|
||||
|
|
@ -376,7 +376,7 @@ void fn_1_1ED4(s32 arg0) {
|
|||
while (BoardFilterFadePauseCheck() == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
|
||||
while (BoardMusStatusGet(1) != 0) {
|
||||
HuPrcVSleep();
|
||||
|
|
@ -448,7 +448,7 @@ void fn_1_20E0(s32 arg0) {
|
|||
BoardCameraMotionWait();
|
||||
}
|
||||
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
while (BoardMusStatusGet(1) != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
|
|
@ -520,7 +520,7 @@ void fn_1_26E0(s32 arg0) {
|
|||
}
|
||||
BoardCameraMotionWait();
|
||||
BoardModelMotionStart(lbl_1_bss_C[1], 0, 0);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
|
||||
void fn_1_2818(void) {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ extern void BoardCameraViewSet(s32);
|
|||
extern void BoardPlayerPosGet(s32, Vec*);
|
||||
extern void BoardPlayerMotionEndWait(s32);
|
||||
extern void BoardPlayerCoinsAdd(s32, s32);
|
||||
extern void BoardRotateDiceNumbers(s32);
|
||||
extern void BoardPlayerIdleSet(s32);
|
||||
extern void BoardCameraMotBlendSet(s32, s16, s16);
|
||||
extern s32 BoardPlayerMotBlendCheck(s32);
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ void BoardLandBlueExec(s32 player, s32 space) {
|
|||
}
|
||||
GWPlayer[player].color = 1;
|
||||
BoardPlayerMotionEndWait(player);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
}
|
||||
|
||||
void BoardLandRedExec(s32 player, s32 space) {
|
||||
|
|
@ -143,7 +143,7 @@ void BoardLandRedExec(s32 player, s32 space) {
|
|||
}
|
||||
GWPlayer[player].color = 2;
|
||||
BoardPlayerMotionEndWait(player);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
}
|
||||
|
||||
s8 BoardCoinChgCreate(Vec *pos, s8 value) {
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ static void ExecBattle(void) {
|
|||
}
|
||||
StopBattleBomb();
|
||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
BoardRotateDiceNumbers(var_r31);
|
||||
BoardPlayerIdleSet(var_r31);
|
||||
BoardPlayerVoiceEnableSet(var_r31, 6, 1);
|
||||
}
|
||||
BoardAudSeqPause(0, 0, 1000);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static void BlockProc(void) {
|
|||
|
||||
player_character = GWPlayer[player].character;
|
||||
jumpMot = BoardPlayerMotionCreate(player, sp14[player_character]);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
BoardPlayerMotBlendSet(player, 0, 0xF);
|
||||
omVibrate(player, 12, 12, 0);
|
||||
CreateBlockObj(player);
|
||||
|
|
@ -122,7 +122,7 @@ static void BlockProc(void) {
|
|||
while (BoardPlayerMotionEndCheck(player) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
|
||||
if (work->contains_star != 0) {
|
||||
SetBlockStop();
|
||||
|
|
@ -162,7 +162,7 @@ static void BlockProc(void) {
|
|||
KillCoinMdl();
|
||||
work->kill = 1;
|
||||
|
||||
BoardRotateDiceNumbers((s32) player);
|
||||
BoardPlayerIdleSet((s32) player);
|
||||
HuPrcVSleep();
|
||||
|
||||
if ((_CheckFlag(0x1000B) != 0) && work->contains_star == 0) {
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ static inline void BoardUiInlineFunc03(s32 arg0) {
|
|||
while (!BoardPlayerMotBlendCheck(arg0)) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
|
||||
static inline void BoardUiInlineFunc04(Process *arg0, s32 arg1) {
|
||||
|
|
@ -943,7 +943,7 @@ static void ExecItemPipe(void) {
|
|||
BoardPlayerMotionShiftSet(sp2C[1], 6, 0.0f, 8.0f, 0x40000001);
|
||||
BoardModelVoiceEnableSet(BoardPlayerModelGet(sp2C[1]), 6, 0);
|
||||
CharModelLayerSetAll(2);
|
||||
BoardRotateDiceNumbers(sp2C[0]);
|
||||
BoardPlayerIdleSet(sp2C[0]);
|
||||
for (var_r31 = 0; var_r31 < 0x2D; var_r31++) {
|
||||
sp9C.y -= 0.044444446f;
|
||||
for (var_r30 = 0; var_r30 < 2; var_r30++) {
|
||||
|
|
@ -960,7 +960,7 @@ static void ExecItemPipe(void) {
|
|||
BoardWinInsertMesSet(GWPlayerCfg[sp2C[1]].character, 1);
|
||||
BoardWinWait();
|
||||
BoardWinKill();
|
||||
BoardRotateDiceNumbers(sp2C[1]);
|
||||
BoardPlayerIdleSet(sp2C[1]);
|
||||
HuPrcSleep(8);
|
||||
BoardModelVoiceEnableSet(BoardPlayerModelGet(sp2C[1]), 6, 1);
|
||||
}
|
||||
|
|
@ -1240,7 +1240,7 @@ static void ExecItemSpark(void) {
|
|||
while (!BoardPlayerMotBlendCheck(currItemRestore)) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(currItemRestore);
|
||||
BoardPlayerIdleSet(currItemRestore);
|
||||
BoardSpacePosGet(0, temp_r28, &sp5C);
|
||||
BoardModelPosSetV(temp_r30, &sp5C);
|
||||
sp5C.y += 106.0f;
|
||||
|
|
@ -1423,7 +1423,7 @@ static void ExecItemWhistle(void) {
|
|||
HuPrcVSleep();
|
||||
}
|
||||
BoardModelHookObjReset(sp8, temp_r22);
|
||||
BoardRotateDiceNumbers(currItemRestore);
|
||||
BoardPlayerIdleSet(currItemRestore);
|
||||
BoardModelKill(suitMdl);
|
||||
BoardCameraMoveSet(0);
|
||||
temp_r18 = BoardSpaceStarGetCurr();
|
||||
|
|
@ -2280,7 +2280,7 @@ static void GenieSceneExec(void) {
|
|||
}
|
||||
GenieCameraCalc(&cameraDataTbl[0], var_r26, 1.0f, &booCamPos, &booCamUp);
|
||||
HuPrcSleep(0x96);
|
||||
BoardRotateDiceNumbers(currItemRestore);
|
||||
BoardPlayerIdleSet(currItemRestore);
|
||||
sp2C = booCamPos;
|
||||
sp20 = booCamUp;
|
||||
booCamUp.x = sp38.x + (sp50.x - sp38.x) * 0.7f;
|
||||
|
|
@ -2431,7 +2431,7 @@ static void ExecItemGenie(void) {
|
|||
Hu3DModelKill(temp_r31);
|
||||
BoardModelKill(suitMdl);
|
||||
HuPrcKill(temp_r27);
|
||||
BoardRotateDiceNumbers(currItemRestore);
|
||||
BoardPlayerIdleSet(currItemRestore);
|
||||
GenieSceneExec();
|
||||
BoardCameraMoveSet(0);
|
||||
BoardCameraViewSet(2);
|
||||
|
|
@ -2482,7 +2482,7 @@ static void ExecItemGenie(void) {
|
|||
BoardPlayerPosSetV(currItemRestore, &spC);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(currItemRestore);
|
||||
BoardPlayerIdleSet(currItemRestore);
|
||||
CharModelEffectEnableSet(GWPlayer[currItemRestore].character, 1);
|
||||
HuSprAnimKill(genieParticleAnim);
|
||||
BoardPlayerMotionKill(currItemRestore, geniePlayerMot[0]);
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ static void ExecLottery(void) {
|
|||
temp_r29 = BoardDataDirReadAsync(0x50000);
|
||||
temp_r31 = GWSystem.player_curr;
|
||||
temp_r28 = GWPlayer[temp_r31].space_curr;
|
||||
BoardRotateDiceNumbers(temp_r31);
|
||||
BoardPlayerIdleSet(temp_r31);
|
||||
BoardWinCreateChoice(0, 0x60000, -1, 0);
|
||||
if (GWPlayer[temp_r31].com) {
|
||||
if (BoardPlayerCoinsGet(temp_r31) >= 5) {
|
||||
|
|
@ -503,7 +503,7 @@ static void ExecLottery(void) {
|
|||
}
|
||||
}
|
||||
BoardMusStart(1, 2, 0x7F, 0);
|
||||
BoardRotateDiceNumbers(temp_r31);
|
||||
BoardPlayerIdleSet(temp_r31);
|
||||
while (!BoardStatusStopCheck(temp_r31)) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
|
|
@ -533,7 +533,7 @@ static void ExecLottery(void) {
|
|||
while (GWPlayer[temp_r31].moving) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(temp_r31);
|
||||
BoardPlayerIdleSet(temp_r31);
|
||||
BoardModelVisibilitySet(ballMdl[currPrize & 3], 0);
|
||||
BoardAudSeqFadeOut(1, 1000);
|
||||
BoardCameraTargetPlayerSet(temp_r31);
|
||||
|
|
@ -591,7 +591,7 @@ static void DoMiniJumpUp(s32 arg0) {
|
|||
}
|
||||
sp1C.y = sp28.y;
|
||||
BoardPlayerPosSetV(arg0, &sp1C);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
|
||||
static void DoMiniJumpDown(s32 arg0) {
|
||||
|
|
|
|||
|
|
@ -34,10 +34,14 @@ static void MoveAwayObjFunc(omObjData*);
|
|||
static void MoveAwayObjFunc(omObjData*);
|
||||
static void UpdateBowserSuit(omObjData*);
|
||||
|
||||
static void MegaSquishFunc(omObjData *object);
|
||||
|
||||
|
||||
static s32 DoSparkSpace(s32 player, s32 pause_cam);
|
||||
static void RemoveSparkSpace(s32 player);
|
||||
static void SetRollPlayerSize(s32 player);
|
||||
static s32 MegaPlayerPassFunc(s32, s16);
|
||||
static s32 MegaPlayerPassFunc(s32 player, s32 space);
|
||||
static s32 MegaExecJump(s32 player, s32 space);
|
||||
|
||||
//TODO: Give better name
|
||||
typedef struct bitcopy {
|
||||
|
|
@ -134,7 +138,7 @@ static s32 boardSparkSfxTblAlt[] = {
|
|||
0x223, 0x263, 0x2A3, 0x2E3,
|
||||
};
|
||||
|
||||
static s32 megaSquishObj[] = {
|
||||
static omObjData *megaSquishObj[] = {
|
||||
0, 0, 0, 0,
|
||||
};
|
||||
|
||||
|
|
@ -826,7 +830,7 @@ block_14:
|
|||
} while (1);
|
||||
BoardPauseDisableSet(1);
|
||||
BoardDiceDigit2DUpdateEnable(arg0);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardCameraTargetPlayerSet(arg0);
|
||||
}
|
||||
|
|
@ -911,7 +915,7 @@ void BoardPlayerZoomRestore(s32 arg0) {
|
|||
while (BoardPlayerMotBlendCheck(arg0) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
|
||||
void BoardJunctionMaskSet(s32 arg0) {
|
||||
|
|
@ -1243,7 +1247,7 @@ static s32 DoDebugMove(s32 arg0, s16* arg1) {
|
|||
} else {
|
||||
if (HuPadBtnDown[var_r20] == 0x10) {
|
||||
BoardDiceDigit2DShowSet(0);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
StopJunctionPlayer(0);
|
||||
BoardViewMapExec(arg0);
|
||||
InitJunction(arg0, sp28->space_curr, -1.0f);
|
||||
|
|
@ -1283,7 +1287,7 @@ static s32 DoDebugMove(s32 arg0, s16* arg1) {
|
|||
}
|
||||
} else {
|
||||
if (BoardPlayerMotGet(arg0) != 1) {
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardBowserSuitMotionSetWait();
|
||||
|
|
@ -1397,7 +1401,7 @@ static s32 ExecJunction(s32 arg0, s16* arg1) {
|
|||
var_f28 = -1.0f;
|
||||
sp8 = 0;
|
||||
InitJunction(arg0, sp30->space_curr, var_f28);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
HuPrcSleep(10);
|
||||
while (1) {
|
||||
|
||||
|
|
@ -1440,7 +1444,7 @@ static s32 ExecJunction(s32 arg0, s16* arg1) {
|
|||
} else if (var_r20 == 0x20 || var_r20 == 0x10) {
|
||||
HuAudFXPlay(1);
|
||||
BoardDiceDigit2DShowSet(0);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
StopJunctionPlayer(0);
|
||||
if (var_r20 == 0x10) {
|
||||
BoardViewMapExec(arg0);
|
||||
|
|
@ -1475,7 +1479,7 @@ static s32 ExecJunction(s32 arg0, s16* arg1) {
|
|||
}
|
||||
} else {
|
||||
if (BoardPlayerMotGet(arg0) != 1) {
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
}
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardBowserSuitMotionSetWait();
|
||||
|
|
@ -1706,7 +1710,7 @@ static void DiceJumpFunc(omObjData* arg0) {
|
|||
temp_r31 = OM_GET_WORK_PTR(arg0, bitcopy2);
|
||||
if ((temp_r31->field00_bit0 != 0) || (BoardIsKill() != 0)) {
|
||||
GWPlayer[temp_r31->field00_bit1].field08_bit3 = 0;
|
||||
BoardRotateDiceNumbers(temp_r31->field00_bit1);
|
||||
BoardPlayerIdleSet(temp_r31->field00_bit1);
|
||||
diceJumpObj[temp_r31->field00_bit1] = 0;
|
||||
omDelObjEx(HuPrcCurrentGet(), arg0);
|
||||
return;
|
||||
|
|
@ -1748,7 +1752,7 @@ static void DiceJumpFunc(omObjData* arg0) {
|
|||
}
|
||||
|
||||
|
||||
void BoardRotateDiceNumbers(s32 arg0)
|
||||
void BoardPlayerIdleSet(s32 arg0)
|
||||
{
|
||||
if (GWPlayer[arg0].bowser_suit) {
|
||||
BoardBowserSuitMotionSetWait();
|
||||
|
|
@ -2299,7 +2303,7 @@ static s32 DoSparkSpace(s32 player, s32 pause_cam)
|
|||
}
|
||||
BoardCameraMotionWait();
|
||||
BoardCameraTargetPlayerSet(player);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
temp_r28 = BoardModelCreate(0x70074, NULL, 0);
|
||||
BoardModelMotionStart(temp_r28, 0, 0x40000002);
|
||||
BoardModelMotionTimeSet(temp_r28, 30.0f);
|
||||
|
|
@ -2348,7 +2352,7 @@ static s32 DoSparkSpace(s32 player, s32 pause_cam)
|
|||
temp_r17 = BoardRollTypeGet();
|
||||
if(temp_r17 == 0 || temp_r17 == 1 || temp_r17 == 2 || temp_r17 == 3 || temp_r17 == 10) {
|
||||
BoardCameraTargetPlayerSet(player);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
HuPrcSleep(12);
|
||||
BoardItemPlayerRestore(player, temp_r17);
|
||||
while(!BoardItemDoneCheck()) {
|
||||
|
|
@ -2393,7 +2397,7 @@ static s32 DoSparkSpace(s32 player, s32 pause_cam)
|
|||
BoardModelKill(temp_r28);
|
||||
BoardModelKill(sp2E);
|
||||
for(i=0; i<4; i++) {
|
||||
BoardRotateDiceNumbers(sp124[i]);
|
||||
BoardPlayerIdleSet(sp124[i]);
|
||||
}
|
||||
HuPrcSleep(10);
|
||||
GWSystem.player_curr = -1;
|
||||
|
|
@ -2498,6 +2502,337 @@ void BoardPlayerResizeAnimExec(s32 player, s32 size)
|
|||
BoardPlayerSizeSet(player, size);
|
||||
}
|
||||
|
||||
typedef struct mega_squish_work {
|
||||
struct {
|
||||
u8 kill : 1;
|
||||
u8 no_coinchg : 1;
|
||||
u8 played_snd : 1;
|
||||
u8 gain_player : 2;
|
||||
};
|
||||
s8 player;
|
||||
s8 state;
|
||||
s8 coinchg;
|
||||
s8 loss;
|
||||
s8 disappear_time;
|
||||
s8 disappear_len;
|
||||
u16 hide_time;
|
||||
} MegaSquishWork;
|
||||
|
||||
static void MegaSquishFunc(omObjData *object)
|
||||
{
|
||||
MegaSquishWork *work = OM_GET_WORK_PTR(object, MegaSquishWork);
|
||||
Vec pos;
|
||||
if(work->kill || BoardIsKill()) {
|
||||
if(work->coinchg != -1) {
|
||||
BoardCoinChgHide(work->coinchg);
|
||||
}
|
||||
megaSquishObj[work->player] = NULL;
|
||||
omDelObjEx(HuPrcCurrentGet(), object);
|
||||
return;
|
||||
}
|
||||
if(work->hide_time != 0) {
|
||||
work->hide_time--;
|
||||
return;
|
||||
}
|
||||
switch(work->state) {
|
||||
case 1:
|
||||
if(!work->played_snd) {
|
||||
HuAudFXPlay(798);
|
||||
HuAudFXPlay(megaSquishSfxTbl[GWPlayer[work->player].character]);
|
||||
work->played_snd = 1;
|
||||
}
|
||||
BoardPlayerMotionStart(work->player, 10, 0);
|
||||
BoardPlayerMotionSpeedSet(work->player, 2.0f);
|
||||
work->state = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
if(!BoardModelMotionTimeGet(BoardPlayerModelGet(work->player) >= 50.0f)) {
|
||||
return;
|
||||
}
|
||||
BoardPlayerMotionSpeedSet(work->player, 0.0f);
|
||||
BoardPlayerPosGet(work->player, &pos);
|
||||
pos.y += 10.0f;
|
||||
BoardPlayerPosSetV(work->player, &pos);
|
||||
work->hide_time = 20;
|
||||
work->state = 3;
|
||||
work->coinchg = -1;
|
||||
work->disappear_time = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if(work->coinchg == -1) {
|
||||
BoardPlayerPosGet(work->player, &pos);
|
||||
|
||||
pos.y += 250.0f;
|
||||
if(!work->no_coinchg) {
|
||||
work->coinchg = BoardCoinChgCreate(&pos, -work->loss);
|
||||
} else {
|
||||
work->state = 4;
|
||||
work->hide_time = work->disappear_len;
|
||||
}
|
||||
}
|
||||
if(work->disappear_time++ < work->disappear_len) {
|
||||
return;
|
||||
}
|
||||
work->disappear_time = 0;
|
||||
if(work->loss <= 0) {
|
||||
work->state = 4;
|
||||
HuAudFXPlay(15);
|
||||
} else {
|
||||
work->loss--;
|
||||
BoardPlayerCoinsAdd(work->player, -1);
|
||||
HuAudFXPlay(14);
|
||||
BoardPlayerCoinsAdd(work->gain_player, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
BoardPlayerMotionSpeedSet(work->player, 2.0f);
|
||||
BoardPlayerPosGet(work->player, &pos);
|
||||
pos.y -= 10.0f;
|
||||
BoardPlayerPosSetV(work->player, &pos);
|
||||
work->state = 5;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if(!BoardPlayerMotionEndCheck(work->player)) {
|
||||
return;
|
||||
}
|
||||
BoardPlayerIdleSet(work->player);
|
||||
work->kill = 1;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 MegaPlayerPassFunc(s32 player, s32 space)
|
||||
{
|
||||
float temp_f30;
|
||||
float temp_f29;
|
||||
MegaSquishWork *temp_r31;
|
||||
s32 temp_r29;
|
||||
MegaSquishWork *temp_r28;
|
||||
s32 temp_r27;
|
||||
s32 temp_r26;
|
||||
s32 temp_r24;
|
||||
omObjData *temp_r23;
|
||||
s32 spD0[4];
|
||||
Vec spC4;
|
||||
Vec spB8;
|
||||
Vec spAC;
|
||||
Vec spA0;
|
||||
float sp98[2];
|
||||
|
||||
|
||||
if(GWPlayer[player].bowser_suit) {
|
||||
return MegaExecJump(player, space);
|
||||
}
|
||||
if(BoardPlayerSizeGet(player) != 2) {
|
||||
return 0;
|
||||
}
|
||||
spD0[0] = spD0[1] = spD0[2] = -1;
|
||||
for(temp_r26=temp_r29=0; temp_r29<4; temp_r29++) {
|
||||
if(temp_r29 != player && GWPlayer[temp_r29].space_curr == space) {
|
||||
spD0[temp_r26++] = temp_r29;
|
||||
BoardPlayerPosGet(temp_r29, &spA0);
|
||||
temp_r23 = omAddObjEx(boardObjMan, 256, 0, 0, -1, MegaSquishFunc);
|
||||
megaSquishObj[temp_r29] = temp_r23;
|
||||
temp_r31 = OM_GET_WORK_PTR(temp_r23, MegaSquishWork);
|
||||
temp_r31->kill = 0;
|
||||
temp_r31->player = temp_r29;
|
||||
temp_r31->gain_player = player;
|
||||
temp_r31->state = 0;
|
||||
temp_r31->hide_time = 0;
|
||||
temp_r31->loss = 0;
|
||||
temp_r31->disappear_len = 3;
|
||||
temp_r31->disappear_time = 0;
|
||||
temp_r31->played_snd = 0;
|
||||
if(BoardPlayerCoinsGet(temp_r31->player) <= 0) {
|
||||
temp_r31->no_coinchg = 1;
|
||||
} else {
|
||||
temp_r31->no_coinchg = 0;
|
||||
}
|
||||
if(BoardPlayerCoinsGet(temp_r31->player) >= 10) {
|
||||
temp_r31->loss = 10;
|
||||
} else {
|
||||
temp_r31->loss = BoardPlayerCoinsGet(temp_r31->player);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(temp_r26 == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (_CheckFlag(0x1000BU) != 0) {
|
||||
BoardTutorialHookExec(24, 0);
|
||||
}
|
||||
BoardPlayerPosGet(player, &spB8);
|
||||
BoardSpacePosGet(0, space, &spC4);
|
||||
sp98[0] = spB8.y;
|
||||
if(spC4.y > spB8.y) {
|
||||
spB8.y += 300.0f;
|
||||
} else {
|
||||
spB8.y += 200.0f;
|
||||
}
|
||||
VECSubtract(&spC4, &spB8, &spAC);
|
||||
spAC.x /= 60.0f;
|
||||
spAC.z /= 60.0f;
|
||||
BoardPlayerRotYSet(player, 90.0-(180.0*(atan2(spAC.z, spAC.x)/M_PI)));
|
||||
sp98[1] = BoardVecDistXZCalc(&spC4, &spB8);
|
||||
BoardPlayerMotionShiftSet(player, 4, 0, 8, 0);
|
||||
HuPrcSleep(8);
|
||||
temp_r24 = 0;
|
||||
for(temp_f30=0; temp_f30<60.0f; temp_f30++) {
|
||||
temp_f29 = spB8.y;
|
||||
spB8.x += spAC.x;
|
||||
spB8.z += spAC.z;
|
||||
spB8.y += 10.0f + (0.9f*(-0.020416668f * temp_f30 * temp_f30));
|
||||
if(temp_f29 > spB8.y) {
|
||||
temp_r24 = 1;
|
||||
}
|
||||
if(spB8.y <= 200.0f+spC4.y && temp_r24) {
|
||||
for(temp_r27=0; temp_r27<4; temp_r27++) {
|
||||
if(megaSquishObj[temp_r27]) {
|
||||
temp_r28 = OM_GET_WORK_PTR(megaSquishObj[temp_r27], MegaSquishWork);
|
||||
if((s16)space == GWPlayer[temp_r28->player].space_curr && temp_r28->state != 1) {
|
||||
temp_r28->state = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(spB8.y <= spC4.y) {
|
||||
spB8.y = spC4.y;
|
||||
BoardPlayerMotionShiftSet(player, 5, 0, 4, 0);
|
||||
}
|
||||
BoardPlayerPosSetV(player, &spB8);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardCameraQuakeSet(30, 500.0f);
|
||||
omVibrate(0, 12, 4, 2);
|
||||
omVibrate(1, 12, 4, 2);
|
||||
omVibrate(2, 12, 4, 2);
|
||||
omVibrate(3, 12, 4, 2);
|
||||
BoardPlayerIdleSet(player);
|
||||
HuPrcSleep(30);
|
||||
}
|
||||
|
||||
static s32 MegaExecJump(s32 player, s32 space)
|
||||
{
|
||||
float temp_f30;
|
||||
float temp_f29;
|
||||
MegaSquishWork *temp_r31;
|
||||
s32 temp_r29;
|
||||
MegaSquishWork *temp_r28;
|
||||
s32 temp_r27;
|
||||
s32 temp_r26;
|
||||
s32 temp_r25;
|
||||
s32 temp_r24;
|
||||
omObjData *temp_r23;
|
||||
s32 spD0[4];
|
||||
Vec spC4;
|
||||
Vec spB8;
|
||||
Vec spAC;
|
||||
Vec spA0;
|
||||
float sp90[2];
|
||||
spD0[0] = spD0[1] = spD0[2] = -1;
|
||||
for(temp_r26=temp_r29=0; temp_r29<4; temp_r29++) {
|
||||
if(temp_r29 != player && GWPlayer[temp_r29].space_curr == space) {
|
||||
spD0[temp_r26++] = temp_r29;
|
||||
BoardPlayerPosGet(temp_r29, &spA0);
|
||||
temp_r23 = omAddObjEx(boardObjMan, 256, 0, 0, -1, MegaSquishFunc);
|
||||
megaSquishObj[temp_r29] = temp_r23;
|
||||
temp_r31 = OM_GET_WORK_PTR(temp_r23, MegaSquishWork);
|
||||
temp_r31->kill = 0;
|
||||
temp_r31->player = temp_r29;
|
||||
temp_r31->gain_player = player;
|
||||
temp_r31->state = 0;
|
||||
temp_r31->hide_time = 0;
|
||||
temp_r31->loss = 0;
|
||||
temp_r31->disappear_len = 3;
|
||||
temp_r31->disappear_time = 0;
|
||||
if(BoardPlayerCoinsGet(temp_r31->player) <= 0) {
|
||||
temp_r31->no_coinchg = 1;
|
||||
} else {
|
||||
temp_r31->no_coinchg = 0;
|
||||
}
|
||||
if(BoardPlayerCoinsGet(temp_r31->player) >= 30) {
|
||||
temp_r31->loss = 30;
|
||||
} else {
|
||||
temp_r31->loss = BoardPlayerCoinsGet(temp_r31->player);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(temp_r26 == 0) {
|
||||
return 0;
|
||||
}
|
||||
BoardPlayerPosGet(player, &spB8);
|
||||
BoardSpacePosGet(0, space, &spC4);
|
||||
sp90[0] = spB8.y;
|
||||
if(spC4.y > spB8.y) {
|
||||
spB8.y += 300.0f;
|
||||
} else {
|
||||
spB8.y += 200.0f;
|
||||
}
|
||||
VECSubtract(&spC4, &spB8, &spAC);
|
||||
spAC.x /= 60.0f;
|
||||
spAC.z /= 60.0f;
|
||||
BoardPlayerRotYSet(player, 90.0-(180.0*(atan2(spAC.z, spAC.x)/M_PI)));
|
||||
BoardPlayerIdleSet(player);
|
||||
HuPrcSleep(10);
|
||||
sp90[1] = BoardVecDistXZCalc(&spC4, &spB8);
|
||||
BoardModelMotionShiftSet(suitMdl, bowserSuitMot[3], 0.0f, 8.0f, 0);
|
||||
BoardModelMotionSpeedSet(suitMdl, 2.0f);
|
||||
HuPrcSleep(8);
|
||||
HuAudFXPlay(809);
|
||||
temp_r24 = 0;
|
||||
temp_r25 = 0;
|
||||
for(temp_f30=0; temp_f30<60.0f; temp_f30++) {
|
||||
temp_f29 = spB8.y;
|
||||
spB8.x += spAC.x;
|
||||
spB8.z += spAC.z;
|
||||
spB8.y += 10.0f + (0.9f*(-0.020416668f * temp_f30 * temp_f30));
|
||||
if(temp_f29 > spB8.y) {
|
||||
temp_r25 = 1;
|
||||
}
|
||||
if(spB8.y <= 200.0f+spC4.y && temp_r25) {
|
||||
for(temp_r27=0; temp_r27<4; temp_r27++) {
|
||||
if(megaSquishObj[temp_r27]) {
|
||||
temp_r28 = OM_GET_WORK_PTR(megaSquishObj[temp_r27], MegaSquishWork);
|
||||
if((s16)space == GWPlayer[temp_r28->player].space_curr && temp_r28->state != 1) {
|
||||
temp_r28->state = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(spB8.y <= spC4.y) {
|
||||
spB8.y = spC4.y;
|
||||
if(!temp_r24) {
|
||||
BoardPlayerIdleSet(player);
|
||||
HuAudFXPlay(810);
|
||||
temp_r24 = 1;
|
||||
}
|
||||
|
||||
}
|
||||
BoardPlayerPosSetV(player, &spB8);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardCameraQuakeSet(30, 500.0f);
|
||||
omVibrate(0, 12, 4, 2);
|
||||
omVibrate(1, 12, 4, 2);
|
||||
omVibrate(2, 12, 4, 2);
|
||||
omVibrate(3, 12, 4, 2);
|
||||
BoardPlayerIdleSet(player);
|
||||
HuPrcSleep(30);
|
||||
}
|
||||
|
||||
void BoardPlayerCopyEyeMat(s32 arg0, s32 arg1) {
|
||||
HsfMaterial* var_r29;
|
||||
s32 var_r24;
|
||||
|
|
@ -2543,7 +2878,6 @@ void BoardPlayerCopyEyeMat(s32 arg0, s32 arg1) {
|
|||
DCStoreRange(hsfData->material, hsfData->materialCnt * 0x3C);
|
||||
}
|
||||
|
||||
|
||||
void BoardPlayerCopyMat(s32 arg0) {
|
||||
s16 modelID;
|
||||
ModelData *model;
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ s32 BoardSpaceWalkExec(s32 player, s32 space)
|
|||
if(space_ptr->flag & 0x600000) {
|
||||
s32 mg_param = GWSystem.unk_38;
|
||||
if(BoardPlayerSizeGet(player) == 1) {
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
BoardMGCreate(mg_param);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ static void ExecStar(void) {
|
|||
temp_f30 = 90.0 - 180.0 * (atan2(spC.z, spC.x) / M_PI);
|
||||
temp_f30 = 90.0f * ((temp_f30 + 3.0f) / 90.0f);
|
||||
temp_f29 = BoardPlayerRotYGet(temp_r31);
|
||||
BoardRotateDiceNumbers(temp_r31);
|
||||
BoardPlayerIdleSet(temp_r31);
|
||||
if (BoardDAngleCalc(temp_f30 - temp_f29) < 0.0f) {
|
||||
var_f28 = -BoardDAngleCalc(temp_f30 - temp_f29);
|
||||
} else {
|
||||
|
|
@ -689,7 +689,7 @@ void BoardStarShowNext(s32 arg0) {
|
|||
BoardAudSeqFadeOut(0, 1000);
|
||||
}
|
||||
showNextObj = omAddObjEx(boardObjMan, 0x7E03, 0, 0, -1, ShowNextUpdate);
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
BoardPlayerIdleSet(arg0);
|
||||
BoardModelMotionStart(BoardStarHostMdlGet(), 1, 0x40000001);
|
||||
BoardModelPosGet(BoardStarHostMdlGet(), &sp50);
|
||||
showNextObj->scale.x = sp50.x;
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,7 @@ static void FinishItemUse(s16 arg0, s32 arg1) {
|
|||
case 10:
|
||||
HuPrcSleep(2);
|
||||
BoardBowserSuitMotionCreate();
|
||||
BoardRotateDiceNumbers(itemPlayer);
|
||||
BoardPlayerIdleSet(itemPlayer);
|
||||
BoardModelLayerSet(BoardBowserSuitModelGet(), 0);
|
||||
BoardModelLayerSet(BoardBowserSuitPlayerModelGet(), 0);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void WarpProcess(void) {
|
|||
HuPrcVSleep();
|
||||
}
|
||||
|
||||
BoardRotateDiceNumbers(curr_player);
|
||||
BoardPlayerIdleSet(curr_player);
|
||||
if (_CheckFlag(0x1000B) != 0) {
|
||||
BoardTutorialHookExec(18, 0);
|
||||
boardTutorialData[0] = 0;
|
||||
|
|
@ -144,7 +144,7 @@ static void WarpInit(s32 player) {
|
|||
HuAudFXPlay(835);
|
||||
BoardPlayerRotYSet(player, 0.0f);
|
||||
BoardPlayerPosSet(player, 0.0f, 0.0f, 0.0f);
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardPlayerIdleSet(player);
|
||||
}
|
||||
|
||||
static void WarpLaunch(s32 player) {
|
||||
|
|
@ -245,7 +245,7 @@ static void WarpImpact(s32 player) {
|
|||
HuPrcSleep(60);
|
||||
|
||||
for (i = 0; i < warpImpactCnt; i++) {
|
||||
BoardRotateDiceNumbers(warpImpactPlayer[i]);
|
||||
BoardPlayerIdleSet(warpImpactPlayer[i]);
|
||||
}
|
||||
warpState = 6;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue