diff options
author | scnorton <scnorton@biociphers.org> | 2017-07-11 10:14:35 -0400 |
---|---|---|
committer | scnorton <scnorton@biociphers.org> | 2017-07-11 10:14:35 -0400 |
commit | febcb77f067c6a69290b216953887489a3259093 (patch) | |
tree | d6b2669d0dbe918b0bd9d0b3d7df6b97d57d65ed | |
parent | a0e590b739a2bdd8e76c004ae60662bd81d33ca9 (diff) |
Decompile secret base data
-rw-r--r-- | data/secret_base.s | 77 | ||||
-rw-r--r--[-rwxr-xr-x] | include/battle.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/decoration.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/graphics.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/menu.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/menu_helpers.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokeblock.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokemon.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/pokenav.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/region_map.h | 0 | ||||
-rw-r--r-- | include/secret_base.h | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | include/strings.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/use_pokeblock.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | include/vars.h | 0 | ||||
-rw-r--r-- | ld_script.txt | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | src/decoration.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/field_specials.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/field_tasks.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/pokeblock.c | 0 | ||||
-rw-r--r-- | src/secret_base.c | 93 | ||||
-rw-r--r--[-rwxr-xr-x] | src/sound_check_menu.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | src/use_pokeblock.c | 0 |
22 files changed, 85 insertions, 89 deletions
diff --git a/data/secret_base.s b/data/secret_base.s deleted file mode 100644 index 59ded8ddf..000000000 --- a/data/secret_base.s +++ /dev/null @@ -1,77 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 1 -gUnknown_083D1358:: @ 83D1358 - .2byte 0x26, 0x36 - .2byte 0x27, 0x37 - .2byte 0x1A0, 0x1A1 - .2byte 0x1A8, 0x1A9 - .2byte 0x1B0, 0x1B1 - .2byte 0x208, 0x210 - .2byte 0x271, 0x278 - -gUnknown_083D1374:: @ 83D1374 - .byte 0, 0 - .byte 1, 3 - .byte 6, 0 - .byte 5, 9 - .byte 12, 0 - .byte 1, 3 - .byte 18, 0 - .byte 7, 13 - .byte 1, 0 - .byte 2, 3 - .byte 7, 0 - .byte 9, 2 - .byte 13, 0 - .byte 13, 4 - .byte 19, 0 - .byte 1, 2 - .byte 2, 0 - .byte 1, 3 - .byte 8, 0 - .byte 1, 2 - .byte 14, 0 - .byte 3, 15 - .byte 20, 0 - .byte 3, 14 - .byte 3, 0 - .byte 9, 3 - .byte 9, 0 - .byte 8, 7 - .byte 15, 0 - .byte 3, 6 - .byte 21, 0 - .byte 5, 9 - .byte 4, 0 - .byte 2, 3 - .byte 10, 0 - .byte 5, 6 - .byte 16, 0 - .byte 15, 3 - .byte 22, 0 - .byte 4, 10 - .byte 5, 0 - .byte 3, 3 - .byte 11, 0 - .byte 1, 2 - .byte 17, 0 - .byte 7, 8 - .byte 23, 0 - .byte 9, 6 - - .align 2 -gUnknown_083D13D4:: @ 83D13D4 - .4byte SecretBaseText_DelRegist, sub_80BCA84 - .4byte gUnknownText_Exit, sub_80BCBF8 - - .align 2 -gUnknown_083D13E4:: @ 83D13E4 - .4byte sub_80BCB90 - .4byte sub_80BCBC0 - -gUnknown_083D13EC:: @ 83D13EC - .byte 0x23,0x24,0xF,0x1F,0x21,0x2F,0xE,0x14,0x20,0x22,0x0,0x0 diff --git a/include/battle.h b/include/battle.h index d4cb53689..d4cb53689 100755..100644 --- a/include/battle.h +++ b/include/battle.h diff --git a/include/decoration.h b/include/decoration.h index 7a6d8ef5a..7a6d8ef5a 100755..100644 --- a/include/decoration.h +++ b/include/decoration.h diff --git a/include/graphics.h b/include/graphics.h index 36b11fd0a..36b11fd0a 100755..100644 --- a/include/graphics.h +++ b/include/graphics.h diff --git a/include/menu.h b/include/menu.h index 9b48ab79b..9b48ab79b 100755..100644 --- a/include/menu.h +++ b/include/menu.h diff --git a/include/menu_helpers.h b/include/menu_helpers.h index 1df5053e7..1df5053e7 100755..100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h diff --git a/include/pokeblock.h b/include/pokeblock.h index 0d8e965e4..0d8e965e4 100755..100644 --- a/include/pokeblock.h +++ b/include/pokeblock.h diff --git a/include/pokemon.h b/include/pokemon.h index c69fb87e0..c69fb87e0 100755..100644 --- a/include/pokemon.h +++ b/include/pokemon.h diff --git a/include/pokenav.h b/include/pokenav.h index 70cc4135f..70cc4135f 100755..100644 --- a/include/pokenav.h +++ b/include/pokenav.h diff --git a/include/region_map.h b/include/region_map.h index 6dfa4dcf0..6dfa4dcf0 100755..100644 --- a/include/region_map.h +++ b/include/region_map.h diff --git a/include/secret_base.h b/include/secret_base.h index 3ea75ce27..6c9f2a632 100644 --- a/include/secret_base.h +++ b/include/secret_base.h @@ -5,7 +5,7 @@ void ResetSecretBases(void); void sub_80BB970(struct MapEvents *); u8 sub_80BBB24(void); void sub_80BBCCC(u8); -void sub_80BC038(); +void sub_80BC038(s16 *, struct MapEvents *); u8 sub_80BC050(); void sub_80BC300(); const u8 sub_80BCCA4(u8); diff --git a/include/strings.h b/include/strings.h index 89a78e478..89a78e478 100755..100644 --- a/include/strings.h +++ b/include/strings.h diff --git a/include/use_pokeblock.h b/include/use_pokeblock.h index 978476d89..978476d89 100755..100644 --- a/include/use_pokeblock.h +++ b/include/use_pokeblock.h diff --git a/include/vars.h b/include/vars.h index e08f344d4..e08f344d4 100755..100644 --- a/include/vars.h +++ b/include/vars.h diff --git a/ld_script.txt b/ld_script.txt index a51f50947..9ddfdf3dc 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -410,7 +410,7 @@ SECTIONS { data/contest_effect.o(.rodata); data/record_mixing.o(.rodata); src/sound_check_menu.o(.rodata); - data/secret_base.o(.rodata); + src/secret_base.o(.rodata); data/tv.o(.rodata); data/contest_link_80C2020.o(.rodata); src/pokemon_size_record.o(.rodata); diff --git a/src/decoration.c b/src/decoration.c index e829cb072..e829cb072 100755..100644 --- a/src/decoration.c +++ b/src/decoration.c diff --git a/src/field_specials.c b/src/field_specials.c index 2b505bbfe..2b505bbfe 100755..100644 --- a/src/field_specials.c +++ b/src/field_specials.c diff --git a/src/field_tasks.c b/src/field_tasks.c index caf2ce6b9..caf2ce6b9 100755..100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c diff --git a/src/pokeblock.c b/src/pokeblock.c index b7fa5daa8..b7fa5daa8 100755..100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c diff --git a/src/secret_base.c b/src/secret_base.c index d88d2c66a..2923d770d 100644 --- a/src/secret_base.c +++ b/src/secret_base.c @@ -22,20 +22,93 @@ #include "text.h" #include "vars.h" -extern u8 gUnknown_020387DC; -extern u16 gSpecialVar_0x8004; -extern u16 gSpecialVar_0x8005; -extern u16 gSpecialVar_0x8006; -extern u16 gSpecialVar_0x8007; -extern u16 gScriptResult; -extern const struct +u8 sub_80BCA84(); +u8 sub_80BCBF8(); +void sub_80BCB90(u8); +void sub_80BCBC0(u8); + +const struct { u16 unk_083D1358_0; u16 unk_083D1358_1; -} gUnknown_083D1358[7]; -extern const u8 gUnknown_083D1374[4 * 16]; +} gUnknown_083D1358[] = { + {0x26, 0x36}, + {0x27, 0x37}, + {0x1a0, 0x1a1}, + {0x1a8, 0x1a9}, + {0x1b0, 0x1b1}, + {0x208, 0x210}, + {0x271, 0x278} +}; + +extern u8 gUnknown_020387DC; + +const u8 gUnknown_083D1374[] = { + MAP_ID_SECRET_BASE_RED_CAVE1, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 3, + MAP_ID_SECRET_BASE_RED_CAVE2, 0, + MAP_ID_SECRET_BASE_SHRUB1, 9, + MAP_ID_SECRET_BASE_RED_CAVE3, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 3, + MAP_ID_SECRET_BASE_RED_CAVE4, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE2, 13, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 0, + MAP_ID_SECRET_BASE_BLUE_CAVE1, 3, + MAP_ID_SECRET_BASE_BROWN_CAVE2, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, 2, + MAP_ID_SECRET_BASE_BROWN_CAVE3, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE3, 4, + MAP_ID_SECRET_BASE_BROWN_CAVE4, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 2, + MAP_ID_SECRET_BASE_BLUE_CAVE1, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 3, + MAP_ID_SECRET_BASE_BLUE_CAVE2, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 2, + MAP_ID_SECRET_BASE_BLUE_CAVE3, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 15, + MAP_ID_SECRET_BASE_BLUE_CAVE4, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 14, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, 3, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, 0, + MAP_ID_SECRET_BASE_BLUE_CAVE2, 7, + MAP_ID_SECRET_BASE_YELLOW_CAVE3, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 6, + MAP_ID_SECRET_BASE_YELLOW_CAVE4, 0, + MAP_ID_SECRET_BASE_SHRUB1, 9, + MAP_ID_SECRET_BASE_TREE1, 0, + MAP_ID_SECRET_BASE_BLUE_CAVE1, 3, + MAP_ID_SECRET_BASE_TREE2, 0, + MAP_ID_SECRET_BASE_SHRUB1, 6, + MAP_ID_SECRET_BASE_TREE3, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE3, 3, + MAP_ID_SECRET_BASE_TREE4, 0, + MAP_ID_SECRET_BASE_TREE1, 10, + MAP_ID_SECRET_BASE_SHRUB1, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, 3, + MAP_ID_SECRET_BASE_SHRUB2, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE1, 2, + MAP_ID_SECRET_BASE_SHRUB3, 0, + MAP_ID_SECRET_BASE_BROWN_CAVE2, 8, + MAP_ID_SECRET_BASE_SHRUB4, 0, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, 6 +}; + +const struct MenuAction gUnknown_083D13D4[] = { + {SecretBaseText_DelRegist, sub_80BCA84}, + {gUnknownText_Exit, sub_80BCBF8} +}; + +void (*const gUnknown_083D13E4[])(u8) = { + sub_80BCB90, + sub_80BCBC0 +}; + +const u8 gUnknown_083D13EC[] = { + 0x23,0x24,0xF,0x1F,0x21,0x2F,0xE,0x14,0x20,0x22,0x0,0x0 +}; + extern void *gUnknown_0300485C; -extern const u8 gUnknown_083D13EC[12]; extern u8 gUnknown_081A2E14[]; diff --git a/src/sound_check_menu.c b/src/sound_check_menu.c index 13a6f6f3e..13a6f6f3e 100755..100644 --- a/src/sound_check_menu.c +++ b/src/sound_check_menu.c diff --git a/src/use_pokeblock.c b/src/use_pokeblock.c index ce83bc1c2..ce83bc1c2 100755..100644 --- a/src/use_pokeblock.c +++ b/src/use_pokeblock.c |