summaryrefslogtreecommitdiff
path: root/include/pso
diff options
context:
space:
mode:
Diffstat (limited to 'include/pso')
-rw-r--r--include/pso/TMainTask.h2
-rw-r--r--include/pso/TObject.h5
-rw-r--r--include/pso/macros.h5
3 files changed, 7 insertions, 5 deletions
diff --git a/include/pso/TMainTask.h b/include/pso/TMainTask.h
index b719e94..6a4944d 100644
--- a/include/pso/TMainTask.h
+++ b/include/pso/TMainTask.h
@@ -5,8 +5,6 @@
#include "pso/macros.h"
#include "pso/TObject.h"
-OBJECT_NAME(TMainTask)
-
class TMainTask : public TObject {
public:
u32 task_flags;
diff --git a/include/pso/TObject.h b/include/pso/TObject.h
index bf23b56..1594d33 100644
--- a/include/pso/TObject.h
+++ b/include/pso/TObject.h
@@ -5,8 +5,9 @@
#include "pso/macros.h"
#include <global_types.h>
-
-OBJECT_NAME(TObject)
+#define o(name) extern const char *name##_name;
+OBJECT_NAMES
+#undef o
extern TMainTask main_task;
extern TObject global_obj1;
diff --git a/include/pso/macros.h b/include/pso/macros.h
index 1a75d53..b98028f 100644
--- a/include/pso/macros.h
+++ b/include/pso/macros.h
@@ -1,7 +1,10 @@
#ifndef MACROS_H
#define MACROS_H
-#define OBJECT_NAME(name) static const char *name##_name = #name;
+#define OBJECT_NAME(name) const char *name##_name = #name;
+#define OBJECT_NAMES \
+ o(TObject) \
+ o(TMainTask)
#define FOREACH_NODE(type, first, varname) for (type *varname = (type *)(first); varname != NULL; varname = (type *)(varname->next))
#define FOREACH_NODE_NODECL(type, first, varname) for (varname = (type *)(first); varname != NULL; varname = (type *)(varname->next))