summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pso/TMainTask.cpp17
-rw-r--r--src/pso/TObject.cpp9
2 files changed, 24 insertions, 2 deletions
diff --git a/src/pso/TMainTask.cpp b/src/pso/TMainTask.cpp
index 9403ed4..6a8c2bd 100644
--- a/src/pso/TMainTask.cpp
+++ b/src/pso/TMainTask.cpp
@@ -1,6 +1,13 @@
+#include "pso/THeap.h"
#include "pso/TMainTask.h"
#include "pso/TObject.h"
+static const int tl_object_count = 20;
+
+#define o(var, name) TObject *var;
+TL_OBJECTS
+#undef o
+
u32 some_main_task_flag = 1;
u32 main_task_flags;
u32 old_main_task_flags;
@@ -45,6 +52,16 @@ TMainTask::~TMainTask() {
this->delete_children();
}
+void TMainTask::init_main_task() {
+ obj_heap = new THeap(0x7a000, 16);
+ alt_heap = new THeap(0x17000, 16);
+ #define o(var, dummy) \
+ var = new TObject(this); \
+ var->name = var##_name;
+ TL_OBJECTS
+ #undef o
+}
+
TMainTask::TMainTask() : TObject(NULL) {
name = TMainTask_name;
task_flags = 0;
diff --git a/src/pso/TObject.cpp b/src/pso/TObject.cpp
index 4a57d0b..976214d 100644
--- a/src/pso/TObject.cpp
+++ b/src/pso/TObject.cpp
@@ -6,8 +6,13 @@ TMainTask main_task;
TObject global_obj1;
TObject global_obj2;
-OBJECT_NAME(TObject)
-OBJECT_NAME(TMainTask)
+#define o(name) OBJECT_NAME(name)
+OBJECT_NAMES
+#undef o
+
+#define o(var, name) const char *var##_name = #name;
+TL_OBJECTS
+#undef o
void debug_print(const char *fmt) {