mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-21 21:40:32 -04:00
Merge branch 'main' into 26-02-27-allocator-isolation
This commit is contained in:
@@ -71,6 +71,8 @@ enum fopAc_Cull_e {
|
||||
fopAc_CULLBOX_14_e,
|
||||
#endif
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
fopAc_CULLBOX_MAX_e = fopAc_CULLBOX_CUSTOM_e,
|
||||
|
||||
fopAc_CULLSPHERE_0_e,
|
||||
fopAc_CULLSPHERE_1_e,
|
||||
fopAc_CULLSPHERE_2_e,
|
||||
@@ -83,6 +85,7 @@ enum fopAc_Cull_e {
|
||||
fopAc_CULLSPHERE_8_e,
|
||||
#endif
|
||||
fopAc_CULLSPHERE_CUSTOM_e,
|
||||
fopAc_CULLSPHERE_MAX_e = fopAc_CULLSPHERE_CUSTOM_e - fopAc_CULLSPHERE_0_e,
|
||||
};
|
||||
|
||||
enum fopAc_attention_type {
|
||||
@@ -199,7 +202,7 @@ public:
|
||||
BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; }
|
||||
|
||||
void suspendProc(void* actor) {
|
||||
if (field_0x10 != NULL) {
|
||||
if (field_0x10 != 0) {
|
||||
field_0x14(actor);
|
||||
}
|
||||
}
|
||||
@@ -240,9 +243,14 @@ struct cull_box {
|
||||
/* 0xC */ Vec max;
|
||||
};
|
||||
|
||||
#if __MWERKS__
|
||||
class fopAc_ac_c {
|
||||
public:
|
||||
/* 0x000 */ leafdraw_class base;
|
||||
#else
|
||||
class fopAc_ac_c : public leafdraw_class {
|
||||
public:
|
||||
#endif
|
||||
/* 0x0C0 */ int actor_type;
|
||||
/* 0x0C4 */ create_tag_class actor_tag;
|
||||
/* 0x0D8 */ create_tag_class draw_tag;
|
||||
@@ -285,8 +293,16 @@ public:
|
||||
/* 0x566 */ s8 field_0x566;
|
||||
/* 0x567 */ s8 field_0x567;
|
||||
|
||||
#if !__MWERKS__
|
||||
s8 actor_last_base_field;
|
||||
#endif
|
||||
|
||||
fopAc_ac_c();
|
||||
#if !__MWERKS__
|
||||
~fopAc_ac_c() override;
|
||||
#else
|
||||
~fopAc_ac_c();
|
||||
#endif
|
||||
|
||||
static u32 getStopStatus() { return stopStatus; }
|
||||
static void setStopStatus(u32 status) { stopStatus = status; }
|
||||
|
||||
@@ -11,12 +11,32 @@
|
||||
#include "f_op/f_op_draw_tag.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "dusk/endian_ssystem.h"
|
||||
|
||||
#if !__MWERKS__
|
||||
// Modern compilers will zero the parent struct in default constructors.
|
||||
// So instead of adding default constructors to everything,
|
||||
// we'll just save & restore that data.
|
||||
#define fopAcM_ct_placement_copy_length offsetof(fopAc_ac_c, actor_last_base_field) - offsetof(fopAc_ac_c, type)
|
||||
|
||||
#define fopAcM_ct_placement(ptr, ClassName) \
|
||||
fopAc_ac_c copy; \
|
||||
memcpy(©.type, &(ptr)->type, fopAcM_ct_placement_copy_length); \
|
||||
JKR_NEW_ARGS (ptr) ClassName() ; \
|
||||
memcpy(&(ptr)->type, ©.type, fopAcM_ct_placement_copy_length);
|
||||
#else
|
||||
#define fopAcM_ct_placement(ptr, ClassName) new (ptr) ClassName()
|
||||
#endif
|
||||
|
||||
#define fopAcM_ct(ptr, ClassName) \
|
||||
if ((ptr)->layer_tag.layer == NULL) { OSPanic(__FILE__, __LINE__, "UH OH"); } \
|
||||
if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \
|
||||
JKR_NEW_ARGS (ptr) ClassName(); \
|
||||
fopAcM_ct_placement(ptr, ClassName); \
|
||||
fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \
|
||||
}
|
||||
} \
|
||||
if ((ptr)->layer_tag.layer == NULL) { OSPanic(__FILE__, __LINE__, "Oh come on"); }
|
||||
|
||||
|
||||
#define fopAcM_RegisterDeleteID(i_this, actor_name_str) \
|
||||
("Delete -> " actor_name_str "(id=%d)\n", fopAcM_GetID(i_this))
|
||||
@@ -48,10 +68,10 @@ extern int HeapAdjustMargin;
|
||||
} // namespace fopAcM
|
||||
|
||||
struct fopAcM_prmBase_class {
|
||||
/* 0x00 */ u32 parameters;
|
||||
/* 0x04 */ cXyz position;
|
||||
/* 0x10 */ csXyz angle;
|
||||
/* 0x16 */ u16 setID;
|
||||
/* 0x00 */ BE(u32) parameters;
|
||||
/* 0x04 */ BE(cXyz) position;
|
||||
/* 0x10 */ BE(csXyz) angle;
|
||||
/* 0x16 */ BE(u16) setID;
|
||||
}; // Size: 0x18
|
||||
|
||||
struct fopAcM_prmScale_class {
|
||||
@@ -422,7 +442,14 @@ inline BOOL fopAcM_CULLSIZE_IS_BOX(int i_culltype) {
|
||||
i_culltype == fopAc_CULLBOX_CUSTOM_e;
|
||||
}
|
||||
|
||||
inline const cXyz& fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
|
||||
inline
|
||||
#ifdef __MWERKS__
|
||||
// In the original code, this constructs a temporary and returns a reference to it
|
||||
const cXyz&
|
||||
#else
|
||||
const Vec&
|
||||
#endif
|
||||
fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
|
||||
return i_actor->cull.sphere.center;
|
||||
}
|
||||
|
||||
@@ -839,6 +866,9 @@ BOOL fopAcM_getNameString(const fopAc_ac_c*, char*);
|
||||
|
||||
inline void fopAcM_SetStatusMap(fopAc_ac_c*, u32) {}
|
||||
|
||||
extern cull_box l_cullSizeBox[fopAc_CULLBOX_MAX_e];
|
||||
extern cull_sphere l_cullSizeSphere[fopAc_CULLSPHERE_MAX_e];
|
||||
|
||||
class fopAcM_lc_c {
|
||||
public:
|
||||
fopAcM_lc_c() { mLineCheck.ClrSttsRoofOff(); }
|
||||
|
||||
@@ -19,7 +19,7 @@ struct kankyo_process_profile_definition {
|
||||
/* 0x24 */ leafdraw_method_class* sub_method;
|
||||
}; // Size: 0x28
|
||||
|
||||
void fopKy_IsKankyo(void* i_this);
|
||||
BOOL fopKy_IsKankyo(void* i_this);
|
||||
|
||||
extern leafdraw_method_class g_fopKy_Method;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ base_process_class* fopKyM_fastCreate(s16 i_procName, int i_param, cXyz* i_pos,
|
||||
fopKyM_CreateFunc i_createFunc);
|
||||
fpc_ProcID fopKyM_createWpillar(cXyz const* i_pos, f32 scale, int i_param);
|
||||
fpc_ProcID fopKyM_createMpillar(cXyz const* i_pos, f32 i_size);
|
||||
BOOL fopKyM_IsKy(void* i_process);
|
||||
|
||||
inline fopKyM_prm_class* fopKyM_GetAppend(void* i_process) {
|
||||
return (fopKyM_prm_class*)fpcM_GetAppend(i_process);
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
#include "f_op/f_op_scene_pause.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "f_op/f_op_scene.h"
|
||||
#include <cstdint>
|
||||
|
||||
typedef struct base_process_class base_process_class;
|
||||
|
||||
scene_class* fopScnM_SearchByID(fpc_ProcID id);
|
||||
int fopScnM_ChangeReq(scene_class* i_scene, s16 i_procName, s16 param_3, u16 param_4);
|
||||
fpc_ProcID fopScnM_DeleteReq(scene_class* i_scene);
|
||||
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, u32 i_data);
|
||||
u32 fopScnM_ReRequest(s16 i_procName, u32 i_data);
|
||||
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, uintptr_t i_data);
|
||||
u32 fopScnM_ReRequest(s16 i_procName, uintptr_t i_data);
|
||||
void fopScnM_Management();
|
||||
void fopScnM_Init();
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define F_F_OP_SCENE_TAG_H_
|
||||
|
||||
#include "f_pc/f_pc_node.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
class scene_tag_class {
|
||||
public:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define F_F_OP_VIEW_H_
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include <dolphin/mtx.h>
|
||||
#include <mtx.h>
|
||||
#include "f_pc/f_pc_leaf.h"
|
||||
|
||||
struct view_process_profile_definition {
|
||||
|
||||
Reference in New Issue
Block a user