Create main and player headers
This commit is contained in:
parent
2a1c4b808d
commit
b2186e5d09
6 changed files with 266 additions and 197 deletions
|
|
@ -1015,7 +1015,7 @@ MainFunc = .text:0x8005BF9C; // type:function size:0x7D0 scope:local
|
||||||
BoardTurnNext = .text:0x8005C76C; // type:function size:0x8C
|
BoardTurnNext = .text:0x8005C76C; // type:function size:0x8C
|
||||||
ExecTurnStart = .text:0x8005C7F8; // type:function size:0x28C scope:local
|
ExecTurnStart = .text:0x8005C7F8; // type:function size:0x28C scope:local
|
||||||
BoardNextOvlSet = .text:0x8005CA84; // type:function size:0xC4
|
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
|
CreateBoard = .text:0x8005CBD4; // type:function size:0x410 scope:local
|
||||||
DestroyBoard = .text:0x8005CFE4; // type:function size:0x128 scope:local
|
DestroyBoard = .text:0x8005CFE4; // type:function size:0x128 scope:local
|
||||||
BoardLightHookSet = .text:0x8005D10C; // type:function size:0xC
|
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
|
BoardPlayerAutoSizeGet = .text:0x80068F08; // type:function size:0x40
|
||||||
BoardPlayerMoveAwayIsDone = .text:0x80068F48; // type:function size:0x1C
|
BoardPlayerMoveAwayIsDone = .text:0x80068F48; // type:function size:0x1C
|
||||||
BoardPlayerMoveAwayStart = .text:0x80068F64; // type:function size:0x224
|
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
|
MoveAwayObjFunc = .text:0x800691C8; // type:function size:0x100 scope:local
|
||||||
BoardBowserSuitInit = .text:0x800692C8; // type:function size:0x1A4
|
BoardBowserSuitInit = .text:0x800692C8; // type:function size:0x1A4
|
||||||
BoardBowserSuitKill = .text:0x8006946C; // type:function size:0x128
|
BoardBowserSuitKill = .text:0x8006946C; // type:function size:0x128
|
||||||
|
|
|
||||||
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
|
||||||
43
include/game/board/player.h
Normal file
43
include/game/board/player.h
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
#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];
|
||||||
|
}
|
||||||
|
|
||||||
|
void BoardPlayerCoinsSet(s32 player, s32 value);
|
||||||
|
void BoardPlayerAutoSizeSet(s32 player, s32 value);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -57,7 +57,7 @@ typedef struct player_state {
|
||||||
u16 com : 1;
|
u16 com : 1;
|
||||||
u16 character : 4;
|
u16 character : 4;
|
||||||
u16 auto_size : 2;
|
u16 auto_size : 2;
|
||||||
u16 field01_bit9 : 1;
|
u16 field00_bit9 : 1;
|
||||||
};
|
};
|
||||||
/* 0x02 */ struct {
|
/* 0x02 */ struct {
|
||||||
u8 team : 1;
|
u8 team : 1;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "common.h"
|
#include "board_unsplit.h"
|
||||||
|
#include "game/gamework_data.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "game/object.h"
|
#include "game/object.h"
|
||||||
#include "game/flag.h"
|
#include "game/flag.h"
|
||||||
|
|
@ -6,52 +7,8 @@
|
||||||
#include "game/wipe.h"
|
#include "game/wipe.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "game/hsfman.h"
|
#include "game/hsfman.h"
|
||||||
|
#include "game/board/main.h"
|
||||||
|
#include "game/board/player.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;
|
|
||||||
|
|
||||||
typedef struct camera_view {
|
typedef struct camera_view {
|
||||||
s16 x_rot;
|
s16 x_rot;
|
||||||
|
|
@ -59,7 +16,6 @@ typedef struct camera_view {
|
||||||
s16 fov;
|
s16 fov;
|
||||||
} CameraView;
|
} CameraView;
|
||||||
|
|
||||||
typedef void (*VoidFunc)(void);
|
|
||||||
|
|
||||||
omObjData *boardMainObj;
|
omObjData *boardMainObj;
|
||||||
u32 boardRandSeed;
|
u32 boardRandSeed;
|
||||||
|
|
@ -70,11 +26,11 @@ void *boardTurnStartFunc;
|
||||||
u32 lbl_801D3F00;
|
u32 lbl_801D3F00;
|
||||||
u32 lbl_801D3EFC;
|
u32 lbl_801D3EFC;
|
||||||
u32 lbl_801D3EF8;
|
u32 lbl_801D3EF8;
|
||||||
VoidFunc boardTurnFunc;
|
BoardFunc boardTurnFunc;
|
||||||
void *boardLightSetHook;
|
BoardLightHook boardLightSetHook;
|
||||||
void *boardLightResetHook;
|
BoardLightHook boardLightResetHook;
|
||||||
static VoidFunc destroyFunc;
|
static BoardFunc destroyFunc;
|
||||||
static VoidFunc createFunc;
|
static BoardFunc createFunc;
|
||||||
static BOOL cameraUseBackup;
|
static BOOL cameraUseBackup;
|
||||||
static omObjData *tauntObj;
|
static omObjData *tauntObj;
|
||||||
static omObjData *cameraObj;
|
static omObjData *cameraObj;
|
||||||
|
|
@ -95,8 +51,7 @@ static CameraView camViewTbl[] = {
|
||||||
{ -33, 3200, 25 },
|
{ -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 BoardModelPosGet(s16 model, Vec *pos);
|
||||||
extern void BoardSpacePosGet(s32 layer, s32 space, 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 CreateBoard(void);
|
||||||
static void DestroyBoard(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()
|
static inline int GWMGTypeGet()
|
||||||
{
|
{
|
||||||
return GWSystem.mg_type;
|
return GWSystem.mg_type;
|
||||||
|
|
@ -187,10 +99,9 @@ static inline int GWMessSpeedGet()
|
||||||
return GWSystem.mess_speed;
|
return GWSystem.mess_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BOARD_FABS(value) ((value < 0) ? -(value) : (value))
|
||||||
|
|
||||||
#define BoardFAbs(value) ((value < 0) ? -(value) : (value))
|
void BoardCommonInit(BoardFunc create, BoardFunc destroy)
|
||||||
|
|
||||||
void BoardCommonInit(VoidFunc create, VoidFunc destroy)
|
|
||||||
{
|
{
|
||||||
omSysPauseEnable(FALSE);
|
omSysPauseEnable(FALSE);
|
||||||
if(!_CheckFlag(FLAG_ID_MAKE(1, 0))) {
|
if(!_CheckFlag(FLAG_ID_MAKE(1, 0))) {
|
||||||
|
|
@ -339,7 +250,7 @@ void BoardKill(void)
|
||||||
BoardTutorialHookExec(29, 0);
|
BoardTutorialHookExec(29, 0);
|
||||||
}
|
}
|
||||||
HuAudFXAllStop();
|
HuAudFXAllStop();
|
||||||
if(!BoardIsStarted()) {
|
if(!BoardStartCheck()) {
|
||||||
WipeCreate(WIPE_MODE_OUT, WIPE_TYPE_NORMAL, -1);
|
WipeCreate(WIPE_MODE_OUT, WIPE_TYPE_NORMAL, -1);
|
||||||
boardTutorialF = 1;
|
boardTutorialF = 1;
|
||||||
while(WipeStatGet()) {
|
while(WipeStatGet()) {
|
||||||
|
|
@ -439,7 +350,7 @@ void BoardSaveInit(s32 board)
|
||||||
if(!BoardPartyFlagGet() || _CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
if(!BoardPartyFlagGet() || _CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||||
GWStarsSet(i, 0);
|
GWStarsSet(i, 0);
|
||||||
} else {
|
} else {
|
||||||
GWStarsSet(i, BoardHandicapGet(i));
|
GWStarsSet(i, BoardPlayerHandicapGet(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -599,7 +510,7 @@ static void MainFunc(void)
|
||||||
while(WipeStatGet()) {
|
while(WipeStatGet()) {
|
||||||
HuPrcVSleep();
|
HuPrcVSleep();
|
||||||
}
|
}
|
||||||
BoardPlayerCurrMoveAwayStart(GWPlayer[i].space_curr, 1);
|
BoardPlayerMoveAwayStartCurr(GWPlayer[i].space_curr, 1);
|
||||||
fade_type = 0;
|
fade_type = 0;
|
||||||
} else {
|
} else {
|
||||||
if(BoardCurrGet() == 7 || BoardCurrGet() == 8) {
|
if(BoardCurrGet() == 7 || BoardCurrGet() == 8) {
|
||||||
|
|
@ -609,7 +520,7 @@ static void MainFunc(void)
|
||||||
while(WipeStatGet()) {
|
while(WipeStatGet()) {
|
||||||
HuPrcVSleep();
|
HuPrcVSleep();
|
||||||
}
|
}
|
||||||
BoardPlayerCurrMoveAwayStart(GWPlayer[i].space_curr, 1);
|
BoardPlayerMoveAwayStartCurr(GWPlayer[i].space_curr, 1);
|
||||||
fade_type = 0;
|
fade_type = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -669,7 +580,7 @@ void BoardNextOvlSet(OverlayID overlay)
|
||||||
BoardKill();
|
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))) {
|
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;
|
return 1;
|
||||||
|
|
@ -868,7 +779,7 @@ void BoardCameraViewSet(s32 type)
|
||||||
} else {
|
} else {
|
||||||
size = 1.0f;
|
size = 1.0f;
|
||||||
}
|
}
|
||||||
BoardCameraTargetModelSet(BoardPlayerCurrModelGet());
|
BoardCameraTargetModelSet(BoardPlayerModelGetCurr());
|
||||||
BoardPlayerPosGet(GWSystem.player_curr, &focus->target_end);
|
BoardPlayerPosGet(GWSystem.player_curr, &focus->target_end);
|
||||||
BoardCameraOffsetSet(0.0f, 100.0f*size, 0.0f);
|
BoardCameraOffsetSet(0.0f, 100.0f*size, 0.0f);
|
||||||
focus->target_end.y += 100.0f*size;
|
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;
|
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;
|
BoardCameraData *camera = &boardCamera;
|
||||||
if(!camera) {
|
if(!camera) {
|
||||||
|
|
@ -1042,7 +953,7 @@ void BoardCameraQuakeSet(s32 duration, float strength)
|
||||||
camera->quake_timer = duration;
|
camera->quake_timer = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardCameraQuakeReset(s32 duration, float strength)
|
void BoardCameraQuakeReset()
|
||||||
{
|
{
|
||||||
BoardCameraData *camera = &boardCamera;
|
BoardCameraData *camera = &boardCamera;
|
||||||
camera->quaking = 0;
|
camera->quaking = 0;
|
||||||
|
|
@ -1093,7 +1004,6 @@ void BoardCameraNearFarSet(float near, float far)
|
||||||
camera->far = far;
|
camera->far = far;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BoardCameraNearFarGet(float *near, float *far)
|
void BoardCameraNearFarGet(float *near, float *far)
|
||||||
{
|
{
|
||||||
BoardCameraData *camera = &boardCamera;
|
BoardCameraData *camera = &boardCamera;
|
||||||
|
|
@ -1180,7 +1090,7 @@ s32 BoardCameraCullCheck(Vec *point, float radius)
|
||||||
}
|
}
|
||||||
BoardCameraPointDirGet(point, &pos);
|
BoardCameraPointDirGet(point, &pos);
|
||||||
dot = VECDotProduct(&dir, &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;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -1365,7 +1275,7 @@ float BoardArcSin(float value)
|
||||||
s32 sign;
|
s32 sign;
|
||||||
if(value < 0) {
|
if(value < 0) {
|
||||||
sign = 1;
|
sign = 1;
|
||||||
value = BoardFAbs(value);
|
value = BOARD_FABS(value);
|
||||||
} else {
|
} else {
|
||||||
sign = 0;
|
sign = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1378,14 +1288,14 @@ float BoardArcSin(float value)
|
||||||
result = 1.0f-atanf((float)sqrtf(1-(value*value))/value);
|
result = 1.0f-atanf((float)sqrtf(1-(value*value))/value);
|
||||||
}
|
}
|
||||||
if(sign) {
|
if(sign) {
|
||||||
result = BoardFAbs(result);
|
result = BOARD_FABS(result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
float BoardArcCos(float value)
|
float BoardArcCos(float value)
|
||||||
{
|
{
|
||||||
if(BoardFAbs(value) > 1) {
|
if(BOARD_FABS(value) > 1) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1.0f-BoardArcSin(value);
|
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/gamework.h"
|
||||||
#include "game/window.h"
|
#include "game/window.h"
|
||||||
#include "game/object.h"
|
#include "game/object.h"
|
||||||
#include "game/process.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"
|
//// #include "game/board/space.h"
|
||||||
extern s32 BoardSpaceFlagPosGet(s32, s32, u32);
|
extern s32 BoardSpaceFlagPosGet(s32, s32, u32);
|
||||||
extern void BoardSpaceDirPosGet(s32, s32, Vec*);
|
extern void BoardSpaceDirPosGet(s32, s32, Vec*);
|
||||||
|
|
@ -176,15 +169,6 @@ static s16 suitMdl = -1;
|
||||||
static s16 suitPlayerMdl = -1;
|
static s16 suitPlayerMdl = -1;
|
||||||
static s16 suitCurrMot = -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) {
|
s32 BoardRollTypeGet(void) {
|
||||||
return rollType;
|
return rollType;
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +209,7 @@ void BoardPlayerInit(void) {
|
||||||
BoardPlayerSizeSet(var_r31, 0);
|
BoardPlayerSizeSet(var_r31, 0);
|
||||||
GWPlayer[var_r31].color = 0;
|
GWPlayer[var_r31].color = 0;
|
||||||
GWPlayer[var_r31].bowser_suit = 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;
|
GWPlayer[var_r31].field08_bit3 = 0;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -241,7 +225,7 @@ void BoardPlayerInit(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerModelInit(void) {
|
void BoardPlayerModelInit(void) {
|
||||||
s32 sp64[0x10];
|
s32 sp64[14];
|
||||||
s32 var_r31;
|
s32 var_r31;
|
||||||
s32 var_r30;
|
s32 var_r30;
|
||||||
s32 temp_r29;
|
s32 temp_r29;
|
||||||
|
|
@ -319,7 +303,7 @@ void BoardPlayerModelKill(void) {
|
||||||
PlayerState* temp_r29;
|
PlayerState* temp_r29;
|
||||||
|
|
||||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
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) {
|
if (boardPlayerMdl[temp_r30->player_idx] != -1) {
|
||||||
BoardModelKill(boardPlayerMdl[temp_r30->player_idx]);
|
BoardModelKill(boardPlayerMdl[temp_r30->player_idx]);
|
||||||
boardPlayerMdl[temp_r30->player_idx] = -1;
|
boardPlayerMdl[temp_r30->player_idx] = -1;
|
||||||
|
|
@ -333,22 +317,22 @@ void BoardPlayerModelKill(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerLayerSet(s32 arg0, s32 arg1) {
|
void BoardPlayerLayerSet(s32 arg0, s32 arg1) {
|
||||||
BoardModelLayerSet(GetBoardPlayer(arg0), arg1);
|
BoardModelLayerSet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerCameraSet(s32 arg0, u16 arg1) {
|
void BoardPlayerCameraSet(s32 arg0, u16 arg1) {
|
||||||
BoardModelCameraSet(GetBoardPlayer(arg0), arg1);
|
BoardModelCameraSet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fn_80062A40(s32 arg0, f32 arg8) {
|
void fn_80062A40(s32 arg0, f32 arg8) {
|
||||||
fn_8006DDE8(GetBoardPlayer(arg0), arg8);
|
fn_8006DDE8(BoardPlayerModelGet(arg0), arg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerExistCheck(s32 arg0, s32 arg1) {
|
void BoardPlayerExistCheck(s32 arg0, s32 arg1) {
|
||||||
if (arg1 == 0) {
|
if (arg1 == 0) {
|
||||||
BoardModelExistCheck(GetBoardPlayer(arg0), 0);
|
BoardModelExistCheck(BoardPlayerModelGet(arg0), 0);
|
||||||
} else {
|
} else {
|
||||||
BoardModelExistCheck(GetBoardPlayer(arg0), 1);
|
BoardModelExistCheck(BoardPlayerModelGet(arg0), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -358,7 +342,7 @@ s32 BoardPlayerItemAdd(s32 arg0, s32 arg1) {
|
||||||
s32 var_r31;
|
s32 var_r31;
|
||||||
|
|
||||||
var_r29 = -1;
|
var_r29 = -1;
|
||||||
var_r30 = GetPlayer(arg0);
|
var_r30 = BoardPlayerGet(arg0);
|
||||||
for (var_r31 = 0; var_r31 < 3; var_r31++) {
|
for (var_r31 = 0; var_r31 < 3; var_r31++) {
|
||||||
if (GWPlayer[arg0].items[var_r31] == -1) {
|
if (GWPlayer[arg0].items[var_r31] == -1) {
|
||||||
HuAudFXPlay(0x360);
|
HuAudFXPlay(0x360);
|
||||||
|
|
@ -375,7 +359,7 @@ s32 BoardPlayerItemRemove(s32 arg0, s32 arg1) {
|
||||||
s32 temp_r29;
|
s32 temp_r29;
|
||||||
PlayerState* temp_r28;
|
PlayerState* temp_r28;
|
||||||
|
|
||||||
temp_r28 = GetPlayer(arg0);
|
temp_r28 = BoardPlayerGet(arg0);
|
||||||
temp_r29 = temp_r28->items[arg1];
|
temp_r29 = temp_r28->items[arg1];
|
||||||
if (temp_r28->items[arg1] == -1) {
|
if (temp_r28->items[arg1] == -1) {
|
||||||
return temp_r29;
|
return temp_r29;
|
||||||
|
|
@ -447,15 +431,15 @@ void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerAmbSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
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) {
|
void BoardPlayerMtxSet(s32 arg0, Mtx arg1) {
|
||||||
BoardModelMtxSet(GetBoardPlayer(arg0), arg1);
|
BoardModelMtxSet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerPosSetV(s32 arg0, Vec* arg1) {
|
void BoardPlayerPosSetV(s32 arg0, Vec* arg1) {
|
||||||
BoardModelPosSetV(GetBoardPlayer(arg0), arg1);
|
BoardModelPosSetV(BoardPlayerModelGet(arg0), arg1);
|
||||||
|
|
||||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
BoardModelPosSetV(suitMdl, arg1);
|
BoardModelPosSetV(suitMdl, arg1);
|
||||||
|
|
@ -463,7 +447,7 @@ void BoardPlayerPosSetV(s32 arg0, Vec* arg1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerPosSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
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) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
BoardModelPosSet(suitMdl, arg8, arg9, argA);
|
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) {
|
void BoardPlayerPosGet(s32 arg0, Vec* arg1) {
|
||||||
BoardModelPosGet(GetBoardPlayer(arg0), arg1);
|
BoardModelPosGet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerRotSetV(s32 arg0, Vec* arg1) {
|
void BoardPlayerRotSetV(s32 arg0, Vec* arg1) {
|
||||||
BoardModelRotSetV(GetBoardPlayer(arg0), arg1);
|
BoardModelRotSetV(BoardPlayerModelGet(arg0), arg1);
|
||||||
|
|
||||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
BoardModelRotSetV(suitMdl, arg1);
|
BoardModelRotSetV(suitMdl, arg1);
|
||||||
|
|
@ -483,7 +467,7 @@ void BoardPlayerRotSetV(s32 arg0, Vec* arg1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerRotSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
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) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
BoardModelRotSet(suitMdl, arg8, arg9, argA);
|
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) {
|
void BoardPlayerRotGet(s32 arg0, Vec* arg1) {
|
||||||
BoardModelRotGet(GetBoardPlayer(arg0), arg1);
|
BoardModelRotGet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerRotYSet(s32 arg0, f32 arg8) {
|
void BoardPlayerRotYSet(s32 arg0, f32 arg8) {
|
||||||
|
|
@ -501,7 +485,7 @@ void BoardPlayerRotYSet(s32 arg0, f32 arg8) {
|
||||||
if (arg8 > 360.0f) {
|
if (arg8 > 360.0f) {
|
||||||
arg8 -= 360.0f;
|
arg8 -= 360.0f;
|
||||||
}
|
}
|
||||||
BoardModelRotYSet(GetBoardPlayer(arg0), arg8);
|
BoardModelRotYSet(BoardPlayerModelGet(arg0), arg8);
|
||||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
BoardModelRotYSet(suitMdl, arg8);
|
BoardModelRotYSet(suitMdl, arg8);
|
||||||
}
|
}
|
||||||
|
|
@ -513,47 +497,47 @@ f32 BoardPlayerRotYGet(s32 arg0) {
|
||||||
if (GWPlayer[arg0].bowser_suit != 0) {
|
if (GWPlayer[arg0].bowser_suit != 0) {
|
||||||
var_f31 = BoardModelRotYGet(suitMdl);
|
var_f31 = BoardModelRotYGet(suitMdl);
|
||||||
} else {
|
} else {
|
||||||
var_f31 = BoardModelRotYGet(GetBoardPlayer(arg0));
|
var_f31 = BoardModelRotYGet(BoardPlayerModelGet(arg0));
|
||||||
}
|
}
|
||||||
return var_f31;
|
return var_f31;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerScaleSetV(s32 arg0, Vec* arg1) {
|
void BoardPlayerScaleSetV(s32 arg0, Vec* arg1) {
|
||||||
BoardModelScaleSetV(GetBoardPlayer(arg0), arg1);
|
BoardModelScaleSetV(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerScaleSet(s32 arg0, f32 arg8, f32 arg9, f32 argA) {
|
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) {
|
void BoardPlayerScaleGet(s32 arg0, s32 *arg1) {
|
||||||
BoardModelScaleGet(GetBoardPlayer(arg0), arg1);
|
BoardModelScaleGet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
s16 BoardPlayerCurrMotionGet(s32 arg0) {
|
s16 BoardPlayerCurrMotionGet(s32 arg0) {
|
||||||
PlayerState* player = GetPlayer(arg0);
|
PlayerState* player = BoardPlayerGet(arg0);
|
||||||
|
|
||||||
return playerMot[player->player_idx];
|
return playerMot[player->player_idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerVoiceEnableSet(s32 arg0, s32 arg1, s32 arg2) {
|
void BoardPlayerVoiceEnableSet(s32 arg0, s32 arg1, s32 arg2) {
|
||||||
BoardModelVoiceEnableSet(GetBoardPlayer(arg0), arg1, arg2);
|
BoardModelVoiceEnableSet(BoardPlayerModelGet(arg0), arg1, arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionCreate(s32 arg0, s32 arg1) {
|
void BoardPlayerMotionCreate(s32 arg0, s32 arg1) {
|
||||||
BoardModelMotionCreate(GetBoardPlayer(arg0), arg1);
|
BoardModelMotionCreate(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionKill(s32 arg0, s32 arg1) {
|
void BoardPlayerMotionKill(s32 arg0, s32 arg1) {
|
||||||
BoardModelMotionKill(GetBoardPlayer(arg0), arg1);
|
BoardModelMotionKill(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionEndCheck(s32 arg0) {
|
void BoardPlayerMotionEndCheck(s32 arg0) {
|
||||||
BoardModelMotionEndCheck(GetBoardPlayer(arg0));
|
BoardModelMotionEndCheck(BoardPlayerModelGet(arg0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionEndWait(s32 arg0) {
|
void BoardPlayerMotionEndWait(s32 arg0) {
|
||||||
while (BoardModelMotionEndCheck(GetBoardPlayer(arg0)) == 0) {
|
while (BoardModelMotionEndCheck(BoardPlayerModelGet(arg0)) == 0) {
|
||||||
HuPrcVSleep();
|
HuPrcVSleep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -562,11 +546,11 @@ void BoardPlayerMotionStart(s32 arg0, s32 arg1, s32 arg2) {
|
||||||
PlayerState* player;
|
PlayerState* player;
|
||||||
s32 temp_r29;
|
s32 temp_r29;
|
||||||
|
|
||||||
player = GetPlayer(arg0);
|
player = BoardPlayerGet(arg0);
|
||||||
if (arg1 == 0) {
|
if (arg1 == 0) {
|
||||||
}
|
}
|
||||||
if (arg1 != playerMot[player->player_idx]) {
|
if (arg1 != playerMot[player->player_idx]) {
|
||||||
temp_r29 = BoardModelMotionStart(GetBoardPlayer(arg0), arg1, arg2);
|
temp_r29 = BoardModelMotionStart(BoardPlayerModelGet(arg0), arg1, arg2);
|
||||||
if (temp_r29 == 0) {
|
if (temp_r29 == 0) {
|
||||||
playerMot[player->player_idx] = arg1;
|
playerMot[player->player_idx] = arg1;
|
||||||
}
|
}
|
||||||
|
|
@ -577,11 +561,11 @@ void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, s32 arg2)
|
||||||
PlayerState* player;
|
PlayerState* player;
|
||||||
s32 temp_r29;
|
s32 temp_r29;
|
||||||
|
|
||||||
player = GetPlayer(arg0);
|
player = BoardPlayerGet(arg0);
|
||||||
if (arg1 == 0) {
|
if (arg1 == 0) {
|
||||||
}
|
}
|
||||||
if (arg1 != playerMot[player->player_idx]) {
|
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) {
|
if (temp_r29 == 0) {
|
||||||
playerMot[player->player_idx] = arg1;
|
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) {
|
void BoardPlayerMotionSpeedSet(s32 arg0, f32 arg8) {
|
||||||
BoardModelMotionSpeedSet(GetBoardPlayer(arg0), arg8);
|
BoardModelMotionSpeedSet(BoardPlayerModelGet(arg0), arg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionTimeSet(s32 arg0, f32 arg8) {
|
void BoardPlayerMotionTimeSet(s32 arg0, f32 arg8) {
|
||||||
BoardModelMotionTimeSet(GetBoardPlayer(arg0), arg8);
|
BoardModelMotionTimeSet(BoardPlayerModelGet(arg0), arg8);
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 BoardPlayerMotionTimeGet(s32 arg0) {
|
f32 BoardPlayerMotionTimeGet(s32 arg0) {
|
||||||
BoardModelMotionTimeGet(GetBoardPlayer(arg0));
|
BoardModelMotionTimeGet(BoardPlayerModelGet(arg0));
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 BoardPlayerMotionMaxTimeGet(s32 arg0) {
|
f32 BoardPlayerMotionMaxTimeGet(s32 arg0) {
|
||||||
BoardModelMotionMaxTimeGet(GetBoardPlayer(arg0));
|
BoardModelMotionMaxTimeGet(BoardPlayerModelGet(arg0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerMotionTimeRangeSet(s32 arg0, f32 arg8, f32 arg9) {
|
void BoardPlayerMotionTimeRangeSet(s32 arg0, f32 arg8, f32 arg9) {
|
||||||
BoardModelMotionTimeRangeSet(GetBoardPlayer(arg0), arg8, arg9);
|
BoardModelMotionTimeRangeSet(BoardPlayerModelGet(arg0), arg8, arg9);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerModelAttrSet(s32 arg0, s32 arg1) {
|
void BoardPlayerModelAttrSet(s32 arg0, s32 arg1) {
|
||||||
BoardModelAttrSet(GetBoardPlayer(arg0), arg1);
|
BoardModelAttrSet(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerModelAttrReset(s32 arg0, s32 arg1) {
|
void BoardPlayerModelAttrReset(s32 arg0, s32 arg1) {
|
||||||
BoardModelAttrReset(GetBoardPlayer(arg0), arg1);
|
BoardModelAttrReset(BoardPlayerModelGet(arg0), arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerCoinsSet(s32 arg0, s32 arg1) {
|
void BoardPlayerCoinsSet(s32 arg0, s32 arg1) {
|
||||||
|
|
@ -628,7 +612,7 @@ void BoardPlayerCoinsAdd(s32 arg0, s32 arg1) {
|
||||||
PlayerState* player;
|
PlayerState* player;
|
||||||
s16 coins;
|
s16 coins;
|
||||||
|
|
||||||
player = GetPlayer(arg0);
|
player = BoardPlayerGet(arg0);
|
||||||
if ((arg1 > 0) && (player->coins_total < 0x3E7)) {
|
if ((arg1 > 0) && (player->coins_total < 0x3E7)) {
|
||||||
player->coins_total += arg1;
|
player->coins_total += arg1;
|
||||||
if (player->coins_total > 0x3E7) {
|
if (player->coins_total > 0x3E7) {
|
||||||
|
|
@ -646,7 +630,7 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) {
|
||||||
PlayerState* temp_r27;
|
PlayerState* temp_r27;
|
||||||
Vec temp_r4[3] = { { 1, 1, 1 }, { 0.3, 0.3, 0.3 }, { 2.5, 2.5, 2.5 } };
|
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;
|
temp_r27->size = arg1;
|
||||||
if (arg1 == 2) {
|
if (arg1 == 2) {
|
||||||
CharModelSetStepType(GWPlayer[arg0].character, 4);
|
CharModelSetStepType(GWPlayer[arg0].character, 4);
|
||||||
|
|
@ -655,13 +639,13 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) {
|
||||||
} else {
|
} else {
|
||||||
CharModelSetStepType(GWPlayer[arg0].character, 0);
|
CharModelSetStepType(GWPlayer[arg0].character, 0);
|
||||||
}
|
}
|
||||||
BoardModelScaleSetV(GetBoardPlayer(arg0), &temp_r4[arg1]);
|
BoardModelScaleSetV(BoardPlayerModelGet(arg0), &temp_r4[arg1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 BoardPlayerSizeGet(s32 arg0) {
|
s32 BoardPlayerSizeGet(s32 arg0) {
|
||||||
PlayerState* temp_r30;
|
PlayerState* temp_r30;
|
||||||
|
|
||||||
temp_r30 = GetPlayer(arg0);
|
temp_r30 = BoardPlayerGet(arg0);
|
||||||
if (temp_r30 != 0) {
|
if (temp_r30 != 0) {
|
||||||
arg0 = temp_r30->size;
|
arg0 = temp_r30->size;
|
||||||
}
|
}
|
||||||
|
|
@ -696,22 +680,22 @@ s32 BoardPlayerTeamFind(s32 arg0) {
|
||||||
return var_r31;
|
return var_r31;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 BoardPlayerRankCalc(s32 arg0) {
|
s32 BoardPlayerRankCalc(s32 player) {
|
||||||
s32 temp_r29;
|
s32 coins;
|
||||||
s32 var_r30;
|
s32 rank;
|
||||||
s32 var_r31;
|
s32 i;
|
||||||
s32 sp8[4];
|
s32 score[4];
|
||||||
|
|
||||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
for (i = 0; i < 4; i++) {
|
||||||
temp_r29 = GWCoinsGet(var_r31);
|
coins = GWCoinsGet(i);
|
||||||
sp8[var_r31] = temp_r29 | (GWStarsGet(var_r31) << 0xA);
|
score[i] = coins | (GWStarsGet(i) << 0xA);
|
||||||
}
|
}
|
||||||
for (var_r30 = 0, var_r31 = 0; var_r31 < 4; var_r31++) {
|
for (rank = 0, i = 0; i < 4; i++) {
|
||||||
if ((var_r31 != arg0) && (sp8[arg0] < sp8[var_r31])) {
|
if ((i != player) && (score[player] < score[i])) {
|
||||||
var_r30++;
|
rank++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return var_r30;
|
return rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardPlayerPreTurnHookSet(s32 arg0, s32 (*arg1)()) {
|
void BoardPlayerPreTurnHookSet(s32 arg0, s32 (*arg1)()) {
|
||||||
|
|
@ -913,12 +897,12 @@ void BoardPlayerSizeRestore(s32 arg0) {
|
||||||
s32 var_r28;
|
s32 var_r28;
|
||||||
s32 var_r27;
|
s32 var_r27;
|
||||||
|
|
||||||
temp_r24 = GetPlayer(arg0);
|
temp_r24 = BoardPlayerGet(arg0);
|
||||||
if (temp_r24 != 0) {
|
if (temp_r24 != 0) {
|
||||||
var_r28 = temp_r24->size;
|
var_r28 = temp_r24->size;
|
||||||
}
|
}
|
||||||
if (var_r28 != 0) {
|
if (var_r28 != 0) {
|
||||||
temp_r23 = GetPlayer(arg0);
|
temp_r23 = BoardPlayerGet(arg0);
|
||||||
if (temp_r23 != 0) {
|
if (temp_r23 != 0) {
|
||||||
var_r27 = temp_r23->size;
|
var_r27 = temp_r23->size;
|
||||||
}
|
}
|
||||||
|
|
@ -945,8 +929,8 @@ void BoardPlayerZoomRestore(s32 arg0) {
|
||||||
Vec sp18;
|
Vec sp18;
|
||||||
Vec spC;
|
Vec spC;
|
||||||
|
|
||||||
sp8 = GetPlayer(arg0);
|
sp8 = BoardPlayerGet(arg0);
|
||||||
BoardModelPosGet(GetBoardPlayer(arg0), &spC);
|
BoardModelPosGet(BoardPlayerModelGet(arg0), &spC);
|
||||||
temp_r27 = GWPlayer[arg0].space_curr;
|
temp_r27 = GWPlayer[arg0].space_curr;
|
||||||
var_r31 = GWSystem.player_curr;
|
var_r31 = GWSystem.player_curr;
|
||||||
if (var_r31 == -1) {
|
if (var_r31 == -1) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue