summaryrefslogtreecommitdiff
path: root/src/code/m_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/m_object.c')
-rw-r--r--src/code/m_object.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/code/m_object.c b/src/code/m_object.c
new file mode 100644
index 0000000..4e0b120
--- /dev/null
+++ b/src/code/m_object.c
@@ -0,0 +1,22 @@
+#include "m_object.h"
+#include "segment_symbols.h"
+
+// Segment declarations (also used in the table below)
+#define DEFINE_OBJECT(name, _enumValue) DECLARE_ROM_SEGMENT(name);
+#define DEFINE_OBJECT_UNSET(_enumValue)
+
+#include "tables/object_table.h"
+
+#undef DEFINE_OBJECT
+#undef DEFINE_OBJECT_UNSET
+
+// Object Table definition
+#define DEFINE_OBJECT(name, _enumValue) { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) },
+#define DEFINE_OBJECT_UNSET(_enumValue) { 0, 0 },
+
+ObjectOverlay gObjectTable[OBJECT_ID_MAX] = {
+#include "tables/object_table.h"
+};
+
+#undef DEFINE_OBJECT
+#undef DEFINE_OBJECT_UNSET