decompile more of sprite.s

This commit is contained in:
DizzyEggg 2017-09-02 01:42:44 +02:00
parent 26bf61e06f
commit c146c247f2
76 changed files with 1217 additions and 2475 deletions

View File

@ -17057,9 +17057,9 @@ _0804F470:
bl DestroySprite
ldr r4, =0x0000d75a
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0804F48C:
pop {r4}
pop {r0}

View File

@ -1757,7 +1757,7 @@ sub_805DFE4: @ 805DFE4
lsrs r0, 13
adds r0, r1
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
.pool

View File

@ -111,7 +111,7 @@ sub_814AF54: @ 814AF54
adds r0, r1
lsls r0, 2
adds r0, r6
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -574,7 +574,7 @@ sub_814B340: @ 814B340
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -621,7 +621,7 @@ sub_814B3DC: @ 814B3DC
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -840,9 +840,9 @@ sub_814B5A8: @ 814B5A8
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
@ -3501,7 +3501,7 @@ _0814CE5C:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]

View File

@ -288,7 +288,7 @@ _080A3BC2:
move_anim_8072740: @ 80A3BFC
push {r4,lr}
adds r4, r0, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
ldr r1, =gUnknown_020383FE
@ -496,9 +496,9 @@ ma01_080728D0: @ 80A3D8C
adds r0, r1
ldrh r5, [r0, 0x6]
adds r0, r5, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r5, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, [r6]
adds r0, 0x2
str r0, [r6]
@ -823,12 +823,12 @@ _080A404A:
lsls r0, 3
adds r0, r6
ldrh r0, [r0, 0x6]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldrh r0, [r4]
lsls r0, 3
adds r0, r6
ldrh r0, [r0, 0x6]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrh r1, [r4]
adds r0, r7, 0
orrs r0, r1

View File

@ -8394,7 +8394,7 @@ _08102B1C:
bl SetGpuRegBits
_08102B26:
ldr r0, =0x00002771
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
bl move_anim_task_del
_08102B32:
@ -8598,7 +8598,7 @@ _08102CAA:
lsls r0, 2
adds r0, r6
ldrh r0, [r0]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0x1
lsls r0, 16
lsrs r4, r0, 16
@ -12098,7 +12098,7 @@ sub_81048F0: @ 81048F0
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl obj_delete_but_dont_free_vram
_0810492E:
@ -13276,7 +13276,7 @@ sub_8105284: @ 8105284
cmp r0, 0
beq _0810529E
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl move_anim_8072740
_0810529E:
@ -14620,7 +14620,7 @@ sub_8105D60: @ 8105D60
movs r4, 0x2
_08105D6A:
ldrh r0, [r5]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r5, 0x2
subs r4, 0x1
cmp r4, 0
@ -19936,7 +19936,7 @@ sub_810886C: @ 810886C
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_081088D8:
@ -20403,7 +20403,7 @@ sub_8108C54: @ 8108C54
cmp r0, 0
bne _08108C8C
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
_08108C8C:
@ -25102,7 +25102,7 @@ sub_810B1F0: @ 810B1F0
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_0810B230:
@ -27886,7 +27886,7 @@ _0810C8D0:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r1, [r4, 0x1]
movs r0, 0x4
negs r0, r0
@ -28272,7 +28272,7 @@ _0810CBE6:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
b _0810CC32
@ -28296,7 +28296,7 @@ _0810CC04:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_0810CC32:
@ -28335,7 +28335,7 @@ sub_810CC3C: @ 810CC3C
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_0810CC7C:
@ -28865,7 +28865,7 @@ sub_810D0B8: @ 810D0B8
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
movs r0, 0x3C
ldrsh r1, [r5, r0]
lsls r0, r1, 4
@ -31064,7 +31064,7 @@ sub_810E2C8: @ 810E2C8
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r1, [r4, 0x1]
movs r0, 0x4
negs r0, r0
@ -33733,7 +33733,7 @@ _0810F786:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r1, [r4, 0x1]
movs r0, 0x4
negs r0, r0
@ -34515,7 +34515,7 @@ sub_810FDF0: @ 810FDF0
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
_0810FE0E:
@ -34833,7 +34833,7 @@ _0811006C:
cmp r0, 0
bge _08110094
adds r0, r5, 0
bl rotscale_free_entry
bl FreeOamMatrix
mov r0, r8
bl move_anim_task_del
b _08110116
@ -35033,7 +35033,7 @@ _08110228:
ldrh r0, [r4, 0x24]
lsls r0, 24
lsrs r0, 24
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r5, 0
bl move_anim_task_del
_08110238:
@ -38554,7 +38554,7 @@ _08111ED0:
cmp r0, 0
bge _08111F0C
adds r0, r7, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_08111EFE:
adds r0, r4, 0
bl move_anim_task_del
@ -38934,7 +38934,7 @@ _081121F0:
adds r0, r3
bl obj_delete_but_dont_free_vram
ldr r0, =0x00002771
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x50
movs r1, 0
bl SetGpuReg

View File

@ -576,9 +576,9 @@ sub_817094C: @ 817094C
lsls r6, 24
lsrs r6, 24
ldr r0, =0x0000d709
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =0x0000d70a
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =0x0000d6ff
bl IndexOfSpritePaletteTag
adds r4, r0, 0
@ -2401,7 +2401,7 @@ _08171880:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r7]
adds r0, r4
ldrb r1, [r0]
@ -2554,7 +2554,7 @@ sub_81719C0: @ 81719C0
.pool
_081719D8:
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
_081719E4:
@ -4415,7 +4415,7 @@ sub_8172944: @ 8172944
cmp r0, 0x1
bne _081729CA
adds r0, r7, 0
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
b _081729E2
.pool
_08172970:
@ -4454,9 +4454,9 @@ _081729AA:
ldr r4, =gUnknown_085E50F4
_081729B4:
ldrh r0, [r5, 0x6]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldrh r0, [r4, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r5, 0x8
adds r4, 0x8
adds r6, 0x1
@ -5466,7 +5466,7 @@ sub_81731FC: @ 81731FC
subs r1, 0x1
strh r1, [r0, 0x20]
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
_08173246:
@ -5517,7 +5517,7 @@ _08173264:
subs r1, 0x1
strh r1, [r0, 0x20]
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
_081732A6:
@ -5555,9 +5555,9 @@ sub_81732E4: @ 81732E4
lsrs r4, 24
ldr r5, =0x0000281d
adds r0, r5, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r5, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
bl move_anim_task_del
pop {r4,r5}

View File

@ -315,7 +315,7 @@ _080A9EAA:
cmp r0, 0
beq _080A9EE6
adds r0, r4, 0
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
b _080A9EEC
_080A9EE6:
adds r0, r4, 0
@ -601,7 +601,7 @@ sub_80AA124: @ 80AA124
ldr r0, =gSprites
adds r4, r0
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
b _080AA186

View File

@ -138,7 +138,7 @@ sub_8064470: @ 8064470
adds r0, r1
lsls r0, 2
adds r0, r5
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
@ -358,9 +358,9 @@ _08064600:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
b _080646F2
.pool
_0806469C:
@ -401,9 +401,9 @@ _0806469C:
bne _080646F2
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_080646F2:
ldr r0, =gUnknown_020244D0
ldr r0, [r0]
@ -946,9 +946,9 @@ _08064B7C:
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
bl sub_8065068
_08064BB6:
pop {r4-r7}
@ -1050,7 +1050,7 @@ sub_8064C58: @ 8064C58
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -1296,9 +1296,9 @@ sub_8064E50: @ 8064E50
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
@ -3932,7 +3932,7 @@ _0806666C:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -5864,7 +5864,7 @@ sub_80676FC: @ 80676FC
ldrh r0, [r4, 0x6]
bl sub_805DFE4
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
pop {r4}

View File

@ -138,7 +138,7 @@ sub_805F240: @ 805F240
adds r0, r1
lsls r0, 2
adds r0, r5
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
@ -377,9 +377,9 @@ _0805F408:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
b _0805F51A
.pool
_0805F494:
@ -417,9 +417,9 @@ _0805F494:
bne _0805F53C
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0805F4E4:
mov r1, r8
ldr r0, [r1]
@ -1040,9 +1040,9 @@ _0805F9E0:
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
bl dp01_tbl7_exec_completed
_0805FA48:
pop {r4,r5}
@ -1144,7 +1144,7 @@ sub_805FB08: @ 805FB08
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -1390,9 +1390,9 @@ sub_805FD00: @ 805FD00
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
@ -4094,7 +4094,7 @@ _080615B4:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -6216,7 +6216,7 @@ sub_806280C: @ 806280C
ldrh r0, [r4, 0x6]
bl sub_805DFE4
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
pop {r4}

View File

@ -2324,7 +2324,7 @@ bx_802F7A0: @ 80588B4
adds r0, r1
lsls r0, 2
adds r0, r6
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -2528,9 +2528,9 @@ _08058A0E:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r7, =gBattlePartyID
ldrb r1, [r6]
lsls r0, r1, 1
@ -3064,9 +3064,9 @@ sub_8058EDC: @ 8058EDC
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, [r5]
ldrb r2, [r6]
ldr r1, [r0]
@ -3917,7 +3917,7 @@ sub_80596A8: @ 80596A8
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -3964,7 +3964,7 @@ sub_8059744: @ 8059744
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -7149,7 +7149,7 @@ _0805B41C:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -9842,13 +9842,13 @@ sub_805CC00: @ 805CC00
ldrh r4, [r5, 0x38]
lsls r4, 24
lsrs r4, 24
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r5, 0x5]
lsrs r0, 4
bl GetObjectPaletteTagBySlot
lsls r0, 16
lsrs r0, 16
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r5, 0
bl DestroySprite
ldr r1, =gBattlePartyID

View File

@ -7843,7 +7843,7 @@ sub_8149F08: @ 8149F08
thumb_func_start sub_8149F2C
sub_8149F2C: @ 8149F2C
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -70,7 +70,7 @@ sub_807F764: @ 807F764
str r0, [sp, 0xC]
movs r0, 0x2
bl SetBgAffine
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
add sp, 0x10

View File

@ -45,7 +45,7 @@ sub_8177C54: @ 8177C54
thumb_func_start sub_8177C70
sub_8177C70: @ 8177C70
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -1339,7 +1339,7 @@ sub_8150800: @ 8150800
ldrb r1, [r0, 0x9]
movs r0, 0x12
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r4}

View File

@ -199,7 +199,7 @@ _08152208:
cmp r5, r4
bcs _08152242
adds r3, r6, 0
ldr r0, =gDefaultOamAttributes
ldr r0, =gDummyOamData
mov r12, r0
movs r2, 0x4
mov r8, r2
@ -254,7 +254,7 @@ _0815226C:
bcs _08152292
ldr r0, =gUnknown_030024F8
mov r12, r0
ldr r4, =gDefaultOamAttributes
ldr r4, =gDummyOamData
adds r2, r5, 0
_0815227A:
lsls r1, r3, 3
@ -352,7 +352,7 @@ _08152322:
lsls r0, r6, 3
ldr r1, =gUnknown_030024F8
adds r0, r1
ldr r1, =gDefaultOamAttributes
ldr r1, =gDummyOamData
ldm r1!, {r2,r3}
stm r0!, {r2,r3}
b _081523C0
@ -748,7 +748,7 @@ _081525FC:
lsls r1, r5, 3
ldr r0, =gUnknown_030024F8
adds r1, r0
ldr r0, =gDefaultOamAttributes
ldr r0, =gDummyOamData
ldm r0!, {r2,r3}
stm r1!, {r2,r3}
adds r0, r5, 0

View File

@ -1365,7 +1365,7 @@ vblank_cb_battle: @ 80D827C
movs r0, 0x46
bl SetGpuReg
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
pop {r0}
@ -4604,7 +4604,7 @@ _080D9FEC:
cmp r0, 0
bge _080DA100
adds r0, r6, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r6, 0
bl DestroySprite
movs r0, 0x14
@ -10029,11 +10029,11 @@ sub_80DCB78: @ 80DCB78
lsls r4, 2
adds r4, r1
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
adds r0, r5, 0
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
pop {r4,r5}
pop {r0}
bx r0
@ -13526,7 +13526,7 @@ _080DE7EE:
lsls r0, 2
ldr r1, =gSprites
adds r0, r1
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r4, 0x1
cmp r4, 0x3
ble _080DE7EE

View File

@ -489,7 +489,7 @@ sub_80F5C24: @ 80F5C24
ldrh r1, [r0]
movs r0, 0x46
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8

View File

@ -552,7 +552,7 @@ _081302C0:
sub_81302D0: @ 81302D0
push {lr}
bl sub_8130280
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -8,7 +8,7 @@
thumb_func_start sub_81754C8
sub_81754C8: @ 81754C8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -4148,7 +4148,7 @@ _08128C10:
_08128C30:
bl sub_812A3C8
ldr r0, =0x00000be5
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r1, =gUnknown_03005DAC
ldr r0, =sub_8128CD4
str r0, [r1]
@ -5078,7 +5078,7 @@ gpu_pal_decompress_alloc_tag_and_upload: @ 8129334
cmp r0, 0x4
beq _081293B4
ldr r0, =0x00000be5
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r5, 0
bl sub_81291E8
ldr r0, [r5]
@ -7060,7 +7060,7 @@ _0812A3BE:
sub_812A3C8: @ 812A3C8
push {lr}
movs r0, 0x8
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
thumb_func_end sub_812A3C8

View File

@ -8,7 +8,7 @@
thumb_func_start sub_8177874
sub_8177874: @ 8177874
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -67,7 +67,7 @@ sub_811A278: @ 811A278
sub_811A290: @ 811A290
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
pop {r0}
bx r0

View File

@ -458,7 +458,7 @@ _08071712:
thumb_func_start sub_807172C
sub_807172C: @ 807172C
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -3662,7 +3662,7 @@ sub_813FCDC: @ 813FCDC
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
@ -3706,7 +3706,7 @@ sub_813FD64: @ 813FD64
ldrh r1, [r0]
movs r0, 0x1E
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8

View File

@ -335,7 +335,7 @@ _080B5D48:
cmp r2, 0x3F
bls _080B5D1E
adds r0, r3, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080B5D58:
pop {r4,r5}
pop {r0}
@ -381,7 +381,7 @@ _080B5DA0:
cmp r2, 0x3F
bls _080B5D84
adds r0, r5, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_080B5DB0:
pop {r4-r6}
pop {r0}
@ -755,7 +755,7 @@ sub_80B6070: @ 80B6070
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
_080B608E:
adds r0, r5, 0
bl sub_818D820
@ -7331,7 +7331,7 @@ _080B95F6:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r1, [r4, 0x1]
lsrs r1, 6
ldrb r2, [r4, 0x3]
@ -7507,7 +7507,7 @@ _080B9756:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r2, r4, 0
adds r2, 0x3E
ldrb r0, [r2]

View File

@ -3190,7 +3190,7 @@ sub_8155800: @ 8155800
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
ldr r0, =gUnknown_082EC6AC
ldr r0, =gDummySpriteTemplate
movs r1, 0
movs r2, 0
movs r3, 0xFF

View File

@ -18079,7 +18079,7 @@ sub_80956F4: @ 80956F4
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4, 0x1]
movs r1, 0x4
negs r1, r1

View File

@ -87,7 +87,7 @@ sub_81701C4: @ 81701C4
thumb_func_start sub_8170260
sub_8170260: @ 8170260
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -2496,7 +2496,7 @@ _080FB07E:
cmp r1, r0
bne _080FB098
adds r0, r4, 0
bl FreeObjectPalette
bl FreeSpritePalette
adds r0, r4, 0
bl DestroySprite
_080FB098:

View File

@ -426,7 +426,7 @@ _0817F7D0:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r2, [r4, 0x3]
lsls r1, r2, 26
lsrs r1, 27

View File

@ -8,7 +8,7 @@
thumb_func_start sub_817354C
sub_817354C: @ 817354C
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -1356,7 +1356,7 @@ _081740DC:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl sub_818D820
_081740FA:
@ -3380,9 +3380,9 @@ _081752D4:
bl sub_8152254
ldr r4, =0x000003e9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r4}
pop {r0}
bx r0

View File

@ -8,7 +8,7 @@
thumb_func_start sub_816CBE8
sub_816CBE8: @ 816CBE8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8

View File

@ -328,7 +328,7 @@ _0800969E:
thumb_func_start sub_80096BC
sub_80096BC: @ 80096BC
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -9528,7 +9528,7 @@ sub_800E084: @ 800E084
movs r0, 0x84
lsls r0, 3
adds r3, r0
ldr r0, =gDefaultOamAttributes
ldr r0, =gDummyOamData
ldr r1, [r0]
ldr r2, [r0, 0x4]
str r1, [r3]
@ -16588,7 +16588,7 @@ sub_8011AC8: @ 8011AC8
thumb_func_start sub_8011AE8
sub_8011AE8: @ 8011AE8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -28583,7 +28583,7 @@ sub_8018404: @ 8018404
sub_8018424: @ 8018424
push {lr}
bl ProcessSpriteCopyRequests
bl LoadOamFromSprites
bl LoadOam
bl TransferPlttBuffer
pop {r0}
bx r0
@ -32554,7 +32554,7 @@ _0801A414:
thumb_func_start sub_801A418
sub_801A418: @ 801A418
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -33539,7 +33539,7 @@ _0801AC38:
thumb_func_start sub_801AC40
sub_801AC40: @ 801AC40
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -36741,9 +36741,9 @@ _0801C6A4:
movs r4, 0x80
lsls r4, 8
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0801C6B4:
pop {r4-r7}
pop {r0}
@ -39835,7 +39835,7 @@ _0801DF04:
sub_801DF20: @ 801DF20
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
pop {r0}
@ -45843,7 +45843,7 @@ _08020F66:
sub_8020F74: @ 8020F74
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
pop {r0}
bx r0
@ -46668,7 +46668,7 @@ _0802166E:
ldr r0, =SpriteCallbackDummy
str r0, [r5, 0x1C]
adds r0, r5, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r5, 0
bl DestroySprite
_0802169A:
@ -46692,9 +46692,9 @@ _080216B6:
adds r0, r7
ldrh r4, [r0]
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
@ -48910,19 +48910,19 @@ sub_8022960: @ 8022960
adds r5, r0, 0
movs r4, 0
movs r0, 0x4
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x3
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x2
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x1
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x4
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x2
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x1
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0xD8
lsls r0, 1
adds r6, r5, r0
@ -55991,7 +55991,7 @@ sub_80261CC: @ 80261CC
sub_80261E4: @ 80261E4
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
pop {r0}
bx r0
@ -60697,7 +60697,7 @@ _08028622:
adds r0, r1
cmp r0, 0
beq _0802863C
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
_0802863C:
adds r0, r4, 0x1
lsls r0, 24
@ -60931,7 +60931,7 @@ _080287E8:
adds r0, r1
cmp r0, 0
beq _08028806
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
_08028806:
adds r0, r4, 0x1
lsls r0, 24
@ -65138,7 +65138,7 @@ sub_802AC2C: @ 802AC2C
sub_802AC58: @ 802AC58
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
pop {r0}
bx r0
@ -72875,14 +72875,14 @@ _0802E8FC:
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x6]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r1, =gUnknown_082FE6D8
movs r2, 0x8
ldrsh r0, [r4, r2]
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r4,r5}
pop {r0}
bx r0
@ -73256,7 +73256,7 @@ _0802EC08:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
movs r3, 0xE
ldrsh r1, [r5, r3]
lsls r0, r1, 4
@ -73291,9 +73291,9 @@ _0802EC4C:
adds r0, r4
bl DestroySprite
ldrh r0, [r5, 0x4]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldrh r0, [r5, 0x6]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r6, 0
bl DestroyTask
_0802EC8A:

View File

@ -883,7 +883,7 @@ _08121BCC:
thumb_func_start sub_8121C50
sub_8121C50: @ 8121C50
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -21,7 +21,7 @@ CB2_MainMenu: @ 802F6B0
@ void VBlankCB_MainMenu()
VBlankCB_MainMenu: @ 802F6C8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -839,7 +839,7 @@ _081223C0:
adds r0, r1
lsls r0, 2
adds r0, r7
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
b _081223EC
.pool
_081223DC:

View File

@ -257,13 +257,13 @@ _0811FAFE:
adds r0, r5, r0
lsls r0, 16
lsrs r0, 16
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, [r4]
ldrh r0, [r0, 0x2]
adds r0, r5, r0
lsls r0, 16
lsrs r0, 16
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r5, 0x1
lsls r0, 16
lsrs r5, r0, 16

View File

@ -393,7 +393,7 @@ RemoveMoneyLabelObject: @ 80E53F4
lsls r0, 2
ldr r1, =gSprites
adds r0, r1
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
pop {r0}
bx r0
.pool

View File

@ -8,7 +8,7 @@
thumb_func_start sub_8178944
sub_8178944: @ 8178944
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -4090,7 +4090,7 @@ sub_80E4F84: @ 80E4F84
thumb_func_start sub_80E4F94
sub_80E4F94: @ 80E4F94
push {r4,r5,lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
ldr r5, =gUnknown_02039F94

View File

@ -19,7 +19,7 @@ sub_80BA4B0: @ 80BA4B0
thumb_func_start sub_80BA4C8
sub_80BA4C8: @ 80BA4C8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -2173,9 +2173,9 @@ sub_816C060: @ 816C060
bne _0816C0B2
ldr r4, =0x000013f6
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
adds r1, r4, 0
adds r2, r6, 0
@ -2218,9 +2218,9 @@ sub_816C0C8: @ 816C0C8
beq _0816C0FA
ldr r4, =0x000013f6
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1

View File

@ -20,7 +20,7 @@ sub_8179B68: @ 8179B68
thumb_func_start sub_8179B84
sub_8179B84: @ 8179B84
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -1044,7 +1044,7 @@ sub_817A4F8: @ 817A4F8
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4, 0x1]
movs r1, 0x3
orrs r0, r1
@ -1406,7 +1406,7 @@ _0817A8E0:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r2, =0x00001050
adds r1, r4, r2
movs r0, 0x46
@ -1569,7 +1569,7 @@ sub_817AA3C: @ 817AA3C
ldr r0, =gUnknown_0203BD18
ldr r0, [r0]
ldr r0, [r0]
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
movs r0, 0
pop {r1}
bx r1

View File

@ -79,7 +79,7 @@ sub_80BB358: @ 80BB358
thumb_func_start sub_80BB370
sub_80BB370: @ 80BB370
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -1708,9 +1708,9 @@ _0813D7D8:
sub_813D824: @ 813D824
push {r4,r5,lr}
movs r0, 0x2
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x2
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r4, 0
ldr r1, =gUnknown_0203AB7C
ldr r0, [r1]
@ -1742,9 +1742,9 @@ _0813D846:
bcc _0813D846
_0813D86C:
movs r0, 0x3
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x3
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r4, 0
_0813D87A:
ldr r0, =gUnknown_0203AB7C

View File

@ -734,7 +734,7 @@ sub_8145914: @ 8145914
bl GetObjectPaletteTagBySlot
lsls r0, 16
lsrs r0, 16
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, [r6]
ldrh r1, [r0, 0x4]
lsls r0, r1, 4

View File

@ -430,11 +430,11 @@ sub_812305C: @ 812305C
ldr r0, [r4]
adds r0, 0x58
ldrh r0, [r0]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, [r4]
adds r0, 0x5A
ldrh r0, [r0]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_08123080:
ldr r0, [r4]
ldr r0, [r0, 0x20]
@ -444,11 +444,11 @@ _08123080:
ldr r0, [r4]
adds r0, 0x70
ldrh r0, [r0]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, [r4]
adds r0, 0x72
ldrh r0, [r0]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081230A0:
pop {r4}
pop {r0}
@ -2742,11 +2742,11 @@ sub_8124238: @ 8124238
ldr r0, [r4]
adds r0, 0x58
ldrh r0, [r0]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, [r4]
adds r0, 0x5A
ldrh r0, [r0]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0812425C:
pop {r4}
pop {r0}
@ -3516,7 +3516,7 @@ _081248AA:
thumb_func_start sub_81248C0
sub_81248C0: @ 81248C0
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -343,7 +343,7 @@ sub_809EB8C: @ 809EB8C
push {lr}
ldr r0, =gUnknown_085104C4
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
.pool
@ -886,7 +886,7 @@ _0809EFCA:
movs r0, 0
movs r1, 0x80
bl ResetOamRange
bl LoadOamFromSprites
bl LoadOam
bl remove_some_task
bl dp12_8087EA4
bl ResetSpriteData
@ -950,7 +950,7 @@ sub_809F090: @ 809F090
sub_809F0AC: @ 809F0AC
push {lr}
bl ProcessSpriteCopyRequests
bl LoadOamFromSprites
bl LoadOam
bl TransferPlttBuffer
pop {r0}
bx r0

View File

@ -3635,7 +3635,7 @@ SetFieldVBlankCallback: @ 8086380
thumb_func_start VBlankCB_Field
VBlankCB_Field: @ 8086390
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
bl FieldUpdateBgTilemapScroll
@ -4169,7 +4169,7 @@ _08086816:
movs r0, 0
movs r1, 0x80
bl ResetOamRange
bl LoadOamFromSprites
bl LoadOam
add sp, 0x4
pop {r4-r7}
pop {r0}

View File

@ -581,7 +581,7 @@ sub_813591C: @ 813591C
thumb_func_start sub_8135938
sub_8135938: @ 8135938
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -1920,7 +1920,7 @@ _081364B4:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, =SpriteCallbackDummy
str r0, [r4, 0x1C]
_081364E0:
@ -3428,7 +3428,7 @@ sub_81371D4: @ 81371D4
thumb_func_start sub_81371EC
sub_81371EC: @ 81371EC
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -10378,9 +10378,9 @@ _0813AB18:
_0813AB2C:
ldr r4, =0x0000157c
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
lsls r0, r5, 24
lsrs r0, 24
str r4, [sp]
@ -10455,9 +10455,9 @@ sub_813ABD4: @ 813ABD4
lsrs r5, 16
ldr r4, =0x0000157c
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
adds r1, r4, 0
adds r2, r5, 0
@ -10519,7 +10519,7 @@ sub_813AC44: @ 813AC44
lsls r0, 2
ldr r1, =gSprites
adds r0, r1
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
_0813AC6A:
ldr r1, =gUnknown_0203AB6C
movs r0, 0x40

View File

@ -1015,7 +1015,7 @@ _08035426:
lsls r0, 2
adds r0, r1
ldrh r0, [r0, 0x10]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_08035442:
adds r0, r4, 0
bl sub_80355B4
@ -1028,7 +1028,7 @@ _08035442:
lsls r0, 2
adds r0, r1
ldrh r0, [r0, 0x12]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0803545E:
ldr r0, =gUnknown_02022E10
ldr r0, [r0]
@ -7021,7 +7021,7 @@ _08038A3A:
ldrh r1, [r0]
movs r0, 0x46
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
@ -7079,11 +7079,11 @@ _08038B36:
beq _08038B6A
ldr r4, =0x00002710
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r5, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r5, 0
bl DestroySprite
_08038B6A:
@ -8755,7 +8755,7 @@ sub_8039A48: @ 8039A48
cmp r0, 0
bge _08039A7C
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
b _08039AC8

View File

@ -3350,14 +3350,14 @@ _08073E96:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
b _08073F32
.pool
_08073EFC:
@ -3367,7 +3367,7 @@ _08073EFC:
ldr r5, =gSprites
adds r4, r5
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
mov r0, sp
@ -3376,7 +3376,7 @@ _08073EFC:
adds r0, r1
lsls r0, 2
adds r0, r5
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 4
@ -3488,14 +3488,14 @@ _08073FE6:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r4
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
movs r5, 0x1
_08074016:
mov r1, sp
@ -5887,10 +5887,10 @@ sub_8075370: @ 8075370
bne _080753A8
ldr r0, =gUnknown_0831C620
ldrh r0, [r0, 0x6]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0831C628
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r1, 0x30
ldrsh r0, [r4, r1]
cmp r0, 0
@ -7453,7 +7453,7 @@ _0807605C:
ands r0, r2
strb r0, [r1]
adds r0, r5, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r5, 0
bl DestroySprite
movs r3, 0
@ -7531,7 +7531,7 @@ _08076130:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
movs r1, 0x3A
ldrsh r0, [r6, r1]
adds r0, r4
@ -7542,7 +7542,7 @@ _08076130:
adds r0, r5
bl DestroySprite
adds r0, r6, 0
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
ldr r0, =gMain
ldr r1, =0x00000439
adds r0, r1
@ -8245,7 +8245,7 @@ _080766FC:
bl sub_806ED40
_08076708:
adds r0, r4, 0
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
_0807670E:
pop {r3,r4}
mov r8, r3
@ -8501,7 +8501,7 @@ _08076904:
thumb_func_start obj_delete_and_free_associated_resources_
obj_delete_and_free_associated_resources_: @ 807690C
push {lr}
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
pop {r0}
bx r0
thumb_func_end obj_delete_and_free_associated_resources_
@ -8740,11 +8740,11 @@ sub_8076AE8: @ 8076AE8
lsrs r4, 21
adds r0, r4, r0
ldrh r0, [r0, 0x6]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0832C460
adds r4, r0
ldrh r0, [r4, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r4}
pop {r0}
bx r0

View File

@ -1419,7 +1419,7 @@ _080A6744:
move_anim_8074EE0: @ 80A674C
push {r4,lr}
adds r4, r0, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl move_anim_8072740
pop {r4}
@ -5395,7 +5395,7 @@ _080A85EE:
thumb_func_start sub_80A8610
sub_80A8610: @ 80A8610
push {lr}
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
pop {r0}
bx r0
thumb_func_end sub_80A8610
@ -6281,7 +6281,7 @@ _080A8D58:
cmp r0, 0
bne _080A8D6C
ldr r0, =0x00002771
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r5, 0
bl move_anim_task_del
_080A8D6C:

View File

@ -1141,21 +1141,21 @@ sub_80C7890: @ 80C7890
adds r2, 0x6
adds r0, r1, r2
ldrh r0, [r0]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_080C78AC:
ldr r0, [r5]
movs r4, 0x90
lsls r4, 2
adds r0, r4
ldrh r0, [r0]
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, [r5]
adds r0, r4
ldrh r0, [r0]
adds r0, 0x1
lsls r0, 16
lsrs r0, 16
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
pop {r4,r5}
pop {r0}
bx r0
@ -1700,7 +1700,7 @@ _080C7D24:
thumb_func_start sub_80C7D28
sub_80C7D28: @ 80C7D28
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80D2AA4
bl TransferPlttBuffer
@ -6002,9 +6002,9 @@ _080CA420:
cmp r0, 0
bne _080CA43C
movs r0, 0x2
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =0x0000dac6
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_080CA43C:
add sp, 0x28
pop {r4-r7}
@ -9407,7 +9407,7 @@ sub_80CC020: @ 80CC020
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, [r4]
ldr r1, =0x00000b04
adds r0, r1
@ -11136,12 +11136,12 @@ sub_80CCEE0: @ 80CCEE0
cmp r0, 0
bne _080CCF00
movs r0, 0x4
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
b _080CCF06
.pool
_080CCF00:
movs r0, 0x3
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080CCF06:
ldr r0, =gUnknown_02039D08
ldr r0, [r0]
@ -23060,7 +23060,7 @@ _080D2FA2:
lsls r0, r4, 3
adds r0, r5
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0x1
lsls r0, 24
lsrs r4, r0, 24
@ -23091,7 +23091,7 @@ _080D2FD2:
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
.pool
@ -23109,7 +23109,7 @@ sub_80D2FF0: @ 80D2FF0
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x4]
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
.pool
@ -23296,7 +23296,7 @@ _080D312A:
lsrs r1, 17
ldr r3, =0x06010000
adds r1, r3
bl AddTilesToObjectCopyRequests
bl RequestSpriteCopy
mov r0, r8
ldrb r1, [r0]
ldr r0, [r4, 0x8]
@ -26701,16 +26701,16 @@ RemoveBagObject: @ 80D4CA8
beq _080D4CEE
adds r4, 0x64
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1
@ -27022,9 +27022,9 @@ AddBagItemIconObject: @ 80D4F38
bne _080D4F86
adds r4, 0x66
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
adds r1, r4, 0
adds r2, r6, 0
@ -27240,7 +27240,7 @@ sub_80D50D4: @ 80D50D4
sub_80D510C: @ 80D510C
push {lr}
ldr r0, =0x00007544
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
.pool
@ -27266,7 +27266,7 @@ sub_80D511C: @ 80D511C
lsrs r0, 24
mov r8, r0
ldr r0, =0x00007544
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
bl sub_80D5070
ldr r0, =gUnknown_0857FC7C

View File

@ -372,7 +372,7 @@ sub_813C890: @ 813C890
thumb_func_start sub_813C8D8
sub_813C8D8: @ 813C8D8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -11204,7 +11204,7 @@ _0815E658:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
movs r0, 0x26
ldrsh r1, [r4, r0]
lsls r0, r1, 4
@ -15099,7 +15099,7 @@ _08160618:
thumb_func_start sub_8160624
sub_8160624: @ 8160624
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -25928,7 +25928,7 @@ sub_816631C: @ 816631C
thumb_func_start sub_8166340
sub_8166340: @ 8166340
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
ldr r0, =gUnknown_0203BCAC
@ -26910,13 +26910,13 @@ _08166C70:
cmp r4, 0x6
bls _08166C70
movs r0, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x1
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x1
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r4, 0
_08166CAE:
ldr r0, [r5]
@ -28106,9 +28106,9 @@ sub_8167608: @ 8167608
cmp r1, 0x40
bne _081676AC
movs r0, 0x64
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x64
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, [r7]
add r0, r8
movs r1, 0xFF
@ -30181,9 +30181,9 @@ _08168842:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
@ -30343,7 +30343,7 @@ sub_8168A20: @ 8168A20
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -32562,7 +32562,7 @@ _08169E80:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]

View File

@ -2878,7 +2878,7 @@ sub_81865C8: @ 81865C8
adds r0, r1
lsls r0, 2
adds r0, r5
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r6
ldrb r1, [r0]
@ -3125,9 +3125,9 @@ _0818676A:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_08186816:
ldr r0, =gUnknown_020244D0
ldr r0, [r0]
@ -3668,9 +3668,9 @@ _08186CC0:
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
bl sub_81871AC
_08186CFA:
pop {r4-r7}
@ -3772,7 +3772,7 @@ sub_8186D9C: @ 8186D9C
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -4018,9 +4018,9 @@ sub_8186F94: @ 8186F94
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r0, [r5]
adds r0, r6
ldrb r1, [r0]
@ -6654,7 +6654,7 @@ _081887B0:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -8344,7 +8344,7 @@ sub_818962C: @ 818962C
ldrh r0, [r4, 0x6]
bl sub_805DFE4
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
pop {r4}
@ -8813,7 +8813,7 @@ sub_81899F0: @ 81899F0
adds r0, r1
lsls r0, 2
adds r0, r6
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -9025,9 +9025,9 @@ _08189B86:
strb r4, [r0, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r7, =gBattlePartyID
ldrb r1, [r5]
lsls r0, r1, 1
@ -9651,7 +9651,7 @@ sub_818A114: @ 818A114
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -9698,7 +9698,7 @@ sub_818A1B0: @ 818A1B0
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -9917,9 +9917,9 @@ sub_818A37C: @ 818A37C
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
@ -12578,7 +12578,7 @@ _0818BC30:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -15635,7 +15635,7 @@ _0818D5F0:
bl GetObjectPaletteTagBySlot
lsls r0, 16
lsrs r0, 16
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_0818D624:
adds r0, r6, r4
lsls r0, 2
@ -29411,7 +29411,7 @@ sub_8194B70: @ 8194B70
ldrh r1, [r0]
movs r0, 0x1A
bl SetGpuReg
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -29539,7 +29539,7 @@ sub_8194CE4: @ 8194CE4
movs r1, 0x80
movs r2, 0x1
bl ChangeBgY
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80BA0A8
@ -40722,7 +40722,7 @@ sub_819A4C8: @ 819A4C8
thumb_func_start sub_819A4E4
sub_819A4E4: @ 819A4E4
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -43997,7 +43997,7 @@ sub_819C100: @ 819C100
ldrb r0, [r5, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, [r4]
adds r0, r7
ldrb r1, [r0]
@ -44008,7 +44008,7 @@ sub_819C100: @ 819C100
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, [r4]
ldr r1, =0x0000029d
adds r0, r1
@ -44020,7 +44020,7 @@ sub_819C100: @ 819C100
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, [r4]
movs r1, 0xA8
lsls r1, 2
@ -44795,7 +44795,7 @@ sub_819C7E0: @ 819C7E0
thumb_func_start sub_819C7FC
sub_819C7FC: @ 819C7FC
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -50052,7 +50052,7 @@ sub_819F444: @ 819F444
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
lsrs r4, 24
lsls r0, r4, 4
adds r0, r4
@ -50283,7 +50283,7 @@ sub_819F654: @ 819F654
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
movs r1, 0x3C
ldrsh r0, [r4, r1]
cmp r0, 0x1
@ -61464,7 +61464,7 @@ _081A5520:
bl SetGpuReg
movs r0, 0xFA
lsls r0, 2
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_081A553C:
movs r6, 0x1
_081A553E:
@ -72294,7 +72294,7 @@ c2_bag_3: @ 81AAD5C
thumb_func_start vblank_cb_bag_menu
vblank_cb_bag_menu: @ 81AAD78
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -80843,12 +80843,12 @@ RemoveScrollIndicatorArrowPair: @ 81AF620
ldr r4, =0x0000ffff
cmp r0, r4
beq _081AF63E
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_081AF63E:
ldrh r0, [r5, 0x10]
cmp r0, r4
beq _081AF648
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081AF648:
ldrb r1, [r5, 0xC]
lsls r0, r1, 4
@ -81179,7 +81179,7 @@ _081AF896:
ldrh r1, [r6, 0x4]
bl ListMenuSetUpRedOutlineCursorSpriteOamTable
mov r1, sp
ldr r0, =gUnknown_082EC6AC
ldr r0, =gDummySpriteTemplate
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
ldm r0!, {r2,r3,r7}
@ -81314,12 +81314,12 @@ ListMenuRemoveRedOutlineCursorObject: @ 81AF9D8
ldr r6, =0x0000ffff
cmp r0, r6
beq _081AF9FC
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_081AF9FC:
ldrh r0, [r4, 0x10]
cmp r0, r6
beq _081AFA06
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081AFA06:
ldrb r1, [r4, 0xC]
lsls r0, r1, 4
@ -81526,12 +81526,12 @@ ListMenuRemoveRedArrowCursorObject: @ 81AFBA0
ldr r6, =0x0000ffff
cmp r0, r6
beq _081AFBBE
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_081AFBBE:
ldrh r0, [r4, 0x4]
cmp r0, r6
beq _081AFBC8
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081AFBC8:
ldrb r1, [r4]
lsls r0, r1, 4
@ -82311,7 +82311,7 @@ sub_81B01B0: @ 81B01B0
thumb_func_start sub_81B01CC
sub_81B01CC: @ 81B01CC
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -159,7 +159,7 @@ sub_81BAE98: @ 81BAE98
adds r0, r1
lsls r0, 2
adds r0, r6
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -1196,7 +1196,7 @@ sub_81BB78C: @ 81BB78C
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r0, [r4]
adds r0, r5
ldrb r1, [r0]
@ -1243,7 +1243,7 @@ sub_81BB828: @ 81BB828
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -1462,9 +1462,9 @@ sub_81BB9F4: @ 81BB9F4
strb r0, [r1, 0x1]
ldr r4, =0x000027f9
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, =c3_0802FDF4
movs r1, 0xA
bl CreateTask
@ -4123,7 +4123,7 @@ _081BD2A8:
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r0, [r6]
adds r0, r5
ldrb r1, [r0]
@ -6841,7 +6841,7 @@ sub_81BEA00: @ 81BEA00
lsrs r4, 24
movs r0, 0xFA
lsls r0, 4
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl DestroyTask
bl script_env_2_enable_and_set_ctx_running
@ -8770,7 +8770,7 @@ sub_81BFAB4: @ 81BFAB4
thumb_func_start sub_81BFAD0
sub_81BFAD0: @ 81BFAD0
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -10138,7 +10138,7 @@ _081C0786:
lsls r0, 2
ldr r1, =gSprites
adds r0, r1
bl ResetSpriteAndFreeResources
bl DestroySpriteAndFreeResources
b _081C08EC
.pool
_081C07A8:
@ -17532,7 +17532,7 @@ sub_81C47B4: @ 81C47B4
ldr r5, =gSprites
adds r7, r4, r5
adds r0, r7, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrh r0, [r6, 0x2]
movs r1, 0
strh r0, [r7, 0x2E]
@ -17782,7 +17782,7 @@ sub_81C49E0: @ 81C49E0
ldr r0, [r0, 0x8]
bl DestroySprite
ldr r0, =0x00007533
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl sub_81C4984
pop {r4}
@ -18539,7 +18539,7 @@ sub_81C501C: @ 81C501C
thumb_func_start sub_81C5038
sub_81C5038: @ 81C5038
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -21972,16 +21972,16 @@ sub_81C6E38: @ 81C6E38
ldr r0, =0x00001024
adds r4, r0
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
ldr r4, =gSprites
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1
@ -22124,9 +22124,9 @@ sub_81C6F90: @ 81C6F90
ldr r0, =0x00001025
adds r4, r0
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r0, r4, 0
adds r1, r4, 0
adds r2, r6, 0
@ -22663,7 +22663,7 @@ sub_81C7400: @ 81C7400
sub_81C7418: @ 81C7418
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
pop {r0}
bx r0
@ -23780,9 +23780,9 @@ sub_81C7C94: @ 81C7C94
ldr r0, [r0, 0x18]
bl DestroySprite
movs r0, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
thumb_func_end sub_81C7C94
@ -26263,9 +26263,9 @@ sub_81C8FE0: @ 81C8FE0
ldr r0, [r4, 0x44]
bl DestroySprite
movs r0, 0xA
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x14
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r4}
pop {r0}
bx r0
@ -28314,21 +28314,21 @@ _081C9FCA:
sub_81C9FEC: @ 81C9FEC
push {lr}
movs r0, 0x3
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x1
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x4
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x5
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x6
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x7
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x8
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x3
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
bl sub_81CA094
bl sub_81CA698
pop {r0}
@ -28402,7 +28402,7 @@ _081CA0A2:
movs r5, 0x3
_081CA0AA:
ldr r0, [r4]
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldm r4!, {r0}
bl DestroySprite
subs r5, 0x1
@ -29023,7 +29023,7 @@ _081CA526:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldrb r1, [r4, 0x1]
lsrs r1, 6
ldrb r2, [r4, 0x3]
@ -29510,7 +29510,7 @@ _081CA908:
sub_81CA914: @ 81CA914
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_80BA0A8
pop {r0}
@ -32820,13 +32820,13 @@ _081CC2C8:
bl DestroySprite
_081CC2D2:
movs r0, 0x8
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x7
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0xC
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0xD
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r4}
pop {r0}
bx r0
@ -33328,7 +33328,7 @@ sub_81CC670: @ 81CC670
sub_81CC6A4: @ 81CC6A4
push {lr}
bl TransferPlttBuffer
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl sub_81237B4
pop {r0}
@ -33741,9 +33741,9 @@ sub_81CC9EC: @ 81CC9EC
bl sub_81C763C
adds r4, r0, 0
movs r0, 0x6
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0xB
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
adds r5, r4, 0
adds r5, 0xC
movs r4, 0x2
@ -37845,13 +37845,13 @@ sub_81CEBF4: @ 81CEBF4
ldr r0, [r0]
bl DestroySprite
movs r0, 0x6A
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x69
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x6A
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x69
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
b _081CEC68
.pool
_081CEC28:
@ -37873,15 +37873,15 @@ _081CEC2A:
cmp r4, 0x6
bls _081CEC2A
movs r0, 0x65
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x66
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x67
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x65
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x66
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081CEC68:
ldr r0, =0x00001816
adds r1, r5, r0
@ -37896,9 +37896,9 @@ _081CEC68:
adds r0, r1
bl DestroySprite
movs r0, 0x64
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x64
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
_081CEC8E:
pop {r4,r5}
pop {r0}
@ -38019,9 +38019,9 @@ sub_81CED30: @ 81CED30
cmp r0, 0x40
bne _081CEDBC
movs r0, 0x64
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x64
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0xFF
strb r0, [r7]
b _081CEE26
@ -38086,7 +38086,7 @@ sub_81CEE44: @ 81CEE44
push {r4,lr}
bl sub_81CDC70
adds r4, r0, 0
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
adds r0, r4, 0
@ -41756,19 +41756,19 @@ sub_81D09F4: @ 81D09F4
adds r0, r4, 0
bl sub_81D1178
movs r0, 0x9
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0xF
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x10
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x11
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x12
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x13
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldr r0, [r4, 0x14]
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldr r0, [r4, 0x14]
bl DestroySprite
movs r0, 0xE
@ -47440,9 +47440,9 @@ sub_81D354C: @ 81D354C
push {lr}
bl sub_81D3520
movs r0, 0x68
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0x68
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
pop {r0}
bx r0
thumb_func_end sub_81D354C
@ -53577,7 +53577,7 @@ sub_81D67D0: @ 81D67D0
thumb_func_start sub_81D67EC
sub_81D67EC: @ 81D67EC
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -61497,9 +61497,9 @@ sub_81DAA20: @ 81DAA20
adds r5, r0, 0
ldr r4, =0x00002e90
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
movs r0, 0x10
ldrsh r1, [r5, r0]
lsls r0, r1, 4

View File

@ -628,7 +628,7 @@ _080FBC94:
ldr r0, =gSprites
adds r4, r0
adds r0, r4, 0
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
adds r0, r4, 0
bl DestroySprite
movs r0, 0x40

View File

@ -30,7 +30,7 @@ _0814025A:
sub_8140264: @ 8140264
push {r4,lr}
sub sp, 0x4
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_8142814
@ -4874,11 +4874,11 @@ sub_8142C0C: @ 8142C0C
.pool
_08142C44:
movs r0, 0xE
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0xD
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0xC
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
bl ResetObjectPaletteAllocator
_08142C5A:
pop {r0}
@ -9237,7 +9237,7 @@ _08144FC8:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
ldr r0, [r4]
adds r0, 0x74
ldrb r1, [r0]

View File

@ -71,7 +71,7 @@ fullscreen_save_activate: @ 8178F90
thumb_func_start sub_8178FC8
sub_8178FC8: @ 8178FC8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -902,7 +902,7 @@ _080F8F42:
bl GetObjectPaletteTagBySlot
lsls r0, 16
lsrs r0, 16
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r0, [r4, 0x1]
lsls r0, 30
cmp r0, 0
@ -910,7 +910,7 @@ _080F8F42:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
_080F8F72:
adds r0, r4, 0
bl DestroySprite

View File

@ -378,7 +378,7 @@ CB2_BuyMenu: @ 80DFD64
@ void VBlankCB_BuyMenu()
VBlankCB_BuyMenu: @ 80DFD80
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -1027,9 +1027,9 @@ BuyMenuRemoveItemIcon: @ 80E031C
ldr r0, =0x0000083e
adds r4, r0
adds r0, r4, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
adds r0, r4, 0
bl FreeObjectPaletteByTag
bl FreeSpritePaletteByTag
ldrb r1, [r5]
lsls r0, r1, 4
adds r0, r1

View File

@ -201,7 +201,7 @@ sub_812A670: @ 812A670
thumb_func_start sub_812A688
sub_812A688: @ 812A688
push {r4,lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
ldr r4, =gUnknown_0203AB34
@ -9361,7 +9361,7 @@ sub_812EECC: @ 812EECC
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
pop {r4}
@ -9440,7 +9440,7 @@ sub_812EF6C: @ 812EF6C
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
pop {r4}

File diff suppressed because it is too large Load Diff

View File

@ -26,7 +26,7 @@ _08133EE8:
thumb_func_start sub_8133EF8
sub_8133EF8: @ 8133EF8
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -586,7 +586,7 @@ _08134450:
ldrb r0, [r0, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl sub_818D820
ldrb r0, [r5, 0xC]
@ -597,7 +597,7 @@ _08134450:
ldrb r0, [r4, 0x3]
lsls r0, 26
lsrs r0, 27
bl rotscale_free_entry
bl FreeOamMatrix
adds r0, r4, 0
bl DestroySprite
ldr r0, =sub_81344AC

View File

@ -465,7 +465,7 @@ _080AA766:
title_screen_vblank_callback: @ 80AA780
push {lr}
bl sub_80BA0A8
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
ldr r0, =gUnknown_02022E1A

View File

@ -1720,7 +1720,7 @@ _080780F6:
thumb_func_start sub_807811C
sub_807811C: @ 807811C
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -6960,7 +6960,7 @@ _0807AC1C:
sub_807AC24: @ 807AC24
push {lr}
bl sub_807ABCC
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}
@ -10453,7 +10453,7 @@ _0807CD1C:
adds r0, r1
lsls r0, 2
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldr r0, [r7]
adds r0, 0xD3
ldrb r1, [r0]
@ -12558,7 +12558,7 @@ _0807E168:
adds r0, r1
lsls r0, 2
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldr r0, [r7]
adds r0, 0xD3
ldrb r1, [r0]
@ -13527,7 +13527,7 @@ sub_807EA2C: @ 807EA2C
adds r0, r1
lsls r0, 2
adds r0, r4
bl obj_free_rotscale_entry
bl FreeSpriteOamMatrix
ldr r0, =gUnknown_02032298
ldrb r4, [r0]
ldrb r0, [r0, 0x1]

View File

@ -8,7 +8,7 @@
thumb_func_start sub_80C2690
sub_80C2690: @ 80C2690
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
bl sub_80C48C8
@ -5226,7 +5226,7 @@ pokemon_details: @ 80C53AC
movs r0, 0x2
bl SetBgAffine
_080C5416:
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
add sp, 0x10
@ -7096,9 +7096,9 @@ _080C642C:
bls _080C6410
bl ResetObjectPaletteAllocator
movs r0, 0x2
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
movs r0, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
pop {r4-r6}
pop {r0}
bx r0
@ -7411,7 +7411,7 @@ _080C6732:
beq _080C6746
bl DestroySprite
movs r0, 0
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080C6746:
ldr r0, [r4]
ldr r0, [r0, 0xC]
@ -7419,7 +7419,7 @@ _080C6746:
beq _080C6758
bl DestroySprite
movs r0, 0x1
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080C6758:
ldr r0, [r4]
ldr r0, [r0, 0x8]
@ -7427,7 +7427,7 @@ _080C6758:
beq _080C676A
bl DestroySprite
movs r0, 0x4
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080C676A:
bl FreeAllWindowBuffers
b _080C67A4

View File

@ -8,7 +8,7 @@
thumb_func_start sub_81347B4
sub_81347B4: @ 81347B4
push {lr}
bl LoadOamFromSprites
bl LoadOam
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
pop {r0}

View File

@ -2833,7 +2833,7 @@ _080AC686:
bls _080AC678
movs r0, 0x90
lsls r0, 5
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0854C14C
ldr r0, [r0]
ldr r1, =0x000006de
@ -3910,7 +3910,7 @@ _080ACF6A:
movs r1, 0
strb r1, [r0]
ldr r0, =0x00001206
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
pop {r4-r7}
pop {r0}
bx r0
@ -5552,7 +5552,7 @@ _080ADD8C:
cmp r4, 0x13
bls _080ADD7E
ldr r0, =0x00001201
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0854C14C
ldr r0, [r0]
ldr r1, =0x000006fb
@ -5888,7 +5888,7 @@ _080AE03A:
cmp r4, 0x13
bls _080AE02C
ldr r0, =0x00001202
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0854C14C
ldr r0, [r0]
movs r1, 0xE0
@ -6325,7 +6325,7 @@ _080AE3CE:
cmp r4, 0x13
bls _080AE3C0
ldr r0, =0x00001203
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0854C14C
ldr r0, [r0]
ldr r1, =0x00000724
@ -6691,7 +6691,7 @@ _080AE6CA:
movs r1, 0
strb r1, [r0]
ldr r0, =0x00001204
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
_080AE6E6:
ldr r0, =gUnknown_0854C14C
ldr r1, [r0]
@ -7318,7 +7318,7 @@ _080AEBFE:
cmp r4, 0x3F
bls _080AEBE4
ldr r0, =0x00001205
bl FreeObjectTilesByTag
bl FreeSpriteTilesByTag
ldr r0, =gUnknown_0854C14C
ldr r0, [r0]
ldr r1, =0x0000072c

View File

@ -825,7 +825,7 @@ gFieldEffectObjectRotScalAnimTable_Unknown21:: @ 850D284
gFieldEffectObjectTemplate_Unknown21:: @ 850D28C
.2byte 0x0 @ tiles tag
.2byte 0xFFFF @ palette tag
.4byte gDefaultOamAttributes
.4byte gDummyOamData
.4byte gDummyObjectImageAnimTable
.4byte NULL
.4byte gFieldEffectObjectRotScalAnimTable_Unknown21

View File

@ -6,14 +6,14 @@
@ Unreferenced data. Also unreferenced in Ruby.
.incbin "baserom.gba", 0x2ec61c, 0x18
gUnknown_082EC634:: @ 82EC634
sCenterToCornerVecTable:: @ 82EC634
.incbin "baserom.gba", 0x2ec634, 0x18
sDummySprite:: @ 82EC64C
.incbin "baserom.gba", 0x2ec64c, 0x44
@ off-screen and low priority relative to background
gDefaultOamAttributes:: @ 82EC690
gDummyOamData:: @ 82EC690
.2byte 160 @ Y
.2byte 304 @ X
.2byte 3 << 10 @ priority
@ -34,19 +34,19 @@ gDummyObjectRotScalAnim:: @ 82EC6A0
gDummyObjectRotScalAnimTable:: @ 82EC6A8
.4byte gDummyObjectRotScalAnim
gUnknown_082EC6AC:: @ 82EC6AC
gDummySpriteTemplate:: @ 82EC6AC
.incbin "baserom.gba", 0x2ec6ac, 0x18
gUnknown_082EC6C4:: @ 82EC6C4
sAnimFuncs:: @ 82EC6C4
.incbin "baserom.gba", 0x2ec6c4, 0x8
gUnknown_082EC6CC:: @ 82EC6CC
sAffineAnimFuncs:: @ 82EC6CC
.incbin "baserom.gba", 0x2ec6cc, 0x8
gUnknown_082EC6D4:: @ 82EC6D4
sAnimCmdFuncs:: @ 82EC6D4
.incbin "baserom.gba", 0x2ec6d4, 0x10
gUnknown_082EC6E4:: @ 82EC6E4
sAffineAnimCmdFuncs:: @ 82EC6E4
.incbin "baserom.gba", 0x2ec6e4, 0x10
gUnknown_082EC6F4:: @ 82EC6F4

View File

@ -259,13 +259,45 @@ void RequestSpriteCopy(const u8 *src, u8 *dest, u16 size);
void FreeSpriteTiles(struct Sprite *sprite);
void FreeSpritePalette(struct Sprite *sprite);
void FreeSpriteOamMatrix(struct Sprite *sprite);
void RequestSpriteCopy(const u8 *src, u8 *dest, u16 size);
void FreeSpriteTiles(struct Sprite *sprite);
void FreeSpritePalette(struct Sprite *sprite);
void FreeSpriteOamMatrix(struct Sprite *sprite);
void DestroySpriteAndFreeResources(struct Sprite *sprite);
void sub_800142C(u32 a1, u32 a2, u16 *a3, u16 a4, u32 a5);
void AnimateSprite(struct Sprite *sprite);
void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum);
void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex);
void StartSpriteAffineAnim(struct Sprite *sprite, u8 animNum);
void StartSpriteAffineAnimIfDifferent(struct Sprite *sprite, u8 animNum);
void ChangeSpriteAffineAnim(struct Sprite *sprite, u8 animNum);
void ChangeSpriteAffineAnimIfDifferent(struct Sprite *sprite, u8 animNum);
void SetSpriteSheetFrameTileNum(struct Sprite *sprite);
u8 AllocOamMatrix(void);
void FreeOamMatrix(u8 matrixNum);
void InitSpriteAffineAnim(struct Sprite *sprite);
void SetOamMatrixRotationScaling(u8 matrixNum, s16 xScale, s16 yScale, u16 rotation);
u16 LoadSpriteSheet(const struct SpriteSheet *sheet);
void LoadSpriteSheets(const struct SpriteSheet *sheets);
u16 AllocTilesForSpriteSheet(struct SpriteSheet *sheet);
void AllocTilesForSpriteSheets(struct SpriteSheet *sheets);
void LoadTilesForSpriteSheet(const struct SpriteSheet *sheet);
void LoadTilesForSpriteSheets(struct SpriteSheet *sheets);
void FreeSpriteTilesByTag(u16 tag);
void FreeSpriteTileRanges(void);
void AnimateSprite(struct Sprite *sprite);
u16 GetSpriteTileStartByTag(u16 tag);
u16 GetSpriteTileTagByTileStart(u16 start);
void RequestSpriteSheetCopy(const struct SpriteSheet *sheet);
u16 LoadSpriteSheetDeferred(const struct SpriteSheet *sheet);
void FreeAllSpritePalettes(void);
u8 LoadSpritePalette(const struct SpritePalette *palette);
void LoadSpritePalettes(const struct SpritePalette *palettes);
u8 AllocSpritePalette(u16 tag);
u8 IndexOfSpritePaletteTag(u16 tag);
u16 GetSpritePaletteTagByPaletteNum(u8 paletteNum);
void FreeSpritePaletteByTag(u16 tag);
void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables);
bool8 AddSpriteToOamBuffer(struct Sprite *object, u8 *oamIndex);
bool8 AddSubspritesToOamBuffer(struct Sprite *sprite, struct OamData *destOam, u8 *oamIndex);
void CopyToSprites(u8 *src);
void CopyFromSprites(u8 *dest);
u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
#endif //GUARD_SPRITE_H

View File

@ -2,8 +2,29 @@
#include "sprite.h"
#include "main.h"
#define MAX_SPRITE_COPY_REQUESTS 64
#define OAM_MATRIX_COUNT 32
#define SET_SPRITE_TILE_RANGE(index, start, count) \
{ \
sSpriteTileRanges[index * 2] = start; \
(sSpriteTileRanges + 1)[index * 2] = count; \
}
#define ALLOC_SPRITE_TILE(n) \
{ \
gSpriteTileAllocBitmap[(n) / 8] |= (1 << ((n) % 8)); \
}
#define FREE_SPRITE_TILE(n) \
{ \
gSpriteTileAllocBitmap[(n) / 8] &= ~(1 << ((n) % 8)); \
}
#define SPRITE_TILE_IS_ALLOCATED(n) ((gSpriteTileAllocBitmap[(n) / 8] >> ((n) % 8)) & 1)
struct SpriteCopyRequest
{
const u8 *src;
@ -60,6 +81,13 @@ void ResetAffineAnimData(void);
u8 IndexOfSpriteTileTag(u16 tag);
void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
void obj_update_pos2(struct Sprite* sprite, s16 arg1, s16 arg2);
typedef void (*AnimFunc)(struct Sprite *);
typedef void (*AnimCmdFunc)(struct Sprite *);
typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
extern struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT];
EWRAM_DATA struct Sprite gSprites[MAX_SPRITES + 1] = {0};
EWRAM_DATA u16 gSpritePriorities[MAX_SPRITES] = {0};
@ -75,6 +103,15 @@ EWRAM_DATA s16 gSpriteCoordOffsetY = 0;
EWRAM_DATA struct OamMatrix gOamMatrices[OAM_MATRIX_COUNT] = {0};
EWRAM_DATA bool8 gAffineAnimsDisabled = 0;
extern const struct OamData gDummyOamData;
extern const struct SpriteTemplate gDummySpriteTemplate;
extern const struct Sprite sDummySprite;
extern const u8 sCenterToCornerVecTable[3][4][2];
extern const AnimFunc sAnimFuncs[];
extern const AnimFunc sAffineAnimFuncs[];
extern const AnimCmdFunc sAnimCmdFuncs[];
extern const AffineAnimCmdFunc sAffineAnimCmdFuncs[];
void ResetSpriteData(void)
{
ResetOamRange(0, 128);
@ -259,3 +296,622 @@ void CopyMatricesToOamBuffer(void)
}
}
void AddSpritesToOamBuffer(void)
{
u8 i = 0;
u8 oamIndex = 0;
while (i < MAX_SPRITES)
{
struct Sprite *sprite = &gSprites[gSpriteOrder[i]];
if (sprite->inUse && !sprite->invisible && AddSpriteToOamBuffer(sprite, &oamIndex))
return;
i++;
}
while (oamIndex < gOamLimit)
{
gMain.oamBuffer[oamIndex] = gDummyOamData;
oamIndex++;
}
}
u8 CreateSprite(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
{
u8 i;
for (i = 0; i < MAX_SPRITES; i++)
if (!gSprites[i].inUse)
return CreateSpriteAt(i, template, x, y, subpriority);
return MAX_SPRITES;
}
u8 CreateSpriteAtEnd(const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
{
s16 i;
for (i = MAX_SPRITES - 1; i > -1; i--)
if (!gSprites[i].inUse)
return CreateSpriteAt(i, template, x, y, subpriority);
return MAX_SPRITES;
}
u8 CreateInvisibleSprite(void (*callback)(struct Sprite *))
{
u8 index = CreateSprite(&gDummySpriteTemplate, 0, 0, 31);
if (index == MAX_SPRITES)
{
return MAX_SPRITES;
}
else
{
gSprites[index].invisible = TRUE;
gSprites[index].callback = callback;
return index;
}
}
u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
{
struct Sprite *sprite = &gSprites[index];
ResetSprite(sprite);
sprite->inUse = TRUE;
sprite->animBeginning = TRUE;
sprite->affineAnimBeginning = TRUE;
sprite->usingSheet = TRUE;
sprite->subpriority = subpriority;
sprite->oam = *template->oam;
sprite->anims = template->anims;
sprite->affineAnims = template->affineAnims;
sprite->template = template;
sprite->callback = template->callback;
sprite->pos1.x = x;
sprite->pos1.y = y;
CalcCenterToCornerVec(sprite, sprite->oam.shape, sprite->oam.size, sprite->oam.affineMode);
if (template->tileTag == 0xFFFF)
{
s16 tileNum;
sprite->images = template->images;
tileNum = AllocSpriteTiles((u8)(sprite->images->size / TILE_SIZE_4BPP));
if (tileNum == -1)
{
ResetSprite(sprite);
return MAX_SPRITES;
}
sprite->oam.tileNum = tileNum;
sprite->usingSheet = FALSE;
sprite->sheetTileStart = 0;
}
else
{
sprite->sheetTileStart = GetSpriteTileStartByTag(template->tileTag);
SetSpriteSheetFrameTileNum(sprite);
}
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
InitSpriteAffineAnim(sprite);
if (template->paletteTag != 0xFFFF)
sprite->oam.paletteNum = IndexOfSpritePaletteTag(template->paletteTag);
return index;
}
u8 CreateSpriteAndAnimate(struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority)
{
u8 i;
for (i = 0; i < MAX_SPRITES; i++)
{
struct Sprite *sprite = &gSprites[i];
if (!gSprites[i].inUse)
{
u8 index = CreateSpriteAt(i, template, x, y, subpriority);
if (index == MAX_SPRITES)
return MAX_SPRITES;
gSprites[i].callback(sprite);
if (gSprites[i].inUse)
AnimateSprite(sprite);
return index;
}
}
return MAX_SPRITES;
}
void DestroySprite(struct Sprite *sprite)
{
if (sprite->inUse)
{
if (!sprite->usingSheet)
{
u16 i;
u16 tileEnd = (sprite->images->size / TILE_SIZE_4BPP) + sprite->oam.tileNum;
for (i = sprite->oam.tileNum; i < tileEnd; i++)
FREE_SPRITE_TILE(i);
}
ResetSprite(sprite);
}
}
void ResetOamRange(u8 a, u8 b)
{
u8 i;
for (i = a; i < b; i++)
{
struct OamData *oamBuffer = gMain.oamBuffer;
oamBuffer[i] = *(struct OamData *)&gDummyOamData;
}
}
void LoadOam(void)
{
if (!gMain.oamLoadDisabled)
CpuCopy32(gMain.oamBuffer, (void *)OAM, sizeof(gMain.oamBuffer));
}
void ClearSpriteCopyRequests(void)
{
u8 i;
gShouldProcessSpriteCopyRequests = FALSE;
gSpriteCopyRequestCount = 0;
for (i = 0; i < MAX_SPRITE_COPY_REQUESTS; i++)
{
gSpriteCopyRequests[i].src = 0;
gSpriteCopyRequests[i].dest = 0;
gSpriteCopyRequests[i].size = 0;
}
}
void ResetOamMatrices(void)
{
u8 i;
for (i = 0; i < OAM_MATRIX_COUNT; i++)
{
// set to identity matrix
gOamMatrices[i].a = 0x0100;
gOamMatrices[i].b = 0x0000;
gOamMatrices[i].c = 0x0000;
gOamMatrices[i].d = 0x0100;
}
}
void SetOamMatrix(u8 matrixNum, u16 a, u16 b, u16 c, u16 d)
{
gOamMatrices[matrixNum].a = a;
gOamMatrices[matrixNum].b = b;
gOamMatrices[matrixNum].c = c;
gOamMatrices[matrixNum].d = d;
}
void ResetSprite(struct Sprite *sprite)
{
*sprite = sDummySprite;
}
void CalcCenterToCornerVec(struct Sprite *sprite, u8 shape, u8 size, u8 affineMode)
{
u8 x = sCenterToCornerVecTable[shape][size][0];
u8 y = sCenterToCornerVecTable[shape][size][1];
if (affineMode & ST_OAM_AFFINE_DOUBLE_MASK)
{
x *= 2;
y *= 2;
}
sprite->centerToCornerVecX = x;
sprite->centerToCornerVecY = y;
}
s16 AllocSpriteTiles(u16 tileCount)
{
u16 i;
s16 start;
u16 numTilesFound;
if (tileCount == 0)
{
// Free all unreserved tiles if the tile count is 0.
for (i = gReservedSpriteTileCount; i < TOTAL_OBJ_TILE_COUNT; i++)
FREE_SPRITE_TILE(i);
return 0;
}
i = gReservedSpriteTileCount;
for (;;)
{
while (SPRITE_TILE_IS_ALLOCATED(i))
{
i++;
if (i == TOTAL_OBJ_TILE_COUNT)
return -1;
}
start = i;
numTilesFound = 1;
while (numTilesFound != tileCount)
{
i++;
if (i == TOTAL_OBJ_TILE_COUNT)
return -1;
if (!SPRITE_TILE_IS_ALLOCATED(i))
numTilesFound++;
else
break;
}
if (numTilesFound == tileCount)
break;
}
for (i = start; i < tileCount + start; i++)
ALLOC_SPRITE_TILE(i);
return start;
}
u8 SpriteTileAllocBitmapOp(u16 bit, u8 op)
{
u8 index = bit / 8;
u8 shift = bit % 8;
u8 val = bit % 8;
u8 retVal = 0;
if (op == 0)
{
val = ~(1 << val);
gSpriteTileAllocBitmap[index] &= val;
}
else if (op == 1)
{
val = (1 << val);
gSpriteTileAllocBitmap[index] |= val;
}
else
{
retVal = 1 << shift;
retVal &= gSpriteTileAllocBitmap[index];
}
return retVal;
}
void SpriteCallbackDummy(struct Sprite *sprite)
{
}
void ProcessSpriteCopyRequests(void)
{
if (gShouldProcessSpriteCopyRequests)
{
u8 i = 0;
while (gSpriteCopyRequestCount > 0)
{
CpuCopy16(gSpriteCopyRequests[i].src, gSpriteCopyRequests[i].dest, gSpriteCopyRequests[i].size);
gSpriteCopyRequestCount--;
i++;
}
gShouldProcessSpriteCopyRequests = FALSE;
}
}
void RequestSpriteFrameImageCopy(u16 index, u16 tileNum, const struct SpriteFrameImage *images)
{
if (gSpriteCopyRequestCount < MAX_SPRITE_COPY_REQUESTS)
{
gSpriteCopyRequests[gSpriteCopyRequestCount].src = images[index].data;
gSpriteCopyRequests[gSpriteCopyRequestCount].dest = (u8 *)OBJ_VRAM0 + TILE_SIZE_4BPP * tileNum;
gSpriteCopyRequests[gSpriteCopyRequestCount].size = images[index].size;
gSpriteCopyRequestCount++;
}
}
void RequestSpriteCopy(const u8 *src, u8 *dest, u16 size)
{
if (gSpriteCopyRequestCount < MAX_SPRITE_COPY_REQUESTS)
{
gSpriteCopyRequests[gSpriteCopyRequestCount].src = src;
gSpriteCopyRequests[gSpriteCopyRequestCount].dest = dest;
gSpriteCopyRequests[gSpriteCopyRequestCount].size = size;
gSpriteCopyRequestCount++;
}
}
void CopyFromSprites(u8 *dest)
{
u32 i;
u8 *src = (u8 *)gSprites;
for (i = 0; i < sizeof(struct Sprite) * MAX_SPRITES; i++)
{
*dest = *src;
dest++;
src++;
}
}
void CopyToSprites(u8 *src)
{
u32 i;
u8 *dest = (u8 *)gSprites;
for (i = 0; i < sizeof(struct Sprite) * MAX_SPRITES; i++)
{
*dest = *src;
src++;
dest++;
}
}
void ResetAllSprites(void)
{
u8 i;
for (i = 0; i < MAX_SPRITES; i++)
{
ResetSprite(&gSprites[i]);
gSpriteOrder[i] = i;
}
ResetSprite(&gSprites[i]);
}
void FreeSpriteTiles(struct Sprite *sprite)
{
if (sprite->template->tileTag != 0xFFFF)
FreeSpriteTilesByTag(sprite->template->tileTag);
}
void FreeSpritePalette(struct Sprite *sprite)
{
FreeSpritePaletteByTag(sprite->template->paletteTag);
}
void FreeSpriteOamMatrix(struct Sprite *sprite)
{
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
{
FreeOamMatrix(sprite->oam.matrixNum);
sprite->oam.affineMode = ST_OAM_AFFINE_OFF;
}
}
void DestroySpriteAndFreeResources(struct Sprite *sprite)
{
FreeSpriteTiles(sprite);
FreeSpritePalette(sprite);
FreeSpriteOamMatrix(sprite);
DestroySprite(sprite);
}
void AnimateSprite(struct Sprite *sprite)
{
sAnimFuncs[sprite->animBeginning](sprite);
if (!gAffineAnimsDisabled)
sAffineAnimFuncs[sprite->affineAnimBeginning](sprite);
}
void BeginAnim(struct Sprite *sprite)
{
s16 imageValue;
u8 duration;
u8 hFlip;
u8 vFlip;
sprite->animCmdIndex = 0;
sprite->animEnded = FALSE;
sprite->animLoopCounter = 0;
imageValue = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.imageValue;
if (imageValue != -1)
{
sprite->animBeginning = FALSE;
duration = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration;
hFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.hFlip;
vFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.vFlip;
if (duration)
duration--;
sprite->animDelayCounter = duration;
if (!(sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK))
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
if (sprite->usingSheet)
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
else
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
}
}
void ContinueAnim(struct Sprite *sprite)
{
if (sprite->animDelayCounter)
{
u8 hFlip;
u8 vFlip;
DecrementAnimDelayCounter(sprite);
hFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.hFlip;
vFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.vFlip;
if (!(sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK))
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
}
else if (!sprite->animPaused)
{
s16 type;
s16 funcIndex;
sprite->animCmdIndex++;
type = sprite->anims[sprite->animNum][sprite->animCmdIndex].type;
funcIndex = 3;
if (type < 0)
funcIndex = type + 3;
sAnimCmdFuncs[funcIndex](sprite);
}
}
void AnimCmd_frame(struct Sprite *sprite)
{
s16 imageValue;
u8 duration;
u8 hFlip;
u8 vFlip;
imageValue = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.imageValue;
duration = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration;
hFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.hFlip;
vFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.vFlip;
if (duration)
duration--;
sprite->animDelayCounter = duration;
if (!(sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK))
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
if (sprite->usingSheet)
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
else
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
}
void AnimCmd_end(struct Sprite *sprite)
{
sprite->animCmdIndex--;
sprite->animEnded = TRUE;
}
void AnimCmd_jump(struct Sprite *sprite)
{
s16 imageValue;
u8 duration;
u8 hFlip;
u8 vFlip;
sprite->animCmdIndex = sprite->anims[sprite->animNum][sprite->animCmdIndex].jump.target;
imageValue = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.imageValue;
duration = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.duration;
hFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.hFlip;
vFlip = sprite->anims[sprite->animNum][sprite->animCmdIndex].frame.vFlip;
if (duration)
duration--;
sprite->animDelayCounter = duration;
if (!(sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK))
SetSpriteOamFlipBits(sprite, hFlip, vFlip);
if (sprite->usingSheet)
sprite->oam.tileNum = sprite->sheetTileStart + imageValue;
else
RequestSpriteFrameImageCopy(imageValue, sprite->oam.tileNum, sprite->images);
}
void AnimCmd_loop(struct Sprite *sprite)
{
if (sprite->animLoopCounter)
ContinueAnimLoop(sprite);
else
BeginAnimLoop(sprite);
}
void BeginAnimLoop(struct Sprite *sprite)
{
sprite->animLoopCounter = sprite->anims[sprite->animNum][sprite->animCmdIndex].loop.count;
JumpToTopOfAnimLoop(sprite);
ContinueAnim(sprite);
}
void ContinueAnimLoop(struct Sprite *sprite)
{
sprite->animLoopCounter--;
JumpToTopOfAnimLoop(sprite);
ContinueAnim(sprite);
}
void JumpToTopOfAnimLoop(struct Sprite *sprite)
{
if (sprite->animLoopCounter)
{
sprite->animCmdIndex--;
while (sprite->anims[sprite->animNum][sprite->animCmdIndex - 1].type != -3)
{
if (sprite->animCmdIndex == 0)
break;
sprite->animCmdIndex--;
}
sprite->animCmdIndex--;
}
}
void BeginAffineAnim(struct Sprite *sprite)
{
if ((sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK) && sprite->affineAnims[0][0].type != 32767)
{
struct AffineAnimFrameCmd frameCmd;
u8 matrixNum = GetSpriteMatrixNum(sprite);
AffineAnimStateRestartAnim(matrixNum);
GetAffineAnimFrame(matrixNum, sprite, &frameCmd);
sprite->affineAnimBeginning = FALSE;
sprite->affineAnimEnded = FALSE;
ApplyAffineAnimFrame(matrixNum, &frameCmd);
sAffineAnimStates[matrixNum].delayCounter = frameCmd.duration;
if (sprite->flags_f)
obj_update_pos2(sprite, sprite->data6, sprite->data7);
}
}
void ContinueAffineAnim(struct Sprite *sprite)
{
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
{
u8 matrixNum = GetSpriteMatrixNum(sprite);
if (sAffineAnimStates[matrixNum].delayCounter)
AffineAnimDelay(matrixNum, sprite);
else if (sprite->affineAnimPaused)
return;
else
{
s16 type;
s16 funcIndex;
sAffineAnimStates[matrixNum].animCmdIndex++;
type = sprite->affineAnims[sAffineAnimStates[matrixNum].animNum][sAffineAnimStates[matrixNum].animCmdIndex].type;
funcIndex = 3;
if (type >= 32765)
funcIndex = type - 32765;
sAffineAnimCmdFuncs[funcIndex](matrixNum, sprite);
}
if (sprite->flags_f)
obj_update_pos2(sprite, sprite->data6, sprite->data7);
}
}

View File

@ -46,7 +46,7 @@ gUnknown_030009F0: @ 30009F0
gUnknown_03000A70: @ 3000A70
.space 0x100
gUnknown_03000B70: @ 3000B70
sAffineAnimStates: @ 3000B70
.space 0x180
gUnknown_03000CF0: @ 3000CF0