diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-27 18:51:55 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-06-27 18:51:55 -0400 |
commit | 628a71bed7bb350f6e69b8bd2528ea7103a16cbe (patch) | |
tree | a2ad2533a56e4233a537dc69bc23513a00b577d9 | |
parent | 06b6cada0ddedc62063171703ba6607019751a9a (diff) |
Start decompiling pokeblock.s
-rwxr-xr-x[-rw-r--r--] | asm/pokeblock.s | 34 | ||||
-rwxr-xr-x | ld_script.txt | 2 | ||||
-rwxr-xr-x | src/pokeblock.c | 30 |
3 files changed, 32 insertions, 34 deletions
diff --git a/asm/pokeblock.s b/asm/pokeblock.s index 5b6522144..3fbd57c86 100644..100755 --- a/asm/pokeblock.s +++ b/asm/pokeblock.s @@ -6,40 +6,6 @@ .text - thumb_func_start sub_810B674 -sub_810B674: @ 810B674 - push {lr} - bl AnimateSprites - bl BuildOamBuffer - bl RunTasks - bl UpdatePaletteFade - pop {r0} - bx r0 - thumb_func_end sub_810B674 - - thumb_func_start sub_810B68C -sub_810B68C: @ 810B68C - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - ldr r1, _0810B6B0 @ =gBGTilemapBuffers + 0x1000 - ldr r2, _0810B6B4 @ =0x06007800 - ldr r0, _0810B6B8 @ =0x040000d4 - str r1, [r0] - str r2, [r0, 0x4] - ldr r1, _0810B6BC @ =0x80000400 - str r1, [r0, 0x8] - ldr r0, [r0, 0x8] - pop {r0} - bx r0 - .align 2, 0 -_0810B6B0: .4byte gBGTilemapBuffers + 0x1000 -_0810B6B4: .4byte 0x06007800 -_0810B6B8: .4byte 0x040000d4 -_0810B6BC: .4byte 0x80000400 - thumb_func_end sub_810B68C - thumb_func_start sub_810B6C0 sub_810B6C0: @ 810B6C0 push {r4,lr} diff --git a/ld_script.txt b/ld_script.txt index 80436f035..8ea76638d 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -212,6 +212,7 @@ SECTIONS { src/starter_choose.o(.text); src/wallclock.o(.text); src/rom6.o(.text); + src/pokeblock.o(.text); asm/pokeblock.o(.text); asm/fldeff_flash.o(.text); src/post_battle_event_funcs.o(.text); @@ -438,6 +439,7 @@ SECTIONS { data/trader.o(.rodata); src/starter_choose.o(.rodata); src/wallclock.o(.rodata); + src/pokeblock.o(.rodata); data/pokeblock.o(.rodata); data/fldeff_flash.o(.rodata); src/time_events.o(.rodata); diff --git a/src/pokeblock.c b/src/pokeblock.c new file mode 100755 index 000000000..79df0fb29 --- /dev/null +++ b/src/pokeblock.c @@ -0,0 +1,30 @@ +// +// Created by scott on 6/27/2017. +// + +#include "global.h" +#include "sprite.h" +#include "task.h" +#include "text.h" +#include "palette.h" +#include "pokeblock.h" + +void sub_810B674(void) +{ + AnimateSprites(); + BuildOamBuffer(); + RunTasks(); + UpdatePaletteFade(); +} + +void sub_810B68C(void) +{ + u16 *src; + vu16 *dest; + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + src = gBGTilemapBuffers[2]; + dest = (vu16 *)(VRAM + 0x7800); + DmaCopy16(3, src, dest, sizeof gBGTilemapBuffers[2]); +} |