rename sprite labels

This commit is contained in:
DizzyEggg 2017-09-01 19:43:26 +02:00
parent 6987dd9a21
commit ee7580753b
54 changed files with 375 additions and 358 deletions

View File

@ -46561,14 +46561,14 @@ _081160EC:
b _081160F6
.pool
_081160F4:
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
_081160F6:
adds r0, r4, 0
bl oamt_set_x3A_32
b _0811610C
.pool
_08116104:
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
adds r0, r4, 0
bl oamt_set_x3A_32
_0811610C:

View File

@ -605,8 +605,8 @@ _0807FCB0:
ldr r0, [r0]
strb r4, [r0]
_0807FCE2:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x4
@ -1579,8 +1579,8 @@ _08080546:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x4
@ -2557,8 +2557,8 @@ _08080DAE:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x4
@ -3853,8 +3853,8 @@ _0808191A:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
pop {r4-r6}
@ -5303,8 +5303,8 @@ _0808249E:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
pop {r3}
@ -5773,8 +5773,8 @@ _080828DC:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x4
@ -5953,8 +5953,8 @@ _08082A92:
ldrsh r1, [r1, r2]
bl nullsub_31
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
pop {r4-r6}

View File

@ -34,8 +34,8 @@ sub_8177C14: @ 8177C14
sub_8177C54: @ 8177C54
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -214,8 +214,8 @@ _0814FDFC:
adds r1, r2
movs r0, 0x3
bl SetBgTilemapBuffer
ldr r2, =gUnknown_02021BBC
ldr r1, =gUnknown_02021BBE
ldr r2, =gSpriteCoordOffsetX
ldr r1, =gSpriteCoordOffsetY
movs r0, 0
strh r0, [r1]
strh r0, [r2]
@ -618,8 +618,8 @@ _08150226:
mainloop: @ 815023C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
bl MapMusicMain
pop {r0}
@ -643,7 +643,7 @@ c2_8011A1C: @ 8150258
bl HideBg
movs r0, 0
bl sub_8150B6C
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
strh r4, [r0]
movs r0, 0
bl sub_80AB130
@ -1091,7 +1091,7 @@ _081505F4:
strb r0, [r1, 0x15]
_08150630:
bl sub_815115C
ldr r3, =gUnknown_02021BBC
ldr r3, =gSpriteCoordOffsetX
movs r0, 0
ldrsh r2, [r3, r0]
adds r1, r2, 0x1
@ -1284,7 +1284,7 @@ _081507B6:
ldrh r1, [r1, 0x4]
cmp r0, r1
bcs _081507DC
ldr r4, =gUnknown_02021BBC
ldr r4, =gSpriteCoordOffsetX
movs r1, 0
ldrsh r0, [r4, r1]
b _081507E6

View File

@ -1285,9 +1285,9 @@ _080D822C:
thumb_func_start sub_80D823C
sub_80D823C: @ 80D823C
push {r4,r5,lr}
bl CallObjectCallbacks
bl AnimateSprites
bl RunTasks
bl PrepareSpritesForOamLoad
bl BuildOamBuffer
bl UpdatePaletteFade
movs r4, 0
_080D8250:

View File

@ -426,8 +426,8 @@ _080F5BEC:
thumb_func_start sub_80F5C00
sub_80F5C00: @ 80F5C00
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTasks
bl UpdatePaletteFade
movs r0, 0x1

View File

@ -19,7 +19,7 @@ sub_81754C8: @ 81754C8
sub_81754DC: @ 81754DC
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl AnimateSprites
ldr r0, =gMain
ldrh r1, [r0, 0x2C]
movs r0, 0x2
@ -43,12 +43,12 @@ sub_81754DC: @ 81754DC
bne _08175522
bl sub_81754C8
bl RunTasks
bl CallObjectCallbacks
bl AnimateSprites
ldr r1, =gUnknown_0203BCE5
movs r0, 0x1
strb r0, [r1]
_08175522:
bl PrepareSpritesForOamLoad
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -159,8 +159,8 @@ _0817797C:
sub_8177A08: @ 8177A08
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -56,8 +56,8 @@ sub_811A20C: @ 811A20C
sub_811A278: @ 811A278
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -715,8 +715,8 @@ _080719C8:
_080719D6:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x4
pop {r4}
@ -1166,8 +1166,8 @@ _08071DD4:
_08071E06:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x8
pop {r3,r4}

View File

@ -983,8 +983,8 @@ sub_813E1D4: @ 813E1D4
thumb_func_start sub_813E3A4
sub_813E3A4: @ 813E3A4
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -995,8 +995,8 @@ sub_813E3A4: @ 813E3A4
thumb_func_start sub_813E3C0
sub_813E3C0: @ 813E3C0
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks

View File

@ -1050,14 +1050,14 @@ UpdateCameraPanning: @ 808A314
beq _0808A322
bl _call_via_r0
_0808A322:
ldr r2, =gUnknown_02021BBC
ldr r2, =gSpriteCoordOffsetX
ldr r0, =gUnknown_03005DEC
ldr r1, =gUnknown_03000E28
ldrh r0, [r0]
ldrh r1, [r1]
subs r0, r1
strh r0, [r2]
ldr r2, =gUnknown_02021BBE
ldr r2, =gSpriteCoordOffsetY
ldr r0, =gUnknown_03005DE8
ldr r1, =gUnknown_03000E2A
ldrh r0, [r0]

View File

@ -2270,7 +2270,7 @@ sub_80B6C90: @ 80B6C90
lsls r0, r4, 17
negs r0, r0
ldrh r1, [r2, 0x22]
ldr r3, =gUnknown_02021BBE
ldr r3, =gSpriteCoordOffsetY
adds r1, r4
ldrh r3, [r3]
adds r1, r3
@ -3623,7 +3623,7 @@ _080B7750:
movs r7, 0x22
ldrsh r0, [r5, r7]
adds r0, r1
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
movs r7, 0
ldrsh r1, [r1, r7]
adds r0, r1
@ -4975,7 +4975,7 @@ sub_80B8280: @ 80B8280
lsls r0, r4, 17
negs r0, r0
ldrh r1, [r2, 0x22]
ldr r3, =gUnknown_02021BBE
ldr r3, =gSpriteCoordOffsetY
adds r1, r4
ldrh r3, [r3]
adds r1, r3

