mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
sprite.c: move ewram, iwram, rom data
This commit is contained in:
parent
24a1e3e544
commit
84240b1a5a
@ -17004,7 +17004,7 @@ sub_804F384: @ 804F384
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_0831C3C0
|
ldr r0, =gUnknown_0831C3C0
|
||||||
movs r1, 0x80
|
movs r1, 0x80
|
||||||
lsls r1, 1
|
lsls r1, 1
|
||||||
|
@ -1768,10 +1768,10 @@ sub_805DFFC: @ 805DFFC
|
|||||||
push {r4-r7,lr}
|
push {r4-r7,lr}
|
||||||
ldr r4, =gUnknown_0832C128
|
ldr r4, =gUnknown_0832C128
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r4, 0x8
|
adds r4, 0x8
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
bl battle_type_is_double
|
bl battle_type_is_double
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
@ -1836,10 +1836,10 @@ _0805E09C:
|
|||||||
bne _0805E0B8
|
bne _0805E0B8
|
||||||
ldr r4, =gUnknown_0832C128
|
ldr r4, =gUnknown_0832C128
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r4, 0x8
|
adds r4, 0x8
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0805E1AE
|
b _0805E1AE
|
||||||
.pool
|
.pool
|
||||||
_0805E0B8:
|
_0805E0B8:
|
||||||
|
@ -5033,7 +5033,7 @@ sub_814DAA8: @ 814DAA8
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =0x0000d6f9
|
ldr r0, =0x0000d6f9
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r7, r0, 24
|
lsrs r7, r0, 24
|
||||||
ldrb r0, [r6]
|
ldrb r0, [r6]
|
||||||
|
@ -8242,7 +8242,7 @@ sub_81029B4: @ 81029B4
|
|||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
strh r0, [r6, 0x8]
|
strh r0, [r6, 0x8]
|
||||||
ldr r0, =0x00002771
|
ldr r0, =0x00002771
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
strh r0, [r6, 0xA]
|
strh r0, [r6, 0xA]
|
||||||
@ -8538,7 +8538,7 @@ _08102C32:
|
|||||||
mov r1, r8
|
mov r1, r8
|
||||||
adds r0, r5, r1
|
adds r0, r5, r1
|
||||||
ldrh r0, [r0]
|
ldrh r0, [r0]
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r3, r0, 24
|
lsrs r3, r0, 24
|
||||||
adds r4, 0x1
|
adds r4, 0x1
|
||||||
@ -14550,7 +14550,7 @@ _08105CCC:
|
|||||||
subs r0, r5, r4
|
subs r0, r5, r4
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
mov r2, sp
|
mov r2, sp
|
||||||
adds r1, r2, r4
|
adds r1, r2, r4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
@ -36511,7 +36511,7 @@ _08110E9C:
|
|||||||
strh r0, [r5, 0x22]
|
strh r0, [r5, 0x22]
|
||||||
ldr r1, =gUnknown_08596BC0
|
ldr r1, =gUnknown_08596BC0
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldrh r0, [r4, 0x2]
|
ldrh r0, [r4, 0x2]
|
||||||
strh r0, [r5, 0x30]
|
strh r0, [r5, 0x30]
|
||||||
ldrh r0, [r4, 0x4]
|
ldrh r0, [r4, 0x4]
|
||||||
@ -38537,7 +38537,7 @@ _08111EBC:
|
|||||||
_08111ED0:
|
_08111ED0:
|
||||||
ldr r7, =0x00002771
|
ldr r7, =0x00002771
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
|
@ -448,11 +448,11 @@ sub_8170834: @ 8170834
|
|||||||
lsls r4, 24
|
lsls r4, 24
|
||||||
lsrs r4, 24
|
lsrs r4, 24
|
||||||
ldr r0, =0x0000d709
|
ldr r0, =0x0000d709
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
mov r2, r9
|
mov r2, r9
|
||||||
strb r0, [r2]
|
strb r0, [r2]
|
||||||
ldr r0, =0x0000d70a
|
ldr r0, =0x0000d70a
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
strb r0, [r7]
|
strb r0, [r7]
|
||||||
ldrb r0, [r5, 0x5]
|
ldrb r0, [r5, 0x5]
|
||||||
lsrs r0, 4
|
lsrs r0, 4
|
||||||
|
@ -397,7 +397,7 @@ _080A9F7C:
|
|||||||
ldr r1, =gSprites
|
ldr r1, =gSprites
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
ldr r1, =gUnknown_0853EF40
|
ldr r1, =gUnknown_0853EF40
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r1, =gTasks
|
ldr r1, =gTasks
|
||||||
lsls r0, r6, 2
|
lsls r0, r6, 2
|
||||||
adds r0, r6
|
adds r0, r6
|
||||||
|
@ -9754,7 +9754,7 @@ dp01t_2F_1_pokemon_enter: @ 805CA80
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =0x0000d6f8
|
ldr r0, =0x0000d6f8
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
lsls r4, 24
|
lsls r4, 24
|
||||||
ldr r1, =gTrainerBackPicPaletteTable
|
ldr r1, =gTrainerBackPicPaletteTable
|
||||||
@ -9845,7 +9845,7 @@ sub_805CC00: @ 805CC00
|
|||||||
bl FreeSpriteOamMatrix
|
bl FreeSpriteOamMatrix
|
||||||
ldrb r0, [r5, 0x5]
|
ldrb r0, [r5, 0x5]
|
||||||
lsrs r0, 4
|
lsrs r0, 4
|
||||||
bl GetObjectPaletteTagBySlot
|
bl GetSpritePaletteTagByPaletteNum
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl FreeSpritePaletteByTag
|
bl FreeSpritePaletteByTag
|
||||||
|
@ -244,9 +244,9 @@ _0807F980:
|
|||||||
ldr r0, =gUnknown_08339C58
|
ldr r0, =gUnknown_08339C58
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_08339AD0
|
ldr r0, =gUnknown_08339AD0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_08339AC8
|
ldr r0, =gUnknown_08339AC8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r4, =gUnknown_020322A4
|
ldr r4, =gUnknown_020322A4
|
||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
ldr r2, =0x000011bc
|
ldr r2, =0x000011bc
|
||||||
@ -413,7 +413,7 @@ _0807FB08:
|
|||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -1597,7 +1597,7 @@ sub_8080588: @ 8080588
|
|||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
ldr r0, =sub_807F764
|
ldr r0, =sub_807F764
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
|
@ -133,7 +133,7 @@ _08177D40:
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
b _08177DDC
|
b _08177DDC
|
||||||
_08177D46:
|
_08177D46:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _08177DDC
|
b _08177DDC
|
||||||
_08177D4C:
|
_08177D4C:
|
||||||
bl sub_81221AC
|
bl sub_81221AC
|
||||||
|
@ -167,7 +167,7 @@ _0814FD4E:
|
|||||||
_0814FDD8:
|
_0814FDD8:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
bl sub_80AAFA4
|
bl sub_80AAFA4
|
||||||
@ -241,7 +241,7 @@ _0814FE96:
|
|||||||
cmp r4, 0x2
|
cmp r4, 0x2
|
||||||
bls _0814FE96
|
bls _0814FE96
|
||||||
ldr r0, =gUnknown_085CDB74
|
ldr r0, =gUnknown_085CDB74
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085CD67C
|
ldr r0, =gUnknown_085CD67C
|
||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
bl malloc_and_decompress
|
bl malloc_and_decompress
|
||||||
|
@ -572,8 +572,8 @@ _080D7B4E:
|
|||||||
strb r0, [r2, 0x8]
|
strb r0, [r2, 0x8]
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =0x02000000
|
ldr r0, =0x02000000
|
||||||
@ -9229,7 +9229,7 @@ sub_80DC4F0: @ 80DC4F0
|
|||||||
mov r7, r8
|
mov r7, r8
|
||||||
push {r7}
|
push {r7}
|
||||||
ldr r0, =gUnknown_08587B08
|
ldr r0, =gUnknown_08587B08
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
ldr r7, =gUnknown_02039F34
|
ldr r7, =gUnknown_02039F34
|
||||||
ldr r0, =gSprites
|
ldr r0, =gSprites
|
||||||
@ -9265,7 +9265,7 @@ _080DC506:
|
|||||||
lsls r0, 2
|
lsls r0, 2
|
||||||
add r0, r8
|
add r0, r8
|
||||||
ldr r1, =gUnknown_08587B80
|
ldr r1, =gUnknown_08587B80
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r0, [r7]
|
ldr r0, [r7]
|
||||||
ldr r0, [r0, 0x14]
|
ldr r0, [r0, 0x14]
|
||||||
adds r4, r0
|
adds r4, r0
|
||||||
@ -9297,7 +9297,7 @@ sub_80DC594: @ 80DC594
|
|||||||
ldr r0, =gUnknown_08587BB0
|
ldr r0, =gUnknown_08587BB0
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_08587BB8
|
ldr r0, =gUnknown_08587BB8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_08587BC8
|
ldr r0, =gUnknown_08587BC8
|
||||||
movs r1, 0x1E
|
movs r1, 0x1E
|
||||||
movs r2, 0x2C
|
movs r2, 0x2C
|
||||||
@ -9872,7 +9872,7 @@ sub_80DC9EC: @ 80DC9EC
|
|||||||
ldr r0, =gUnknown_08589924
|
ldr r0, =gUnknown_08589924
|
||||||
adds r4, r0
|
adds r4, r0
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r2, [sp, 0xC]
|
ldr r2, [sp, 0xC]
|
||||||
lsls r4, r2, 1
|
lsls r4, r2, 1
|
||||||
adds r4, r2
|
adds r4, r2
|
||||||
|
@ -348,7 +348,7 @@ sub_80F5B00: @ 80F5B00
|
|||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl sub_80F591C
|
bl sub_80F591C
|
||||||
bl sub_80F6A9C
|
bl sub_80F6A9C
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -2470,7 +2470,7 @@ _080F6DD6:
|
|||||||
cmp r4, 0
|
cmp r4, 0
|
||||||
bge _080F6DD6
|
bge _080F6DD6
|
||||||
ldr r0, =gUnknown_0858D850
|
ldr r0, =gUnknown_0858D850
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r4, 0
|
movs r4, 0
|
||||||
mov r6, sp
|
mov r6, sp
|
||||||
_080F6DEE:
|
_080F6DEE:
|
||||||
|
@ -487,8 +487,8 @@ sub_81758E4: @ 81758E4
|
|||||||
_08175906:
|
_08175906:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_085B0E04
|
ldr r0, =gUnknown_085B0E04
|
||||||
@ -555,7 +555,7 @@ _0817596E:
|
|||||||
adds r0, r6, 0
|
adds r0, r6, 0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085E702C
|
ldr r0, =gUnknown_085E702C
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r1, =gMain
|
ldr r1, =gMain
|
||||||
movs r0, 0x87
|
movs r0, 0x87
|
||||||
lsls r0, 3
|
lsls r0, 3
|
||||||
@ -720,7 +720,7 @@ sub_8175B1C: @ 8175B1C
|
|||||||
movs r2, 0
|
movs r2, 0
|
||||||
bl sub_8176D1C
|
bl sub_8176D1C
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
negs r0, r0
|
negs r0, r0
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
@ -2643,7 +2643,7 @@ _08176AD6:
|
|||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
strb r0, [r6]
|
strb r0, [r6]
|
||||||
b _08176C96
|
b _08176C96
|
||||||
@ -2675,7 +2675,7 @@ _08176B54:
|
|||||||
ldr r0, =gUnknown_085F5354
|
ldr r0, =gUnknown_085F5354
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085F5384
|
ldr r0, =gUnknown_085F5384
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r0, 0x78
|
movs r0, 0x78
|
||||||
movs r1, 0x2E
|
movs r1, 0x2E
|
||||||
bl sub_817B834
|
bl sub_817B834
|
||||||
@ -2714,7 +2714,7 @@ _08176BD8:
|
|||||||
ldr r0, =gUnknown_085F5354
|
ldr r0, =gUnknown_085F5354
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085F5384
|
ldr r0, =gUnknown_085F5384
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r0, 0x78
|
movs r0, 0x78
|
||||||
movs r1, 0x2E
|
movs r1, 0x2E
|
||||||
bl sub_817B88C
|
bl sub_817B88C
|
||||||
|
@ -91,7 +91,7 @@ LoadCompressedObjectPalette: @ 803458C
|
|||||||
orrs r0, r2
|
orrs r0, r2
|
||||||
str r0, [sp, 0x4]
|
str r0, [sp, 0x4]
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
pop {r4,r5}
|
pop {r4,r5}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -116,7 +116,7 @@ LoadCompressedObjectPaletteOverrideBuffer: @ 80345C0
|
|||||||
orrs r0, r2
|
orrs r0, r2
|
||||||
str r0, [sp, 0x4]
|
str r0, [sp, 0x4]
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
pop {r4,r5}
|
pop {r4,r5}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -691,7 +691,7 @@ LoadCompressedObjectPaletteUsingHeap: @ 80349C4
|
|||||||
orrs r0, r2
|
orrs r0, r2
|
||||||
str r0, [sp, 0x4]
|
str r0, [sp, 0x4]
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl Free
|
bl Free
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
|
@ -5100,7 +5100,7 @@ gpu_pal_decompress_alloc_tag_and_upload: @ 8129334
|
|||||||
lsrs r1, 12
|
lsrs r1, 12
|
||||||
bl sub_8129068
|
bl sub_8129068
|
||||||
ldr r0, =gUnknown_085A72BC
|
ldr r0, =gUnknown_085A72BC
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_085A728C
|
ldr r0, =gUnknown_085A728C
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
@ -5304,7 +5304,7 @@ AddDecorationIconObjectFromFieldObject: @ 81294C0
|
|||||||
ands r1, r4
|
ands r1, r4
|
||||||
orrs r1, r7
|
orrs r1, r7
|
||||||
str r1, [r0, 0x4]
|
str r1, [r0, 0x4]
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r0, 0x18
|
movs r0, 0x18
|
||||||
bl Alloc
|
bl Alloc
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
@ -7044,12 +7044,12 @@ sub_812A39C: @ 812A39C
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0812A3B8
|
bne _0812A3B8
|
||||||
ldr r0, =gUnknown_085A73D8
|
ldr r0, =gUnknown_085A73D8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0812A3BE
|
b _0812A3BE
|
||||||
.pool
|
.pool
|
||||||
_0812A3B8:
|
_0812A3B8:
|
||||||
ldr r0, =gUnknown_085A73E0
|
ldr r0, =gUnknown_085A73E0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_0812A3BE:
|
_0812A3BE:
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
@ -95,7 +95,7 @@ sub_8177888: @ 8177888
|
|||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_085E7088
|
ldr r0, =gUnknown_085E7088
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0x40
|
movs r2, 0x40
|
||||||
|
@ -293,7 +293,7 @@ _0811A468:
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
b _0811A4C0
|
b _0811A4C0
|
||||||
_0811A47C:
|
_0811A47C:
|
||||||
@ -7716,7 +7716,7 @@ sub_811DE90: @ 811DE90
|
|||||||
ldr r0, =gUnknown_08597CA0
|
ldr r0, =gUnknown_08597CA0
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_08597CC0
|
ldr r0, =gUnknown_08597CC0
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
ldr r4, =gUnknown_08597CE8
|
ldr r4, =gUnknown_08597CE8
|
||||||
_0811DEA2:
|
_0811DEA2:
|
||||||
|
@ -598,7 +598,7 @@ _080717EC:
|
|||||||
bl SetBgTilemapBuffer
|
bl SetBgTilemapBuffer
|
||||||
bl DeactivateAllTextPrinters
|
bl DeactivateAllTextPrinters
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
@ -638,7 +638,7 @@ _08071904:
|
|||||||
ldr r0, =gUnknown_0832BFEC
|
ldr r0, =gUnknown_0832BFEC
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_0832BFF4
|
ldr r0, =gUnknown_0832BFF4
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _080719A6
|
b _080719A6
|
||||||
.pool
|
.pool
|
||||||
_08071924:
|
_08071924:
|
||||||
|
@ -567,7 +567,7 @@ sub_817BE78: @ 817BE78
|
|||||||
ldr r0, =gUnknown_085F540C
|
ldr r0, =gUnknown_085F540C
|
||||||
bl LoadCompressedObjectPicUsingHeap
|
bl LoadCompressedObjectPicUsingHeap
|
||||||
ldr r0, =gUnknown_085F541C
|
ldr r0, =gUnknown_085F541C
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.pool
|
.pool
|
||||||
|
@ -194,8 +194,8 @@ evolution_cutscene: @ 813DA8C
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_0300301C
|
ldr r0, =gReservedSpritePaletteCount
|
||||||
movs r2, 0x4
|
movs r2, 0x4
|
||||||
strb r2, [r0]
|
strb r2, [r0]
|
||||||
movs r0, 0x64
|
movs r0, 0x64
|
||||||
@ -254,7 +254,7 @@ evolution_cutscene: @ 813DA8C
|
|||||||
bl sub_806A068
|
bl sub_806A068
|
||||||
ldr r0, =gUnknown_0202499C
|
ldr r0, =gUnknown_0202499C
|
||||||
mov r8, r0
|
mov r8, r0
|
||||||
ldr r1, =gDummyObjectRotScalAnimTable
|
ldr r1, =gDummySpriteAffineAnimTable
|
||||||
str r1, [r0, 0x10]
|
str r1, [r0, 0x10]
|
||||||
movs r1, 0x78
|
movs r1, 0x78
|
||||||
movs r2, 0x40
|
movs r2, 0x40
|
||||||
@ -308,7 +308,7 @@ evolution_cutscene: @ 813DA8C
|
|||||||
mov r0, r10
|
mov r0, r10
|
||||||
movs r1, 0x3
|
movs r1, 0x3
|
||||||
bl sub_806A068
|
bl sub_806A068
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
str r0, [r1, 0x10]
|
str r0, [r1, 0x10]
|
||||||
mov r0, r8
|
mov r0, r8
|
||||||
@ -485,8 +485,8 @@ sub_813DD7C: @ 813DD7C
|
|||||||
bl c2_berry_program_update_menu
|
bl c2_berry_program_update_menu
|
||||||
bl sub_8035AA4
|
bl sub_8035AA4
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
lsls r0, r5, 3
|
lsls r0, r5, 3
|
||||||
@ -510,7 +510,7 @@ sub_813DD7C: @ 813DD7C
|
|||||||
movs r1, 0x3
|
movs r1, 0x3
|
||||||
bl sub_806A068
|
bl sub_806A068
|
||||||
ldr r0, =gUnknown_0202499C
|
ldr r0, =gUnknown_0202499C
|
||||||
ldr r1, =gDummyObjectRotScalAnimTable
|
ldr r1, =gDummySpriteAffineAnimTable
|
||||||
str r1, [r0, 0x10]
|
str r1, [r0, 0x10]
|
||||||
movs r1, 0x78
|
movs r1, 0x78
|
||||||
movs r2, 0x40
|
movs r2, 0x40
|
||||||
@ -625,8 +625,8 @@ _0813DFE0:
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_02022E14
|
ldr r0, =gUnknown_02022E14
|
||||||
@ -718,7 +718,7 @@ _0813E0F0:
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_806A068
|
bl sub_806A068
|
||||||
ldr r0, =gUnknown_0202499C
|
ldr r0, =gUnknown_0202499C
|
||||||
ldr r1, =gDummyObjectRotScalAnimTable
|
ldr r1, =gDummySpriteAffineAnimTable
|
||||||
str r1, [r0, 0x10]
|
str r1, [r0, 0x10]
|
||||||
movs r1, 0x78
|
movs r1, 0x78
|
||||||
movs r2, 0x40
|
movs r2, 0x40
|
||||||
@ -885,7 +885,7 @@ sub_813E1D4: @ 813E1D4
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_806A068
|
bl sub_806A068
|
||||||
ldr r0, =gUnknown_0202499C
|
ldr r0, =gUnknown_0202499C
|
||||||
ldr r1, =gDummyObjectRotScalAnimTable
|
ldr r1, =gDummySpriteAffineAnimTable
|
||||||
str r1, [r0, 0x10]
|
str r1, [r0, 0x10]
|
||||||
movs r1, 0x78
|
movs r1, 0x78
|
||||||
movs r2, 0x40
|
movs r2, 0x40
|
||||||
|
@ -212,7 +212,7 @@ FieldEffectScript_LoadFadedPalette: @ 80B5C6C
|
|||||||
adds r5, r0, 0
|
adds r5, r0, 0
|
||||||
bl FieldEffectScript_ReadWord
|
bl FieldEffectScript_ReadWord
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldrh r0, [r4, 0x4]
|
ldrh r0, [r4, 0x4]
|
||||||
bl IndexOfSpritePaletteTag
|
bl IndexOfSpritePaletteTag
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
@ -232,7 +232,7 @@ FieldEffectScript_LoadPalette: @ 80B5C94
|
|||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
bl FieldEffectScript_ReadWord
|
bl FieldEffectScript_ReadWord
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
adds r0, 0x4
|
adds r0, 0x4
|
||||||
str r0, [r4]
|
str r0, [r4]
|
||||||
@ -298,7 +298,7 @@ FieldEffectFreeTilesIfUnused: @ 80B5D04
|
|||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r4, r0, 16
|
lsrs r4, r0, 16
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl GetTagByObjectTileRangeStart
|
bl GetSpriteTileTagByTileStart
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r3, r0, 16
|
lsrs r3, r0, 16
|
||||||
ldr r0, =0x0000ffff
|
ldr r0, =0x0000ffff
|
||||||
@ -350,7 +350,7 @@ FieldEffectFreePaletteIfUnused: @ 80B5D68
|
|||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r4, r0, 24
|
lsrs r4, r0, 24
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl GetObjectPaletteTagBySlot
|
bl GetSpritePaletteTagByPaletteNum
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r5, r0, 16
|
lsrs r5, r0, 16
|
||||||
ldr r0, =0x0000ffff
|
ldr r0, =0x0000ffff
|
||||||
@ -540,10 +540,10 @@ sub_80B5E6C: @ 80B5E6C
|
|||||||
strh r0, [r1, 0x2]
|
strh r0, [r1, 0x2]
|
||||||
ldr r0, =gNewGameBirchOamAttributes
|
ldr r0, =gNewGameBirchOamAttributes
|
||||||
str r0, [sp, 0x4]
|
str r0, [sp, 0x4]
|
||||||
ldr r0, =gDummyObjectImageAnimTable
|
ldr r0, =gDummySpriteAnimTable
|
||||||
str r0, [sp, 0x8]
|
str r0, [sp, 0x8]
|
||||||
str r2, [sp, 0xC]
|
str r2, [sp, 0xC]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [sp, 0x10]
|
str r0, [sp, 0x10]
|
||||||
ldr r0, =SpriteCallbackDummy
|
ldr r0, =SpriteCallbackDummy
|
||||||
str r0, [sp, 0x14]
|
str r0, [sp, 0x14]
|
||||||
@ -607,7 +607,7 @@ AddNewGameBirchObject: @ 80B5F44
|
|||||||
lsls r6, 24
|
lsls r6, 24
|
||||||
lsrs r6, 24
|
lsrs r6, 24
|
||||||
ldr r0, =gNewGameBirchObjectPaletteInfo
|
ldr r0, =gNewGameBirchObjectPaletteInfo
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gNewGameBirchObjectTemplate
|
ldr r0, =gNewGameBirchObjectTemplate
|
||||||
lsls r4, 16
|
lsls r4, 16
|
||||||
asrs r4, 16
|
asrs r4, 16
|
||||||
@ -1778,7 +1778,7 @@ sub_80B6850: @ 80B6850
|
|||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
strb r1, [r3]
|
strb r1, [r3]
|
||||||
ldr r1, =gUnknown_0855C2AC
|
ldr r1, =gUnknown_0855C2AC
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r1}
|
pop {r1}
|
||||||
@ -1848,7 +1848,7 @@ sub_80B68EC: @ 80B68EC
|
|||||||
ldr r1, =gSprites
|
ldr r1, =gSprites
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
ldr r1, =gUnknown_0855C2C4
|
ldr r1, =gUnknown_0855C2C4
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
b _080B6948
|
b _080B6948
|
||||||
.pool
|
.pool
|
||||||
_080B6934:
|
_080B6934:
|
||||||
|
@ -51,12 +51,12 @@ SetUpReflection: @ 8153ED4
|
|||||||
orrs r0, r1
|
orrs r0, r1
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gDummyObjectImageAnimTable
|
ldr r0, =gDummySpriteAnimTable
|
||||||
str r0, [r7, 0x8]
|
str r0, [r7, 0x8]
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [r7, 0x10]
|
str r0, [r7, 0x10]
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
ldrb r0, [r1]
|
ldrb r0, [r1]
|
||||||
|
@ -1074,7 +1074,7 @@ _0808DBBC:
|
|||||||
lsls r0, 2
|
lsls r0, 2
|
||||||
adds r0, r4
|
adds r0, r4
|
||||||
adds r1, r2, 0
|
adds r1, r2, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
_0808DBF0:
|
_0808DBF0:
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
_0808DBF2:
|
_0808DBF2:
|
||||||
@ -1340,7 +1340,7 @@ _0808DDAE:
|
|||||||
ldr r0, =gSprites
|
ldr r0, =gSprites
|
||||||
adds r4, r0
|
adds r4, r0
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r4, 0x42
|
adds r4, 0x42
|
||||||
ldrb r1, [r4]
|
ldrb r1, [r4]
|
||||||
movs r0, 0x3F
|
movs r0, 0x3F
|
||||||
@ -1502,7 +1502,7 @@ _0808DF2C:
|
|||||||
cmp r1, 0
|
cmp r1, 0
|
||||||
beq _0808DF48
|
beq _0808DF48
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r2, r5, 0
|
adds r2, r5, 0
|
||||||
adds r2, 0x42
|
adds r2, 0x42
|
||||||
ldrb r0, [r2]
|
ldrb r0, [r2]
|
||||||
@ -2002,7 +2002,7 @@ _0808E312:
|
|||||||
cmp r1, 0
|
cmp r1, 0
|
||||||
beq _0808E31E
|
beq _0808E31E
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
_0808E31E:
|
_0808E31E:
|
||||||
mov r0, r8
|
mov r0, r8
|
||||||
lsls r2, r0, 4
|
lsls r2, r0, 4
|
||||||
@ -2723,8 +2723,8 @@ _0808E870:
|
|||||||
thumb_func_start gpu_pal_allocator_reset__manage_upper_four
|
thumb_func_start gpu_pal_allocator_reset__manage_upper_four
|
||||||
gpu_pal_allocator_reset__manage_upper_four: @ 808E880
|
gpu_pal_allocator_reset__manage_upper_four: @ 808E880
|
||||||
push {lr}
|
push {lr}
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0xC
|
movs r0, 0xC
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -2795,7 +2795,7 @@ sub_808E8F4: @ 808E8F4
|
|||||||
cmp r0, 0xFF
|
cmp r0, 0xFF
|
||||||
bne _0808E912
|
bne _0808E912
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
b _0808E914
|
b _0808E914
|
||||||
@ -4226,7 +4226,7 @@ npc_paltag_set_load: @ 808F2F8
|
|||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0x6
|
movs r2, 0x6
|
||||||
bl pal_patch_for_npc_range
|
bl pal_patch_for_npc_range
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
b _0808F356
|
b _0808F356
|
||||||
|
@ -60,7 +60,7 @@ sub_81701C4: @ 81701C4
|
|||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl ResetBgsAndClearDma3BusyFlags
|
bl ResetBgsAndClearDma3BusyFlags
|
||||||
ldr r1, =gUnknown_085E5068
|
ldr r1, =gUnknown_085E5068
|
||||||
|
@ -2435,7 +2435,7 @@ sub_80FAFF8: @ 80FAFF8
|
|||||||
sub_80FB00C: @ 80FB00C
|
sub_80FB00C: @ 80FB00C
|
||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
ldr r0, =gUnknown_0858E864
|
ldr r0, =gUnknown_0858E864
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_0858E880
|
ldr r0, =gUnknown_0858E880
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
|
@ -2980,8 +2980,8 @@ sub_8174F70: @ 8174F70
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_085E5394
|
ldr r0, =gUnknown_085E5394
|
||||||
|
24
asm/intro.s
24
asm/intro.s
@ -187,7 +187,7 @@ _0816CCF4:
|
|||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
negs r0, r0
|
negs r0, r0
|
||||||
ldr r1, =0x0000ffff
|
ldr r1, =0x0000ffff
|
||||||
@ -447,11 +447,11 @@ task_intro_1: @ 816CF18
|
|||||||
ldr r0, =gUnknown_085E4FEC
|
ldr r0, =gUnknown_085E4FEC
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085E4FFC
|
ldr r0, =gUnknown_085E4FFC
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085E4A74
|
ldr r0, =gUnknown_085E4A74
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085E4A84
|
ldr r0, =gUnknown_085E4A84
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r4, =gPlttBufferUnfaded + 0x200
|
ldr r4, =gPlttBufferUnfaded + 0x200
|
||||||
movs r3, 0xF0
|
movs r3, 0xF0
|
||||||
lsls r3, 1
|
lsls r3, 1
|
||||||
@ -935,7 +935,7 @@ task_intro_6: @ 816D48C
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_0203BD24
|
ldr r0, =gUnknown_0203BD24
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
strh r1, [r0]
|
strh r1, [r0]
|
||||||
@ -993,9 +993,9 @@ _0816D51C:
|
|||||||
cmp r6, 0x2
|
cmp r6, 0x2
|
||||||
bls _0816D51C
|
bls _0816D51C
|
||||||
ldr r0, =gUnknown_085F530C
|
ldr r0, =gUnknown_085F530C
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085E4B08
|
ldr r0, =gUnknown_085E4B08
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085E4BDC
|
ldr r0, =gUnknown_085E4BDC
|
||||||
movs r5, 0x88
|
movs r5, 0x88
|
||||||
lsls r5, 1
|
lsls r5, 1
|
||||||
@ -1807,7 +1807,7 @@ task_intro_10: @ 816DBAC
|
|||||||
movs r3, 0
|
movs r3, 0
|
||||||
bl sub_816F2A8
|
bl sub_816F2A8
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
negs r0, r0
|
negs r0, r0
|
||||||
ldr r1, =0x0000ffff
|
ldr r1, =0x0000ffff
|
||||||
@ -1941,8 +1941,8 @@ task_intro_13: @ 816DD28
|
|||||||
bne _0816DD94
|
bne _0816DD94
|
||||||
bl intro_reset_and_hide_bgs
|
bl intro_reset_and_hide_bgs
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_08D88494
|
ldr r0, =gUnknown_08D88494
|
||||||
@ -2584,7 +2584,7 @@ task_intro_19: @ 816E2A0
|
|||||||
ldr r0, =gUnknown_085E4C88
|
ldr r0, =gUnknown_085E4C88
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085E4C98
|
ldr r0, =gUnknown_085E4C98
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
negs r0, r0
|
negs r0, r0
|
||||||
ldr r1, =0x0000ffff
|
ldr r1, =0x0000ffff
|
||||||
@ -3541,7 +3541,7 @@ task_intro_25: @ 816EAB8
|
|||||||
ldr r0, =gUnknown_085E4BF4
|
ldr r0, =gUnknown_085E4BF4
|
||||||
bl LoadCompressedObjectPicUsingHeap
|
bl LoadCompressedObjectPicUsingHeap
|
||||||
ldr r0, =gUnknown_085E4C04
|
ldr r0, =gUnknown_085E4C04
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
@ -3789,7 +3789,7 @@ task_intro_27: @ 816ED20
|
|||||||
ldr r0, =gUnknown_085E5048
|
ldr r0, =gUnknown_085E5048
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085E5058
|
ldr r0, =gUnknown_085E5058
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r1, 0xD5
|
movs r1, 0xD5
|
||||||
lsls r1, 6
|
lsls r1, 6
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
|
@ -70,7 +70,7 @@ _0817B11E:
|
|||||||
ldr r1, =gUnknown_0203BD28
|
ldr r1, =gUnknown_0203BD28
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
strh r0, [r1]
|
strh r0, [r1]
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
pop {r4}
|
pop {r4}
|
||||||
@ -258,7 +258,7 @@ _0817B334:
|
|||||||
bl LoadPalette
|
bl LoadPalette
|
||||||
bl sub_817B7A4
|
bl sub_817B7A4
|
||||||
_0817B370:
|
_0817B370:
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r1, =gUnknown_0203BD28
|
ldr r1, =gUnknown_0203BD28
|
||||||
|
46
asm/link.s
46
asm/link.s
@ -201,7 +201,7 @@ sub_8009570: @ 8009570
|
|||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
sub sp, 0x4
|
sub sp, 0x4
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
ldr r0, =sub_80096BC
|
ldr r0, =sub_80096BC
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
@ -3353,7 +3353,7 @@ c2_800ACD4: @ 800AF30
|
|||||||
lsls r1, 9
|
lsls r1, 9
|
||||||
bl InitHeap
|
bl InitHeap
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFadeControl
|
bl ResetPaletteFadeControl
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
@ -9557,7 +9557,7 @@ sub_800E0E8: @ 800E0E8
|
|||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
_0800E100:
|
_0800E100:
|
||||||
ldr r0, =gUnknown_082ED5E8
|
ldr r0, =gUnknown_082ED5E8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r1, =gUnknown_02022B10
|
ldr r1, =gUnknown_02022B10
|
||||||
movs r0, 0xFF
|
movs r0, 0xFF
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
@ -16599,7 +16599,7 @@ sub_8011AE8: @ 8011AE8
|
|||||||
sub_8011AFC: @ 8011AFC
|
sub_8011AFC: @ 8011AFC
|
||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
ldr r0, =sub_8011AE8
|
ldr r0, =sub_8011AE8
|
||||||
@ -28635,7 +28635,7 @@ _08018482:
|
|||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -33629,7 +33629,7 @@ _0801AD4C:
|
|||||||
bl AllocZeroed
|
bl AllocZeroed
|
||||||
str r0, [r4]
|
str r0, [r4]
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl ResetBgsAndClearDma3BusyFlags
|
bl ResetBgsAndClearDma3BusyFlags
|
||||||
@ -36581,7 +36581,7 @@ _0801C52C:
|
|||||||
lsls r0, 3
|
lsls r0, 3
|
||||||
ldr r1, =gUnknown_082F1D08
|
ldr r1, =gUnknown_082F1D08
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
ldrb r0, [r0, 0x9]
|
ldrb r0, [r0, 0x9]
|
||||||
cmp r7, r0
|
cmp r7, r0
|
||||||
@ -39769,7 +39769,7 @@ _0801DE74:
|
|||||||
_0801DE7A:
|
_0801DE7A:
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl sub_801F4D0
|
bl sub_801F4D0
|
||||||
b _0801DEBC
|
b _0801DEBC
|
||||||
_0801DE8C:
|
_0801DE8C:
|
||||||
@ -44995,7 +44995,7 @@ _08020896:
|
|||||||
cmp r5, 0x4
|
cmp r5, 0x4
|
||||||
bls _08020896
|
bls _08020896
|
||||||
ldr r0, =gUnknown_082F315C
|
ldr r0, =gUnknown_082F315C
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r4, =gUnknown_02022C8C
|
ldr r4, =gUnknown_02022C8C
|
||||||
movs r0, 0x18
|
movs r0, 0x18
|
||||||
bl Alloc
|
bl Alloc
|
||||||
@ -46010,7 +46010,7 @@ _080210BE:
|
|||||||
lsls r1, 19
|
lsls r1, 19
|
||||||
ldr r2, =0x01000200
|
ldr r2, =0x01000200
|
||||||
bl CpuSet
|
bl CpuSet
|
||||||
ldr r0, =gUnknown_0300301C
|
ldr r0, =gReservedSpritePaletteCount
|
||||||
strb r4, [r0]
|
strb r4, [r0]
|
||||||
movs r0, 0x3
|
movs r0, 0x3
|
||||||
bl sub_8034C54
|
bl sub_8034C54
|
||||||
@ -46019,7 +46019,7 @@ _080210BE:
|
|||||||
_080210E4:
|
_080210E4:
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _080212FC
|
b _080212FC
|
||||||
_080210F2:
|
_080210F2:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -48671,7 +48671,7 @@ _08022746:
|
|||||||
cmp r5, 0x3
|
cmp r5, 0x3
|
||||||
bls _08022746
|
bls _08022746
|
||||||
ldr r0, =gUnknown_082F421C
|
ldr r0, =gUnknown_082F421C
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_082F430C
|
ldr r0, =gUnknown_082F430C
|
||||||
movs r1, 0x78
|
movs r1, 0x78
|
||||||
movs r2, 0x58
|
movs r2, 0x58
|
||||||
@ -53102,7 +53102,7 @@ sub_8024A1C: @ 8024A1C
|
|||||||
push {lr}
|
push {lr}
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
thumb_func_end sub_8024A1C
|
thumb_func_end sub_8024A1C
|
||||||
@ -60405,9 +60405,9 @@ sub_80283A8: @ 80283A8
|
|||||||
bl Free
|
bl Free
|
||||||
_080283E8:
|
_080283E8:
|
||||||
add r0, sp, 0x8
|
add r0, sp, 0x8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add r0, sp, 0x10
|
add r0, sp, 0x10
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x18
|
add sp, 0x18
|
||||||
pop {r4,r5}
|
pop {r4,r5}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -60444,7 +60444,7 @@ sub_8028408: @ 8028408
|
|||||||
ldr r0, =gUnknown_082FB228
|
ldr r0, =gUnknown_082FB228
|
||||||
str r0, [sp, 0x20]
|
str r0, [sp, 0x20]
|
||||||
str r3, [sp, 0x24]
|
str r3, [sp, 0x24]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [sp, 0x28]
|
str r0, [sp, 0x28]
|
||||||
ldr r0, =sub_80284A8
|
ldr r0, =sub_80284A8
|
||||||
str r0, [sp, 0x2C]
|
str r0, [sp, 0x2C]
|
||||||
@ -60872,7 +60872,7 @@ sub_8028734: @ 8028734
|
|||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
add r0, sp, 0x20
|
add r0, sp, 0x20
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r4, 0
|
movs r4, 0
|
||||||
_0802878A:
|
_0802878A:
|
||||||
lsls r1, r4, 20
|
lsls r1, r4, 20
|
||||||
@ -61239,7 +61239,7 @@ sub_8028A34: @ 8028A34
|
|||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
_08028A6A:
|
_08028A6A:
|
||||||
add r0, sp, 0x8
|
add r0, sp, 0x8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl Free
|
bl Free
|
||||||
add sp, 0x10
|
add sp, 0x10
|
||||||
@ -61630,7 +61630,7 @@ sub_8028D44: @ 8028D44
|
|||||||
stm r2!, {r3-r5}
|
stm r2!, {r3-r5}
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
add r0, sp, 0x20
|
add r0, sp, 0x20
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
ldr r7, =gUnknown_082FB356
|
ldr r7, =gUnknown_082FB356
|
||||||
adds r0, r7, 0x2
|
adds r0, r7, 0x2
|
||||||
@ -65203,7 +65203,7 @@ _0802ACE0:
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =sub_802BD84
|
ldr r0, =sub_802BD84
|
||||||
movs r1, 0x5
|
movs r1, 0x5
|
||||||
bl sub_802BE60
|
bl sub_802BE60
|
||||||
@ -68897,7 +68897,7 @@ _0802C97C:
|
|||||||
ldr r5, =gUnknown_082FBE30
|
ldr r5, =gUnknown_082FBE30
|
||||||
_0802C98E:
|
_0802C98E:
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r5, 0x8
|
adds r5, 0x8
|
||||||
adds r4, 0x1
|
adds r4, 0x1
|
||||||
cmp r4, 0x1
|
cmp r4, 0x1
|
||||||
@ -72683,7 +72683,7 @@ sub_802E75C: @ 802E75C
|
|||||||
lsls r0, 3
|
lsls r0, 3
|
||||||
ldr r1, =gUnknown_082FE6D8
|
ldr r1, =gUnknown_082FE6D8
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
movs r3, 0x10
|
movs r3, 0x10
|
||||||
ldrsh r0, [r4, r3]
|
ldrsh r0, [r4, r3]
|
||||||
@ -73692,7 +73692,7 @@ sub_802EF50: @ 802EF50
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x10
|
add sp, 0x10
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
|
@ -230,7 +230,7 @@ _08121694:
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
b _081219D4
|
b _081219D4
|
||||||
_0812169A:
|
_0812169A:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
movs r0, 0x10
|
movs r0, 0x10
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
|
@ -130,7 +130,7 @@ InitMainMenu: @ 802F6F4
|
|||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
cmp r4, 0
|
cmp r4, 0
|
||||||
beq _0802F7EC
|
beq _0802F7EC
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
@ -1931,7 +1931,7 @@ task_new_game_prof_birch_speech_1: @ 80307B0
|
|||||||
bl LoadPalette
|
bl LoadPalette
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl AddBirchSpeechObjects
|
bl AddBirchSpeechObjects
|
||||||
@ -3710,7 +3710,7 @@ new_game_prof_birch_speech_part2_start: @ 8031678
|
|||||||
strh r0, [r4, 0x10]
|
strh r0, [r4, 0x10]
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl AddBirchSpeechObjects
|
bl AddBirchSpeechObjects
|
||||||
|
@ -1141,7 +1141,7 @@ sub_8097BB4: @ 8097BB4
|
|||||||
.pool
|
.pool
|
||||||
_08097C20:
|
_08097C20:
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r2, r4, 0
|
adds r2, r4, 0
|
||||||
adds r2, 0x42
|
adds r2, 0x42
|
||||||
ldrb r0, [r2]
|
ldrb r0, [r2]
|
||||||
|
@ -523,14 +523,14 @@ sub_811FC80: @ 811FC80
|
|||||||
ldr r0, =gUnknown_0859EF14
|
ldr r0, =gUnknown_0859EF14
|
||||||
str r0, [r4, 0x8]
|
str r0, [r4, 0x8]
|
||||||
str r7, [r4, 0xC]
|
str r7, [r4, 0xC]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [r4, 0x10]
|
str r0, [r4, 0x10]
|
||||||
ldr r0, =TaskDummy7
|
ldr r0, =TaskDummy7
|
||||||
str r0, [r4, 0x14]
|
str r0, [r4, 0x14]
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
mov r0, r10
|
mov r0, r10
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
mov r3, r8
|
mov r3, r8
|
||||||
lsls r3, 16
|
lsls r3, 16
|
||||||
@ -885,7 +885,7 @@ sub_811FFD4: @ 811FFD4
|
|||||||
ldr r0, =gUnknown_0859EFA4
|
ldr r0, =gUnknown_0859EFA4
|
||||||
str r0, [sp, 0x8]
|
str r0, [sp, 0x8]
|
||||||
str r2, [sp, 0xC]
|
str r2, [sp, 0xC]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [sp, 0x10]
|
str r0, [sp, 0x10]
|
||||||
ldr r0, =TaskDummy7
|
ldr r0, =TaskDummy7
|
||||||
str r0, [sp, 0x14]
|
str r0, [sp, 0x14]
|
||||||
@ -899,7 +899,7 @@ sub_811FFD4: @ 811FFD4
|
|||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
|
@ -37,7 +37,7 @@ sub_8178974: @ 8178974
|
|||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
sub sp, 0x8
|
sub sp, 0x8
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
ldr r0, =sub_8178944
|
ldr r0, =sub_8178944
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
|
@ -105,7 +105,7 @@ _080E2E58:
|
|||||||
b _080E2E86
|
b _080E2E86
|
||||||
_080E2E5E:
|
_080E2E5E:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _080E2E86
|
b _080E2E86
|
||||||
_080E2E68:
|
_080E2E68:
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
@ -2151,7 +2151,7 @@ sub_80E3F8C: @ 80E3F8C
|
|||||||
add r5, r8
|
add r5, r8
|
||||||
ldr r1, =gUnknown_0858C050
|
ldr r1, =gUnknown_0858C050
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
adds r1, 0x3E
|
adds r1, 0x3E
|
||||||
ldrb r0, [r1]
|
ldrb r0, [r1]
|
||||||
@ -2172,7 +2172,7 @@ sub_80E3F8C: @ 80E3F8C
|
|||||||
add r4, r8
|
add r4, r8
|
||||||
ldr r1, =gUnknown_0858C058
|
ldr r1, =gUnknown_0858C058
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r4, 0x3E
|
adds r4, 0x3E
|
||||||
ldrb r0, [r4]
|
ldrb r0, [r4]
|
||||||
orrs r0, r6
|
orrs r0, r6
|
||||||
@ -2456,7 +2456,7 @@ sub_80E4218: @ 80E4218
|
|||||||
mov r8, r0
|
mov r8, r0
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r4, 0x3E
|
adds r4, 0x3E
|
||||||
ldrb r0, [r4]
|
ldrb r0, [r4]
|
||||||
movs r5, 0x4
|
movs r5, 0x4
|
||||||
@ -2475,7 +2475,7 @@ sub_80E4218: @ 80E4218
|
|||||||
adds r4, r6
|
adds r4, r6
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r4, 0x3E
|
adds r4, 0x3E
|
||||||
ldrb r0, [r4]
|
ldrb r0, [r4]
|
||||||
orrs r0, r5
|
orrs r0, r5
|
||||||
@ -2658,7 +2658,7 @@ sub_80E43E0: @ 80E43E0
|
|||||||
adds r4, r0
|
adds r4, r0
|
||||||
ldr r1, =gUnknown_0858C078
|
ldr r1, =gUnknown_0858C078
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldrb r0, [r4, 0x5]
|
ldrb r0, [r4, 0x5]
|
||||||
movs r1, 0xC
|
movs r1, 0xC
|
||||||
orrs r0, r1
|
orrs r0, r1
|
||||||
@ -3741,7 +3741,7 @@ choose_name_or_words_screen_load_bg_tile_patterns: @ 80E4C54
|
|||||||
ldr r0, =gUnknown_0858C1C8
|
ldr r0, =gUnknown_0858C1C8
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_0858C230
|
ldr r0, =gUnknown_0858C230
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
pop {r4-r6}
|
pop {r4-r6}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
@ -92,7 +92,7 @@ _08179C34:
|
|||||||
b _08179D3A
|
b _08179D3A
|
||||||
.pool
|
.pool
|
||||||
_08179C48:
|
_08179C48:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _08179D32
|
b _08179D32
|
||||||
_08179C4E:
|
_08179C4E:
|
||||||
bl init_uns_table_pokemon_copy
|
bl init_uns_table_pokemon_copy
|
||||||
@ -782,7 +782,7 @@ sub_817A2C0: @ 817A2C0
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _0817A304
|
bne _0817A304
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gMPlay_BGM
|
ldr r0, =gMPlay_BGM
|
||||||
ldr r1, =0x0000ffff
|
ldr r1, =0x0000ffff
|
||||||
movs r2, 0x80
|
movs r2, 0x80
|
||||||
|
@ -383,8 +383,8 @@ _080BB5FC:
|
|||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
@ -2137,14 +2137,14 @@ _080BC682:
|
|||||||
.pool
|
.pool
|
||||||
_080BC6CC:
|
_080BC6CC:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_0855D26C
|
ldr r0, =gUnknown_0855D26C
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_0855D27C
|
ldr r0, =gUnknown_0855D27C
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl sub_80BDB7C
|
bl sub_80BDB7C
|
||||||
b _080BC7F8
|
b _080BC7F8
|
||||||
@ -9938,8 +9938,8 @@ _080C0A60:
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl ClearGpuRegBits
|
bl ClearGpuRegBits
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x8
|
movs r0, 0x8
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
_080C0A7E:
|
_080C0A7E:
|
||||||
@ -11175,7 +11175,7 @@ _080C1414:
|
|||||||
ldr r0, =gUnknown_0855D26C
|
ldr r0, =gUnknown_0855D26C
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_0855D27C
|
ldr r0, =gUnknown_0855D27C
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl sub_80C2594
|
bl sub_80C2594
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
|
@ -1288,7 +1288,7 @@ _0813D45C:
|
|||||||
.4byte _0813D56C
|
.4byte _0813D56C
|
||||||
_0813D48C:
|
_0813D48C:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x3
|
movs r0, 0x3
|
||||||
bl HideBg
|
bl HideBg
|
||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
@ -1562,7 +1562,7 @@ sub_813D6D0: @ 813D6D0
|
|||||||
ldr r0, =gUnknown_085B401C
|
ldr r0, =gUnknown_085B401C
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085B4024
|
ldr r0, =gUnknown_085B4024
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_03001204
|
ldr r0, =gUnknown_03001204
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
strh r1, [r0]
|
strh r1, [r0]
|
||||||
@ -1786,7 +1786,7 @@ sub_813D8A8: @ 813D8A8
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085B40EC
|
ldr r0, =gUnknown_085B40EC
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
@ -678,7 +678,7 @@ _081458B0:
|
|||||||
ldr r0, =gUnknown_085B8C80
|
ldr r0, =gUnknown_085B8C80
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_085B8C90
|
ldr r0, =gUnknown_085B8C90
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085B8C68
|
ldr r0, =gUnknown_085B8C68
|
||||||
ldrb r1, [r4, 0x4]
|
ldrb r1, [r4, 0x4]
|
||||||
lsls r1, 19
|
lsls r1, 19
|
||||||
@ -731,7 +731,7 @@ sub_8145914: @ 8145914
|
|||||||
adds r0, r4
|
adds r0, r4
|
||||||
ldrb r0, [r0, 0x5]
|
ldrb r0, [r0, 0x5]
|
||||||
lsrs r0, 4
|
lsrs r0, 4
|
||||||
bl GetObjectPaletteTagBySlot
|
bl GetSpritePaletteTagByPaletteNum
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl FreeSpritePaletteByTag
|
bl FreeSpritePaletteByTag
|
||||||
|
@ -2641,7 +2641,7 @@ _0812416E:
|
|||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
movs r1, 0x38
|
movs r1, 0x38
|
||||||
movs r2, 0x48
|
movs r2, 0x48
|
||||||
@ -2807,7 +2807,7 @@ sub_8124288: @ 8124288
|
|||||||
ldr r0, =gUnknown_085A1C30
|
ldr r0, =gUnknown_085A1C30
|
||||||
str r0, [sp, 0x8]
|
str r0, [sp, 0x8]
|
||||||
str r5, [sp, 0xC]
|
str r5, [sp, 0xC]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [sp, 0x10]
|
str r0, [sp, 0x10]
|
||||||
ldr r0, =SpriteCallbackDummy
|
ldr r0, =SpriteCallbackDummy
|
||||||
str r0, [sp, 0x14]
|
str r0, [sp, 0x14]
|
||||||
@ -2835,7 +2835,7 @@ _08124316:
|
|||||||
adds r0, r6, 0
|
adds r0, r6, 0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
movs r2, 0
|
movs r2, 0
|
||||||
@ -3380,7 +3380,7 @@ _08124754:
|
|||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl FreeSpriteTileRanges
|
bl FreeSpriteTileRanges
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _0812489C
|
b _0812489C
|
||||||
_08124766:
|
_08124766:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -3741,7 +3741,7 @@ sub_8124A70: @ 8124A70
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085A1F10
|
ldr r0, =gUnknown_085A1F10
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
bl sub_8124AD4
|
bl sub_8124AD4
|
||||||
bl sub_8124BE4
|
bl sub_8124BE4
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
|
@ -290,7 +290,7 @@ sub_809EB04: @ 809EB04
|
|||||||
lsls r5, 24
|
lsls r5, 24
|
||||||
lsrs r5, 24
|
lsrs r5, 24
|
||||||
ldr r0, =gUnknown_085104C4
|
ldr r0, =gUnknown_085104C4
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_085104F0
|
ldr r0, =gUnknown_085104F0
|
||||||
mov r8, r0
|
mov r8, r0
|
||||||
movs r1, 0x35
|
movs r1, 0x35
|
||||||
|
@ -134,8 +134,8 @@ _080A944A:
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
b _080A95D2
|
b _080A95D2
|
||||||
_080A9450:
|
_080A9450:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
b _080A95D2
|
b _080A95D2
|
||||||
|
@ -665,7 +665,7 @@ _081359F6:
|
|||||||
b _08135BA6
|
b _08135BA6
|
||||||
.pool
|
.pool
|
||||||
_08135A08:
|
_08135A08:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _08135B9E
|
b _08135B9E
|
||||||
_08135A0E:
|
_08135A0E:
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
@ -1995,7 +1995,7 @@ _0813655A:
|
|||||||
bl sub_81AE6C8
|
bl sub_81AE6C8
|
||||||
bl sub_8136418
|
bl sub_8136418
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, [r6]
|
ldr r0, [r6]
|
||||||
movs r1, 0x80
|
movs r1, 0x80
|
||||||
lsls r1, 4
|
lsls r1, 4
|
||||||
|
@ -224,7 +224,7 @@ _08034DE0:
|
|||||||
cmp r0, 0xFF
|
cmp r0, 0xFF
|
||||||
bne _08034E14
|
bne _08034E14
|
||||||
ldr r0, [r5, 0xC]
|
ldr r0, [r5, 0xC]
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r1, [r6]
|
ldr r1, [r6]
|
||||||
ldr r1, [r1, 0x4]
|
ldr r1, [r1, 0x4]
|
||||||
adds r1, r4, r1
|
adds r1, r4, r1
|
||||||
@ -2173,7 +2173,7 @@ _08035EA6:
|
|||||||
.pool
|
.pool
|
||||||
_08035EC4:
|
_08035EC4:
|
||||||
ldr r0, =0x00002710
|
ldr r0, =0x00002710
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
ldr r2, =gPlttBufferUnfaded
|
ldr r2, =gPlttBufferUnfaded
|
||||||
lsrs r0, 19
|
lsrs r0, 19
|
||||||
@ -3243,8 +3243,8 @@ _080368FE:
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl sub_8036154
|
bl sub_8036154
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =vblank_cb_08078BB4
|
ldr r0, =vblank_cb_08078BB4
|
||||||
@ -7451,8 +7451,8 @@ _08038E1A:
|
|||||||
movs r0, 0x4A
|
movs r0, 0x4A
|
||||||
movs r1, 0x37
|
movs r1, 0x37
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =vblank_cb_08078BB4
|
ldr r0, =vblank_cb_08078BB4
|
||||||
@ -7925,8 +7925,8 @@ _080392FE:
|
|||||||
ble _080392FE
|
ble _080392FE
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =vblank_cb_08078BB4
|
ldr r0, =vblank_cb_08078BB4
|
||||||
|
@ -543,7 +543,7 @@ _08072718:
|
|||||||
ldr r0, =gUnknown_0832C28C
|
ldr r0, =gUnknown_0832C28C
|
||||||
adds r1, r0
|
adds r1, r0
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
adds r2, r4, 0
|
adds r2, r4, 0
|
||||||
adds r2, 0x42
|
adds r2, 0x42
|
||||||
ldrb r1, [r2]
|
ldrb r1, [r2]
|
||||||
@ -2336,9 +2336,9 @@ _0807366C:
|
|||||||
ldr r0, =gUnknown_0832C34C
|
ldr r0, =gUnknown_0832C34C
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_0832C33C
|
ldr r0, =gUnknown_0832C33C
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_0832C344
|
ldr r0, =gUnknown_0832C344
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
mov r0, r9
|
mov r0, r9
|
||||||
lsls r6, r0, 1
|
lsls r6, r0, 1
|
||||||
adds r0, r6, r0
|
adds r0, r6, r0
|
||||||
@ -2362,7 +2362,7 @@ _0807366C:
|
|||||||
adds r7, r0, r1
|
adds r7, r0, r1
|
||||||
ldr r1, =gUnknown_0832C2C4
|
ldr r1, =gUnknown_0832C2C4
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
mov r2, r10
|
mov r2, r10
|
||||||
strh r2, [r7, 0x24]
|
strh r2, [r7, 0x24]
|
||||||
mov r3, r8
|
mov r3, r8
|
||||||
@ -3211,7 +3211,7 @@ _08073D82:
|
|||||||
ldr r1, =sub_8074090
|
ldr r1, =sub_8074090
|
||||||
str r1, [r3]
|
str r1, [r3]
|
||||||
ldr r1, =gUnknown_0832C2CC
|
ldr r1, =gUnknown_0832C2CC
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r1, =gTasks
|
ldr r1, =gTasks
|
||||||
ldr r0, [sp, 0xC]
|
ldr r0, [sp, 0xC]
|
||||||
add r0, r8
|
add r0, r8
|
||||||
|
@ -5152,7 +5152,7 @@ sub_80A8394: @ 80A8394
|
|||||||
lsls r0, 3
|
lsls r0, 3
|
||||||
adds r0, r1
|
adds r0, r1
|
||||||
ldrh r0, [r0, 0x2]
|
ldrh r0, [r0, 0x2]
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r5, r0, 24
|
lsrs r5, r0, 24
|
||||||
ldr r4, =gUnknown_020244D4
|
ldr r4, =gUnknown_020244D4
|
||||||
@ -6132,7 +6132,7 @@ _080A8BF8:
|
|||||||
subs r1, r2
|
subs r1, r2
|
||||||
strh r1, [r0, 0x24]
|
strh r1, [r0, 0x24]
|
||||||
ldr r0, =0x00002771
|
ldr r0, =0x00002771
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
strh r0, [r5, 0x10]
|
strh r0, [r5, 0x10]
|
||||||
|
@ -1096,7 +1096,7 @@ sub_80C77E8: @ 80C77E8
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _080C7846
|
beq _080C7846
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_080C7846:
|
_080C7846:
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
@ -1264,10 +1264,10 @@ sub_80C7958: @ 80C7958
|
|||||||
adds r0, 0x1E
|
adds r0, 0x1E
|
||||||
strh r2, [r0]
|
strh r2, [r0]
|
||||||
str r4, [sp, 0x20]
|
str r4, [sp, 0x20]
|
||||||
ldr r0, =gDummyObjectImageAnimTable
|
ldr r0, =gDummySpriteAnimTable
|
||||||
str r0, [sp, 0x24]
|
str r0, [sp, 0x24]
|
||||||
str r2, [sp, 0x28]
|
str r2, [sp, 0x28]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [sp, 0x2C]
|
str r0, [sp, 0x2C]
|
||||||
ldr r0, =SpriteCallbackDummy
|
ldr r0, =SpriteCallbackDummy
|
||||||
str r0, [sp, 0x30]
|
str r0, [sp, 0x30]
|
||||||
@ -1852,7 +1852,7 @@ sub_80C7E98: @ 80C7E98
|
|||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl FreeSpriteTileRanges
|
bl FreeSpriteTileRanges
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ClearDma3Requests
|
bl ClearDma3Requests
|
||||||
ldr r1, =gReservedSpriteTileCount
|
ldr r1, =gReservedSpriteTileCount
|
||||||
movs r2, 0xA0
|
movs r2, 0xA0
|
||||||
@ -5610,7 +5610,7 @@ _080CA0C2:
|
|||||||
sub_80CA0C8: @ 80CA0C8
|
sub_80CA0C8: @ 80CA0C8
|
||||||
push {lr}
|
push {lr}
|
||||||
ldr r0, =gUnknown_08572744
|
ldr r0, =gUnknown_08572744
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.pool
|
.pool
|
||||||
@ -5948,7 +5948,7 @@ _080CA36C:
|
|||||||
cmp r5, 0
|
cmp r5, 0
|
||||||
beq _080CA420
|
beq _080CA420
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r4, r0, 24
|
lsrs r4, r0, 24
|
||||||
cmp r4, 0xFF
|
cmp r4, 0xFF
|
||||||
@ -10781,7 +10781,7 @@ sub_80CCB50: @ 80CCB50
|
|||||||
adds r4, r1
|
adds r4, r1
|
||||||
strh r0, [r4]
|
strh r0, [r4]
|
||||||
add r0, sp, 0x4
|
add r0, sp, 0x4
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
mov r2, r10
|
mov r2, r10
|
||||||
ldr r0, [r2]
|
ldr r0, [r2]
|
||||||
movs r6, 0xE7
|
movs r6, 0xE7
|
||||||
@ -16471,7 +16471,7 @@ sub_80CFC14: @ 80CFC14
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =0x0000daca
|
ldr r0, =0x0000daca
|
||||||
bl IndexOfSpritePaletteTag
|
bl IndexOfSpritePaletteTag
|
||||||
ldr r6, =gUnknown_02039D08
|
ldr r6, =gUnknown_02039D08
|
||||||
@ -18577,7 +18577,7 @@ _080D0CA0:
|
|||||||
adds r4, r7, r0
|
adds r4, r7, r0
|
||||||
lsls r0, r4, 16
|
lsls r0, r4, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
mov r2, r8
|
mov r2, r8
|
||||||
ldr r1, [r2]
|
ldr r1, [r2]
|
||||||
adds r1, r5
|
adds r1, r5
|
||||||
@ -22980,7 +22980,7 @@ sub_80D2F04: @ 80D2F04
|
|||||||
_080D2F0A:
|
_080D2F0A:
|
||||||
lsls r0, r4, 3
|
lsls r0, r4, 3
|
||||||
adds r0, r5
|
adds r0, r5
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r0, r4, 0x1
|
adds r0, r4, 0x1
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r4, r0, 24
|
lsrs r4, r0, 24
|
||||||
@ -23017,7 +23017,7 @@ _080D2F3A:
|
|||||||
cmp r0, 0xFF
|
cmp r0, 0xFF
|
||||||
bne _080D2F5A
|
bne _080D2F5A
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_080D2F5A:
|
_080D2F5A:
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -23043,7 +23043,7 @@ sub_80D2F68: @ 80D2F68
|
|||||||
cmp r0, 0xFF
|
cmp r0, 0xFF
|
||||||
bne _080D2F8E
|
bne _080D2F8E
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_080D2F8E:
|
_080D2F8E:
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
@ -26891,7 +26891,7 @@ AddSwitchPocketRotatingBallObject: @ 80D4E34
|
|||||||
ldr r0, =gUnknown_0857FBA0
|
ldr r0, =gUnknown_0857FBA0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_0857FBA8
|
ldr r0, =gUnknown_0857FBA8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_0857FBB0
|
ldr r0, =gUnknown_0857FBB0
|
||||||
movs r1, 0x10
|
movs r1, 0x10
|
||||||
movs r2, 0x10
|
movs r2, 0x10
|
||||||
|
@ -283,7 +283,7 @@ sub_813C80C: @ 813C80C
|
|||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
thumb_func_end sub_813C80C
|
thumb_func_end sub_813C80C
|
||||||
|
@ -15156,7 +15156,7 @@ _08160688:
|
|||||||
sub_81606A0: @ 81606A0
|
sub_81606A0: @ 81606A0
|
||||||
push {r4-r6,lr}
|
push {r4-r6,lr}
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl clear_scheduled_bg_copies_to_vram
|
bl clear_scheduled_bg_copies_to_vram
|
||||||
ldr r6, =gUnknown_0203BC34
|
ldr r6, =gUnknown_0203BC34
|
||||||
@ -15183,7 +15183,7 @@ sub_81606A0: @ 81606A0
|
|||||||
ldr r0, =gUnknown_085CEBB0
|
ldr r0, =gUnknown_085CEBB0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085CEBB8
|
ldr r0, =gUnknown_085CEBB8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
bl sub_81610B8
|
bl sub_81610B8
|
||||||
ldr r0, =gUnknown_03006310
|
ldr r0, =gUnknown_03006310
|
||||||
ldrh r1, [r4]
|
ldrh r1, [r4]
|
||||||
@ -15210,7 +15210,7 @@ sub_81606A0: @ 81606A0
|
|||||||
sub_8160740: @ 8160740
|
sub_8160740: @ 8160740
|
||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl clear_scheduled_bg_copies_to_vram
|
bl clear_scheduled_bg_copies_to_vram
|
||||||
ldr r5, =gUnknown_0203BC34
|
ldr r5, =gUnknown_0203BC34
|
||||||
@ -15240,7 +15240,7 @@ sub_8160740: @ 8160740
|
|||||||
ldr r0, =gUnknown_085CEBB0
|
ldr r0, =gUnknown_085CEBB0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085CEBB8
|
ldr r0, =gUnknown_085CEBB8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
bl sub_81610B8
|
bl sub_81610B8
|
||||||
ldr r0, =gUnknown_03006310
|
ldr r0, =gUnknown_03006310
|
||||||
ldrh r1, [r4]
|
ldrh r1, [r4]
|
||||||
@ -16001,7 +16001,7 @@ sub_8160EA0: @ 8160EA0
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
str r0, [r4]
|
str r0, [r4]
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
pop {r4}
|
pop {r4}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
@ -26006,7 +26006,7 @@ _081663E8:
|
|||||||
.pool
|
.pool
|
||||||
_0816640C:
|
_0816640C:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _0816653C
|
b _0816653C
|
||||||
_08166416:
|
_08166416:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -27725,7 +27725,7 @@ sub_8167338: @ 8167338
|
|||||||
ldr r0, =gUnknown_085DFD18
|
ldr r0, =gUnknown_085DFD18
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_085DFD20
|
ldr r0, =gUnknown_085DFD20
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r2, =gUnknown_0203BC90
|
ldr r2, =gUnknown_0203BC90
|
||||||
ldr r0, [r2]
|
ldr r0, [r2]
|
||||||
adds r0, 0x54
|
adds r0, 0x54
|
||||||
@ -28079,7 +28079,7 @@ sub_8167608: @ 8167608
|
|||||||
adds r1, r0
|
adds r1, r0
|
||||||
str r1, [sp, 0x20]
|
str r1, [sp, 0x20]
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r1, [r7]
|
ldr r1, [r7]
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
@ -28209,7 +28209,7 @@ sub_8167760: @ 8167760
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r4, 0
|
movs r4, 0
|
||||||
ldr r1, =gUnknown_0203BCAC
|
ldr r1, =gUnknown_0203BCAC
|
||||||
ldr r0, [r1]
|
ldr r0, [r1]
|
||||||
@ -28389,7 +28389,7 @@ _08167902:
|
|||||||
mov r0, r9
|
mov r0, r9
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
mov r0, r10
|
mov r0, r10
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x60
|
add sp, 0x60
|
||||||
pop {r3-r5}
|
pop {r3-r5}
|
||||||
mov r8, r3
|
mov r8, r3
|
||||||
@ -29413,7 +29413,7 @@ sub_8168248: @ 8168248
|
|||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
add r0, sp, 0x8
|
add r0, sp, 0x8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x10
|
add sp, 0x10
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
@ -33867,7 +33867,7 @@ sub_816A90C: @ 816A90C
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =0x0000d6f8
|
ldr r0, =0x0000d6f8
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
adds r4, r0, 0
|
adds r4, r0, 0
|
||||||
lsls r4, 24
|
lsls r4, 24
|
||||||
ldr r0, =gTrainerBackPicPaletteTable
|
ldr r0, =gTrainerBackPicPaletteTable
|
||||||
|
@ -14315,7 +14315,7 @@ sub_818CA64: @ 818CA64
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =0x0000d6f9
|
ldr r0, =0x0000d6f9
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r5, r0, 24
|
lsrs r5, r0, 24
|
||||||
ldr r0, =gBattleTypeFlags
|
ldr r0, =gBattleTypeFlags
|
||||||
@ -15242,7 +15242,7 @@ _0818D2C6:
|
|||||||
bl uns_builder_assign_animtable1
|
bl uns_builder_assign_animtable1
|
||||||
mov r1, r8
|
mov r1, r8
|
||||||
str r1, [r5, 0xC]
|
str r1, [r5, 0xC]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [r5, 0x10]
|
str r0, [r5, 0x10]
|
||||||
ldr r0, =nullsub_122
|
ldr r0, =nullsub_122
|
||||||
str r0, [r5, 0x14]
|
str r0, [r5, 0x14]
|
||||||
@ -15508,7 +15508,7 @@ _0818D500:
|
|||||||
_0818D510:
|
_0818D510:
|
||||||
ldr r0, =gUnknown_0860B064
|
ldr r0, =gUnknown_0860B064
|
||||||
str r0, [r4, 0x4]
|
str r0, [r4, 0x4]
|
||||||
ldr r0, =gDummyObjectRotScalAnimTable
|
ldr r0, =gDummySpriteAffineAnimTable
|
||||||
str r0, [r4, 0x10]
|
str r0, [r4, 0x10]
|
||||||
_0818D518:
|
_0818D518:
|
||||||
ldr r2, =nullsub_122
|
ldr r2, =nullsub_122
|
||||||
@ -15632,7 +15632,7 @@ _0818D5F0:
|
|||||||
adds r0, r1
|
adds r0, r1
|
||||||
ldrb r0, [r0, 0x5]
|
ldrb r0, [r0, 0x5]
|
||||||
lsrs r0, 4
|
lsrs r0, 4
|
||||||
bl GetObjectPaletteTagBySlot
|
bl GetSpritePaletteTagByPaletteNum
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl FreeSpritePaletteByTag
|
bl FreeSpritePaletteByTag
|
||||||
@ -21262,8 +21262,8 @@ _08190508:
|
|||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x4
|
movs r0, 0x4
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
b _08190602
|
b _08190602
|
||||||
@ -28492,7 +28492,7 @@ _0819431C:
|
|||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gTasks
|
ldr r1, =gTasks
|
||||||
mov r3, r8
|
mov r3, r8
|
||||||
lsls r0, r3, 2
|
lsls r0, r3, 2
|
||||||
@ -40890,7 +40890,7 @@ _0819A69C:
|
|||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_08DC0754
|
ldr r0, =gUnknown_08DC0754
|
||||||
ldr r5, =gUnknown_0203CE2C
|
ldr r5, =gUnknown_0203CE2C
|
||||||
ldr r1, [r5]
|
ldr r1, [r5]
|
||||||
@ -40997,7 +40997,7 @@ _0819A77C:
|
|||||||
.pool
|
.pool
|
||||||
_0819A7CC:
|
_0819A7CC:
|
||||||
ldr r0, =gUnknown_086103F4
|
ldr r0, =gUnknown_086103F4
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_086103BC
|
ldr r0, =gUnknown_086103BC
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_086103E4
|
ldr r0, =gUnknown_086103E4
|
||||||
@ -47346,7 +47346,7 @@ _0819DDA8:
|
|||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
ldr r0, =gUnknown_08DC0754
|
ldr r0, =gUnknown_08DC0754
|
||||||
ldr r5, =gUnknown_0203CE40
|
ldr r5, =gUnknown_0203CE40
|
||||||
@ -47424,7 +47424,7 @@ _0819DE68:
|
|||||||
.pool
|
.pool
|
||||||
_0819DE94:
|
_0819DE94:
|
||||||
ldr r0, =gUnknown_086106B0
|
ldr r0, =gUnknown_086106B0
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_08610650
|
ldr r0, =gUnknown_08610650
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_086106A0
|
ldr r0, =gUnknown_086106A0
|
||||||
@ -72381,7 +72381,7 @@ _081AAE3E:
|
|||||||
b _081AB01A
|
b _081AB01A
|
||||||
.pool
|
.pool
|
||||||
_081AAE50:
|
_081AAE50:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _081AB012
|
b _081AB012
|
||||||
_081AAE56:
|
_081AAE56:
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
@ -73640,7 +73640,7 @@ _081AB984:
|
|||||||
_081AB98A:
|
_081AB98A:
|
||||||
bl sub_81AB824
|
bl sub_81AB824
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl free_bag_item_list_buffers
|
bl free_bag_item_list_buffers
|
||||||
adds r0, r5, 0
|
adds r0, r5, 0
|
||||||
bl DestroyTask
|
bl DestroyTask
|
||||||
@ -80552,7 +80552,7 @@ _081AF3DC:
|
|||||||
ands r1, r5
|
ands r1, r5
|
||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
str r1, [r0, 0x4]
|
str r1, [r0, 0x4]
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_081AF3EE:
|
_081AF3EE:
|
||||||
ldr r0, =Task_ScrollIndicatorArrowPair
|
ldr r0, =Task_ScrollIndicatorArrowPair
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
@ -81146,7 +81146,7 @@ _081AF884:
|
|||||||
ands r1, r5
|
ands r1, r5
|
||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
str r1, [r0, 0x4]
|
str r1, [r0, 0x4]
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_081AF896:
|
_081AF896:
|
||||||
ldr r0, =Task_RedOutlineCursor
|
ldr r0, =Task_RedOutlineCursor
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
@ -81204,7 +81204,7 @@ _081AF896:
|
|||||||
ldr r7, =gSprites
|
ldr r7, =gSprites
|
||||||
adds r0, r7
|
adds r0, r7
|
||||||
adds r1, r5, 0
|
adds r1, r5, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldrb r0, [r5, 0xC]
|
ldrb r0, [r5, 0xC]
|
||||||
lsls r1, r0, 4
|
lsls r1, r0, 4
|
||||||
adds r1, r0
|
adds r1, r0
|
||||||
@ -81408,7 +81408,7 @@ _081AFAB4:
|
|||||||
ands r1, r6
|
ands r1, r6
|
||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
str r1, [r0, 0x4]
|
str r1, [r0, 0x4]
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
_081AFAC6:
|
_081AFAC6:
|
||||||
ldr r0, =Task_RedArrowCursor
|
ldr r0, =Task_RedArrowCursor
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
@ -82417,7 +82417,7 @@ _081B02D4:
|
|||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
b _081B0484
|
b _081B0484
|
||||||
_081B02DA:
|
_081B02DA:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gMain
|
ldr r1, =gMain
|
||||||
movs r0, 0x87
|
movs r0, 0x87
|
||||||
lsls r0, 3
|
lsls r0, 3
|
||||||
@ -93075,7 +93075,7 @@ sub_81B5D30: @ 81B5D30
|
|||||||
ldr r0, =gUnknown_08615EB0
|
ldr r0, =gUnknown_08615EB0
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_08615EB8
|
ldr r0, =gUnknown_08615EB8
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.pool
|
.pool
|
||||||
|
@ -5867,7 +5867,7 @@ sub_81BE10C: @ 81BE10C
|
|||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl StartSpriteAnim
|
bl StartSpriteAnim
|
||||||
ldr r0, =0x0000d6f9
|
ldr r0, =0x0000d6f9
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r4, r0, 24
|
lsrs r4, r0, 24
|
||||||
ldr r2, =gUnknown_02038BCE
|
ldr r2, =gUnknown_02038BCE
|
||||||
@ -8877,7 +8877,7 @@ _081BFBD0:
|
|||||||
b _081BFDEE
|
b _081BFDEE
|
||||||
.pool
|
.pool
|
||||||
_081BFBE4:
|
_081BFBE4:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _081BFDE6
|
b _081BFDE6
|
||||||
_081BFBEA:
|
_081BFBEA:
|
||||||
bl sub_81BFE24
|
bl sub_81BFE24
|
||||||
@ -9825,7 +9825,7 @@ sub_81C0484: @ 81C0484
|
|||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
bl sub_81C4898
|
bl sub_81C4898
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl sub_80A369C
|
bl sub_80A369C
|
||||||
ldr r0, =gMPlay_BGM
|
ldr r0, =gMPlay_BGM
|
||||||
ldr r1, =0x0000ffff
|
ldr r1, =0x0000ffff
|
||||||
@ -18616,7 +18616,7 @@ _081C50EE:
|
|||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
b _081C51A2
|
b _081C51A2
|
||||||
_081C50F4:
|
_081C50F4:
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _081C51A2
|
b _081C51A2
|
||||||
_081C50FA:
|
_081C50FA:
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
@ -19860,7 +19860,7 @@ _081C5B94:
|
|||||||
_081C5B9E:
|
_081C5B9E:
|
||||||
bl sub_81C56CC
|
bl sub_81C56CC
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl FreeAllWindowBuffers
|
bl FreeAllWindowBuffers
|
||||||
ldr r0, =gUnknown_0203CF2C
|
ldr r0, =gUnknown_0203CF2C
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
@ -22023,7 +22023,7 @@ sub_81C6E98: @ 81C6E98
|
|||||||
orrs r0, r1
|
orrs r0, r1
|
||||||
str r0, [sp, 0x4]
|
str r0, [sp, 0x4]
|
||||||
mov r0, sp
|
mov r0, sp
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl Free
|
bl Free
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
@ -22521,7 +22521,7 @@ _081C72F0:
|
|||||||
strh r0, [r1, 0x8]
|
strh r0, [r1, 0x8]
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
ldr r0, =sub_81C742C
|
ldr r0, =sub_81C742C
|
||||||
@ -23020,7 +23020,7 @@ sub_81C76C4: @ 81C76C4
|
|||||||
cmp r4, 0
|
cmp r4, 0
|
||||||
beq _081C76F4
|
beq _081C76F4
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =sub_81C7764
|
ldr r0, =sub_81C7764
|
||||||
movs r1, 0x1
|
movs r1, 0x1
|
||||||
bl sub_81C7078
|
bl sub_81C7078
|
||||||
@ -23365,7 +23365,7 @@ _081C7974:
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
beq _081C7988
|
beq _081C7988
|
||||||
ldrh r0, [r4, 0x4]
|
ldrh r0, [r4, 0x4]
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r1, r0, 24
|
lsrs r1, r0, 24
|
||||||
cmp r1, 0xFF
|
cmp r1, 0xFF
|
||||||
@ -23861,9 +23861,9 @@ sub_81C7D28: @ 81C7D28
|
|||||||
ldr r0, =gUnknown_0861FA64
|
ldr r0, =gUnknown_0861FA64
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
ldr r0, =gSprites
|
ldr r0, =gSprites
|
||||||
mov r8, r0
|
mov r8, r0
|
||||||
@ -32782,7 +32782,7 @@ _081CC224:
|
|||||||
adds r0, r2
|
adds r0, r2
|
||||||
str r0, [r1]
|
str r0, [r1]
|
||||||
movs r0, 0xD
|
movs r0, 0xD
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 20
|
lsrs r0, 20
|
||||||
movs r1, 0x80
|
movs r1, 0x80
|
||||||
@ -37997,7 +37997,7 @@ sub_81CED30: @ 81CED30
|
|||||||
bl sub_81CDCD4
|
bl sub_81CDCD4
|
||||||
str r0, [sp, 0x20]
|
str r0, [sp, 0x20]
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
lsrs r0, 24
|
lsrs r0, 24
|
||||||
ldr r4, =0x00001818
|
ldr r4, =0x00001818
|
||||||
@ -50142,7 +50142,7 @@ _081D4AF8:
|
|||||||
_081D4B3A:
|
_081D4B3A:
|
||||||
ldr r4, =gFieldEffectObjectPaletteInfo1
|
ldr r4, =gFieldEffectObjectPaletteInfo1
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldrh r0, [r4, 0x4]
|
ldrh r0, [r4, 0x4]
|
||||||
bl IndexOfSpritePaletteTag
|
bl IndexOfSpritePaletteTag
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
@ -53536,7 +53536,7 @@ sub_81D6774: @ 81D6774
|
|||||||
bl SetVBlankHBlankCallbacksToNull
|
bl SetVBlankHBlankCallbacksToNull
|
||||||
bl clear_scheduled_bg_copies_to_vram
|
bl clear_scheduled_bg_copies_to_vram
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
@ -53596,7 +53596,7 @@ sub_81D6800: @ 81D6800
|
|||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _081D6830
|
bne _081D6830
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r4, =gUnknown_0203CF60
|
ldr r4, =gUnknown_0203CF60
|
||||||
ldr r0, [r4]
|
ldr r0, [r4]
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
@ -55266,7 +55266,7 @@ sub_81D7600: @ 81D7600
|
|||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
strh r4, [r5]
|
strh r4, [r5]
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
subs r0, 0x8
|
subs r0, 0x8
|
||||||
@ -56630,7 +56630,7 @@ sub_81D8164: @ 81D8164
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gTasks
|
ldr r0, =gTasks
|
||||||
lsls r1, r4, 2
|
lsls r1, r4, 2
|
||||||
adds r1, r4
|
adds r1, r4
|
||||||
@ -57192,7 +57192,7 @@ sub_81D8684: @ 81D8684
|
|||||||
movs r0, 0
|
movs r0, 0
|
||||||
bl SetHBlankCallback
|
bl SetHBlankCallback
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gTasks
|
ldr r0, =gTasks
|
||||||
lsls r1, r4, 2
|
lsls r1, r4, 2
|
||||||
adds r1, r4
|
adds r1, r4
|
||||||
@ -58292,7 +58292,7 @@ sub_81D9034: @ 81D9034
|
|||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl sub_81D6904
|
bl sub_81D6904
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldrb r0, [r4, 0x4]
|
ldrb r0, [r4, 0x4]
|
||||||
bl DestroyTask
|
bl DestroyTask
|
||||||
_081D9078:
|
_081D9078:
|
||||||
@ -61115,7 +61115,7 @@ sub_81DA700: @ 81DA700
|
|||||||
ldr r0, =gUnknown_0862B724
|
ldr r0, =gUnknown_0862B724
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_0862B72C
|
ldr r0, =gUnknown_0862B72C
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
@ -3269,7 +3269,7 @@ sub_8141E7C: @ 8141E7C
|
|||||||
movs r0, 0x54
|
movs r0, 0x54
|
||||||
movs r1, 0
|
movs r1, 0
|
||||||
bl SetGpuReg
|
bl SetGpuReg
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl sub_8140418
|
bl sub_8140418
|
||||||
@ -4861,9 +4861,9 @@ sub_8142C0C: @ 8142C0C
|
|||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
cmp r0, 0
|
cmp r0, 0
|
||||||
bne _08142C44
|
bne _08142C44
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_085B7384
|
ldr r0, =gUnknown_085B7384
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r0, =gUnknown_085B7864
|
ldr r0, =gUnknown_085B7864
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085B7978
|
ldr r0, =gUnknown_085B7978
|
||||||
@ -4879,7 +4879,7 @@ _08142C44:
|
|||||||
bl FreeSpriteTilesByTag
|
bl FreeSpriteTilesByTag
|
||||||
movs r0, 0xC
|
movs r0, 0xC
|
||||||
bl FreeSpriteTilesByTag
|
bl FreeSpriteTilesByTag
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
_08142C5A:
|
_08142C5A:
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
@ -479,7 +479,7 @@ _080F8B7C:
|
|||||||
thumb_func_start sub_80F8B94
|
thumb_func_start sub_80F8B94
|
||||||
sub_80F8B94: @ 80F8B94
|
sub_80F8B94: @ 80F8B94
|
||||||
push {r4-r7,lr}
|
push {r4-r7,lr}
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0xC
|
movs r0, 0xC
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_02039F2A
|
ldr r0, =gUnknown_02039F2A
|
||||||
@ -899,7 +899,7 @@ _080F8F42:
|
|||||||
adds r4, r0, r1
|
adds r4, r0, r1
|
||||||
ldrb r0, [r4, 0x5]
|
ldrb r0, [r4, 0x5]
|
||||||
lsrs r0, 4
|
lsrs r0, 4
|
||||||
bl GetObjectPaletteTagBySlot
|
bl GetSpritePaletteTagByPaletteNum
|
||||||
lsls r0, 16
|
lsls r0, 16
|
||||||
lsrs r0, 16
|
lsrs r0, 16
|
||||||
bl FreeSpritePaletteByTag
|
bl FreeSpritePaletteByTag
|
||||||
|
@ -450,7 +450,7 @@ _080DFE20:
|
|||||||
bl CpuFastSet
|
bl CpuFastSet
|
||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
|
@ -573,7 +573,7 @@ sub_812A9AC: @ 812A9AC
|
|||||||
ldr r1, =gOamLimit
|
ldr r1, =gOamLimit
|
||||||
movs r0, 0x80
|
movs r0, 0x80
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
@ -7924,7 +7924,7 @@ sub_812E300: @ 812E300
|
|||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
strb r1, [r0, 0x5]
|
strb r1, [r0, 0x5]
|
||||||
ldr r1, =gUnknown_085A7FC0
|
ldr r1, =gUnknown_085A7FC0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.pool
|
.pool
|
||||||
@ -8147,7 +8147,7 @@ _0812E490:
|
|||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r1, =gUnknown_085A7FE0
|
ldr r1, =gUnknown_085A7FE0
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r5, =gUnknown_0203AB34
|
ldr r5, =gUnknown_0203AB34
|
||||||
ldr r0, [r5]
|
ldr r0, [r5]
|
||||||
adds r0, 0x49
|
adds r0, 0x49
|
||||||
@ -8203,7 +8203,7 @@ _0812E510:
|
|||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r1, =gUnknown_085A7FF4
|
ldr r1, =gUnknown_085A7FF4
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r0, [r5]
|
ldr r0, [r5]
|
||||||
adds r0, 0x4A
|
adds r0, 0x4A
|
||||||
strb r4, [r0]
|
strb r4, [r0]
|
||||||
@ -8279,7 +8279,7 @@ _0812E5BC:
|
|||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
strb r1, [r3]
|
strb r1, [r3]
|
||||||
ldr r1, =gUnknown_085A8010
|
ldr r1, =gUnknown_085A8010
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r0, =gUnknown_0203AB34
|
ldr r0, =gUnknown_0203AB34
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
adds r0, 0x42
|
adds r0, 0x42
|
||||||
@ -8425,7 +8425,7 @@ sub_812E70C: @ 812E70C
|
|||||||
mov r9, r0
|
mov r9, r0
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
mov r1, r9
|
mov r1, r9
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r6, =gUnknown_0203AB34
|
ldr r6, =gUnknown_0203AB34
|
||||||
ldr r0, [r6]
|
ldr r0, [r6]
|
||||||
adds r0, 0x4E
|
adds r0, 0x4E
|
||||||
@ -8456,7 +8456,7 @@ sub_812E70C: @ 812E70C
|
|||||||
strb r5, [r2, 0x5]
|
strb r5, [r2, 0x5]
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
mov r1, r9
|
mov r1, r9
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r0, [r6]
|
ldr r0, [r6]
|
||||||
adds r0, 0x4F
|
adds r0, 0x4F
|
||||||
strb r4, [r0]
|
strb r4, [r0]
|
||||||
@ -8501,7 +8501,7 @@ sub_812E7CC: @ 812E7CC
|
|||||||
orrs r1, r2
|
orrs r1, r2
|
||||||
strb r1, [r0, 0x5]
|
strb r1, [r0, 0x5]
|
||||||
ldr r1, =gUnknown_085A803C
|
ldr r1, =gUnknown_085A803C
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
ldr r0, =gUnknown_0203AB34
|
ldr r0, =gUnknown_0203AB34
|
||||||
ldr r0, [r0]
|
ldr r0, [r0]
|
||||||
adds r0, 0x40
|
adds r0, 0x40
|
||||||
@ -9543,7 +9543,7 @@ sub_812EFDC: @ 812EFDC
|
|||||||
cmp r1, 0
|
cmp r1, 0
|
||||||
beq _0812F056
|
beq _0812F056
|
||||||
adds r0, r2, 0
|
adds r0, r2, 0
|
||||||
bl SetSpriteOamTables_NoPriorityFromTable
|
bl SetSubspriteTables
|
||||||
_0812F056:
|
_0812F056:
|
||||||
adds r0, r7, 0
|
adds r0, r7, 0
|
||||||
add sp, 0x18
|
add sp, 0x18
|
||||||
@ -10649,7 +10649,7 @@ _0812F822:
|
|||||||
adds r0, r3, 0
|
adds r0, r3, 0
|
||||||
bl LoadSpriteSheets
|
bl LoadSpriteSheets
|
||||||
ldr r0, =gUnknown_085A8544
|
ldr r0, =gUnknown_085A8544
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
pop {r4-r6}
|
pop {r4-r6}
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
|
778
asm/sprite.s
778
asm/sprite.s
@ -1,778 +0,0 @@
|
|||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.syntax unified
|
|
||||||
|
|
||||||
.text
|
|
||||||
|
|
||||||
|
|
||||||
thumb_func_start FreeSpriteTilesByTag
|
|
||||||
@ void FreeSpriteTilesByTag(u16 tag)
|
|
||||||
FreeSpriteTilesByTag: @ 8008568
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r8
|
|
||||||
push {r7}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
bl IndexOfObjectTilesTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r4, r0, 24
|
|
||||||
cmp r4, 0xFF
|
|
||||||
beq _080085C6
|
|
||||||
ldr r0, =gUnknown_03000A70
|
|
||||||
lsls r1, r4, 2
|
|
||||||
adds r2, r1, r0
|
|
||||||
adds r0, 0x2
|
|
||||||
adds r1, r0
|
|
||||||
ldrh r0, [r1]
|
|
||||||
ldrh r3, [r2]
|
|
||||||
adds r0, r3, r0
|
|
||||||
ldr r1, =gUnknown_030009F0
|
|
||||||
mov r8, r1
|
|
||||||
lsls r5, r4, 1
|
|
||||||
cmp r3, r0
|
|
||||||
bge _080085BE
|
|
||||||
ldr r1, =gSpriteTileAllocBitmap
|
|
||||||
mov r12, r1
|
|
||||||
movs r6, 0x7
|
|
||||||
movs r7, 0x1
|
|
||||||
adds r4, r0, 0
|
|
||||||
_080085A2:
|
|
||||||
lsrs r2, r3, 3
|
|
||||||
add r2, r12
|
|
||||||
adds r0, r3, 0
|
|
||||||
ands r0, r6
|
|
||||||
adds r1, r7, 0
|
|
||||||
lsls r1, r0
|
|
||||||
ldrb r0, [r2]
|
|
||||||
bics r0, r1
|
|
||||||
strb r0, [r2]
|
|
||||||
adds r0, r3, 0x1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r3, r0, 16
|
|
||||||
cmp r3, r4
|
|
||||||
blt _080085A2
|
|
||||||
_080085BE:
|
|
||||||
mov r0, r8
|
|
||||||
adds r1, r5, r0
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
strh r0, [r1]
|
|
||||||
_080085C6:
|
|
||||||
pop {r3}
|
|
||||||
mov r8, r3
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end FreeSpriteTilesByTag
|
|
||||||
|
|
||||||
thumb_func_start FreeSpriteTileRanges
|
|
||||||
@ void FreeSpriteTileRanges()
|
|
||||||
FreeSpriteTileRanges: @ 80085E0
|
|
||||||
push {r4-r7,lr}
|
|
||||||
movs r2, 0
|
|
||||||
ldr r7, =gUnknown_030009F0
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
adds r6, r0, 0
|
|
||||||
ldr r4, =gUnknown_03000A70
|
|
||||||
movs r3, 0
|
|
||||||
adds r5, r4, 0x2
|
|
||||||
_080085F0:
|
|
||||||
lsls r1, r2, 1
|
|
||||||
adds r1, r7
|
|
||||||
ldrh r0, [r1]
|
|
||||||
orrs r0, r6
|
|
||||||
strh r0, [r1]
|
|
||||||
lsls r1, r2, 2
|
|
||||||
adds r0, r1, r4
|
|
||||||
strh r3, [r0]
|
|
||||||
adds r1, r5
|
|
||||||
strh r3, [r1]
|
|
||||||
adds r0, r2, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r2, r0, 24
|
|
||||||
cmp r2, 0x3F
|
|
||||||
bls _080085F0
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end FreeSpriteTileRanges
|
|
||||||
|
|
||||||
thumb_func_start GetSpriteTileStartByTag
|
|
||||||
@ u16 GetSpriteTileStartByTag(u16 tag)
|
|
||||||
GetSpriteTileStartByTag: @ 8008620
|
|
||||||
push {lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
bl IndexOfObjectTilesTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r1, r0, 24
|
|
||||||
cmp r1, 0xFF
|
|
||||||
beq _08008640
|
|
||||||
ldr r0, =gUnknown_03000A70
|
|
||||||
lsls r1, 2
|
|
||||||
adds r1, r0
|
|
||||||
ldrh r0, [r1]
|
|
||||||
b _08008642
|
|
||||||
.pool
|
|
||||||
_08008640:
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
_08008642:
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end GetSpriteTileStartByTag
|
|
||||||
|
|
||||||
thumb_func_start IndexOfObjectTilesTag
|
|
||||||
@ u8 IndexOfObjectTilesTag(u16 tag)
|
|
||||||
IndexOfObjectTilesTag: @ 800864C
|
|
||||||
push {lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r2, r0, 16
|
|
||||||
movs r1, 0
|
|
||||||
ldr r3, =gUnknown_030009F0
|
|
||||||
_08008656:
|
|
||||||
lsls r0, r1, 1
|
|
||||||
adds r0, r3
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, r2
|
|
||||||
bne _08008668
|
|
||||||
adds r0, r1, 0
|
|
||||||
b _08008674
|
|
||||||
.pool
|
|
||||||
_08008668:
|
|
||||||
adds r0, r1, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r1, r0, 24
|
|
||||||
cmp r1, 0x3F
|
|
||||||
bls _08008656
|
|
||||||
movs r0, 0xFF
|
|
||||||
_08008674:
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end IndexOfObjectTilesTag
|
|
||||||
|
|
||||||
thumb_func_start GetTagByObjectTileRangeStart
|
|
||||||
@ u16 GetTagByObjectTileRangeStart(u16 rangeStart)
|
|
||||||
GetTagByObjectTileRangeStart: @ 8008678
|
|
||||||
push {r4-r6,lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r3, r0, 16
|
|
||||||
movs r2, 0
|
|
||||||
ldr r6, =gUnknown_030009F0
|
|
||||||
ldr r5, =0x0000ffff
|
|
||||||
ldr r4, =gUnknown_03000A70
|
|
||||||
_08008686:
|
|
||||||
lsls r0, r2, 1
|
|
||||||
adds r1, r0, r6
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, r5
|
|
||||||
beq _080086AC
|
|
||||||
lsls r0, r2, 2
|
|
||||||
adds r0, r4
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, r3
|
|
||||||
bne _080086AC
|
|
||||||
ldrh r0, [r1]
|
|
||||||
b _080086B8
|
|
||||||
.pool
|
|
||||||
_080086AC:
|
|
||||||
adds r0, r2, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r2, r0, 24
|
|
||||||
cmp r2, 0x3F
|
|
||||||
bls _08008686
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
_080086B8:
|
|
||||||
pop {r4-r6}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end GetTagByObjectTileRangeStart
|
|
||||||
|
|
||||||
thumb_func_start AllocSpriteTileRange
|
|
||||||
@ void AllocSpriteTileRange(u16 tag, u16 start, u16 count)
|
|
||||||
AllocSpriteTileRange: @ 80086C4
|
|
||||||
push {r4-r6,lr}
|
|
||||||
adds r4, r0, 0
|
|
||||||
adds r5, r1, 0
|
|
||||||
adds r6, r2, 0
|
|
||||||
lsls r4, 16
|
|
||||||
lsrs r4, 16
|
|
||||||
lsls r5, 16
|
|
||||||
lsrs r5, 16
|
|
||||||
lsls r6, 16
|
|
||||||
lsrs r6, 16
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
bl IndexOfObjectTilesTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
ldr r2, =gUnknown_030009F0
|
|
||||||
lsls r1, r0, 1
|
|
||||||
adds r1, r2
|
|
||||||
strh r4, [r1]
|
|
||||||
ldr r1, =gUnknown_03000A70
|
|
||||||
lsls r0, 2
|
|
||||||
adds r2, r0, r1
|
|
||||||
strh r5, [r2]
|
|
||||||
adds r1, 0x2
|
|
||||||
adds r0, r1
|
|
||||||
strh r6, [r0]
|
|
||||||
pop {r4-r6}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end AllocSpriteTileRange
|
|
||||||
|
|
||||||
thumb_func_start ResetObjectPaletteAllocator
|
|
||||||
@ void ResetObjectPaletteAllocator()
|
|
||||||
ResetObjectPaletteAllocator: @ 800870C
|
|
||||||
push {r4,lr}
|
|
||||||
ldr r1, =gUnknown_0300301C
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r1]
|
|
||||||
movs r2, 0
|
|
||||||
ldr r4, =gUnknown_03000CF0
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
adds r3, r0, 0
|
|
||||||
_0800871C:
|
|
||||||
lsls r0, r2, 1
|
|
||||||
adds r0, r4
|
|
||||||
ldrh r1, [r0]
|
|
||||||
orrs r1, r3
|
|
||||||
strh r1, [r0]
|
|
||||||
adds r0, r2, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r2, r0, 24
|
|
||||||
cmp r2, 0xF
|
|
||||||
bls _0800871C
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end ResetObjectPaletteAllocator
|
|
||||||
|
|
||||||
thumb_func_start LoadTaggedObjectPalette
|
|
||||||
@ u8 LoadTaggedObjectPalette(struct TaggedObjectPalette *palette)
|
|
||||||
LoadTaggedObjectPalette: @ 8008744
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
ldrh r0, [r5, 0x4]
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r4, r0, 24
|
|
||||||
cmp r4, 0xFF
|
|
||||||
beq _0800875A
|
|
||||||
adds r0, r4, 0
|
|
||||||
b _0800878A
|
|
||||||
_0800875A:
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r4, r0, 24
|
|
||||||
cmp r4, 0xFF
|
|
||||||
beq _08008788
|
|
||||||
ldr r1, =gUnknown_03000CF0
|
|
||||||
lsls r0, r4, 1
|
|
||||||
adds r0, r1
|
|
||||||
ldrh r1, [r5, 0x4]
|
|
||||||
strh r1, [r0]
|
|
||||||
ldr r0, [r5]
|
|
||||||
lsls r1, r4, 4
|
|
||||||
bl LoadObjectPalette
|
|
||||||
adds r0, r4, 0
|
|
||||||
b _0800878A
|
|
||||||
.pool
|
|
||||||
_08008788:
|
|
||||||
movs r0, 0xFF
|
|
||||||
_0800878A:
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end LoadTaggedObjectPalette
|
|
||||||
|
|
||||||
thumb_func_start LoadTaggedObjectPalettes
|
|
||||||
@ void LoadTaggedObjectPalettes(struct TaggedObjectPalette *palettes)
|
|
||||||
LoadTaggedObjectPalettes: @ 8008790
|
|
||||||
push {r4,r5,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
movs r4, 0
|
|
||||||
b _0800879E
|
|
||||||
_08008798:
|
|
||||||
adds r0, r4, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r4, r0, 24
|
|
||||||
_0800879E:
|
|
||||||
lsls r0, r4, 3
|
|
||||||
adds r1, r0, r5
|
|
||||||
ldr r0, [r1]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _080087B6
|
|
||||||
adds r0, r1, 0
|
|
||||||
bl LoadTaggedObjectPalette
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
cmp r0, 0xFF
|
|
||||||
bne _08008798
|
|
||||||
_080087B6:
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end LoadTaggedObjectPalettes
|
|
||||||
|
|
||||||
thumb_func_start LoadObjectPalette
|
|
||||||
@ void LoadObjectPalette(void *src, u16 destOffset)
|
|
||||||
LoadObjectPalette: @ 80087BC
|
|
||||||
push {lr}
|
|
||||||
lsls r1, 16
|
|
||||||
movs r2, 0x80
|
|
||||||
lsls r2, 17
|
|
||||||
adds r1, r2
|
|
||||||
lsrs r1, 16
|
|
||||||
movs r2, 0x20
|
|
||||||
bl LoadPalette
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end LoadObjectPalette
|
|
||||||
|
|
||||||
thumb_func_start AllocObjectPalette
|
|
||||||
@ u8 AllocObjectPalette(u16 tag)
|
|
||||||
AllocObjectPalette: @ 80087D4
|
|
||||||
push {r4,lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r4, r0, 16
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r2, r0, 24
|
|
||||||
cmp r2, 0xFF
|
|
||||||
beq _080087FC
|
|
||||||
ldr r1, =gUnknown_03000CF0
|
|
||||||
lsls r0, r2, 1
|
|
||||||
adds r0, r1
|
|
||||||
strh r4, [r0]
|
|
||||||
adds r0, r2, 0
|
|
||||||
b _080087FE
|
|
||||||
.pool
|
|
||||||
_080087FC:
|
|
||||||
movs r0, 0xFF
|
|
||||||
_080087FE:
|
|
||||||
pop {r4}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end AllocObjectPalette
|
|
||||||
|
|
||||||
thumb_func_start IndexOfSpritePaletteTag
|
|
||||||
@ u8 IndexOfSpritePaletteTag(u16 tag)
|
|
||||||
IndexOfSpritePaletteTag: @ 8008804
|
|
||||||
push {lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r2, r0, 16
|
|
||||||
ldr r0, =gUnknown_0300301C
|
|
||||||
ldrb r1, [r0]
|
|
||||||
cmp r1, 0xF
|
|
||||||
bhi _08008836
|
|
||||||
ldr r3, =gUnknown_03000CF0
|
|
||||||
_08008814:
|
|
||||||
lsls r0, r1, 1
|
|
||||||
adds r0, r3
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, r2
|
|
||||||
bne _0800882C
|
|
||||||
adds r0, r1, 0
|
|
||||||
b _08008838
|
|
||||||
.pool
|
|
||||||
_0800882C:
|
|
||||||
adds r0, r1, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r1, r0, 24
|
|
||||||
cmp r1, 0xF
|
|
||||||
bls _08008814
|
|
||||||
_08008836:
|
|
||||||
movs r0, 0xFF
|
|
||||||
_08008838:
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end IndexOfSpritePaletteTag
|
|
||||||
|
|
||||||
thumb_func_start GetObjectPaletteTagBySlot
|
|
||||||
@ u16 GetObjectPaletteTagBySlot(u8 paletteSlot)
|
|
||||||
GetObjectPaletteTagBySlot: @ 800883C
|
|
||||||
lsls r0, 24
|
|
||||||
ldr r1, =gUnknown_03000CF0
|
|
||||||
lsrs r0, 23
|
|
||||||
adds r0, r1
|
|
||||||
ldrh r0, [r0]
|
|
||||||
bx lr
|
|
||||||
.pool
|
|
||||||
thumb_func_end GetObjectPaletteTagBySlot
|
|
||||||
|
|
||||||
thumb_func_start FreeSpritePaletteByTag
|
|
||||||
@ void FreeSpritePaletteByTag(int tag)
|
|
||||||
FreeSpritePaletteByTag: @ 800884C
|
|
||||||
push {lr}
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r1, r0, 24
|
|
||||||
cmp r1, 0xFF
|
|
||||||
beq _08008868
|
|
||||||
ldr r0, =gUnknown_03000CF0
|
|
||||||
lsls r1, 1
|
|
||||||
adds r1, r0
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
strh r0, [r1]
|
|
||||||
_08008868:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end FreeSpritePaletteByTag
|
|
||||||
|
|
||||||
thumb_func_start SetSpriteOamTables_NoPriorityFromTable
|
|
||||||
@ void SetSpriteOamTables_NoPriorityFromTable(struct obj *object, u32 spriteOamTables)
|
|
||||||
SetSpriteOamTables_NoPriorityFromTable: @ 8008874
|
|
||||||
str r1, [r0, 0x18]
|
|
||||||
adds r0, 0x42
|
|
||||||
movs r1, 0x40
|
|
||||||
strb r1, [r0]
|
|
||||||
bx lr
|
|
||||||
thumb_func_end SetSpriteOamTables_NoPriorityFromTable
|
|
||||||
|
|
||||||
thumb_func_start AddSpriteToOamBuffer
|
|
||||||
@ u8 AddSpriteToOamBuffer(struct obj *obj, u8 *spriteIndex)
|
|
||||||
AddSpriteToOamBuffer: @ 8008880
|
|
||||||
push {r4,lr}
|
|
||||||
adds r4, r0, 0
|
|
||||||
adds r3, r1, 0
|
|
||||||
ldr r1, =gOamLimit
|
|
||||||
ldrb r0, [r3]
|
|
||||||
ldrb r1, [r1]
|
|
||||||
cmp r0, r1
|
|
||||||
bcc _08008898
|
|
||||||
movs r0, 0x1
|
|
||||||
b _080088E0
|
|
||||||
.pool
|
|
||||||
_08008898:
|
|
||||||
ldr r0, [r4, 0x18]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _080088AC
|
|
||||||
adds r0, r4, 0
|
|
||||||
adds r0, 0x42
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, 0xC0
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, 0
|
|
||||||
bne _080088CC
|
|
||||||
_080088AC:
|
|
||||||
ldr r0, =gMain
|
|
||||||
ldrb r2, [r3]
|
|
||||||
lsls r2, 3
|
|
||||||
adds r0, 0x38
|
|
||||||
adds r2, r0
|
|
||||||
ldr r0, [r4]
|
|
||||||
ldr r1, [r4, 0x4]
|
|
||||||
str r0, [r2]
|
|
||||||
str r1, [r2, 0x4]
|
|
||||||
ldrb r0, [r3]
|
|
||||||
adds r0, 0x1
|
|
||||||
strb r0, [r3]
|
|
||||||
movs r0, 0
|
|
||||||
b _080088E0
|
|
||||||
.pool
|
|
||||||
_080088CC:
|
|
||||||
ldrb r1, [r3]
|
|
||||||
lsls r1, 3
|
|
||||||
ldr r0, =gUnknown_030022F8
|
|
||||||
adds r1, r0
|
|
||||||
adds r0, r4, 0
|
|
||||||
adds r2, r3, 0
|
|
||||||
bl AddSubspritesToOamBuffer
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
_080088E0:
|
|
||||||
pop {r4}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end AddSpriteToOamBuffer
|
|
||||||
|
|
||||||
thumb_func_start AddSubspritesToOamBuffer
|
|
||||||
@ u8 AddSubspritesToOamBuffer(struct obj *object, struct sprite *sprite, u8 *spriteIndex)
|
|
||||||
AddSubspritesToOamBuffer: @ 80088EC
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r10
|
|
||||||
mov r6, r9
|
|
||||||
mov r5, r8
|
|
||||||
push {r5-r7}
|
|
||||||
sub sp, 0x1C
|
|
||||||
adds r3, r0, 0
|
|
||||||
str r1, [sp]
|
|
||||||
mov r8, r2
|
|
||||||
ldr r0, =gOamLimit
|
|
||||||
ldrb r1, [r2]
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r1, r0
|
|
||||||
bcc _08008910
|
|
||||||
_08008908:
|
|
||||||
movs r0, 0x1
|
|
||||||
b _08008AE6
|
|
||||||
.pool
|
|
||||||
_08008910:
|
|
||||||
adds r0, r3, 0
|
|
||||||
adds r0, 0x42
|
|
||||||
ldrb r1, [r0]
|
|
||||||
lsls r1, 26
|
|
||||||
lsrs r1, 23
|
|
||||||
ldr r2, [r3, 0x18]
|
|
||||||
adds r7, r2, r1
|
|
||||||
mov r12, r3
|
|
||||||
str r0, [sp, 0x18]
|
|
||||||
cmp r7, 0
|
|
||||||
beq _0800892C
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08008942
|
|
||||||
_0800892C:
|
|
||||||
mov r2, r12
|
|
||||||
ldr r0, [r2]
|
|
||||||
ldr r1, [r2, 0x4]
|
|
||||||
ldr r2, [sp]
|
|
||||||
str r0, [r2]
|
|
||||||
str r1, [r2, 0x4]
|
|
||||||
mov r1, r8
|
|
||||||
ldrb r0, [r1]
|
|
||||||
adds r0, 0x1
|
|
||||||
strb r0, [r1]
|
|
||||||
b _08008AE4
|
|
||||||
_08008942:
|
|
||||||
mov r2, r12
|
|
||||||
ldrh r0, [r2, 0x4]
|
|
||||||
lsls r0, 22
|
|
||||||
lsrs r0, 22
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
ldrb r0, [r7]
|
|
||||||
str r0, [sp, 0xC]
|
|
||||||
ldrb r0, [r2, 0x3]
|
|
||||||
lsls r0, 26
|
|
||||||
lsrs r0, 27
|
|
||||||
asrs r1, r0, 3
|
|
||||||
str r1, [sp, 0x10]
|
|
||||||
movs r1, 0x1
|
|
||||||
ldr r2, [sp, 0x10]
|
|
||||||
ands r2, r1
|
|
||||||
str r2, [sp, 0x10]
|
|
||||||
asrs r0, 4
|
|
||||||
mov r10, r0
|
|
||||||
ands r0, r1
|
|
||||||
mov r10, r0
|
|
||||||
mov r1, r12
|
|
||||||
ldrh r0, [r1, 0x2]
|
|
||||||
lsls r0, 23
|
|
||||||
lsrs r0, 23
|
|
||||||
adds r1, 0x28
|
|
||||||
ldrb r1, [r1]
|
|
||||||
lsls r1, 24
|
|
||||||
asrs r1, 24
|
|
||||||
subs r0, r1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r2, r0, 16
|
|
||||||
mov r1, r12
|
|
||||||
ldrb r0, [r1]
|
|
||||||
adds r1, 0x29
|
|
||||||
ldrb r1, [r1]
|
|
||||||
lsls r1, 24
|
|
||||||
asrs r1, 24
|
|
||||||
subs r0, r1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
str r0, [sp, 0x8]
|
|
||||||
movs r0, 0
|
|
||||||
mov r9, r0
|
|
||||||
ldr r1, [sp, 0xC]
|
|
||||||
cmp r9, r1
|
|
||||||
bcc _080089A0
|
|
||||||
b _08008AE4
|
|
||||||
_080089A0:
|
|
||||||
lsls r0, r2, 16
|
|
||||||
asrs r0, 16
|
|
||||||
str r0, [sp, 0x14]
|
|
||||||
_080089A6:
|
|
||||||
mov r2, r8
|
|
||||||
ldrb r0, [r2]
|
|
||||||
ldr r1, =gOamLimit
|
|
||||||
ldrb r1, [r1]
|
|
||||||
cmp r0, r1
|
|
||||||
bcs _08008908
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
mov r2, r9
|
|
||||||
lsls r6, r2, 2
|
|
||||||
adds r2, r6, r0
|
|
||||||
movs r0, 0
|
|
||||||
ldrsb r0, [r2, r0]
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r4, r0, 16
|
|
||||||
movs r0, 0x1
|
|
||||||
ldrsb r0, [r2, r0]
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r5, r0, 16
|
|
||||||
ldr r0, [sp, 0x10]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _080089FC
|
|
||||||
ldr r0, [r2]
|
|
||||||
lsls r1, r0, 12
|
|
||||||
lsrs r1, 30
|
|
||||||
lsls r1, 2
|
|
||||||
lsls r0, 14
|
|
||||||
lsrs r0, 30
|
|
||||||
lsls r0, 4
|
|
||||||
adds r1, r0
|
|
||||||
ldr r0, =gUnknown_082EC754
|
|
||||||
adds r1, r0
|
|
||||||
ldrb r1, [r1]
|
|
||||||
lsls r1, 24
|
|
||||||
asrs r1, 24
|
|
||||||
lsls r0, r4, 16
|
|
||||||
asrs r0, 16
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r4, r0, 16
|
|
||||||
mvns r0, r4
|
|
||||||
adds r0, 0x1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r4, r0, 16
|
|
||||||
_080089FC:
|
|
||||||
mov r1, r10
|
|
||||||
cmp r1, 0
|
|
||||||
beq _08008A2E
|
|
||||||
ldr r0, [r2]
|
|
||||||
lsls r1, r0, 12
|
|
||||||
lsrs r1, 30
|
|
||||||
lsls r1, 2
|
|
||||||
lsls r0, 14
|
|
||||||
lsrs r0, 30
|
|
||||||
lsls r0, 4
|
|
||||||
adds r1, r0
|
|
||||||
ldr r2, =gUnknown_082EC754
|
|
||||||
adds r1, r2
|
|
||||||
ldrb r1, [r1, 0x1]
|
|
||||||
lsls r1, 24
|
|
||||||
asrs r1, 24
|
|
||||||
lsls r0, r5, 16
|
|
||||||
asrs r0, 16
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r5, r0, 16
|
|
||||||
mvns r0, r5
|
|
||||||
adds r0, 0x1
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r5, r0, 16
|
|
||||||
_08008A2E:
|
|
||||||
mov r1, r9
|
|
||||||
lsls r0, r1, 3
|
|
||||||
ldr r2, [sp]
|
|
||||||
adds r3, r0, r2
|
|
||||||
mov r2, r12
|
|
||||||
ldr r0, [r2]
|
|
||||||
ldr r1, [r2, 0x4]
|
|
||||||
str r0, [r3]
|
|
||||||
str r1, [r3, 0x4]
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
adds r0, r6, r0
|
|
||||||
ldr r1, [r0]
|
|
||||||
lsls r1, 14
|
|
||||||
lsrs r1, 30
|
|
||||||
lsls r1, 6
|
|
||||||
ldrb r2, [r3, 0x1]
|
|
||||||
movs r0, 0x3F
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r3, 0x1]
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
adds r0, r6, r0
|
|
||||||
ldr r1, [r0]
|
|
||||||
lsls r1, 12
|
|
||||||
lsrs r1, 30
|
|
||||||
lsls r1, 6
|
|
||||||
ldrb r2, [r3, 0x3]
|
|
||||||
movs r0, 0x3F
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r3, 0x3]
|
|
||||||
lsls r1, r4, 16
|
|
||||||
asrs r1, 16
|
|
||||||
ldr r0, [sp, 0x14]
|
|
||||||
adds r1, r0, r1
|
|
||||||
ldr r2, =0x000001ff
|
|
||||||
adds r0, r2, 0
|
|
||||||
ands r1, r0
|
|
||||||
ldrh r2, [r3, 0x2]
|
|
||||||
ldr r0, =0xfffffe00
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strh r0, [r3, 0x2]
|
|
||||||
ldr r1, [sp, 0x8]
|
|
||||||
adds r0, r1, r5
|
|
||||||
strb r0, [r3]
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
adds r0, r6, r0
|
|
||||||
ldr r1, [r0]
|
|
||||||
lsls r1, 2
|
|
||||||
lsrs r1, 22
|
|
||||||
ldr r2, [sp, 0x4]
|
|
||||||
adds r1, r2, r1
|
|
||||||
ldr r2, =0x000003ff
|
|
||||||
adds r0, r2, 0
|
|
||||||
ands r1, r0
|
|
||||||
ldrh r2, [r3, 0x4]
|
|
||||||
ldr r0, =0xfffffc00
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strh r0, [r3, 0x4]
|
|
||||||
ldr r0, [sp, 0x18]
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, 0xC0
|
|
||||||
ands r0, r1
|
|
||||||
cmp r0, 0x80
|
|
||||||
beq _08008ACA
|
|
||||||
ldr r0, [r7, 0x4]
|
|
||||||
adds r0, r6, r0
|
|
||||||
ldr r1, [r0]
|
|
||||||
lsrs r1, 30
|
|
||||||
lsls r1, 2
|
|
||||||
ldrb r2, [r3, 0x5]
|
|
||||||
movs r0, 0xD
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r3, 0x5]
|
|
||||||
_08008ACA:
|
|
||||||
mov r0, r9
|
|
||||||
adds r0, 0x1
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
mov r9, r0
|
|
||||||
mov r1, r8
|
|
||||||
ldrb r0, [r1]
|
|
||||||
adds r0, 0x1
|
|
||||||
strb r0, [r1]
|
|
||||||
ldr r2, [sp, 0xC]
|
|
||||||
cmp r9, r2
|
|
||||||
bcs _08008AE4
|
|
||||||
b _080089A6
|
|
||||||
_08008AE4:
|
|
||||||
movs r0, 0
|
|
||||||
_08008AE6:
|
|
||||||
add sp, 0x1C
|
|
||||||
pop {r3-r5}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
mov r10, r5
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end AddSubspritesToOamBuffer
|
|
||||||
|
|
||||||
.align 2, 0 @ Don't pad with nop.
|
|
@ -149,7 +149,7 @@ set_256color_bg_bg0: @ 8133F0C
|
|||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl dp13_810BB8C
|
bl dp13_810BB8C
|
||||||
bl sub_8098C64
|
bl sub_8098C64
|
||||||
movs r1, 0xE0
|
movs r1, 0xE0
|
||||||
@ -164,7 +164,7 @@ set_256color_bg_bg0: @ 8133F0C
|
|||||||
ldr r0, =gUnknown_085B1EE8
|
ldr r0, =gUnknown_085B1EE8
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085B1EF8
|
ldr r0, =gUnknown_085B1EF8
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
movs r0, 0x1
|
movs r0, 0x1
|
||||||
negs r0, r0
|
negs r0, r0
|
||||||
mov r1, r9
|
mov r1, r9
|
||||||
|
@ -617,8 +617,8 @@ _080AA8C4:
|
|||||||
bl remove_some_task
|
bl remove_some_task
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r1, =gUnknown_0300301C
|
ldr r1, =gReservedSpritePaletteCount
|
||||||
movs r0, 0x9
|
movs r0, 0x9
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
ldr r0, =gUnknown_08540048
|
ldr r0, =gUnknown_08540048
|
||||||
@ -633,7 +633,7 @@ _080AA8C4:
|
|||||||
movs r2, 0x20
|
movs r2, 0x20
|
||||||
bl LoadPalette
|
bl LoadPalette
|
||||||
ldr r0, =gUnknown_08540100
|
ldr r0, =gUnknown_08540100
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gMain
|
ldr r0, =gMain
|
||||||
movs r2, 0x87
|
movs r2, 0x87
|
||||||
lsls r2, 3
|
lsls r2, 3
|
||||||
|
18
asm/trade.s
18
asm/trade.s
@ -176,7 +176,7 @@ sub_80772A4: @ 80772A4
|
|||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
sub sp, 0xC
|
sub sp, 0xC
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
ldr r2, =gPaletteFade
|
ldr r2, =gPaletteFade
|
||||||
@ -5697,12 +5697,12 @@ _0807A2B8:
|
|||||||
b _0807A2D6
|
b _0807A2D6
|
||||||
_0807A2BC:
|
_0807A2BC:
|
||||||
ldr r0, =gUnknown_0832DCE4
|
ldr r0, =gUnknown_0832DCE4
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0807A2DA
|
b _0807A2DA
|
||||||
.pool
|
.pool
|
||||||
_0807A2C8:
|
_0807A2C8:
|
||||||
ldr r0, =gUnknown_0832DC44
|
ldr r0, =gUnknown_0832DC44
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0807A2DA
|
b _0807A2DA
|
||||||
.pool
|
.pool
|
||||||
_0807A2D4:
|
_0807A2D4:
|
||||||
@ -7273,7 +7273,7 @@ _0807AEC0:
|
|||||||
bl init_uns_table_pokemon_copy
|
bl init_uns_table_pokemon_copy
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =sub_807AC24
|
ldr r0, =sub_807AC24
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl sub_807B170
|
bl sub_807B170
|
||||||
@ -7467,7 +7467,7 @@ _0807B094:
|
|||||||
ldr r0, =gUnknown_08338D18
|
ldr r0, =gUnknown_08338D18
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_08338D20
|
ldr r0, =gUnknown_08338D20
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0807B0DC
|
b _0807B0DC
|
||||||
.pool
|
.pool
|
||||||
_0807B0B0:
|
_0807B0B0:
|
||||||
@ -7732,7 +7732,7 @@ _0807B2D0:
|
|||||||
bl init_uns_table_pokemon_copy
|
bl init_uns_table_pokemon_copy
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =sub_807AC24
|
ldr r0, =sub_807AC24
|
||||||
bl SetVBlankCallback
|
bl SetVBlankCallback
|
||||||
bl sub_807B170
|
bl sub_807B170
|
||||||
@ -7811,7 +7811,7 @@ _0807B3F0:
|
|||||||
ldr r0, =gUnknown_08338D18
|
ldr r0, =gUnknown_08338D18
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_08338D20
|
ldr r0, =gUnknown_08338D20
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
b _0807B424
|
b _0807B424
|
||||||
.pool
|
.pool
|
||||||
_0807B40C:
|
_0807B40C:
|
||||||
@ -8503,9 +8503,9 @@ sub_807BA94: @ 807BA94
|
|||||||
ldr r0, =gUnknown_08338E6C
|
ldr r0, =gUnknown_08338E6C
|
||||||
bl LoadSpriteSheet
|
bl LoadSpriteSheet
|
||||||
ldr r0, =gUnknown_08338D78
|
ldr r0, =gUnknown_08338D78
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
ldr r0, =gUnknown_08338D80
|
ldr r0, =gUnknown_08338D80
|
||||||
bl LoadTaggedObjectPalette
|
bl LoadSpritePalette
|
||||||
pop {r0}
|
pop {r0}
|
||||||
bx r0
|
bx r0
|
||||||
.pool
|
.pool
|
||||||
|
@ -728,7 +728,7 @@ _080C2D36:
|
|||||||
.pool
|
.pool
|
||||||
_080C2D50:
|
_080C2D50:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
ldr r1, =gMain
|
ldr r1, =gMain
|
||||||
movs r0, 0x87
|
movs r0, 0x87
|
||||||
@ -5321,7 +5321,7 @@ _080C54EE:
|
|||||||
_080C54F4:
|
_080C54F4:
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
b _080C56F4
|
b _080C56F4
|
||||||
@ -5604,7 +5604,7 @@ _080C57AC:
|
|||||||
bl sub_80C50D0
|
bl sub_80C50D0
|
||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _080C57E4
|
b _080C57E4
|
||||||
_080C57BE:
|
_080C57BE:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -6946,10 +6946,10 @@ sub_80C62DC: @ 80C62DC
|
|||||||
push {r6,r7}
|
push {r6,r7}
|
||||||
sub sp, 0x18
|
sub sp, 0x18
|
||||||
movs r5, 0
|
movs r5, 0
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetAffineAnimData
|
bl ResetAffineAnimData
|
||||||
ldr r0, =gUnknown_085714E4
|
ldr r0, =gUnknown_085714E4
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r4, =gUnknown_085714BC
|
ldr r4, =gUnknown_085714BC
|
||||||
adds r0, r4, 0
|
adds r0, r4, 0
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
@ -7094,7 +7094,7 @@ _080C642C:
|
|||||||
lsrs r5, r0, 24
|
lsrs r5, r0, 24
|
||||||
cmp r5, 0x6
|
cmp r5, 0x6
|
||||||
bls _080C6410
|
bls _080C6410
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
movs r0, 0x2
|
movs r0, 0x2
|
||||||
bl FreeSpriteTilesByTag
|
bl FreeSpriteTilesByTag
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -7197,7 +7197,7 @@ _080C6520:
|
|||||||
b _080C6694
|
b _080C6694
|
||||||
_080C6526:
|
_080C6526:
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl reset_temp_tile_data_buffers
|
bl reset_temp_tile_data_buffers
|
||||||
b _080C6694
|
b _080C6694
|
||||||
@ -7435,7 +7435,7 @@ _080C676A:
|
|||||||
_080C6774:
|
_080C6774:
|
||||||
bl sub_80C50D0
|
bl sub_80C50D0
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
b _080C67A4
|
b _080C67A4
|
||||||
_080C6782:
|
_080C6782:
|
||||||
movs r0, 0
|
movs r0, 0
|
||||||
@ -7701,9 +7701,9 @@ sub_80C6974: @ 80C6974
|
|||||||
push {r6,r7}
|
push {r6,r7}
|
||||||
sub sp, 0x18
|
sub sp, 0x18
|
||||||
movs r7, 0
|
movs r7, 0
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_085714E4
|
ldr r0, =gUnknown_085714E4
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
ldr r6, =gUnknown_085714BC
|
ldr r6, =gUnknown_085714BC
|
||||||
adds r0, r6, 0
|
adds r0, r6, 0
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
|
@ -180,11 +180,11 @@ _08134906:
|
|||||||
bl ResetTasks
|
bl ResetTasks
|
||||||
bl ResetSpriteData
|
bl ResetSpriteData
|
||||||
bl ResetPaletteFade
|
bl ResetPaletteFade
|
||||||
bl ResetObjectPaletteAllocator
|
bl FreeAllSpritePalettes
|
||||||
ldr r0, =gUnknown_085B2208
|
ldr r0, =gUnknown_085B2208
|
||||||
bl LoadCompressedObjectPic
|
bl LoadCompressedObjectPic
|
||||||
ldr r0, =gUnknown_085B2218
|
ldr r0, =gUnknown_085B2218
|
||||||
bl LoadTaggedObjectPalettes
|
bl LoadSpritePalettes
|
||||||
add sp, 0x8
|
add sp, 0x8
|
||||||
pop {r3}
|
pop {r3}
|
||||||
mov r8, r3
|
mov r8, r3
|
||||||
|
@ -17,7 +17,7 @@ sub_80AAFA4: @ 80AAFA4
|
|||||||
bne _080AB060
|
bne _080AB060
|
||||||
movs r0, 0x90
|
movs r0, 0x90
|
||||||
lsls r0, 5
|
lsls r0, 5
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
adds r5, r0, 0
|
adds r5, r0, 0
|
||||||
lsls r5, 24
|
lsls r5, 24
|
||||||
lsrs r5, 24
|
lsrs r5, 24
|
||||||
@ -33,7 +33,7 @@ sub_80AAFA4: @ 80AAFA4
|
|||||||
adds r0, r4, r1
|
adds r0, r4, r1
|
||||||
strb r5, [r0]
|
strb r5, [r0]
|
||||||
ldr r0, =0x00001201
|
ldr r0, =0x00001201
|
||||||
bl AllocObjectPalette
|
bl AllocSpritePalette
|
||||||
ldr r2, =0x000006d4
|
ldr r2, =0x000006d4
|
||||||
adds r1, r4, r2
|
adds r1, r4, r2
|
||||||
strb r0, [r1]
|
strb r0, [r1]
|
||||||
|
2
common_syms/sprite.txt
Normal file
2
common_syms/sprite.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
gOamMatrixAllocBitmap
|
||||||
|
gReservedSpritePaletteCount
|
@ -1776,7 +1776,7 @@ gNewGameBirchObjectTemplate:: @ 855C244
|
|||||||
.4byte gNewGameBirchOamAttributes
|
.4byte gNewGameBirchOamAttributes
|
||||||
.4byte gNewGameBirchImageAnimTable
|
.4byte gNewGameBirchImageAnimTable
|
||||||
.4byte gNewGameBirchPicTable
|
.4byte gNewGameBirchPicTable
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte SpriteCallbackDummy
|
.4byte SpriteCallbackDummy
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
|
@ -39,7 +39,7 @@ gFieldEffectObjectTemplate_ShadowSmall:: @ 850C9FC
|
|||||||
.4byte gFieldObjectBaseOam_8x8
|
.4byte gFieldObjectBaseOam_8x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
||||||
.4byte gFieldEffectObjectPicTable_ShadowSmall
|
.4byte gFieldEffectObjectPicTable_ShadowSmall
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte oamc_shadow
|
.4byte oamc_shadow
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -49,7 +49,7 @@ gFieldEffectObjectTemplate_ShadowMedium:: @ 850CA14
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
||||||
.4byte gFieldEffectObjectPicTable_ShadowMedium
|
.4byte gFieldEffectObjectPicTable_ShadowMedium
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte oamc_shadow
|
.4byte oamc_shadow
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -59,7 +59,7 @@ gFieldEffectObjectTemplate_ShadowLarge:: @ 850CA2C
|
|||||||
.4byte gFieldObjectBaseOam_32x8
|
.4byte gFieldObjectBaseOam_32x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
||||||
.4byte gFieldEffectObjectPicTable_ShadowLarge
|
.4byte gFieldEffectObjectPicTable_ShadowLarge
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte oamc_shadow
|
.4byte oamc_shadow
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -69,7 +69,7 @@ gFieldEffectObjectTemplate_ShadowExtraLarge:: @ 850CA44
|
|||||||
.4byte gFieldObjectBaseOam_64x32
|
.4byte gFieldObjectBaseOam_64x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
.4byte gFieldEffectObjectImageAnimTable_Shadow
|
||||||
.4byte gFieldEffectObjectPicTable_ShadowExtraLarge
|
.4byte gFieldEffectObjectPicTable_ShadowExtraLarge
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte oamc_shadow
|
.4byte oamc_shadow
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -100,7 +100,7 @@ gFieldEffectObjectTemplate_TallGrass:: @ 850CAA0
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_TallGrass
|
.4byte gFieldEffectObjectImageAnimTable_TallGrass
|
||||||
.4byte gFieldEffectObjectPicTable_TallGrass
|
.4byte gFieldEffectObjectPicTable_TallGrass
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte unc_grass_normal
|
.4byte unc_grass_normal
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -134,7 +134,7 @@ gFieldEffectObjectTemplate_Ripple:: @ 850CB08
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Ripple
|
.4byte gFieldEffectObjectImageAnimTable_Ripple
|
||||||
.4byte gFieldEffectObjectPicTable_Ripple
|
.4byte gFieldEffectObjectPicTable_Ripple
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -165,7 +165,7 @@ gFieldEffectObjectTemplate_Ash:: @ 850CB64
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Ash
|
.4byte gFieldEffectObjectImageAnimTable_Ash
|
||||||
.4byte gFieldEffectObjectPicTable_Ash
|
.4byte gFieldEffectObjectPicTable_Ash
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155460
|
.4byte sub_8155460
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -208,7 +208,7 @@ gFieldEffectObjectTemplate_SurfBlob:: @ 850CBC4
|
|||||||
.4byte gFieldObjectBaseOam_32x32
|
.4byte gFieldObjectBaseOam_32x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_SurfBlob
|
.4byte gFieldEffectObjectImageAnimTable_SurfBlob
|
||||||
.4byte gFieldEffectObjectPicTable_SurfBlob
|
.4byte gFieldEffectObjectPicTable_SurfBlob
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155658
|
.4byte sub_8155658
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -260,7 +260,7 @@ gFieldEffectObjectTemplate_Arrow:: @ 850CC5C
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Arrow
|
.4byte gFieldEffectObjectImageAnimTable_Arrow
|
||||||
.4byte gFieldEffectObjectPicTable_Arrow
|
.4byte gFieldEffectObjectPicTable_Arrow
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte SpriteCallbackDummy
|
.4byte SpriteCallbackDummy
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -287,7 +287,7 @@ gFieldEffectObjectTemplate_GroundImpactDust:: @ 850CCA0
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_GroundImpactDust
|
.4byte gFieldEffectObjectImageAnimTable_GroundImpactDust
|
||||||
.4byte gFieldEffectObjectPicTable_GroundImpactDust
|
.4byte gFieldEffectObjectPicTable_GroundImpactDust
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8156194
|
.4byte sub_8156194
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -316,7 +316,7 @@ gFieldEffectObjectTemplate_BikeHopTallGrass:: @ 850CCF0
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_BikeHopTallGrass
|
.4byte gFieldEffectObjectImageAnimTable_BikeHopTallGrass
|
||||||
.4byte gFieldEffectObjectPicTable_BikeHopTallGrass
|
.4byte gFieldEffectObjectPicTable_BikeHopTallGrass
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8156194
|
.4byte sub_8156194
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -359,7 +359,7 @@ gFieldEffectObjectTemplate_SandFootprints:: @ 850CD4C
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_SandFootprints
|
.4byte gFieldEffectObjectImageAnimTable_SandFootprints
|
||||||
.4byte gFieldEffectObjectPicTable_SandFootprints
|
.4byte gFieldEffectObjectPicTable_SandFootprints
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8154C60
|
.4byte sub_8154C60
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -402,7 +402,7 @@ gFieldEffectObjectTemplate_DeepSandFootprints:: @ 850CDA8
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_DeepSandFootprints
|
.4byte gFieldEffectObjectImageAnimTable_DeepSandFootprints
|
||||||
.4byte gFieldEffectObjectPicTable_DeepSandFootprints
|
.4byte gFieldEffectObjectPicTable_DeepSandFootprints
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8154C60
|
.4byte sub_8154C60
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -471,7 +471,7 @@ gFieldEffectObjectTemplate_BikeTireTracks:: @ 850CE44
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_BikeTireTracks
|
.4byte gFieldEffectObjectImageAnimTable_BikeTireTracks
|
||||||
.4byte gFieldEffectObjectPicTable_BikeTireTracks
|
.4byte gFieldEffectObjectPicTable_BikeTireTracks
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8154C60
|
.4byte sub_8154C60
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -500,7 +500,7 @@ gFieldEffectObjectTemplate_BikeHopBigSplash:: @ 850CE94
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_BikeHopBigSplash
|
.4byte gFieldEffectObjectImageAnimTable_BikeHopBigSplash
|
||||||
.4byte gFieldEffectObjectPicTable_BikeHopBigSplash
|
.4byte gFieldEffectObjectPicTable_BikeHopBigSplash
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8156194
|
.4byte sub_8156194
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -538,7 +538,7 @@ gFieldEffectObjectTemplate_Splash:: @ 850CEF4
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Splash
|
.4byte gFieldEffectObjectImageAnimTable_Splash
|
||||||
.4byte gFieldEffectObjectPicTable_Splash
|
.4byte gFieldEffectObjectPicTable_Splash
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8154D90
|
.4byte sub_8154D90
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -565,7 +565,7 @@ gFieldEffectObjectTemplate_BikeHopSmallSplash:: @ 850CF38
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_BikeHopSmallSplash
|
.4byte gFieldEffectObjectImageAnimTable_BikeHopSmallSplash
|
||||||
.4byte gFieldEffectObjectPicTable_BikeHopSmallSplash
|
.4byte gFieldEffectObjectPicTable_BikeHopSmallSplash
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8156194
|
.4byte sub_8156194
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -597,7 +597,7 @@ gFieldEffectObjectTemplate_LongGrass:: @ 850CF94
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_LongGrass
|
.4byte gFieldEffectObjectImageAnimTable_LongGrass
|
||||||
.4byte gFieldEffectObjectPicTable_LongGrass
|
.4byte gFieldEffectObjectPicTable_LongGrass
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte unc_grass_tall
|
.4byte unc_grass_tall
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -630,7 +630,7 @@ gFieldEffectObjectTemplate_Unknown16:: @ 850CFFC
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown16
|
.4byte gFieldEffectObjectImageAnimTable_Unknown16
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown16
|
.4byte gFieldEffectObjectPicTable_Unknown16
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8156194
|
.4byte sub_8156194
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -669,7 +669,7 @@ gFieldEffectObjectTemplate_Unknown17:: @ 850D088
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown17
|
.4byte gFieldEffectObjectImageAnimTable_Unknown17
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown17
|
.4byte gFieldEffectObjectPicTable_Unknown17
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -700,7 +700,7 @@ gFieldEffectObjectTemplate_Unknown18:: @ 850D0E0
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown18
|
.4byte gFieldEffectObjectImageAnimTable_Unknown18
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown18
|
.4byte gFieldEffectObjectPicTable_Unknown18
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -729,7 +729,7 @@ gFieldEffectObjectTemplate_Unknown19:: @ 850D130
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown19
|
.4byte gFieldEffectObjectImageAnimTable_Unknown19
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown19
|
.4byte gFieldEffectObjectPicTable_Unknown19
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -756,7 +756,7 @@ gFieldEffectObjectTemplate_Unknown29:: @ 850D174
|
|||||||
.4byte gFieldObjectBaseOam_16x8
|
.4byte gFieldObjectBaseOam_16x8
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown29
|
.4byte gFieldEffectObjectImageAnimTable_Unknown29
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown29
|
.4byte gFieldEffectObjectPicTable_Unknown29
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81559BC
|
.4byte sub_81559BC
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -787,7 +787,7 @@ gFieldEffectObjectTemplate_Unknown20:: @ 850D1CC
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown20
|
.4byte gFieldEffectObjectImageAnimTable_Unknown20
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown20
|
.4byte gFieldEffectObjectPicTable_Unknown20
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -826,7 +826,7 @@ gFieldEffectObjectTemplate_Unknown21:: @ 850D28C
|
|||||||
.2byte 0x0 @ tiles tag
|
.2byte 0x0 @ tiles tag
|
||||||
.2byte 0xFFFF @ palette tag
|
.2byte 0xFFFF @ palette tag
|
||||||
.4byte gDummyOamData
|
.4byte gDummyOamData
|
||||||
.4byte gDummyObjectImageAnimTable
|
.4byte gDummySpriteAnimTable
|
||||||
.4byte NULL
|
.4byte NULL
|
||||||
.4byte gFieldEffectObjectRotScalAnimTable_Unknown21
|
.4byte gFieldEffectObjectRotScalAnimTable_Unknown21
|
||||||
.4byte SpriteCallbackDummy
|
.4byte SpriteCallbackDummy
|
||||||
@ -875,7 +875,7 @@ gFieldEffectObjectTemplate_BerryTreeGrowthSparkle:: @ 850D32C
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_BerryTreeGrowthSparkle
|
.4byte gFieldEffectObjectImageAnimTable_BerryTreeGrowthSparkle
|
||||||
.4byte gFieldEffectObjectPicTable_BerryTreeGrowthSparkle
|
.4byte gFieldEffectObjectPicTable_BerryTreeGrowthSparkle
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_81561D0
|
.4byte sub_81561D0
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -916,7 +916,7 @@ gFieldEffectObjectTemplate_TreeDisguise:: @ 850D3AC
|
|||||||
.4byte gFieldObjectBaseOam_16x32
|
.4byte gFieldObjectBaseOam_16x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_TreeDisguise
|
.4byte gFieldEffectObjectImageAnimTable_TreeDisguise
|
||||||
.4byte gFieldEffectObjectPicTable_TreeDisguise
|
.4byte gFieldEffectObjectPicTable_TreeDisguise
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155C88
|
.4byte sub_8155C88
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -957,7 +957,7 @@ gFieldEffectObjectTemplate_MountainDisguise:: @ 850D42C
|
|||||||
.4byte gFieldObjectBaseOam_16x32
|
.4byte gFieldObjectBaseOam_16x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_MountainDisguise
|
.4byte gFieldEffectObjectImageAnimTable_MountainDisguise
|
||||||
.4byte gFieldEffectObjectPicTable_MountainDisguise
|
.4byte gFieldEffectObjectPicTable_MountainDisguise
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155C88
|
.4byte sub_8155C88
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -977,7 +977,7 @@ gFieldEffectObjectTemplate_SandDisguisePlaceholder:: @ 850D47C
|
|||||||
.4byte gFieldObjectBaseOam_16x32
|
.4byte gFieldObjectBaseOam_16x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_TreeDisguise
|
.4byte gFieldEffectObjectImageAnimTable_TreeDisguise
|
||||||
.4byte gFieldEffectObjectPicTable_SandDisguisePlaceholder
|
.4byte gFieldEffectObjectPicTable_SandDisguisePlaceholder
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155C88
|
.4byte sub_8155C88
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1000,7 +1000,7 @@ gFieldEffectObjectTemplate_Bird:: @ 850D4A8
|
|||||||
.4byte gFieldObjectBaseOam_32x32
|
.4byte gFieldObjectBaseOam_32x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Bird
|
.4byte gFieldEffectObjectImageAnimTable_Bird
|
||||||
.4byte gFieldEffectObjectPicTable_Bird
|
.4byte gFieldEffectObjectPicTable_Bird
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte SpriteCallbackDummy
|
.4byte SpriteCallbackDummy
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1025,7 +1025,7 @@ gFieldEffectObjectTemplate_ShortGrass:: @ 850D4E0
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_ShortGrass
|
.4byte gFieldEffectObjectImageAnimTable_ShortGrass
|
||||||
.4byte gFieldEffectObjectPicTable_ShortGrass
|
.4byte gFieldEffectObjectPicTable_ShortGrass
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8154A10
|
.4byte sub_8154A10
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1048,7 +1048,7 @@ gFieldEffectObjectTemplate_HotSpringsWater:: @ 850D50C
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_HotSpringsWater
|
.4byte gFieldEffectObjectImageAnimTable_HotSpringsWater
|
||||||
.4byte gFieldEffectObjectPicTable_HotSpringsWater
|
.4byte gFieldEffectObjectPicTable_HotSpringsWater
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155158
|
.4byte sub_8155158
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1079,7 +1079,7 @@ gFieldEffectObjectTemplate_JumpOutOfAsh:: @ 850D568
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_JumpOutOfAsh
|
.4byte gFieldEffectObjectImageAnimTable_JumpOutOfAsh
|
||||||
.4byte gFieldEffectObjectPicTable_JumpOutOfAsh
|
.4byte gFieldEffectObjectPicTable_JumpOutOfAsh
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_80B7CAC
|
.4byte sub_80B7CAC
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1114,7 +1114,7 @@ gFieldEffectObjectTemplate_Unknown33:: @ 850D5CC
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown33
|
.4byte gFieldEffectObjectImageAnimTable_Unknown33
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown33
|
.4byte gFieldEffectObjectPicTable_Unknown33
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_80B7A58
|
.4byte sub_80B7A58
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1151,7 +1151,7 @@ gFieldEffectObjectTemplate_Bubbles:: @ 850D64C
|
|||||||
.4byte gFieldObjectBaseOam_16x32
|
.4byte gFieldObjectBaseOam_16x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Bubbles
|
.4byte gFieldEffectObjectImageAnimTable_Bubbles
|
||||||
.4byte gFieldEffectObjectPicTable_Bubbles
|
.4byte gFieldEffectObjectPicTable_Bubbles
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155AEC
|
.4byte sub_8155AEC
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1177,7 +1177,7 @@ gFieldEffectObjectTemplate_Unknown35:: @ 850D688
|
|||||||
.4byte gFieldObjectBaseOam_16x16
|
.4byte gFieldObjectBaseOam_16x16
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Unknown35
|
.4byte gFieldEffectObjectImageAnimTable_Unknown35
|
||||||
.4byte gFieldEffectObjectPicTable_Unknown35
|
.4byte gFieldEffectObjectPicTable_Unknown35
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155E50
|
.4byte sub_8155E50
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
@ -1204,5 +1204,5 @@ gFieldEffectObjectTemplate_Rayquaza:: @ 850D6BC
|
|||||||
.4byte gFieldObjectBaseOam_32x32
|
.4byte gFieldObjectBaseOam_32x32
|
||||||
.4byte gFieldEffectObjectImageAnimTable_Rayquaza
|
.4byte gFieldEffectObjectImageAnimTable_Rayquaza
|
||||||
.4byte gFieldEffectObjectPicTable_Rayquaza
|
.4byte gFieldEffectObjectPicTable_Rayquaza
|
||||||
.4byte gDummyObjectRotScalAnimTable
|
.4byte gDummySpriteAffineAnimTable
|
||||||
.4byte sub_8155F80
|
.4byte sub_8155F80
|
||||||
|
File diff suppressed because it is too large
Load Diff
22
data/io_reg.s
Normal file
22
data/io_reg.s
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.include "asm/macros.inc"
|
||||||
|
.include "constants/constants.inc"
|
||||||
|
|
||||||
|
.section .rodata
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.align 2
|
||||||
|
gUnref_82EC784:: @ 82EC784
|
||||||
|
.incbin "baserom.gba", 0x2EC784, 0x40
|
||||||
|
|
||||||
|
gUnknown_82EC7C4:: @ 82EC7C4
|
||||||
|
.2byte 0x0100
|
||||||
|
.2byte 0x0200
|
||||||
|
.2byte 0x0400
|
||||||
|
.2byte 0x0800
|
||||||
|
|
||||||
|
gUnknown_82EC7CC:: @ 82EC7CC
|
||||||
|
.2byte 0x0001
|
||||||
|
.2byte 0x0002
|
||||||
|
.2byte 0x0004
|
||||||
|
.2byte 0x0008
|
@ -1,68 +0,0 @@
|
|||||||
.include "asm/macros.inc"
|
|
||||||
.include "constants/constants.inc"
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
|
|
||||||
@ Unreferenced data. Also unreferenced in Ruby.
|
|
||||||
.incbin "baserom.gba", 0x2ec61c, 0x18
|
|
||||||
|
|
||||||
sCenterToCornerVecTable:: @ 82EC634
|
|
||||||
.incbin "baserom.gba", 0x2ec634, 0x18
|
|
||||||
|
|
||||||
sDummySprite:: @ 82EC64C
|
|
||||||
.incbin "baserom.gba", 0x2ec64c, 0x44
|
|
||||||
|
|
||||||
@ off-screen and low priority relative to background
|
|
||||||
gDummyOamData:: @ 82EC690
|
|
||||||
.2byte 160 @ Y
|
|
||||||
.2byte 304 @ X
|
|
||||||
.2byte 3 << 10 @ priority
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gDummyObjectImageAnim:: @ 82EC698
|
|
||||||
obj_image_anim_end
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gDummyObjectImageAnimTable:: @ 82EC69C
|
|
||||||
.4byte gDummyObjectImageAnim
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gDummyObjectRotScalAnim:: @ 82EC6A0
|
|
||||||
obj_rot_scal_anim_end
|
|
||||||
|
|
||||||
.align 2
|
|
||||||
gDummyObjectRotScalAnimTable:: @ 82EC6A8
|
|
||||||
.4byte gDummyObjectRotScalAnim
|
|
||||||
|
|
||||||
gDummySpriteTemplate:: @ 82EC6AC
|
|
||||||
.incbin "baserom.gba", 0x2ec6ac, 0x18
|
|
||||||
|
|
||||||
sAnimFuncs:: @ 82EC6C4
|
|
||||||
.incbin "baserom.gba", 0x2ec6c4, 0x8
|
|
||||||
|
|
||||||
sAffineAnimFuncs:: @ 82EC6CC
|
|
||||||
.incbin "baserom.gba", 0x2ec6cc, 0x8
|
|
||||||
|
|
||||||
sAnimCmdFuncs:: @ 82EC6D4
|
|
||||||
.incbin "baserom.gba", 0x2ec6d4, 0x10
|
|
||||||
|
|
||||||
sAffineAnimCmdFuncs:: @ 82EC6E4
|
|
||||||
.incbin "baserom.gba", 0x2ec6e4, 0x10
|
|
||||||
|
|
||||||
gUnknown_082EC6F4:: @ 82EC6F4
|
|
||||||
.incbin "baserom.gba", 0x2ec6f4, 0x60
|
|
||||||
|
|
||||||
gUnknown_082EC754:: @ 82EC754
|
|
||||||
.incbin "baserom.gba", 0x2ec754, 0x70
|
|
||||||
|
|
||||||
gUnknown_82EC7C4:: @ 82EC7C4
|
|
||||||
.2byte 0x0100
|
|
||||||
.2byte 0x0200
|
|
||||||
.2byte 0x0400
|
|
||||||
.2byte 0x0800
|
|
||||||
|
|
||||||
gUnknown_82EC7CC:: @ 82EC7CC
|
|
||||||
.2byte 0x0001
|
|
||||||
.2byte 0x0002
|
|
||||||
.2byte 0x0004
|
|
||||||
.2byte 0x0008
|
|
@ -145,8 +145,8 @@ enum
|
|||||||
|
|
||||||
struct Subsprite
|
struct Subsprite
|
||||||
{
|
{
|
||||||
u16 x;
|
s8 x; // was u16 in R/S
|
||||||
u16 y;
|
s8 y; // was u16 in R/S
|
||||||
u16 shape:2;
|
u16 shape:2;
|
||||||
u16 size:2;
|
u16 size:2;
|
||||||
u16 tileOffset:10;
|
u16 tileOffset:10;
|
||||||
@ -299,5 +299,7 @@ bool8 AddSubspritesToOamBuffer(struct Sprite *sprite, struct OamData *destOam, u
|
|||||||
void CopyToSprites(u8 *src);
|
void CopyToSprites(u8 *src);
|
||||||
void CopyFromSprites(u8 *dest);
|
void CopyFromSprites(u8 *dest);
|
||||||
u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
|
u8 SpriteTileAllocBitmapOp(u16 bit, u8 op);
|
||||||
|
void ClearSpriteCopyRequests(void);
|
||||||
|
void ResetAffineAnimData(void);
|
||||||
|
|
||||||
#endif //GUARD_SPRITE_H
|
#endif //GUARD_SPRITE_H
|
||||||
|
@ -50,7 +50,6 @@ SECTIONS {
|
|||||||
src/window.o(.text);
|
src/window.o(.text);
|
||||||
src/text.o(.text);
|
src/text.o(.text);
|
||||||
src/sprite.o(.text);
|
src/sprite.o(.text);
|
||||||
asm/sprite.o(.text);
|
|
||||||
src/string_util.o(.text);
|
src/string_util.o(.text);
|
||||||
asm/link.o(.text);
|
asm/link.o(.text);
|
||||||
asm/rtc.o(.text);
|
asm/rtc.o(.text);
|
||||||
@ -266,7 +265,8 @@ SECTIONS {
|
|||||||
data/bg.o(.rodata);
|
data/bg.o(.rodata);
|
||||||
src/window.o(.rodata);
|
src/window.o(.rodata);
|
||||||
src/text.o(.rodata);
|
src/text.o(.rodata);
|
||||||
data/sprite.o(.rodata);
|
src/sprite.o(.rodata);
|
||||||
|
data/io_reg.o(.rodata);
|
||||||
src/string_util.o(.rodata);
|
src/string_util.o(.rodata);
|
||||||
data/data2.o(.rodata);
|
data/data2.o(.rodata);
|
||||||
src/trig.o(.rodata);
|
src/trig.o(.rodata);
|
||||||
|
563
src/sprite.c
563
src/sprite.c
@ -1,6 +1,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "palette.h"
|
||||||
|
|
||||||
#define MAX_SPRITE_COPY_REQUESTS 64
|
#define MAX_SPRITE_COPY_REQUESTS 64
|
||||||
|
|
||||||
@ -32,63 +33,259 @@ struct SpriteCopyRequest
|
|||||||
u16 size;
|
u16 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
// this file's functions
|
struct OamDimensions
|
||||||
void UpdateOamCoords(void);
|
{
|
||||||
void BuildSpritePriorities(void);
|
s8 width;
|
||||||
void SortSprites(void);
|
s8 height;
|
||||||
void CopyMatricesToOamBuffer(void);
|
};
|
||||||
void AddSpritesToOamBuffer(void);
|
|
||||||
u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
|
static void UpdateOamCoords(void);
|
||||||
void ClearSpriteCopyRequests(void);
|
static void BuildSpritePriorities(void);
|
||||||
void ResetOamMatrices(void);
|
static void SortSprites(void);
|
||||||
void ResetSprite(struct Sprite *sprite);
|
static void CopyMatricesToOamBuffer(void);
|
||||||
s16 AllocSpriteTiles(u16 tileCount);
|
static void AddSpritesToOamBuffer(void);
|
||||||
void RequestSpriteFrameImageCopy(u16 index, u16 tileNum, const struct SpriteFrameImage *images);
|
static u8 CreateSpriteAt(u8 index, const struct SpriteTemplate *template, s16 x, s16 y, u8 subpriority);
|
||||||
void ResetAllSprites(void);
|
static void ResetOamMatrices(void);
|
||||||
void BeginAnim(struct Sprite *sprite);
|
static void ResetSprite(struct Sprite *sprite);
|
||||||
void ContinueAnim(struct Sprite *sprite);
|
static s16 AllocSpriteTiles(u16 tileCount);
|
||||||
void AnimCmd_frame(struct Sprite *sprite);
|
static void RequestSpriteFrameImageCopy(u16 index, u16 tileNum, const struct SpriteFrameImage *images);
|
||||||
void AnimCmd_end(struct Sprite *sprite);
|
static void ResetAllSprites(void);
|
||||||
void AnimCmd_jump(struct Sprite *sprite);
|
static void BeginAnim(struct Sprite *sprite);
|
||||||
void AnimCmd_loop(struct Sprite *sprite);
|
static void ContinueAnim(struct Sprite *sprite);
|
||||||
void BeginAnimLoop(struct Sprite *sprite);
|
static void AnimCmd_frame(struct Sprite *sprite);
|
||||||
void ContinueAnimLoop(struct Sprite *sprite);
|
static void AnimCmd_end(struct Sprite *sprite);
|
||||||
void JumpToTopOfAnimLoop(struct Sprite *sprite);
|
static void AnimCmd_jump(struct Sprite *sprite);
|
||||||
void BeginAffineAnim(struct Sprite *sprite);
|
static void AnimCmd_loop(struct Sprite *sprite);
|
||||||
void ContinueAffineAnim(struct Sprite *sprite);
|
static void BeginAnimLoop(struct Sprite *sprite);
|
||||||
void AffineAnimDelay(u8 matrixNum, struct Sprite *sprite);
|
static void ContinueAnimLoop(struct Sprite *sprite);
|
||||||
void AffineAnimCmd_loop(u8 matrixNum, struct Sprite *sprite);
|
static void JumpToTopOfAnimLoop(struct Sprite *sprite);
|
||||||
void BeginAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
static void BeginAffineAnim(struct Sprite *sprite);
|
||||||
void ContinueAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
static void ContinueAffineAnim(struct Sprite *sprite);
|
||||||
void JumpToTopOfAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
static void AffineAnimDelay(u8 matrixNum, struct Sprite *sprite);
|
||||||
void AffineAnimCmd_jump(u8 matrixNum, struct Sprite *sprite);
|
static void AffineAnimCmd_loop(u8 matrixNum, struct Sprite *sprite);
|
||||||
void AffineAnimCmd_end(u8 matrixNum, struct Sprite *sprite);
|
static void BeginAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
||||||
void AffineAnimCmd_frame(u8 matrixNum, struct Sprite *sprite);
|
static void ContinueAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
||||||
void CopyOamMatrix(u8 destMatrixIndex, struct OamMatrix *srcMatrix);
|
static void JumpToTopOfAffineAnimLoop(u8 matrixNum, struct Sprite *sprite);
|
||||||
u8 GetSpriteMatrixNum(struct Sprite *sprite);
|
static void AffineAnimCmd_jump(u8 matrixNum, struct Sprite *sprite);
|
||||||
void SetSpriteOamFlipBits(struct Sprite *sprite, u8 hFlip, u8 vFlip);
|
static void AffineAnimCmd_end(u8 matrixNum, struct Sprite *sprite);
|
||||||
void AffineAnimStateRestartAnim(u8 matrixNum);
|
static void AffineAnimCmd_frame(u8 matrixNum, struct Sprite *sprite);
|
||||||
void AffineAnimStateStartAnim(u8 matrixNum, u8 animNum);
|
static void CopyOamMatrix(u8 destMatrixIndex, struct OamMatrix *srcMatrix);
|
||||||
void AffineAnimStateReset(u8 matrixNum);
|
static u8 GetSpriteMatrixNum(struct Sprite *sprite);
|
||||||
void ApplyAffineAnimFrameAbsolute(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
static void SetSpriteOamFlipBits(struct Sprite *sprite, u8 hFlip, u8 vFlip);
|
||||||
void DecrementAnimDelayCounter(struct Sprite *sprite);
|
static void AffineAnimStateRestartAnim(u8 matrixNum);
|
||||||
bool8 DecrementAffineAnimDelayCounter(struct Sprite *sprite, u8 matrixNum);
|
static void AffineAnimStateStartAnim(u8 matrixNum, u8 animNum);
|
||||||
void ApplyAffineAnimFrameRelativeAndUpdateMatrix(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
static void AffineAnimStateReset(u8 matrixNum);
|
||||||
s16 ConvertScaleParam(s16 scale);
|
static void ApplyAffineAnimFrameAbsolute(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
||||||
void GetAffineAnimFrame(u8 matrixNum, struct Sprite *sprite, struct AffineAnimFrameCmd *frameCmd);
|
static void DecrementAnimDelayCounter(struct Sprite *sprite);
|
||||||
void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
static bool8 DecrementAffineAnimDelayCounter(struct Sprite *sprite, u8 matrixNum);
|
||||||
void ResetAffineAnimData(void);
|
static void ApplyAffineAnimFrameRelativeAndUpdateMatrix(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
||||||
u8 IndexOfSpriteTileTag(u16 tag);
|
static s16 ConvertScaleParam(s16 scale);
|
||||||
void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
|
static void GetAffineAnimFrame(u8 matrixNum, struct Sprite *sprite, struct AffineAnimFrameCmd *frameCmd);
|
||||||
void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
|
static void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameCmd);
|
||||||
void obj_update_pos2(struct Sprite* sprite, s32 a1, s32 a2);
|
static u8 IndexOfSpriteTileTag(u16 tag);
|
||||||
|
static void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
|
||||||
|
static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
|
||||||
|
static void obj_update_pos2(struct Sprite* sprite, s32 a1, s32 a2);
|
||||||
|
|
||||||
typedef void (*AnimFunc)(struct Sprite *);
|
typedef void (*AnimFunc)(struct Sprite *);
|
||||||
typedef void (*AnimCmdFunc)(struct Sprite *);
|
typedef void (*AnimCmdFunc)(struct Sprite *);
|
||||||
typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
|
typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
|
||||||
|
|
||||||
extern struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT];
|
#define DUMMY_OAM_DATA \
|
||||||
extern u32 gOamMatrixAllocBitmap;
|
{ \
|
||||||
|
160, /* Y (off-screen) */ \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
304, /* X */ \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
0, \
|
||||||
|
3, /* lowest priority */ \
|
||||||
|
0, \
|
||||||
|
0 \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ANIM_END 0xFFFF
|
||||||
|
#define AFFINE_ANIM_END 0x7FFF
|
||||||
|
|
||||||
|
// forward declarations
|
||||||
|
const union AnimCmd * const gDummySpriteAnimTable[];
|
||||||
|
const union AffineAnimCmd * const gDummySpriteAffineAnimTable[];
|
||||||
|
const struct SpriteTemplate gDummySpriteTemplate;
|
||||||
|
|
||||||
|
// Unreferenced data. Also unreferenced in R/S.
|
||||||
|
static const u8 sUnknownData[24] =
|
||||||
|
{
|
||||||
|
0x01, 0x04, 0x10, 0x40,
|
||||||
|
0x02, 0x04, 0x08, 0x20,
|
||||||
|
0x02, 0x04, 0x08, 0x20,
|
||||||
|
0x01, 0x04, 0x10, 0x40,
|
||||||
|
0x02, 0x04, 0x08, 0x20,
|
||||||
|
0x02, 0x04, 0x08, 0x20,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const u8 sCenterToCornerVecTable[3][4][2] =
|
||||||
|
{
|
||||||
|
{ // square
|
||||||
|
{ -4, -4 },
|
||||||
|
{ -8, -8 },
|
||||||
|
{ -16, -16 },
|
||||||
|
{ -32, -32 },
|
||||||
|
},
|
||||||
|
{ // horizontal rectangle
|
||||||
|
{ -8, -4 },
|
||||||
|
{ -16, -4 },
|
||||||
|
{ -16, -8 },
|
||||||
|
{ -32, -16 },
|
||||||
|
},
|
||||||
|
{ // vertical rectangle
|
||||||
|
{ -4, -8 },
|
||||||
|
{ -4, -16 },
|
||||||
|
{ -8, -16 },
|
||||||
|
{ -16, -32 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct Sprite sDummySprite =
|
||||||
|
{
|
||||||
|
.oam = DUMMY_OAM_DATA,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.template = &gDummySpriteTemplate,
|
||||||
|
.subspriteTables = NULL,
|
||||||
|
.callback = SpriteCallbackDummy,
|
||||||
|
.pos1 = { 304, 160 },
|
||||||
|
.pos2 = { 0, 0 },
|
||||||
|
.centerToCornerVecX = 0,
|
||||||
|
.centerToCornerVecY = 0,
|
||||||
|
.animNum = 0,
|
||||||
|
.animCmdIndex = 0,
|
||||||
|
.animDelayCounter = 0,
|
||||||
|
.animPaused = 0,
|
||||||
|
.affineAnimPaused = 0,
|
||||||
|
.animLoopCounter = 0,
|
||||||
|
.data0 = 0,
|
||||||
|
.data1 = 0,
|
||||||
|
.data2 = 0,
|
||||||
|
.data3 = 0,
|
||||||
|
.data4 = 0,
|
||||||
|
.data5 = 0,
|
||||||
|
.data6 = 0,
|
||||||
|
.data7 = 0,
|
||||||
|
.inUse = 0,
|
||||||
|
.coordOffsetEnabled = 0,
|
||||||
|
.invisible = 0,
|
||||||
|
.flags_3 = 0,
|
||||||
|
.flags_4 = 0,
|
||||||
|
.flags_5 = 0,
|
||||||
|
.flags_6 = 0,
|
||||||
|
.flags_7 = 0,
|
||||||
|
.hFlip = 0,
|
||||||
|
.vFlip = 0,
|
||||||
|
.animBeginning = 0,
|
||||||
|
.affineAnimBeginning = 0,
|
||||||
|
.animEnded = 0,
|
||||||
|
.affineAnimEnded = 0,
|
||||||
|
.usingSheet = 0,
|
||||||
|
.flags_f = 0,
|
||||||
|
.sheetTileStart = 0,
|
||||||
|
.subspriteTableNum = 0,
|
||||||
|
.subspriteMode = 0,
|
||||||
|
.subpriority = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct OamData gDummyOamData = DUMMY_OAM_DATA;
|
||||||
|
|
||||||
|
static const union AnimCmd sDummyAnim = { ANIM_END };
|
||||||
|
|
||||||
|
const union AnimCmd * const gDummySpriteAnimTable[] = { &sDummyAnim };
|
||||||
|
|
||||||
|
static const union AffineAnimCmd sDummyAffineAnim = { AFFINE_ANIM_END };
|
||||||
|
|
||||||
|
const union AffineAnimCmd * const gDummySpriteAffineAnimTable[] = { &sDummyAffineAnim };
|
||||||
|
|
||||||
|
const struct SpriteTemplate gDummySpriteTemplate =
|
||||||
|
{
|
||||||
|
.tileTag = 0,
|
||||||
|
.paletteTag = 0xFFFF,
|
||||||
|
.oam = &gDummyOamData,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = SpriteCallbackDummy
|
||||||
|
};
|
||||||
|
|
||||||
|
static const AnimFunc sAnimFuncs[] =
|
||||||
|
{
|
||||||
|
ContinueAnim,
|
||||||
|
BeginAnim,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const AnimFunc sAffineAnimFuncs[] =
|
||||||
|
{
|
||||||
|
ContinueAffineAnim,
|
||||||
|
BeginAffineAnim,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const AnimCmdFunc sAnimCmdFuncs[] =
|
||||||
|
{
|
||||||
|
AnimCmd_loop,
|
||||||
|
AnimCmd_jump,
|
||||||
|
AnimCmd_end,
|
||||||
|
AnimCmd_frame,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const AffineAnimCmdFunc sAffineAnimCmdFuncs[] =
|
||||||
|
{
|
||||||
|
AffineAnimCmd_loop,
|
||||||
|
AffineAnimCmd_jump,
|
||||||
|
AffineAnimCmd_end,
|
||||||
|
AffineAnimCmd_frame,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const s32 gUnknown_082EC6F4[24] =
|
||||||
|
{
|
||||||
|
8, 8, 0x10, 0x10, 0x20, 0x20,
|
||||||
|
0x40, 0x40, 0x10, 8, 0x20, 8,
|
||||||
|
0x20, 0x10, 0x40, 0x20, 8, 0x10,
|
||||||
|
8, 0x20, 0x10, 0x20, 0x20, 0x40,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct OamDimensions sOamDimensions[3][4] =
|
||||||
|
{
|
||||||
|
{ // square
|
||||||
|
{ 8, 8 },
|
||||||
|
{ 16, 16 },
|
||||||
|
{ 32, 32 },
|
||||||
|
{ 64, 64 },
|
||||||
|
},
|
||||||
|
{ // horizontal rectangle
|
||||||
|
{ 16, 8 },
|
||||||
|
{ 32, 8 },
|
||||||
|
{ 32, 16 },
|
||||||
|
{ 64, 32 },
|
||||||
|
},
|
||||||
|
{ // vertical rectangle
|
||||||
|
{ 8, 16 },
|
||||||
|
{ 8, 32 },
|
||||||
|
{ 16, 32 },
|
||||||
|
{ 32, 64 },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
// iwram bss
|
||||||
|
IWRAM_DATA static u16 sSpriteTileRangeTags[MAX_SPRITES];
|
||||||
|
IWRAM_DATA static u16 sSpriteTileRanges[MAX_SPRITES * 2];
|
||||||
|
IWRAM_DATA static struct AffineAnimState sAffineAnimStates[OAM_MATRIX_COUNT];
|
||||||
|
IWRAM_DATA static u16 sSpritePaletteTags[16];
|
||||||
|
|
||||||
|
// iwram common
|
||||||
|
u32 gOamMatrixAllocBitmap;
|
||||||
|
u8 gReservedSpritePaletteCount;
|
||||||
|
|
||||||
EWRAM_DATA struct Sprite gSprites[MAX_SPRITES + 1] = {0};
|
EWRAM_DATA struct Sprite gSprites[MAX_SPRITES + 1] = {0};
|
||||||
EWRAM_DATA u16 gSpritePriorities[MAX_SPRITES] = {0};
|
EWRAM_DATA u16 gSpritePriorities[MAX_SPRITES] = {0};
|
||||||
@ -104,16 +301,6 @@ EWRAM_DATA s16 gSpriteCoordOffsetY = 0;
|
|||||||
EWRAM_DATA struct OamMatrix gOamMatrices[OAM_MATRIX_COUNT] = {0};
|
EWRAM_DATA struct OamMatrix gOamMatrices[OAM_MATRIX_COUNT] = {0};
|
||||||
EWRAM_DATA bool8 gAffineAnimsDisabled = 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[];
|
|
||||||
extern const s32 gUnknown_082EC6F4[];
|
|
||||||
|
|
||||||
void ResetSpriteData(void)
|
void ResetSpriteData(void)
|
||||||
{
|
{
|
||||||
ResetOamRange(0, 128);
|
ResetOamRange(0, 128);
|
||||||
@ -1390,3 +1577,255 @@ void LoadSpriteSheets(const struct SpriteSheet *sheets)
|
|||||||
for (i = 0; sheets[i].data != NULL; i++)
|
for (i = 0; sheets[i].data != NULL; i++)
|
||||||
LoadSpriteSheet(&sheets[i]);
|
LoadSpriteSheet(&sheets[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FreeSpriteTilesByTag(u16 tag)
|
||||||
|
{
|
||||||
|
u8 index = IndexOfSpriteTileTag(tag);
|
||||||
|
if (index != 0xFF)
|
||||||
|
{
|
||||||
|
u16 i;
|
||||||
|
u16 *rangeStarts;
|
||||||
|
u16 *rangeCounts;
|
||||||
|
u16 start;
|
||||||
|
u16 count;
|
||||||
|
rangeStarts = sSpriteTileRanges;
|
||||||
|
start = rangeStarts[index * 2];
|
||||||
|
rangeCounts = sSpriteTileRanges + 1;
|
||||||
|
count = rangeCounts[index * 2];
|
||||||
|
|
||||||
|
for (i = start; i < start + count; i++)
|
||||||
|
FREE_SPRITE_TILE(i);
|
||||||
|
|
||||||
|
sSpriteTileRangeTags[index] = 0xFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeSpriteTileRanges(void)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_SPRITES; i++)
|
||||||
|
{
|
||||||
|
sSpriteTileRangeTags[i] = 0xFFFF;
|
||||||
|
SET_SPRITE_TILE_RANGE(i, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 GetSpriteTileStartByTag(u16 tag)
|
||||||
|
{
|
||||||
|
u8 index = IndexOfSpriteTileTag(tag);
|
||||||
|
if (index == 0xFF)
|
||||||
|
return 0xFFFF;
|
||||||
|
return sSpriteTileRanges[index * 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 IndexOfSpriteTileTag(u16 tag)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_SPRITES; i++)
|
||||||
|
if (sSpriteTileRangeTags[i] == tag)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 GetSpriteTileTagByTileStart(u16 start)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_SPRITES; i++)
|
||||||
|
{
|
||||||
|
if (sSpriteTileRangeTags[i] != 0xFFFF && sSpriteTileRanges[i * 2] == start)
|
||||||
|
return sSpriteTileRangeTags[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0xFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AllocSpriteTileRange(u16 tag, u16 start, u16 count)
|
||||||
|
{
|
||||||
|
u8 freeIndex = IndexOfSpriteTileTag(0xFFFF);
|
||||||
|
sSpriteTileRangeTags[freeIndex] = tag;
|
||||||
|
SET_SPRITE_TILE_RANGE(freeIndex, start, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeAllSpritePalettes(void)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
gReservedSpritePaletteCount = 0;
|
||||||
|
for (i = 0; i < 16; i++)
|
||||||
|
sSpritePaletteTags[i] = 0xFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 LoadSpritePalette(const struct SpritePalette *palette)
|
||||||
|
{
|
||||||
|
u8 index = IndexOfSpritePaletteTag(palette->tag);
|
||||||
|
|
||||||
|
if (index != 0xFF)
|
||||||
|
return index;
|
||||||
|
|
||||||
|
index = IndexOfSpritePaletteTag(0xFFFF);
|
||||||
|
|
||||||
|
if (index == 0xFF)
|
||||||
|
{
|
||||||
|
return 0xFF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sSpritePaletteTags[index] = palette->tag;
|
||||||
|
DoLoadSpritePalette(palette->data, index * 16);
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LoadSpritePalettes(const struct SpritePalette *palettes)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
for (i = 0; palettes[i].data != NULL; i++)
|
||||||
|
if (LoadSpritePalette(&palettes[i]) == 0xFF)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoLoadSpritePalette(const u16 *src, u16 paletteOffset)
|
||||||
|
{
|
||||||
|
LoadPalette(src, paletteOffset + 0x100, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 AllocSpritePalette(u16 tag)
|
||||||
|
{
|
||||||
|
u8 index = IndexOfSpritePaletteTag(0xFFFF);
|
||||||
|
if (index == 0xFF)
|
||||||
|
{
|
||||||
|
return 0xFF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sSpritePaletteTags[index] = tag;
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 IndexOfSpritePaletteTag(u16 tag)
|
||||||
|
{
|
||||||
|
u8 i;
|
||||||
|
for (i = gReservedSpritePaletteCount; i < 16; i++)
|
||||||
|
if (sSpritePaletteTags[i] == tag)
|
||||||
|
return i;
|
||||||
|
|
||||||
|
return 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
u16 GetSpritePaletteTagByPaletteNum(u8 paletteNum)
|
||||||
|
{
|
||||||
|
return sSpritePaletteTags[paletteNum];
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeSpritePaletteByTag(u16 tag)
|
||||||
|
{
|
||||||
|
u8 index = IndexOfSpritePaletteTag(tag);
|
||||||
|
if (index != 0xFF)
|
||||||
|
sSpritePaletteTags[index] = 0xFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetSubspriteTables(struct Sprite *sprite, const struct SubspriteTable *subspriteTables)
|
||||||
|
{
|
||||||
|
sprite->subspriteTables = subspriteTables;
|
||||||
|
sprite->subspriteTableNum = 0;
|
||||||
|
sprite->subspriteMode = SUBSPRITES_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 AddSpriteToOamBuffer(struct Sprite *sprite, u8 *oamIndex)
|
||||||
|
{
|
||||||
|
if (*oamIndex >= gOamLimit)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (!sprite->subspriteTables || sprite->subspriteMode == SUBSPRITES_OFF)
|
||||||
|
{
|
||||||
|
gMain.oamBuffer[*oamIndex] = sprite->oam;
|
||||||
|
(*oamIndex)++;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return AddSubspritesToOamBuffer(sprite, &gMain.oamBuffer[*oamIndex], oamIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 AddSubspritesToOamBuffer(struct Sprite *sprite, struct OamData *destOam, u8 *oamIndex)
|
||||||
|
{
|
||||||
|
const struct SubspriteTable *subspriteTable;
|
||||||
|
struct OamData *oam;
|
||||||
|
|
||||||
|
if (*oamIndex >= gOamLimit)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
subspriteTable = &sprite->subspriteTables[sprite->subspriteTableNum];
|
||||||
|
oam = &sprite->oam;
|
||||||
|
|
||||||
|
if (!subspriteTable || !subspriteTable->subsprites)
|
||||||
|
{
|
||||||
|
*destOam = *oam;
|
||||||
|
(*oamIndex)++;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
u16 tileNum;
|
||||||
|
u16 baseX;
|
||||||
|
u16 baseY;
|
||||||
|
u8 subspriteCount;
|
||||||
|
u8 hFlip;
|
||||||
|
u8 vFlip;
|
||||||
|
u8 i;
|
||||||
|
|
||||||
|
tileNum = oam->tileNum;
|
||||||
|
subspriteCount = subspriteTable->subspriteCount;
|
||||||
|
hFlip = ((s32)oam->matrixNum >> 3) & 1;
|
||||||
|
vFlip = ((s32)oam->matrixNum >> 4) & 1;
|
||||||
|
baseX = oam->x - sprite->centerToCornerVecX;
|
||||||
|
baseY = oam->y - sprite->centerToCornerVecY;
|
||||||
|
|
||||||
|
for (i = 0; i < subspriteCount; i++, (*oamIndex)++)
|
||||||
|
{
|
||||||
|
u16 x;
|
||||||
|
u16 y;
|
||||||
|
|
||||||
|
if (*oamIndex >= gOamLimit)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
x = subspriteTable->subsprites[i].x;
|
||||||
|
y = subspriteTable->subsprites[i].y;
|
||||||
|
|
||||||
|
if (hFlip)
|
||||||
|
{
|
||||||
|
s8 width = sOamDimensions[subspriteTable->subsprites[i].shape][subspriteTable->subsprites[i].size].width;
|
||||||
|
s16 right = x;
|
||||||
|
right += width;
|
||||||
|
x = right;
|
||||||
|
x = ~x + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vFlip)
|
||||||
|
{
|
||||||
|
s8 height = sOamDimensions[subspriteTable->subsprites[i].shape][subspriteTable->subsprites[i].size].height;
|
||||||
|
s16 bottom = y;
|
||||||
|
bottom += height;
|
||||||
|
y = bottom;
|
||||||
|
y = ~y + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
destOam[i] = *oam;
|
||||||
|
destOam[i].shape = subspriteTable->subsprites[i].shape;
|
||||||
|
destOam[i].size = subspriteTable->subsprites[i].size;
|
||||||
|
destOam[i].x = (s16)baseX + (s16)x;
|
||||||
|
destOam[i].y = baseY + y;
|
||||||
|
destOam[i].tileNum = tileNum + subspriteTable->subsprites[i].tileOffset;
|
||||||
|
|
||||||
|
if (sprite->subspriteMode != SUBSPRITES_IGNORE_PRIORITY)
|
||||||
|
destOam[i].priority = subspriteTable->subsprites[i].priority;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
14
sym_bss.txt
14
sym_bss.txt
@ -38,19 +38,7 @@ gUnknown_03000938: @ 3000938
|
|||||||
.space 0x10
|
.space 0x10
|
||||||
|
|
||||||
.include "src/text.o"
|
.include "src/text.o"
|
||||||
|
.include "src/sprite.o"
|
||||||
.align 4
|
|
||||||
gUnknown_030009F0: @ 30009F0
|
|
||||||
.space 0x80
|
|
||||||
|
|
||||||
gUnknown_03000A70: @ 3000A70
|
|
||||||
.space 0x100
|
|
||||||
|
|
||||||
sAffineAnimStates: @ 3000B70
|
|
||||||
.space 0x180
|
|
||||||
|
|
||||||
gUnknown_03000CF0: @ 3000CF0
|
|
||||||
.space 0x20
|
|
||||||
|
|
||||||
gUnknown_03000D10: @ 3000D10
|
gUnknown_03000D10: @ 3000D10
|
||||||
.space 0x10
|
.space 0x10
|
||||||
|
@ -49,13 +49,7 @@ gUnknown_03002F70: @ 3002F70
|
|||||||
.space 0x10
|
.space 0x10
|
||||||
|
|
||||||
.include "text.o"
|
.include "text.o"
|
||||||
|
.include "sprite.o"
|
||||||
.align 2
|
|
||||||
gOamMatrixAllocBitmap: @ 3003018
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_0300301C: @ 300301C
|
|
||||||
.space 0x4
|
|
||||||
|
|
||||||
gUnknown_03003020: @ 3003020
|
gUnknown_03003020: @ 3003020
|
||||||
.space 0xC
|
.space 0xC
|
||||||
|
Loading…
Reference in New Issue
Block a user