.text
.align 2
.thumb
.thumb_func
main:
push {r4-r6, lr}
sub SP, SP, #0x4
ldr r4, bg_positions_reset
bl linker
loadTileSet:
@tileset doesn't require updating
ldr r1, image
mov r0, #0x0
str r0, [sp]
mov r0, #0x0
mov r2, #0x0
mov r3, #0x0
ldr r4, decompress_with_fallback
bl linker
loadPal:
ldr r0, new_pal
mov r1, #0xD0 @slot
mov r2, #0x20 @size
ldr r4, gpu_pal_apply
bl linker
ldr r0, new_pal
ldr r4, gpu_pal_obj_alloc_tag_and_apply
bl linker
loadTileMap:
ldr r1, tilemap
mov r0, #0x0
mov r2, #0x0
mov r3, #0x0
ldr r4, gpu_tilemap_config_and_commit
bl linker
mov r0, #0x0
ldr r4, bgid_send_tilemap
bl linker
ldr r0, tilemap
ldr r4, gpu_tile_obj_alloc_tag_and_upload
bl linker
showBG:
mov r0, #0x0
ldr r4, =(0x80019BC +1)
bl linker
end:
add SP, SP, #0x4
pop {r4-r6, pc}
linker:
bx r4
.align 2
@resources:
new_pal:
.word 0x8EAD5E8
image:
.word 0x8B03DE0
tilemap:
.word 0x8B04660
@Functions:
gpu_pal_obj_alloc_tag_and_apply:
.word 0x8008928 +1
gpu_tilemap_config_and_commit:
.word 0x8002040 +1
gpu_tile_obj_alloc_tag_and_upload:
.word 0x80086DC +1
bgid_send_tilemap:
.word 0x80020BC +1
decompress_with_fallback:
.word 0x80F6878 +1
gpu_pal_apply:
.word 0x80703EC +1
bg_positions_reset:
.word 0x812D594 +1