mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 14:13:27 -04:00
f_op debug work (#2991)
* f_op debug 1 * f_op debug 2 * f_op debug 3 * f_op debug 4 * f_op debug 5 * f_op_debug fix build * f_op linking * remove goto in fopac_create * fix regressions * fix regressions * pr comments
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_a_itembase_static.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
|
||||
struct daItemBase_data {
|
||||
/* 0x00 */ f32 mGravity;
|
||||
|
||||
@@ -294,9 +294,10 @@ public:
|
||||
return mCannon;
|
||||
}
|
||||
|
||||
static void make_prm(u32* o_params, csXyz* o_paramsEx, u8 param_2, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_6) {
|
||||
o_paramsEx->x = (i_itemBit << 8) | (i_itemNo & 0xFF);
|
||||
o_paramsEx->z = (param_6 << 13) | (param_2 << 1) | i_itemType;
|
||||
static u32* make_prm(u32* o_params, csXyz* o_paramsEx, u8 param_2, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_6) {
|
||||
o_paramsEx->x = (i_itemBit << 8) | i_itemNo;
|
||||
o_paramsEx->z = i_itemType | ((param_6 << 13) | (param_2 << 1));
|
||||
return o_params;
|
||||
}
|
||||
|
||||
static void make_prm_bokkuri(u32* o_params, csXyz* o_paramsEx, u8 i_itemNo, u8 i_itemBit, u8 i_itemType, u8 param_5) {
|
||||
|
||||
@@ -17,15 +17,15 @@ public:
|
||||
return mNext;
|
||||
}
|
||||
|
||||
u8 checkStreamOn() {
|
||||
u8 checkStreamOn() const {
|
||||
return mStreamOn;
|
||||
}
|
||||
|
||||
s32 checkCanoeOn() {
|
||||
s32 checkCanoeOn() const {
|
||||
return mParameters;
|
||||
}
|
||||
|
||||
u8 getPower() {
|
||||
u8 getPower() const {
|
||||
return mPower;
|
||||
}
|
||||
|
||||
|
||||
@@ -3622,7 +3622,7 @@ inline int dComIfGp_event_order(u16 i_type, u16 i_prio, u16 i_flags, u16 i_hindF
|
||||
i_targetActor, i_eventID, i_mapToolId);
|
||||
}
|
||||
|
||||
inline void dComIfGp_event_setGtItm(int i_itemNo) {
|
||||
inline void dComIfGp_event_setGtItm(u8 i_itemNo) {
|
||||
g_dComIfG_gameInfo.play.getEvent()->setGtItm(i_itemNo);
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -150,7 +150,13 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL isOrderOK() { return mEventStatus == 0 || mEventStatus == 2; }
|
||||
BOOL isOrderOK() {
|
||||
#if DEBUG
|
||||
return (mEventStatus == 0 || mEventStatus == 2) && !mDebugStb;
|
||||
#else
|
||||
return mEventStatus == 0 || mEventStatus == 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
fopAc_ac_c* getPt1() { return convPId(mPt1); }
|
||||
fopAc_ac_c* getPt2() { return convPId(mPt2); }
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
class dEnemyItem_c {
|
||||
public:
|
||||
static void setItemData(u8* data) { mData = data; }
|
||||
static u8* getItemData() { return mData; }
|
||||
|
||||
static u8* mData;
|
||||
};
|
||||
|
||||
@@ -499,6 +499,9 @@ private:
|
||||
/* 0x01A */ u8 field_0x1a;
|
||||
/* 0x01B */ u8 field_0x1b;
|
||||
/* 0x01C */ dPa_simpleEcallBack field_0x1c[25];
|
||||
#if DEBUG
|
||||
u8 unk_0x210[0x1CC];
|
||||
#endif
|
||||
/* 0x210 */ level_c field_0x210;
|
||||
#if DEBUG
|
||||
u8 mSceneCount;
|
||||
|
||||
@@ -68,7 +68,11 @@ public:
|
||||
bool resetGame();
|
||||
void offReset();
|
||||
|
||||
static bool isPause() { return pauseTimer == 0; }
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
static s8 isPause() { return pauseTimer | nextPauseTimer; }
|
||||
#else
|
||||
static s8 isPause() { return pauseTimer; }
|
||||
#endif
|
||||
static void setPauseTimer(s8 time) { nextPauseTimer = time; }
|
||||
|
||||
static s8 pauseTimer;
|
||||
|
||||
+4
-1
@@ -1133,7 +1133,10 @@ public:
|
||||
static void setProcID(u32 id) { mProcID = id; }
|
||||
static u32 getProcID() { return mProcID; }
|
||||
static void setStatusProcID(int i_roomNo, fpc_ProcID i_id) { mStatus[i_roomNo].mProcID = i_id; }
|
||||
static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; }
|
||||
static int getStatusProcID(int i_roomNo) {
|
||||
JUT_ASSERT(2774, 0 <= i_roomNo && i_roomNo < 64);
|
||||
return mStatus[i_roomNo].mProcID;
|
||||
}
|
||||
static void setRegionNo(int i_roomNo, u8 i_regionNo) { mStatus[i_roomNo].mRegionNo = i_regionNo; }
|
||||
|
||||
u8 checkStatusFlag(int i_roomNo, u8 flag) const {
|
||||
|
||||
@@ -278,6 +278,7 @@ public:
|
||||
fopAc_ac_c();
|
||||
~fopAc_ac_c();
|
||||
|
||||
static u32 getStopStatus() { return stopStatus; }
|
||||
static void setStopStatus(u32 status) { stopStatus = status; }
|
||||
|
||||
static u32 stopStatus;
|
||||
|
||||
@@ -76,6 +76,8 @@ struct fopAcM_search4ev_prm {
|
||||
};
|
||||
|
||||
struct fopAcM_search_prm {
|
||||
fopAcM_search_prm() {};
|
||||
|
||||
/* 0x00 */ u32 prm0;
|
||||
/* 0x04 */ u32 prm1;
|
||||
/* 0x08 */ s16 procname;
|
||||
@@ -480,15 +482,14 @@ inline f32 fopAcM_searchActorDistanceY(const fopAc_ac_c* actorA, const fopAc_ac_
|
||||
return actorB->current.pos.y - actorA->current.pos.y;
|
||||
}
|
||||
|
||||
inline u16 fopAcM_GetSetId(const fopAc_ac_c* i_actor) {
|
||||
inline int fopAcM_GetSetId(const fopAc_ac_c* i_actor) {
|
||||
return i_actor->setID;
|
||||
}
|
||||
|
||||
inline void dComIfGs_onActor(int bitNo, int roomNo);
|
||||
|
||||
inline void fopAcM_onActor(const fopAc_ac_c* i_actor) {
|
||||
int setId = fopAcM_GetSetId(i_actor);
|
||||
dComIfGs_onActor(setId, fopAcM_GetHomeRoomNo(i_actor));
|
||||
dComIfGs_onActor(fopAcM_GetSetId(i_actor), fopAcM_GetHomeRoomNo(i_actor));
|
||||
}
|
||||
|
||||
inline void fopAcM_onDraw(fopAc_ac_c* i_actor) {
|
||||
@@ -781,7 +782,7 @@ inline void fopAcM_seStartCurrentLevel(const fopAc_ac_c* actor, u32 sfxID, u32 p
|
||||
dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
|
||||
}
|
||||
|
||||
inline void fopAcM_offActor(fopAc_ac_c* i_actor, u32 flag) {
|
||||
inline void fopAcM_offActor(const fopAc_ac_c* i_actor, int flag) {
|
||||
dComIfGs_offActor(flag, fopAcM_GetHomeRoomNo(i_actor));
|
||||
}
|
||||
|
||||
@@ -853,7 +854,10 @@ public:
|
||||
static cXyz* getCrossP() { return mLineCheck.GetCrossP(); }
|
||||
static cXyz& getCross() { return mLineCheck.GetCross(); }
|
||||
static bool lineCheck(const cXyz*, const cXyz*, const fopAc_ac_c*);
|
||||
static bool getTriPla(cM3dGPla* o_tri) { return dComIfG_Bgsp().GetTriPla(mLineCheck, o_tri); }
|
||||
static bool dummyCheck(cM3dGPla* i_plane);
|
||||
static bool getTriPla(cM3dGPla* i_plane) {
|
||||
return dComIfG_Bgsp().GetTriPla(mLineCheck, i_plane);
|
||||
};
|
||||
static s32 getWallCode() { return dComIfG_Bgsp().GetWallCode(mLineCheck); }
|
||||
static bool checkWallHit() {
|
||||
cM3dGPla poly;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "SSystem/SComponent/c_tag.h"
|
||||
|
||||
int fopAcTg_ActorQTo(create_tag_class* i_createTag);
|
||||
void fopAcTg_ActorQTo(create_tag_class* i_createTag);
|
||||
int fopAcTg_Init(create_tag_class* i_createTag, void* i_data);
|
||||
int fopAcTg_ToActorQ(create_tag_class* i_createTag);
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#ifndef F_F_OP_CAMERA_MNG_H_
|
||||
#define F_F_OP_CAMERA_MNG_H_
|
||||
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "d/d_camera.h"
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "d/d_camera.h"
|
||||
|
||||
typedef struct leafdraw_method_class leafdraw_method_class;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ struct kankyo_process_profile_definition {
|
||||
/* 0x24 */ leafdraw_method_class* sub_method;
|
||||
}; // Size: 0x28
|
||||
|
||||
void fopKy_IsKankyo(void* i_this);
|
||||
|
||||
extern leafdraw_method_class g_fopKy_Method;
|
||||
|
||||
#endif /* F_OP_F_OP_KANKYO_H */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef F_F_OP_SCENE_MNG_H_
|
||||
#define F_F_OP_SCENE_MNG_H_
|
||||
|
||||
#include "f_op/f_op_scene_pause.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "f_op/f_op_scene.h"
|
||||
|
||||
@@ -15,9 +16,10 @@ void fopScnM_Management();
|
||||
void fopScnM_Init();
|
||||
|
||||
inline fpc_ProcID fpcM_LayerID(const void* i_process) {
|
||||
return fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_process)->subtype) != FALSE ?
|
||||
((scene_class*)i_process)->base.layer.layer_id :
|
||||
fpcM_ERROR_PROCESS_ID_e;
|
||||
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_process)->subtype) != FALSE) {
|
||||
return ((scene_class*)i_process)->base.layer.layer_id;
|
||||
}
|
||||
return fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
|
||||
inline fpc_ProcID fopScnM_GetID(void* i_scene) {
|
||||
@@ -32,4 +34,20 @@ inline u32 fopScnM_GetParam(void* i_scene) {
|
||||
return fpcM_GetParam(i_scene);
|
||||
}
|
||||
|
||||
inline void fopScnM_SetParam(void* i_scene, u32 i_param) {
|
||||
fpcM_SetParam(i_scene, i_param);
|
||||
}
|
||||
|
||||
inline void* fopScnM_GetAppend(void* i_scene) {
|
||||
return fpcM_GetAppend(i_scene);
|
||||
}
|
||||
|
||||
inline int fopScnM_PauseEnable(scene_class* i_scene) {
|
||||
return fopScnPause_Enable(i_scene);
|
||||
}
|
||||
|
||||
inline int fopScnM_PauseDisable(scene_class* i_scene) {
|
||||
return fopScnPause_Disable(i_scene);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,6 +15,6 @@ public:
|
||||
fpc_ProcID fopScnRq_Request(int i_reqType, scene_class* i_scene, s16 i_procName, void* i_data, s16 param_5,
|
||||
u16 param_6);
|
||||
s32 fopScnRq_ReRequest(fpc_ProcID i_requestId, s16 i_procName, void* i_data);
|
||||
void fopScnRq_Handler();
|
||||
int fopScnRq_Handler();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef F_PC_MANAGER_H_
|
||||
#define F_PC_MANAGER_H_
|
||||
|
||||
#include "f_op/f_op_scene.h"
|
||||
#include "f_pc/f_pc_create_iter.h"
|
||||
#include "f_pc/f_pc_executor.h"
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
@@ -41,7 +42,7 @@ inline fpc_ProcID fpcM_Create(s16 i_procName, FastCreateReqFunc i_createFunc, vo
|
||||
i_append);
|
||||
}
|
||||
|
||||
inline s16 fpcM_DrawPriority(const void* i_process) {
|
||||
inline s32 fpcM_DrawPriority(const void* i_process) {
|
||||
return (s16)fpcLf_GetPriority((const leafdraw_class*)i_process);
|
||||
}
|
||||
|
||||
@@ -49,6 +50,10 @@ inline s32 fpcM_ChangeLayerID(void* i_process, int i_layerID) {
|
||||
return fpcPi_Change(&((base_process_class*)i_process)->priority, i_layerID, 0xFFFD, 0xFFFD);
|
||||
}
|
||||
|
||||
inline s32 fpcM_MakeOfType(int* i_type) {
|
||||
return fpcBs_MakeOfType(i_type);
|
||||
}
|
||||
|
||||
inline BOOL fpcM_IsJustType(int i_typeA, int i_typeB) {
|
||||
return fpcBs_Is_JustOfType(i_typeA, i_typeB);
|
||||
}
|
||||
@@ -85,6 +90,10 @@ inline base_process_class* fpcM_SearchByID(fpc_ProcID i_id) {
|
||||
return fpcEx_SearchByID(i_id);
|
||||
}
|
||||
|
||||
inline process_node_class* fpcM_Layer(void* i_process) {
|
||||
return ((base_process_class*)i_process)->layer_tag.layer->process_node;
|
||||
}
|
||||
|
||||
void fpcM_Draw(void* i_process);
|
||||
s32 fpcM_DrawIterater(fpcM_DrawIteraterFunc i_drawIterFunc);
|
||||
s32 fpcM_Execute(void* i_process);
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace mDoExt {
|
||||
};
|
||||
|
||||
#if DEBUG
|
||||
void DummyCheckHeap_init();
|
||||
void DummyCheckHeap_create();
|
||||
void DummyCheckHeap_destroy();
|
||||
#endif
|
||||
@@ -750,6 +751,7 @@ inline void mDoExt_bckAnmRemove(J3DModelData* i_modelData) {
|
||||
i_modelData->getJointNodePointer(0)->setMtxCalc(NULL);
|
||||
}
|
||||
|
||||
static JKRSolidHeap* mDoExt_createSolidHeap(u32 i_size, JKRHeap* i_parent, u32 i_alignment);
|
||||
JKRSolidHeap* mDoExt_createSolidHeapFromGame(u32 i_size, u32 i_alignment);
|
||||
void mDoExt_destroySolidHeap(JKRSolidHeap* i_heap);
|
||||
u32 mDoExt_adjustSolidHeap(JKRSolidHeap* i_heap);
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
extern mDoHIO_root_c mDoHIO_root;
|
||||
|
||||
void mDoHIO_updateChild(s8 i_no);
|
||||
void mDoHIO_update();
|
||||
void mDoHIO_deleteChild(s8 i_no);
|
||||
inline s8 mDoHIO_createChild(const char* i_name, JORReflexible* i_node) {
|
||||
return mDoHIO_root.createChild(i_name, i_node);
|
||||
|
||||
Reference in New Issue
Block a user