summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-09-25 15:57:15 -0400
committerGitHub <noreply@github.com>2025-09-25 12:57:15 -0700
commitdbf6abeb90ee70aeec18695f7eb589a0977ddb56 (patch)
tree2d5b78cf6535a71b679cc7abec6d2d6d5faf1e82 /include
parent27507a603098d4cb88db0f6ec10b47336c092b2c (diff)
Use composition instead of inheritance for most f_op classes (#2700)
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JKernel/JKRThread.h2
-rw-r--r--include/c/c_damagereaction.h2
-rw-r--r--include/f_op/f_op_actor.h3
-rw-r--r--include/f_op/f_op_actor_mng.h2
-rw-r--r--include/f_op/f_op_kankyo.h4
-rw-r--r--include/f_op/f_op_msg.h4
-rw-r--r--include/f_op/f_op_overlap.h4
-rw-r--r--include/f_op/f_op_view.h3
8 files changed, 13 insertions, 11 deletions
diff --git a/include/JSystem/JKernel/JKRThread.h b/include/JSystem/JKernel/JKRThread.h
index 83f837b585..f3e2d1b6ba 100644
--- a/include/JSystem/JKernel/JKRThread.h
+++ b/include/JSystem/JKernel/JKRThread.h
@@ -20,7 +20,7 @@ class JUTConsole;
* @ingroup jsystem-jkernel
*
*/
-class JKRThread : JKRDisposer {
+class JKRThread : public JKRDisposer {
public:
class TLoad {
public:
diff --git a/include/c/c_damagereaction.h b/include/c/c_damagereaction.h
index 2098851d53..a773b17482 100644
--- a/include/c/c_damagereaction.h
+++ b/include/c/c_damagereaction.h
@@ -3,7 +3,7 @@
#include "JSystem/JParticle/JPAParticle.h"
-class JPTraceParticleCallBack4 : JPAParticleCallBack {
+class JPTraceParticleCallBack4 : public JPAParticleCallBack {
public:
/* 8001817C */ void execute(JPABaseEmitter*, JPABaseParticle*);
/* 800182A4 */ void draw(JPABaseEmitter*, JPABaseParticle*);
diff --git a/include/f_op/f_op_actor.h b/include/f_op/f_op_actor.h
index af2c40084f..b165667006 100644
--- a/include/f_op/f_op_actor.h
+++ b/include/f_op/f_op_actor.h
@@ -233,8 +233,9 @@ struct cull_box {
/* 0xC */ Vec max;
};
-class fopAc_ac_c : public leafdraw_class {
+class fopAc_ac_c {
public:
+ /* 0x000 */ leafdraw_class base;
/* 0x0C0 */ int actor_type;
/* 0x0C4 */ create_tag_class actor_tag;
/* 0x0D8 */ create_tag_class draw_tag;
diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h
index 8a55b6fcda..96f97c0645 100644
--- a/include/f_op/f_op_actor_mng.h
+++ b/include/f_op/f_op_actor_mng.h
@@ -91,7 +91,7 @@ struct fOpAcm_HIO_entry_c : public mDoHIO_entry_c {
#ifdef DEBUG
void removeHIO(const fopAc_ac_c* i_this) { removeHIO(*i_this); }
- void removeHIO(const fopAc_ac_c& i_this) { removeHIO(static_cast<const leafdraw_class&>(i_this)); }
+ void removeHIO(const fopAc_ac_c& i_this) { removeHIO(i_this.base); }
void removeHIO(const leafdraw_class& i_this) { removeHIO(i_this.base); }
void removeHIO(const base_process_class& i_this) { removeHIO(i_this.state); }
void removeHIO(const state_class& state) {
diff --git a/include/f_op/f_op_kankyo.h b/include/f_op/f_op_kankyo.h
index 6870fbc64e..4d7dd8e6aa 100644
--- a/include/f_op/f_op_kankyo.h
+++ b/include/f_op/f_op_kankyo.h
@@ -4,8 +4,8 @@
#include "SSystem/SComponent/c_xyz.h"
#include "f_pc/f_pc_leaf.h"
-class kankyo_class : public leafdraw_class {
-public:
+struct kankyo_class {
+ /* 0x00 */ leafdraw_class base;
/* 0xC0 */ int type;
/* 0xC4 */ create_tag_class draw_tag;
/* 0xD8 */ leafdraw_method_class* sub_method;
diff --git a/include/f_op/f_op_msg.h b/include/f_op/f_op_msg.h
index 31a2928e10..53fc419f62 100644
--- a/include/f_op/f_op_msg.h
+++ b/include/f_op/f_op_msg.h
@@ -22,8 +22,8 @@ enum fopMsg_Mode_e {
class fopAc_ac_c;
-class msg_class : public leafdraw_class {
-public:
+struct msg_class {
+ /* 0x00 */ leafdraw_class base;
/* 0xC0 */ int type;
/* 0xC4 */ create_tag_class draw_tag;
/* 0xD8 */ leafdraw_method_class* sub_method;
diff --git a/include/f_op/f_op_overlap.h b/include/f_op/f_op_overlap.h
index fedd794867..c639ff38e0 100644
--- a/include/f_op/f_op_overlap.h
+++ b/include/f_op/f_op_overlap.h
@@ -4,8 +4,8 @@
#include "f_pc/f_pc_leaf.h"
#include "SSystem/SComponent/c_request.h"
-class overlap_task_class : public leafdraw_class {
-public:
+struct overlap_task_class {
+ /* 0x00 */ leafdraw_class base;
/* 0xC0 */ leafdraw_method_class* submethod;
/* 0xC4 */ request_base_class request;
/* 0xC8 */ fpc_ProcID scene_id;
diff --git a/include/f_op/f_op_view.h b/include/f_op/f_op_view.h
index 8a12ac2e06..e9a95de8ee 100644
--- a/include/f_op/f_op_view.h
+++ b/include/f_op/f_op_view.h
@@ -39,7 +39,8 @@ struct view_port_class {
/* 0x18 */ scissor_class scissor;
};
-struct view_class : public leafdraw_class {
+struct view_class {
+ /* 0x000 */ leafdraw_class base;
/* 0x0C0 */ leafdraw_method_class* sub_method;
/* 0x0C4 */ u8 field_0xc4;
/* 0x0C8 */ f32 near;