View File

@ -1095,7 +1095,7 @@ SetObjectSubpriorityByZCoord: @ 8096E0C
movs r5, 0
ldrsb r5, [r3, r5]
ldrh r4, [r1, 0x22]
ldr r3, =gUnknown_02021BBE
ldr r3, =gSpriteCoordOffsetY
subs r4, r5
ldrh r3, [r3]
adds r4, r3

View File

@ -20153,7 +20153,7 @@ sub_8096530: @ 8096530
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
ldr r2, =gUnknown_02021BBC
ldr r2, =gSpriteCoordOffsetX
adds r0, r1
ldrh r2, [r2]
adds r0, r2
@ -20167,7 +20167,7 @@ sub_8096530: @ 8096530
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
ldr r2, =gUnknown_02021BBE
ldr r2, =gSpriteCoordOffsetY
adds r0, r1
ldrh r2, [r2]
adds r0, r2

View File

@ -98,8 +98,8 @@ sub_8170260: @ 8170260
sub_8170274: @ 8170274
push {lr}
bl sub_8170290
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
bl do_scheduled_bg_tilemap_copies_to_vram
pop {r0}

View File

@ -20,8 +20,8 @@ sub_8173560: @ 8173560
push {lr}
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -1513,8 +1513,8 @@ _08174240:
.pool
_08174280:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
bl sub_80F9C1C
lsls r0, 24

View File

@ -20,8 +20,8 @@ sub_816CBE8: @ 816CBE8
sub_816CC00: @ 816CC00
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
ldr r0, =gMain
ldrh r0, [r0, 0x2E]

View File

@ -240,8 +240,8 @@ _080095A0:
movs r1, 0
bl CreateTask
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
ldr r0, =gUnknown_03000D60
str r4, [r0]
@ -664,8 +664,8 @@ c2_08009A8C: @ 80099BC
movs r2, 0
bl sub_8009818
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -3434,8 +3434,8 @@ _0800AF8C:
movs r0, 0
str r0, [r1]
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
ldr r0, =sub_800B1A0
bl SetMainCallback2
@ -16633,8 +16633,8 @@ _08011B38:
movs r0, 0
bl SetGpuReg
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
bl sub_8011BA4
ldr r0, =sub_8011BF8
@ -16703,8 +16703,8 @@ _08011BEA:
sub_8011BF8: @ 8011BF8
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -21024,8 +21024,8 @@ _080141D4:
_080141F2:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r4}
pop {r0}
bx r0
@ -21227,8 +21227,8 @@ _080143B4:
_080143C6:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r4}
pop {r0}
bx r0
@ -28594,8 +28594,8 @@ sub_8018438: @ 8018438
push {lr}
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r0}
bx r0
thumb_func_end sub_8018438
@ -32543,8 +32543,8 @@ sub_801A3F4: @ 801A3F4
bne _0801A414
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
_0801A414:
pop {r0}
@ -32676,8 +32676,8 @@ sub_801A43C: @ 801A43C
bl SetMainCallback2
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0xC
pop {r4,r5}
@ -33868,8 +33868,8 @@ _0801AF98:
_0801AFAE:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
_0801AFC2:
add sp, 0xC
@ -39847,8 +39847,8 @@ sub_801DF38: @ 801DF38
push {lr}
bl RunTasks
bl sub_801F5B8
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -45854,8 +45854,8 @@ sub_8020F88: @ 8020F88
push {lr}
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r0}
bx r0
thumb_func_end sub_8020F88
@ -46183,7 +46183,7 @@ _08021278:
bl sub_800DFB4
adds r0, r5, 0
bl sub_8022730
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
ldrh r1, [r0]
negs r1, r1
lsls r1, 16
@ -46389,7 +46389,7 @@ _08021446:
sub_8021450: @ 8021450
push {r4,lr}
adds r4, r0, 0
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
ldrh r1, [r4, 0x2C]
ldrh r2, [r4, 0x2A]
adds r1, r2
@ -46421,9 +46421,9 @@ sub_8021488: @ 8021488
ldr r2, =0x0000ff98
strh r2, [r0, 0x2A]
strh r1, [r0, 0x2C]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
strh r1, [r0]
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
strh r2, [r0]
bx lr
.pool
@ -48656,9 +48656,9 @@ sub_8022730: @ 8022730
ldr r0, =0x0000ff98
strh r0, [r6, 0x2A]
strh r5, [r6, 0x2C]
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
strh r5, [r1]
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
strh r0, [r1]
ldr r4, =gUnknown_082F41F4
_08022746:
@ -55980,8 +55980,8 @@ _080261C0:
sub_80261CC: @ 80261CC
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -65148,8 +65148,8 @@ sub_802AC58: @ 802AC58
sub_802AC6C: @ 802AC6C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -900,8 +900,8 @@ sub_8121C64: @ 8121C64
ldrb r0, [r0]
cmp r0, 0
beq _08121C7C
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
_08121C7C:
ldr r0, [r4]
movs r1, 0x84

View File

@ -10,8 +10,8 @@
CB2_MainMenu: @ 802F6B0
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -864,7 +864,7 @@ sub_80979D4: @ 80979D4
adds r4, 0x28
movs r0, 0
ldrsb r0, [r4, r0]
ldr r2, =gUnknown_02021BBC
ldr r2, =gSpriteCoordOffsetX
adds r0, r1
ldrh r2, [r2]
adds r0, r2
@ -877,7 +877,7 @@ sub_80979D4: @ 80979D4
subs r3, 0x15
movs r0, 0
ldrsb r0, [r3, r0]
ldr r2, =gUnknown_02021BBE
ldr r2, =gSpriteCoordOffsetY
adds r0, r1
ldrh r2, [r2]
adds r0, r2

View File

@ -89,8 +89,8 @@ _081789AC:
bl CreateTask
bl sub_80A2F30
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
movs r0, 0
@ -590,8 +590,8 @@ _08178E58:
strb r1, [r0]
_08178E98:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
add sp, 0x8

View File

@ -4059,8 +4059,8 @@ sub_80E4EF0: @ 80E4EF0
sub_80E4F58: @ 80E4F58
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -9,8 +9,8 @@
sub_80BA4B0: @ 80BA4B0
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -9,8 +9,8 @@
sub_8179B68: @ 8179B68
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -515,8 +515,8 @@ _080BB74C:
sub_80BB774: @ 80BB774
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -3379,7 +3379,7 @@ _081246E4:
_08124754:
bl ResetPaletteFade
bl ResetAllObjectData
bl FreeAllObjectTiles
bl FreeSpriteTileRanges
bl ResetObjectPaletteAllocator
b _0812489C
_08124766:
@ -3530,8 +3530,8 @@ sub_81248D4: @ 81248D4
ldr r0, [r0]
ldr r0, [r0]
bl _call_via_r0
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
pop {r0}
bx r0

View File

@ -938,8 +938,8 @@ sub_809F048: @ 809F048
sub_809F090: @ 809F090
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -3061,10 +3061,10 @@ c2_overworld_basic: @ 8085E24
push {lr}
bl script_env_2_run_current_script
bl RunTasks
bl CallObjectCallbacks
bl AnimateSprites
bl CameraUpdate
bl UpdateCameraPanning
bl PrepareSpritesForOamLoad
bl BuildOamBuffer
bl UpdatePaletteFade
bl sub_80A0A38
bl do_scheduled_bg_tilemap_copies_to_vram

View File

@ -570,8 +570,8 @@ sub_8135908: @ 8135908
sub_813591C: @ 813591C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}
@ -3418,8 +3418,8 @@ sub_81371B4: @ 81371B4
sub_81371D4: @ 81371D4
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -1303,8 +1303,8 @@ sub_8035608: @ 8035608
thumb_func_start sub_8035648
sub_8035648: @ 8035648
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r0}
bx r0
thumb_func_end sub_8035648
@ -4029,8 +4029,8 @@ _08036FA0:
sub_8036FAC: @ 8036FAC
push {r4-r6,lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl link_get_multiplayer_id
lsls r0, 24
lsrs r6, r0, 24
@ -4499,8 +4499,8 @@ sub_8037458: @ 8037458
push {r4-r7,lr}
sub sp, 0x4
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl link_get_multiplayer_id
lsls r0, 24
lsrs r6, r0, 24
@ -5213,8 +5213,8 @@ _08037B02:
adds r0, 0xAC
mov r10, r0
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
ldr r5, =gBattleCommunication
ldrb r0, [r5]
cmp r0, 0x1
@ -5443,8 +5443,8 @@ intro_end: @ 8037D2C
adds r7, r0, 0
adds r7, 0xAC
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
ldr r5, =gBattleCommunication
ldrb r0, [r5]
cmp r0, 0
@ -5521,8 +5521,8 @@ sub_8037DF4: @ 8037DF4
adds r0, 0x25
strb r7, [r0]
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
ldr r0, =gBattleCommunication
ldrb r0, [r0]
cmp r0, 0xA
@ -6216,8 +6216,8 @@ _080383F8:
sub_8038420: @ 8038420
push {lr}
sub sp, 0x4
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -7491,8 +7491,8 @@ _08038EB6:
sub_8038F14: @ 8038F14
push {lr}
bl sub_8038F34
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -7954,8 +7954,8 @@ _080392FE:
sub_803937C: @ 803937C
push {lr}
bl sub_803939C
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks

View File

@ -1724,8 +1724,8 @@ c2_Box: @ 80C7D54
bl do_scheduled_bg_tilemap_copies_to_vram
bl sub_80CA028
bl sub_80CAA14
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r0}
bx r0
thumb_func_end c2_Box
@ -1851,10 +1851,10 @@ sub_80C7E98: @ 80C7E98
sub sp, 0x4
bl ResetPaletteFade
bl ResetAllObjectData
bl FreeAllObjectTiles
bl FreeSpriteTileRanges
bl ResetObjectPaletteAllocator
bl ClearDma3Requests
ldr r1, =gUnknown_02021B3A
ldr r1, =gReservedSpriteTileCount
movs r2, 0xA0
lsls r2, 2
adds r0, r2, 0

View File

@ -383,8 +383,8 @@ sub_813C8D8: @ 813C8D8
sub_813C8EC: @ 813C8EC
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -36,8 +36,8 @@ _08145EAC:
bl SetMainCallback2
_08145EC0:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r4}
pop {r0}

View File

@ -15295,8 +15295,8 @@ sub_816082C: @ 816082C
push {lr}
bl sub_8160868
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}
@ -25877,8 +25877,8 @@ sub_81662C0: @ 81662C0
ldr r0, [r4]
ldr r0, [r0]
bl _call_via_r0
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
ldr r4, [r4]
ldr r1, [r4]
@ -25902,8 +25902,8 @@ _081662F0:
sub_8166304: @ 8166304
push {lr}
bl sub_81668F8
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -25916,8 +25916,8 @@ sub_816631C: @ 816631C
ldr r0, [r0]
ldr r0, [r0]
bl _call_via_r0
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
pop {r0}

View File

@ -1920,8 +1920,8 @@ _08185E6E:
thumb_func_start sub_8185E8C
sub_8185E8C: @ 8185E8C
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTasks
pop {r0}
bx r0
@ -29367,8 +29367,8 @@ _08194B3C:
thumb_func_start sub_8194B54
sub_8194B54: @ 8194B54
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -40710,8 +40710,8 @@ _0819A4C2:
thumb_func_start sub_819A4C8
sub_819A4C8: @ 819A4C8
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -44783,8 +44783,8 @@ _0819C7D8:
thumb_func_start sub_819C7E0
sub_819C7E0: @ 819C7E0
push {lr}
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl RunTextPrinters
bl UpdatePaletteFade
bl RunTasks
@ -72283,8 +72283,8 @@ _081AAD3A:
c2_bag_3: @ 81AAD5C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}
@ -82300,8 +82300,8 @@ _081B0194:
sub_81B01B0: @ 81B01B0
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -8759,8 +8759,8 @@ sub_81BFA80: @ 81BFA80
sub_81BFAB4: @ 81BFAB4
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}
@ -18528,8 +18528,8 @@ _081C4FBA:
sub_81C501C: @ 81C501C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}
@ -22652,8 +22652,8 @@ _081C73FA:
sub_81C7400: @ 81C7400
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -53566,8 +53566,8 @@ sub_81D6774: @ 81D6774
sub_81D67D0: @ 81D67D0
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -474,7 +474,7 @@ sub_80FBB64: @ 80FBB64
adds r0, 0x28
movs r2, 0
ldrsb r2, [r0, r2]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
adds r2, r1
ldrh r0, [r0]
adds r2, r0
@ -488,7 +488,7 @@ sub_80FBB64: @ 80FBB64
ldrb r0, [r0]
lsls r0, 24
asrs r0, 24
ldr r3, =gUnknown_02021BBE
ldr r3, =gSpriteCoordOffsetY
adds r0, r1
ldrh r3, [r3]
adds r0, r3

View File

@ -9,8 +9,8 @@
sub_8140238: @ 8140238
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
ldr r0, =gUnknown_0203AB88
ldr r0, [r0]
adds r1, r0, 0
@ -493,8 +493,8 @@ _081406C0:
bl sub_81431E4
b _081407F8
_081406E0:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl GetCoins
lsls r0, 16
lsrs r0, 16
@ -523,12 +523,12 @@ _081406E0:
ldrb r0, [r4]
movs r1, 0x3
bl CopyWindowToVram
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
movs r2, 0x3C
negs r2, r2
adds r0, r2, 0
strh r0, [r1]
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
strh r5, [r0]
b _081407F8
.pool
@ -1703,7 +1703,7 @@ sub_81410FC: @ 81410FC
asrs r0, 16
cmp r0, 0x2
ble _08141128
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r0, [r1]
adds r0, 0x2
strh r0, [r1]
@ -2413,7 +2413,7 @@ sub_81416D4: @ 81416D4
asrs r0, 16
cmp r0, 0x2
ble _08141700
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r0, [r1]
subs r0, 0x2
strh r0, [r1]
@ -3254,8 +3254,8 @@ sub_8141E7C: @ 8141E7C
bne _08141EDE
movs r0, 0
bl SetVBlankCallback
ldr r1, =gUnknown_02021BBC
ldr r0, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetX
ldr r0, =gSpriteCoordOffsetY
strh r4, [r0]
strh r4, [r1]
bl sub_8121DA0
@ -4443,7 +4443,7 @@ sub_8142814: @ 8142814
ldr r3, [r4]
movs r0, 0x2E
ldrsh r1, [r3, r0]
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
movs r4, 0
ldrsh r2, [r0, r4]
adds r2, 0x50
@ -4454,7 +4454,7 @@ sub_8142814: @ 8142814
subs r4, r0
movs r6, 0x2C
ldrsh r5, [r3, r6]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
movs r6, 0
ldrsh r1, [r0, r6]
adds r1, 0x74
@ -6909,7 +6909,7 @@ _08143CAE:
movs r2, 0x36
ldrsh r1, [r5, r2]
muls r0, r1
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
asrs r0, 12
ldrh r1, [r1]
adds r0, r1
@ -8872,7 +8872,7 @@ sub_8144CD0: @ 8144CD0
ands r2, r0
cmp r2, 0
beq _08144D2E
ldr r3, =gUnknown_02021BBE
ldr r3, =gSpriteCoordOffsetY
movs r0, 0x3C
ldrsh r2, [r4, r0]
lsls r2, 1
@ -8916,7 +8916,7 @@ _08144D2E:
b _08144D7E
.pool
_08144D54:
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
movs r0, 0
strh r0, [r1]
ldr r2, =gSprites

View File

@ -366,8 +366,8 @@ ReturnToShopMenuAfterExitingSellMenu: @ 80DFD44
CB2_BuyMenu: @ 80DFD64
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -191,8 +191,8 @@ _0812A666:
sub_812A670: @ 812A670
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -570,7 +570,7 @@ sub_812A9AC: @ 812A9AC
push {lr}
bl ResetPaletteFade
bl ResetAllObjectData
ldr r1, =gUnknown_02021B38
ldr r1, =gOamLimit
movs r0, 0x80
strb r0, [r1]
bl ResetObjectPaletteAllocator
@ -6187,9 +6187,9 @@ sub_812D51C: @ 812D51C
movs r1, 0xA0
lsls r1, 3
strh r1, [r0, 0x10]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
strh r2, [r0]
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
strh r2, [r0]
movs r0, 0x14
movs r1, 0
@ -6219,7 +6219,7 @@ sub_812D51C: @ 812D51C
sub_812D594: @ 812D594
push {r4,r5,lr}
adds r4, r0, 0
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r0, [r1]
subs r0, 0x8
strh r0, [r1]
@ -6688,7 +6688,7 @@ _0812D948:
sub_812D950: @ 812D950
push {r4,r5,lr}
adds r4, r0, 0
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r0, [r1]
subs r0, 0x8
strh r0, [r1]
@ -6738,7 +6738,7 @@ sub_812D9A4: @ 812D9A4
ldr r1, [r4]
ldrb r0, [r1, 0x5]
strb r0, [r1, 0xA]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
strh r6, [r0]
movs r0, 0x14
movs r1, 0
@ -6893,7 +6893,7 @@ sub_812DA90: @ 812DA90
sub_812DB04: @ 812DB04
push {r4,r5,lr}
adds r4, r0, 0
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r0, [r4, 0x10]
strh r0, [r1]
ldrh r1, [r4, 0x10]
@ -6958,7 +6958,7 @@ _0812DB7A:
sub_812DB8C: @ 812DB8C
push {r4,lr}
adds r4, r0, 0
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
movs r0, 0
strh r0, [r1]
movs r0, 0x16
@ -6982,7 +6982,7 @@ _0812DBB2:
thumb_func_start sub_812DBBC
sub_812DBBC: @ 812DBBC
push {lr}
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
movs r0, 0
strh r0, [r1]
movs r0, 0x14
@ -8247,7 +8247,7 @@ _0812E5BC:
ldm r0!, {r3-r5}
stm r1!, {r3-r5}
str r2, [sp, 0xC]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
ldrh r0, [r0]
movs r1, 0xA8
subs r1, r0
@ -9037,7 +9037,7 @@ sub_812EC20: @ 812EC20
thumb_func_start sub_812EC64
sub_812EC64: @ 812EC64
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r1, [r1]
strh r1, [r0, 0x26]
bx lr
@ -9072,7 +9072,7 @@ sub_812EC94: @ 812EC94
bl memcpy
movs r4, 0
_0812ECA4:
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
ldrh r0, [r0]
movs r1, 0x50
subs r1, r0

View File

@ -12,21 +12,21 @@ ResetAllObjectData: @ 8006974
movs r0, 0
movs r1, 0x80
bl ResetSpriteRange
bl RemoveAllObjects
bl ClearObjectCopyRequests
bl rotscale_reset_all
bl FreeAllObjectTiles
ldr r1, =gUnknown_02021B38
bl ResetAllSprites
bl ClearSpriteCopyRequests
bl ResetAffineAnimData
bl FreeSpriteTileRanges
ldr r1, =gOamLimit
movs r0, 0x40
strb r0, [r1]
ldr r0, =gUnknown_02021B3A
ldr r0, =gReservedSpriteTileCount
movs r4, 0
strh r4, [r0]
movs r0, 0
bl AllocObjectTiles
ldr r0, =gUnknown_02021BBC
bl AllocSpriteTiles
ldr r0, =gSpriteCoordOffsetX
strh r4, [r0]
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
strh r4, [r0]
pop {r4}
pop {r0}
@ -34,9 +34,9 @@ ResetAllObjectData: @ 8006974
.pool
thumb_func_end ResetAllObjectData
thumb_func_start CallObjectCallbacks
@ void CallObjectCallbacks()
CallObjectCallbacks: @ 80069C0
thumb_func_start AnimateSprites
@ void AnimateSprites()
AnimateSprites: @ 80069C0
push {r4-r7,lr}
movs r6, 0
movs r7, 0x1
@ -73,15 +73,15 @@ _080069F6:
pop {r0}
bx r0
.pool
thumb_func_end CallObjectCallbacks
thumb_func_end AnimateSprites
thumb_func_start PrepareSpritesForOamLoad
@ void PrepareSpritesForOamLoad()
PrepareSpritesForOamLoad: @ 8006A0C
thumb_func_start BuildOamBuffer
@ void BuildOamBuffer()
BuildOamBuffer: @ 8006A0C
push {r4,r5,lr}
bl UpdateObjectOamCoords
bl BuildObjectPriorityList
bl SortObjectsByPriority
bl UpdateOamCoords
bl BuildSpritePriorities
bl SortSprites
ldr r5, =gMain
ldr r0, =0x00000439
adds r5, r0
@ -91,8 +91,8 @@ PrepareSpritesForOamLoad: @ 8006A0C
movs r1, 0x1
orrs r0, r1
strb r0, [r5]
bl PopulateSprites
bl CopyTransformationMatricesToSprites
bl AddSpritesToOamBuffer
bl CopyMatricesToOamBuffer
movs r2, 0x1
ldrb r1, [r5]
movs r0, 0x2
@ -100,17 +100,17 @@ PrepareSpritesForOamLoad: @ 8006A0C
ands r0, r1
orrs r4, r0
strb r4, [r5]
ldr r0, =gUnknown_02021834
ldr r0, =gShouldProcessSpriteCopyRequests
strb r2, [r0]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end PrepareSpritesForOamLoad
thumb_func_end BuildOamBuffer
thumb_func_start UpdateObjectOamCoords
@ void UpdateObjectOamCoords()
UpdateObjectOamCoords: @ 8006A58
thumb_func_start UpdateOamCoords
@ void UpdateOamCoords()
UpdateOamCoords: @ 8006A58
push {r4-r7,lr}
movs r4, 0
ldr r7, =gSprites
@ -144,7 +144,7 @@ _08006A64:
lsls r0, 24
asrs r0, 24
adds r1, r0
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
movs r2, 0
ldrsh r0, [r0, r2]
adds r1, r0
@ -160,7 +160,7 @@ _08006A64:
adds r0, r3, 0
adds r0, 0x29
ldrb r0, [r0]
ldr r2, =gUnknown_02021BBE
ldr r2, =gSpriteCoordOffsetY
adds r0, r1
ldrb r2, [r2]
adds r0, r2
@ -202,11 +202,11 @@ _08006B0A:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end UpdateObjectOamCoords
thumb_func_end UpdateOamCoords
thumb_func_start BuildObjectPriorityList
@ void BuildObjectPriorityList()
BuildObjectPriorityList: @ 8006B1C
thumb_func_start BuildSpritePriorities
@ void BuildSpritePriorities()
BuildSpritePriorities: @ 8006B1C
push {r4,lr}
movs r2, 0
ldr r4, =gSprites
@ -236,11 +236,11 @@ _08006B24:
pop {r0}
bx r0
.pool
thumb_func_end BuildObjectPriorityList
thumb_func_end BuildSpritePriorities
thumb_func_start SortObjectsByPriority
@ void SortObjectsByPriority()
SortObjectsByPriority: @ 8006B5C
thumb_func_start SortSprites
@ void SortSprites()
SortSprites: @ 8006B5C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@ -470,11 +470,11 @@ _08006D04:
pop {r0}
bx r0
.pool
thumb_func_end SortObjectsByPriority
thumb_func_end SortSprites
thumb_func_start CopyTransformationMatricesToSprites
@ void CopyTransformationMatricesToSprites()
CopyTransformationMatricesToSprites: @ 8006D1C
thumb_func_start CopyMatricesToOamBuffer
@ void CopyMatricesToOamBuffer()
CopyMatricesToOamBuffer: @ 8006D1C
push {r4-r6,lr}
movs r4, 0
ldr r5, =gMain
@ -511,11 +511,11 @@ _08006D24:
pop {r0}
bx r0
.pool
thumb_func_end CopyTransformationMatricesToSprites
thumb_func_end CopyMatricesToOamBuffer
thumb_func_start PopulateSprites
@ void PopulateSprites()
PopulateSprites: @ 8006D68
thumb_func_start AddSpritesToOamBuffer
@ void AddSpritesToOamBuffer()
AddSpritesToOamBuffer: @ 8006D68
push {r4-r6,lr}
sub sp, 0x4
movs r4, 0
@ -550,7 +550,7 @@ _08006D9E:
cmp r4, 0x3F
bls _08006D72
mov r0, sp
ldr r4, =gUnknown_02021B38
ldr r4, =gOamLimit
ldrb r0, [r0]
ldrb r1, [r4]
cmp r0, r1
@ -580,7 +580,7 @@ _08006DD8:
pop {r0}
bx r0
.pool
thumb_func_end PopulateSprites
thumb_func_end AddSpritesToOamBuffer
thumb_func_start AddObjectToFront
@ u8 AddObjectToFront(struct objtemplate *template, u16 x, u16 y, u8 subpriority)
@ -811,7 +811,7 @@ AddObject: @ 8006EFC
lsrs r0, 5
lsls r0, 24
lsrs r0, 24
bl AllocObjectTiles
bl AllocSpriteTiles
lsls r0, 16
lsrs r2, r0, 16
asrs r0, 16
@ -1082,11 +1082,11 @@ _080071A8:
.pool
thumb_func_end LoadOamFromSprites
thumb_func_start ClearObjectCopyRequests
@ void ClearObjectCopyRequests()
ClearObjectCopyRequests: @ 80071B8
thumb_func_start ClearSpriteCopyRequests
@ void ClearSpriteCopyRequests()
ClearSpriteCopyRequests: @ 80071B8
push {r4,r5,lr}
ldr r0, =gUnknown_02021834
ldr r0, =gShouldProcessSpriteCopyRequests
movs r1, 0
strb r1, [r0]
ldr r0, =gUnknown_02021835
@ -1113,7 +1113,7 @@ _080071CC:
pop {r0}
bx r0
.pool
thumb_func_end ClearObjectCopyRequests
thumb_func_end ClearSpriteCopyRequests
thumb_func_start ResetSpriteTransformationMatrices
@ void ResetSpriteTransformationMatrices()
@ -1211,9 +1211,9 @@ _08007286:
.pool
thumb_func_end CalcVecFromObjectCenterToObjectUpperLeft
thumb_func_start AllocObjectTiles
@ s16 AllocObjectTiles(u16 numTiles)
AllocObjectTiles: @ 800729C
thumb_func_start AllocSpriteTiles
@ s16 AllocSpriteTiles(u16 numTiles)
AllocSpriteTiles: @ 800729C
push {r4-r7,lr}
mov r7, r9
mov r6, r8
@ -1222,7 +1222,7 @@ AllocObjectTiles: @ 800729C
lsrs r4, r0, 16
cmp r4, 0
bne _080072F2
ldr r0, =gUnknown_02021B3A
ldr r0, =gReservedSpriteTileCount
ldrh r3, [r0]
ldr r0, =0x000003ff
cmp r3, r0
@ -1255,7 +1255,7 @@ _080072EC:
negs r0, r0
b _080073A4
_080072F2:
ldr r0, =gUnknown_02021B3A
ldr r0, =gReservedSpriteTileCount
ldrh r3, [r0]
ldr r0, =gUnknown_02021B3C
mov r9, r0
@ -1360,7 +1360,7 @@ _080073A4:
pop {r1}
bx r1
.pool
thumb_func_end AllocObjectTiles
thumb_func_end AllocSpriteTiles
thumb_func_start Unused_ObjectTileAllocationBitArrayOp
@ unsigned int Unused_ObjectTileAllocationBitArrayOp(u16 tileNum, u8 op)
@ -1432,7 +1432,7 @@ DummyObjectCallback: @ 8007428
@ void ProcessObjectCopyRequests()
ProcessObjectCopyRequests: @ 800742C
push {r4-r7,lr}
ldr r0, =gUnknown_02021834
ldr r0, =gShouldProcessSpriteCopyRequests
ldrb r0, [r0]
cmp r0, 0
beq _08007474
@ -1465,7 +1465,7 @@ _08007446:
cmp r1, 0
bne _08007446
_0800746E:
ldr r1, =gUnknown_02021834
ldr r1, =gShouldProcessSpriteCopyRequests
movs r0, 0
strb r0, [r1]
_08007474:
@ -1611,9 +1611,9 @@ _0800756E:
.pool
thumb_func_end Unused_CopyToObjects
thumb_func_start RemoveAllObjects
@ void RemoveAllObjects()
RemoveAllObjects: @ 800758C
thumb_func_start ResetAllSprites
@ void ResetAllSprites()
ResetAllSprites: @ 800758C
push {r4,r5,lr}
movs r4, 0
_08007590:
@ -1640,7 +1640,7 @@ _08007590:
pop {r0}
bx r0
.pool
thumb_func_end RemoveAllObjects
thumb_func_end ResetAllSprites
thumb_func_start FreeObjectTiles
@ void FreeObjectTiles(struct obj *object)
@ -3528,9 +3528,9 @@ _08008370:
.pool
thumb_func_end sub_8008324
thumb_func_start rotscale_reset_all
@ void rotscale_reset_all()
rotscale_reset_all: @ 800837C
thumb_func_start ResetAffineAnimData
@ void ResetAffineAnimData()
ResetAffineAnimData: @ 800837C
push {r4,lr}
ldr r1, =gUnknown_02021CC0
movs r0, 0
@ -3552,7 +3552,7 @@ _08008390:
pop {r0}
bx r0
.pool
thumb_func_end rotscale_reset_all
thumb_func_end ResetAffineAnimData
thumb_func_start rotscale_alloc_entry
@ u8 rotscale_alloc_entry()
@ -3734,7 +3734,7 @@ LoadObjectPic: @ 80084F8
adds r5, r0, 0
ldrh r0, [r5, 0x4]
lsrs r0, 5
bl AllocObjectTiles
bl AllocSpriteTiles
lsls r4, r0, 16
asrs r6, r4, 16
cmp r6, 0
@ -3850,9 +3850,9 @@ _080085C6:
.pool
thumb_func_end FreeObjectTilesByTag
thumb_func_start FreeAllObjectTiles
@ void FreeAllObjectTiles()
FreeAllObjectTiles: @ 80085E0
thumb_func_start FreeSpriteTileRanges
@ void FreeSpriteTileRanges()
FreeSpriteTileRanges: @ 80085E0
push {r4-r7,lr}
movs r2, 0
ldr r7, =gUnknown_030009F0
@ -3881,7 +3881,7 @@ _080085F0:
pop {r0}
bx r0
.pool
thumb_func_end FreeAllObjectTiles
thumb_func_end FreeSpriteTileRanges
thumb_func_start GetObjectTileRangeStartByTag
@ u16 GetObjectTileRangeStartByTag(u16 tag)
@ -4230,7 +4230,7 @@ AddSprite: @ 8008880
push {r4,lr}
adds r4, r0, 0
adds r3, r1, 0
ldr r1, =gUnknown_02021B38
ldr r1, =gOamLimit
ldrb r0, [r3]
ldrb r1, [r1]
cmp r0, r1
@ -4294,7 +4294,7 @@ AddSpritesFromSpriteOamTable: @ 80088EC
adds r3, r0, 0
str r1, [sp]
mov r8, r2
ldr r0, =gUnknown_02021B38
ldr r0, =gOamLimit
ldrb r1, [r2]
ldrb r0, [r0]
cmp r1, r0
@ -4385,7 +4385,7 @@ _080089A0:
_080089A6:
mov r2, r8
ldrb r0, [r2]
ldr r1, =gUnknown_02021B38
ldr r1, =gOamLimit
ldrb r1, [r1]
cmp r0, r1
bcs _08008908

View File

@ -301,8 +301,8 @@ set_256color_bg_bg0: @ 8133F0C
sub_81341E0: @ 81341E0
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -795,8 +795,8 @@ _080AAB1E:
c2_title_screen_2: @ 80AAB2C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0

View File

@ -1091,8 +1091,8 @@ _08077B30:
_08077B46:
bl RunTextPrinters
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x28
pop {r3}
@ -1705,8 +1705,8 @@ _080780E4:
bl SetMainCallback2
_080780F6:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x24
pop {r3}
@ -1882,8 +1882,8 @@ sub_807825C: @ 807825C
bl SetGpuReg
bl sub_8197224
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r4}
pop {r0}
@ -7521,8 +7521,8 @@ _0807B110:
_0807B116:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x4
pop {r4,r5}
@ -7840,8 +7840,8 @@ _0807B438:
_0807B43E:
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0xC
pop {r3}
@ -8054,8 +8054,8 @@ sub_807B60C: @ 807B60C
bl sub_807BBC8
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -12862,8 +12862,8 @@ _0807E4B4:
bne _0807E4C2
bl RunTasks
_0807E4C2:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r3}
mov r8, r3
@ -13556,8 +13556,8 @@ _0807EA96:
bl sub_807E4DC
bl RunTasks
bl RunTextPrinters
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r4-r6}
pop {r0}
@ -13610,8 +13610,8 @@ _0807EAEC:
strb r1, [r0]
_0807EB2C:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r4}
pop {r0}
@ -14105,8 +14105,8 @@ _0807F03A:
bne _0807F048
bl RunTasks
_0807F048:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x4
pop {r4}
@ -14152,8 +14152,8 @@ _0807F0B6:
bl SetMainCallback2
_0807F0BE:
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r4,r5}
pop {r0}
@ -14889,8 +14889,8 @@ _0807F70C:
bne _0807F71A
bl RunTasks
_0807F71A:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
add sp, 0x4
pop {r4,r5}

View File

@ -64,8 +64,8 @@ sub_80C26D4: @ 80C26D4
sub_80C2710: @ 80C2710
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
pop {r0}
bx r0
@ -5240,8 +5240,8 @@ _080C5416:
sub_80C5438: @ 80C5438
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
pop {r0}
bx r0
thumb_func_end sub_80C5438
@ -5502,8 +5502,8 @@ _080C5684:
b _080C56F4
.pool
_080C56D0:
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
lsls r0, 24
lsrs r1, r0, 24
@ -6947,7 +6947,7 @@ sub_80C62DC: @ 80C62DC
sub sp, 0x18
movs r5, 0
bl ResetObjectPaletteAllocator
bl rotscale_reset_all
bl ResetAffineAnimData
ldr r0, =gUnknown_085714E4
bl LoadTaggedObjectPalettes
ldr r4, =gUnknown_085714BC

View File

@ -528,8 +528,8 @@ _08134BA4:
sub_8134C9C: @ 8134C9C
push {lr}
bl RunTasks
bl CallObjectCallbacks
bl PrepareSpritesForOamLoad
bl AnimateSprites
bl BuildOamBuffer
bl do_scheduled_bg_tilemap_copies_to_vram
bl UpdatePaletteFade
pop {r0}

View File

@ -3498,12 +3498,12 @@ _080ACC0E:
bl StartObjectImageAnim
movs r0, 0x1
strh r0, [r5, 0x36]
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r0, [r5, 0x20]
ldrh r1, [r1]
subs r0, r1
strh r0, [r5, 0x20]
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r0, [r5, 0x22]
ldrh r1, [r1]
subs r0, r1
@ -4238,7 +4238,7 @@ sub_80AD204: @ 80AD204
adds r4, r0
lsls r4, 16
lsrs r4, 16
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
adds r0, r5, 0
adds r0, 0x29
ldrb r0, [r0]
@ -4252,7 +4252,7 @@ sub_80AD204: @ 80AD204
subs r1, r0
movs r7, 0
strh r1, [r5, 0x22]
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
adds r0, r5, 0
adds r0, 0x28
ldrb r0, [r0]
@ -4320,7 +4320,7 @@ sub_80AD2B0: @ 80AD2B0
strb r0, [r2]
ldr r0, =sub_80AD30C
str r0, [r3, 0x1C]
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
adds r0, r3, 0
adds r0, 0x29
ldrb r0, [r0]
@ -4380,7 +4380,7 @@ _080AD33E:
ldrsb r5, [r0, r5]
ldrh r0, [r4, 0x20]
adds r0, r5
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldrh r1, [r1]
adds r3, r1, r0
ldr r2, =0x000001ff
@ -4423,7 +4423,7 @@ _080AD39E:
ldrsb r3, [r0, r3]
ldrh r0, [r4, 0x22]
adds r0, r3
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r1, [r1]
adds r2, r1, r0
movs r0, 0xFF
@ -5239,7 +5239,7 @@ sub_80ADAF0: @ 80ADAF0
push {r4-r6,lr}
ldr r0, =gUnknown_0854C14C
ldr r6, [r0]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
ldr r1, =0x000006f2
adds r2, r6, r1
ldrh r0, [r0]
@ -5326,7 +5326,7 @@ sub_80ADBB0: @ 80ADBB0
push {r4,lr}
ldr r0, =gUnknown_0854C14C
ldr r2, [r0]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
ldr r1, =0x000006f2
adds r3, r2, r1
ldrh r0, [r0]
@ -5402,7 +5402,7 @@ _080ADC44:
sub_80ADC4C: @ 80ADC4C
push {r4,lr}
adds r3, r0, 0
ldr r0, =gUnknown_02021BBE
ldr r0, =gSpriteCoordOffsetY
ldrb r0, [r0]
strh r0, [r3, 0x26]
ldr r0, =gUnknown_0854C14C
@ -5637,7 +5637,7 @@ sub_80ADE48: @ 80ADE48
push {r4,r5,lr}
ldr r2, =gUnknown_0854C14C
ldr r1, [r2]
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
ldrh r0, [r0]
ldr r3, =0x000001ff
ands r3, r0
@ -5920,7 +5920,7 @@ sub_80AE068: @ 80AE068
adds r0, 0x1
strh r0, [r3, 0x2E]
_080AE084:
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r0, [r3, 0x2E]
ldrh r1, [r1]
adds r0, r1
@ -6187,7 +6187,7 @@ _080AE288:
strh r0, [r1]
strh r5, [r2]
_080AE2A4:
ldr r0, =gUnknown_02021BBC
ldr r0, =gSpriteCoordOffsetX
movs r2, 0xE4
lsls r2, 3
adds r1, r3, r2
@ -6199,7 +6199,7 @@ _080AE2A4:
subs r2, 0x8
adds r1, r3, r2
strh r0, [r1]
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
adds r2, 0xA
adds r0, r3, r2
ldrh r0, [r0]
@ -6632,7 +6632,7 @@ sub_80AE624: @ 80AE624
ldr r0, [r3]
subs r0, r1
str r0, [r3]
ldr r1, =gUnknown_02021BBC
ldr r1, =gSpriteCoordOffsetX
ldr r0, [r4]
lsrs r0, 8
ldrh r1, [r1]
@ -6642,7 +6642,7 @@ sub_80AE624: @ 80AE624
ldr r4, =0x0000070e
adds r1, r2, r4
strh r0, [r1]
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldr r0, [r3]
lsrs r0, 8
ldrh r1, [r1]
@ -7235,7 +7235,7 @@ sub_80AEB48: @ 80AEB48
adds r3, r0, r1
adds r1, 0x2
adds r0, r1
ldr r1, =gUnknown_02021BBE
ldr r1, =gSpriteCoordOffsetY
ldrh r2, [r0]
ldrh r0, [r1]
subs r2, r0

