Move region map layout to C

This commit is contained in:
GriffinR 2022-02-22 18:12:21 -05:00
parent eca5233abe
commit a0c127f72c
3 changed files with 19 additions and 9 deletions

View File

@ -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, 0xD5, 0x38, 0x38, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0xD5, 0xD5, 0x39, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
0x1E, 0xD5, 0xD5, 0xD5, 0xD5, 0x03, 0x1B, 0x1B, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0x23, 0x24, 0x24, 0x24, 0x24, 0x0C, 0x0C, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0xD5, 0xD5,
0x1E, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0xD5, 0xD5, 0xD5, 0x25, 0xD5, 0xD5, 0xD5, 0x27, 0x27, 0x27, 0x27, 0x28, 0x28, 0xD5, 0xD5,
0x0A, 0x1F, 0x1F, 0x1F, 0x1F, 0xD5, 0xD5, 0xD5, 0x1A, 0xD5, 0xD5, 0x22, 0xD5, 0xD5, 0xD5, 0xD5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xD5,
0x14, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0x18, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0x3A, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
0x15, 0x15, 0x15, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0x18, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
0xD5, 0xD5, 0x02, 0x16, 0x16, 0x16, 0x17, 0x17, 0x18, 0xD5, 0xD5, 0xD5, 0x49, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5, 0xD5,
};

View File

@ -53,8 +53,6 @@ enum {
TAG_FLY_ICON, TAG_FLY_ICON,
}; };
// Static type declarations
struct MultiNameFlyDest struct MultiNameFlyDest
{ {
const u8 *const *name; const u8 *const *name;
@ -62,8 +60,6 @@ struct MultiNameFlyDest
u16 flag; u16 flag;
}; };
// Static RAM declarations
static EWRAM_DATA struct RegionMap *gRegionMap = NULL; static EWRAM_DATA struct RegionMap *gRegionMap = NULL;
static EWRAM_DATA struct { static EWRAM_DATA struct {
@ -78,8 +74,6 @@ static EWRAM_DATA struct {
static bool32 sDrawFlyDestTextWindow; static bool32 sDrawFlyDestTextWindow;
// Static ROM declarations
static u8 ProcessRegionMapInput_Full(void); static u8 ProcessRegionMapInput_Full(void);
static u8 MoveRegionMapCursor_Full(void); static u8 MoveRegionMapCursor_Full(void);
static u8 ProcessRegionMapInput_Zoomed(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 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 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 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" #include "data/region_map/region_map_entries.h"
static const u16 sRegionMap_SpecialPlaceLocations[][2] = static const u16 sRegionMap_SpecialPlaceLocations[][2] =
@ -506,8 +500,6 @@ static const struct SpriteTemplate sFlyDestIconSpriteTemplate =
.callback = SpriteCallbackDummy .callback = SpriteCallbackDummy
}; };
// .text
void InitRegionMap(struct RegionMap *regionMap, bool8 zoomed) void InitRegionMap(struct RegionMap *regionMap, bool8 zoomed)
{ {
InitRegionMapData(regionMap, NULL, zoomed); InitRegionMapData(regionMap, NULL, zoomed);