diff --git a/data/unk_81BAD84.s b/data/unk_81BAD84.s deleted file mode 100644 index de88365ac..000000000 --- a/data/unk_81BAD84.s +++ /dev/null @@ -1,7 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_08617128:: @ 8617128 - .incbin "baserom.gba", 0x617128, 0x48 diff --git a/include/graphics.h b/include/graphics.h index c50fdef3f..4c5a0952b 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -91,5 +91,23 @@ extern const u8 gUnknown_08DB9F08[]; extern const u8 gUnknown_08DB9FFC[]; extern const u8 gUnknown_08DBA020[]; extern const u8 gUnknown_08DBA12C[]; +extern const u8 gUnknown_08DD87C0[]; +extern const u8 gUnknown_08DD8EE0[]; +extern const u16 gUnknown_08DD8780[]; +extern const u8 gUnknown_08DD90E0[]; +extern const u8 gUnknown_08DD9718[]; +extern const u16 gUnknown_08DD9080[]; +extern const u8 gUnknown_08DD98B4[]; +extern const u8 gUnknown_08DD9E58[]; +extern const u16 gUnknown_08DD9874[]; +extern const u8 gUnknown_08DDA02C[]; +extern const u8 gUnknown_08DDA63C[]; +extern const u16 gUnknown_08DD9FEC[]; +extern const u8 gUnknown_08DDA840[]; +extern const u8 gUnknown_08DDAE40[]; +extern const u16 gUnknown_08DDA800[]; +extern const u8 gUnknown_08DDB020[]; +extern const u8 gUnknown_08DDB2C4[]; +extern const u16 gUnknown_08DDAFE0[]; #endif //GUARD_GRAPHICS_H diff --git a/ld_script.txt b/ld_script.txt index 76125e9e2..ee423ccf3 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -472,7 +472,7 @@ SECTIONS { data/party_menu.o(.rodata); data/battle_tent.o(.rodata); src/unk_text_util_2.o(.rodata); - data/unk_81BAD84.o(.rodata); + src/unk_81BAD84.o(.rodata); src/battle_controller_player_partner.o(.rodata); data/fossil_special_fldeff_groundshake.o(.rodata); src/berry_fix_program.o(.rodata); diff --git a/src/unk_81BAD84.c b/src/unk_81BAD84.c index 43cb9a4b0..9ba98dd87 100644 --- a/src/unk_81BAD84.c +++ b/src/unk_81BAD84.c @@ -1,10 +1,37 @@ #include "global.h" +#include "graphics.h" -extern const struct { - const u8 *unk_0; - const u8 *unk_4; - const u8 *unk_8; -} gUnknown_08617128[]; +const struct { + const u8 *gfx; + const u8 *tileMap; + const u16 *pltt; +} gUnknown_08617128[] = { + { + gUnknown_08DD87C0, + gUnknown_08DD8EE0, + gUnknown_08DD8780 + }, { + gUnknown_08DD90E0, + gUnknown_08DD9718, + gUnknown_08DD9080 + }, { + gUnknown_08DD98B4, + gUnknown_08DD9E58, + gUnknown_08DD9874 + }, { + gUnknown_08DDA02C, + gUnknown_08DDA63C, + gUnknown_08DD9FEC + }, { + gUnknown_08DDA840, + gUnknown_08DDAE40, + gUnknown_08DDA800 + }, { + gUnknown_08DDB020, + gUnknown_08DDB2C4, + gUnknown_08DDAFE0 + } +}; void sub_81BAD84(u32 idx) { @@ -12,9 +39,9 @@ void sub_81BAD84(u32 idx) REG_BG0HOFS = 0x0000; REG_BG0VOFS = 0x0000; REG_BLDCNT = 0x0000; - LZ77UnCompVram(gUnknown_08617128[idx].unk_0, (void *)BG_CHAR_ADDR(0)); - LZ77UnCompVram(gUnknown_08617128[idx].unk_4, (void *)BG_SCREEN_ADDR(31)); - CpuCopy16(gUnknown_08617128[idx].unk_8, (void *)PLTT, 0x200); + LZ77UnCompVram(gUnknown_08617128[idx].gfx, (void *)BG_CHAR_ADDR(0)); + LZ77UnCompVram(gUnknown_08617128[idx].tileMap, (void *)BG_SCREEN_ADDR(31)); + CpuCopy16(gUnknown_08617128[idx].pltt, (void *)PLTT, 0x200); REG_BG0CNT = 0x1f00; REG_DISPCNT = DISPCNT_BG0_ON; }