diff options
author | garak <garakmon@gmail.com> | 2019-06-11 20:57:42 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-06-16 10:08:07 -0500 |
commit | aad839995f6351318e4a162767ca91d4a399dc76 (patch) | |
tree | 6f7e8350422c5d902d973599c653312652ff4ff0 /src | |
parent | 724add638c5ff1ec186bf4e1f8c36ef28b5d5550 (diff) |
label metatiles for pacifidlog and fortree bridges
Diffstat (limited to 'src')
-rw-r--r-- | src/decoration.c | 1 | ||||
-rw-r--r-- | src/field_special_scene.c | 13 | ||||
-rw-r--r-- | src/field_tasks.c | 41 |
3 files changed, 29 insertions, 26 deletions
diff --git a/src/decoration.c b/src/decoration.c index 0f6dd082b..974859c88 100644 --- a/src/decoration.c +++ b/src/decoration.c @@ -36,6 +36,7 @@ #include "constants/event_objects.h" #include "constants/songs.h" #include "constants/region_map_sections.h" +#include "constants/metatile_labels.h" #define PLACE_DECORATION_SELECTOR_TAG 0xbe5 #define PLACE_DECORATION_PLAYER_TAG 0x008 diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 59077ebbd..dbf68e1a2 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -16,6 +16,7 @@ #include "constants/event_objects.h" #include "constants/songs.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" #define SECONDS(value) ((signed) (60.0 * value + 0.5)) @@ -203,9 +204,9 @@ void Task_HandleTruckSequence(u8 taskId) data[1]++; if (data[1] == 120) { - MapGridSetMetatileIdAt(11, 8, 520); - MapGridSetMetatileIdAt(11, 9, 528); - MapGridSetMetatileIdAt(11, 10, 536); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, ExitLight_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, ExitLight_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, ExitLight_Bottom)); DrawWholeMapView(); PlaySE(SE_TRACK_DOOR); DestroyTask(taskId); @@ -217,9 +218,9 @@ void Task_HandleTruckSequence(u8 taskId) void ExecuteTruckSequence(void) { - MapGridSetMetatileIdAt(11, 8, 525); - MapGridSetMetatileIdAt(11, 9, 533); - MapGridSetMetatileIdAt(11, 10, 541); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, DoorClosedFloor_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, DoorClosedFloor_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, DoorClosedFloor_Bottom)); DrawWholeMapView(); ScriptContext2_Enable(); CpuFastFill(0, gPlttBufferFaded, 0x400); diff --git a/src/field_tasks.c b/src/field_tasks.c index 22b8697d8..dff812482 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -19,6 +19,7 @@ #include "constants/items.h" #include "constants/songs.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" struct PacifidlogMetatileOffsets { @@ -50,26 +51,26 @@ static const TaskFunc sPerStepCallbacks[] = // they are in pairs but declared as 1D array static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] = { - { 0, 0, 0x259}, { 0, 1, 0x261}, - { 0, -1, 0x259}, { 0, 0, 0x261}, - { 0, 0, 0x252}, { 1, 0, 0x253}, - { -1, 0, 0x252}, { 0, 0, 0x253} + { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)} }; static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] = { - { 0, 0, 0x25A}, { 0, 1, 0x262}, - { 0, -1, 0x25A}, { 0, 0, 0x262}, - { 0, 0, 0x254}, { 1, 0, 0x255}, - { -1, 0, 0x254}, { 0, 0, 0x255} + { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)} }; static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] = { - { 0, 0, 0x258}, { 0, 1, 0x260}, - { 0, -1, 0x258}, { 0, 0, 0x260}, - { 0, 0, 0x250}, { 1, 0, 0x251}, - { -1, 0, 0x250}, { 0, 0, 0x251} + { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}, + { 0, -1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}, + { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}, + {-1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, {0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)} }; // Each element corresponds to a y coordinate row in the sootopolis gym 1F map. @@ -374,11 +375,11 @@ static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24e: - MapGridSetMetatileIdAt(x, y, 0x24f); + case METATILE_ID(Fortree, BridgeOverGrass_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Lowered)); break; - case 0x256: - MapGridSetMetatileIdAt(x, y, 0x257); + case METATILE_ID(Fortree, BridgeOverTrees_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Lowered)); break; } } @@ -391,11 +392,11 @@ static void SetNormalFortreeBridgeMetatile(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24f: - MapGridSetMetatileIdAt(x, y, 0x24e); + case METATILE_ID(Fortree, BridgeOverGrass_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Raised)); break; - case 0x257: - MapGridSetMetatileIdAt(x, y, 0x256); + case METATILE_ID(Fortree, BridgeOverTrees_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Raised)); break; } } |