Clean up warp code

This commit is contained in:
gamemasterplc 2024-01-06 21:33:46 -06:00
parent b2186e5d09
commit ce59e5a3d7
6 changed files with 180 additions and 193 deletions

View file

@ -1484,8 +1484,8 @@ fn_8007F6BC = .text:0x8007F6BC; // type:function size:0xA4
fn_8007F760 = .text:0x8007F760; // type:function size:0xFC fn_8007F760 = .text:0x8007F760; // type:function size:0xFC
fn_8007F85C = .text:0x8007F85C; // type:function size:0x38 fn_8007F85C = .text:0x8007F85C; // type:function size:0x38
fn_8007F894 = .text:0x8007F894; // type:function size:0x2BC fn_8007F894 = .text:0x8007F894; // type:function size:0x2BC
BoardEventLandBlue = .text:0x8007FB50; // type:function size:0x184 BoardLandBlueExec = .text:0x8007FB50; // type:function size:0x184
BoardEventLandRed = .text:0x8007FCD4; // type:function size:0x19C BoardLandRedExec = .text:0x8007FCD4; // type:function size:0x19C
BoardCoinChgCreate = .text:0x8007FE70; // type:function size:0x1E8 BoardCoinChgCreate = .text:0x8007FE70; // type:function size:0x1E8
BoardCoinChgExist = .text:0x80080058; // type:function size:0x6C BoardCoinChgExist = .text:0x80080058; // type:function size:0x6C
BoardCoinChgHide = .text:0x800800C4; // type:function size:0x60 BoardCoinChgHide = .text:0x800800C4; // type:function size:0x60
@ -1495,14 +1495,14 @@ CoinChgAppear = .text:0x800804F8; // type:function size:0x1B8 scope:local
CoinChgSeparate = .text:0x800806B0; // type:function size:0x29C scope:local CoinChgSeparate = .text:0x800806B0; // type:function size:0x29C scope:local
CoinChgShow = .text:0x8008094C; // type:function size:0x1A8 scope:local CoinChgShow = .text:0x8008094C; // type:function size:0x1A8 scope:local
CoinChgDisappear = .text:0x80080AF4; // type:function size:0x260 scope:local CoinChgDisappear = .text:0x80080AF4; // type:function size:0x260 scope:local
fn_80080D54 = .text:0x80080D54; // type:function size:0xA4 BoardWarpExec = .text:0x80080D54; // type:function size:0xA4
fn_80080DF8 = .text:0x80080DF8; // type:function size:0x250 WarpProcess = .text:0x80080DF8; // type:function size:0x250 scope:local
fn_80081048 = .text:0x80081048; // type:function size:0x5C WarpKill = .text:0x80081048; // type:function size:0x5C scope:local
fn_800810A4 = .text:0x800810A4; // type:function size:0x118 WarpInit = .text:0x800810A4; // type:function size:0x118 scope:local
fn_800811BC = .text:0x800811BC; // type:function size:0xBC WarpLaunch = .text:0x800811BC; // type:function size:0xBC scope:local
fn_80081278 = .text:0x80081278; // type:function size:0x1B0 WarpStartImpact = .text:0x80081278; // type:function size:0x1B0 scope:local
fn_80081428 = .text:0x80081428; // type:function size:0xA4 WarpFall = .text:0x80081428; // type:function size:0xA4 scope:local
fn_800814CC = .text:0x800814CC; // type:function size:0x200 WarpImpact = .text:0x800814CC; // type:function size:0x200 scope:local
fn_800816CC = .text:0x800816CC; // type:function size:0x11C fn_800816CC = .text:0x800816CC; // type:function size:0x11C
fn_800817E8 = .text:0x800817E8; // type:function size:0x34 fn_800817E8 = .text:0x800817E8; // type:function size:0x34
fn_8008181C = .text:0x8008181C; // type:function size:0x50 fn_8008181C = .text:0x8008181C; // type:function size:0x50
@ -5542,7 +5542,7 @@ lbl_801A4A74 = .bss:0x801A4A74; // type:object size:0x1C
lbl_801A4A90 = .bss:0x801A4A90; // type:object size:0xC data:2byte lbl_801A4A90 = .bss:0x801A4A90; // type:object size:0xC data:2byte
lbl_801A4A9C = .bss:0x801A4A9C; // type:object size:0xC lbl_801A4A9C = .bss:0x801A4A9C; // type:object size:0xC
lbl_801A4AA8 = .bss:0x801A4AA8; // type:object size:0x18 data:2byte lbl_801A4AA8 = .bss:0x801A4AA8; // type:object size:0x18 data:2byte
lbl_801A4AC0 = .bss:0x801A4AC0; // type:object size:0x10 warpPos = .bss:0x801A4AC0; // type:object size:0x10 scope:local
lbl_801A4AD0 = .bss:0x801A4AD0; // type:object size:0x10 data:4byte lbl_801A4AD0 = .bss:0x801A4AD0; // type:object size:0x10 data:4byte
lbl_801A4AE0 = .bss:0x801A4AE0; // type:object size:0x10 lbl_801A4AE0 = .bss:0x801A4AE0; // type:object size:0x10
itemMdlId = .bss:0x801A4AF0; // type:object size:0x18 scope:local itemMdlId = .bss:0x801A4AF0; // type:object size:0x18 scope:local
@ -5849,9 +5849,9 @@ lbl_801D373A = .sdata:0x801D373A; // type:object size:0x2 data:2byte
lbl_801D373C = .sdata:0x801D373C; // type:object size:0x8 lbl_801D373C = .sdata:0x801D373C; // type:object size:0x8
lbl_801D3744 = .sdata:0x801D3744; // type:object size:0x2 data:2byte lbl_801D3744 = .sdata:0x801D3744; // type:object size:0x2 data:2byte
lbl_801D3746 = .sdata:0x801D3746; // type:object size:0x2 data:2byte lbl_801D3746 = .sdata:0x801D3746; // type:object size:0x2 data:2byte
lbl_801D3748 = .sdata:0x801D3748; // type:object size:0x2 data:2byte warpSpringMdl = .sdata:0x801D3748; // type:object size:0x2 scope:local data:2byte
lbl_801D374A = .sdata:0x801D374A; // type:object size:0x2 data:2byte warpImpactMdl = .sdata:0x801D374A; // type:object size:0x2 scope:local data:2byte
lbl_801D374C = .sdata:0x801D374C; // type:object size:0x4 warpImpactPlayer = .sdata:0x801D374C; // type:object size:0x4 scope:local
lbl_801D3750 = .sdata:0x801D3750; // type:object size:0x8 lbl_801D3750 = .sdata:0x801D3750; // type:object size:0x8
lbl_801D3758 = .sdata:0x801D3758; // type:object size:0x1 data:byte lbl_801D3758 = .sdata:0x801D3758; // type:object size:0x1 data:byte
lbl_801D375A = .sdata:0x801D375A; // type:object size:0x2 data:2byte lbl_801D375A = .sdata:0x801D375A; // type:object size:0x2 data:2byte
@ -6370,13 +6370,13 @@ lbl_801D401B = .sbss:0x801D401B; // type:object size:0x1 data:byte
lbl_801D401C = .sbss:0x801D401C; // type:object size:0x1 data:byte lbl_801D401C = .sbss:0x801D401C; // type:object size:0x1 data:byte
lbl_801D401E = .sbss:0x801D401E; // type:object size:0x2 data:2byte lbl_801D401E = .sbss:0x801D401E; // type:object size:0x2 data:2byte
lbl_801D4020 = .sbss:0x801D4020; // type:object size:0x8 data:4byte lbl_801D4020 = .sbss:0x801D4020; // type:object size:0x8 data:4byte
lbl_801D4028 = .sbss:0x801D4028; // type:object size:0x4 data:4byte warpProcess = .sbss:0x801D4028; // type:object size:0x4 scope:local data:4byte
lbl_801D402C = .sbss:0x801D402C; // type:object size:0x4 data:float warpYVel = .sbss:0x801D402C; // type:object size:0x4 scope:local data:float
lbl_801D4030 = .sbss:0x801D4030; // type:object size:0x4 data:float warpYFloor = .sbss:0x801D4030; // type:object size:0x4 scope:local data:float
lbl_801D4034 = .sbss:0x801D4034; // type:object size:0x2 data:2byte warpSpace = .sbss:0x801D4034; // type:object size:0x2 scope:local data:2byte
lbl_801D4036 = .sbss:0x801D4036; // type:object size:0x1 data:byte warpImpactCnt = .sbss:0x801D4036; // type:object size:0x1 scope:local data:byte
lbl_801D4037 = .sbss:0x801D4037; // type:object size:0x1 data:byte warpTarget = .sbss:0x801D4037; // type:object size:0x1 scope:local data:byte
lbl_801D4038 = .sbss:0x801D4038; // type:object size:0x8 data:byte warpState = .sbss:0x801D4038; // type:object size:0x1 scope:local data:byte
lbl_801D4040 = .sbss:0x801D4040; // type:object size:0x4 data:4byte lbl_801D4040 = .sbss:0x801D4040; // type:object size:0x4 data:4byte
lbl_801D4044 = .sbss:0x801D4044; // type:object size:0x2 data:2byte lbl_801D4044 = .sbss:0x801D4044; // type:object size:0x2 data:2byte
lbl_801D4048 = .sbss:0x801D4048; // type:object size:0x4 data:float lbl_801D4048 = .sbss:0x801D4048; // type:object size:0x4 data:float

