summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgarak <garakmon@gmail.com>2019-07-19 22:06:42 -0400
committergarak <garakmon@gmail.com>2019-07-19 22:06:42 -0400
commitf9a9297d4f1d60da027817aad89478a39907dafb (patch)
tree54261f90e7d7dde876e0a8c9a9ac075b107018c8
parentf6d55db5354d98e1da7f9d4fb9eceeb7ad73c284 (diff)
decompile pokenav 7/8 data
-rw-r--r--data/pokenav.s106
-rw-r--r--ld_script.txt2
-rwxr-xr-xsrc/pokenav_unk_5.c12
-rw-r--r--src/pokenav_unk_7.c103
-rw-r--r--src/pokenav_unk_8.c78
5 files changed, 189 insertions, 112 deletions
diff --git a/data/pokenav.s b/data/pokenav.s
index 10f36b389..62e645d94 100644
--- a/data/pokenav.s
+++ b/data/pokenav.s
@@ -3,112 +3,6 @@
.section .rodata
-// pokenav_unk_5.s
-
-
-
-
-
-
-
-
-// pokenav_unk_6.s
-// <none>
-
-// pokenav_unk_7.s
-gUnknown_086231E8:: @ 86231E8
- .incbin "graphics/pokenav/86231E8.gbapal"
-
-gUnknown_08623208:: @ 8623208
- .incbin "graphics/pokenav/8623208.gbapal"
-
-gUnknown_08623228:: @ 8623228
- .incbin "graphics/pokenav/8623228.4bpp.lz"
-
-gUnknown_0862323C:: @ 862323C
- .incbin "graphics/pokenav/862323C.bin.lz"
-
-gUnknown_08623338:: @ 8623338
- .incbin "graphics/pokenav/8623338.gbapal"
-
-gUnknown_08623358:: @ 8623358
- .4byte 0x11F5
- .4byte 0x21DE
- .4byte 0x31EB
-
-gUnknown_08623364:: @ 8623364
- window_template 1, 13, 1, 13, 4, 15, 2
-
-gUnknown_0862336C:: @ 862336C
- window_template 1, 1, 6, 7, 2, 15, 0x36
-
-gUnknown_08623374:: @ 8623374
- window_template 1, 1, 0x1C, 5, 2, 15, 0x44
-
-gUnknown_0862337C:: @ 862337C
- window_template 1, 13, 0x1C, 3, 2, 15, 0x44
-
-// pokenav_unk_8.s
-gUnknown_08623384:: @ 8623384
- .4byte NULL
- .4byte sub_81CE37C
- .4byte sub_81CE2D0
- .4byte sub_81CE4D8
- .4byte sub_81CE5E4
- .4byte sub_81CE6BC
- .4byte sub_81CE700
-
-gUnknown_086233A0:: @ 86233A0
- .4byte 0x16, 0x17, 0x18, 0x21, 0x2F
-
-gUnknown_086233B4:: @ 86233B4
- .4byte sub_81CF134
- .4byte sub_81CF1C4
- .4byte sub_81CF1D8
- .4byte sub_81CF278
-
-gUnknown_086233C4:: @ 86233C4
- .incbin "graphics/pokenav/condition_search2.gbapal"
-
-gUnknown_086233E4:: @ 86233E4
- .incbin "graphics/pokenav/condition_search2.4bpp.lz"
-
-gUnknown_086234AC:: @ 86234AC
- .incbin "graphics/pokenav/condition_search2.bin.lz"
-
-gUnknown_08623570:: @ 8623570
- .incbin "graphics/pokenav/8623570.gbapal"
-
-gUnknown_08623590:: @ 8623590
- .4byte 0x2065
-
-gUnknown_08623594:: @ 8623594
- .4byte 0x307A
-
-gUnknown_08623598:: @ 8623598
- .4byte NULL
- .4byte sub_81CF578
- .4byte sub_81CF5F0
- .4byte sub_81CF668
- .4byte sub_81CF6E0
- .4byte sub_81CF758
- .4byte sub_81CF798
-
-gUnknown_086235B4:: @ 86235B4
- window_template 1, 1, 6, 7, 2, 1, 20
-
-gUnknown_086235BC:: @ 86235BC
- .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$"
- .align 2
-
-gUnknown_086235C8:: @ 86235C8
- .string "{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}$"
- .align 2
-
-gUnknown_086235D4:: @ 86235D4
- .string "{UNK_SPACER}$"
- .align 2
-
// pokenav_unk_9.s
gUnknown_086235D8:: @ 86235D8
.4byte sub_81CFB8C
diff --git a/ld_script.txt b/ld_script.txt
index 2474b471b..d58843162 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -647,6 +647,8 @@ SECTIONS {
src/pokenav_unk_3.o(.rodata);
src/pokenav_unk_4.o(.rodata);
src/pokenav_unk_5.o(.rodata);
+ src/pokenav_unk_7.o(.rodata);
+ src/pokenav_unk_8.o(.rodata);
data/pokenav.o(.rodata);
src/pokenav_unk_10.o(.rodata);
src/pokenav_match_call_data.o(.rodata);
diff --git a/src/pokenav_unk_5.c b/src/pokenav_unk_5.c
index 6a235df9e..edcd495e8 100755
--- a/src/pokenav_unk_5.c
+++ b/src/pokenav_unk_5.c
@@ -131,12 +131,12 @@ const struct SpritePalette gUnknown_08623100[] =
const struct WindowTemplate gUnknown_08623110 =
{
.bg = 1,
- .tilemapLeft 17,
- .tilemapTop 4,
- .width 12,
- .height 13,
- .paletteNum 1,
- .baseBlock 0x4C
+ .tilemapLeft = 17,
+ .tilemapTop = 4,
+ .width = 12,
+ .height = 13,
+ .paletteNum = 1,
+ .baseBlock = 0x4C
};
#include "data/region_map/city_map_entries.h"
diff --git a/src/pokenav_unk_7.c b/src/pokenav_unk_7.c
new file mode 100644
index 000000000..0c31551fc
--- /dev/null
+++ b/src/pokenav_unk_7.c
@@ -0,0 +1,103 @@
+#include "global.h"
+#include "bg.h"
+#include "window.h"
+#include "pokenav.h"
+
+u32 sub_81CE37C(int);
+u32 sub_81CE2D0(int);
+u32 sub_81CE4D8(int);
+u32 sub_81CE5E4(int);
+u32 sub_81CE6BC(int);
+u32 sub_81CE700(int);
+
+const u16 gUnknown_086231E8[] = INCBIN_U16("graphics/pokenav/86231E8.gbapal");
+const u16 gUnknown_08623208[] = INCBIN_U16("graphics/pokenav/8623208.gbapal");
+const u32 gUnknown_08623228[] = INCBIN_U32("graphics/pokenav/8623228.4bpp.lz");
+const u32 gUnknown_0862323C[] = INCBIN_U32("graphics/pokenav/862323C.bin.lz");
+const u16 gUnknown_08623338[] = INCBIN_U16("graphics/pokenav/8623338.gbapal");
+
+const struct BgTemplate gUnknown_08623358[3] =
+{
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x1F,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 0x1D,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x1E,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+const struct WindowTemplate gUnknown_08623364 =
+{
+ .bg = 1,
+ .tilemapLeft = 13,
+ .tilemapTop = 1,
+ .width = 13,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 2
+};
+
+const struct WindowTemplate gUnknown_0862336C =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 6,
+ .width = 7,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x36
+};
+
+const struct WindowTemplate gUnknown_08623374 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 0x1C,
+ .width = 5,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x44
+};
+
+const struct WindowTemplate gUnknown_0862337C =
+{
+ .bg = 1,
+ .tilemapLeft = 13,
+ .tilemapTop = 0x1C,
+ .width = 3,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 0x44
+};
+
+const LoopedTask gUnknown_08623384[] =
+{
+ NULL,
+ sub_81CE37C,
+ sub_81CE2D0,
+ sub_81CE4D8,
+ sub_81CE5E4,
+ sub_81CE6BC,
+ sub_81CE700
+};
diff --git a/src/pokenav_unk_8.c b/src/pokenav_unk_8.c
new file mode 100644
index 000000000..8d72c1af0
--- /dev/null
+++ b/src/pokenav_unk_8.c
@@ -0,0 +1,78 @@
+#include "global.h"
+#include "pokenav.h"
+#include "bg.h"
+#include "window.h"
+
+u32 sub_81CF134(void);
+u32 sub_81CF1C4(void);
+u32 sub_81CF1D8(void);
+u32 sub_81CF278(void);
+u32 sub_81CF578(int);
+u32 sub_81CF5F0(int);
+u32 sub_81CF668(int);
+u32 sub_81CF6E0(int);
+u32 sub_81CF758(int);
+u32 sub_81CF798(int);
+
+const u32 gUnknown_086233A0[] = {0x16, 0x17, 0x18, 0x21, 0x2F};
+
+u32 (*const gUnknown_086233B4[])(void) =
+{
+ sub_81CF134,
+ sub_81CF1C4,
+ sub_81CF1D8,
+ sub_81CF278
+};
+
+const u16 gUnknown_086233C4[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal");
+const u32 gUnknown_086233E4[] = INCBIN_U32("graphics/pokenav/condition_search2.4bpp.lz");
+const u32 gUnknown_086234AC[] = INCBIN_U32("graphics/pokenav/condition_search2.bin.lz");
+const u16 gUnknown_08623570[] = INCBIN_U16("graphics/pokenav/8623570.gbapal");
+
+const struct BgTemplate gUnknown_08623590 =
+{
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 0x06,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+};
+
+const struct BgTemplate gUnknown_08623594 =
+{
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 0x07,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+};
+
+const LoopedTask gUnknown_08623598[] =
+{
+ NULL,
+ sub_81CF578,
+ sub_81CF5F0,
+ sub_81CF668,
+ sub_81CF6E0,
+ sub_81CF758,
+ sub_81CF798
+};
+
+const struct WindowTemplate gUnknown_086235B4 =
+{
+ .bg = 1,
+ .tilemapLeft = 1,
+ .tilemapTop = 6,
+ .width = 7,
+ .height = 2,
+ .paletteNum = 1,
+ .baseBlock = 20
+};
+
+const u8 gUnknown_086235BC[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_RED}{WHITE}{GREEN}♂{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086235C8[] = _("{COLOR_HIGHLIGHT_SHADOW}{LIGHT_GREEN}{WHITE}{BLUE}♀{COLOR_HIGHLIGHT_SHADOW}{DARK_GREY}{WHITE}{LIGHT_GREY}");
+const u8 gUnknown_086235D4[] = _("{UNK_SPACER}");