From 758b8c7f0eda1df1914f4cd34e81c0a768792d59 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Thu, 14 Feb 2019 21:03:52 -0500 Subject: [PATCH] Decompiled three more functions. --- asm/pokenav.s | 42 ------------------------------------------ src/pokenav_main.c | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 43 deletions(-) diff --git a/asm/pokenav.s b/asm/pokenav.s index 252134562..01ba420aa 100644 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -5,48 +5,6 @@ .text - thumb_func_start sub_81C7C94 -sub_81C7C94: @ 81C7C94 - push {lr} - movs r0, 0 - bl sub_81C763C - ldr r0, [r0, 0x18] - bl DestroySprite - movs r0, 0 - bl FreeSpriteTilesByTag - movs r0, 0 - bl FreeSpritePaletteByTag - pop {r0} - bx r0 - thumb_func_end sub_81C7C94 - - thumb_func_start sub_81C7CB4 -sub_81C7CB4: @ 81C7CB4 - push {r4,lr} - adds r4, r0, 0 - movs r0, 0 - bl GetBgY - lsrs r0, 8 - negs r0, r0 - strh r0, [r4, 0x26] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_81C7CB4 - - thumb_func_start sub_81C7CCC -sub_81C7CCC: @ 81C7CCC - push {lr} - movs r0, 0 - bl sub_81C763C - ldr r0, [r0, 0x18] - ldr r1, =SpriteCallbackDummy - str r1, [r0, 0x1C] - pop {r1} - bx r1 - .pool - thumb_func_end sub_81C7CCC - thumb_func_start sub_81C7CE4 sub_81C7CE4: @ 81C7CE4 push {r4,lr} diff --git a/src/pokenav_main.c b/src/pokenav_main.c index a75a85a18..bc19a908b 100644 --- a/src/pokenav_main.c +++ b/src/pokenav_main.c @@ -64,7 +64,6 @@ extern const struct SpriteTemplate gUnknown_0861FB04; extern void sub_81C9430(void); extern void sub_81CAADC(void); extern void sub_81C99D4(void); -extern void sub_81C7C94(void); extern void sub_8199D98(void); extern void sub_81C7D28(void); @@ -97,6 +96,7 @@ void sub_81C7400(void); void sub_81C7C28(void); void sub_81C72BC(void); void sub_81C7B74(void); +void sub_81C7C94(void); u32 sub_81C7078(u32 (*a0)(s32), u32 a1) { @@ -859,4 +859,27 @@ void sub_81C7C28(void) { v1[5] = -2 & ~v3; spriteId = CreateSprite(&gUnknown_0861FB04, 0xDC, 0xC, 0); v1[6] = (u32)(&gSprites[spriteId]); +} + +void sub_81C7C94(void) { + void **v1; + v1 = sub_81C763C(0); + DestroySprite(v1[6]); + FreeSpriteTilesByTag(0); + FreeSpritePaletteByTag(0); +} + +void sub_81C7CB4(u16 *a0) { + u32 v1; + v1 = GetBgY(0); + a0[19] = (v1 >> 8) * -1; +} + +struct Sprite* sub_81C7CCC(void) { + struct Sprite **v1; + struct Sprite *v2; + v1 = sub_81C763C(0); + v2 = v1[6]; + v2->callback = SpriteCallbackDummy; + return v2; } \ No newline at end of file