View file

@ -37,7 +37,11 @@ static inline s16 BoardPlayerModelGetCurr()
return boardPlayerMdl[player->player_idx]; return boardPlayerMdl[player->player_idx];
} }
s32 BoardPlayerIsAllCom(void);
void BoardPlayerRotSet(s32, f32, f32, f32);
void BoardPlayerPosGet(s32, Vec*);
void BoardPlayerCoinsSet(s32 player, s32 value); void BoardPlayerCoinsSet(s32 player, s32 value);
void BoardPlayerAutoSizeSet(s32 player, s32 value); void BoardPlayerAutoSizeSet(s32 player, s32 value);
void BoardPlayerMotionStart(s16, s32, s32);
#endif #endif

View file

@ -4,13 +4,6 @@
#include "game/process.h" #include "game/process.h"
#include "game/wipe.h" #include "game/wipe.h"
void fn_80080D54(s32); void BoardWarpExec(s32 player, s16 space);
void fn_80080DF8(void);
void fn_80081048(void);
void fn_800810A4(s32);
void fn_800811BC(s32);
void fn_80081278(s32);
void fn_80081428(s32);
void fn_800814CC(s32);
#endif #endif

View file

@ -63,7 +63,7 @@ static s32 coinDigitMdl[10] = {
MAKE_DATA_NUM(DATADIR_BOARD, 21), MAKE_DATA_NUM(DATADIR_BOARD, 21),
}; };
void BoardEventLandBlue(s32 player, s16 space) { void BoardLandBlueExec(s32 player, s16 space) {
Vec pos; Vec pos;
s32 i; s32 i;
s8 coin_chg; s8 coin_chg;
@ -104,7 +104,7 @@ void BoardEventLandBlue(s32 player, s16 space) {
BoardRotateDiceNumbers(player); BoardRotateDiceNumbers(player);
} }
void BoardEventLandRed(s32 player, s16 space) { void BoardLandRedExec(s32 player, s16 space) {
Vec pos; Vec pos;
s32 i; s32 i;
s8 coin_chg; s8 coin_chg;

View file

@ -1,8 +1,19 @@
#include "game/board/warp.h" #include "game/board/warp.h"
#include "game/board/main.h"
#include "game/board/player.h"
#include "game/wipe.h"
#include "game/gamework_data.h" #include "game/gamework_data.h"
#include "board_unsplit.h" #include "board_unsplit.h"
#include "unsplit.h"
#include "math.h" #include "math.h"
static void WarpInit(s32);
static void WarpLaunch(s32);
static void WarpStartImpact(s32);
static void WarpFall(s32);
static void WarpImpact(s32);
extern void omVibrate(s16, s16, s16, s16); extern void omVibrate(s16, s16, s16, s16);
extern void fn_800816CC(s32, s32); extern void fn_800816CC(s32, s32);
extern void fn_80081884(f32); extern void fn_80081884(f32);
@ -15,102 +26,94 @@ extern void BoardPlayerPosSet(s32, f32, f32, f32);
extern void BoardPlayerRotYSet(s32, f32); extern void BoardPlayerRotYSet(s32, f32);
extern void Hu3DModelObjPosGet(s16, char*, Vec*); extern void Hu3DModelObjPosGet(s16, char*, Vec*);
extern s32 BoardModelMotionEndCheck(s16); extern s32 BoardModelMotionEndCheck(s16);
extern void BoardPlayerPosSetV(s32, Point3d*);
void BoardPlayerRotSet(s32, f32, f32, f32);
void BoardCameraMoveSet(s32);
void BoardCameraTargetSpaceSet(s16);
extern void BoardRotateDiceNumbers(s32);
extern void BoardPlayerPosGet(s32, Vec*);
void BoardPlayerMotionStart(s16, s32, s32);
extern Process* boardMainProc;
extern s32 boardTutorialData[4]; extern s32 boardTutorialData[4];
extern s16 boardPlayerMdl[4];
Vec lbl_801A4AC0; static Vec warpPos;
s8 lbl_801D4038; static s8 warpState;
s8 lbl_801D4037; static s8 warpTarget;
s8 lbl_801D4036; static s8 warpImpactCnt;
s16 lbl_801D4034; static s16 warpSpace;
f32 lbl_801D4030; static f32 warpYFloor;
f32 lbl_801D402C; static f32 warpYVel;
Process* lbl_801D4028; static Process* warpProcess;
s16 lbl_801D3748 = 0xFFFF; static s16 warpSpringMdl = -1;
s16 lbl_801D374A = 0xFFFF; static s16 warpImpactMdl = -1;
s8 lbl_801D374C[4] = {-1, -1, -1, -1}; static s8 warpImpactPlayer[4] = {-1, -1, -1, -1};
char lbl_801D3750[] = "warp01";
void fn_80080D54(s32 arg0) { static void WarpProcess(void);
omVibrate(arg0, 0xC, 4, 2); static void WarpKill(void);
lbl_801D4028 = HuPrcChildCreate(fn_80080DF8, 0x2003U, 0x3800U, 0, boardMainProc);
HuPrcDestructorSet2(lbl_801D4028, fn_80081048);
while (lbl_801D4028 != NULL) { void BoardWarpExec(s32 player, s16 space) {
omVibrate(player, 12, 4, 2);
warpProcess = HuPrcChildCreate(WarpProcess, 8195, 14336, 0, boardMainProc);
HuPrcDestructorSet2(warpProcess, WarpKill);
while (warpProcess != NULL) {
HuPrcVSleep(); HuPrcVSleep();
} }
GWPlayer[arg0].color = 3; GWPlayer[player].color = 3;
} }
void fn_80080DF8(void) { void WarpProcess(void) {
s32 currPlayer; s32 curr_player;
f32 var_f1; s32 warp_sound[8] = {291, 355, 419, 483, 547, 611, 675, 739};
s32 temp_r3[8] = {291, 355, 419, 483, 547, 611, 675, 739};
lbl_801D4038 = 0; warpState = 0;
currPlayer = GWSystem.player_curr; curr_player = GWSystem.player_curr;
HuAudFXPlay(0x34A); HuAudFXPlay(842);
BoardCameraViewSet(3); BoardCameraViewSet(3);
BoardCameraMotionWait(); BoardCameraMotionWait();
BoardPlayerAnimBlendSet(currPlayer, 0, 15); BoardPlayerAnimBlendSet(curr_player, 0, 15);
while (BoardPlayerAnimBlendCheck(currPlayer) == 0) { while (BoardPlayerAnimBlendCheck(curr_player) == 0) {
HuPrcVSleep(); HuPrcVSleep();
} }
BoardRotateDiceNumbers(currPlayer); BoardRotateDiceNumbers(curr_player);
if (_CheckFlag(0x1000B) != 0) { if (_CheckFlag(0x1000B) != 0) {
BoardTutorialHookExec(0x12, 0); BoardTutorialHookExec(18, 0);
boardTutorialData[0] = 0; boardTutorialData[0] = 0;
} }
fn_800816CC(currPlayer, 3); fn_800816CC(curr_player, 3);
fn_80081884(18.0f); fn_80081884(18.0f);
fn_8008181C(); fn_8008181C();
lbl_801D4037 = fn_8008186C(); warpTarget = fn_8008186C();
BoardCameraViewSet(1); BoardCameraViewSet(1);
BoardCameraMotionWait(); BoardCameraMotionWait();
fn_800810A4(currPlayer); WarpInit(curr_player);
while (1) { while (1) {
switch (lbl_801D4038) { switch (warpState) {
case 0: case 0:
if (BoardModelMotionTimeGet(lbl_801D3748) < 15.0f) { if (BoardModelMotionTimeGet(warpSpringMdl) < 15.0f) {
break; break;
} }
BoardModelHookReset(lbl_801D3748); BoardModelHookReset(warpSpringMdl);
Hu3DModelObjPosGet(BoardModelIDGet(lbl_801D3748), lbl_801D3750, &lbl_801A4AC0); Hu3DModelObjPosGet(BoardModelIDGet(warpSpringMdl), "warp01", &warpPos);
BoardSpacePosGet(0, GWPlayer[currPlayer].space_curr, &lbl_801A4AC0); BoardSpacePosGet(0, GWPlayer[curr_player].space_curr, &warpPos);
lbl_801A4AC0.y += 700.0f; warpPos.y += 700.0f;
BoardPlayerPosSetV(currPlayer, &lbl_801A4AC0); BoardPlayerPosSetV(curr_player, &warpPos);
lbl_801D4038 = 1; warpState = 1;
HuAudFXPlay(temp_r3[GWPlayer[currPlayer].character]); HuAudFXPlay(warp_sound[GWPlayer[curr_player].character]);
break; break;
case 1: case 1:
fn_800811BC(currPlayer); WarpLaunch(curr_player);
break; break;
case 2: case 2:
if (BoardModelMotionEndCheck(lbl_801D3748) == 0) break; if (BoardModelMotionEndCheck(warpSpringMdl) == 0) break;
lbl_801D4038 = 6; warpState = 6;
break; break;
case 3: case 3:
fn_80081278(currPlayer); WarpStartImpact(curr_player);
break; break;
case 4: case 4:
fn_80081428(currPlayer); WarpFall(curr_player);
break; break;
case 5: case 5:
fn_800814CC(currPlayer); WarpImpact(curr_player);
break; break;
case 6: case 6:
HuPrcEnd(); HuPrcEnd();
@ -120,147 +123,135 @@ void fn_80080DF8(void) {
} }
} }
void fn_80081048(void) { void WarpKill(void) {
if (lbl_801D3748 != -1) { if (warpSpringMdl != -1) {
BoardModelKill(lbl_801D3748); BoardModelKill(warpSpringMdl);
lbl_801D3748 = -1; warpSpringMdl = -1;
} }
if (lbl_801D374A != -1) { if (warpImpactMdl != -1) {
BoardModelKill(lbl_801D374A); BoardModelKill(warpImpactMdl);
lbl_801D374A = -1; warpImpactMdl = -1;
} }
lbl_801D4028 = NULL; warpProcess = NULL;
} }
static inline PlayerState* GetPlayer(s32 index) { static void WarpInit(s32 player) {
return &GWPlayer[index]; Vec pos;
s16 player_mdl = BoardPlayerModelGet(player);
warpSpringMdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 1), NULL, 0);
BoardSpacePosGet(0, GWPlayer[player].space_curr, &pos);
warpYFloor = 1500.0f + pos.y;
BoardModelLayerSet(warpSpringMdl, 2);
BoardCameraTargetModelSet(warpSpringMdl);
BoardModelMotionStart(warpSpringMdl, 0, 0);
BoardModelHookSet(warpSpringMdl, "warp01", player_mdl);
BoardModelPosSetV(warpSpringMdl, &pos);
HuAudFXPlay(835);
BoardPlayerRotYSet(player, 0.0f);
BoardPlayerPosSet(player, 0.0f, 0.0f, 0.0f);
BoardRotateDiceNumbers(player);
} }
static inline s16 GetBoardPlayer(s32 index) { static void WarpLaunch(s32 player) {
PlayerState *player = GetPlayer(index);
return boardPlayerMdl[player->player_idx];
}
void fn_800810A4(s32 arg0) { warpPos.y += 20.0f;
Point3d sp8; BoardPlayerPosSetV(player, &warpPos);
s16 temp_r30 = GetBoardPlayer(arg0); if (!(warpPos.y < warpYFloor)) {
lbl_801D3748 = BoardModelCreate(0x70001, NULL, 0);
BoardSpacePosGet(0, GWPlayer[arg0].space_curr, &sp8);
lbl_801D4030 = 1500.0f + sp8.y;
BoardModelLayerSet(lbl_801D3748, 2);
BoardCameraTargetModelSet(lbl_801D3748);
BoardModelMotionStart(lbl_801D3748, 0, 0);
BoardModelHookSet(lbl_801D3748, lbl_801D3750, temp_r30);
BoardModelPosSetV(lbl_801D3748, &sp8);
HuAudFXPlay(0x343);
BoardPlayerRotYSet(arg0, 0.0f);
BoardPlayerPosSet(arg0, 0.0f, 0.0f, 0.0f);
BoardRotateDiceNumbers(arg0);
}
void fn_800811BC(s32 arg0) {
f32 temp_f1;
lbl_801A4AC0.y += 20.0f;
BoardPlayerPosSetV(arg0, &lbl_801A4AC0);
if (!(lbl_801A4AC0.y < lbl_801D4030)) {
WipeColorSet(0U, 0U, 0U); WipeColorSet(0U, 0U, 0U);
WipeCreate(2, 0, 0x15); WipeCreate(2, 0, 21);
while (WipeStatGet() != 0) { while (WipeStatGet() != 0) {
HuPrcVSleep(); HuPrcVSleep();
} }
lbl_801A4AC0.y = lbl_801D4030; warpPos.y = warpYFloor;
BoardModelVisibilitySet(lbl_801D3748, 0); BoardModelVisibilitySet(warpSpringMdl, 0);
lbl_801D4038 = 3; warpState = 3;
} }
} }
void fn_80081278(s32 arg0) { static void WarpStartImpact(s32 player) {
f32 temp_f1; s32 i;
s32 var_r31;
lbl_801D4034 = GWPlayer[lbl_801D4037].space_curr; warpSpace = GWPlayer[warpTarget].space_curr;
GWPlayer[arg0].space_curr = lbl_801D4034; GWPlayer[player].space_curr = warpSpace;
BoardSpacePosGet(0, lbl_801D4034, &lbl_801A4AC0); BoardSpacePosGet(0, warpSpace, &warpPos);
lbl_801D4030 = lbl_801A4AC0.y; warpYFloor = warpPos.y;
lbl_801A4AC0.y += 1500.0f; warpPos.y += 1500.0f;
BoardPlayerPosSetV(arg0, &lbl_801A4AC0); BoardPlayerPosSetV(player, &warpPos);
BoardPlayerRotSet(arg0, 180.0f, 180.0f, 0.0f); BoardPlayerRotSet(player, 180.0f, 180.0f, 0.0f);
for (var_r31 = 0, lbl_801D4036 = var_r31; var_r31 < 4; var_r31++) { for (i = 0, warpImpactCnt = i; i < 4; i++) {
if (lbl_801D4034 == GWPlayer[var_r31].space_curr) { if (warpSpace == GWPlayer[i].space_curr) {
lbl_801D374C[lbl_801D4036] = var_r31; warpImpactPlayer[warpImpactCnt] = i;
lbl_801D4036++; warpImpactCnt++;
} }
} }
lbl_801D374A = BoardModelCreate(0x70002, NULL, 0); warpImpactMdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 2), NULL, 0);
BoardModelVisibilitySet(lbl_801D374A, 0); BoardModelVisibilitySet(warpImpactMdl, 0);
BoardModelMotionSpeedSet(lbl_801D374A, 0.0f); BoardModelMotionSpeedSet(warpImpactMdl, 0.0f);
BoardCameraMoveSet(0); BoardCameraMoveSet(0);
BoardCameraTargetSpaceSet(lbl_801D4034); BoardCameraTargetSpaceSet(warpSpace);
HuPrcSleep(1); HuPrcSleep(1);
WipeCreate(1, 0, 0x15); WipeCreate(1, 0, 0x15);
while (WipeStatGet() != 0) { while (WipeStatGet() != 0) {
HuPrcVSleep(); HuPrcVSleep();
} }
BoardCameraMoveSet(1); BoardCameraMoveSet(1);
lbl_801D402C = -10.0f; warpYVel = -10.0f;
lbl_801D4038 = 4; warpState = 4;
} }
void fn_80081428(s32 arg0) { static void WarpFall(s32 player) {
lbl_801D402C += -2.0f; warpYVel += -2.0f;
lbl_801A4AC0.y += lbl_801D402C; warpPos.y += warpYVel;
if (lbl_801A4AC0.y <= (150.0f + lbl_801D4030)) { if (warpPos.y <= (150.0f + warpYFloor)) {
lbl_801A4AC0.y = lbl_801D4030; warpPos.y = warpYFloor;
lbl_801D4038 = 5; warpState = 5;
HuAudFXPlay(0x345); HuAudFXPlay(837);
HuAudFXPlay(0x33D); HuAudFXPlay(829);
} }
BoardPlayerPosSetV(arg0, &lbl_801A4AC0); BoardPlayerPosSetV(player, &warpPos);
} }
void fn_800814CC(s32 arg0) { static void WarpImpact(s32 player) {
Vec sp18; Vec pos;
Point3d spC; Vec pos_player;
s16 sp8; s16 temp;
f32 temp_f29; f32 speed;
f32 temp_f30; f32 temp_f30;
f32 var_f31; f32 angle;
s16 var_r31; s16 i;
s32 temp_r30;
sp18.x = 288.0f; pos.x = 288.0f;
sp18.y = 240.0f; pos.y = 240.0f;
sp18.z = 700.0f; pos.z = 700.0f;
Hu3D2Dto3D(&sp18, 1, &sp18); Hu3D2Dto3D(&pos, 1, &pos);
BoardModelPosSetV(lbl_801D374A, &sp18); BoardModelPosSetV(warpImpactMdl, &pos);
BoardModelVisibilitySet(lbl_801D374A, 1); BoardModelVisibilitySet(warpImpactMdl, 1);
BoardModelMotionStart(lbl_801D374A, 0, 0x40000001); BoardModelMotionStart(warpImpactMdl, 0, 0x40000001);
for (var_r31 = 0; var_r31 < lbl_801D4036; var_r31++) { for (i = 0; i < warpImpactCnt; i++) {
temp_r30 = lbl_801D374C[var_r31]; s32 player = warpImpactPlayer[i];
omVibrate(temp_r30, 0xC, 4, 2); omVibrate(player, 0xC, 4, 2);
BoardPlayerMotionStart(temp_r30, 6, 0x40000001); BoardPlayerMotionStart(player, 6, 0x40000001);
} }
BoardPlayerRotSet(arg0, 0.0f, 0.0f, 0.0f); BoardPlayerRotSet(player, 0.0f, 0.0f, 0.0f);
BoardPlayerPosGet(arg0, &spC); BoardPlayerPosGet(player, &pos_player);
spC.y = lbl_801D4030; pos_player.y = warpYFloor;
BoardPlayerPosSetV(arg0, &spC); BoardPlayerPosSetV(player, &pos_player);
temp_f29 = 4.0f; speed = 4.0f;
for (var_f31 = 0.0f, sp8 = var_f31; var_f31 < 180.0f; var_f31 += temp_f29) { for (angle = 0.0f, temp = angle; angle < 180.0f; angle += speed) {
temp_f30 = sin((M_PI * var_f31) / 180.0); temp_f30 = sin((M_PI * angle) / 180.0);
BoardModelScaleSet(lbl_801D374A, 0.5f + temp_f30, 0.5f + temp_f30, 0.5f + temp_f30); BoardModelScaleSet(warpImpactMdl, 0.5f + temp_f30, 0.5f + temp_f30, 0.5f + temp_f30);
HuPrcVSleep(); HuPrcVSleep();
} }
BoardModelVisibilitySet(lbl_801D374A, 0); BoardModelVisibilitySet(warpImpactMdl, 0);
HuPrcSleep(0x3C); HuPrcSleep(60);
for (var_r31 = 0; var_r31 < lbl_801D4036; var_r31++) { for (i = 0; i < warpImpactCnt; i++) {
BoardRotateDiceNumbers(lbl_801D374C[var_r31]); BoardRotateDiceNumbers(warpImpactPlayer[i]);
} }
lbl_801D4038 = 6; warpState = 6;
} }

View file

@ -1,9 +1,8 @@
#include "game/board/window.h" #include "game/board/window.h"
#include "game/board/main.h"
#include "game/board/player.h"
#include "game/gamework_data.h" #include "game/gamework_data.h"
extern s32 BoardPlayerIsAllCom(void);
extern Process* boardMainProc;
static s8 winChoice; static s8 winChoice;
static s8 autoPickF; static s8 autoPickF;
static s8 winPortrait; static s8 winPortrait;