diff options
| author | Roman971 <32455037+Roman971@users.noreply.github.com> | 2022-06-06 21:51:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-06 15:51:03 -0400 |
| commit | 6f0b8f1e7483524cc967536c50cb02e431d534c9 (patch) | |
| tree | 484bb84233b5efbaf4c4b7b480887d382cce6778 /src/code | |
| parent | b0bfa9eb692636663d3871a5d0731750ab6dab55 (diff) | |
Changes to support renaming segments in the spec (#1259)
* Allow dmadata to have names different from the original table
Added an argument to the dma define which is used to match debug strings in z_std_dma.c
* Update kaleido manager to support different overlay names
* Update the actor table to support different actor names
Added an argument to the define which is used to match debug strings in z_actor_dlftbls.c
* PR suggestions for argument descriptions
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor_dlftbls.c | 29 | ||||
| -rw-r--r-- | src/code/z_kaleido_manager.c | 8 |
2 files changed, 19 insertions, 18 deletions
diff --git a/src/code/z_actor_dlftbls.c b/src/code/z_actor_dlftbls.c index bb70385d9..331e900af 100644 --- a/src/code/z_actor_dlftbls.c +++ b/src/code/z_actor_dlftbls.c @@ -1,8 +1,8 @@ #include "global.h" // Linker symbol declarations (used in the table below) -#define DEFINE_ACTOR(name, _1, _2) DECLARE_OVERLAY_SEGMENT(name) -#define DEFINE_ACTOR_INTERNAL(_0, _1, _2) +#define DEFINE_ACTOR(name, _1, _2, _3) DECLARE_OVERLAY_SEGMENT(name) +#define DEFINE_ACTOR_INTERNAL(_0, _1, _2, _3) #define DEFINE_ACTOR_UNSET(_0) #include "tables/actor_table.h" @@ -12,8 +12,8 @@ #undef DEFINE_ACTOR_UNSET // Init Vars declarations (also used in the table below) -#define DEFINE_ACTOR(name, _1, _2) extern ActorInit name##_InitVars; -#define DEFINE_ACTOR_INTERNAL(name, _1, _2) extern ActorInit name##_InitVars; +#define DEFINE_ACTOR(name, _1, _2, _3) extern ActorInit name##_InitVars; +#define DEFINE_ACTOR_INTERNAL(name, _1, _2, _3) extern ActorInit name##_InitVars; #define DEFINE_ACTOR_UNSET(_0) #include "tables/actor_table.h" @@ -23,18 +23,19 @@ #undef DEFINE_ACTOR_UNSET // Actor Overlay Table definition -#define DEFINE_ACTOR(name, _1, allocType) \ - { (u32)_ovl_##name##SegmentRomStart, \ - (u32)_ovl_##name##SegmentRomEnd, \ - _ovl_##name##SegmentStart, \ - _ovl_##name##SegmentEnd, \ - NULL, \ - &name##_InitVars, \ - #name, \ - allocType, \ +#define DEFINE_ACTOR(name, _1, allocType, nameString) \ + { (u32)_ovl_##name##SegmentRomStart, \ + (u32)_ovl_##name##SegmentRomEnd, \ + _ovl_##name##SegmentStart, \ + _ovl_##name##SegmentEnd, \ + NULL, \ + &name##_InitVars, \ + nameString, \ + allocType, \ 0 }, -#define DEFINE_ACTOR_INTERNAL(name, _1, allocType) { 0, 0, NULL, NULL, NULL, &name##_InitVars, #name, allocType, 0 }, +#define DEFINE_ACTOR_INTERNAL(name, _1, allocType, nameString) \ + { 0, 0, NULL, NULL, NULL, &name##_InitVars, nameString, allocType, 0 }, #define DEFINE_ACTOR_UNSET(_0) { 0 }, diff --git a/src/code/z_kaleido_manager.c b/src/code/z_kaleido_manager.c index 1c988043d..6da1c4833 100644 --- a/src/code/z_kaleido_manager.c +++ b/src/code/z_kaleido_manager.c @@ -1,15 +1,15 @@ #include "global.h" #include "vt.h" -#define KALEIDO_OVERLAY(name) \ +#define KALEIDO_OVERLAY(name, nameString) \ { \ NULL, (u32)_ovl_##name##SegmentRomStart, (u32)_ovl_##name##SegmentRomEnd, _ovl_##name##SegmentStart, \ - _ovl_##name##SegmentEnd, 0, #name, \ + _ovl_##name##SegmentEnd, 0, nameString, \ } KaleidoMgrOverlay gKaleidoMgrOverlayTable[] = { - KALEIDO_OVERLAY(kaleido_scope), - KALEIDO_OVERLAY(player_actor), + KALEIDO_OVERLAY(kaleido_scope, "kaleido_scope"), + KALEIDO_OVERLAY(player_actor, "player_actor"), }; void* sKaleidoAreaPtr = NULL; |
