From 2280614a1467f3823aa3817026289bb2b22cfcaf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 24 Nov 2017 19:06:01 -0500 Subject: [PATCH] Start decompiling data --- data/starter_choose.s | 3 +- data/wallclock.s | 19 ++-------- graphics/wallclock/graphics_85b1f58.png | Bin 0 -> 204 bytes graphics/wallclock/palette_85b21d4.pal | 7 ++++ ld_script.txt | 1 + src/wallclock.c | 46 ++++++++++++++++++++---- 6 files changed, 51 insertions(+), 25 deletions(-) create mode 100644 graphics/wallclock/graphics_85b1f58.png create mode 100644 graphics/wallclock/palette_85b21d4.pal diff --git a/data/starter_choose.s b/data/starter_choose.s index ae81aae20..a951a8987 100644 --- a/data/starter_choose.s +++ b/data/starter_choose.s @@ -63,5 +63,4 @@ sSpriteTemplate_PokeBall:: @ 85B1F28 .incbin "baserom.gba", 0x5b1f28, 0x18 gUnknown_085B1F40:: @ 85B1F40 - .incbin "baserom.gba", 0x5b1f40, 0x294 - + .incbin "baserom.gba", 0x5b1f40, 0x18 diff --git a/data/wallclock.s b/data/wallclock.s index a66565539..1faafff63 100644 --- a/data/wallclock.s +++ b/data/wallclock.s @@ -5,23 +5,8 @@ .section .rodata -gUnknown_085B21D4:: @ 85B21D4 - .incbin "baserom.gba", 0x5b21d4, 0x8 - -gUnknown_085B21DC:: @ 85B21DC - .incbin "baserom.gba", 0x5b21dc, 0x18 - -gUnknown_085B21F4:: @ 85B21F4 - .incbin "baserom.gba", 0x5b21f4, 0x8 - -gUnknown_085B21FC:: @ 85B21FC - .incbin "baserom.gba", 0x5b21fc, 0xc - -gUnknown_085B2208:: @ 85B2208 - .incbin "baserom.gba", 0x5b2208, 0x10 - -gUnknown_085B2218:: @ 85B2218 - .incbin "baserom.gba", 0x5b2218, 0x38 +gUnknown_085B2230:: @ 85B2230 + .incbin "baserom.gba", 0x5b2230, 0x20 gUnknown_085B2250:: @ 85B2250 .incbin "baserom.gba", 0x5b2250, 0x18 diff --git a/graphics/wallclock/graphics_85b1f58.png b/graphics/wallclock/graphics_85b1f58.png new file mode 100644 index 0000000000000000000000000000000000000000..06a4ecad0030cfc9e5ae63a9a14487ac5629b54e GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^4nRDC1xPSNoVl+9q$Yd1IEF;DzP)D4bwGiK^}z-1 ziq=PSjjI2jRoxuQUf(_?Xw`-3P7hDI^YU#JnWEH?+i1>Z;m3Mm3&@NQ>JK{4WPLbl zx#D_b)j}UupiqJMip4i>JzXrp!0>?a!heTlS`9Osmt3Dvt)OGNdk%Mpp`BkApXGjo zBPwsF?z{HxZpx{%J1>;q2T~iSv>Lv*SRLNL-RmcC@#Pk=eIP45UHx3vIVCg!04^p{ AAOHXW literal 0 HcmV?d00001 diff --git a/graphics/wallclock/palette_85b21d4.pal b/graphics/wallclock/palette_85b21d4.pal new file mode 100644 index 000000000..fda317608 --- /dev/null +++ b/graphics/wallclock/palette_85b21d4.pal @@ -0,0 +1,7 @@ +JASC-PAL +0100 +4 +0 0 0 +74 180 189 +255 255 255 +0 0 0 diff --git a/ld_script.txt b/ld_script.txt index 2dd25e91a..a3c9aec3d 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -426,6 +426,7 @@ SECTIONS { src/battle_ai_script_commands.o(.rodata); data/data4.o(.rodata); data/starter_choose.o(.rodata); + src/wallclock.o(.rodata); data/wallclock.o(.rodata); data/data4c.o(.rodata); src/battle_controller_link_partner.o(.rodata); diff --git a/src/wallclock.c b/src/wallclock.c index bbf8c656a..0c283e871 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -22,11 +22,45 @@ // rodata -extern const u16 gUnknown_085B21D4[]; -extern const struct BgTemplate gUnknown_085B21FC[]; -extern const struct WindowTemplate gUnknown_085B21DC[]; -extern const struct CompressedSpriteSheet gUnknown_085B2208; -extern const struct SpritePalette gUnknown_085B2218; +const u8 gUnknown_085B1F58[] = INCBIN_U8("graphics/wallclock/graphics_85b1f58.4bpp.lz"); +const u16 gUnknown_085B21D4[] = INCBIN_U16("graphics/wallclock/palette_85b21d4.gbapal"); +const struct WindowTemplate gUnknown_085B21DC[] = { + { 0x00, 0x03, 0x11, 0x18, 0x02, 0x0e, 0x200 }, + { 0x02, 0x18, 0x10, 0x06, 0x02, 0x0c, 0x230 }, + DUMMY_WIN_TEMPLATE +}; +const struct WindowTemplate gUnknown_085B21F4 = { + 0x00, 0x18, 0x09, 0x05, 0x04, 0x0e, 0x23c +}; +const struct BgTemplate gUnknown_085B21FC[] = { + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 31, + .priority = 0 + }, + { + .bg = 2, + .charBaseIndex = 1, + .mapBaseIndex = 8, + .priority = 1 + }, + { + .bg = 3, + .charBaseIndex = 0, + .mapBaseIndex = 7, + .priority = 2 + } +}; +const struct CompressedSpriteSheet gUnknown_085B2208 = { + gUnknown_085B1F58, 0x2000, 0x1000 +}; +const u32 filler_85B2210[2] = {}; +const struct SpritePalette gUnknown_085B2218[] = { + { gUnknown_08DCC01C, 0x1000 }, + { gUnknown_08DCC03C, 0x1001 }, + {} +}; // text @@ -79,5 +113,5 @@ void LoadWallClockGraphics(void) ResetPaletteFade(); FreeAllSpritePalettes(); LoadCompressedObjectPic(&gUnknown_085B2208); - LoadSpritePalettes(&gUnknown_085B2218); + LoadSpritePalettes(gUnknown_085B2218); }