From 8982501b7860b97cd659262cbb14f375ca07b54a Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sun, 1 Oct 2017 13:03:51 -0500 Subject: [PATCH] Extract baseroms from reset_rtc_screen --- asm/reset_rtc_screen.s | 4 +- data/reset_rtc_screen.s | 75 +++++++++++++++--- graphics/misc/reset_rtc_screen_arrow.pal | 7 ++ graphics/misc/reset_rtc_screen_downarrow.png | Bin 0 -> 113 bytes graphics/misc/reset_rtc_screen_rightarrow.png | Bin 0 -> 110 bytes 5 files changed, 74 insertions(+), 12 deletions(-) create mode 100644 graphics/misc/reset_rtc_screen_arrow.pal create mode 100644 graphics/misc/reset_rtc_screen_downarrow.png create mode 100644 graphics/misc/reset_rtc_screen_rightarrow.png diff --git a/asm/reset_rtc_screen.s b/asm/reset_rtc_screen.s index ac2c1181c..1f5ef83d8 100644 --- a/asm/reset_rtc_screen.s +++ b/asm/reset_rtc_screen.s @@ -291,7 +291,7 @@ sub_809EB04: @ 809EB04 lsrs r5, 24 ldr r0, =gUnknown_085104C4 bl LoadSpritePalette - ldr r0, =gUnknown_085104F0 + ldr r0, =gSpriteTemplate_85104F0 mov r8, r0 movs r1, 0x35 movs r2, 0x44 @@ -655,7 +655,7 @@ sub_809EDE8: @ 809EDE8 lsls r0, r4, 1 adds r0, r4 lsls r0, 2 - ldr r1, =gUnknown_0851041C + ldr r1, =gUnknown_08510420 - 0x4 adds r2, r0, r1 ldr r1, =gMain ldrh r3, [r1, 0x2E] diff --git a/data/reset_rtc_screen.s b/data/reset_rtc_screen.s index 2ed5f746c..f08f30e90 100644 --- a/data/reset_rtc_screen.s +++ b/data/reset_rtc_screen.s @@ -4,20 +4,75 @@ .section .rodata .align 2, 0 -gUnknown_08510404:: @ 8510404 - .incbin "baserom.gba", 0x510404, 0x4 +gUnknown_08510404:: @ 8510404 struct BgTemplate + .4byte 0x000001f0 + .align 2 gUnknown_08510408:: @ 8510408 - .incbin "baserom.gba", 0x510408, 0x14 - -gUnknown_0851041C:: @ 851041C - .incbin "baserom.gba", 0x51041c, 0x4 + window_template 0x00, 0x01, 0x01, 0x13, 0x09, 0x0f, 0x0155 + window_template 0x00, 0x02, 0x0f, 0x1b, 0x04, 0x0f, 0x00e9 + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .align 2 gUnknown_08510420:: @ 8510420 - .incbin "baserom.gba", 0x510420, 0xa4 + window_template 0x00, 0x04, 0x09, 0x15, 0x02, 0x0f, 0x00bf + .align 2 +gUnknown_08510428:: @ 8510428 + .byte 3, 0, 1, 0, 15, 39, 0, 2, 0, 0, 0, 0 + .byte 4, 0, 0, 0, 23, 0, 1, 3, 0, 0, 0, 0 + .byte 5, 0, 0, 0, 59, 0, 2, 4, 0, 0, 0, 0 + .byte 6, 0, 0, 0, 59, 0, 3, 5, 0, 0, 0, 0 + .byte 7, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0 + + .align 2 +gOamData_08510464:: @ 8510464 + .2byte 0x0000 + .2byte 0x0000 + .2byte 0x0000 + + .align 2 +gResetRtcScreen_DownArrowGfx:: @ 851046C + .incbin "graphics/misc/reset_rtc_screen_downarrow.4bpp" + + .align 2 +gResetRtcScreen_RightArrowGfx:: @ 851048C + .incbin "graphics/misc/reset_rtc_screen_rightarrow.4bpp" + + .align 2 +gResetRtcScreen_ArrowPal: @ 85104AC + .incbin "graphics/misc/reset_rtc_screen_arrow.gbapal" + + .align 2 +gSpriteImageTable_85104B4:: @ 85104B4 + obj_frame_tiles gResetRtcScreen_DownArrowGfx, 0x20 + obj_frame_tiles gResetRtcScreen_RightArrowGfx, 0x20 + + .align 2 gUnknown_085104C4:: @ 85104C4 - .incbin "baserom.gba", 0x5104c4, 0x2c + obj_pal gResetRtcScreen_ArrowPal, 0x1000 -gUnknown_085104F0:: @ 85104F0 - .incbin "baserom.gba", 0x5104f0, 0x18 + .align 2 +gSpriteAnim_85104CC:: @ 85104CC + obj_image_anim_frame 0, 30 + obj_image_anim_jump 0 + + .align 2 +gSpriteAnim_85104D4: @ 85104D4 + obj_image_anim_frame 0, 30, OBJ_IMAGE_ANIM_V_FLIP + obj_image_anim_jump 0 + + .align 2 +gSpriteAnim_85104DC:: @ 85104DC + obj_image_anim_frame 1, 30 + obj_image_anim_jump 0 + + .align 2 +gSpriteAnimTable_85104E4:: @ 85104E4 + .4byte gSpriteAnim_85104CC + .4byte gSpriteAnim_85104D4 + .4byte gSpriteAnim_85104DC + + .align 2 +gSpriteTemplate_85104F0:: @ 85104F0 + spr_template 0xFFFF, 0x1000, gOamData_08510464, gSpriteAnimTable_85104E4, gSpriteImageTable_85104B4, gDummySpriteAffineAnimTable, SpriteCallbackDummy diff --git a/graphics/misc/reset_rtc_screen_arrow.pal b/graphics/misc/reset_rtc_screen_arrow.pal new file mode 100644 index 000000000..b2e8a5f5f --- /dev/null +++ b/graphics/misc/reset_rtc_screen_arrow.pal @@ -0,0 +1,7 @@ +JASC-PAL +0100 +4 +0 0 0 +255 0 0 +74 74 74 +0 0 0 diff --git a/graphics/misc/reset_rtc_screen_downarrow.png b/graphics/misc/reset_rtc_screen_downarrow.png new file mode 100644 index 0000000000000000000000000000000000000000..8f7b3480df00af52e7149aa8ef9b4ca2ba479ee0 GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U4JOMr-u0Z-f1A~{B7m#7n|0)eg zDR{a#hH%VGPGDeERaIqWb9Hn~Y4Qx<&{({JL1l)71cN>glSHED?G&I|22WQ%mvv4F FO#o!r7S;d& literal 0 HcmV?d00001 diff --git a/graphics/misc/reset_rtc_screen_rightarrow.png b/graphics/misc/reset_rtc_screen_rightarrow.png new file mode 100644 index 0000000000000000000000000000000000000000..785b3c1dbb2823a98039961d8e40149a43330881 GIT binary patch literal 110 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U4JOMr-u0Z-f1A~{B7m#7n|0)eg z$$GjthH%VGPGDeEQ)N|9)L>C!5p`%0=uu^v$jTrs%{bA>AxHwKkipZ{&t;ucLK6V- CH54fT literal 0 HcmV?d00001