mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-27 16:12:54 -04:00
Merge branch 'main' into main
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by kris on 04/10/23.
|
||||
//
|
||||
|
||||
#ifndef TWW_D_A_YKGR_H
|
||||
#define TWW_D_A_YKGR_H
|
||||
|
||||
struct daYkgr_c {
|
||||
public:
|
||||
static JPABaseEmitter* m_emitter;
|
||||
static u8 m_alpha_flag;
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
extern daYkgr_c daYkgr_c_class;
|
||||
|
||||
|
||||
|
||||
#endif // TWW_D_A_YKGR_H
|
||||
@@ -1246,11 +1246,11 @@ inline bool dComIfGp_event_chkTalkXY() {
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_onEventFlag(s16 flag) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().onEventFlag(flag);
|
||||
g_dComIfG_gameInfo.play.getEvent().onEventFlag(flag);
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_offEventFlag(s16 flag) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().offEventFlag(flag);
|
||||
g_dComIfG_gameInfo.play.getEvent().offEventFlag(flag);
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_reset() {
|
||||
@@ -1262,7 +1262,15 @@ inline u8 dComIfGp_event_getPreItemNo() {
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_setItemPartnerId(u32 id) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().setPtI_Id(id);
|
||||
g_dComIfG_gameInfo.play.getEvent().setPtI_Id(id);
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_setGtItm(u8 itemNo) {
|
||||
g_dComIfG_gameInfo.play.getEvent().setGtItm(itemNo);
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_event_getGtItm() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().getGtItm();
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_event_moveApproval(void* actor) {
|
||||
@@ -1301,11 +1309,19 @@ inline fopAc_ac_c* dComIfGp_event_getPt2() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().convPId(pt2);
|
||||
}
|
||||
|
||||
inline f32 dComIfGp_event_getCullRate() {
|
||||
return g_dComIfG_gameInfo.play.getEvent().getCullRate();
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_setCullRate(f32 ratio) {
|
||||
g_dComIfG_gameInfo.play.getEvent().setCullRate(ratio);
|
||||
}
|
||||
|
||||
inline dEvent_manager_c& dComIfGp_getEventManager() {
|
||||
return g_dComIfG_gameInfo.play.getEvtManager();
|
||||
}
|
||||
|
||||
inline s32 dComIfGp_evmng_getEventPrio(s16 eventIdx) {
|
||||
inline s16 dComIfGp_evmng_getEventPrio(s16 eventIdx) {
|
||||
return dComIfGp_getEventManager().getEventPrio(eventIdx);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public:
|
||||
/* 0x1C */ void* mpMessage;
|
||||
/* 0x20 */ dDemo_object_c mDemoObj;
|
||||
/* 0xD0 */ void* field_0xd0;
|
||||
/* 0xD4 */ void* field_0xd4;
|
||||
/* 0xD4 */ int field_0xd4;
|
||||
/* 0xD8 */ int field_0xd8;
|
||||
/* 0xDC */ int mState;
|
||||
};
|
||||
|
||||
+7
-2
@@ -78,9 +78,14 @@ public:
|
||||
u8 getTalkXYBtn() { return mTalkButton; }
|
||||
bool chkTalkXY() { return mTalkButton == 1 || mTalkButton == 2 || mTalkButton == 3; }
|
||||
void setPtI_Id(u32 id) { mPtItem = id; }
|
||||
void setGtItm(u8 itemNo) { mGetItemNo = itemNo; }
|
||||
u8 getGtItm() { return mGetItemNo; }
|
||||
void setPtT(void* i_actor) { mPtTalk = getPId(i_actor); }
|
||||
u8 getPreItemNo() { return mItemNo; }
|
||||
|
||||
|
||||
f32 getCullRate() { return mCullFarClipRatio; }
|
||||
void setCullRate(f32 ratio) { mCullFarClipRatio = ratio; }
|
||||
|
||||
u16 chkEventFlag(u16 flag) { return flag & mEventFlag; }
|
||||
void onEventFlag(u16 flag) { mEventFlag |= flag; }
|
||||
void offEventFlag(u16 flag) { mEventFlag &= ~flag; }
|
||||
@@ -97,7 +102,7 @@ public:
|
||||
/* 0xC8 */ u32 mPt2;
|
||||
/* 0xCC */ int mPtTalk;
|
||||
/* 0xD0 */ u32 mPtItem;
|
||||
/* 0xD4 */ u8 mCurStaffId;
|
||||
/* 0xD4 */ u8 mGetItemNo;
|
||||
/* 0xD5 */ u8 field_0xD5[0xD6 - 0xD5];
|
||||
/* 0xD6 */ s16 field_0xd6;
|
||||
/* 0xD8 */ s16 mEventId;
|
||||
|
||||
+1
-1
@@ -389,7 +389,7 @@ BOOL isUseClothPacket(u8);
|
||||
BOOL isTriforce(u8);
|
||||
BOOL isHeart(u8);
|
||||
void getItemNoByLife(u8);
|
||||
void check_itemno(int);
|
||||
int check_itemno(int);
|
||||
void getEmonoItemFromLifeBallTable(u16);
|
||||
void getItemFromLifeBallTableWithoutEmono(u16);
|
||||
|
||||
|
||||
@@ -406,6 +406,7 @@ BOOL dKy_daynight_check();
|
||||
void dKy_tevstr_init(dKy_tevstr_c*, s8, u8);
|
||||
void dKy_Sound_init();
|
||||
void dKy_change_colpat(u8 param_0);
|
||||
void dKy_custom_colset(u8 param_0, u8 param_1, f32 i_blend);
|
||||
u8 dKy_pship_existense_chk();
|
||||
void dKy_Itemgetcol_chg_move();
|
||||
void dKy_arrowcol_chg_on(cXyz*, int);
|
||||
|
||||
@@ -344,5 +344,6 @@ void squal_proc();
|
||||
void dKyw_pntwind_set(WIND_INFLUENCE*);
|
||||
void dKyw_pntwind_cut(WIND_INFLUENCE*);
|
||||
void dKyw_pwind_cylinder_set(WIND_INFLUENCE*);
|
||||
|
||||
void dKyw_evt_wind_set(s16 i_windX, s16 i_windY);
|
||||
void dKyw_evt_wind_set_go();
|
||||
#endif /* D_KANKYO_WETHER_H */
|
||||
@@ -16,11 +16,17 @@ struct actor_method_class {
|
||||
|
||||
enum fopAc_Status_e {
|
||||
fopAcStts_SHOWMAP_e = 0x00000020,
|
||||
fopAcStts_NOEXEC_e = 0x00000080,
|
||||
fopAcStts_NOCULLEXEC_e = 0x00000080,
|
||||
fopAcStts_CULL_e = 0x00000100,
|
||||
fopAcStts_FREEZE_e = 0x00000400,
|
||||
fopAcStts_UNK800_e = 0x00000800,
|
||||
fopAcStts_CARRY_e = 0x00002000,
|
||||
fopAcStts_UNK4000_e = 0x00004000,
|
||||
fopAcStts_NOPAUSE_e = 0x00020000,
|
||||
fopAcStts_UNK40000_e = 0x00040000,
|
||||
fopAcStts_UNK80000_e = 0x00080000,
|
||||
fopAcStts_HOOK_CARRY_e = 0x00100000,
|
||||
fopAcStts_UNK200000_e = 0x00200000,
|
||||
fopAcStts_NODRAW_e = 0x01000000,
|
||||
fopAcStts_BOSS_e = 0x04000000,
|
||||
};
|
||||
@@ -63,12 +69,6 @@ enum fopAc_Cull_e {
|
||||
fopAc_CULLSPHERE_5_e,
|
||||
fopAc_CULLSPHERE_6_e,
|
||||
fopAc_CULLSPHERE_7_e,
|
||||
fopAc_CULLSPHERE_8_e,
|
||||
fopAc_CULLSPHERE_9_e,
|
||||
fopAc_CULLSPHERE_10_e,
|
||||
fopAc_CULLSPHERE_11_e,
|
||||
fopAc_CULLSPHERE_12_e,
|
||||
fopAc_CULLSPHERE_13_e,
|
||||
fopAc_CULLSPHERE_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
/* 0x10C */ dKy_tevstr_c mTevStr;
|
||||
/* 0x1BC */ u16 mSetId;
|
||||
/* 0x1BE */ u8 mGroup;
|
||||
/* 0x1BF */ s8 mCullType;
|
||||
/* 0x1BF */ u8 mCullType;
|
||||
/* 0x1C0 */ u8 mDemoActorId;
|
||||
/* 0x1C1 */ s8 mSubtype;
|
||||
/* 0x1C2 */ u8 mGbaName;
|
||||
|
||||
@@ -100,7 +100,7 @@ enum fopAcM_CARRY {
|
||||
};
|
||||
|
||||
inline u32 fopAcM_checkHookCarryNow(fopAc_ac_c* pActor) {
|
||||
return fopAcM_checkStatus(pActor, 0x100000);
|
||||
return fopAcM_checkStatus(pActor, fopAcStts_HOOK_CARRY_e);
|
||||
}
|
||||
|
||||
inline u32 fopAcM_GetParam(void* pActor) {
|
||||
@@ -184,11 +184,11 @@ inline void fopAcM_SetRoomNo(fopAc_ac_c* actor, s8 roomNo) {
|
||||
}
|
||||
|
||||
inline void fopAcM_setHookCarryNow(fopAc_ac_c* actor) {
|
||||
fopAcM_OnStatus(actor, 0x100000);
|
||||
fopAcM_OnStatus(actor, fopAcStts_HOOK_CARRY_e);
|
||||
}
|
||||
|
||||
inline void fopAcM_cancelHookCarryNow(fopAc_ac_c* actor) {
|
||||
fopAcM_OffStatus(actor, 0x100000);
|
||||
fopAcM_OffStatus(actor, fopAcStts_HOOK_CARRY_e);
|
||||
}
|
||||
|
||||
inline s8 fopAcM_GetHomeRoomNo(fopAc_ac_c* pActor) {
|
||||
@@ -412,8 +412,8 @@ f32 fopAcM_searchActorDistanceXZ(fopAc_ac_c* p_actorA, fopAc_ac_c* p_actorB);
|
||||
|
||||
f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c* p_actorA, fopAc_ac_c* p_actorB);
|
||||
|
||||
s32 fopAcM_rollPlayerCrash(fopAc_ac_c*, f32, u32);
|
||||
s32 fopAcM_checkCullingBox(f32[3][4], f32, f32, f32, f32, f32, f32);
|
||||
s32 fopAcM_rollPlayerCrash(fopAc_ac_c* i_this, f32 distAdjust, u32 flag);
|
||||
s32 fopAcM_checkCullingBox(Mtx, f32, f32, f32, f32, f32, f32);
|
||||
s32 fopAcM_cullingCheck(fopAc_ac_c*);
|
||||
void* event_second_actor(u16);
|
||||
s32 fopAcM_orderTalkEvent(fopAc_ac_c*, fopAc_ac_c*);
|
||||
@@ -438,16 +438,16 @@ s32 fopAcM_createItemForPresentDemo(cXyz* p_pos, int i_itemNo, u8 param_2, int i
|
||||
s32 fopAcM_createItemForTrBoxDemo(cXyz* p_pos, int i_itemNo, int i_itemBitNo, int i_roomNo,
|
||||
csXyz* p_angle, cXyz* p_scale);
|
||||
|
||||
u8 fopAcM_getItemNoFromTableNo(u8 i_tableNo);
|
||||
|
||||
s32 fopAcM_createItemFromEnemyID(u8 i_enemyID, cXyz* p_pos, int i_itemBitNo, int i_roomNo,
|
||||
csXyz * p_angle, cXyz * p_scale, f32* speedF,
|
||||
f32* speedY);
|
||||
|
||||
s32 fopAcM_createItemFromTable(cXyz* p_pos, int i_tableNo, int i_itemBitNo, int i_roomNo,
|
||||
csXyz* p_angle, int param_5, cXyz * p_scale, f32* speedF,
|
||||
f32* speedY, bool createDirect);
|
||||
|
||||
s32 fopAcM_createShopItem(cXyz* pos, int i_itemNo, csXyz* rot, int roomNo, cXyz* scale,
|
||||
createFunc createFunc);
|
||||
|
||||
s32 fopAcM_createRaceItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, int roomNo,
|
||||
cXyz* scale, int param_7);
|
||||
|
||||
s32 fopAcM_createIball(cXyz*, int, int, csXyz*, int);
|
||||
|
||||
s32 fopAcM_createDemoItem(cXyz* p_pos, int itemNo, int itemBitNo, csXyz* p_angle,
|
||||
@@ -456,19 +456,12 @@ s32 fopAcM_createDemoItem(cXyz* p_pos, int itemNo, int itemBitNo, csXyz* p_angle
|
||||
s32 fopAcM_createItemForBoss(cXyz* p_pos, int param_2, int roomNo, csXyz* p_angle,
|
||||
cXyz* p_scale, int param_8);
|
||||
|
||||
s32 fopAcM_createItemForMidBoss(cXyz* p_pos, int i_itemNo, int i_roomNo, csXyz* p_angle,
|
||||
cXyz* p_scale, int param_6, int param_7);
|
||||
|
||||
void* fopAcM_createItemForDirectGet(cXyz* p_pos, int i_itemNo, int i_roomNo,
|
||||
csXyz* p_angle, cXyz* p_scale, f32 speedF,
|
||||
f32 speedY);
|
||||
|
||||
void* fopAcM_createItemForSimpleDemo(cXyz* p_pos, int i_itemNo, int i_roomNo,
|
||||
csXyz* p_angle, cXyz* p_scale, f32 speedF,
|
||||
f32 speedY);
|
||||
|
||||
s32 fopAcM_createItem(cXyz* p_pos, int itemNo, int param_3, int roomNo, int param_4, csXyz* p_angle,
|
||||
int param_7, cXyz* p_scale);
|
||||
s32 fopAcM_createItem(cXyz* p_pos, int itemNo, int param_3, int roomNo, int type, csXyz* p_angle,
|
||||
int action, cXyz* p_scale);
|
||||
|
||||
void* fopAcM_fastCreateItem2(cXyz* p_pos, int itemNo, int param_3, int roomNo, int param_5,
|
||||
csXyz* p_angle, int, cXyz* p_scale);
|
||||
@@ -477,14 +470,13 @@ void* fopAcM_fastCreateItem(cXyz* p_pos, int i_itemNo, int i_roomNo, csXyz* p_an
|
||||
cXyz* p_scale, f32 p_speedF, f32 p_speedY, f32 param_8,
|
||||
int param_9, createFunc p_createFunc);
|
||||
|
||||
s32 fopAcM_createBokkuri(u16, cXyz*, int, int, int, cXyz*, int, int);
|
||||
s32 fopAcM_createWarpHole(cXyz*, csXyz*, int, u8, u8, u8);
|
||||
BOOL stealItem_CB(void* actor);
|
||||
|
||||
fopAc_ac_c* fopAcM_myRoomSearchEnemy(s8 roomNo);
|
||||
|
||||
s32 fopAcM_createDisappear(fopAc_ac_c*, cXyz*, u8, u8, u8);
|
||||
void fopAcM_setCarryNow(fopAc_ac_c*, int);
|
||||
void fopAcM_cancelCarryNow(fopAc_ac_c*);
|
||||
void fopAcM_setCarryNow(fopAc_ac_c* i_this, int stageLayer);
|
||||
void fopAcM_cancelCarryNow(fopAc_ac_c* i_this);
|
||||
s32 fopAcM_otoCheck(fopAc_ac_c*, f32);
|
||||
// void vectle_calc(DOUBLE_POS*, cXyz*);
|
||||
// void get_vectle_calc(cXyz*, cXyz*, cXyz*);
|
||||
@@ -504,19 +496,6 @@ void fpoAcM_relativePos(fopAc_ac_c* actor, cXyz* p_inPos, cXyz* p_outPos);
|
||||
|
||||
void fopAcM_setGbaName(fopAc_ac_c* i_this, u8 itemNo, u8 gbaName0, u8 gbaName1);
|
||||
|
||||
inline void make_prm_warp_hole(u32* actorParams, u8 p1, u8 p2, u8 p3) {
|
||||
u32 pp1 = (p3 << 0x8);
|
||||
u32 pp2 = (p2 << 0x10);
|
||||
u32 pp3 = (p1 << 0x1B) | 0x170000FF;
|
||||
*actorParams = pp2 | pp3 | pp1;
|
||||
}
|
||||
|
||||
inline void make_prm_bokkuri(u32* pActorParams, csXyz* p_angle, u8 param_2, u8 param_3, u8 param_4,
|
||||
u8 param_5, u8 param_6) {
|
||||
p_angle->x = (param_4 << 0x8) | (param_3 & 0xFF);
|
||||
p_angle->z = (param_6 << 0xD) | (param_2 << 0x1) | param_5;
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* dComIfGp_getPlayer(int);
|
||||
|
||||
inline s16 fopAcM_searchPlayerAngleY(fopAc_ac_c* actor) {
|
||||
|
||||
@@ -16,13 +16,15 @@ struct mDoLib_clipper {
|
||||
mClipper.calcViewFrustum();
|
||||
}
|
||||
|
||||
static s32 clip(const Mtx m, const Vec* param_1, const Vec* param_2) {
|
||||
return mClipper.clip(m, (Vec*)param_1, (Vec*)param_2);
|
||||
static s32 clip(const Mtx m, const Vec* max, const Vec* min) {
|
||||
return mClipper.clip(m, (Vec*)max, (Vec*)min);
|
||||
}
|
||||
|
||||
static s32 clip(const Mtx m, Vec param_1, f32 param_2) {
|
||||
return mClipper.clip(m, param_1, param_2);
|
||||
static s32 clip(const Mtx m, Vec center, f32 radius) {
|
||||
return mClipper.clip(m, center, radius);
|
||||
}
|
||||
|
||||
static s32 clip(J3DModel*);
|
||||
|
||||
static f32 getFar() { return mSystemFar; }
|
||||
static f32 getFovyRate() { return mFovyRate; }
|
||||
|
||||
@@ -2526,7 +2526,7 @@ extern actor_process_profile_definition g_profile_AGBSW0 = {
|
||||
&g_fopAc_Method.base,
|
||||
0x000D,
|
||||
&l_daAgbsw0_Method,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@ extern actor_process_profile_definition g_profile_ALLDIE = {
|
||||
&g_fopAc_Method.base,
|
||||
0x011D,
|
||||
&l_daAlldie_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_6_e,
|
||||
};
|
||||
|
||||
@@ -1469,7 +1469,7 @@ extern actor_process_profile_definition g_profile_AM = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x00BD,
|
||||
/* Actor SubMtd */ &l_daAM_Method,
|
||||
/* Status */ 0x00040120,
|
||||
/* Status */ fopAcStts_SHOWMAP_e | fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ENEMY_e,
|
||||
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -366,7 +366,7 @@ extern actor_process_profile_definition g_profile_ANDSW0 = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0135,
|
||||
&l_daAndsw0_Method,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -294,7 +294,7 @@ extern actor_process_profile_definition g_profile_ANDSW2 = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0136,
|
||||
&l_daAndsw2_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_6_e,
|
||||
};
|
||||
|
||||
@@ -679,7 +679,7 @@ BOOL daArrow_c::procMove() {
|
||||
}
|
||||
|
||||
mCurrProcFunc = &procStop_BG;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK4000_e);
|
||||
fopAcM_SetParam(this, 2);
|
||||
field_0x604 = 0x28;
|
||||
|
||||
@@ -721,7 +721,7 @@ BOOL daArrow_c::procMove() {
|
||||
|
||||
if (hitType > 0) {
|
||||
field_0x604 = 0x28;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK4000_e);
|
||||
|
||||
if (mPtclFollowCb.mpEmitter) {
|
||||
mPtclFollowCb.end();
|
||||
@@ -780,7 +780,7 @@ BOOL daArrow_c::procMove() {
|
||||
}
|
||||
|
||||
mCurrProcFunc = &procStop_BG;
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK4000_e);
|
||||
fopAcM_SetParam(this, 2);
|
||||
field_0x604 = 0x28;
|
||||
cM3dGPla* triPla = dComIfG_Bgsp()->i_GetTriPla(mLinChk);
|
||||
@@ -1302,7 +1302,7 @@ extern actor_process_profile_definition g_profile_ARROW = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x01BF,
|
||||
/* Actor SubMtd */ &daArrowMethodTable,
|
||||
/* Status */ 0x00044000,
|
||||
/* Status */ fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ extern actor_process_profile_definition g_profile_BOSSITEM = {
|
||||
&g_fopAc_Method.base,
|
||||
0x00FB,
|
||||
&daBossItem_METHODS,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -271,7 +271,7 @@ extern actor_process_profile_definition g_profile_BRANCH = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0193,
|
||||
&l_daBranch_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ extern actor_process_profile_definition g_profile_DISAPPEAR = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0188,
|
||||
&l_daDisappear_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -1083,7 +1083,7 @@ extern actor_process_profile_definition g_profile_ITEM = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x00F5,
|
||||
/* Actor SubMtd */ &l_daItem_Method,
|
||||
/* Status */ 0x000C0100,
|
||||
/* Status */ fopAcStts_CULL_e | fopAcStts_UNK40000_e | fopAcStts_UNK80000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -164,7 +164,7 @@ extern actor_process_profile_definition g_profile_Kaji = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01AC,
|
||||
&daKajiMethodTable,
|
||||
0x00040100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -89,7 +89,7 @@ extern actor_process_profile_definition g_profile_KYTAG04 = {
|
||||
&g_fopAc_Method.base,
|
||||
0xA4,
|
||||
&l_daKytag04_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
+160
-16
@@ -2,32 +2,176 @@
|
||||
// Generated by dtk
|
||||
// Translation Unit: d_a_kytag05.cpp
|
||||
//
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JAZelAudio/JAIZelBasic.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_player_link.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_kankyo_wether.h"
|
||||
#include "d/actor/d_a_ykgr.h"
|
||||
#include "m_Do/m_Do_audio.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
#include "d_a_kytag05.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
/* 00000078-00000080 .text daKytag05_Draw__FP13kytag05_class */
|
||||
void daKytag05_Draw(kytag05_class*) {
|
||||
/* Nonmatching */
|
||||
class kytag05_class : public fopAc_ac_c {
|
||||
public:
|
||||
/* 0x00 */ u8 mIndex;
|
||||
/* 0x04 */ int field_0x294;
|
||||
/* 0x08 */ int field_0x298;
|
||||
}; /* size = 0x29C */
|
||||
|
||||
BOOL daKytag05_Draw(kytag05_class*) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static const s16 wind_table[] = {
|
||||
0,
|
||||
90,
|
||||
180,
|
||||
270
|
||||
};
|
||||
|
||||
static const s16 mufuu_timer[] = {
|
||||
0x0A,
|
||||
0xA,
|
||||
0x00,
|
||||
0x5A
|
||||
};
|
||||
|
||||
static const s16 fuu_timer[] = {
|
||||
0x0096,
|
||||
0x0096,
|
||||
0x0096,
|
||||
0x0096,
|
||||
};
|
||||
|
||||
|
||||
/* 00000080-000003F4 .text daKytag05_Execute__FP13kytag05_class */
|
||||
void daKytag05_Execute(kytag05_class*) {
|
||||
/* Nonmatching */
|
||||
int daKytag05_Execute(kytag05_class* a_this) {
|
||||
/* Nonmatching - 92% matching */
|
||||
daPy_py_c *playerActor;
|
||||
camera_class *mpCamera;
|
||||
f32 cameraEyeZ;
|
||||
f32 i_blend;
|
||||
f32 windPow;
|
||||
u32 demoField;
|
||||
mpCamera = dComIfGp_getCamera(0);
|
||||
playerActor = daPy_getPlayerActorClass();
|
||||
windPow = dKyw_get_wind_pow();
|
||||
i_blend = 1.0f;
|
||||
|
||||
if (g_env_light.mWind.mEvtWindSet == 0xFF) {
|
||||
return 1;
|
||||
}
|
||||
if (g_dComIfG_gameInfo.play.mEvtCtrl.mMode != 0 &&
|
||||
dComIfGp_getEventManager().startCheckOld("demo41") != 0 &&
|
||||
g_dComIfG_gameInfo.play.getDemo() != NULL) {
|
||||
demoField = g_dComIfG_gameInfo.play.getDemo()->field_0xd4;
|
||||
if(demoField >= 0x186) {
|
||||
f32 fVar7 = ((f32)demoField - 390.0f) / 100.0f;
|
||||
if(fVar7 > i_blend) {
|
||||
fVar7 = i_blend;
|
||||
}
|
||||
i_blend = 1.0f - fVar7;
|
||||
g_env_light.mSnowCount = (int)(200.0f * i_blend);
|
||||
} else if (demoField == 0x187 && daYkgr_c::m_emitter != 0) {
|
||||
daYkgr_c::m_alpha_flag = 0;
|
||||
}
|
||||
}
|
||||
dKy_custom_colset(0, 7, i_blend);
|
||||
if((a_this->mIndex & 1) == 0) {
|
||||
if (a_this->field_0x294 >= fuu_timer[a_this->mIndex >> 1]) {
|
||||
a_this->field_0x294 = 0;
|
||||
a_this->mIndex += 1;
|
||||
g_env_light.mWind.mEvtWindSet = 2;
|
||||
} else {
|
||||
a_this->field_0x294 += 1;
|
||||
}
|
||||
} else {
|
||||
if (a_this->field_0x294 >= mufuu_timer[(a_this->mIndex) >> 1]) {
|
||||
a_this->mIndex += 1;
|
||||
if(a_this->mIndex >> 1 >= 4) {
|
||||
a_this->mIndex = 0;
|
||||
}
|
||||
dKyw_evt_wind_set(0, wind_table[a_this->mIndex >> 1]);
|
||||
a_this->field_0x294 = 0;
|
||||
g_env_light.mWind.mEvtWindSet = 1;
|
||||
} else {
|
||||
a_this->field_0x294 += 1;
|
||||
}
|
||||
}
|
||||
/* Numbers in this sections aren't necessarily right */
|
||||
cameraEyeZ = mpCamera->mLookat.mEye.z;
|
||||
if(cameraEyeZ > 360.0f|| playerActor->current.pos.z > 360.0f &&
|
||||
mpCamera->mLookat.mEye.x > 450 || playerActor->current.pos.x > 450.0f){
|
||||
if(cameraEyeZ > 540.0f || playerActor->current.pos.z < 540.0f) {
|
||||
dKyw_evt_wind_set(0, 0x61A8);
|
||||
} else if(cameraEyeZ > 630.0f || playerActor->current.pos.z > 630.0f) {
|
||||
dKyw_evt_wind_set(0, 0x4E20);
|
||||
} else {
|
||||
dKyw_evt_wind_set(0,0x4650);
|
||||
}
|
||||
} else if(mpCamera->mLookat.mEye.z < 720 || playerActor->current.pos.x < 720) {
|
||||
dKyw_evt_wind_set(0, -0x3E80);
|
||||
} else if(mpCamera->mLookat.mEye.z < 810 || playerActor->current.pos.x < 810 ) {
|
||||
dKyw_evt_wind_set(0, -0x4B00);
|
||||
} else if(mpCamera->mLookat.mEye.z < 900 || playerActor->current.pos.x < 900) {
|
||||
dKyw_evt_wind_set(0, -0x32C8);
|
||||
}
|
||||
|
||||
mDoAud_seStart(0x106A, 0, (u32)(windPow * 180), 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 000003F4-000003FC .text daKytag05_IsDelete__FP13kytag05_class */
|
||||
void daKytag05_IsDelete(kytag05_class*) {
|
||||
/* Nonmatching */
|
||||
BOOL daKytag05_IsDelete(kytag05_class*) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 000003FC-00000404 .text daKytag05_Delete__FP13kytag05_class */
|
||||
void daKytag05_Delete(kytag05_class*) {
|
||||
/* Nonmatching */
|
||||
BOOL daKytag05_Delete(kytag05_class*) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 00000404-000004C0 .text daKytag05_Create__FP10fopAc_ac_c */
|
||||
void daKytag05_Create(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
int daKytag05_Create(fopAc_ac_c* i_this) {
|
||||
fopAcM_SetupActor(i_this, kytag05_class);
|
||||
kytag05_class *a_this = (kytag05_class*)i_this;
|
||||
if (dComIfGs_isSymbol(1) != 0) {
|
||||
return 3;
|
||||
}
|
||||
a_this->mIndex = 0;
|
||||
a_this->field_0x294 = 0;
|
||||
a_this->field_0x298 = i_this->mBase.mParameters & 0xff;
|
||||
dKyw_evt_wind_set_go();
|
||||
dKyw_evt_wind_set(0,0);
|
||||
g_env_light.mSnowCount = 200;
|
||||
g_env_light.mMoyaMode = 0;
|
||||
g_env_light.mMoyaCount = 100;
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
static actor_method_class l_daKytag05_Method = {
|
||||
(process_method_func)daKytag05_Create,
|
||||
(process_method_func)daKytag05_Delete,
|
||||
(process_method_func)daKytag05_Execute,
|
||||
(process_method_func)daKytag05_IsDelete,
|
||||
(process_method_func)daKytag05_Draw,
|
||||
};
|
||||
|
||||
extern actor_process_profile_definition g_profile_KYTAG06 = {
|
||||
fpcLy_CURRENT_e,
|
||||
7,
|
||||
fpcLy_CURRENT_e,
|
||||
PROC_KYTAG05,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(kytag05_class),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
0xA5,
|
||||
&l_daKytag05_Method,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
@@ -93,7 +93,7 @@ extern actor_process_profile_definition g_profile_KYTAG06 = {
|
||||
&g_fopAc_Method.base,
|
||||
0xA6,
|
||||
&l_daKytag06_Method,
|
||||
0x00044000,
|
||||
fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
@@ -74,7 +74,7 @@ extern actor_process_profile_definition g_profile_MAGMA = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01BC,
|
||||
&l_daMagma_Method,
|
||||
0x00040180,
|
||||
fopAcStts_NOCULLEXEC_e | fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e
|
||||
};
|
||||
|
||||
@@ -634,7 +634,7 @@ extern actor_process_profile_definition g_profile_MBDOOR = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x0132,
|
||||
/* Actor SubMtd */ &l_daMbdoor_Method,
|
||||
/* Status */ 0x00044000,
|
||||
/* Status */ fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_6_e,
|
||||
};
|
||||
|
||||
@@ -372,7 +372,7 @@ extern actor_process_profile_definition g_profile_MOZO = {
|
||||
&g_fopAc_Method.base,
|
||||
0x00D1,
|
||||
&l_daMozo_Method,
|
||||
0x00040100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -628,7 +628,7 @@ extern actor_process_profile_definition g_profile_NH = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x013C,
|
||||
/* Actor SubMtd */ &l_daNh_Method,
|
||||
/* Status */ 0x00040100,
|
||||
/* Status */ fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ extern actor_process_profile_definition g_profile_Obj_Ygush00 = {
|
||||
&g_fopAc_Method.base,
|
||||
0x005E,
|
||||
&l_daObjYgush00_Method,
|
||||
0x00040100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -727,7 +727,7 @@ extern actor_process_profile_definition g_profile_Obj_Barrier = {
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 131,
|
||||
/* Actor SubMtd */ &l_daObjBarrier_Method,
|
||||
/* Status */ 0x40000,
|
||||
/* Status */ fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -1131,7 +1131,7 @@ extern actor_process_profile_definition g_profile_Obj_MknjD = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01C6,
|
||||
&daObjMknjD::Mthd_Table,
|
||||
0x00044100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -870,7 +870,7 @@ extern actor_process_profile_definition g_profile_Obj_Movebox = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0015,
|
||||
&daObjMovebox::Mthd_Table,
|
||||
0x00040524,
|
||||
0x04 | fopAcStts_SHOWMAP_e | fopAcStts_CULL_e | fopAcStts_FREEZE_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace daObjPaper {
|
||||
|
||||
/* 00000730-00000748 .text mode_wait_init__Q210daObjPaper5Act_cFv */
|
||||
void daObjPaper::Act_c::mode_wait_init() {
|
||||
mStatus |= fopAcStts_NOEXEC_e;
|
||||
mStatus |= fopAcStts_NOCULLEXEC_e;
|
||||
mMode = ActMode_WAIT_e;
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace daObjPaper {
|
||||
|
||||
/* 00000784-000007A4 .text mode_talk0_init__Q210daObjPaper5Act_cFv */
|
||||
void daObjPaper::Act_c::mode_talk0_init() {
|
||||
mStatus &= ~fopAcStts_NOEXEC_e;
|
||||
mStatus &= ~fopAcStts_NOCULLEXEC_e;
|
||||
mMsgId = -1;
|
||||
mMode = ActMode_TALKBEGIN_e;
|
||||
}
|
||||
@@ -402,8 +402,8 @@ namespace daObjPaper {
|
||||
&g_fopAc_Method.base,
|
||||
0x0108,
|
||||
&Mthd_Table,
|
||||
0x00040180,
|
||||
fopAcStts_NOCULLEXEC_e | fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLSPHERE_8_e,
|
||||
fopAc_CULLSPHERE_CUSTOM_e,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1104,7 +1104,7 @@ extern actor_process_profile_definition g_profile_OBJ_TORIPOST = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01B3,
|
||||
&daObjTpostMethodTable,
|
||||
0x00240138,
|
||||
0x18 | fopAcStts_SHOWMAP_e | fopAcStts_CULL_e | fopAcStts_UNK40000_e | fopAcStts_UNK200000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_4_e,
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ extern actor_process_profile_definition g_profile_RECTANGLE = {
|
||||
&g_fopAc_Method.base,
|
||||
0x9F,
|
||||
&l_daRct_Method,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@ extern actor_process_profile_definition g_profile_SCENECHG = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01A1,
|
||||
&daSceneChgMethodTable,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_4_e,
|
||||
};
|
||||
|
||||
@@ -261,7 +261,7 @@ extern actor_process_profile_definition g_profile_ShopItem = {
|
||||
&g_fopAc_Method.base,
|
||||
0x00FE,
|
||||
&daShopItemMethodTable,
|
||||
0x00044100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
@@ -52,7 +52,6 @@ u32 daSpotbox_c::getType() {
|
||||
return fopAcM_GetParam(this) & 1;
|
||||
}
|
||||
|
||||
|
||||
/* 00000078-000000C4 .text daSpotbox_Draw__FP11daSpotbox_c */
|
||||
static int daSpotbox_Draw(daSpotbox_c* i_this) {
|
||||
return ((daSpotbox_c*)i_this)->draw();
|
||||
|
||||
@@ -87,7 +87,7 @@ extern actor_process_profile_definition g_profile_SWC00 = {
|
||||
&g_fopAc_Method.base,
|
||||
0x011A,
|
||||
&l_daSwc00_Method,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -125,7 +125,7 @@ extern actor_process_profile_definition g_profile_TAG_KB_ITEM = {
|
||||
&g_fopAc_Method.base,
|
||||
0x0127,
|
||||
&daTagKbItemMethodTable,
|
||||
0x00040000,
|
||||
fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
+14
-14
@@ -147,18 +147,18 @@ namespace daTagRet {
|
||||
};
|
||||
|
||||
extern actor_process_profile_definition g_profile_Tag_Ret = {
|
||||
fpcLy_CURRENT_e,
|
||||
3,
|
||||
fpcLy_CURRENT_e,
|
||||
PROC_Tag_Ret,
|
||||
&g_fpcLf_Method.mBase,
|
||||
sizeof(daTagRet::Act_c),
|
||||
0,
|
||||
0,
|
||||
&g_fopAc_Method.base,
|
||||
0x005F,
|
||||
&daTagRet::Mthd_Table,
|
||||
0x00040000,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 3,
|
||||
/* ListPrio */ fpcLy_CURRENT_e,
|
||||
/* ProcName */ PROC_Tag_Ret,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.mBase,
|
||||
/* Size */ sizeof(daTagRet::Act_c),
|
||||
/* SizeOther */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Priority */ 0x005F,
|
||||
/* Actor SubMtd */ &daTagRet::Mthd_Table,
|
||||
/* Status */ fopAcStts_UNK40000_e,
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ actor_process_profile_definition g_profile_THROWSTONE = {
|
||||
&g_fopAc_Method.base,
|
||||
0x01CE,
|
||||
&l_daThrowstone_Method,
|
||||
0x00040100,
|
||||
fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_0_e,
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ s32 fopAc_Execute(void* pProc) {
|
||||
|
||||
s32 moveApproval = dComIfGp_event_moveApproval(actor);
|
||||
|
||||
if ((moveApproval == 2 || moveApproval != 0 || !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) && (!fopAcM_checkStatus(actor, fopAcStts_NOEXEC_e) || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e))) {
|
||||
if ((moveApproval == 2 || moveApproval != 0 || !fopAcM_checkStatus(actor, fopAc_ac_c::stopStatus)) && (!fopAcM_checkStatus(actor, fopAcStts_NOCULLEXEC_e) || !fopAcM_CheckCondition(actor, fopAcCnd_NODRAW_e))) {
|
||||
fopAcM_OffCondition(actor, fopAcCnd_NOEXEC_e);
|
||||
actor->next = actor->current;
|
||||
ret = fpcMtd_Execute((process_method_class*)actor->mSubMtd, actor);
|
||||
|
||||
+290
-35
@@ -9,9 +9,15 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_item.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "m_Do/m_Do_printf.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
@@ -125,7 +131,7 @@ s32 fopAcM_delete(fopAc_ac_c* pActor) {
|
||||
|
||||
/* 800244B8-8002451C .text fopAcM_delete__FUi */
|
||||
s32 fopAcM_delete(unsigned int actorID) {
|
||||
fopAc_ac_c* pActor = fopAcM_SearchByID(actorID);
|
||||
fopAc_ac_c* pActor = (fopAc_ac_c*)fopAcM_SearchByID(actorID);
|
||||
|
||||
if (pActor != NULL) {
|
||||
/* "Deleting Actor" */
|
||||
@@ -478,19 +484,32 @@ f32 fopAcM_searchActorDistance2(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
|
||||
/* 800253C0-80025470 .text fopAcM_searchActorDistanceXZ__FP10fopAc_ac_cP10fopAc_ac_c */
|
||||
f32 fopAcM_searchActorDistanceXZ(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
cXyz delta = i_other->current.pos - i_this->current.pos;
|
||||
return delta.absXZ();
|
||||
/* Nonmatching */
|
||||
return (i_other->current.pos - i_this->current.pos).absXZ();
|
||||
}
|
||||
|
||||
/* 80025470-800254BC .text fopAcM_searchActorDistanceXZ2__FP10fopAc_ac_cP10fopAc_ac_c */
|
||||
f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c* i_this, fopAc_ac_c* i_other) {
|
||||
cXyz delta = i_other->current.pos - i_this->current.pos;
|
||||
return delta.abs2XZ();
|
||||
/* Nonmatching */
|
||||
return (i_other->current.pos - i_this->current.pos).abs2XZ();
|
||||
}
|
||||
|
||||
/* 800254BC-800255B4 .text fopAcM_rollPlayerCrash__FP10fopAc_ac_cfUl */
|
||||
s32 fopAcM_rollPlayerCrash(fopAc_ac_c*, float, u32) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_rollPlayerCrash(fopAc_ac_c* i_this, f32 distAdjust, u32 flag) {
|
||||
f32 maxDist = distAdjust + 40.0f;
|
||||
f32 xzDist2 = fopAcM_searchPlayerDistanceXZ2(i_this);
|
||||
f32 yDist = fopAcM_searchPlayerDistanceY(i_this);
|
||||
if (xzDist2 < maxDist*maxDist && yDist > -100.0f && yDist < 200.0f) {
|
||||
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
|
||||
s16 angle = fopAcM_searchPlayerAngleY(i_this);
|
||||
if (cM_scos(player->current.angle.y - angle) < 0.9f) {
|
||||
if (fopAcM_GetName(player) == PROC_PLAYER) {
|
||||
player->onFrollCrashFlg(flag);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 800255B4-80025660 .text fopAcM_checkCullingBox__FPA4_fffffff */
|
||||
@@ -502,9 +521,90 @@ s32 fopAcM_checkCullingBox(Mtx pMtx, float x0, float y0, float z0, float x1, flo
|
||||
return mDoLib_clipper::clip(viewMtx, &p1, &p0) != 0;
|
||||
}
|
||||
|
||||
static fopAc_cullSizeBox l_cullSizeBox[14]; // TODO
|
||||
static fopAc_cullSizeSphere l_cullSizeSphere[8]; // TODO
|
||||
|
||||
/* 80025660-800259A8 .text fopAcM_cullingCheck__FP10fopAc_ac_c */
|
||||
s32 fopAcM_cullingCheck(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_cullingCheck(fopAc_ac_c* i_this) {
|
||||
MtxP pMtx;
|
||||
if (i_this->mCullMtx == NULL) {
|
||||
pMtx = j3dSys.getViewMtx();
|
||||
} else {
|
||||
Mtx mtx;
|
||||
cMtx_concat(j3dSys.getViewMtx(), i_this->mCullMtx, mtx);
|
||||
pMtx = mtx;
|
||||
}
|
||||
|
||||
f32 cullFar = i_this->mCullSizeFar;
|
||||
if (dComIfGp_event_runCheck()) {
|
||||
cullFar *= dComIfGp_event_getCullRate();
|
||||
}
|
||||
|
||||
int cullType = i_this->mCullType;
|
||||
bool isBox = false;
|
||||
if ((cullType >= 0 && cullType < fopAc_CULLBOX_CUSTOM_e) || cullType == fopAc_CULLBOX_CUSTOM_e) {
|
||||
isBox = true;
|
||||
}
|
||||
|
||||
if (isBox) {
|
||||
if (cullType == fopAc_CULLBOX_CUSTOM_e) {
|
||||
if (i_this->mCullSizeFar > 0.0f) {
|
||||
mDoLib_clipper::mClipper.setFar(cullFar * mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
s32 ret = mDoLib_clipper::mClipper.clip(pMtx, &i_this->mCull.mBox.mMax, &i_this->mCull.mBox.mMin);
|
||||
mDoLib_clipper::mClipper.setFar(mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
return ret;
|
||||
} else {
|
||||
return mDoLib_clipper::mClipper.clip(pMtx, &i_this->mCull.mBox.mMax, &i_this->mCull.mBox.mMin);
|
||||
}
|
||||
} else {
|
||||
fopAc_cullSizeBox& cullBox = l_cullSizeBox[cullType];
|
||||
if (i_this->mCullSizeFar > 0.0f) {
|
||||
mDoLib_clipper::mClipper.setFar(cullFar * mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
s32 ret = mDoLib_clipper::mClipper.clip(pMtx, &cullBox.mMax, &cullBox.mMin);
|
||||
mDoLib_clipper::mClipper.setFar(mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
return ret;
|
||||
} else {
|
||||
return mDoLib_clipper::mClipper.clip(pMtx, &cullBox.mMax, &cullBox.mMin);
|
||||
}
|
||||
}
|
||||
} else { // Sphere
|
||||
if (cullType == fopAc_CULLSPHERE_CUSTOM_e) {
|
||||
if (i_this->mCullSizeFar > 0.0f) {
|
||||
mDoLib_clipper::mClipper.setFar(cullFar * mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
f32 radius = i_this->mCull.mSphere.mRadius;
|
||||
Vec center = i_this->mCull.mSphere.mCenter;
|
||||
Vec unusedCenter = center;
|
||||
s32 ret = mDoLib_clipper::mClipper.clip(pMtx, center, radius);
|
||||
mDoLib_clipper::mClipper.setFar(mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
return ret;
|
||||
} else {
|
||||
f32 radius = i_this->mCull.mSphere.mRadius;
|
||||
return mDoLib_clipper::mClipper.clip(pMtx, i_this->mCull.mSphere.mCenter, radius);
|
||||
}
|
||||
} else {
|
||||
fopAc_cullSizeSphere& cullSphere = l_cullSizeSphere[cullType - fopAc_CULLSPHERE_0_e];
|
||||
if (i_this->mCullSizeFar > 0.0f) {
|
||||
mDoLib_clipper::mClipper.setFar(cullFar * mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
f32 radius = cullSphere.mRadius;
|
||||
Vec center = cullSphere.mCenter;
|
||||
Vec unusedCenter = center;
|
||||
s32 ret = mDoLib_clipper::mClipper.clip(pMtx, center, radius);
|
||||
mDoLib_clipper::mClipper.setFar(mDoLib_clipper::mSystemFar);
|
||||
mDoLib_clipper::mClipper.calcViewFrustum();
|
||||
return ret;
|
||||
} else {
|
||||
f32 radius = cullSphere.mRadius;
|
||||
return mDoLib_clipper::mClipper.clip(pMtx, cullSphere.mCenter, radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 800259A8-800259F8 .text fopAcM_orderTalkEvent__FP10fopAc_ac_cP10fopAc_ac_c */
|
||||
@@ -549,6 +649,7 @@ s32 fopAcM_orderCatchEvent(fopAc_ac_c* i_this, fopAc_ac_c* i_partner) {
|
||||
|
||||
/* 80025C34-80025CC8 .text fopAcM_orderOtherEvent2__FP10fopAc_ac_cPcUsUs */
|
||||
s32 fopAcM_orderOtherEvent2(fopAc_ac_c* i_this, char* pEventName, u16 flag, u16 hind) {
|
||||
/* Nonmatching */
|
||||
u16 prio = dComIfGp_evmng_getEventPrio(dComIfGp_evmng_getEventIdx(pEventName, 0xFF));
|
||||
if (prio == 0)
|
||||
prio = 0xFF;
|
||||
@@ -568,6 +669,7 @@ s32 fopAcM_orderChangeEvent(fopAc_ac_c* i_this, fopAc_ac_c* i_partner, char* pEv
|
||||
|
||||
/* 80025D94-80025E1C .text fopAcM_orderChangeEventId__FP10fopAc_ac_csUsUs */
|
||||
s32 fopAcM_orderChangeEventId(fopAc_ac_c* i_this, s16 eventIdx, u16 flag, u16 hind) {
|
||||
/* Nonmatching */
|
||||
u16 prio = dComIfGp_evmng_getEventPrio(eventIdx);
|
||||
if (prio == 0)
|
||||
prio = 0xFF;
|
||||
@@ -577,6 +679,7 @@ s32 fopAcM_orderChangeEventId(fopAc_ac_c* i_this, s16 eventIdx, u16 flag, u16 hi
|
||||
|
||||
/* 80025E1C-80025EA4 .text fopAcM_orderChangeEventId__FP10fopAc_ac_cP10fopAc_ac_csUsUs */
|
||||
s32 fopAcM_orderChangeEventId(fopAc_ac_c* i_this, fopAc_ac_c* i_partner, s16 eventIdx, u16 flag, u16 hind) {
|
||||
/* Nonmatching */
|
||||
u16 prio = dComIfGp_evmng_getEventPrio(eventIdx);
|
||||
if (prio == 0)
|
||||
prio = 0xFF;
|
||||
@@ -635,13 +738,29 @@ fopAc_ac_c* fopAcM_getEventPartner(fopAc_ac_c* i_this) {
|
||||
}
|
||||
|
||||
/* 80026118-800261E8 .text fopAcM_createItemForPresentDemo__FP4cXyziUciiP5csXyzP4cXyz */
|
||||
s32 fopAcM_createItemForPresentDemo(cXyz*, int, unsigned char, int, int, csXyz*, cXyz*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_createItemForPresentDemo(cXyz* pos, int i_itemNo, u8 param_3, int roomNo, int param_5, csXyz* rot, cXyz* scale) {
|
||||
JUT_ASSERT(2413, 0 <= i_itemNo && i_itemNo < 256);
|
||||
|
||||
dComIfGp_event_setGtItm(i_itemNo);
|
||||
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fopAcM_createDemoItem(pos, i_itemNo, roomNo, rot, param_5, scale, param_3);
|
||||
}
|
||||
|
||||
/* 800261E8-800262B4 .text fopAcM_createItemForTrBoxDemo__FP4cXyziiiP5csXyzP4cXyz */
|
||||
s32 fopAcM_createItemForTrBoxDemo(cXyz*, int, int, int, csXyz*, cXyz*) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_createItemForTrBoxDemo(cXyz* pos, int i_itemNo, int roomNo, int param_5, csXyz* rot, cXyz* scale) {
|
||||
JUT_ASSERT(2458, 0 <= i_itemNo && i_itemNo < 256);
|
||||
|
||||
dComIfGp_event_setGtItm(i_itemNo);
|
||||
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fopAcM_createDemoItem(pos, i_itemNo, roomNo, rot, param_5, scale, 0);
|
||||
}
|
||||
|
||||
/* 800262B4-80026694 .text fopAcM_createItemFromTable__FP4cXyziiiiP5csXyziP4cXyz */
|
||||
@@ -655,33 +774,90 @@ void fopAcM_createRaceItemFromTable(cXyz*, int, int, int, csXyz*, cXyz*, int) {
|
||||
}
|
||||
|
||||
/* 800267C8-8002688C .text fopAcM_createShopItem__FP4cXyziP5csXyziP4cXyzPFPv_i */
|
||||
void fopAcM_createShopItem(cXyz*, int, csXyz*, int, cXyz*, createFunc createFunc) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_createShopItem(cXyz* pos, int i_itemNo, csXyz* rot, int roomNo, cXyz* scale,
|
||||
createFunc createFunc) {
|
||||
JUT_ASSERT(2716, 0 <= i_itemNo && i_itemNo < 256);
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return fopAcM_create(PROC_ShopItem, i_itemNo, pos, roomNo, rot, scale, 0xFF, createFunc);
|
||||
}
|
||||
|
||||
/* 8002688C-80026980 .text fopAcM_createRaceItem__FP4cXyziiP5csXyziP4cXyzi */
|
||||
void fopAcM_createRaceItem(cXyz*, int, int, csXyz*, int, cXyz*, int) {
|
||||
s32 fopAcM_createRaceItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, int roomNo, cXyz* scale, int param_7) {
|
||||
/* Nonmatching */
|
||||
JUT_ASSERT(2763, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127);
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
i_itemNo = (u8)check_itemno(i_itemNo);
|
||||
u32 params = (i_itemBitNo & 0x7F) << 0x08 | i_itemNo | (param_7 & 0xF) << 0xF;
|
||||
fopAcM_create(PROC_RACEITEM, params, pos, roomNo, rot, scale, 0xFF, NULL);
|
||||
}
|
||||
|
||||
/* 80026980-80026A68 .text fopAcM_createDemoItem__FP4cXyziiP5csXyziP4cXyzUc */
|
||||
s32 fopAcM_createDemoItem(cXyz*, int, int, csXyz*, int, cXyz*, unsigned char) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_createDemoItem(cXyz* pos, int i_itemNo, int i_itemBitNo, csXyz* rot, int roomNo, cXyz* scale, u8 param_7) {
|
||||
JUT_ASSERT(2813, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127);
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
u32 params = i_itemNo & 0xFF | (i_itemBitNo & 0x7F) << 0x08 | (param_7 & 0xFF) << 0x10;
|
||||
fopAcM_create(PROC_Demo_Item, params, pos, roomNo, rot, scale, 0xFF, NULL);
|
||||
}
|
||||
|
||||
/* 80026A68-80026ADC .text fopAcM_createItemForBoss__FP4cXyziiP5csXyzP4cXyzi */
|
||||
s32 fopAcM_createItemForBoss(cXyz*, int, int, csXyz*, cXyz*, int) {
|
||||
/* Nonmatching */
|
||||
s32 fopAcM_createItemForBoss(cXyz* pos, int, int roomNo, csXyz* rot, cXyz* scale, int param_6) {
|
||||
switch (param_6) {
|
||||
case 1:
|
||||
return fopAcM_createItem(pos, UTUWA_HEART, -1, roomNo, 3, rot, 0xC, scale);
|
||||
case 0:
|
||||
default:
|
||||
return fopAcM_createItem(pos, UTUWA_HEART, -1, roomNo, 3, rot, 5, scale);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80026ADC-80026C90 .text fopAcM_createItem__FP4cXyziiiiP5csXyziP4cXyz */
|
||||
s32 fopAcM_createItem(cXyz*, int, int, int, int, csXyz*, int, cXyz*) {
|
||||
s32 fopAcM_createItem(cXyz* pos, int i_itemNo, int i_itemBitNo, int roomNo, int type, csXyz* rot,
|
||||
int action, cXyz* scale) {
|
||||
/* Nonmatching */
|
||||
}
|
||||
|
||||
/* 80026C90-80026E5C .text fopAcM_fastCreateItem2__FP4cXyziiiiP5csXyziP4cXyz */
|
||||
void fopAcM_fastCreateItem2(cXyz*, int, int, int, int, csXyz*, int, cXyz*) {
|
||||
/* Nonmatching */
|
||||
void* fopAcM_fastCreateItem2(cXyz* pos, int i_itemNo, int i_itemBitNo, int roomNo, int type,
|
||||
csXyz* rot, int action, cXyz* scale) {
|
||||
/* Nonmatching (regswap) */
|
||||
JUT_ASSERT(2995, 0 <= i_itemNo && i_itemNo < 256 && (-1 <= i_itemBitNo && i_itemBitNo <= 79) || i_itemBitNo == 127);
|
||||
|
||||
csXyz prmRot = csXyz::Zero;
|
||||
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (rot) {
|
||||
prmRot = *rot;
|
||||
}
|
||||
prmRot.z = 0xFF;
|
||||
|
||||
u32 params = check_itemno(i_itemNo);
|
||||
params = (i_itemBitNo & 0xFF) << 0x08 | params & 0xFF | 0x00FF0000 | (type & 3) << 0x18 | action << 0x1A;
|
||||
|
||||
daItem_c* item;
|
||||
switch (i_itemNo) {
|
||||
case RECOVER_FAIRY:
|
||||
return fopAcM_fastCreate(PROC_NPC_FA1, 1, pos, roomNo, rot, scale, 0xFF, NULL, NULL);
|
||||
case TRIPLE_HEART:
|
||||
// Make the two extra hearts first, then fall-through to make the third heart as normal.
|
||||
for (int i = 0; i < 2; i++) {
|
||||
fopAcM_fastCreate(PROC_ITEM, params, pos, roomNo, &prmRot, scale, 0xFF, NULL, NULL);
|
||||
}
|
||||
// Fall-through
|
||||
default:
|
||||
return fopAcM_fastCreate(PROC_ITEM, params, pos, roomNo, &prmRot, scale, 0xFF, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80026E5C-80026F5C .text fopAcM_createItemForKP2__FP4cXyziiP5csXyzP4cXyzfffUs */
|
||||
@@ -695,13 +871,71 @@ void* fopAcM_createItemForSimpleDemo(cXyz*, int, int, csXyz*, cXyz*, float, floa
|
||||
}
|
||||
|
||||
/* 80026F98-80027254 .text fopAcM_fastCreateItem__FP4cXyziiP5csXyzP4cXyzfffiPFPv_i */
|
||||
void fopAcM_fastCreateItem(cXyz*, int, int, csXyz*, cXyz*, float, float, float, int, createFunc createFunc) {
|
||||
/* Nonmatching */
|
||||
void* fopAcM_fastCreateItem(cXyz* pos, int i_itemNo, int roomNo, csXyz* rot, cXyz* scale,
|
||||
f32 speedF, f32 speedY, f32 gravity, int i_itemBitNo, createFunc createFunc) {
|
||||
/* Nonmatching (regswaps) */
|
||||
JUT_ASSERT(3201, 0 <= i_itemNo && i_itemNo < 256);
|
||||
if (i_itemNo == NO_ITEM) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32 params = (u8)check_itemno(i_itemNo) & 0xFF | (i_itemBitNo & 0xFF) << 0x08 | 0x28FF0000;
|
||||
|
||||
if (isHeart(i_itemNo)) {
|
||||
speedF = 2.0f * speedF;
|
||||
}
|
||||
|
||||
daItem_c* item;
|
||||
csXyz prmRot;
|
||||
switch (i_itemNo) {
|
||||
case RECOVER_FAIRY:
|
||||
item = (daItem_c*)fopAcM_fastCreate(PROC_NPC_FA1, 1, pos, roomNo, rot, scale, 0xFF, NULL, NULL);
|
||||
return item;
|
||||
case TRIPLE_HEART:
|
||||
// Make the two extra hearts first, then fall-through to make the third heart as normal.
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (rot) {
|
||||
prmRot = *rot;
|
||||
} else {
|
||||
prmRot = csXyz::Zero;
|
||||
}
|
||||
prmRot.z = 0xFF;
|
||||
prmRot.y += (int)cM_rndFX(0x2000);
|
||||
|
||||
item = (daItem_c*)fopAcM_fastCreate(PROC_ITEM, params, pos, roomNo, &prmRot, scale, 0xFF, createFunc, NULL);
|
||||
if (item) {
|
||||
item->speedF = speedF * (1.0f + cM_rndFX(0.3f));
|
||||
item->speed.y = speedY * (1.0f + cM_rndFX(0.2f));
|
||||
item->mGravity = gravity;
|
||||
}
|
||||
}
|
||||
// Fall-through
|
||||
default:
|
||||
if (rot) {
|
||||
prmRot = *rot;
|
||||
} else {
|
||||
prmRot = csXyz::Zero;
|
||||
}
|
||||
prmRot.z = 0xFF;
|
||||
|
||||
item = (daItem_c*)fopAcM_fastCreate(PROC_ITEM, params, pos, roomNo, &prmRot, scale, 0xFF, createFunc, NULL);
|
||||
if (item) {
|
||||
item->speedF = speedF;
|
||||
item->speed.y = speedY;
|
||||
item->mGravity = gravity;
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
/* 80027254-80027280 .text stealItem_CB__FPv */
|
||||
void stealItem_CB(void*) {
|
||||
/* Nonmatching */
|
||||
BOOL stealItem_CB(void* actor) {
|
||||
if (actor) {
|
||||
daItem_c* item = (daItem_c*)actor;
|
||||
item->mScale.setAll(1.0f);
|
||||
item->mStatusFlags |= 0x40;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 80027280-800273D4 .text fopAcM_createStealItem__FP4cXyziiP5csXyzi */
|
||||
@@ -745,13 +979,24 @@ void fopAcM_getGroundAngle(fopAc_ac_c*, csXyz*) {
|
||||
}
|
||||
|
||||
/* 80027E28-80027E5C .text fopAcM_setCarryNow__FP10fopAc_ac_ci */
|
||||
void fopAcM_setCarryNow(fopAc_ac_c*, int) {
|
||||
/* Nonmatching */
|
||||
void fopAcM_setCarryNow(fopAc_ac_c* i_this, int stageLayer) {
|
||||
fopAcM_OnStatus(i_this, fopAcStts_CARRY_e);
|
||||
if (stageLayer) {
|
||||
fopAcM_setStageLayer(i_this);
|
||||
}
|
||||
}
|
||||
|
||||
/* 80027E5C-80027ED8 .text fopAcM_cancelCarryNow__FP10fopAc_ac_c */
|
||||
void fopAcM_cancelCarryNow(fopAc_ac_c*) {
|
||||
/* Nonmatching */
|
||||
void fopAcM_cancelCarryNow(fopAc_ac_c* i_this) {
|
||||
if (fopAcM_checkStatus(i_this, fopAcStts_CARRY_e)) {
|
||||
fopAcM_OffStatus(i_this, fopAcStts_CARRY_e);
|
||||
fopAcM_setRoomLayer(i_this, fopAcM_GetRoomNo(i_this));
|
||||
i_this->shape_angle.z = 0;
|
||||
|
||||
if (dComIfGp_event_runCheck() && i_this->mGroup != fopAc_ENEMY_e) {
|
||||
fopAcM_OnStatus(i_this, fopAcStts_UNK800_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 80027ED8-800281D8 .text fopAcM_viewCutoffCheck__FP10fopAc_ac_cf */
|
||||
@@ -766,6 +1011,7 @@ s32 fopAcM_otoCheck(fopAc_ac_c*, float) {
|
||||
|
||||
/* 800282F8-8002833C .text fopAcM_getProcNameString__FP10fopAc_ac_c */
|
||||
const char * fopAcM_getProcNameString(fopAc_ac_c* i_this) {
|
||||
/* Nonmatching */
|
||||
const char * pProcNameString = dStage_getName2(fpcM_GetProfName(i_this), i_this->mSubtype);
|
||||
if (pProcNameString != NULL)
|
||||
return pProcNameString;
|
||||
@@ -796,15 +1042,23 @@ void fopAcM_setGbaName(fopAc_ac_c* i_this, u8 itemNo, u8 gbaName0, u8 gbaName1)
|
||||
}
|
||||
|
||||
/* 80028724-800287D8 .text fpoAcM_absolutePos__FP10fopAc_ac_cP4cXyzP4cXyz */
|
||||
void fpoAcM_absolutePos(fopAc_ac_c*, cXyz*, cXyz*) {
|
||||
/* Nonmatching */
|
||||
void fpoAcM_absolutePos(fopAc_ac_c* i_this, cXyz* relPos, cXyz* absPos) {
|
||||
*absPos = i_this->current.pos;
|
||||
absPos->x += relPos->z * cM_ssin(i_this->shape_angle.y) + relPos->x * cM_scos(i_this->shape_angle.y);
|
||||
absPos->y += relPos->y;
|
||||
absPos->z += relPos->z * cM_scos(i_this->shape_angle.y) - relPos->x * cM_ssin(i_this->shape_angle.y);
|
||||
}
|
||||
|
||||
/* 800287D8-8002889C .text fpoAcM_relativePos__FP10fopAc_ac_cP4cXyzP4cXyz */
|
||||
void fpoAcM_relativePos(fopAc_ac_c*, cXyz*, cXyz*) {
|
||||
/* Nonmatching */
|
||||
void fpoAcM_relativePos(fopAc_ac_c* i_this, cXyz* absPos, cXyz* relPos) {
|
||||
s16 angle = -i_this->shape_angle.y;
|
||||
cXyz offset = *absPos - i_this->current.pos;
|
||||
relPos->x = offset.z * cM_ssin(angle) + offset.x * cM_scos(angle);
|
||||
relPos->y = offset.y;
|
||||
relPos->z = offset.z * cM_scos(angle) - offset.x * cM_ssin(angle);
|
||||
}
|
||||
|
||||
#ifndef __INTELLISENSE__
|
||||
/* 80029178-80029198 .text __ct__20fopAc_cullSizeSphereF4cXyzf */
|
||||
fopAc_cullSizeSphere::fopAc_cullSizeSphere(cXyz p, float r) {
|
||||
mCenter = p;
|
||||
@@ -822,3 +1076,4 @@ fopAc_cullSizeBox::fopAc_cullSizeBox(cXyz min, cXyz max) {
|
||||
mMin = min;
|
||||
mMax = max;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user