Add helper macros to simplify fopAcM_ct-related version differences

This commit is contained in:
LagoLunatic
2026-05-07 16:13:55 -04:00
parent e1f5b7e23b
commit cf210f963b
47 changed files with 102 additions and 311 deletions
+12 -4
View File
@@ -12,15 +12,23 @@
#include "d/d_event.h"
// The name of this macro is official and comes from a TP debug assert: "fopAcM_ct No Call !!"
#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); \
}
// Unofficial name, kept to avoid conflicts with open PRs. TODO: Remove later.
#define fopAcM_SetupActor fopAcM_ct
#if VERSION == VERSION_DEMO
#define fopAcM_ct_Demo fopAcM_ct
#define fopAcM_ct_Retail(ptr, ClassName)
#else
#define fopAcM_ct_Demo(ptr, ClassName)
#define fopAcM_ct_Retail fopAcM_ct
#endif
class J3DModelData;
class daItem_c;