Merge branch 'main' into main
This commit is contained in:
commit
83df5dfe18
110 changed files with 11426 additions and 1767 deletions
|
|
@ -41,8 +41,8 @@ extern void BoardPlayerMotionEndWait(s32);
|
|||
extern void BoardPlayerMotionShiftSet(s32, s32, f32, f32, s32);
|
||||
extern void BoardPlayerCoinsAdd(s32, s32);
|
||||
extern void BoardRotateDiceNumbers(s32);
|
||||
extern void BoardCameraAnimBlendSet(s32, s16, s16);
|
||||
extern s32 BoardPlayerAnimBlendCheck(s32);
|
||||
extern void BoardCameraMotBlendSet(s32, s16, s16);
|
||||
extern s32 BoardPlayerMotBlendCheck(s32);
|
||||
|
||||
static omObjData *coinChgObj[4] = {
|
||||
NULL,
|
||||
|
|
@ -64,7 +64,7 @@ static s32 coinDigitMdl[10] = {
|
|||
MAKE_DATA_NUM(DATADIR_BOARD, 21),
|
||||
};
|
||||
|
||||
void BoardLandBlueExec(s32 player, s16 space) {
|
||||
void BoardLandBlueExec(s32 player, s32 space) {
|
||||
Vec pos;
|
||||
s32 i;
|
||||
s8 coin_chg;
|
||||
|
|
@ -72,8 +72,8 @@ void BoardLandBlueExec(s32 player, s16 space) {
|
|||
|
||||
|
||||
BoardCameraViewSet(2);
|
||||
BoardPlayerAnimBlendSet(player, 0, 15);
|
||||
while (BoardPlayerAnimBlendCheck(player) == 0) {
|
||||
BoardPlayerMotBlendSet(player, 0, 15);
|
||||
while (BoardPlayerMotBlendCheck(player) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) {
|
||||
|
|
@ -105,7 +105,7 @@ void BoardLandBlueExec(s32 player, s16 space) {
|
|||
BoardRotateDiceNumbers(player);
|
||||
}
|
||||
|
||||
void BoardLandRedExec(s32 player, s16 space) {
|
||||
void BoardLandRedExec(s32 player, s32 space) {
|
||||
Vec pos;
|
||||
s32 i;
|
||||
s8 coin_chg;
|
||||
|
|
@ -113,8 +113,8 @@ void BoardLandRedExec(s32 player, s16 space) {
|
|||
|
||||
BoardCameraViewSet(2);
|
||||
omVibrate(player, 12, 6, 6);
|
||||
BoardPlayerAnimBlendSet(player, 0, 15);
|
||||
while (BoardPlayerAnimBlendCheck(player) == 0) {
|
||||
BoardPlayerMotBlendSet(player, 0, 15);
|
||||
while (BoardPlayerMotBlendCheck(player) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) {
|
||||
|
|
@ -162,7 +162,7 @@ s8 BoardCoinChgCreate(Vec *pos, s8 value) {
|
|||
|
||||
obj = omAddObjEx(boardObjMan, 266, 0, 0, -1, &UpdateCoinChg);
|
||||
coinChgObj[i] = obj;
|
||||
coin_chg = (coinChg *)obj->work;
|
||||
coin_chg = OM_GET_WORK_PTR(obj, coinChg);
|
||||
coin_chg->hide = 0;
|
||||
coin_chg->update = 0;
|
||||
coin_chg->minus = (value < 0) ? 1 : 0;
|
||||
|
|
@ -189,7 +189,7 @@ s32 BoardCoinChgExist(s32 index) {
|
|||
return index;
|
||||
}
|
||||
if (coinChgObj[index - 1] != 0) {
|
||||
coin_chg = (coinChg *)coinChgObj[index - 1]->work;
|
||||
coin_chg = OM_GET_WORK_PTR(coinChgObj[index - 1], coinChg);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -201,7 +201,7 @@ void BoardCoinChgHide(s32 index) {
|
|||
return;
|
||||
}
|
||||
if (coinChgObj[index - 1] != 0) {
|
||||
((coinChg *)coinChgObj[index - 1]->work)->hide = 1;
|
||||
OM_GET_WORK_PTR(coinChgObj[index - 1], coinChg)->hide = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -251,7 +251,7 @@ static void CreateCoinChg(coinChg *coin_chg, Vec *pos) {
|
|||
static void UpdateCoinChg(omObjData *object) {
|
||||
coinChg *coin_chg;
|
||||
|
||||
coin_chg = (coinChg *)object->work;
|
||||
coin_chg = OM_GET_WORK_PTR(object, coinChg);
|
||||
if ((coin_chg->hide != 0) || (BoardIsKill() != 0)) {
|
||||
if (coin_chg->coin_model != -1) {
|
||||
BoardModelKill(coin_chg->coin_model);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
1183
src/game/board/model.c
Normal file
1183
src/game/board/model.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -41,7 +41,7 @@ extern void BoardModelMotionCreate(s16, s32);
|
|||
extern void BoardModelMotionKill(s16, s32);
|
||||
extern s32 BoardModelMotionEndCheck(s16);
|
||||
extern s32 BoardModelMotionStart(s16, s32, s32);
|
||||
extern s32 BoardModelMotionShiftSet(s16, s32, f32, f32, s32);
|
||||
extern s32 BoardModelMotionShiftSet(s16, s32, f32, f32, u32);
|
||||
extern void BoardModelMotionSpeedSet(s16, f32);
|
||||
extern void BoardModelMotionTimeSet(s16, f32);
|
||||
extern f32 BoardModelMotionTimeGet(s16);
|
||||
|
|
@ -52,16 +52,16 @@ extern void BoardModelAttrReset(s16, s32);
|
|||
//// #include "game/board/tutorial.h"
|
||||
extern BoardTutorialHookExec(s16, s32);
|
||||
//// #include "game/board/com.h"
|
||||
extern void fn_8007185C(s32, s32);
|
||||
extern void BoardComUseItemSet(s32, s32);
|
||||
//// #include "game/board/overhead.h"
|
||||
extern void fn_800729A4(s32);
|
||||
extern void fn_80072DA8(s32);
|
||||
//// #include "game/board/dice_roll.h"
|
||||
extern void BoardViewOverheadExec(s32);
|
||||
extern void BoardViewMapExec(s32);
|
||||
//// #include "game/board/roll.h"
|
||||
extern s32 fn_80085CC8(s32);
|
||||
extern void fn_80085EB4(void);
|
||||
//// #include "game/chrman.h"
|
||||
extern void CharModelKillIndex(s16);
|
||||
extern void CharModelSetStepType(s16, s32);
|
||||
extern void CharModelDataClose(s16);
|
||||
extern void CharModelStepTypeSet(s16, s32);
|
||||
////
|
||||
|
||||
static void UpdateJunctionGfx(omObjData*);
|
||||
|
|
@ -82,7 +82,7 @@ s32 DoDebugMove(s32, s16*);
|
|||
s32 DoSparkSpace(s32, s16*);
|
||||
s32 ExecJunction(s32, s16*);
|
||||
s32 MegaPlayerPassFunc(s32, s16);
|
||||
s32 BoardPlayerAnimBlendCheck(s32);
|
||||
s32 BoardPlayerMotBlendCheck(s32);
|
||||
|
||||
typedef struct bitcopy {
|
||||
struct {
|
||||
|
|
@ -115,7 +115,7 @@ static s16 suitPlayerMdl = -1;
|
|||
static s16 suitCurrMot = -1;
|
||||
|
||||
static s32 diceJumpObj[4] = {0, 0, 0, 0};
|
||||
static s32 animDoneF[4] = {0, 0, 0, 0};
|
||||
static s32 motDoneF[4] = {0, 0, 0, 0};
|
||||
static s16 bowserSuitMot[5] = {-1, -1, -1, -1, -1};
|
||||
char* lbl_8013993C[] = {
|
||||
"eye1",
|
||||
|
|
@ -179,7 +179,7 @@ void BoardPlayerInit(void) {
|
|||
|
||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
GWPlayer[var_r31].space_curr = temp_r30;
|
||||
fn_80062D90(var_r31);
|
||||
BoardPlayerCornerPosSet(var_r31);
|
||||
BoardPlayerSizeSet(var_r31, 0);
|
||||
GWPlayer[var_r31].color = 0;
|
||||
GWPlayer[var_r31].bowser_suit = 0;
|
||||
|
|
@ -190,7 +190,7 @@ void BoardPlayerInit(void) {
|
|||
}
|
||||
|
||||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
fn_80062D90(var_r31);
|
||||
BoardPlayerCornerPosSet(var_r31);
|
||||
if (BoardPlayerAutoSizeGet(var_r31) != 0) {
|
||||
BoardPlayerAutoSizeSet(var_r31, BoardPlayerAutoSizeGet(var_r31));
|
||||
BoardStatusHammerShowSet(var_r31, 0);
|
||||
|
|
@ -227,7 +227,7 @@ void BoardPlayerModelInit(void) {
|
|||
for (var_r31 = 0; var_r31 < 4; var_r31++) {
|
||||
preTurnHook[var_r31] = 0;
|
||||
postTurnHook[var_r31] = 0;
|
||||
animDoneF[var_r31] = 0;
|
||||
motDoneF[var_r31] = 0;
|
||||
diceJumpObj[var_r31] = 0;
|
||||
temp_r22 = &GWPlayer[var_r31];
|
||||
temp_r27 = temp_r22;
|
||||
|
|
@ -266,7 +266,7 @@ void BoardPlayerModelInit(void) {
|
|||
GWPlayer[var_r31].diff = GWPlayerCfg[var_r31].diff;
|
||||
GWPlayerCfg[var_r31].diff = GWPlayerCfg[var_r31].diff;
|
||||
temp_r27->space_prev = -1;
|
||||
CharModelKillIndex(GWPlayer[var_r31].character);
|
||||
CharModelDataClose(GWPlayer[var_r31].character);
|
||||
}
|
||||
CharModelLayerSetAll(2);
|
||||
}
|
||||
|
|
@ -375,14 +375,14 @@ s32 BoardPlayerItemCount(s32 arg0) {
|
|||
return var_r30;
|
||||
}
|
||||
|
||||
void fn_80062D90(s32 arg0) {
|
||||
void BoardPlayerCornerPosSet(s32 arg0) {
|
||||
Vec sp8;
|
||||
|
||||
BoardPlayerCurrSpacePosDirGet(arg0, &sp8);
|
||||
BoardPlayerCornerPosGet(arg0, &sp8);
|
||||
BoardPlayerPosSetV(arg0, &sp8);
|
||||
}
|
||||
|
||||
void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) {
|
||||
void BoardPlayerCornerPosGet(s32 arg0, Point3d* arg1) {
|
||||
s32 var_r31;
|
||||
s32 var_r30;
|
||||
s32 var_r29;
|
||||
|
|
@ -400,7 +400,7 @@ void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) {
|
|||
var_r29 += 1;
|
||||
}
|
||||
}
|
||||
BoardSpaceDirPosGet(temp_r28, var_r29, arg1);
|
||||
BoardSpaceCornerPosGet(temp_r28, var_r29, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -531,7 +531,7 @@ void BoardPlayerMotionStart(s32 arg0, s32 arg1, s32 arg2) {
|
|||
}
|
||||
}
|
||||
|
||||
void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, s32 arg2) {
|
||||
void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, u32 arg2) {
|
||||
PlayerState* player;
|
||||
s32 temp_r29;
|
||||
|
||||
|
|
@ -607,11 +607,11 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) {
|
|||
temp_r27 = BoardPlayerGet(arg0);
|
||||
temp_r27->size = arg1;
|
||||
if (arg1 == 2) {
|
||||
CharModelSetStepType(GWPlayer[arg0].character, 4);
|
||||
CharModelStepTypeSet(GWPlayer[arg0].character, 4);
|
||||
} else if (arg1 == 1) {
|
||||
CharModelSetStepType(GWPlayer[arg0].character, 5);
|
||||
CharModelStepTypeSet(GWPlayer[arg0].character, 5);
|
||||
} else {
|
||||
CharModelSetStepType(GWPlayer[arg0].character, 0);
|
||||
CharModelStepTypeSet(GWPlayer[arg0].character, 0);
|
||||
}
|
||||
BoardModelScaleSetV(BoardPlayerModelGet(arg0), &temp_r4[arg1]);
|
||||
}
|
||||
|
|
@ -682,7 +682,7 @@ void BoardPlayerPostTurnHookSet(s32 arg0, s32 (*arg1)()) {
|
|||
|
||||
void BoardPlayerTurnExec(s32 arg0) {
|
||||
BoardPauseEnableSet(1);
|
||||
fn_8007185C(arg0, -1);
|
||||
BoardComUseItemSet(arg0, -1);
|
||||
GWSystem.field31_bit4 = 0xF;
|
||||
_ClearFlag(0x10016);
|
||||
_ClearFlag(0x1000E);
|
||||
|
|
@ -741,11 +741,11 @@ void BoardPlayerTurnRollExec(s32 arg0) {
|
|||
break;
|
||||
case -3:
|
||||
fn_80085EB4();
|
||||
fn_80072DA8(arg0);
|
||||
BoardViewMapExec(arg0);
|
||||
break;
|
||||
case -4:
|
||||
fn_80085EB4();
|
||||
fn_800729A4(arg0);
|
||||
BoardViewOverheadExec(arg0);
|
||||
break;
|
||||
}
|
||||
} while (temp_r30 <= 0);
|
||||
|
|
@ -918,10 +918,10 @@ void BoardPlayerZoomRestore(s32 arg0) {
|
|||
var_r31 = (var_r31 + 1) & 3;
|
||||
(void)var_r29; //
|
||||
}
|
||||
BoardSpaceDirPosGet(temp_r27, var_r29, &sp18);
|
||||
BoardPlayerAnimBlendSet(arg0, 0, 0xF);
|
||||
BoardSpaceCornerPosGet(temp_r27, var_r29, &sp18);
|
||||
BoardPlayerMotBlendSet(arg0, 0, 0xF);
|
||||
|
||||
while (BoardPlayerAnimBlendCheck(arg0) == 0) {
|
||||
while (BoardPlayerMotBlendCheck(arg0) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardRotateDiceNumbers(arg0);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,39 @@
|
|||
#include "game/gamework_data.h"
|
||||
#include "game/flag.h"
|
||||
#include "game/board/main.h"
|
||||
#include "game/board/player.h"
|
||||
#include "game/board/space.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/data.h"
|
||||
#include "game/sprite.h"
|
||||
|
||||
#include "math.h"
|
||||
#include "string.h"
|
||||
|
||||
extern void omVibrate(s16, s16, s16, s16);
|
||||
|
||||
|
||||
extern s16 BoardStarHostMdlGet(void);
|
||||
extern void BoardModelPosSetV(s16 model, Vec *pos);
|
||||
extern s16 BoardModelCreate(s32 file, s32 *data, s32 arg3);
|
||||
extern s16 BoardModelIDGet(s16 model);
|
||||
|
||||
|
||||
static BoardSpace spaceData[2][256];
|
||||
s16 boardSpaceStarTbl[8];
|
||||
static GXTexObj spaceHiliteTex;
|
||||
static GXTexObj spaceTex;
|
||||
s16 boardSpaceStarTbl[8];
|
||||
static BoardSpace spaceData[2][256];
|
||||
|
||||
static s8 spaceImgIdx[12] = {
|
||||
0, 1, 2, 7,
|
||||
6, 5, 3, 4,
|
||||
9, 10, 11, 0
|
||||
};
|
||||
|
||||
static s8 spaceHiliteImgIdx[12] = {
|
||||
-1, 0, 1, 1,
|
||||
2, 2, 2, 2,
|
||||
-1, 3, -1, -1
|
||||
};
|
||||
|
||||
static s16 spaceCnt[2];
|
||||
static u32 spaceAttr[2];
|
||||
|
|
@ -28,11 +49,13 @@ static s32 spaceDrawCnt;
|
|||
static s16 spaceDrawF;
|
||||
|
||||
static s16 spaceDrawMdl = -1;
|
||||
static s16 starMdl = -1;
|
||||
static s16 starPlatMdl = -1;
|
||||
|
||||
static s32 ExecPipeSpace(s32 player, s32 space);
|
||||
|
||||
extern s8 boardTutorialBlockF;
|
||||
extern s32 boardTutorialBlockPos;
|
||||
|
||||
s32 BoardSpaceRotGet(s32 layer, s32 index, Vec *rot);
|
||||
s32 BoardSpaceStarGet(s32 index);
|
||||
s32 BoardSpaceStarGetCurr(void);
|
||||
|
||||
void BoardSpaceWalkEventFuncSet(BoardSpaceEventFunc func)
|
||||
{
|
||||
|
|
@ -69,7 +92,7 @@ s32 BoardSpaceWalkMiniEventExec(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
s16 BoardSpaceCountGet(s32 layer)
|
||||
s32 BoardSpaceCountGet(s32 layer)
|
||||
{
|
||||
return spaceCnt[layer];
|
||||
}
|
||||
|
|
@ -281,7 +304,7 @@ s32 BoardSpaceLinkTransformGet(s32 flag, Vec *pos, Vec *rot, Vec *scale)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void BoardSpaceStarSet(s32 space)
|
||||
void BoardSpaceHostSet(s32 space)
|
||||
{
|
||||
s16 host_space;
|
||||
Vec pos;
|
||||
|
|
@ -292,9 +315,9 @@ void BoardSpaceStarSet(s32 space)
|
|||
BoardModelPosSetV(BoardStarHostMdlGet(), &pos);
|
||||
}
|
||||
|
||||
static inline s16 BoardStarMdlGet(void)
|
||||
static inline s16 StarPlatGetMdl(void)
|
||||
{
|
||||
return starMdl;
|
||||
return starPlatMdl;
|
||||
}
|
||||
|
||||
static inline s32 BoardStarSpaceTypeGet(s16 index)
|
||||
|
|
@ -311,13 +334,13 @@ void BoardSpaceStarSetIndex(s32 index)
|
|||
BoardSpaceTypeSet(0, boardSpaceStarTbl[GWSystem.star_pos], 1);
|
||||
}
|
||||
GWSystem.star_pos = index & 0x7;
|
||||
BoardSpaceStarSet(BoardSpaceStarGetCurr());
|
||||
BoardSpaceHostSet(BoardSpaceStarGetCurr());
|
||||
space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000);
|
||||
BoardSpacePosGet(0, space, &pos);
|
||||
BoardModelPosSetV(BoardStarMdlGet(), &pos);
|
||||
BoardModelPosSetV(StarPlatGetMdl(), &pos);
|
||||
BoardSpaceRotGet(0, space, &rot);
|
||||
BoardModelRotYSet(BoardStarMdlGet(), rot.y);
|
||||
BoardModelVisibilitySet(BoardStarMdlGet(), 1);
|
||||
BoardModelRotYSet(StarPlatGetMdl(), rot.y);
|
||||
BoardModelVisibilitySet(StarPlatGetMdl(), 1);
|
||||
}
|
||||
|
||||
s32 BoardSpaceStarGetNext(void)
|
||||
|
|
@ -550,8 +573,8 @@ void BoardSpaceLandExec(s32 player, s32 space)
|
|||
if(_CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
HuAudFXPlay(842);
|
||||
BoardCameraViewSet(2);
|
||||
BoardPlayerAnimBlendSet(player, 0, 15);
|
||||
while(!BoardPlayerAnimBlendCheck(player)) {
|
||||
BoardPlayerMotBlendSet(player, 0, 15);
|
||||
while(!BoardPlayerMotBlendCheck(player)) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -586,4 +609,492 @@ void BoardSpaceLandExec(s32 player, s32 space)
|
|||
BoardStarExec(player, space);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
s32 BoardSpaceWalkExec(s32 player, s32 space)
|
||||
{
|
||||
s32 is_star;
|
||||
BoardSpace *space_ptr;
|
||||
BoardSpace *star_space;
|
||||
if(_CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
space_ptr = BoardSpaceGet(0, space);
|
||||
if(space_ptr->flag & 0x180000) {
|
||||
BoardTutorialHookExec(25, 0);
|
||||
}
|
||||
}
|
||||
if(BoardPlayerSizeGet(player) == 2 || GWPlayer[player].bowser_suit) {
|
||||
return 0;
|
||||
}
|
||||
space_ptr = BoardSpaceGet(0, space);
|
||||
if(BoardCurrGet() == 7 || BoardCurrGet() == 8) {
|
||||
is_star = 0;
|
||||
} else {
|
||||
star_space = BoardSpaceGet(0, boardSpaceStarTbl[GWSystem.star_pos]);
|
||||
if(space_ptr == star_space) {
|
||||
is_star = 1;
|
||||
} else {
|
||||
is_star = 0;
|
||||
}
|
||||
}
|
||||
if(is_star) {
|
||||
BoardStarExec(player, space);
|
||||
return 1;
|
||||
}
|
||||
if(space_ptr->flag & 0x600000) {
|
||||
u16 mg_param = GWSystem.unk_38;
|
||||
if(BoardPlayerSizeGet(player) == 1) {
|
||||
BoardRotateDiceNumbers(player);
|
||||
BoardMGCreate(mg_param);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if(space_ptr->flag & 0x180000) {
|
||||
BoardShopExec(player, space);
|
||||
return 1;
|
||||
}
|
||||
if(space_ptr->flag & 0x08000000) {
|
||||
BoardBooHouseExec(player, space);
|
||||
return 1;
|
||||
}
|
||||
if(space_ptr->flag & 0x10000000) {
|
||||
BoardLotteryExec();
|
||||
return 1;
|
||||
}
|
||||
if(space_ptr->flag & 0x20000000) {
|
||||
ExecPipeSpace(player, space);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 BoardSpaceBlockExec(s32 player, s32 space)
|
||||
{
|
||||
s32 event_exec;
|
||||
BoardSpace *space_ptr;
|
||||
event_exec = 0;
|
||||
if(BoardPlayerSizeGet(player) == 2 || GWPlayer[player].bowser_suit) {
|
||||
return 0;
|
||||
}
|
||||
space_ptr = BoardSpaceGet(0, space);
|
||||
event_exec = 0;
|
||||
if(space == GWSystem.block_pos) {
|
||||
event_exec = 1;
|
||||
}
|
||||
if((int)GWSystem.bonus_star == 0 && BoardPartyFlagGet() == 1 && !_CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
event_exec = 0;
|
||||
}
|
||||
if(BoardCurrGet() == 7 || BoardCurrGet() == 8) {
|
||||
event_exec = 0;
|
||||
}
|
||||
if(event_exec) {
|
||||
BoardBlockExec(player, space);
|
||||
if(_CheckFlag(FLAG_ID_MAKE(1, 11))) {
|
||||
BoardBlockExec(player, space);
|
||||
}
|
||||
BoardSpaceBlockPosSet();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static s32 ExecPipeSpace(s32 player, s32 space)
|
||||
{
|
||||
Vec pos_link;
|
||||
Vec pos;
|
||||
Vec dir;
|
||||
float radius, y_vel;
|
||||
s32 mot_disable;
|
||||
BoardSpace *space_ptr;
|
||||
mot_disable = 0;
|
||||
if(BoardPlayerSizeGet(player) != 1) {
|
||||
return 0;
|
||||
}
|
||||
BoardPlayerPosGet(player, &pos);
|
||||
pos.y += 200.0f;
|
||||
space_ptr = BoardSpaceGet(0, space);
|
||||
BoardSpacePosGet(0, space_ptr->link[0], &pos_link);
|
||||
VECSubtract(&pos_link, &pos, &dir);
|
||||
VECNormalize(&dir, &dir);
|
||||
BoardPlayerRotYSet(player, 90-((atan2(dir.z, dir.x)/M_PI)*180));
|
||||
radius = 0.75f*BoardVecDistXZCalc(&pos_link, &pos);
|
||||
BoardPlayerMotionStart(player, 4, 0);
|
||||
y_vel = 0;
|
||||
while(1) {
|
||||
if(BoardVecDistXZCalc(&pos_link, &pos) < 2) {
|
||||
break;
|
||||
}
|
||||
pos.x += (dir.x*radius)/60.0f;
|
||||
pos.z += (dir.z*radius)/60.0f;
|
||||
if(pos.y <= pos_link.y) {
|
||||
pos.y = pos_link.y;
|
||||
if(!mot_disable) {
|
||||
BoardPlayerMotionShiftSet(player, 3, 0, 4, 0x40000001);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
pos.y += 10.0f+(-((1/2399.99f)+(1/50.0f))*y_vel*y_vel);
|
||||
y_vel += 1.0f;
|
||||
}
|
||||
BoardPlayerPosSetV(player, &pos);
|
||||
HuPrcVSleep();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BoardSpaceTypeForce(u16 from, u16 to)
|
||||
{
|
||||
s32 i;
|
||||
for(i=0; i<spaceCnt[0]; i++) {
|
||||
BoardSpace *space = &spaceData[0][i];
|
||||
if(space->type == from) {
|
||||
space->type = to;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BoardSpaceHide(s32 value)
|
||||
{
|
||||
if(value) {
|
||||
Hu3DModelAttrSet(spaceDrawMdl, 1);
|
||||
} else {
|
||||
Hu3DModelAttrReset(spaceDrawMdl, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//Some stack allocation issues. code around BoardPlayerGetCurr is incorrect too
|
||||
static void DrawSpaces(ModelData *model, Mtx matrix)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
Vec player_pos;
|
||||
Vec target;
|
||||
Vec pos;
|
||||
|
||||
Mtx lookat, final, rot_x, rot_y, rot_z, scale;
|
||||
Mtx44 proj;
|
||||
BoardCameraData *camera;
|
||||
if(!spaceDrawF) {
|
||||
return;
|
||||
}
|
||||
spaceDrawCnt = 0;
|
||||
camera = &boardCamera;
|
||||
BoardCameraPosGet(&pos);
|
||||
BoardCameraTargetGet(&target);
|
||||
MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far);
|
||||
GXSetProjection(proj, GX_PERSPECTIVE);
|
||||
MTXLookAt(lookat, &pos, &camera->up, &target);
|
||||
GXSetViewport(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h, camera->viewport_near, camera->viewport_far);
|
||||
GXSetScissor(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h);
|
||||
{
|
||||
GXColor color = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
BoardSpace *space_curr;
|
||||
BoardSpace *space_hilite;
|
||||
PlayerState *player;
|
||||
PlayerState *player_temp;
|
||||
s16 player_mdl;
|
||||
float y_dist;
|
||||
s32 space_img;
|
||||
u16 space_type;
|
||||
float uv_x, uv_y, uv_size;
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXInvalidateTexAll();
|
||||
GXLoadTexObj(&spaceTex, GX_TEXMAP0);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevColor(GX_TEVREG0, color);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
GXSetTevOp(GX_TEVSTAGE0, GX_MODULATE);
|
||||
GXSetNumChans(1);
|
||||
GXSetChanAmbColor(GX_COLOR0A0, color);
|
||||
GXSetChanMatColor(GX_COLOR0A0, color);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP);
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 1, GX_DF_CLAMP, GX_AF_SPOT);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP);
|
||||
GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
player = player_temp = BoardPlayerGetCurr();
|
||||
BoardPlayerPosGet(GWSystem.player_curr, &player_pos);
|
||||
player_mdl = BoardModelIDGet(BoardPlayerModelGetCurr());
|
||||
space_curr = &spaceData[0][0];
|
||||
space_hilite = NULL;
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
for(i=0; i<spaceCnt[0]; i++, space_curr++) {
|
||||
if(space_curr->type == 0) {
|
||||
continue;
|
||||
}
|
||||
if(!BoardCameraCullCheck(&space_curr->pos, 200.0f) || (space_curr->flag & spaceAttr[0])) {
|
||||
continue;
|
||||
}
|
||||
if(!space_hilite) {
|
||||
if(player_pos.x > space_curr->pos.x-100.0f
|
||||
&& player_pos.z > space_curr->pos.z-100.0f
|
||||
&& player_pos.x < space_curr->pos.x+100.0f
|
||||
&& player_pos.z < space_curr->pos.z+100.0f) {
|
||||
if(player_pos.y-space_curr->pos.y < 0.0f) {
|
||||
y_dist = -(player_pos.y-space_curr->pos.y);
|
||||
} else {
|
||||
y_dist = player_pos.y-space_curr->pos.y;
|
||||
}
|
||||
if(y_dist < 10.0f) {
|
||||
space_hilite = space_curr;
|
||||
}
|
||||
}
|
||||
}
|
||||
space_type = space_curr->type;
|
||||
space_img = spaceImgIdx[space_type]-1;
|
||||
uv_x = (float)(space_img%4)/4.0f;
|
||||
uv_y = (float)(space_img/4)/4.0f;
|
||||
uv_size = 63.0f/256.0f;
|
||||
MTXRotRad(rot_z, 'z', MTXDegToRad(space_curr->rot.y));
|
||||
MTXRotRad(rot_y, 'y', MTXDegToRad(space_curr->rot.z));
|
||||
MTXRotRad(rot_x, 'x', MTXDegToRad(space_curr->rot.x+90.0f));
|
||||
MTXTrans(final, space_curr->pos.x, 3.0f+space_curr->pos.y, space_curr->pos.z);
|
||||
MTXConcat(rot_x, rot_y, rot_y);
|
||||
MTXConcat(rot_y, rot_z, rot_z);
|
||||
MTXConcat(final, rot_z, final);
|
||||
MTXConcat(lookat, final, final);
|
||||
GXLoadPosMtxImm(final, GX_PNMTX0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(-100, -100, 0);
|
||||
GXTexCoord2f32(uv_x, uv_y);
|
||||
GXPosition3f32(100, -100, 0);
|
||||
GXTexCoord2f32(uv_x+uv_size, uv_y);
|
||||
GXPosition3f32(100, 100, 0);
|
||||
GXTexCoord2f32(uv_x+uv_size, uv_y+uv_size+(1.5f/256.0f));
|
||||
GXPosition3f32(-100, 100, 0);
|
||||
GXTexCoord2f32(uv_x, uv_y+uv_size+(1.5f/256.0f));
|
||||
GXEnd();
|
||||
spaceDrawCnt++;
|
||||
}
|
||||
if(space_hilite) {
|
||||
space_curr = space_hilite;
|
||||
space_type = space_curr->type;
|
||||
if(player->show_next && space_type != 0 && (space_img = spaceHiliteImgIdx[space_type]) >= 0) {
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_FALSE);
|
||||
GXLoadTexObj(&spaceHiliteTex, GX_TEXMAP0);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_ONE, GX_LO_NOOP);
|
||||
uv_x = (float)(space_img%4)/4.0f;
|
||||
uv_y = (float)(space_img/4)/4.0f;
|
||||
uv_size = 63.0f/256.0f;
|
||||
MTXScale(scale, 1.5f, 1.5f, 1.5f);
|
||||
MTXRotRad(rot_z, 'z', MTXDegToRad(space_curr->rot.y));
|
||||
MTXRotRad(rot_y, 'y', MTXDegToRad(space_curr->rot.z));
|
||||
MTXRotRad(rot_x, 'x', MTXDegToRad(space_curr->rot.x+90.0f));
|
||||
MTXTrans(final, space_curr->pos.x, 3.5f+space_curr->pos.y, space_curr->pos.z);
|
||||
MTXConcat(scale, rot_x, rot_x);
|
||||
MTXConcat(rot_x, rot_y, rot_y);
|
||||
MTXConcat(rot_y, rot_z, rot_z);
|
||||
MTXConcat(final, rot_z, final);
|
||||
MTXConcat(lookat, final, final);
|
||||
GXLoadPosMtxImm(final, GX_PNMTX0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(-100, -100, 0);
|
||||
GXTexCoord2f32(uv_x, uv_y);
|
||||
GXPosition3f32(100, -100, 0);
|
||||
GXTexCoord2f32(uv_x+uv_size, uv_y);
|
||||
GXPosition3f32(100, 100, 0);
|
||||
GXTexCoord2f32(uv_x+uv_size, uv_y+uv_size);
|
||||
GXPosition3f32(-100, 100, 0);
|
||||
GXTexCoord2f32(uv_x, uv_y+uv_size);
|
||||
GXEnd();
|
||||
spaceDrawCnt++;
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
s32 BoardSpaceRead(s32 layer, s32 data_num)
|
||||
{
|
||||
int j;
|
||||
int i;
|
||||
BoardSpace *space;
|
||||
u8 *data;
|
||||
s32 star_idx;
|
||||
u8 *data_base;
|
||||
data_base = data = HuDataSelHeapReadNum(data_num, MEMORY_DEFAULT_NUM, HEAP_DATA);
|
||||
spaceCnt[layer] = *(u32 *)data;
|
||||
data += sizeof(u32);
|
||||
space = &spaceData[layer][0];
|
||||
for(i=0; i<spaceCnt[layer]; i++, space++) {
|
||||
memcpy(&space->pos, data, sizeof(Vec));
|
||||
data += sizeof(Vec);
|
||||
memcpy(&space->rot, data, sizeof(Vec));
|
||||
data += sizeof(Vec);
|
||||
memcpy(&space->scale, data, sizeof(Vec));
|
||||
data += sizeof(Vec);
|
||||
space->flag = *(u32 *)data;
|
||||
data += sizeof(u32);
|
||||
space->type = *(u16 *)data;
|
||||
data += sizeof(u16);
|
||||
space->link_cnt = *(u16 *)data;
|
||||
data += sizeof(u16);
|
||||
for(j=0; j<space->link_cnt; j++) {
|
||||
space->link[j] = (*(u16 *)data)+1;
|
||||
data += sizeof(u16);
|
||||
}
|
||||
if(space->type == 8) {
|
||||
|
||||
space->type = 1;
|
||||
star_idx = (space->flag & 0x70000) >> 16;
|
||||
boardSpaceStarTbl[star_idx] = i+1;
|
||||
}
|
||||
}
|
||||
HuDataClose(data_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BoardSpaceCameraSet(u16 mask)
|
||||
{
|
||||
Hu3DModelCameraSet(spaceDrawMdl, mask);
|
||||
}
|
||||
|
||||
void BoardSpaceBlockPosSet(void)
|
||||
{
|
||||
BoardSpace *space;
|
||||
s32 block_pos;
|
||||
begin:
|
||||
if(boardTutorialBlockF) {
|
||||
GWSystem.block_pos = boardTutorialBlockPos;
|
||||
return;
|
||||
}
|
||||
block_pos = BoardRandMod(spaceCnt[0])+1;
|
||||
if(block_pos == GWSystem.block_pos) {
|
||||
goto begin;
|
||||
}
|
||||
space = BoardSpaceGet(0, block_pos);
|
||||
if(space->type != 1) {
|
||||
goto begin;
|
||||
}
|
||||
GWSystem.block_pos = block_pos;
|
||||
}
|
||||
|
||||
void BoardSpaceInit(s32 data_num)
|
||||
{
|
||||
s32 board;
|
||||
BoardJunctionMaskZero();
|
||||
memset(spaceData, 0, sizeof(spaceData));
|
||||
memset(spaceAttr, 0, sizeof(spaceAttr));
|
||||
lbl_801D3FC4[0] = lbl_801D3FC4[1] = lbl_801D3FC4[2] = lbl_801D3FC4[3] = -1;
|
||||
spaceDrawF = 0;
|
||||
board = BoardCurrGet();
|
||||
{
|
||||
AnimBmpData *bmp;
|
||||
AnimData *data;
|
||||
void *data_base;
|
||||
s32 size;
|
||||
data = data_base = HuDataSelHeapReadNum(MAKE_DATA_NUM(DATADIR_BOARD, 29), MEMORY_DEFAULT_NUM, HEAP_DATA);
|
||||
data->bmp = (void *)((u32)data_base+(u32)data->bmp);
|
||||
data->pat = (void *)((u32)data_base+(u32)data->pat);
|
||||
data->bank = (void *)((u32)data_base+(u32)data->bank);
|
||||
bmp = data->bmp;
|
||||
size = bmp->sizeX;
|
||||
spaceHiliteTexFmt = -1;
|
||||
switch(bmp->dataFmt) {
|
||||
case SPRITE_BMP_RGBA8:
|
||||
spaceHiliteTexFmt = GX_TF_RGBA8;
|
||||
break;
|
||||
|
||||
case SPRITE_BMP_RGB5A3_DUPE:
|
||||
spaceHiliteTexFmt = GX_TF_RGB5A3;
|
||||
break;
|
||||
|
||||
case SPRITE_BMP_CMPR:
|
||||
spaceHiliteTexFmt = GX_TF_CMPR;
|
||||
break;
|
||||
}
|
||||
spaceHiliteTexData = HuMemDirectMallocNum(HEAP_SYSTEM, bmp->dataSize, MEMORY_DEFAULT_NUM);
|
||||
bmp->data = (void *)((u32)bmp->data+(u32)data_base);
|
||||
memcpy(spaceHiliteTexData, bmp->data, bmp->dataSize);
|
||||
HuDataClose(data_base);
|
||||
GXInitTexObj(&spaceHiliteTex, spaceHiliteTexData, size, size, spaceHiliteTexFmt, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&spaceHiliteTex, GX_LINEAR, GX_LINEAR, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
{
|
||||
AnimBmpData *bmp;
|
||||
AnimData *data;
|
||||
void *data_base;
|
||||
s32 size;
|
||||
data = data_base = HuDataSelHeapReadNum(MAKE_DATA_NUM(DATADIR_BOARD, 28), MEMORY_DEFAULT_NUM, HEAP_DATA);
|
||||
data->bmp = (void *)((u32)data_base+(u32)data->bmp);
|
||||
data->pat = (void *)((u32)data_base+(u32)data->pat);
|
||||
data->bank = (void *)((u32)data_base+(u32)data->bank);
|
||||
bmp = data->bmp;
|
||||
size = bmp->sizeX;
|
||||
spaceTexFmt = -1;
|
||||
switch(bmp->dataFmt) {
|
||||
case SPRITE_BMP_RGBA8:
|
||||
spaceTexFmt = GX_TF_RGBA8;
|
||||
break;
|
||||
|
||||
case SPRITE_BMP_RGB5A3_DUPE:
|
||||
spaceTexFmt = GX_TF_RGB5A3;
|
||||
break;
|
||||
|
||||
case SPRITE_BMP_CMPR:
|
||||
spaceTexFmt = GX_TF_CMPR;
|
||||
break;
|
||||
}
|
||||
spaceTexData = HuMemDirectMallocNum(HEAP_SYSTEM, bmp->dataSize, MEMORY_DEFAULT_NUM);
|
||||
bmp->data = (void *)((u32)bmp->data+(u32)data_base);
|
||||
memcpy(spaceTexData, bmp->data, bmp->dataSize);
|
||||
HuDataClose(data_base);
|
||||
GXInitTexObj(&spaceTex, spaceTexData, size, size, spaceTexFmt, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&spaceTex, GX_LINEAR, GX_LINEAR, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
}
|
||||
BoardSpaceRead(0, data_num);
|
||||
spaceDrawMdl = Hu3DHookFuncCreate(DrawSpaces);
|
||||
if(!BoardStartCheck() && !_CheckFlag(FLAG_ID_MAKE(1, 1))) {
|
||||
BoardSpaceBlockPosSet();
|
||||
GWSystem.star_total = 0;
|
||||
GWSystem.star_flag = 0;
|
||||
}
|
||||
if(BoardCurrGet() != 7 && BoardCurrGet() != 8) {
|
||||
starPlatMdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 6), NULL, 0);
|
||||
BoardModelMotionStart(starPlatMdl, 0, 0x40000001);
|
||||
BoardModelVisibilitySet(starPlatMdl, 0);
|
||||
if(_CheckFlag(FLAG_ID_MAKE(1, 1))) {
|
||||
Vec pos;
|
||||
Vec rot;
|
||||
s16 space;
|
||||
BoardModelVisibilitySet(starPlatMdl, 1);
|
||||
GWSystem.star_flag |= (u8)(1 << GWSystem.star_pos);
|
||||
BoardSpaceTypeSet(0, boardSpaceStarTbl[GWSystem.star_pos], 8);
|
||||
{
|
||||
int space;
|
||||
BoardSpace *space_plat;
|
||||
space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000);
|
||||
BoardSpacePosGet(0, space, &pos);
|
||||
BoardModelPosSetV(StarPlatGetMdl(), &pos);
|
||||
BoardSpaceRotGet(0, space, &rot);
|
||||
BoardModelRotYSet(StarPlatGetMdl(), rot.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
spaceDrawF = 1;
|
||||
}
|
||||
|
||||
void BoardSpaceDestroy(void)
|
||||
{
|
||||
if(spaceDrawMdl >= 0) {
|
||||
Hu3DModelKill(spaceDrawMdl);
|
||||
spaceDrawMdl = -1;
|
||||
}
|
||||
if(spaceHiliteTexData) {
|
||||
HuMemDirectFree(spaceHiliteTexData);
|
||||
spaceHiliteTexData = NULL;
|
||||
}
|
||||
if(spaceTexData) {
|
||||
HuMemDirectFree(spaceTexData);
|
||||
spaceTexData = NULL;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
#include "game/board/player.h"
|
||||
#include "game/wipe.h"
|
||||
#include "game/gamework_data.h"
|
||||
#include "game/hsfex.h"
|
||||
#include "board_unsplit.h"
|
||||
#include "unsplit.h"
|
||||
#include "math.h"
|
||||
|
||||
static void WarpInit(s32);
|
||||
|
|
@ -15,10 +15,10 @@ static void WarpImpact(s32);
|
|||
|
||||
|
||||
extern void omVibrate(s16, s16, s16, s16);
|
||||
extern void fn_800816CC(s32, s32);
|
||||
extern void fn_80081884(f32);
|
||||
extern void fn_8008181C(void);
|
||||
extern s32 fn_8008186C(void);
|
||||
extern void BoardCharWheelInit(s32, s32);
|
||||
extern void BoardCharWheelSpeedSet(f32);
|
||||
extern void BoardCharWheelWait(void);
|
||||
extern s32 BoardCharWheelResultGet(void);
|
||||
extern f32 BoardModelMotionTimeGet(s16);
|
||||
extern void BoardModelHookReset(s16);
|
||||
extern s32 BoardModelHookSet(s16, char*, s16);
|
||||
|
|
@ -46,7 +46,7 @@ static s8 warpImpactPlayer[4] = {-1, -1, -1, -1};
|
|||
static void WarpProcess(void);
|
||||
static void WarpKill(void);
|
||||
|
||||
void BoardWarpExec(s32 player, s16 space) {
|
||||
void BoardWarpExec(s32 player, s32 space) {
|
||||
omVibrate(player, 12, 4, 2);
|
||||
warpProcess = HuPrcChildCreate(WarpProcess, 8195, 14336, 0, boardMainProc);
|
||||
HuPrcDestructorSet2(warpProcess, WarpKill);
|
||||
|
|
@ -66,9 +66,9 @@ void WarpProcess(void) {
|
|||
HuAudFXPlay(842);
|
||||
BoardCameraViewSet(3);
|
||||
BoardCameraMotionWait();
|
||||
BoardPlayerAnimBlendSet(curr_player, 0, 15);
|
||||
BoardPlayerMotBlendSet(curr_player, 0, 15);
|
||||
|
||||
while (BoardPlayerAnimBlendCheck(curr_player) == 0) {
|
||||
while (BoardPlayerMotBlendCheck(curr_player) == 0) {
|
||||
HuPrcVSleep();
|
||||
}
|
||||
|
||||
|
|
@ -77,10 +77,10 @@ void WarpProcess(void) {
|
|||
BoardTutorialHookExec(18, 0);
|
||||
boardTutorialData[0] = 0;
|
||||
}
|
||||
fn_800816CC(curr_player, 3);
|
||||
fn_80081884(18.0f);
|
||||
fn_8008181C();
|
||||
warpTarget = fn_8008186C();
|
||||
BoardCharWheelInit(curr_player, 3);
|
||||
BoardCharWheelSpeedSet(18.0f);
|
||||
BoardCharWheelWait();
|
||||
warpTarget = BoardCharWheelResultGet();
|
||||
BoardCameraViewSet(1);
|
||||
BoardCameraMotionWait();
|
||||
WarpInit(curr_player);
|
||||
|
|
@ -232,7 +232,7 @@ static void WarpImpact(s32 player) {
|
|||
BoardModelMotionStart(warpImpactMdl, 0, 0x40000001);
|
||||
|
||||
for (i = 0; i < warpImpactCnt; i++) {
|
||||
s32 player = warpImpactPlayer[i];
|
||||
s16 player = warpImpactPlayer[i];
|
||||
omVibrate(player, 0xC, 4, 2);
|
||||
BoardPlayerMotionStart(player, 6, 0x40000001);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,6 @@ void BoardWinPause(void) {
|
|||
|
||||
void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) {
|
||||
s32 i;
|
||||
s32 speed;
|
||||
|
||||
|
||||
winPosIdx = pos;
|
||||
|
|
@ -213,13 +212,11 @@ void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) {
|
|||
if (GWSystem.mess_speed == 3) {
|
||||
GWSystem.mess_speed = 1;
|
||||
}
|
||||
speed = GWSystem.mess_speed;
|
||||
BoardWinSpeedSet(speed);
|
||||
BoardWinSpeedSet(GWMessSpeedGet());
|
||||
BoardWinPlayerSet(GWSystem.player_curr);
|
||||
}
|
||||
|
||||
void BoardWinCreate(s32 pos, u32 mess, s32 portrait) {
|
||||
s32 speed;
|
||||
s32 i;
|
||||
|
||||
winPosIdx = pos;
|
||||
|
|
@ -250,8 +247,7 @@ void BoardWinCreate(s32 pos, u32 mess, s32 portrait) {
|
|||
if (GWSystem.mess_speed == 3) {
|
||||
GWSystem.mess_speed = 1;
|
||||
}
|
||||
speed = GWSystem.mess_speed;
|
||||
BoardWinSpeedSet(speed);
|
||||
BoardWinSpeedSet(GWMessSpeedGet());
|
||||
BoardWinPlayerSet(GWSystem.player_curr);
|
||||
autoPickF = 0;
|
||||
}
|
||||
|
|
@ -281,14 +277,14 @@ void BoardWinKill(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void BoardWinSetAttr(s32 attr) {
|
||||
void BoardWinAttrSet(s32 attr) {
|
||||
winAttr |= attr;
|
||||
if (windowID >= 0) {
|
||||
HuWinAttrSet(windowID, winAttr);
|
||||
}
|
||||
}
|
||||
|
||||
void BoardWinResetAttr(s32 attr) {
|
||||
void BoardWinAttrReset(s32 attr) {
|
||||
winAttr &= ~attr;
|
||||
if (windowID >= 0) {
|
||||
HuWinAttrSet(windowID, winAttr);
|
||||
|
|
@ -381,7 +377,7 @@ void BoardWinPlayerSet(s32 player) {
|
|||
|
||||
void BoardWinStartComKeySet(void) {
|
||||
s32 comkey[4];
|
||||
s32 speed;
|
||||
s32 delay;
|
||||
s32 waitnum;
|
||||
s32 i;
|
||||
|
||||
|
|
@ -410,12 +406,12 @@ void BoardWinStartComKeySet(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
speed = GWMessSpeedGet();
|
||||
delay = GWMessDelayGet();
|
||||
waitnum = HuWinKeyWaitNumGet(winMess);
|
||||
if (waitnum != 0) {
|
||||
HuWinComKeyReset();
|
||||
for (i = 0; i < waitnum; i++) {
|
||||
HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], speed);
|
||||
HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue