summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/region_map.s30
-rw-r--r--graphics/pokenav/brendan_icon.pal19
-rw-r--r--graphics/pokenav/brendan_icon.pngbin0 -> 239 bytes
-rw-r--r--graphics/pokenav/cursor.gbapalbin0 -> 32 bytes
-rw-r--r--graphics/pokenav/cursor.pal (renamed from graphics/unknown/unk_859f5ec.pal)0
-rw-r--r--graphics/pokenav/cursor_large.pngbin0 -> 194 bytes
-rw-r--r--graphics/pokenav/cursor_small.pngbin0 -> 168 bytes
-rw-r--r--graphics/pokenav/fly_target_icons.pal19
-rw-r--r--graphics/pokenav/fly_target_icons.pngbin0 -> 291 bytes
-rw-r--r--graphics/pokenav/map_frame.binbin0 -> 1280 bytes
-rw-r--r--graphics/pokenav/map_frame.gbapalbin0 -> 32 bytes
-rw-r--r--graphics/pokenav/map_frame.pngbin0 -> 160 bytes
-rw-r--r--graphics/pokenav/may_icon.pal19
-rw-r--r--graphics/pokenav/may_icon.pngbin0 -> 245 bytes
-rw-r--r--graphics/pokenav/region_map.pal35
-rw-r--r--graphics/pokenav/region_map.pngbin0 -> 3959 bytes
-rw-r--r--graphics/pokenav/region_map_map.binbin0 -> 4096 bytes
-rw-r--r--graphics_file_rules.mk5
-rw-r--r--ld_script.txt1
-rw-r--r--src/region_map.c56
20 files changed, 127 insertions, 57 deletions
diff --git a/data/region_map.s b/data/region_map.s
index b1e88be79..d4ea89636 100644
--- a/data/region_map.s
+++ b/data/region_map.s
@@ -4,36 +4,6 @@
.section .rodata
.align 2, 0
-gUnknown_0859F5EC:: @ 859F5EC
- .incbin "graphics/unknown/unk_859f5ec.gbapal"
-
-gUnknown_0859F60C:: @ 859F60C
- .incbin "baserom.gba", 0x59f60c, 0x44
-
-gUnknown_0859F650:: @ 859F650
- .incbin "baserom.gba", 0x59f650, 0xec
-
-gUnknown_0859F73C:: @ 859F73C
- .incbin "baserom.gba", 0x59f73c, 0x40
-
-gUnknown_0859F77C:: @ 859F77C
- .incbin "baserom.gba", 0x59f77c, 0xd64
-
-gUnknown_085A04E0:: @ 85A04E0
- .incbin "baserom.gba", 0x5a04e0, 0x34c
-
-gUnknown_085A082C:: @ 85A082C
- .incbin "baserom.gba", 0x5a082c, 0x20
-
-gUnknown_085A084C:: @ 85A084C
- .incbin "baserom.gba", 0x5a084c, 0x80
-
-gUnknown_085A08CC:: @ 85A08CC
- .incbin "baserom.gba", 0x5a08cc, 0x20
-
-gUnknown_085A08EC:: @ 85A08EC
- .incbin "baserom.gba", 0x5a08ec, 0x80
-
gUnknown_085A096C:: @ 85A096C
.incbin "baserom.gba", 0x5a096c, 0x1a4
diff --git a/graphics/pokenav/brendan_icon.pal b/graphics/pokenav/brendan_icon.pal
new file mode 100644
index 000000000..a83ed903f
--- /dev/null
+++ b/graphics/pokenav/brendan_icon.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+255 213 180
+255 197 148
+222 148 115
+123 65 65
+57 74 123
+41 57 98
+24 41 82
+16 32 57
+222 230 238
+115 205 115
+74 148 82
+255 98 90
+197 65 65
+255 255 255
+0 0 0
diff --git a/graphics/pokenav/brendan_icon.png b/graphics/pokenav/brendan_icon.png
new file mode 100644
index 000000000..19e39bb29
--- /dev/null
+++ b/graphics/pokenav/brendan_icon.png
Binary files differ
diff --git a/graphics/pokenav/cursor.gbapal b/graphics/pokenav/cursor.gbapal
new file mode 100644
index 000000000..eb55e2159
--- /dev/null
+++ b/graphics/pokenav/cursor.gbapal
Binary files differ
diff --git a/graphics/unknown/unk_859f5ec.pal b/graphics/pokenav/cursor.pal
index b35568acf..b35568acf 100644
--- a/graphics/unknown/unk_859f5ec.pal
+++ b/graphics/pokenav/cursor.pal
diff --git a/graphics/pokenav/cursor_large.png b/graphics/pokenav/cursor_large.png
new file mode 100644
index 000000000..eeda68a0e
--- /dev/null
+++ b/graphics/pokenav/cursor_large.png
Binary files differ
diff --git a/graphics/pokenav/cursor_small.png b/graphics/pokenav/cursor_small.png
new file mode 100644
index 000000000..031e7ed16
--- /dev/null
+++ b/graphics/pokenav/cursor_small.png
Binary files differ
diff --git a/graphics/pokenav/fly_target_icons.pal b/graphics/pokenav/fly_target_icons.pal
new file mode 100644
index 000000000..c0f2cc4e9
--- /dev/null
+++ b/graphics/pokenav/fly_target_icons.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 0 0
+0 0 0
+0 0 0
+205 205 205
+0 0 0
+0 0 0
+255 213 222
+255 164 197
+197 98 115
+131 131 123
+98 90 90
+49 49 65
+0 0 0
+0 0 0
+255 255 255
diff --git a/graphics/pokenav/fly_target_icons.png b/graphics/pokenav/fly_target_icons.png
new file mode 100644
index 000000000..7a997afc5
--- /dev/null
+++ b/graphics/pokenav/fly_target_icons.png
Binary files differ
diff --git a/graphics/pokenav/map_frame.bin b/graphics/pokenav/map_frame.bin
new file mode 100644
index 000000000..eb8e9ee62
--- /dev/null
+++ b/graphics/pokenav/map_frame.bin
Binary files differ
diff --git a/graphics/pokenav/map_frame.gbapal b/graphics/pokenav/map_frame.gbapal
new file mode 100644
index 000000000..6ac633fd5
--- /dev/null
+++ b/graphics/pokenav/map_frame.gbapal
Binary files differ
diff --git a/graphics/pokenav/map_frame.png b/graphics/pokenav/map_frame.png
new file mode 100644
index 000000000..f64171746
--- /dev/null
+++ b/graphics/pokenav/map_frame.png
Binary files differ
diff --git a/graphics/pokenav/may_icon.pal b/graphics/pokenav/may_icon.pal
new file mode 100644
index 000000000..2833b2613
--- /dev/null
+++ b/graphics/pokenav/may_icon.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+255 222 205
+222 164 148
+205 131 115
+123 90 82
+98 98 115
+41 57 65
+164 106 82
+74 49 57
+205 205 222
+106 213 65
+65 172 32
+255 98 90
+197 65 65
+255 255 255
+0 0 0
diff --git a/graphics/pokenav/may_icon.png b/graphics/pokenav/may_icon.png
new file mode 100644
index 000000000..5e1809fa5
--- /dev/null
+++ b/graphics/pokenav/may_icon.png
Binary files differ
diff --git a/graphics/pokenav/region_map.pal b/graphics/pokenav/region_map.pal
new file mode 100644
index 000000000..78ffc009a
--- /dev/null
+++ b/graphics/pokenav/region_map.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+156 213 255
+164 180 255
+123 180 213
+74 156 230
+41 131 230
+65 106 205
+0 115 172
+32 74 197
+0 57 139
+213 255 123
+172 238 49
+98 213 0
+57 172 8
+0 115 0
+205 205 148
+0 0 0
+255 255 255
+238 230 172
+238 230 115
+238 189 57
+246 213 82
+230 164 0
+255 172 16
+255 57 16
+246 0 0
+148 0 0
+205 205 205
+98 98 98
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/pokenav/region_map.png b/graphics/pokenav/region_map.png
new file mode 100644
index 000000000..08df6eb29
--- /dev/null
+++ b/graphics/pokenav/region_map.png
Binary files differ
diff --git a/graphics/pokenav/region_map_map.bin b/graphics/pokenav/region_map_map.bin
new file mode 100644
index 000000000..889fd6d36
--- /dev/null
+++ b/graphics/pokenav/region_map_map.bin
Binary files differ
diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk
index def35bc4e..7411d6305 100644
--- a/graphics_file_rules.mk
+++ b/graphics_file_rules.mk
@@ -4,6 +4,7 @@ monfrontdir := graphics/pokemon/anim_front_pics
monpaldir := graphics/pokemon/palettes
INTROGFXDIR := graphics/intro
interfacedir := graphics/interface
+PKNAVGFXDIR := graphics/pokenav
$(monstillfrontdir)/castform_still_front_pic.4bpp: $(monstillfrontdir)/castform_normal_form_still_front_pic.4bpp \
$(monstillfrontdir)/castform_sunny_form_still_front_pic.4bpp \
@@ -290,3 +291,7 @@ $(INTROGFXDIR)/copyright.4bpp: $(INTROGFXDIR)/copyright.png
$(interfacedir)/pkmnjump_bg.4bpp: $(interfacedir)/pkmnjump_bg.png
$(GFX) $< $@ -num_tiles 63
+
+
+$(PKNAVGFXDIR)/region_map.8bpp: $(PKNAVGFXDIR)/region_map.png
+ $(GFX) $< $@ -num_tiles 233
diff --git a/ld_script.txt b/ld_script.txt
index 72fb07406..dfa73e23b 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -411,6 +411,7 @@ SECTIONS {
src/mail.o(.rodata);
data/menu_helpers.o(.rodata);
src/heal_location.o(.rodata);
+ src/region_map.o(.rodata);
data/region_map.o(.rodata);
data/cute_sketch.o(.rodata);
src/decoration.o(.rodata);
diff --git a/src/region_map.c b/src/region_map.c
index 919b82d1a..92f902fe1 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -83,8 +83,8 @@ static void RegionMapPlayerIconSpriteCallback_Full(struct Sprite *sprite);
static void RegionMapPlayerIconSpriteCallback(struct Sprite *sprite);
static void sub_81248C0(void);
static void sub_81248D4(void);
-void sub_81248F4(void callback(void));
-void sub_8124904(void);
+static void sub_81248F4(void callback(void));
+static void sub_8124904(void);
static void sub_8124A70(void);
static void sub_8124AD4(void);
static void sub_8124BE4(void);
@@ -95,17 +95,19 @@ static void sub_8124E0C(void);
// .rodata
-extern const u8 gUnknown_0859F60C[];
-extern const u8 gUnknown_0859F650[];
-extern const u16 gUnknown_0859F73C[];
-extern const u8 gUnknown_0859F77C[];
-extern const u8 gUnknown_085A04E0[];
+static const u16 sRegionMapCursorPal[] = INCBIN_U16("graphics/pokenav/cursor.gbapal");
+static const u8 sRegionMapCursorSmallGfxLZ[] = INCBIN_U8("graphics/pokenav/cursor_small.4bpp.lz");
+static const u8 sRegionMapCursorLargeGfxLZ[] = INCBIN_U8("graphics/pokenav/cursor_large.4bpp.lz");
+static const u16 sRegionMapBkgnd_Pal[] = INCBIN_U16("graphics/pokenav/region_map.gbapal");
+static const u8 sRegionMapBkgnd_GfxLZ[] = INCBIN_U8("graphics/pokenav/region_map.8bpp.lz");
+static const u8 sRegionMapBkgnd_TilemapLZ[] = INCBIN_U8("graphics/pokenav/region_map_map.bin.lz");
+static const u16 sRegionMapPlayerIcon_BrendanPal[] = INCBIN_U16("graphics/pokenav/brendan_icon.gbapal");
+static const u8 sRegionMapPlayerIcon_BrendanGfx[] = INCBIN_U8("graphics/pokenav/brendan_icon.4bpp");
+static const u16 sRegionMapPlayerIcon_MayPal[] = INCBIN_U16("graphics/pokenav/may_icon.gbapal");
+static const u8 sRegionMapPlayerIcon_MayGfx[] = INCBIN_U8("graphics/pokenav/may_icon.4bpp");
+
extern const u8 gUnknown_085A096C[];
extern const struct RegionMapLocation gRegionMapEntries[];
-extern const u8 gUnknown_085A084C[];
-extern const u16 gUnknown_085A082C[];
-extern const u16 gUnknown_085A08CC[];
-extern const u8 gUnknown_085A08EC[];
extern const u16 gUnknown_085A1B24[][2];
extern const u16 gUnknown_085A1B84[];
extern const u16 gUnknown_085A1B8A[];
@@ -120,17 +122,17 @@ extern const u16 gUnknown_085A1C38[];
extern const u8 gUnknown_085A1C58[];
extern const u8 gUnknown_085A1C90[];
extern const u8 gUnknown_085A1D68[];
-extern const struct BgTemplate gUnknown_085A1EE4[];
-extern const struct WindowTemplate gUnknown_085A1EF0[];
+extern const u8 gUnknown_085A1E3C[][3];
extern const struct {
const u8 *const *name;
u16 mapSecId;
u16 flag;
} gUnknown_085A1EDC[];
+extern const struct BgTemplate gUnknown_085A1EE4[];
+extern const struct WindowTemplate gUnknown_085A1EF0[];
extern const struct SpritePalette gUnknown_085A1F10;
extern const u16 gUnknown_085A1F18[][2];
extern const struct SpriteTemplate gUnknown_085A1F7C;
-extern const u8 gUnknown_085A1E3C[][3];
// .text
@@ -177,11 +179,11 @@ bool8 sub_8122DB0(void)
case 0:
if (gRegionMap->bgManaged)
{
- decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, gUnknown_0859F77C, 0, 0, 0);
+ decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_GfxLZ, 0, 0, 0);
}
else
{
- LZ77UnCompVram(gUnknown_0859F77C, (u16 *)BG_CHAR_ADDR(2));
+ LZ77UnCompVram(sRegionMapBkgnd_GfxLZ, (u16 *)BG_CHAR_ADDR(2));
}
break;
case 1:
@@ -189,25 +191,25 @@ bool8 sub_8122DB0(void)
{
if (!free_temp_tile_data_buffers_if_possible())
{
- decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, gUnknown_085A04E0, 0, 0, 1);
+ decompress_and_copy_tile_data_to_vram(gRegionMap->bgNum, sRegionMapBkgnd_TilemapLZ, 0, 0, 1);
}
}
else
{
- LZ77UnCompVram(gUnknown_085A04E0, (u16 *)BG_SCREEN_ADDR(28));
+ LZ77UnCompVram(sRegionMapBkgnd_TilemapLZ, (u16 *)BG_SCREEN_ADDR(28));
}
break;
case 2:
if (!free_temp_tile_data_buffers_if_possible())
{
- LoadPalette(gUnknown_0859F73C, 0x70, 0x60);
+ LoadPalette(sRegionMapBkgnd_Pal, 0x70, 0x60);
}
break;
case 3:
- LZ77UnCompWram(gUnknown_0859F60C, gRegionMap->cursorSmallImage);
+ LZ77UnCompWram(sRegionMapCursorSmallGfxLZ, gRegionMap->cursorSmallImage);
break;
case 4:
- LZ77UnCompWram(gUnknown_0859F650, gRegionMap->cursorLargeImage);
+ LZ77UnCompWram(sRegionMapCursorLargeGfxLZ, gRegionMap->cursorLargeImage);
break;
case 5:
RegionMap_InitializeStateBasedOnPlayerLocation();
@@ -1103,8 +1105,8 @@ void sub_8124278(void)
void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag)
{
u8 spriteId;
- struct SpriteSheet sheet = {gUnknown_085A084C, 0x80, tileTag};
- struct SpritePalette palette = {gUnknown_085A082C, paletteTag};
+ struct SpriteSheet sheet = {sRegionMapPlayerIcon_BrendanGfx, 0x80, tileTag};
+ struct SpritePalette palette = {sRegionMapPlayerIcon_BrendanPal, paletteTag};
struct SpriteTemplate template = {tileTag, paletteTag, &gUnknown_085A1C20, gUnknown_085A1C30, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy};
if (sub_8124668(gMapHeader.regionMapSectionId))
@@ -1114,8 +1116,8 @@ void CreateRegionMapPlayerIcon(u16 tileTag, u16 paletteTag)
}
if (gSaveBlock2Ptr->playerGender == FEMALE)
{
- sheet.data = gUnknown_085A08EC;
- palette.data = gUnknown_085A08CC;
+ sheet.data = sRegionMapPlayerIcon_MayGfx;
+ palette.data = sRegionMapPlayerIcon_MayPal;
}
LoadSpriteSheet(&sheet);
LoadSpritePalette(&palette);
@@ -1411,13 +1413,13 @@ static void sub_81248D4(void)
do_scheduled_bg_tilemap_copies_to_vram();
}
-void sub_81248F4(void callback(void))
+static void sub_81248F4(void callback(void))
{
gUnknown_0203A148->unk_000 = callback;
gUnknown_0203A148->unk_004 = 0;
}
-void sub_8124904(void)
+static void sub_8124904(void)
{
u16 i;
bool32 flag;