commit
e3fa884052
10 changed files with 446 additions and 390 deletions
|
|
@ -1015,7 +1015,7 @@ MainFunc = .text:0x8005BF9C; // type:function size:0x7D0 scope:local
|
|||
BoardTurnNext = .text:0x8005C76C; // type:function size:0x8C
|
||||
ExecTurnStart = .text:0x8005C7F8; // type:function size:0x28C scope:local
|
||||
BoardNextOvlSet = .text:0x8005CA84; // type:function size:0xC4
|
||||
BoardIsStarted = .text:0x8005CB48; // type:function size:0x8C
|
||||
BoardStartCheck = .text:0x8005CB48; // type:function size:0x8C
|
||||
CreateBoard = .text:0x8005CBD4; // type:function size:0x410 scope:local
|
||||
DestroyBoard = .text:0x8005CFE4; // type:function size:0x128 scope:local
|
||||
BoardLightHookSet = .text:0x8005D10C; // type:function size:0xC
|
||||
|
|
@ -1195,7 +1195,7 @@ BoardPlayerAutoSizeSet = .text:0x80068E6C; // type:function size:0x9C
|
|||
BoardPlayerAutoSizeGet = .text:0x80068F08; // type:function size:0x40
|
||||
BoardPlayerMoveAwayIsDone = .text:0x80068F48; // type:function size:0x1C
|
||||
BoardPlayerMoveAwayStart = .text:0x80068F64; // type:function size:0x224
|
||||
BoardPlayerCurrMoveAwayStart = .text:0x80069188; // type:function size:0x40
|
||||
BoardPlayerMoveAwayStartCurr = .text:0x80069188; // type:function size:0x40
|
||||
MoveAwayObjFunc = .text:0x800691C8; // type:function size:0x100 scope:local
|
||||
BoardBowserSuitInit = .text:0x800692C8; // type:function size:0x1A4
|
||||
BoardBowserSuitKill = .text:0x8006946C; // type:function size:0x128
|
||||
|
|
@ -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
|
||||
|
|
|
|||
132
include/game/board/main.h
Normal file
132
include/game/board/main.h
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
#ifndef _BOARD_MAIN_H
|
||||
#define _BOARD_MAIN_H
|
||||
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/object.h"
|
||||
#include "game/data.h"
|
||||
#include "dolphin.h"
|
||||
|
||||
typedef struct board_focus_data {
|
||||
u16 view_type;
|
||||
s16 time;
|
||||
s16 max_time;
|
||||
float fov_start;
|
||||
float fov_end;
|
||||
float zoom_start;
|
||||
float zoom_end;
|
||||
Vec rot_start;
|
||||
Vec rot_end;
|
||||
Vec target_start;
|
||||
Vec target_end;
|
||||
} BoardFocusData;
|
||||
|
||||
typedef struct board_camera_data {
|
||||
struct {
|
||||
u8 hide_all : 1;
|
||||
u8 moving : 1;
|
||||
u8 quaking : 1;
|
||||
};
|
||||
u16 mask;
|
||||
s16 target_mdl;
|
||||
s16 target_space;
|
||||
s32 quake_timer;
|
||||
float quake_strength;
|
||||
float fov;
|
||||
float near;
|
||||
float far;
|
||||
float aspect;
|
||||
float viewport_x;
|
||||
float viewport_y;
|
||||
float viewport_w;
|
||||
float viewport_h;
|
||||
float viewport_near;
|
||||
float viewport_far;
|
||||
Vec pos;
|
||||
Vec up;
|
||||
Vec target;
|
||||
Vec offset;
|
||||
Vec rot;
|
||||
float zoom;
|
||||
void (*pos_calc)(struct board_camera_data *);
|
||||
BoardFocusData focus;
|
||||
} BoardCameraData;
|
||||
|
||||
static inline s32 BoardCurrGet()
|
||||
{
|
||||
return GWSystem.board;
|
||||
}
|
||||
|
||||
static inline s32 BoardPartyFlagGet()
|
||||
{
|
||||
s32 value = GWSystem.party;
|
||||
return value;
|
||||
}
|
||||
|
||||
extern BoardCameraData boardCamera;
|
||||
extern Process *boardObjMan;
|
||||
extern Process *boardMainProc;
|
||||
extern u32 boardRandSeed;
|
||||
extern omObjData *boardMainObj;
|
||||
|
||||
typedef void (*BoardFunc)(void);
|
||||
|
||||
typedef void (*BoardLightHook)(void);
|
||||
typedef void (*BoardCameraPosCalcFunc)(BoardCameraData *camera);
|
||||
|
||||
void BoardCommonInit(BoardFunc create, BoardFunc destroy);
|
||||
void BoardKill(void);
|
||||
s32 BoardIsKill(void);
|
||||
void BoardPauseEnableSet(s32 value);
|
||||
s32 BoardPauseEnableGet();
|
||||
void BoardSaveInit(s32 board);
|
||||
void BoardStoryConfigSet(s32 mg_type, s32 diff_story);
|
||||
void BoardPartyConfigSet(s32 team, s32 bonus_star, s32 mg_type, s32 max_turn, s32 p1_handicap, s32 p2_handicap, s32 p3_handicap, s32 p4_handicap);
|
||||
BOOL BoardTurnNext(void);
|
||||
void BoardNextOvlSet(OverlayID overlay);
|
||||
s32 BoardStartCheck(void);
|
||||
void BoardCameraBackup(void);
|
||||
void BoardCameraRestore(void);
|
||||
void BoardCameraScissorSet(s32 x, s32 y, s32 w, s32 h);
|
||||
void BoardCameraViewSet(s32 type);
|
||||
s32 BoardCameraPosGet(Vec *dst);
|
||||
s32 BoardCameraTargetGet(Vec *dst);
|
||||
s32 BoardCameraRotGet(Vec *dst);
|
||||
float BoardCameraZoomGet();
|
||||
s32 BoardCameraDirGet(Vec *dst);
|
||||
s32 BoardCameraPointDirGet(Vec *point, Vec *dst);
|
||||
void BoardCameraMaskSet(u16 mask);
|
||||
void BoardCameraMoveSet(s32 move);
|
||||
void BoardCameraOffsetSet(float x, float y, float z);
|
||||
void BoardCameraTargetPlayerSet(s32 player);
|
||||
void BoardCameraTargetModelSet(s16 model);
|
||||
void BoardCameraTargetSpaceSet(s32 space);
|
||||
void BoardCameraPosCalcFuncSet(BoardCameraPosCalcFunc func);
|
||||
void BoardCameraQuakeSet(s32 duration, float strength);
|
||||
void BoardCameraQuakeReset();
|
||||
void BoardCameraTargetSet(float x, float y, float z);
|
||||
void BoardCameraPosSet(float x, float y, float z);
|
||||
void BoardCameraXRotZoomSet(float zoom, float x_rot);
|
||||
void BoardCameraZoomSet(float zoom);
|
||||
void BoardCameraRotSet(float x, float y);
|
||||
void BoardCameraNearFarSet(float near, float far);
|
||||
void BoardCameraNearFarGet(float *near, float *far);
|
||||
void BoardCameraMotionStart(s16 model_target, Vec *rot_target, float zoom_target, float fov_target);
|
||||
void BoardCameraMotionStartEx(s16 model_target, Vec *rot_target, Vec *offset_end, float zoom_target, float fov_target, s16 max_time);
|
||||
void BoardCameraFovSet(float fov);
|
||||
s32 BoardCameraCullCheck(Vec *point, float radius);
|
||||
s32 BoardCameraMotionIsDone(void);
|
||||
void BoardCameraMotionWait(void);
|
||||
void BoardCameraInit(void);
|
||||
float BoardArcSin(float value);
|
||||
float BoardArcCos(float value);
|
||||
void BoardRandInit(void);
|
||||
u32 BoardRand(void);
|
||||
u32 BoardRandMod(u32 value);
|
||||
float BoardRandFloat(void);
|
||||
float BoardVecDistXZCalc(Vec *vec1, Vec *vec2);
|
||||
s32 BoardVecMaxDistXZCheck(Vec *vec1, Vec *vec2, float max_dist);
|
||||
s32 BoardVecMinDistCheck(Vec *vec1, Vec *vec2, float min_dist);
|
||||
s32 BoardDataDirReadAsync(s32 data_num);
|
||||
void BoardDataAsyncWait(s32 status);
|
||||
|
||||
#endif
|
||||
47
include/game/board/player.h
Normal file
47
include/game/board/player.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
#ifndef _BOARD_PLAYER_H
|
||||
#define _BOARD_PLAYER_H
|
||||
|
||||
#include "game/gamework_data.h"
|
||||
|
||||
extern s16 boardPlayerMdl[4];
|
||||
|
||||
static inline s16 BoardPlayerHandicapGet(s32 player)
|
||||
{
|
||||
return GWPlayer[player].handicap;
|
||||
}
|
||||
|
||||
static inline s32 BoardPlayerGetCurrIdx()
|
||||
{
|
||||
return GWSystem.player_curr;
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerGet(s32 player)
|
||||
{
|
||||
return &GWPlayer[player];
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerGetCurr()
|
||||
{
|
||||
return &GWPlayer[BoardPlayerGetCurrIdx()];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerModelGet(s32 player)
|
||||
{
|
||||
PlayerState *player_ptr = BoardPlayerGet(player);
|
||||
return boardPlayerMdl[player_ptr->player_idx];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerModelGetCurr()
|
||||
{
|
||||
PlayerState *player = BoardPlayerGetCurr();
|
||||
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
|
||||
|
|
@ -57,7 +57,7 @@ typedef struct player_state {
|
|||
u16 com : 1;
|
||||
u16 character : 4;
|
||||
u16 auto_size : 2;
|
||||
u16 field01_bit9 : 1;
|
||||
u16 field00_bit9 : 1;
|
||||
};
|
||||
/* 0x02 */ struct {
|
||||
u8 team : 1;
|
||||
|
|
|
|||
|
|
@ -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,4 +1,5 @@
|
|||
#include "common.h"
|
||||
#include "board_unsplit.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "math.h"
|
||||
#include "game/object.h"
|
||||
#include "game/flag.h"
|
||||
|
|
@ -6,52 +7,8 @@
|
|||
#include "game/wipe.h"
|
||||
#include "string.h"
|
||||
#include "game/hsfman.h"
|
||||
|
||||
|
||||
typedef struct board_focus_data {
|
||||
u16 view_type;
|
||||
s16 time;
|
||||
s16 max_time;
|
||||
float fov_start;
|
||||
float fov_end;
|
||||
float zoom_start;
|
||||
float zoom_end;
|
||||
Vec rot_start;
|
||||
Vec rot_end;
|
||||
Vec target_start;
|
||||
Vec target_end;
|
||||
} BoardFocusData;
|
||||
|
||||
typedef struct board_camera_data {
|
||||
struct {
|
||||
u8 hide_all : 1;
|
||||
u8 moving : 1;
|
||||
u8 quaking : 1;
|
||||
};
|
||||
u16 mask;
|
||||
s16 target_mdl;
|
||||
s16 target_space;
|
||||
s32 quake_timer;
|
||||
float quake_strength;
|
||||
float fov;
|
||||
float near;
|
||||
float far;
|
||||
float aspect;
|
||||
float viewport_x;
|
||||
float viewport_y;
|
||||
float viewport_w;
|
||||
float viewport_h;
|
||||
float viewport_near;
|
||||
float viewport_far;
|
||||
Vec pos;
|
||||
Vec up;
|
||||
Vec target;
|
||||
Vec offset;
|
||||
Vec rot;
|
||||
float zoom;
|
||||
void (*pos_calc)(struct board_camera_data *camera);
|
||||
BoardFocusData focus;
|
||||
} BoardCameraData;
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/player.h"
|
||||
|
||||
typedef struct camera_view {
|
||||
s16 x_rot;
|
||||
|
|
@ -59,7 +16,6 @@ typedef struct camera_view {
|
|||
s16 fov;
|
||||
} CameraView;
|
||||
|
||||
typedef void (*VoidFunc)(void);
|
||||
|
||||
omObjData *boardMainObj;
|
||||
u32 boardRandSeed;
|
||||
|
|
@ -70,11 +26,11 @@ void *boardTurnStartFunc;
|
|||
u32 lbl_801D3F00;
|
||||
u32 lbl_801D3EFC;
|
||||
u32 lbl_801D3EF8;
|
||||
VoidFunc boardTurnFunc;
|
||||
void *boardLightSetHook;
|
||||
void *boardLightResetHook;
|
||||
static VoidFunc destroyFunc;
|
||||
static VoidFunc createFunc;
|
||||
BoardFunc boardTurnFunc;
|
||||
BoardLightHook boardLightSetHook;
|
||||
BoardLightHook boardLightResetHook;
|
||||
static BoardFunc destroyFunc;
|
||||
static BoardFunc createFunc;
|
||||
static BOOL cameraUseBackup;
|
||||
static omObjData *tauntObj;
|
||||
static omObjData *cameraObj;
|
||||
|
|
@ -95,8 +51,7 @@ static CameraView camViewTbl[] = {
|
|||
{ -33, 3200, 25 },
|
||||
};
|
||||
|
||||
extern void BoardPlayerCoinsSet(s32 player, s32 value);
|
||||
extern void BoardPlayerAutoSizeSet(s32 player, s32 value);
|
||||
|
||||
extern void BoardModelPosGet(s16 model, Vec *pos);
|
||||
extern void BoardSpacePosGet(s32 layer, s32 space, Vec *pos);
|
||||
|
||||
|
|
@ -134,49 +89,6 @@ static void DestroyMainFunc(void);
|
|||
static void CreateBoard(void);
|
||||
static void DestroyBoard(void);
|
||||
|
||||
static inline s32 BoardCurrGet()
|
||||
{
|
||||
return GWSystem.board;
|
||||
}
|
||||
|
||||
static inline s32 BoardPartyFlagGet()
|
||||
{
|
||||
s32 value = GWSystem.party;
|
||||
return value;
|
||||
}
|
||||
|
||||
static inline s16 BoardHandicapGet(s32 player)
|
||||
{
|
||||
return GWPlayer[player].handicap;
|
||||
}
|
||||
|
||||
static inline s32 BoardPlayerCurrGetIdx()
|
||||
{
|
||||
return GWSystem.player_curr;
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerGet(s32 player)
|
||||
{
|
||||
return &GWPlayer[player];
|
||||
}
|
||||
|
||||
static inline PlayerState *BoardPlayerCurrGet()
|
||||
{
|
||||
return &GWPlayer[BoardPlayerCurrGetIdx()];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerModelGet(s32 player)
|
||||
{
|
||||
PlayerState *player_ptr = BoardPlayerGet(player);
|
||||
return boardPlayerMdl[player_ptr->player_idx];
|
||||
}
|
||||
|
||||
static inline s16 BoardPlayerCurrModelGet()
|
||||
{
|
||||
PlayerState *player = BoardPlayerCurrGet();
|
||||
return boardPlayerMdl[player->player_idx];
|
||||
}
|
||||
|
||||
static inline int GWMGTypeGet()
|
||||
{
|
||||
return GWSystem.mg_type;
|
||||
|
|
@ -187,10 +99,9 @@ static inline int GWMessSpeedGet()
|
|||
return GWSystem.mess_speed;
|
||||
}
|
||||
|
||||
#define BOARD_FABS(value) ((value < 0) ? -(value) : (value))
|
||||
|
||||
#define BoardFAbs(value) ((value < 0) ? -(value) : (value))
|
||||
|
||||
void BoardCommonInit(VoidFunc create, VoidFunc destroy)
|
||||
void BoardCommonInit(BoardFunc create, BoardFunc destroy)
|
||||
{
|
||||
omSysPauseEnable(FALSE);
|
||||
if(!_CheckFlag(FLAG_ID_MAKE(1, 0))) {
|
||||
|
|
@ -339,7 +250,7 @@ void BoardKill(void)
|
|||
BoardTutorialHookExec(29, 0);
|
||||
}
|
||||
HuAudFXAllStop();
|
||||
if(!BoardIsStarted()) {
|
||||
if(!BoardStartCheck()) {
|
||||
WipeCreate(WIPE_MODE_OUT, WIPE_TYPE_NORMAL, -1);
|
||||
boardTutorialF = 1;
|
||||
while(WipeStatGet()) {
|
||||
|
|
@ -439,7 +350,7 @@ void BoardSaveInit(s32 board)
|
|||
if(!BoardPartyFlagGet() || _CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
GWStarsSet(i, 0);
|
||||
} else {
|
||||
GWStarsSet(i, BoardHandicapGet(i));
|
||||
GWStarsSet(i, BoardPlayerHandicapGet(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -599,7 +510,7 @@ static void MainFunc(void)
|
|||
while(WipeStatGet()) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardPlayerCurrMoveAwayStart(GWPlayer[i].space_curr, 1);
|
||||
BoardPlayerMoveAwayStartCurr(GWPlayer[i].space_curr, 1);
|
||||
fade_type = 0;
|
||||
} else {
|
||||
if(BoardCurrGet() == 7 || BoardCurrGet() == 8) {
|
||||
|
|
@ -609,7 +520,7 @@ static void MainFunc(void)
|
|||
while(WipeStatGet()) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardPlayerCurrMoveAwayStart(GWPlayer[i].space_curr, 1);
|
||||
BoardPlayerMoveAwayStartCurr(GWPlayer[i].space_curr, 1);
|
||||
fade_type = 0;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -669,7 +580,7 @@ void BoardNextOvlSet(OverlayID overlay)
|
|||
BoardKill();
|
||||
}
|
||||
|
||||
BOOL BoardIsStarted(void)
|
||||
s32 BoardStartCheck(void)
|
||||
{
|
||||
if(_CheckFlag(FLAG_ID_MAKE(1, 2)) || _CheckFlag(FLAG_ID_MAKE(1, 3)) || _CheckFlag(FLAG_ID_MAKE(1, 4)) || _CheckFlag(FLAG_ID_MAKE(1, 5)) || _CheckFlag(FLAG_ID_MAKE(1, 6))) {
|
||||
return 1;
|
||||
|
|
@ -868,7 +779,7 @@ void BoardCameraViewSet(s32 type)
|
|||
} else {
|
||||
size = 1.0f;
|
||||
}
|
||||
BoardCameraTargetModelSet(BoardPlayerCurrModelGet());
|
||||
BoardCameraTargetModelSet(BoardPlayerModelGetCurr());
|
||||
BoardPlayerPosGet(GWSystem.player_curr, &focus->target_end);
|
||||
BoardCameraOffsetSet(0.0f, 100.0f*size, 0.0f);
|
||||
focus->target_end.y += 100.0f*size;
|
||||
|
|
@ -1022,7 +933,7 @@ void BoardCameraTargetSpaceSet(s32 space)
|
|||
camera->offset.x = camera->offset.y = camera->offset.z = 0;
|
||||
}
|
||||
|
||||
void BoardCameraPosCalcFuncSet(void (*func)(struct board_camera_data *camera))
|
||||
void BoardCameraPosCalcFuncSet(BoardCameraPosCalcFunc func)
|
||||
{
|
||||
BoardCameraData *camera = &boardCamera;
|
||||
if(!camera) {
|
||||
|
|
@ -1042,7 +953,7 @@ void BoardCameraQuakeSet(s32 duration, float strength)
|
|||
camera->quake_timer = duration;
|
||||
}
|
||||
|
||||
void BoardCameraQuakeReset(s32 duration, float strength)
|
||||
void BoardCameraQuakeReset()
|
||||
{
|
||||
BoardCameraData *camera = &boardCamera;
|
||||
camera->quaking = 0;
|
||||
|
|
@ -1093,7 +1004,6 @@ void BoardCameraNearFarSet(float near, float far)
|
|||
camera->far = far;
|
||||
}
|
||||
|
||||
|
||||
void BoardCameraNearFarGet(float *near, float *far)
|
||||
{
|
||||
BoardCameraData *camera = &boardCamera;
|
||||
|
|
@ -1180,7 +1090,7 @@ s32 BoardCameraCullCheck(Vec *point, float radius)
|
|||
}
|
||||
BoardCameraPointDirGet(point, &pos);
|
||||
dot = VECDotProduct(&dir, &pos);
|
||||
if(BoardFAbs(dot) < cos((camera->fov*M_PI)/180)) {
|
||||
if(BOARD_FABS(dot) < cos((camera->fov*M_PI)/180)) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
|
@ -1365,7 +1275,7 @@ float BoardArcSin(float value)
|
|||
s32 sign;
|
||||
if(value < 0) {
|
||||
sign = 1;
|
||||
value = BoardFAbs(value);
|
||||
value = BOARD_FABS(value);
|
||||
} else {
|
||||
sign = 0;
|
||||
}
|
||||
|
|
@ -1378,14 +1288,14 @@ float BoardArcSin(float value)
|
|||
result = 1.0f-atanf((float)sqrtf(1-(value*value))/value);
|
||||
}
|
||||
if(sign) {
|
||||
result = BoardFAbs(result);
|
||||
result = BOARD_FABS(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
float BoardArcCos(float value)
|
||||
{
|
||||
if(BoardFAbs(value) > 1) {
|
||||
if(BOARD_FABS(value) > 1) {
|
||||
return 0;
|
||||
}
|
||||
return 1.0f-BoardArcSin(value);
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
#include "common.h"
|
||||
#include "board_unsplit.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/gamework.h"
|
||||
#include "game/window.h"
|
||||
#include "game/object.h"
|
||||
#include "game/process.h"
|
||||
#include "game/board/player.h"
|
||||
#include "game/board/main.h"
|
||||
|
||||
//// #include "game/board/main.h"
|
||||
extern s32 BoardIsStarted(void);
|
||||
extern void BoardCameraMoveSet(s32);
|
||||
extern void BoardCameraViewSet(s32);
|
||||
extern void BoardPauseEnableSet(s32);
|
||||
extern void BoardCameraTargetPlayerSet(s32);
|
||||
extern void BoardCameraOffsetSet(float, float, float);
|
||||
extern void BoardCameraTargetModelSet(s16);
|
||||
extern void BoardCameraTargetPlayerSet(s32);
|
||||
extern Process* boardObjMan;
|
||||
//// #include "game/board/space.h"
|
||||
extern s32 BoardSpaceFlagPosGet(s32, s32, u32);
|
||||
extern void BoardSpaceDirPosGet(s32, s32, Vec*);
|
||||
|
|
@ -176,15 +169,6 @@ static s16 suitMdl = -1;
|
|||
static s16 suitPlayerMdl = -1;
|
||||
static s16 suitCurrMot = -1;
|
||||
|
||||
inline PlayerState* GetPlayer(s32 index) {
|
||||
return &GWPlayer[index];
|
||||
}
|
||||
|
||||
inline s16 GetBoardPlayer(s32 index) {
|
||||
PlayerState *player = GetPlayer(index);
|
||||
return boardPlayerMdl[player->player_idx];
|
||||
}
|
||||
|
||||
s32 BoardRollTypeGet(void) {
|
||||
return rollType;
|
||||
}
|
||||
|
|
@ -225,7 +209,7 @@ void BoardPlayerInit(void) {
|
|||
BoardPlayerSizeSet(var_r31, 0);
|
||||
GWPlayer[var_r31].color = 0;
|
||||
GWPlayer[var_r31].bowser_suit = 0;
|
||||
GWPlayer[var_r31].field01_bit9 = 0;
|
||||
GWPlayer[var_r31].field00_bit9 = 0;
|
||||
GWPlayer[var_r31].field08_bit3 = 0;
|
||||
}
|
||||
return;
|
||||
|
|
@ -241,7 +225,7 @@ void BoardPlayerInit(void) {
|
|||
}
|
||||
|
||||
void BoardPlayerModelInit(void) {
|
||||
s32 sp64[0x10];
|
||||
s32 sp64[14];
|
||||
s32 var_r31;
|
||||
s32 var_r30;
|
||||
s32 temp_r29;
|
||||
|
|
@ -319,7 +303,7 @@ void BoardPlayerModelKill(void) {
|
|||
PlayerState* temp_r29;
|
||||
|
||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
temp_r30 = GetPlayer(var_r31);
|
||||
temp_r30 = BoardPlayerGet(var_r31);
|
||||
if (boardPlayerMdl[temp_r30->player_idx] != -1) {
|
||||
BoardModelKill(boardPlayerMdl[temp_r30->player_idx]);
|
||||
boardPlayerMdl[temp_r30->player_idx] = -1;
|
||||
|
|
@ -333,22 +317,22 @@ void BoardPlayerModelKill(void) {
|
|||
}
|
||||
|
||||
void BoardPlayerLayerSet(s32 arg0, s32 arg1) {
|
||||
BoardModelLayerSet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelLayerSet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerCameraSet(s32 arg0, u16 arg1) {
|
||||
BoardModelCameraSet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelCameraSet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void fn_80062A40(s32 arg0, f32 arg8) {
|
||||
fn_8006DDE8(GetBoardPlayer(arg0), arg8);
|
||||
fn_8006DDE8(BoardPlayerModelGet(arg0), arg8);
|
||||
}
|
||||
|
||||
void BoardPlayerExistCheck(s32 arg0, s32 arg1) {
|
||||
if (arg1 == 0) {
|
||||
BoardModelExistCheck(GetBoardPlayer(arg0), 0);
|
||||
BoardModelExistCheck(BoardPlayerModelGet(arg0), 0);
|
||||
} else {
|
||||
BoardModelExistCheck(GetBoardPlayer(arg0), 1);
|
||||
BoardModelExistCheck(BoardPlayerModelGet(arg0), 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -358,7 +342,7 @@ s32 BoardPlayerItemAdd(s32 arg0, s32 arg1) {
|
|||
s32 var_r31;
|
||||
|
||||
var_r29 = -1;
|
||||
var_r30 = GetPlayer(arg0);
|
||||
var_r30 = BoardPlayerGet(arg0);
|
||||
for (var_r31 = 0; var_r31 < 3; var_r31++) {
|
||||
if (GWPlayer[arg0].items[var_r31] == -1) {
|
||||
HuAudFXPlay(0x360);
|
||||
|
|
@ -375,7 +359,7 @@ s32 BoardPlayerItemRemove(s32 arg0, s32 arg1) {
|
|||
s32 temp_r29;
|
||||
PlayerState* temp_r28;
|
||||
|
||||
temp_r28 = GetPlayer(arg0);
|
||||
temp_r28 = BoardPlayerGet(arg0);
|
||||
temp_r29 = temp_r28->items[arg1];
|
||||
if (temp_r28->items[arg1] == -1) {
|
||||
return temp_r29;
|
||||
|
|
@ -447,15 +431,15 @@ void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) {
|
|||
}
|
||||
|
||||
void BoardPlayerAmbSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
||||
BoardModelAmbSet(GetBoardPlayer(arg0), arg8, arg9, argA);
|
||||
BoardModelAmbSet(BoardPlayerModelGet(arg0), arg8, arg9, argA);
|
||||
}
|
||||
|
||||
void BoardPlayerMtxSet(s32 arg0, Mtx arg1) {
|
||||
BoardModelMtxSet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelMtxSet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerPosSetV(s32 arg0, Vec* arg1) {
|
||||
BoardModelPosSetV(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelPosSetV(BoardPlayerModelGet(arg0), arg1);
|
||||
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelPosSetV(suitMdl, arg1);
|
||||
|
|
@ -463,7 +447,7 @@ void BoardPlayerPosSetV(s32 arg0, Vec* arg1) {
|
|||
}
|
||||
|
||||
void BoardPlayerPosSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
||||
BoardModelPosSet(GetBoardPlayer(arg0), arg8, arg9, argA);
|
||||
BoardModelPosSet(BoardPlayerModelGet(arg0), arg8, arg9, argA);
|
||||
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelPosSet(suitMdl, arg8, arg9, argA);
|
||||
|
|
@ -471,11 +455,11 @@ void BoardPlayerPosSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
|||
}
|
||||
|
||||
void BoardPlayerPosGet(s32 arg0, Vec* arg1) {
|
||||
BoardModelPosGet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelPosGet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerRotSetV(s32 arg0, Vec* arg1) {
|
||||
BoardModelRotSetV(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelRotSetV(BoardPlayerModelGet(arg0), arg1);
|
||||
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelRotSetV(suitMdl, arg1);
|
||||
|
|
@ -483,7 +467,7 @@ void BoardPlayerRotSetV(s32 arg0, Vec* arg1) {
|
|||
}
|
||||
|
||||
void BoardPlayerRotSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
||||
BoardModelRotSet(GetBoardPlayer(arg0), arg8, arg9, argA);
|
||||
BoardModelRotSet(BoardPlayerModelGet(arg0), arg8, arg9, argA);
|
||||
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelRotSet(suitMdl, arg8, arg9, argA);
|
||||
|
|
@ -491,7 +475,7 @@ void BoardPlayerRotSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
|||
}
|
||||
|
||||
void BoardPlayerRotGet(s32 arg0, Vec* arg1) {
|
||||
BoardModelRotGet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelRotGet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerRotYSet(s32 arg0, f32 arg8) {
|
||||
|
|
@ -501,7 +485,7 @@ void BoardPlayerRotYSet(s32 arg0, f32 arg8) {
|
|||
if (arg8 > 360.0f) {
|
||||
arg8 -= 360.0f;
|
||||
}
|
||||
BoardModelRotYSet(GetBoardPlayer(arg0), arg8);
|
||||
BoardModelRotYSet(BoardPlayerModelGet(arg0), arg8);
|
||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
BoardModelRotYSet(suitMdl, arg8);
|
||||
}
|
||||
|
|
@ -513,47 +497,47 @@ f32 BoardPlayerRotYGet(s32 arg0) {
|
|||
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||
var_f31 = BoardModelRotYGet(suitMdl);
|
||||
} else {
|
||||
var_f31 = BoardModelRotYGet(GetBoardPlayer(arg0));
|
||||
var_f31 = BoardModelRotYGet(BoardPlayerModelGet(arg0));
|
||||
}
|
||||
return var_f31;
|
||||
}
|
||||
|
||||
void BoardPlayerScaleSetV(s32 arg0, Vec* arg1) {
|
||||
BoardModelScaleSetV(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelScaleSetV(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerScaleSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
||||
BoardModelScaleSet(GetBoardPlayer(arg0), arg8, arg9, argA);
|
||||
BoardModelScaleSet(BoardPlayerModelGet(arg0), arg8, arg9, argA);
|
||||
}
|
||||
|
||||
void BoardPlayerScaleGet(s32 arg0, s32 *arg1) {
|
||||
BoardModelScaleGet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelScaleGet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
s16 BoardPlayerCurrMotionGet(s32 arg0) {
|
||||
PlayerState* player = GetPlayer(arg0);
|
||||
PlayerState* player = BoardPlayerGet(arg0);
|
||||
|
||||
return playerMot[player->player_idx];
|
||||
}
|
||||
|
||||
void BoardPlayerVoiceEnableSet(s32 arg0, s32 arg1, s32 arg2) {
|
||||
BoardModelVoiceEnableSet(GetBoardPlayer(arg0), arg1, arg2);
|
||||
BoardModelVoiceEnableSet(BoardPlayerModelGet(arg0), arg1, arg2);
|
||||
}
|
||||
|
||||
void BoardPlayerMotionCreate(s32 arg0, s32 arg1) {
|
||||
BoardModelMotionCreate(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelMotionCreate(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerMotionKill(s32 arg0, s32 arg1) {
|
||||
BoardModelMotionKill(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelMotionKill(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerMotionEndCheck(s32 arg0) {
|
||||
BoardModelMotionEndCheck(GetBoardPlayer(arg0));
|
||||
BoardModelMotionEndCheck(BoardPlayerModelGet(arg0));
|
||||
}
|
||||
|
||||
void BoardPlayerMotionEndWait(s32 arg0) {
|
||||
while (BoardModelMotionEndCheck(GetBoardPlayer(arg0)) == 0) {
|
||||
while (BoardModelMotionEndCheck(BoardPlayerModelGet(arg0)) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
}
|
||||
|
|
@ -562,11 +546,11 @@ void BoardPlayerMotionStart(s32 arg0, s32 arg1, s32 arg2) {
|
|||
PlayerState* player;
|
||||
s32 temp_r29;
|
||||
|
||||
player = GetPlayer(arg0);
|
||||
player = BoardPlayerGet(arg0);
|
||||
if (arg1 == 0) {
|
||||
}
|
||||
if (arg1 != playerMot[player->player_idx]) {
|
||||
temp_r29 = BoardModelMotionStart(GetBoardPlayer(arg0), arg1, arg2);
|
||||
temp_r29 = BoardModelMotionStart(BoardPlayerModelGet(arg0), arg1, arg2);
|
||||
if (temp_r29 == 0) {
|
||||
playerMot[player->player_idx] = arg1;
|
||||
}
|
||||
|
|
@ -577,11 +561,11 @@ void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, s32 arg2)
|
|||
PlayerState* player;
|
||||
s32 temp_r29;
|
||||
|
||||
player = GetPlayer(arg0);
|
||||
player = BoardPlayerGet(arg0);
|
||||
if (arg1 == 0) {
|
||||
}
|
||||
if (arg1 != playerMot[player->player_idx]) {
|
||||
temp_r29 = BoardModelMotionShiftSet(GetBoardPlayer(arg0), arg1, arg8, arg9, arg2);
|
||||
temp_r29 = BoardModelMotionShiftSet(BoardPlayerModelGet(arg0), arg1, arg8, arg9, arg2);
|
||||
if (temp_r29 == 0) {
|
||||
playerMot[player->player_idx] = arg1;
|
||||
}
|
||||
|
|
@ -589,31 +573,31 @@ void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, s32 arg2)
|
|||
}
|
||||
|
||||
void BoardPlayerMotionSpeedSet(s32 arg0, f32 arg8) {
|
||||
BoardModelMotionSpeedSet(GetBoardPlayer(arg0), arg8);
|
||||
BoardModelMotionSpeedSet(BoardPlayerModelGet(arg0), arg8);
|
||||
}
|
||||
|
||||
void BoardPlayerMotionTimeSet(s32 arg0, f32 arg8) {
|
||||
BoardModelMotionTimeSet(GetBoardPlayer(arg0), arg8);
|
||||
BoardModelMotionTimeSet(BoardPlayerModelGet(arg0), arg8);
|
||||
}
|
||||
|
||||
f32 BoardPlayerMotionTimeGet(s32 arg0) {
|
||||
BoardModelMotionTimeGet(GetBoardPlayer(arg0));
|
||||
BoardModelMotionTimeGet(BoardPlayerModelGet(arg0));
|
||||
}
|
||||
|
||||
f32 BoardPlayerMotionMaxTimeGet(s32 arg0) {
|
||||
BoardModelMotionMaxTimeGet(GetBoardPlayer(arg0));
|
||||
BoardModelMotionMaxTimeGet(BoardPlayerModelGet(arg0));
|
||||
}
|
||||
|
||||
void BoardPlayerMotionTimeRangeSet(s32 arg0, f32 arg8, f32 arg9) {
|
||||
BoardModelMotionTimeRangeSet(GetBoardPlayer(arg0), arg8, arg9);
|
||||
BoardModelMotionTimeRangeSet(BoardPlayerModelGet(arg0), arg8, arg9);
|
||||
}
|
||||
|
||||
void BoardPlayerModelAttrSet(s32 arg0, s32 arg1) {
|
||||
BoardModelAttrSet(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelAttrSet(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerModelAttrReset(s32 arg0, s32 arg1) {
|
||||
BoardModelAttrReset(GetBoardPlayer(arg0), arg1);
|
||||
BoardModelAttrReset(BoardPlayerModelGet(arg0), arg1);
|
||||
}
|
||||
|
||||
void BoardPlayerCoinsSet(s32 arg0, s32 arg1) {
|
||||
|
|
@ -628,7 +612,7 @@ void BoardPlayerCoinsAdd(s32 arg0, s32 arg1) {
|
|||
PlayerState* player;
|
||||
s16 coins;
|
||||
|
||||
player = GetPlayer(arg0);
|
||||
player = BoardPlayerGet(arg0);
|
||||
if ((arg1 > 0) && (player->coins_total < 0x3E7)) {
|
||||
player->coins_total += arg1;
|
||||
if (player->coins_total > 0x3E7) {
|
||||
|
|
@ -646,7 +630,7 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) {
|
|||
PlayerState* temp_r27;
|
||||
Vec temp_r4[3] = { { 1, 1, 1 }, { 0.3, 0.3, 0.3 }, { 2.5, 2.5, 2.5 } };
|
||||
|
||||
temp_r27 = GetPlayer(arg0);
|
||||
temp_r27 = BoardPlayerGet(arg0);
|
||||
temp_r27->size = arg1;
|
||||
if (arg1 == 2) {
|
||||
CharModelSetStepType(GWPlayer[arg0].character, 4);
|
||||
|
|
@ -655,13 +639,13 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) {
|
|||
} else {
|
||||
CharModelSetStepType(GWPlayer[arg0].character, 0);
|
||||
}
|
||||
BoardModelScaleSetV(GetBoardPlayer(arg0), &temp_r4[arg1]);
|
||||
BoardModelScaleSetV(BoardPlayerModelGet(arg0), &temp_r4[arg1]);
|
||||
}
|
||||
|
||||
s32 BoardPlayerSizeGet(s32 arg0) {
|
||||
PlayerState* temp_r30;
|
||||
|
||||
temp_r30 = GetPlayer(arg0);
|
||||
temp_r30 = BoardPlayerGet(arg0);
|
||||
if (temp_r30 != 0) {
|
||||
arg0 = temp_r30->size;
|
||||
}
|
||||
|
|
@ -696,22 +680,22 @@ s32 BoardPlayerTeamFind(s32 arg0) {
|
|||
return var_r31;
|
||||
}
|
||||
|
||||
s32 BoardPlayerRankCalc(s32 arg0) {
|
||||
s32 temp_r29;
|
||||
s32 var_r30;
|
||||
s32 var_r31;
|
||||
s32 sp8[4];
|
||||
s32 BoardPlayerRankCalc(s32 player) {
|
||||
s32 coins;
|
||||
s32 rank;
|
||||
s32 i;
|
||||
s32 score[4];
|
||||
|
||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
temp_r29 = GWCoinsGet(var_r31);
|
||||
sp8[var_r31] = temp_r29 | (GWStarsGet(var_r31) << 0xA);
|
||||
for (i = 0; i < 4; i++) {
|
||||
coins = GWCoinsGet(i);
|
||||
score[i] = coins | (GWStarsGet(i) << 0xA);
|
||||
}
|
||||
for (var_r30 = 0, var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
if ((var_r31 != arg0) && (sp8[arg0] < sp8[var_r31])) {
|
||||
var_r30++;
|
||||
for (rank = 0, i = 0; i < 4; i++) {
|
||||
if ((i != player) && (score[player] < score[i])) {
|
||||
rank++;
|
||||
}
|
||||
}
|
||||
return var_r30;
|
||||
return rank;
|
||||
}
|
||||
|
||||
void BoardPlayerPreTurnHookSet(s32 arg0, s32 (*arg1)()) {
|
||||
|
|
@ -913,12 +897,12 @@ void BoardPlayerSizeRestore(s32 arg0) {
|
|||
s32 var_r28;
|
||||
s32 var_r27;
|
||||
|
||||
temp_r24 = GetPlayer(arg0);
|
||||
temp_r24 = BoardPlayerGet(arg0);
|
||||
if (temp_r24 != 0) {
|
||||
var_r28 = temp_r24->size;
|
||||
}
|
||||
if (var_r28 != 0) {
|
||||
temp_r23 = GetPlayer(arg0);
|
||||
temp_r23 = BoardPlayerGet(arg0);
|
||||
if (temp_r23 != 0) {
|
||||
var_r27 = temp_r23->size;
|
||||
}
|
||||
|
|
@ -945,8 +929,8 @@ void BoardPlayerZoomRestore(s32 arg0) {
|
|||
Vec sp18;
|
||||
Vec spC;
|
||||
|
||||
sp8 = GetPlayer(arg0);
|
||||
BoardModelPosGet(GetBoardPlayer(arg0), &spC);
|
||||
sp8 = BoardPlayerGet(arg0);
|
||||
BoardModelPosGet(BoardPlayerModelGet(arg0), &spC);
|
||||
temp_r27 = GWPlayer[arg0].space_curr;
|
||||
var_r31 = GWSystem.player_curr;
|
||||
if (var_r31 == -1) {
|
||||
|
|
|
|||
|
|
@ -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