From a0c127f72c5718a7dc981eca3a61a0eb762f83bf Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 22 Feb 2022 18:12:21 -0500 Subject: [PATCH] Move region map layout to C --- .../pokenav/region_map_section_layout.bin | Bin 420 -> 0 bytes src/data/region_map/region_map_layout.h | 18 ++++++++++++++++++ src/region_map.c | 10 +--------- 3 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 graphics/pokenav/region_map_section_layout.bin create mode 100644 src/data/region_map/region_map_layout.h diff --git a/graphics/pokenav/region_map_section_layout.bin b/graphics/pokenav/region_map_section_layout.bin deleted file mode 100644 index 4700e08b63f91475446243435b6717c81f8c4bd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 420 zcmZvTSrURk3q$U$EhljjQ!a2JW2BX8-qCv!zhY~ z4D`&l3h{=EuUmnZtL`*os_XsE9mWUH)@YWfSy2>uo@d!4P17Vv;+TkCj~%KDJ7!Zw Y{k}w+rYW-R>Mt~~EX%gpy_;2?AI!h)aR2}S diff --git a/src/data/region_map/region_map_layout.h b/src/data/region_map/region_map_layout.h new file mode 100644 index 000000000..6847ffa72 --- /dev/null +++ b/src/data/region_map/region_map_layout.h @@ -0,0 +1,18 @@ +static const u8 sRegionMap_MapSectionLayout[] = +{ + 0xD5, 0x1D, 0x1D, 0x04, 0x1C, 0x1C, 0x1C, 0x1C, 0x1A, 0xD5, 0xD5, 0x22, 0x0B, 0x23, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, + 0xD5, 0x1D, 0xD5, 0xD5, 0xD5, 0xD5, 0x38, 0x38, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, + 0x1E, 0x1D, 0xD5, 0xD5, 0xD5, 0x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D5, 0xD5, 0xD5, 0xD5, +}; diff --git a/src/region_map.c b/src/region_map.c index 09e2d69bf..f1fcdf6dc 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -53,8 +53,6 @@ enum { TAG_FLY_ICON, }; -// Static type declarations - struct MultiNameFlyDest { const u8 *const *name; @@ -62,8 +60,6 @@ struct MultiNameFlyDest u16 flag; }; -// Static RAM declarations - static EWRAM_DATA struct RegionMap *gRegionMap = NULL; static EWRAM_DATA struct { @@ -78,8 +74,6 @@ static EWRAM_DATA struct { static bool32 sDrawFlyDestTextWindow; -// Static ROM declarations - static u8 ProcessRegionMapInput_Full(void); static u8 MoveRegionMapCursor_Full(void); static u8 ProcessRegionMapInput_Zoomed(void); @@ -127,8 +121,8 @@ static const u16 sRegionMapPlayerIcon_BrendanPal[] = INCBIN_U16("graphics/pokena static const u8 sRegionMapPlayerIcon_BrendanGfx[] = INCBIN_U8("graphics/pokenav/region_map/brendan_icon.4bpp"); static const u16 sRegionMapPlayerIcon_MayPal[] = INCBIN_U16("graphics/pokenav/region_map/may_icon.gbapal"); static const u8 sRegionMapPlayerIcon_MayGfx[] = INCBIN_U8("graphics/pokenav/region_map/may_icon.4bpp"); -static const u8 sRegionMap_MapSectionLayout[] = INCBIN_U8("graphics/pokenav/region_map_section_layout.bin"); +#include "data/region_map/region_map_layout.h" #include "data/region_map/region_map_entries.h" static const u16 sRegionMap_SpecialPlaceLocations[][2] = @@ -506,8 +500,6 @@ static const struct SpriteTemplate sFlyDestIconSpriteTemplate = .callback = SpriteCallbackDummy }; -// .text - void InitRegionMap(struct RegionMap *regionMap, bool8 zoomed) { InitRegionMapData(regionMap, NULL, zoomed);