fopAcM_Register cleanup (#3047)

* use macro `fopAcM_Register` more consistently

* replace fopAcM_RegisterCreateID with version that doesn't create `a_this`
This commit is contained in:
roeming
2026-01-17 08:52:32 -05:00
committed by GitHub
parent 740387eb4f
commit d45b10d0fd
101 changed files with 184 additions and 200 deletions
+12 -15
View File
@@ -12,26 +12,23 @@
#include "f_pc/f_pc_manager.h"
#include "m_Do/m_Do_hostIO.h"
#define fopAcM_ct(ptr, ClassName) \
if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \
new (ptr) ClassName(); \
fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \
#define fopAcM_ct(ptr, ClassName) \
if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \
new (ptr) ClassName(); \
fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \
}
#define fopAcM_RegisterDeleteID(i_this, actor_name_str) \
const fpc_ProcID procID = fopAcM_GetID(i_this); \
"Delete -> " actor_name_str "(id=%d)\n"
#define fopAcM_RegisterDeleteID(i_this, actor_name_str) \
("Delete -> " actor_name_str "(id=%d)\n", fopAcM_GetID(i_this))
#define fopAcM_RegisterCreateID(actor_class, i_this, actor_name_str) \
actor_class* a_this = static_cast<actor_class*>(i_this); \
const fpc_ProcID procID = fopAcM_GetID(i_this); \
"Create -> " actor_name_str "(id=%d)\n"
#define fopAcM_RegisterCreateID(i_this, actor_name_str) \
("Create -> " actor_name_str "(id=%d)\n", fopAcM_GetID(i_this))
#define fopAcM_RegisterDelete(i_this, actor_name_str) "Delete -> " actor_name_str "\n"
#define fopAcM_RegisterDelete(i_this, actor_name_str) \
("Delete -> " actor_name_str "\n")
#define fopAcM_RegisterCreate(actor_class, i_this, actor_name_str) \
static_cast<actor_class*>(i_this); \
"Create -> " actor_name_str "\n"
#define fopAcM_RegisterCreate(i_this, actor_name_str) \
("Create -> " actor_name_str "\n")
class J3DModelData; // placeholder
class JKRHeap;