From 724add638c5ff1ec186bf4e1f8c36ef28b5d5550 Mon Sep 17 00:00:00 2001 From: garak Date: Tue, 11 Jun 2019 19:50:50 -0400 Subject: [PATCH] label regi cave metatiles --- include/constants/metatile_labels.h | 26 +++++++++++--------- src/braille_puzzles.c | 37 +++++++++++++++-------------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index dbff2d3c3..7b1b758e9 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -50,23 +50,27 @@ // gTileset_Shop #define METATILE_Shop_Laptop1_Normal 0x29D #define METATILE_Shop_Laptop2_Normal 0x2A5 -#define METATILE_Shop_Laptop1_Flash 0x258 -#define METATILE_Shop_Laptop2_Flash 0x260 +#define METATILE_Shop_Laptop1_Flash 0x258 +#define METATILE_Shop_Laptop2_Flash 0x260 // gTileset_BattleFrontier -#define METATILE_BattleFrontier_Elevator_Top0 0x329 -#define METATILE_BattleFrontier_Elevator_Top1 0x32A -#define METATILE_BattleFrontier_Elevator_Top2 0x32B - -#define METATILE_BattleFrontier_Elevator_Mid0 0x331 -#define METATILE_BattleFrontier_Elevator_Mid1 0x332 -#define METATILE_BattleFrontier_Elevator_Mid2 0x333 - +#define METATILE_BattleFrontier_Elevator_Top0 0x329 +#define METATILE_BattleFrontier_Elevator_Top1 0x32A +#define METATILE_BattleFrontier_Elevator_Top2 0x32B +#define METATILE_BattleFrontier_Elevator_Mid0 0x331 +#define METATILE_BattleFrontier_Elevator_Mid1 0x332 +#define METATILE_BattleFrontier_Elevator_Mid2 0x333 #define METATILE_BattleFrontier_Elevator_Bottom0 0x339 #define METATILE_BattleFrontier_Elevator_Bottom1 0x33A #define METATILE_BattleFrontier_Elevator_Bottom2 0x33B - +// gTileset_Cave +#define METATILE_Cave_SealedChamberEntrance_TopLeft 0x22A +#define METATILE_Cave_SealedChamberEntrance_TopMid 0x22B +#define METATILE_Cave_SealedChamberEntrance_TopRight 0x22C +#define METATILE_Cave_SealedChamberEntrance_BottomLeft 0x232 +#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233 +#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234 diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 659f8682e..c00be82ad 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -10,6 +10,7 @@ #include "constants/maps.h" #include "constants/songs.h" #include "constants/species.h" +#include "constants/metatile_labels.h" #include "fieldmap.h" #include "party_menu.h" #include "fldeff.h" @@ -86,12 +87,12 @@ bool8 ShouldDoBrailleDigEffect(void) void DoBrailleDigEffect(void) { - MapGridSetMetatileIdAt(16, 8, 0x22A); - MapGridSetMetatileIdAt(17, 8, 0x22B); - MapGridSetMetatileIdAt(18, 8, 0x22C); - MapGridSetMetatileIdAt(16, 9, 0xE32); - MapGridSetMetatileIdAt(17, 9, 0x233); - MapGridSetMetatileIdAt(18, 9, 0xE34); + MapGridSetMetatileIdAt(16, 8, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(17, 8, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(17, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -279,12 +280,12 @@ void UseRegirockHm_Callback(void) void DoBrailleRegirockEffect(void) { - MapGridSetMetatileIdAt(14, 26, 0x22A); - MapGridSetMetatileIdAt(15, 26, 0x22B); - MapGridSetMetatileIdAt(16, 26, 0x22C); - MapGridSetMetatileIdAt(14, 27, 0xE32); - MapGridSetMetatileIdAt(15, 27, 0x233); - MapGridSetMetatileIdAt(16, 27, 0xE34); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); @@ -318,12 +319,12 @@ void UseRegisteelHm_Callback(void) void DoBrailleRegisteelEffect(void) { - MapGridSetMetatileIdAt(14, 26, 0x22A); - MapGridSetMetatileIdAt(15, 26, 0x22B); - MapGridSetMetatileIdAt(16, 26, 0x22C); - MapGridSetMetatileIdAt(14, 27, 0xE32); - MapGridSetMetatileIdAt(15, 27, 0x233); - MapGridSetMetatileIdAt(16, 27, 0xE34); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED);