summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2023-02-21 16:05:12 -0300
committerGitHub <noreply@github.com>2023-02-21 16:05:12 -0300
commit5bc388b9a9ca77457b5378619e79f64e8e762314 (patch)
tree7d7ee019ed0e8d49d95fce68ebe7a9110f8b580a /src/code
parent5941e09b220c255cd0b1208d1040151e9ea09359 (diff)
Introduce `object_table.h` (#1136)
* object_table * segmentsymbols * format * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * bss * add more descriptions to the object_table * DEFINE_OBJECT_SIZE_ZERO * Update include/tables/object_table.h Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Rename `z_scene_dlftbls.c` to `object_table.c` * bss * bss * bss * bss --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
Diffstat (limited to 'src/code')
-rw-r--r--src/code/object_table.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/code/object_table.c b/src/code/object_table.c
new file mode 100644
index 000000000..aa73199b8
--- /dev/null
+++ b/src/code/object_table.c
@@ -0,0 +1,24 @@
+#include "global.h"
+
+s16 gPlayerFormObjectIndices[PLAYER_FORM_MAX] = {
+ OBJECT_LINK_BOY, // PLAYER_FORM_FIERCE_DEITY
+ OBJECT_LINK_GORON, // PLAYER_FORM_GORON
+ OBJECT_LINK_ZORA, // PLAYER_FORM_ZORA
+ OBJECT_LINK_NUTS, // PLAYER_FORM_DEKU
+ OBJECT_LINK_CHILD, // PLAYER_FORM_HUMAN
+};
+
+ObjectId gObjectTableSize = OBJECT_ID_MAX;
+
+// Object Table definition
+#define DEFINE_OBJECT(name, _enumValue) { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) },
+#define DEFINE_OBJECT_UNSET(_enumValue) { 0, 0 },
+#define DEFINE_OBJECT_SIZE_ZERO(name, _enumValue) { SEGMENT_ROM_START(name), SEGMENT_ROM_START(name) },
+
+RomFile gObjectTable[] = {
+#include "tables/object_table.h"
+};
+
+#undef DEFINE_OBJECT
+#undef DEFINE_OBJECT_UNSET
+#undef DEFINE_OBJECT_SIZE_ZERO