diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-27 23:21:09 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-27 23:21:09 -0400 |
commit | a5951592be1495e8ac32830d091a36d9eb9eefcf (patch) | |
tree | eeb2127e2b0f1cf94776b651f69176f86a859e64 | |
parent | 4c274f60305c0daaaa126ae08fc1f4b731a74101 (diff) |
Decompile data
-rw-r--r-- | data/secret_base.s | 26 | ||||
-rw-r--r-- | include/strings.h | 1 | ||||
-rw-r--r-- | ld_script.txt | 2 | ||||
-rw-r--r-- | src/secret_base.c | 78 |
4 files changed, 71 insertions, 36 deletions
diff --git a/data/secret_base.s b/data/secret_base.s deleted file mode 100644 index 3dd2d808f..000000000 --- a/data/secret_base.s +++ /dev/null @@ -1,26 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -gUnknown_0858CFCC:: @ 858CFCC - .incbin "baserom.gba", 0x58cfcc, 0x1c - -gUnknown_0858CFE8:: @ 858CFE8 - .incbin "baserom.gba", 0x58cfe8, 0x60 - -gUnknown_0858D048:: @ 858D048 - .incbin "baserom.gba", 0x58d048, 0x10 - -gUnknown_0858D058:: @ 858D058 - .incbin "baserom.gba", 0x58d058, 0x8 - -gUnknown_0858D060:: @ 858D060 - .incbin "baserom.gba", 0x58d060, 0xc - -gUnknown_0858D06C:: @ 858D06C - .incbin "baserom.gba", 0x58d06c, 0x10 - -gUnknown_0858D07C:: @ 858D07C - .incbin "baserom.gba", 0x58d07c, 0x18 diff --git a/include/strings.h b/include/strings.h index 190ee7b45..fcdb1eca4 100644 --- a/include/strings.h +++ b/include/strings.h @@ -74,5 +74,6 @@ extern const u8 gText_ApostropheSBase[]; extern const u8 gText_NoRegistry[]; extern const u8 gText_OkayToDeleteFromRegistry[]; extern const u8 gText_RegisteredDataDeleted[]; +extern const u8 gUnknown_085EA79D[]; #endif //GUARD_STRINGS_H diff --git a/ld_script.txt b/ld_script.txt index 08b3cbe98..9cbbb17e0 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -394,7 +394,7 @@ SECTIONS { src/money.o(.rodata); data/contest_effect.o(.rodata); data/record_mixing.o(.rodata); - data/secret_base.o(.rodata); + src/secret_base.o(.rodata); src/tv.o(.rodata); data/contest_link_80F57C4.o(.rodata); data/script_pokemon_util_80F87D8.o(.rodata); diff --git a/src/secret_base.c b/src/secret_base.c index c8214f189..22d675ec7 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -61,29 +61,89 @@ EWRAM_DATA struct SecretBaseListMenuBuffer *gUnknown_0203A020 = NULL; void sub_80E9C9C(u8 taskId); void game_continue(u8 taskId); +void sub_80E9DEC(u32 a0, bool8 flag, struct ListMenu *menu); void sub_80E9E00(u8 taskId); void sub_80E9E44(u8 taskId); void sub_80E9E90(u8 taskId); void sub_80E9F20(u8 taskId); void sub_80E9FB0(u8 taskId); +void sub_80E9FFC(u8 taskId); void sub_80EA06C(u8 taskId); +void sub_80EA120(u8 taskId); +void sub_80EA13C(u8 taskId); void sub_80EA18C(u8 taskId); void task_pc_turn_off(u8 taskId); u8 sub_80EA20C(u8 sbId); // .rodata -extern const struct { +const struct { u16 tile1; u16 tile2; -} gUnknown_0858CFCC[7]; +} gUnknown_0858CFCC[] = { + {0x0026, 0x0036}, + {0x0027, 0x0037}, + {0x01a0, 0x01a1}, + {0x01a8, 0x01a9}, + {0x01b0, 0x01b1}, + {0x0208, 0x0210}, + {0x0271, 0x0278} +}; + +const u8 gUnknown_0858CFE8[] = { + MAP_ID_SECRET_BASE_RED_CAVE1, 0x00, 0x01, 0x03, + MAP_ID_SECRET_BASE_RED_CAVE2, 0x00, 0x05, 0x09, + MAP_ID_SECRET_BASE_RED_CAVE3, 0x00, 0x01, 0x03, + MAP_ID_SECRET_BASE_RED_CAVE4, 0x00, 0x07, 0x0d, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 0x00, 0x02, 0x03, + MAP_ID_SECRET_BASE_BROWN_CAVE2, 0x00, 0x09, 0x02, + MAP_ID_SECRET_BASE_BROWN_CAVE3, 0x00, 0x0d, 0x04, + MAP_ID_SECRET_BASE_BROWN_CAVE4, 0x00, 0x01, 0x02, + MAP_ID_SECRET_BASE_BLUE_CAVE1, 0x00, 0x01, 0x03, + MAP_ID_SECRET_BASE_BLUE_CAVE2, 0x00, 0x01, 0x02, + MAP_ID_SECRET_BASE_BLUE_CAVE3, 0x00, 0x03, 0x0f, + MAP_ID_SECRET_BASE_BLUE_CAVE4, 0x00, 0x03, 0x0e, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 0x00, 0x09, 0x03, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, 0x00, 0x08, 0x07, + MAP_ID_SECRET_BASE_YELLOW_CAVE3, 0x00, 0x03, 0x06, + MAP_ID_SECRET_BASE_YELLOW_CAVE4, 0x00, 0x05, 0x09, + MAP_ID_SECRET_BASE_TREE1, 0x00, 0x02, 0x03, + MAP_ID_SECRET_BASE_TREE2, 0x00, 0x05, 0x06, + MAP_ID_SECRET_BASE_TREE3, 0x00, 0x0f, 0x03, + MAP_ID_SECRET_BASE_TREE4, 0x00, 0x04, 0x0a, + MAP_ID_SECRET_BASE_SHRUB1, 0x00, 0x03, 0x03, + MAP_ID_SECRET_BASE_SHRUB2, 0x00, 0x01, 0x02, + MAP_ID_SECRET_BASE_SHRUB3, 0x00, 0x07, 0x08, + MAP_ID_SECRET_BASE_SHRUB4, 0x00, 0x09, 0x06 +}; + +const struct MenuAction gUnknown_0858D048[] = { + {gUnknown_085EA79D, {.void_u8 = sub_80E9FFC}}, + {gText_Cancel, {.void_u8 = sub_80EA18C}} +}; + +const struct YesNoFuncTable gUnknown_0858D058 = { + sub_80EA120, sub_80EA13C +}; + +const u8 gUnknown_0858D060[10] = { + 0x23, 0x24, 0x0f, 0x1f, 0x21, + 0x2f, 0x0e, 0x14, 0x20, 0x22 +}; -extern const u8 gUnknown_0858CFE8[]; -extern const u8 gUnknown_0858D060[]; -extern const struct WindowTemplate gUnknown_0858D06C[]; -extern const struct ListMenuTemplate gUnknown_0858D07C; -extern const struct MenuAction gUnknown_0858D048[]; -extern const struct YesNoFuncTable gUnknown_0858D058; +const struct WindowTemplate gUnknown_0858D06C[] = { + { 0, 18, 1, 11, 18, 15, 0x01 }, + { 0, 2, 1, 28, 4, 15, 0xc7 } +}; + +const struct ListMenuTemplate gUnknown_0858D07C = { + NULL, + sub_80E9DEC, + NULL, + 0, 0, + 0, 0, 8, 0, + 9, 2, 1, 3, FALSE, 0, FALSE, 1 +}; // .text @@ -1046,7 +1106,7 @@ void game_continue(u8 taskId) gUnknown_03006310.unk_0e = data[3]; } -void sub_80E9DEC(u32 unused, bool8 flag) +void sub_80E9DEC(u32 a0, bool8 flag, struct ListMenu *menu) { if (flag != TRUE) { |