22
include/text_window.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef GUARD_TEXT_WINDOW_H
#define GUARD_TEXT_WINDOW_H
struct TilesPal
{
u32* tiles;
u16* pal;
};
const struct TilesPal* sub_8098758(u8 id);
void copy_textbox_border_tile_patterns_to_vram(u8 windowId, u16 destOffset, u8 palOffset);
void sub_809882C(u8 windowId, u16 destOffset, u8 palOffset);
void sub_80987D4(u8 windowId, u8 frameId, u16 destOffset, u8 palOffset);
void box_border_load_tiles_and_pal(u8 windowId, u16 destOffset, u8 palOffset);
void sub_8098858(u8 windowId, u16 tileNum, u8 palNum);
void sub_80989E0(u8 windowId, u16 tileNum, u8 palNum);
void rbox_fill_rectangle(u8 windowId);
const u16* stdpal_get(u8 id);
const u16* sub_8098C64(void);
void sub_8098C6C(u8 bg, u16 destOffset, u8 palOffset);
#endif // GUARD_TEXT_WINDOW_H

View File

@ -22,7 +22,7 @@ extern void rfu_REQ_stopMode(void);
extern void rfu_waitREQComplete(void);
extern bool32 sub_8087634(void);
extern bool32 sub_80875C8(void);
extern void ClearObjectCopyRequests(void);
extern void ClearSpriteCopyRequests(void);
extern void PlayTimeCounter_Update(void);
extern void MapMusicMain(void);
extern void EnableInterrupts(u16);
@ -159,7 +159,7 @@ void AgbMain()
if (sub_80875C8() == 1)
{
gMain.newKeys = 0;
ClearObjectCopyRequests();
ClearSpriteCopyRequests();
gUnknown_030022B4 = 1;
UpdateLinkAndCallCallbacks();
gUnknown_030022B4 = 0;

3
src/sprite.c Normal file
View File

@ -0,0 +1,3 @@
#include "global.h"

View File

@ -1,25 +1,17 @@
#include "global.h"
#include "text.h"
#include "text_window.h"
#include "window.h"
#include "palette.h"
extern u8 LoadBgTiles(u8 bg, const void *src, u16 size, u16 destOffset);
extern void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette);
struct TilesPal
{
u32* tiles;
u16* pal;
};
extern const struct TilesPal gUnknown_0851021C[];
extern const u32 gUnknown_08DDD748[];
extern const u16 gUnknown_0851017C[];
extern const u16 gUnknown_08DDD728[];
const u16* sub_8098C64(void);
void sub_809882C(u8 windowId, u16 destOffset, u8 palOffset);
const struct TilesPal* sub_8098758(u8 id)
{
if (id > 19)

View File

@ -28,7 +28,7 @@ gUnknown_02021774: @ 2021774
gUnknown_020217F4: @ 20217F4
.space 0x40
gUnknown_02021834: @ 2021834
gShouldProcessSpriteCopyRequests: @ 2021834
.space 0x1
gUnknown_02021835: @ 2021835
@ -37,19 +37,19 @@ gUnknown_02021835: @ 2021835
gUnknown_02021838: @ 2021838
.space 0x300
gUnknown_02021B38: @ 2021B38
gOamLimit: @ 2021B38
.space 0x2
gUnknown_02021B3A: @ 2021B3A
gReservedSpriteTileCount: @ 2021B3A
.space 0x2
gUnknown_02021B3C: @ 2021B3C
.space 0x80
gUnknown_02021BBC: @ 2021BBC
gSpriteCoordOffsetX: @ 2021BBC
.space 0x2
gUnknown_02021BBE: @ 2021BBE
gSpriteCoordOffsetY: @ 2021BBE
.space 0x2
gUnknown_02021BC0: @ 2021BC0