Clean up warp code
This commit is contained in:
parent
b2186e5d09
commit
ce59e5a3d7
6 changed files with 180 additions and 193 deletions
|
|
@ -1484,8 +1484,8 @@ fn_8007F6BC = .text:0x8007F6BC; // type:function size:0xA4
|
|||
fn_8007F760 = .text:0x8007F760; // type:function size:0xFC
|
||||
fn_8007F85C = .text:0x8007F85C; // type:function size:0x38
|
||||
fn_8007F894 = .text:0x8007F894; // type:function size:0x2BC
|
||||
BoardEventLandBlue = .text:0x8007FB50; // type:function size:0x184
|
||||
BoardEventLandRed = .text:0x8007FCD4; // type:function size:0x19C
|
||||
BoardLandBlueExec = .text:0x8007FB50; // type:function size:0x184
|
||||
BoardLandRedExec = .text:0x8007FCD4; // type:function size:0x19C
|
||||
BoardCoinChgCreate = .text:0x8007FE70; // type:function size:0x1E8
|
||||
BoardCoinChgExist = .text:0x80080058; // type:function size:0x6C
|
||||
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
|
||||
CoinChgShow = .text:0x8008094C; // type:function size:0x1A8 scope:local
|
||||
CoinChgDisappear = .text:0x80080AF4; // type:function size:0x260 scope:local
|
||||
fn_80080D54 = .text:0x80080D54; // type:function size:0xA4
|
||||
fn_80080DF8 = .text:0x80080DF8; // type:function size:0x250
|
||||
fn_80081048 = .text:0x80081048; // type:function size:0x5C
|
||||
fn_800810A4 = .text:0x800810A4; // type:function size:0x118
|
||||
fn_800811BC = .text:0x800811BC; // type:function size:0xBC
|
||||
fn_80081278 = .text:0x80081278; // type:function size:0x1B0
|
||||
fn_80081428 = .text:0x80081428; // type:function size:0xA4
|
||||
fn_800814CC = .text:0x800814CC; // type:function size:0x200
|
||||
BoardWarpExec = .text:0x80080D54; // type:function size:0xA4
|
||||
WarpProcess = .text:0x80080DF8; // type:function size:0x250 scope:local
|
||||
WarpKill = .text:0x80081048; // type:function size:0x5C scope:local
|
||||
WarpInit = .text:0x800810A4; // type:function size:0x118 scope:local
|
||||
WarpLaunch = .text:0x800811BC; // type:function size:0xBC scope:local
|
||||
WarpStartImpact = .text:0x80081278; // type:function size:0x1B0 scope:local
|
||||
WarpFall = .text:0x80081428; // type:function size:0xA4 scope:local
|
||||
WarpImpact = .text:0x800814CC; // type:function size:0x200 scope:local
|
||||
fn_800816CC = .text:0x800816CC; // type:function size:0x11C
|
||||
fn_800817E8 = .text:0x800817E8; // type:function size:0x34
|
||||
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_801A4A9C = .bss:0x801A4A9C; // type:object size:0xC
|
||||
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_801A4AE0 = .bss:0x801A4AE0; // type:object size:0x10
|
||||
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_801D3744 = .sdata:0x801D3744; // 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
|
||||
lbl_801D374A = .sdata:0x801D374A; // type:object size:0x2 data:2byte
|
||||
lbl_801D374C = .sdata:0x801D374C; // type:object size:0x4
|
||||
warpSpringMdl = .sdata:0x801D3748; // type:object size:0x2 scope:local data:2byte
|
||||
warpImpactMdl = .sdata:0x801D374A; // type:object size:0x2 scope:local data:2byte
|
||||
warpImpactPlayer = .sdata:0x801D374C; // type:object size:0x4 scope:local
|
||||
lbl_801D3750 = .sdata:0x801D3750; // type:object size:0x8
|
||||
lbl_801D3758 = .sdata:0x801D3758; // type:object size:0x1 data:byte
|
||||
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_801D401E = .sbss:0x801D401E; // type:object size:0x2 data:2byte
|
||||
lbl_801D4020 = .sbss:0x801D4020; // type:object size:0x8 data:4byte
|
||||
lbl_801D4028 = .sbss:0x801D4028; // type:object size:0x4 data:4byte
|
||||
lbl_801D402C = .sbss:0x801D402C; // type:object size:0x4 data:float
|
||||
lbl_801D4030 = .sbss:0x801D4030; // type:object size:0x4 data:float
|
||||
lbl_801D4034 = .sbss:0x801D4034; // type:object size:0x2 data:2byte
|
||||
lbl_801D4036 = .sbss:0x801D4036; // type:object size:0x1 data:byte
|
||||
lbl_801D4037 = .sbss:0x801D4037; // type:object size:0x1 data:byte
|
||||
lbl_801D4038 = .sbss:0x801D4038; // type:object size:0x8 data:byte
|
||||
warpProcess = .sbss:0x801D4028; // type:object size:0x4 scope:local data:4byte
|
||||
warpYVel = .sbss:0x801D402C; // type:object size:0x4 scope:local data:float
|
||||
warpYFloor = .sbss:0x801D4030; // type:object size:0x4 scope:local data:float
|
||||
warpSpace = .sbss:0x801D4034; // type:object size:0x2 scope:local data:2byte
|
||||
warpImpactCnt = .sbss:0x801D4036; // type:object size:0x1 scope:local data:byte
|
||||
warpTarget = .sbss:0x801D4037; // type:object size:0x1 scope:local data:byte
|
||||
warpState = .sbss:0x801D4038; // type:object size:0x1 scope:local data:byte
|
||||
lbl_801D4040 = .sbss:0x801D4040; // type:object size:0x4 data:4byte
|
||||
lbl_801D4044 = .sbss:0x801D4044; // type:object size:0x2 data:2byte
|
||||
lbl_801D4048 = .sbss:0x801D4048; // type:object size:0x4 data:float
|
||||
|
|
|
|||
|
|
@ -37,7 +37,11 @@ static inline s16 BoardPlayerModelGetCurr()
|
|||
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 BoardPlayerAutoSizeSet(s32 player, s32 value);
|
||||
void BoardPlayerMotionStart(s16, s32, s32);
|
||||
|
||||
#endif
|
||||
|
|
@ -4,13 +4,6 @@
|
|||
#include "game/process.h"
|
||||
#include "game/wipe.h"
|
||||
|
||||
void fn_80080D54(s32);
|
||||
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);
|
||||
void BoardWarpExec(s32 player, s16 space);
|
||||
|
||||
#endif
|
||||
|
|
@ -63,7 +63,7 @@ static s32 coinDigitMdl[10] = {
|
|||
MAKE_DATA_NUM(DATADIR_BOARD, 21),
|
||||
};
|
||||
|
||||
void BoardEventLandBlue(s32 player, s16 space) {
|
||||
void BoardLandBlueExec(s32 player, s16 space) {
|
||||
Vec pos;
|
||||
s32 i;
|
||||
s8 coin_chg;
|
||||
|
|
@ -104,7 +104,7 @@ void BoardEventLandBlue(s32 player, s16 space) {
|
|||
BoardRotateDiceNumbers(player);
|
||||
}
|
||||
|
||||
void BoardEventLandRed(s32 player, s16 space) {
|
||||
void BoardLandRedExec(s32 player, s16 space) {
|
||||
Vec pos;
|
||||
s32 i;
|
||||
s8 coin_chg;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,19 @@
|
|||
#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 "board_unsplit.h"
|
||||
#include "unsplit.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 fn_800816CC(s32, s32);
|
||||
extern void fn_80081884(f32);
|
||||
|
|
@ -15,102 +26,94 @@ extern void BoardPlayerPosSet(s32, f32, f32, f32);
|
|||
extern void BoardPlayerRotYSet(s32, f32);
|
||||
extern void Hu3DModelObjPosGet(s16, char*, Vec*);
|
||||
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 s16 boardPlayerMdl[4];
|
||||
|
||||
Vec lbl_801A4AC0;
|
||||
static Vec warpPos;
|
||||
|
||||
s8 lbl_801D4038;
|
||||
s8 lbl_801D4037;
|
||||
s8 lbl_801D4036;
|
||||
s16 lbl_801D4034;
|
||||
f32 lbl_801D4030;
|
||||
f32 lbl_801D402C;
|
||||
Process* lbl_801D4028;
|
||||
static s8 warpState;
|
||||
static s8 warpTarget;
|
||||
static s8 warpImpactCnt;
|
||||
static s16 warpSpace;
|
||||
static f32 warpYFloor;
|
||||
static f32 warpYVel;
|
||||
static Process* warpProcess;
|
||||
|
||||
s16 lbl_801D3748 = 0xFFFF;
|
||||
s16 lbl_801D374A = 0xFFFF;
|
||||
s8 lbl_801D374C[4] = {-1, -1, -1, -1};
|
||||
char lbl_801D3750[] = "warp01";
|
||||
static s16 warpSpringMdl = -1;
|
||||
static s16 warpImpactMdl = -1;
|
||||
static s8 warpImpactPlayer[4] = {-1, -1, -1, -1};
|
||||
|
||||
void fn_80080D54(s32 arg0) {
|
||||
omVibrate(arg0, 0xC, 4, 2);
|
||||
lbl_801D4028 = HuPrcChildCreate(fn_80080DF8, 0x2003U, 0x3800U, 0, boardMainProc);
|
||||
HuPrcDestructorSet2(lbl_801D4028, fn_80081048);
|
||||
static void WarpProcess(void);
|
||||
static void WarpKill(void);
|
||||
|
||||
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();
|
||||
}
|
||||
GWPlayer[arg0].color = 3;
|
||||
GWPlayer[player].color = 3;
|
||||
}
|
||||
|
||||
void fn_80080DF8(void) {
|
||||
s32 currPlayer;
|
||||
f32 var_f1;
|
||||
s32 temp_r3[8] = {291, 355, 419, 483, 547, 611, 675, 739};
|
||||
void WarpProcess(void) {
|
||||
s32 curr_player;
|
||||
s32 warp_sound[8] = {291, 355, 419, 483, 547, 611, 675, 739};
|
||||
|
||||
lbl_801D4038 = 0;
|
||||
currPlayer = GWSystem.player_curr;
|
||||
HuAudFXPlay(0x34A);
|
||||
warpState = 0;
|
||||
curr_player = GWSystem.player_curr;
|
||||
HuAudFXPlay(842);
|
||||
BoardCameraViewSet(3);
|
||||
BoardCameraMotionWait();
|
||||
BoardPlayerAnimBlendSet(currPlayer, 0, 15);
|
||||
BoardPlayerAnimBlendSet(curr_player, 0, 15);
|
||||
|
||||
while (BoardPlayerAnimBlendCheck(currPlayer) == 0) {
|
||||
while (BoardPlayerAnimBlendCheck(curr_player) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
|
||||
BoardRotateDiceNumbers(currPlayer);
|
||||
BoardRotateDiceNumbers(curr_player);
|
||||
if (_CheckFlag(0x1000B) != 0) {
|
||||
BoardTutorialHookExec(0x12, 0);
|
||||
BoardTutorialHookExec(18, 0);
|
||||
boardTutorialData[0] = 0;
|
||||
}
|
||||
fn_800816CC(currPlayer, 3);
|
||||
fn_800816CC(curr_player, 3);
|
||||
fn_80081884(18.0f);
|
||||
fn_8008181C();
|
||||
lbl_801D4037 = fn_8008186C();
|
||||
warpTarget = fn_8008186C();
|
||||
BoardCameraViewSet(1);
|
||||
BoardCameraMotionWait();
|
||||
fn_800810A4(currPlayer);
|
||||
WarpInit(curr_player);
|
||||
|
||||
while (1) {
|
||||
switch (lbl_801D4038) {
|
||||
switch (warpState) {
|
||||
case 0:
|
||||
if (BoardModelMotionTimeGet(lbl_801D3748) < 15.0f) {
|
||||
if (BoardModelMotionTimeGet(warpSpringMdl) < 15.0f) {
|
||||
break;
|
||||
}
|
||||
BoardModelHookReset(lbl_801D3748);
|
||||
Hu3DModelObjPosGet(BoardModelIDGet(lbl_801D3748), lbl_801D3750, &lbl_801A4AC0);
|
||||
BoardSpacePosGet(0, GWPlayer[currPlayer].space_curr, &lbl_801A4AC0);
|
||||
lbl_801A4AC0.y += 700.0f;
|
||||
BoardPlayerPosSetV(currPlayer, &lbl_801A4AC0);
|
||||
lbl_801D4038 = 1;
|
||||
HuAudFXPlay(temp_r3[GWPlayer[currPlayer].character]);
|
||||
BoardModelHookReset(warpSpringMdl);
|
||||
Hu3DModelObjPosGet(BoardModelIDGet(warpSpringMdl), "warp01", &warpPos);
|
||||
BoardSpacePosGet(0, GWPlayer[curr_player].space_curr, &warpPos);
|
||||
warpPos.y += 700.0f;
|
||||
BoardPlayerPosSetV(curr_player, &warpPos);
|
||||
warpState = 1;
|
||||
HuAudFXPlay(warp_sound[GWPlayer[curr_player].character]);
|
||||
break;
|
||||
case 1:
|
||||
fn_800811BC(currPlayer);
|
||||
WarpLaunch(curr_player);
|
||||
break;
|
||||
case 2:
|
||||
if (BoardModelMotionEndCheck(lbl_801D3748) == 0) break;
|
||||
lbl_801D4038 = 6;
|
||||
if (BoardModelMotionEndCheck(warpSpringMdl) == 0) break;
|
||||
warpState = 6;
|
||||
break;
|
||||
case 3:
|
||||
fn_80081278(currPlayer);
|
||||
WarpStartImpact(curr_player);
|
||||
break;
|
||||
case 4:
|
||||
fn_80081428(currPlayer);
|
||||
WarpFall(curr_player);
|
||||
break;
|
||||
case 5:
|
||||
fn_800814CC(currPlayer);
|
||||
WarpImpact(curr_player);
|
||||
break;
|
||||
case 6:
|
||||
HuPrcEnd();
|
||||
|
|
@ -120,147 +123,135 @@ void fn_80080DF8(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void fn_80081048(void) {
|
||||
if (lbl_801D3748 != -1) {
|
||||
BoardModelKill(lbl_801D3748);
|
||||
lbl_801D3748 = -1;
|
||||
void WarpKill(void) {
|
||||
if (warpSpringMdl != -1) {
|
||||
BoardModelKill(warpSpringMdl);
|
||||
warpSpringMdl = -1;
|
||||
}
|
||||
if (lbl_801D374A != -1) {
|
||||
BoardModelKill(lbl_801D374A);
|
||||
lbl_801D374A = -1;
|
||||
if (warpImpactMdl != -1) {
|
||||
BoardModelKill(warpImpactMdl);
|
||||
warpImpactMdl = -1;
|
||||
}
|
||||
lbl_801D4028 = NULL;
|
||||
warpProcess = NULL;
|
||||
}
|
||||
|
||||
static inline PlayerState* GetPlayer(s32 index) {
|
||||
return &GWPlayer[index];
|
||||
static void WarpInit(s32 player) {
|
||||
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) {
|
||||
PlayerState *player = GetPlayer(index);
|
||||
return boardPlayerMdl[player->player_idx];
|
||||
}
|
||||
static void WarpLaunch(s32 player) {
|
||||
|
||||
void fn_800810A4(s32 arg0) {
|
||||
Point3d sp8;
|
||||
s16 temp_r30 = GetBoardPlayer(arg0);
|
||||
|
||||
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)) {
|
||||
warpPos.y += 20.0f;
|
||||
BoardPlayerPosSetV(player, &warpPos);
|
||||
if (!(warpPos.y < warpYFloor)) {
|
||||
WipeColorSet(0U, 0U, 0U);
|
||||
WipeCreate(2, 0, 0x15);
|
||||
WipeCreate(2, 0, 21);
|
||||
|
||||
while (WipeStatGet() != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
lbl_801A4AC0.y = lbl_801D4030;
|
||||
BoardModelVisibilitySet(lbl_801D3748, 0);
|
||||
lbl_801D4038 = 3;
|
||||
warpPos.y = warpYFloor;
|
||||
BoardModelVisibilitySet(warpSpringMdl, 0);
|
||||
warpState = 3;
|
||||
}
|
||||
}
|
||||
|
||||
void fn_80081278(s32 arg0) {
|
||||
f32 temp_f1;
|
||||
s32 var_r31;
|
||||
static void WarpStartImpact(s32 player) {
|
||||
s32 i;
|
||||
|
||||
lbl_801D4034 = GWPlayer[lbl_801D4037].space_curr;
|
||||
GWPlayer[arg0].space_curr = lbl_801D4034;
|
||||
BoardSpacePosGet(0, lbl_801D4034, &lbl_801A4AC0);
|
||||
lbl_801D4030 = lbl_801A4AC0.y;
|
||||
lbl_801A4AC0.y += 1500.0f;
|
||||
BoardPlayerPosSetV(arg0, &lbl_801A4AC0);
|
||||
BoardPlayerRotSet(arg0, 180.0f, 180.0f, 0.0f);
|
||||
warpSpace = GWPlayer[warpTarget].space_curr;
|
||||
GWPlayer[player].space_curr = warpSpace;
|
||||
BoardSpacePosGet(0, warpSpace, &warpPos);
|
||||
warpYFloor = warpPos.y;
|
||||
warpPos.y += 1500.0f;
|
||||
BoardPlayerPosSetV(player, &warpPos);
|
||||
BoardPlayerRotSet(player, 180.0f, 180.0f, 0.0f);
|
||||
|
||||
for (var_r31 = 0, lbl_801D4036 = var_r31; var_r31 < 4; var_r31++) {
|
||||
if (lbl_801D4034 == GWPlayer[var_r31].space_curr) {
|
||||
lbl_801D374C[lbl_801D4036] = var_r31;
|
||||
lbl_801D4036++;
|
||||
for (i = 0, warpImpactCnt = i; i < 4; i++) {
|
||||
if (warpSpace == GWPlayer[i].space_curr) {
|
||||
warpImpactPlayer[warpImpactCnt] = i;
|
||||
warpImpactCnt++;
|
||||
}
|
||||
}
|
||||
lbl_801D374A = BoardModelCreate(0x70002, NULL, 0);
|
||||
BoardModelVisibilitySet(lbl_801D374A, 0);
|
||||
BoardModelMotionSpeedSet(lbl_801D374A, 0.0f);
|
||||
warpImpactMdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 2), NULL, 0);
|
||||
BoardModelVisibilitySet(warpImpactMdl, 0);
|
||||
BoardModelMotionSpeedSet(warpImpactMdl, 0.0f);
|
||||
BoardCameraMoveSet(0);
|
||||
BoardCameraTargetSpaceSet(lbl_801D4034);
|
||||
BoardCameraTargetSpaceSet(warpSpace);
|
||||
HuPrcSleep(1);
|
||||
WipeCreate(1, 0, 0x15);
|
||||
while (WipeStatGet() != 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardCameraMoveSet(1);
|
||||
lbl_801D402C = -10.0f;
|
||||
lbl_801D4038 = 4;
|
||||
warpYVel = -10.0f;
|
||||
warpState = 4;
|
||||
}
|
||||
|
||||
void fn_80081428(s32 arg0) {
|
||||
lbl_801D402C += -2.0f;
|
||||
lbl_801A4AC0.y += lbl_801D402C;
|
||||
if (lbl_801A4AC0.y <= (150.0f + lbl_801D4030)) {
|
||||
lbl_801A4AC0.y = lbl_801D4030;
|
||||
lbl_801D4038 = 5;
|
||||
HuAudFXPlay(0x345);
|
||||
HuAudFXPlay(0x33D);
|
||||
static void WarpFall(s32 player) {
|
||||
warpYVel += -2.0f;
|
||||
warpPos.y += warpYVel;
|
||||
if (warpPos.y <= (150.0f + warpYFloor)) {
|
||||
warpPos.y = warpYFloor;
|
||||
warpState = 5;
|
||||
HuAudFXPlay(837);
|
||||
HuAudFXPlay(829);
|
||||
}
|
||||
BoardPlayerPosSetV(arg0, &lbl_801A4AC0);
|
||||
BoardPlayerPosSetV(player, &warpPos);
|
||||
}
|
||||
|
||||
void fn_800814CC(s32 arg0) {
|
||||
Vec sp18;
|
||||
Point3d spC;
|
||||
s16 sp8;
|
||||
f32 temp_f29;
|
||||
static void WarpImpact(s32 player) {
|
||||
Vec pos;
|
||||
Vec pos_player;
|
||||
s16 temp;
|
||||
f32 speed;
|
||||
f32 temp_f30;
|
||||
f32 var_f31;
|
||||
s16 var_r31;
|
||||
s32 temp_r30;
|
||||
f32 angle;
|
||||
s16 i;
|
||||
|
||||
sp18.x = 288.0f;
|
||||
sp18.y = 240.0f;
|
||||
sp18.z = 700.0f;
|
||||
Hu3D2Dto3D(&sp18, 1, &sp18);
|
||||
BoardModelPosSetV(lbl_801D374A, &sp18);
|
||||
BoardModelVisibilitySet(lbl_801D374A, 1);
|
||||
BoardModelMotionStart(lbl_801D374A, 0, 0x40000001);
|
||||
pos.x = 288.0f;
|
||||
pos.y = 240.0f;
|
||||
pos.z = 700.0f;
|
||||
Hu3D2Dto3D(&pos, 1, &pos);
|
||||
BoardModelPosSetV(warpImpactMdl, &pos);
|
||||
BoardModelVisibilitySet(warpImpactMdl, 1);
|
||||
BoardModelMotionStart(warpImpactMdl, 0, 0x40000001);
|
||||
|
||||
for (var_r31 = 0; var_r31 < lbl_801D4036; var_r31++) {
|
||||
temp_r30 = lbl_801D374C[var_r31];
|
||||
omVibrate(temp_r30, 0xC, 4, 2);
|
||||
BoardPlayerMotionStart(temp_r30, 6, 0x40000001);
|
||||
for (i = 0; i < warpImpactCnt; i++) {
|
||||
s32 player = warpImpactPlayer[i];
|
||||
omVibrate(player, 0xC, 4, 2);
|
||||
BoardPlayerMotionStart(player, 6, 0x40000001);
|
||||
}
|
||||
BoardPlayerRotSet(arg0, 0.0f, 0.0f, 0.0f);
|
||||
BoardPlayerPosGet(arg0, &spC);
|
||||
spC.y = lbl_801D4030;
|
||||
BoardPlayerPosSetV(arg0, &spC);
|
||||
temp_f29 = 4.0f;
|
||||
BoardPlayerRotSet(player, 0.0f, 0.0f, 0.0f);
|
||||
BoardPlayerPosGet(player, &pos_player);
|
||||
pos_player.y = warpYFloor;
|
||||
BoardPlayerPosSetV(player, &pos_player);
|
||||
speed = 4.0f;
|
||||
|
||||
for (var_f31 = 0.0f, sp8 = var_f31; var_f31 < 180.0f; var_f31 += temp_f29) {
|
||||
temp_f30 = sin((M_PI * var_f31) / 180.0);
|
||||
BoardModelScaleSet(lbl_801D374A, 0.5f + temp_f30, 0.5f + temp_f30, 0.5f + temp_f30);
|
||||
for (angle = 0.0f, temp = angle; angle < 180.0f; angle += speed) {
|
||||
temp_f30 = sin((M_PI * angle) / 180.0);
|
||||
BoardModelScaleSet(warpImpactMdl, 0.5f + temp_f30, 0.5f + temp_f30, 0.5f + temp_f30);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardModelVisibilitySet(lbl_801D374A, 0);
|
||||
HuPrcSleep(0x3C);
|
||||
BoardModelVisibilitySet(warpImpactMdl, 0);
|
||||
HuPrcSleep(60);
|
||||
|
||||
for (var_r31 = 0; var_r31 < lbl_801D4036; var_r31++) {
|
||||
BoardRotateDiceNumbers(lbl_801D374C[var_r31]);
|
||||
for (i = 0; i < warpImpactCnt; i++) {
|
||||
BoardRotateDiceNumbers(warpImpactPlayer[i]);
|
||||
}
|
||||
lbl_801D4038 = 6;
|
||||
warpState = 6;
|
||||
}
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
#include "game/board/window.h"
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/player.h"
|
||||
#include "game/gamework_data.h"
|
||||
|
||||
extern s32 BoardPlayerIsAllCom(void);
|
||||
extern Process* boardMainProc;
|
||||
|
||||
static s8 winChoice;
|
||||
static s8 autoPickF;
|
||||
static s8 winPortrait;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue