mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Merge branch 'master' into sub_81700F8
This commit is contained in:
commit
abe72dca47
2446
asm/battle_anim_80D51AC.s
Executable file
2446
asm/battle_anim_80D51AC.s
Executable file
File diff suppressed because it is too large
Load Diff
1970
asm/rom_815A0D4.s → asm/battle_anim_815A0D4.s
Normal file → Executable file
1970
asm/rom_815A0D4.s → asm/battle_anim_815A0D4.s
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
16014
asm/battle_frontier_1.s
Executable file
16014
asm/battle_frontier_1.s
Executable file
File diff suppressed because it is too large
Load Diff
31336
asm/battle_frontier_2.s
Executable file
31336
asm/battle_frontier_2.s
Executable file
File diff suppressed because it is too large
Load Diff
3061
asm/rom_8072304.s → asm/battle_interface.s
Normal file → Executable file
3061
asm/rom_8072304.s → asm/battle_interface.s
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -760,4 +760,526 @@ sub_813C5A0: @ 813C5A0
|
||||
.pool
|
||||
thumb_func_end sub_813C5A0
|
||||
|
||||
thumb_func_start sub_813C5BC
|
||||
sub_813C5BC: @ 813C5BC
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C5DC
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r2, 2
|
||||
adds r1, r2
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldr r0, =sub_813C5EC
|
||||
str r0, [r1]
|
||||
_0813C5DC:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C5BC
|
||||
|
||||
thumb_func_start sub_813C5EC
|
||||
sub_813C5EC: @ 813C5EC
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks
|
||||
adds r4, r1, r0
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C610
|
||||
movs r0, 0x2
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0813C61A
|
||||
_0813C610:
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r0, =sub_813C62C
|
||||
str r0, [r4]
|
||||
_0813C61A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C5EC
|
||||
|
||||
thumb_func_start sub_813C62C
|
||||
sub_813C62C: @ 813C62C
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
movs r2, 0
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_813C664
|
||||
str r1, [r0]
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C62C
|
||||
|
||||
thumb_func_start sub_813C664
|
||||
sub_813C664: @ 813C664
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C694
|
||||
ldr r0, =c2_exit_to_overworld_1_continue_scripts_restart_music
|
||||
bl SetMainCallback2
|
||||
ldr r0, =gUnknown_0203AB78
|
||||
ldr r0, [r0]
|
||||
bl Free
|
||||
movs r0, 0
|
||||
bl sub_813C6A8
|
||||
bl FreeAllWindowBuffers
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
_0813C694:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C664
|
||||
|
||||
thumb_func_start sub_813C6A8
|
||||
sub_813C6A8: @ 813C6A8
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
adds r0, r4, 0
|
||||
bl ClearWindowTilemap
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
adds r0, r4, 0
|
||||
bl RemoveWindow
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C6A8
|
||||
|
||||
thumb_func_start sub_813C6D4
|
||||
sub_813C6D4: @ 813C6D4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x8
|
||||
movs r3, 0xC0
|
||||
lsls r3, 19
|
||||
movs r4, 0xC0
|
||||
lsls r4, 9
|
||||
add r0, sp, 0x4
|
||||
mov r8, r0
|
||||
mov r2, sp
|
||||
movs r6, 0
|
||||
ldr r1, =0x040000d4
|
||||
movs r5, 0x80
|
||||
lsls r5, 5
|
||||
ldr r7, =0x81000800
|
||||
movs r0, 0x81
|
||||
lsls r0, 24
|
||||
mov r12, r0
|
||||
_0813C6FA:
|
||||
strh r6, [r2]
|
||||
mov r0, sp
|
||||
str r0, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
str r7, [r1, 0x8]
|
||||
ldr r0, [r1, 0x8]
|
||||
adds r3, r5
|
||||
subs r4, r5
|
||||
cmp r4, r5
|
||||
bhi _0813C6FA
|
||||
strh r6, [r2]
|
||||
mov r2, sp
|
||||
str r2, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
lsrs r0, r4, 1
|
||||
mov r2, r12
|
||||
orrs r0, r2
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, [r1, 0x8]
|
||||
movs r0, 0xE0
|
||||
lsls r0, 19
|
||||
movs r3, 0x80
|
||||
lsls r3, 3
|
||||
movs r4, 0
|
||||
str r4, [sp, 0x4]
|
||||
ldr r2, =0x040000d4
|
||||
mov r1, r8
|
||||
str r1, [r2]
|
||||
str r0, [r2, 0x4]
|
||||
lsrs r0, r3, 2
|
||||
movs r1, 0x85
|
||||
lsls r1, 24
|
||||
orrs r0, r1
|
||||
str r0, [r2, 0x8]
|
||||
ldr r0, [r2, 0x8]
|
||||
movs r1, 0xA0
|
||||
lsls r1, 19
|
||||
mov r0, sp
|
||||
strh r4, [r0]
|
||||
str r0, [r2]
|
||||
str r1, [r2, 0x4]
|
||||
lsrs r3, 1
|
||||
movs r0, 0x81
|
||||
lsls r0, 24
|
||||
orrs r3, r0
|
||||
str r3, [r2, 0x8]
|
||||
ldr r0, [r2, 0x8]
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x8
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x10
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x12
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xA
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x14
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x16
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xC
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x18
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1A
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xE
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1C
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1E
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x40
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x44
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x48
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x4A
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x50
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x52
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x54
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
add sp, 0x8
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C6D4
|
||||
|
||||
thumb_func_start sub_813C80C
|
||||
sub_813C80C: @ 813C80C
|
||||
push {lr}
|
||||
bl remove_some_task
|
||||
bl ResetTasks
|
||||
bl ResetSpriteData
|
||||
bl ResetPaletteFade
|
||||
bl FreeAllSpritePalettes
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C80C
|
||||
|
||||
thumb_func_start sub_813C828
|
||||
sub_813C828: @ 813C828
|
||||
push {lr}
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C828
|
||||
|
||||
thumb_func_start sub_813C880
|
||||
sub_813C880: @ 813C880
|
||||
push {lr}
|
||||
movs r1, 0x94
|
||||
lsls r1, 4
|
||||
movs r0, 0
|
||||
bl SetGpuReg
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C880
|
||||
|
||||
thumb_func_start sub_813C890
|
||||
sub_813C890: @ 813C890
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r1, =gUnknown_085B3484
|
||||
adds r0, r4, 0
|
||||
movs r2, 0xC0
|
||||
movs r3, 0
|
||||
bl LoadBgTiles
|
||||
ldr r1, =gUnknown_085B3564
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBufferRect
|
||||
ldr r0, =gUnknown_085B3544
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C890
|
||||
|
||||
thumb_func_start sub_813C8D8
|
||||
sub_813C8D8: @ 813C8D8
|
||||
push {lr}
|
||||
bl LoadOam
|
||||
bl ProcessSpriteCopyRequests
|
||||
bl TransferPlttBuffer
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C8D8
|
||||
|
||||
thumb_func_start sub_813C8EC
|
||||
sub_813C8EC: @ 813C8EC
|
||||
push {lr}
|
||||
bl RunTasks
|
||||
bl AnimateSprites
|
||||
bl BuildOamBuffer
|
||||
bl UpdatePaletteFade
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C8EC
|
||||
|
||||
thumb_func_start sub_813C904
|
||||
sub_813C904: @ 813C904
|
||||
push {lr}
|
||||
movs r0, 0
|
||||
bl SetVBlankCallback
|
||||
ldr r0, =sub_813C91C
|
||||
bl SetMainCallback2
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C904
|
||||
|
||||
thumb_func_start sub_813C91C
|
||||
sub_813C91C: @ 813C91C
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
ldr r0, =gMain
|
||||
movs r1, 0x87
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x7
|
||||
bls _0813C930
|
||||
b _0813CA3C
|
||||
_0813C930:
|
||||
lsls r0, 2
|
||||
ldr r1, =_0813C944
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_0813C944:
|
||||
.4byte _0813C964
|
||||
.4byte _0813C970
|
||||
.4byte _0813C976
|
||||
.4byte _0813C9A8
|
||||
.4byte _0813C9BE
|
||||
.4byte _0813C9DE
|
||||
.4byte _0813C9F0
|
||||
.4byte _0813CA14
|
||||
_0813C964:
|
||||
movs r0, 0
|
||||
bl SetVBlankCallback
|
||||
bl sub_813C6D4
|
||||
b _0813CA00
|
||||
_0813C970:
|
||||
bl sub_813C80C
|
||||
b _0813CA00
|
||||
_0813C976:
|
||||
ldr r4, =gUnknown_0203AB78
|
||||
movs r0, 0x80
|
||||
lsls r0, 4
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
movs r0, 0
|
||||
bl ResetBgsAndClearDma3BusyFlags
|
||||
ldr r1, =gUnknown_085B3D64
|
||||
movs r0, 0
|
||||
movs r2, 0x2
|
||||
bl InitBgsFromTemplates
|
||||
ldr r1, [r4]
|
||||
movs r0, 0x3
|
||||
bl SetBgTilemapBuffer
|
||||
bl sub_813C828
|
||||
b _0813CA00
|
||||
.pool
|
||||
_0813C9A8:
|
||||
movs r0, 0x3
|
||||
bl sub_813C890
|
||||
movs r0, 0
|
||||
bl stdpal_get
|
||||
movs r1, 0xF0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
b _0813CA00
|
||||
_0813C9BE:
|
||||
bl IsDma3ManagerBusyWithBgCopy
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _0813CA3C
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
movs r0, 0x3
|
||||
bl ShowBg
|
||||
movs r0, 0x3
|
||||
bl CopyBgTilemapBufferToVram
|
||||
b _0813CA00
|
||||
_0813C9DE:
|
||||
ldr r0, =gUnknown_085B3D6C
|
||||
bl InitWindows
|
||||
bl DeactivateAllTextPrinters
|
||||
b _0813CA00
|
||||
.pool
|
||||
_0813C9F0:
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
movs r2, 0x10
|
||||
movs r3, 0
|
||||
bl BeginNormalPaletteFade
|
||||
_0813CA00:
|
||||
ldr r1, =gMain
|
||||
movs r0, 0x87
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
b _0813CA3C
|
||||
.pool
|
||||
_0813CA14:
|
||||
bl sub_813C880
|
||||
ldr r0, =sub_813C8D8
|
||||
bl SetVBlankCallback
|
||||
bl sub_81D5C8C
|
||||
ldr r0, =sub_813C5BC
|
||||
movs r1, 0x8
|
||||
bl CreateTask
|
||||
ldr r0, =sub_813C8EC
|
||||
bl SetMainCallback2
|
||||
ldr r0, =gMain
|
||||
movs r1, 0x87
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
_0813CA3C:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C91C
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
||||
|
@ -2590,7 +2590,7 @@ ReturnEmptyStringIfNull: @ 80B1C6C
|
||||
push {lr}
|
||||
cmp r0, 0
|
||||
bne _080B1C74
|
||||
ldr r0, =gUnknown_085E8D03
|
||||
ldr r0, =gText_EmptyString2
|
||||
_080B1C74:
|
||||
pop {r1}
|
||||
bx r1
|
||||
|
1028
asm/battle_tent.s
Executable file
1028
asm/battle_tent.s
Executable file
File diff suppressed because it is too large
Load Diff
3765
asm/rom_8161F74.s → asm/battle_tower.s
Normal file → Executable file
3765
asm/rom_8161F74.s → asm/battle_tower.s
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -7333,7 +7333,7 @@ _08083564:
|
||||
bl StringAppend
|
||||
ldr r0, [r7]
|
||||
adds r0, 0x9F
|
||||
ldr r1, =gUnknown_085E8D5E
|
||||
ldr r1, =gText_Space
|
||||
bl StringAppend
|
||||
ldr r0, [r7]
|
||||
adds r0, 0x9F
|
||||
@ -8165,7 +8165,7 @@ _08083C84:
|
||||
bl StringAppend
|
||||
ldr r0, [r7]
|
||||
adds r0, 0x9F
|
||||
ldr r1, =gUnknown_085E8D5E
|
||||
ldr r1, =gText_Space
|
||||
bl StringAppend
|
||||
ldr r0, [r7]
|
||||
adds r0, 0x9F
|
||||
|
592
asm/berry_fix_program.s
Executable file
592
asm/berry_fix_program.s
Executable file
@ -0,0 +1,592 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81BF384
|
||||
sub_81BF384: @ 81BF384
|
||||
push {r4,lr}
|
||||
ldr r0, =0x0000ffff
|
||||
bl DisableInterrupts
|
||||
movs r0, 0x1
|
||||
bl EnableInterrupts
|
||||
bl m4aSoundVSyncOff
|
||||
movs r0, 0
|
||||
bl SetVBlankCallback
|
||||
bl ResetSpriteData
|
||||
bl ResetTasks
|
||||
bl remove_some_task
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
ldr r4, =gUnknown_030012B8
|
||||
movs r0, 0x50
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
ldr r1, [r4]
|
||||
movs r0, 0x6
|
||||
strb r0, [r1, 0x1]
|
||||
ldr r0, =sub_81BF3DC
|
||||
bl SetMainCallback2
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF384
|
||||
|
||||
thumb_func_start sub_81BF3DC
|
||||
sub_81BF3DC: @ 81BF3DC
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
ldr r1, =gUnknown_030012B8
|
||||
ldr r0, [r1]
|
||||
ldrb r0, [r0]
|
||||
adds r5, r1, 0
|
||||
cmp r0, 0x7
|
||||
bls _081BF3EE
|
||||
b _081BF592
|
||||
_081BF3EE:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BF400
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BF400:
|
||||
.4byte _081BF420
|
||||
.4byte _081BF430
|
||||
.4byte _081BF45C
|
||||
.4byte _081BF488
|
||||
.4byte _081BF4BC
|
||||
.4byte _081BF514
|
||||
.4byte _081BF552
|
||||
.4byte _081BF574
|
||||
_081BF420:
|
||||
bl sub_81BF5A4
|
||||
ldr r0, =gUnknown_030012B8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x1
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF430:
|
||||
movs r0, 0x5
|
||||
bl sub_81BF7A4
|
||||
cmp r0, 0x5
|
||||
beq _081BF43C
|
||||
b _081BF592
|
||||
_081BF43C:
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081BF44A
|
||||
b _081BF592
|
||||
_081BF44A:
|
||||
ldr r0, =gUnknown_030012B8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x2
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF45C:
|
||||
movs r0, 0
|
||||
bl sub_81BF7A4
|
||||
cmp r0, 0
|
||||
beq _081BF468
|
||||
b _081BF592
|
||||
_081BF468:
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081BF476
|
||||
b _081BF592
|
||||
_081BF476:
|
||||
ldr r0, =gUnknown_030012B8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x3
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF488:
|
||||
movs r0, 0x1
|
||||
bl sub_81BF7A4
|
||||
cmp r0, 0x1
|
||||
beq _081BF494
|
||||
b _081BF592
|
||||
_081BF494:
|
||||
ldr r4, =gUnknown_030012B8
|
||||
ldr r0, [r4]
|
||||
ldr r1, =gUnknown_089A6550
|
||||
str r1, [r0, 0x2C]
|
||||
adds r0, 0x4F
|
||||
movs r5, 0
|
||||
strb r5, [r0]
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
bl MultiBootInit
|
||||
ldr r1, [r4]
|
||||
strh r5, [r1, 0x2]
|
||||
movs r0, 0x4
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF4BC:
|
||||
adds r4, r5, 0
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
bl MultiBootMain
|
||||
ldr r4, [r4]
|
||||
ldrb r0, [r4, 0x1C]
|
||||
cmp r0, 0
|
||||
bne _081BF4D8
|
||||
ldr r0, [r4, 0x20]
|
||||
ldr r1, =0x00020200
|
||||
ands r0, r1
|
||||
cmp r0, r1
|
||||
beq _081BF4E4
|
||||
_081BF4D8:
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x2]
|
||||
b _081BF592
|
||||
.pool
|
||||
_081BF4E4:
|
||||
ldrh r0, [r4, 0x2]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x2]
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0xB4
|
||||
bls _081BF592
|
||||
adds r0, r4, 0x4
|
||||
ldr r1, =gMultiBootProgram_BerryGlitchFix_Start
|
||||
ldr r2, =gMultiBootProgram_BerryGlitchFix_End
|
||||
subs r2, r1
|
||||
movs r3, 0x1
|
||||
str r3, [sp]
|
||||
movs r3, 0x4
|
||||
bl MultiBootStartMaster
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x5
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF514:
|
||||
movs r0, 0x2
|
||||
bl sub_81BF7A4
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0x2
|
||||
bne _081BF592
|
||||
ldr r5, =gUnknown_030012B8
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x4
|
||||
bl MultiBootMain
|
||||
ldr r0, [r5]
|
||||
adds r0, 0x4
|
||||
bl MultiBootCheckComplete
|
||||
cmp r0, 0
|
||||
beq _081BF540
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x6
|
||||
b _081BF590
|
||||
.pool
|
||||
_081BF540:
|
||||
ldr r1, [r5]
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x22
|
||||
ldrb r0, [r0]
|
||||
ands r4, r0
|
||||
cmp r4, 0
|
||||
bne _081BF592
|
||||
movs r0, 0x7
|
||||
b _081BF590
|
||||
_081BF552:
|
||||
movs r0, 0x3
|
||||
bl sub_81BF7A4
|
||||
cmp r0, 0x3
|
||||
bne _081BF592
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BF592
|
||||
bl DoSoftReset
|
||||
b _081BF592
|
||||
.pool
|
||||
_081BF574:
|
||||
movs r0, 0x4
|
||||
bl sub_81BF7A4
|
||||
cmp r0, 0x4
|
||||
bne _081BF592
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BF592
|
||||
ldr r0, =gUnknown_030012B8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x1
|
||||
_081BF590:
|
||||
strb r0, [r1]
|
||||
_081BF592:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF3DC
|
||||
|
||||
thumb_func_start sub_81BF5A4
|
||||
sub_81BF5A4: @ 81BF5A4
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
sub sp, 0x10
|
||||
movs r0, 0x8
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xA
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x10
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x12
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x14
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x16
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x50
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r1, 0
|
||||
str r1, [sp, 0xC]
|
||||
ldr r4, =0x040000d4
|
||||
add r0, sp, 0xC
|
||||
str r0, [r4]
|
||||
movs r0, 0xC0
|
||||
lsls r0, 19
|
||||
str r0, [r4, 0x4]
|
||||
ldr r0, =0x85006000
|
||||
str r0, [r4, 0x8]
|
||||
ldr r0, [r4, 0x8]
|
||||
str r1, [sp, 0xC]
|
||||
add r0, sp, 0xC
|
||||
str r0, [r4]
|
||||
movs r0, 0xE0
|
||||
lsls r0, 19
|
||||
str r0, [r4, 0x4]
|
||||
ldr r2, =0x85000100
|
||||
str r2, [r4, 0x8]
|
||||
ldr r0, [r4, 0x8]
|
||||
str r1, [sp, 0xC]
|
||||
add r0, sp, 0xC
|
||||
str r0, [r4]
|
||||
movs r0, 0xA0
|
||||
lsls r0, 19
|
||||
str r0, [r4, 0x4]
|
||||
str r2, [r4, 0x8]
|
||||
ldr r0, [r4, 0x8]
|
||||
movs r0, 0
|
||||
bl ResetBgsAndClearDma3BusyFlags
|
||||
ldr r1, =gUnknown_08618108
|
||||
movs r0, 0
|
||||
movs r2, 0x2
|
||||
bl InitBgsFromTemplates
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
ldr r0, =gUnknown_08618110
|
||||
bl InitWindows
|
||||
bl DeactivateAllTextPrinters
|
||||
ldr r0, =gUnknown_08618138
|
||||
str r0, [r4]
|
||||
ldr r0, =0x050001e0
|
||||
str r0, [r4, 0x4]
|
||||
ldr r0, =0x84000008
|
||||
str r0, [r4, 0x8]
|
||||
ldr r0, [r4, 0x8]
|
||||
movs r0, 0
|
||||
movs r1, 0x40
|
||||
bl SetGpuReg
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
movs r0, 0
|
||||
movs r1, 0xAA
|
||||
bl FillWindowPixelBuffer
|
||||
ldr r5, =gUnknown_08617E9B
|
||||
movs r0, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
adds r1, r0, 0
|
||||
movs r4, 0x78
|
||||
subs r0, r4, r1
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
lsls r2, r0, 24
|
||||
lsrs r2, 24
|
||||
ldr r6, =gUnknown_0861815B
|
||||
str r6, [sp]
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
mov r8, r0
|
||||
str r0, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r3, 0x3
|
||||
bl box_print
|
||||
ldr r5, =gUnknown_08617E8D
|
||||
movs r0, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
adds r1, r0, 0
|
||||
subs r4, r1
|
||||
lsrs r0, r4, 31
|
||||
adds r4, r0
|
||||
asrs r4, 1
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x78
|
||||
lsls r2, r0, 24
|
||||
lsrs r2, 24
|
||||
str r6, [sp]
|
||||
mov r0, r8
|
||||
str r0, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r3, 0x3
|
||||
bl box_print
|
||||
movs r0, 0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
adds r1, r0, 0
|
||||
movs r0, 0x70
|
||||
subs r0, r1
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
lsls r2, r0, 24
|
||||
lsrs r2, 24
|
||||
str r6, [sp]
|
||||
mov r0, r8
|
||||
str r0, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r3, 0
|
||||
bl box_print
|
||||
ldr r4, =gUnknown_08617E78
|
||||
movs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
adds r1, r0, 0
|
||||
movs r0, 0xD0
|
||||
subs r0, r1
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
lsls r2, r0, 24
|
||||
lsrs r2, 24
|
||||
ldr r0, =gUnknown_08618158
|
||||
str r0, [sp]
|
||||
mov r0, r8
|
||||
str r0, [sp, 0x4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
movs r3, 0x2
|
||||
bl box_print
|
||||
movs r0, 0x2
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
movs r0, 0x3
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
movs r0, 0
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
add sp, 0x10
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF5A4
|
||||
|
||||
thumb_func_start sub_81BF7A4
|
||||
sub_81BF7A4: @ 81BF7A4
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r5, =gUnknown_030012B8
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x1]
|
||||
cmp r0, r4
|
||||
bne _081BF7BC
|
||||
adds r0, r4, 0
|
||||
b _081BF7DC
|
||||
.pool
|
||||
_081BF7BC:
|
||||
cmp r0, 0x6
|
||||
bne _081BF7CC
|
||||
adds r0, r4, 0
|
||||
bl sub_81BF7E8
|
||||
ldr r0, [r5]
|
||||
strb r4, [r0, 0x1]
|
||||
b _081BF7D6
|
||||
_081BF7CC:
|
||||
bl sub_81BF8D8
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x6
|
||||
strb r0, [r1, 0x1]
|
||||
_081BF7D6:
|
||||
ldr r0, =gUnknown_030012B8
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x1]
|
||||
_081BF7DC:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81BF7A4
|
||||
|
||||
thumb_func_start sub_81BF7E8
|
||||
sub_81BF7E8: @ 81BF7E8
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0xC
|
||||
adds r6, r0, 0
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl FillBgTilemapBufferRect_Palette0
|
||||
movs r0, 0x1
|
||||
movs r1, 0xAA
|
||||
bl FillWindowPixelBuffer
|
||||
ldr r0, =gUnknown_08618158
|
||||
str r0, [sp]
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
str r0, [sp, 0x4]
|
||||
ldr r0, =gUnknown_08618160
|
||||
lsls r4, r6, 2
|
||||
adds r0, r4, r0
|
||||
ldr r0, [r0]
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl box_print
|
||||
movs r0, 0x1
|
||||
bl PutWindowTilemap
|
||||
movs r0, 0x1
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
cmp r6, 0x5
|
||||
bhi _081BF87E
|
||||
ldr r0, =_081BF850
|
||||
adds r0, r4, r0
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BF850:
|
||||
.4byte _081BF868
|
||||
.4byte _081BF870
|
||||
.4byte _081BF868
|
||||
.4byte _081BF868
|
||||
.4byte _081BF868
|
||||
.4byte _081BF878
|
||||
_081BF868:
|
||||
movs r0, 0x2
|
||||
bl PutWindowTilemap
|
||||
b _081BF87E
|
||||
_081BF870:
|
||||
movs r0, 0x3
|
||||
bl PutWindowTilemap
|
||||
b _081BF87E
|
||||
_081BF878:
|
||||
movs r0, 0
|
||||
bl PutWindowTilemap
|
||||
_081BF87E:
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
ldr r5, =gUnknown_08618178
|
||||
lsls r4, r6, 1
|
||||
adds r4, r6
|
||||
lsls r4, 2
|
||||
adds r0, r4, r5
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x06004000
|
||||
bl LZ77UnCompVram
|
||||
adds r0, r5, 0x4
|
||||
adds r0, r4, r0
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x0600f800
|
||||
bl LZ77UnCompVram
|
||||
adds r5, 0x8
|
||||
adds r4, r5
|
||||
ldr r0, [r4]
|
||||
movs r1, 0xA0
|
||||
lsls r1, 19
|
||||
ldr r2, =0x04000040
|
||||
bl CpuSet
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
movs r0, 0x1
|
||||
bl ShowBg
|
||||
add sp, 0xC
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF7E8
|
||||
|
||||
thumb_func_start sub_81BF8D8
|
||||
sub_81BF8D8: @ 81BF8D8
|
||||
push {lr}
|
||||
movs r0, 0
|
||||
bl HideBg
|
||||
movs r0, 0x1
|
||||
bl HideBg
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81BF8D8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -666,7 +666,7 @@ _081781C8:
|
||||
b _08178242
|
||||
.pool
|
||||
_08178230:
|
||||
ldr r2, =gUnknown_085E8D34
|
||||
ldr r2, =gText_ThreeMarks
|
||||
str r7, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
@ -724,7 +724,7 @@ itemid_copy_name: @ 8178250
|
||||
b _081782C2
|
||||
.pool
|
||||
_081782B0:
|
||||
ldr r2, =gUnknown_085E8D34
|
||||
ldr r2, =gText_ThreeMarks
|
||||
str r5, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
|
@ -6447,7 +6447,7 @@ sub_80DAF1C: @ 80DAF1C
|
||||
adds r5, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r1, =gUnknown_085E8D3E
|
||||
ldr r1, =gText_Slash
|
||||
add r0, sp, 0x4
|
||||
bl StringCopy
|
||||
lsls r1, r5, 6
|
||||
@ -7100,7 +7100,7 @@ _080DB472:
|
||||
ldr r1, [r0]
|
||||
movs r0, 0xA
|
||||
bl sub_80DEB70
|
||||
ldr r1, =gUnknown_085E8D3E
|
||||
ldr r1, =gText_Slash
|
||||
movs r0, 0x9
|
||||
bl sub_80DEB70
|
||||
add sp, 0x10
|
||||
@ -10296,7 +10296,7 @@ _080DCD92:
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
adds r0, r2, 0
|
||||
ldr r1, =gUnknown_085E8D40
|
||||
ldr r1, =gText_OneDash
|
||||
bl StringCopy
|
||||
adds r2, r0, 0
|
||||
_080DCDBC:
|
||||
@ -10339,7 +10339,7 @@ _080DCDEA:
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
adds r0, r2, 0
|
||||
ldr r1, =gUnknown_085E8D40
|
||||
ldr r1, =gText_OneDash
|
||||
bl StringCopy
|
||||
adds r2, r0, 0
|
||||
_080DCE14:
|
||||
|
@ -296,7 +296,7 @@ _080F5A96:
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
bl sub_80F7ED0
|
||||
ldr r1, =gUnknown_085E8D3E
|
||||
ldr r1, =gText_Slash
|
||||
adds r0, r6, 0
|
||||
bl StringCopy
|
||||
adds r1, r7, 0
|
||||
|
890
asm/contest_link_81D9DE4.s
Executable file
890
asm/contest_link_81D9DE4.s
Executable file
@ -0,0 +1,890 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81D9DE4
|
||||
sub_81D9DE4: @ 81D9DE4
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r6, 2
|
||||
adds r0, r6
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
movs r1, 0x1A
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0x4
|
||||
bhi _081D9EA4
|
||||
lsls r0, 2
|
||||
ldr r1, =_081D9E10
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081D9E10:
|
||||
.4byte _081D9E24
|
||||
.4byte _081D9E44
|
||||
.4byte _081D9E64
|
||||
.4byte _081D9E84
|
||||
.4byte _081D9EA4
|
||||
_081D9E24:
|
||||
ldr r4, =gUnknown_02039F31
|
||||
ldr r0, =gUnknown_02039F24
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x32
|
||||
b _081D9EB4
|
||||
.pool
|
||||
_081D9E44:
|
||||
ldr r4, =gUnknown_02039F31
|
||||
ldr r0, =gUnknown_02039F24
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x33
|
||||
b _081D9EB4
|
||||
.pool
|
||||
_081D9E64:
|
||||
ldr r4, =gUnknown_02039F31
|
||||
ldr r0, =gUnknown_02039F24
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x34
|
||||
b _081D9EB4
|
||||
.pool
|
||||
_081D9E84:
|
||||
ldr r4, =gUnknown_02039F31
|
||||
ldr r0, =gUnknown_02039F24
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x35
|
||||
b _081D9EB4
|
||||
.pool
|
||||
_081D9EA4:
|
||||
ldr r4, =gUnknown_02039F31
|
||||
ldr r0, =gUnknown_02039F24
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x36
|
||||
_081D9EB4:
|
||||
bl GetMonData
|
||||
strb r0, [r4]
|
||||
ldr r5, =gUnknown_02039E00
|
||||
ldr r4, =gUnknown_02039F25
|
||||
ldrb r0, [r4]
|
||||
lsls r0, 6
|
||||
adds r0, r5
|
||||
ldr r1, =gUnknown_02039F31
|
||||
ldrb r1, [r1]
|
||||
adds r0, 0x2C
|
||||
strb r1, [r0]
|
||||
ldr r0, =0x00000864
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
negs r0, r0
|
||||
lsrs r0, 31
|
||||
ldrb r1, [r4]
|
||||
lsls r1, 6
|
||||
adds r1, r5
|
||||
adds r1, 0x2D
|
||||
strb r0, [r1]
|
||||
ldr r1, =sub_81DA160
|
||||
ldr r2, =sub_81D9F14
|
||||
adds r0, r6, 0
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9DE4
|
||||
|
||||
thumb_func_start sub_81D9F14
|
||||
sub_81D9F14: @ 81D9F14
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =sub_81DA244
|
||||
ldr r2, =sub_81D9F30
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9F14
|
||||
|
||||
thumb_func_start sub_81D9F30
|
||||
sub_81D9F30: @ 81D9F30
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =sub_81DA2E8
|
||||
ldr r2, =sub_81D9F4C
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9F30
|
||||
|
||||
thumb_func_start sub_81D9F4C
|
||||
sub_81D9F4C: @ 81D9F4C
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =sub_81DA3B8
|
||||
ldr r2, =sub_81D9F68
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9F4C
|
||||
|
||||
thumb_func_start sub_81D9F68
|
||||
sub_81D9F68: @ 81D9F68
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x8
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
movs r3, 0
|
||||
ldr r5, =gUnknown_02039F30
|
||||
mov r8, r5
|
||||
ldr r0, =gSpecialVar_0x8004
|
||||
mov r12, r0
|
||||
add r1, sp, 0x4
|
||||
mov r9, r1
|
||||
ldrb r4, [r5]
|
||||
cmp r3, r4
|
||||
bcs _081D9FB2
|
||||
lsls r0, r6, 2
|
||||
adds r0, r6
|
||||
lsls r4, r0, 3
|
||||
ldr r7, =gTasks + 0x8
|
||||
_081D9F98:
|
||||
mov r0, sp
|
||||
adds r2, r0, r3
|
||||
adds r1, r3, 0x1
|
||||
lsls r0, r1, 1
|
||||
adds r0, r4
|
||||
adds r0, r7
|
||||
ldrh r0, [r0]
|
||||
strb r0, [r2]
|
||||
lsls r1, 24
|
||||
lsrs r3, r1, 24
|
||||
ldrb r1, [r5]
|
||||
cmp r3, r1
|
||||
bcc _081D9F98
|
||||
_081D9FB2:
|
||||
movs r3, 0
|
||||
mov r4, r8
|
||||
ldrb r0, [r4]
|
||||
cmp r3, r0
|
||||
bcs _081D9FD6
|
||||
adds r4, r0, 0
|
||||
mov r2, sp
|
||||
_081D9FC0:
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, r4
|
||||
bcs _081D9FD6
|
||||
mov r7, sp
|
||||
adds r1, r7, r3
|
||||
ldrb r0, [r2]
|
||||
ldrb r1, [r1]
|
||||
cmp r0, r1
|
||||
beq _081D9FC0
|
||||
_081D9FD6:
|
||||
mov r0, r8
|
||||
ldrb r0, [r0]
|
||||
cmp r3, r0
|
||||
bne _081D9FF4
|
||||
movs r0, 0
|
||||
mov r1, r12
|
||||
strh r0, [r1]
|
||||
b _081D9FFA
|
||||
.pool
|
||||
_081D9FF4:
|
||||
movs r0, 0x1
|
||||
mov r4, r12
|
||||
strh r0, [r4]
|
||||
_081D9FFA:
|
||||
movs r3, 0
|
||||
mov r7, r8
|
||||
mov r0, r8
|
||||
ldrb r0, [r0]
|
||||
cmp r3, r0
|
||||
bcs _081DA02A
|
||||
mov r4, r9
|
||||
lsls r0, r6, 2
|
||||
adds r0, r6
|
||||
lsls r2, r0, 3
|
||||
ldr r5, =gTasks + 0x8
|
||||
_081DA010:
|
||||
adds r1, r4, r3
|
||||
adds r0, r3, 0x5
|
||||
lsls r0, 1
|
||||
adds r0, r2
|
||||
adds r0, r5
|
||||
ldrh r0, [r0]
|
||||
strb r0, [r1]
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
ldrb r1, [r7]
|
||||
cmp r3, r1
|
||||
bcc _081DA010
|
||||
_081DA02A:
|
||||
mov r4, r8
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0x4
|
||||
beq _081DA0B8
|
||||
bl GetMultiplayerId
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DA0B8
|
||||
ldr r0, =gUnknown_02039E00
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x2C
|
||||
ldrb r2, [r1]
|
||||
movs r3, 0x1
|
||||
ldrb r1, [r4]
|
||||
adds r5, r0, 0
|
||||
cmp r3, r1
|
||||
bcs _081DA06C
|
||||
adds r4, r5, 0
|
||||
mov r7, r8
|
||||
ldrb r1, [r7]
|
||||
_081DA054:
|
||||
lsls r0, r3, 6
|
||||
adds r0, r4
|
||||
adds r0, 0x2C
|
||||
ldrb r7, [r0]
|
||||
cmp r2, r7
|
||||
bcs _081DA062
|
||||
ldrb r2, [r0]
|
||||
_081DA062:
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, r1
|
||||
bcc _081DA054
|
||||
_081DA06C:
|
||||
cmp r2, 0
|
||||
beq _081DA076
|
||||
subs r0, r2, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
_081DA076:
|
||||
movs r4, 0x1
|
||||
movs r3, 0
|
||||
mov r0, r8
|
||||
ldrb r0, [r0]
|
||||
cmp r3, r0
|
||||
bcs _081DA0AC
|
||||
adds r0, r5, 0
|
||||
b _081DA0A2
|
||||
.pool
|
||||
_081DA090:
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
mov r1, r8
|
||||
ldrb r1, [r1]
|
||||
cmp r3, r1
|
||||
bcs _081DA0AC
|
||||
lsls r0, r3, 6
|
||||
adds r0, r5
|
||||
_081DA0A2:
|
||||
adds r0, 0x2D
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA090
|
||||
movs r4, 0
|
||||
_081DA0AC:
|
||||
mov r0, sp
|
||||
ldrb r0, [r0]
|
||||
adds r1, r2, 0
|
||||
adds r2, r4, 0
|
||||
bl sub_80DACBC
|
||||
_081DA0B8:
|
||||
mov r0, r9
|
||||
bl sub_80F86E0
|
||||
ldr r1, =gUnknown_02039F2B
|
||||
strb r0, [r1]
|
||||
ldr r0, =gUnknown_02039F30
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x3
|
||||
bhi _081DA0E8
|
||||
ldr r1, =sub_81DA488
|
||||
ldr r2, =sub_81DA10C
|
||||
adds r0, r6, 0
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
b _081DA0F6
|
||||
.pool
|
||||
_081DA0E8:
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r6, 2
|
||||
adds r1, r6
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldr r0, =sub_81DA10C
|
||||
str r0, [r1]
|
||||
_081DA0F6:
|
||||
add sp, 0x8
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9F68
|
||||
|
||||
thumb_func_start sub_81DA10C
|
||||
sub_81DA10C: @ 81DA10C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gUnknown_02039F2C
|
||||
ldrb r0, [r0]
|
||||
bl sub_80DB09C
|
||||
ldr r1, =sub_80FCF40
|
||||
ldr r2, =sub_81DA138
|
||||
adds r0, r4, 0
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA10C
|
||||
|
||||
thumb_func_start sub_81DA138
|
||||
sub_81DA138: @ 81DA138
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0
|
||||
bl sub_80DCE58
|
||||
ldr r1, =sub_80FCFD0
|
||||
ldr r2, =sub_80F8714
|
||||
adds r0, r4, 0
|
||||
bl SetTaskFuncWithFollowupFunc
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA138
|
||||
|
||||
thumb_func_start sub_81DA160
|
||||
sub_81DA160: @ 81DA160
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
lsls r6, r7, 2
|
||||
adds r0, r6, r7
|
||||
lsls r4, r0, 3
|
||||
ldr r5, =gTasks + 0x8
|
||||
adds r0, r4, r5
|
||||
adds r0, 0x18
|
||||
bl sub_80FC670
|
||||
cmp r0, 0
|
||||
beq _081DA224
|
||||
adds r0, r5, 0
|
||||
subs r0, 0x8
|
||||
adds r4, r0
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _081DA1A4
|
||||
cmp r0, 0x1
|
||||
beq _081DA1D4
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x8]
|
||||
strh r0, [r4, 0x20]
|
||||
adds r0, r7, 0
|
||||
bl SwitchTaskToFollowupFunc
|
||||
b _081DA224
|
||||
.pool
|
||||
_081DA1A4:
|
||||
bl sub_800A520
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA224
|
||||
ldr r0, =gUnknown_02039F25
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 6
|
||||
ldr r1, =gUnknown_02039E00
|
||||
adds r0, r1
|
||||
movs r1, 0x40
|
||||
bl sub_80FC4F4
|
||||
cmp r0, 0x1
|
||||
bne _081DA224
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
b _081DA224
|
||||
.pool
|
||||
_081DA1D4:
|
||||
bl sub_80FC55C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA224
|
||||
movs r5, 0
|
||||
ldr r0, =gUnknown_02039F30
|
||||
mov r8, r6
|
||||
ldrb r0, [r0]
|
||||
cmp r5, r0
|
||||
bge _081DA214
|
||||
ldr r6, =gLinkPlayers
|
||||
_081DA1EC:
|
||||
lsls r4, r5, 6
|
||||
ldr r0, =gUnknown_02039E00
|
||||
adds r4, r0
|
||||
lsls r1, r5, 8
|
||||
ldr r0, =gUnknown_020223C4
|
||||
adds r1, r0
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x40
|
||||
bl memcpy
|
||||
ldrh r1, [r6, 0x1A]
|
||||
adds r0, r4, 0
|
||||
bl sub_80DFA08
|
||||
adds r6, 0x1C
|
||||
adds r5, 0x1
|
||||
ldr r0, =gUnknown_02039F30
|
||||
ldrb r0, [r0]
|
||||
cmp r5, r0
|
||||
blt _081DA1EC
|
||||
_081DA214:
|
||||
ldr r0, =gTasks
|
||||
mov r2, r8
|
||||
adds r1, r2, r7
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081DA224:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA160
|
||||
|
||||
thumb_func_start sub_81DA244
|
||||
sub_81DA244: @ 81DA244
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r5, r0, 3
|
||||
ldr r6, =gTasks + 0x8
|
||||
adds r0, r5, r6
|
||||
adds r0, 0x18
|
||||
bl sub_80FC670
|
||||
cmp r0, 0
|
||||
beq _081DA2D4
|
||||
adds r0, r6, 0
|
||||
subs r0, 0x8
|
||||
adds r5, r0
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r5, r1]
|
||||
cmp r0, 0
|
||||
beq _081DA284
|
||||
cmp r0, 0x1
|
||||
beq _081DA2AC
|
||||
movs r0, 0
|
||||
strh r0, [r5, 0x8]
|
||||
strh r0, [r5, 0x20]
|
||||
adds r0, r4, 0
|
||||
bl SwitchTaskToFollowupFunc
|
||||
b _081DA2D4
|
||||
.pool
|
||||
_081DA284:
|
||||
bl GetMultiplayerId
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DA2CE
|
||||
bl sub_800A520
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA2D4
|
||||
ldr r0, =gRngValue
|
||||
movs r1, 0x4
|
||||
bl sub_80FC4F4
|
||||
cmp r0, 0x1
|
||||
bne _081DA2D4
|
||||
b _081DA2CE
|
||||
.pool
|
||||
_081DA2AC:
|
||||
movs r0, 0
|
||||
bl sub_80FC530
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA2D4
|
||||
ldr r0, =gRngValue
|
||||
ldr r4, =gUnknown_020223C4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x4
|
||||
bl memcpy
|
||||
ldr r0, =gUnknown_030060B8
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x4
|
||||
bl memcpy
|
||||
_081DA2CE:
|
||||
ldrh r0, [r5, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x8]
|
||||
_081DA2D4:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA244
|
||||
|
||||
thumb_func_start sub_81DA2E8
|
||||
sub_81DA2E8: @ 81DA2E8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0xC
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
lsls r0, r6, 2
|
||||
mov r9, r0
|
||||
adds r0, r6
|
||||
lsls r5, r0, 3
|
||||
ldr r1, =gTasks + 0x8
|
||||
mov r8, r1
|
||||
adds r0, r5, r1
|
||||
adds r0, 0x18
|
||||
bl sub_80FC670
|
||||
cmp r0, 0
|
||||
beq _081DA39E
|
||||
movs r0, 0x8
|
||||
negs r0, r0
|
||||
add r0, r8
|
||||
mov r10, r0
|
||||
adds r4, r5, r0
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _081DA338
|
||||
cmp r0, 0x1
|
||||
beq _081DA35A
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x8]
|
||||
strh r0, [r4, 0x20]
|
||||
adds r0, r6, 0
|
||||
bl SwitchTaskToFollowupFunc
|
||||
b _081DA39E
|
||||
.pool
|
||||
_081DA338:
|
||||
bl sub_800A520
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA39E
|
||||
add r0, sp, 0x8
|
||||
movs r1, 0x6E
|
||||
strh r1, [r0]
|
||||
movs r1, 0x2
|
||||
bl sub_80FC4F4
|
||||
cmp r0, 0x1
|
||||
bne _081DA39E
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
b _081DA39E
|
||||
_081DA35A:
|
||||
bl sub_80FC55C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA39E
|
||||
movs r1, 0
|
||||
ldr r7, =gUnknown_02039F30
|
||||
ldrb r0, [r7]
|
||||
cmp r1, r0
|
||||
bge _081DA390
|
||||
mov r0, r8
|
||||
adds r0, 0xA
|
||||
adds r3, r5, r0
|
||||
ldr r4, =gUnknown_020223C4
|
||||
mov r2, sp
|
||||
movs r5, 0x80
|
||||
lsls r5, 1
|
||||
_081DA37C:
|
||||
ldrh r0, [r4]
|
||||
strh r0, [r2]
|
||||
strh r0, [r3]
|
||||
adds r3, 0x2
|
||||
adds r4, r5
|
||||
adds r2, 0x2
|
||||
adds r1, 0x1
|
||||
ldrb r0, [r7]
|
||||
cmp r1, r0
|
||||
blt _081DA37C
|
||||
_081DA390:
|
||||
mov r0, r9
|
||||
adds r1, r0, r6
|
||||
lsls r1, 3
|
||||
add r1, r10
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081DA39E:
|
||||
add sp, 0xC
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA2E8
|
||||
|
||||
thumb_func_start sub_81DA3B8
|
||||
sub_81DA3B8: @ 81DA3B8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0xC
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
lsls r0, r6, 2
|
||||
mov r9, r0
|
||||
adds r0, r6
|
||||
lsls r5, r0, 3
|
||||
ldr r1, =gTasks + 0x8
|
||||
mov r8, r1
|
||||
adds r0, r5, r1
|
||||
adds r0, 0x18
|
||||
bl sub_80FC670
|
||||
cmp r0, 0
|
||||
beq _081DA46E
|
||||
movs r0, 0x8
|
||||
negs r0, r0
|
||||
add r0, r8
|
||||
mov r10, r0
|
||||
adds r4, r5, r0
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _081DA408
|
||||
cmp r0, 0x1
|
||||
beq _081DA42A
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x8]
|
||||
strh r0, [r4, 0x20]
|
||||
adds r0, r6, 0
|
||||
bl SwitchTaskToFollowupFunc
|
||||
b _081DA46E
|
||||
.pool
|
||||
_081DA408:
|
||||
bl sub_800A520
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA46E
|
||||
ldrh r1, [r4, 0x1A]
|
||||
add r0, sp, 0x8
|
||||
strh r1, [r0]
|
||||
movs r1, 0x2
|
||||
bl sub_80FC4F4
|
||||
cmp r0, 0x1
|
||||
bne _081DA46E
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
b _081DA46E
|
||||
_081DA42A:
|
||||
bl sub_80FC55C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA46E
|
||||
movs r1, 0
|
||||
ldr r7, =gUnknown_02039F30
|
||||
ldrb r0, [r7]
|
||||
cmp r1, r0
|
||||
bge _081DA460
|
||||
mov r0, r8
|
||||
adds r0, 0x2
|
||||
adds r3, r5, r0
|
||||
ldr r4, =gUnknown_020223C4
|
||||
mov r2, sp
|
||||
movs r5, 0x80
|
||||
lsls r5, 1
|
||||
_081DA44C:
|
||||
ldrh r0, [r4]
|
||||
strh r0, [r2]
|
||||
strh r0, [r3]
|
||||
adds r3, 0x2
|
||||
adds r4, r5
|
||||
adds r2, 0x2
|
||||
adds r1, 0x1
|
||||
ldrb r0, [r7]
|
||||
cmp r1, r0
|
||||
blt _081DA44C
|
||||
_081DA460:
|
||||
mov r0, r9
|
||||
adds r1, r0, r6
|
||||
lsls r1, 3
|
||||
add r1, r10
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081DA46E:
|
||||
add sp, 0xC
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA3B8
|
||||
|
||||
thumb_func_start sub_81DA488
|
||||
sub_81DA488: @ 81DA488
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
lsls r7, r6, 2
|
||||
adds r0, r7, r6
|
||||
lsls r4, r0, 3
|
||||
ldr r5, =gTasks + 0x8
|
||||
adds r0, r4, r5
|
||||
adds r0, 0x18
|
||||
bl sub_80FC670
|
||||
cmp r0, 0
|
||||
beq _081DA55C
|
||||
adds r0, r5, 0
|
||||
subs r0, 0x8
|
||||
adds r4, r0
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _081DA4CC
|
||||
cmp r0, 0x1
|
||||
beq _081DA50C
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0x8]
|
||||
strh r0, [r4, 0x20]
|
||||
adds r0, r6, 0
|
||||
bl SwitchTaskToFollowupFunc
|
||||
b _081DA55C
|
||||
.pool
|
||||
_081DA4CC:
|
||||
bl GetMultiplayerId
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DA4FA
|
||||
bl sub_800A520
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA55C
|
||||
ldr r0, =gUnknown_02039F30
|
||||
ldrb r2, [r0]
|
||||
lsls r0, r2, 6
|
||||
ldr r1, =gUnknown_02039E00
|
||||
adds r0, r1
|
||||
movs r1, 0x4
|
||||
subs r1, r2
|
||||
lsls r1, 22
|
||||
lsrs r1, 16
|
||||
bl sub_80FC4F4
|
||||
cmp r0, 0x1
|
||||
bne _081DA55C
|
||||
_081DA4FA:
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
b _081DA55C
|
||||
.pool
|
||||
_081DA50C:
|
||||
movs r0, 0
|
||||
bl sub_80FC530
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA55C
|
||||
ldr r4, =gUnknown_02039F30
|
||||
ldrb r3, [r4]
|
||||
lsls r0, r3, 6
|
||||
ldr r5, =gUnknown_02039E00
|
||||
adds r0, r5
|
||||
ldr r1, =gUnknown_020223C4
|
||||
movs r2, 0x4
|
||||
subs r2, r3
|
||||
lsls r2, 6
|
||||
bl memcpy
|
||||
ldrb r4, [r4]
|
||||
mov r8, r7
|
||||
cmp r4, 0x3
|
||||
bgt _081DA54C
|
||||
lsls r0, r4, 6
|
||||
adds r5, r0, r5
|
||||
ldr r7, =gLinkPlayers
|
||||
_081DA53C:
|
||||
ldrh r1, [r7, 0x1A]
|
||||
adds r0, r5, 0
|
||||
bl sub_80DFA08
|
||||
adds r5, 0x40
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x3
|
||||
ble _081DA53C
|
||||
_081DA54C:
|
||||
ldr r0, =gTasks
|
||||
mov r2, r8
|
||||
adds r1, r2, r6
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081DA55C:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA488
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -383,7 +383,7 @@ sub_813010C: @ 813010C
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl sub_818E868
|
||||
ldr r1, =gUnknown_085E8D5E
|
||||
ldr r1, =gText_Space
|
||||
adds r0, r4, 0
|
||||
bl StringAppend
|
||||
ldr r1, =gUnknown_085B07D4
|
||||
|
@ -653,7 +653,7 @@ _08126F0C:
|
||||
adds r1, r0
|
||||
movs r2, 0x1E
|
||||
ldrsh r0, [r1, r2]
|
||||
ldr r2, =gUnknown_085E8CF0
|
||||
ldr r2, =gText_Cancel
|
||||
cmp r0, 0x2
|
||||
bne _08126F2C
|
||||
ldr r2, =gUnknown_085EB7EA
|
||||
@ -1216,7 +1216,7 @@ _081273D6:
|
||||
adds r4, r3
|
||||
ldr r0, [r5]
|
||||
adds r0, r4
|
||||
ldr r1, =gUnknown_085E8CF0
|
||||
ldr r1, =gText_Cancel
|
||||
bl StringCopy
|
||||
ldr r0, [r5]
|
||||
lsls r2, r6, 3
|
||||
@ -1610,7 +1610,7 @@ sub_8127744: @ 8127744
|
||||
ldrb r0, [r0]
|
||||
cmp r4, r0
|
||||
bcc _08127770
|
||||
ldr r2, =gUnknown_085E8D62
|
||||
ldr r2, =gText_GoBackPrevMenu
|
||||
b _08127782
|
||||
.pool
|
||||
_08127770:
|
||||
|
File diff suppressed because it is too large
Load Diff
1486
asm/fldeff_cut.s
Executable file
1486
asm/fldeff_cut.s
Executable file
File diff suppressed because it is too large
Load Diff
596
asm/fldeff_groundshake.s
Executable file
596
asm/fldeff_groundshake.s
Executable file
@ -0,0 +1,596 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81BE66C
|
||||
sub_81BE66C: @ 81BE66C
|
||||
push {lr}
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r0, 0x4]
|
||||
movs r0, 0xD0
|
||||
lsls r0, 5
|
||||
cmp r1, r0
|
||||
bne _081BE690
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
b _081BE692
|
||||
.pool
|
||||
_081BE690:
|
||||
movs r0, 0
|
||||
_081BE692:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81BE66C
|
||||
|
||||
thumb_func_start sub_81BE698
|
||||
sub_81BE698: @ 81BE698
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_0203CF18
|
||||
ldr r0, [r0]
|
||||
adds r0, 0x4
|
||||
bl sub_8151E50
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE698
|
||||
|
||||
thumb_func_start sub_81BE6AC
|
||||
sub_81BE6AC: @ 81BE6AC
|
||||
ldr r1, =gUnknown_0203CF18
|
||||
movs r0, 0
|
||||
str r0, [r1]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_81BE6AC
|
||||
|
||||
thumb_func_start sub_81BE6B8
|
||||
sub_81BE6B8: @ 81BE6B8
|
||||
push {r4,lr}
|
||||
ldr r4, =gUnknown_0203CF18
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _081BE6CC
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
b _081BE718
|
||||
.pool
|
||||
_081BE6CC:
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r0, 0x4]
|
||||
movs r0, 0xD0
|
||||
lsls r0, 5
|
||||
cmp r1, r0
|
||||
bne _081BE718
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081BE718
|
||||
movs r0, 0xC8
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
adds r0, 0x4
|
||||
bl sub_8151B3C
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
ldr r1, =gUnknown_08617E18
|
||||
bl sub_8151B68
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_8151CA8
|
||||
ldr r0, =sub_81BE698
|
||||
movs r1, 0xFF
|
||||
bl CreateTask
|
||||
ldr r1, [r4]
|
||||
strb r0, [r1]
|
||||
_081BE718:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE6B8
|
||||
|
||||
thumb_func_start sub_81BE72C
|
||||
sub_81BE72C: @ 81BE72C
|
||||
push {r4,lr}
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r0, 0x4]
|
||||
movs r0, 0xD0
|
||||
lsls r0, 5
|
||||
cmp r1, r0
|
||||
bne _081BE788
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081BE788
|
||||
ldr r4, =gUnknown_0203CF18
|
||||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _081BE788
|
||||
ldr r0, =sub_81BE698
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081BE766
|
||||
ldr r0, [r4]
|
||||
ldrb r0, [r0]
|
||||
bl DestroyTask
|
||||
_081BE766:
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_8151D28
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x4
|
||||
movs r1, 0x1
|
||||
movs r2, 0x1
|
||||
bl sub_8151C50
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
movs r0, 0
|
||||
str r0, [r4]
|
||||
_081BE788:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE72C
|
||||
|
||||
thumb_func_start sub_81BE79C
|
||||
sub_81BE79C: @ 81BE79C
|
||||
push {r4,lr}
|
||||
ldr r0, =0x000040cb
|
||||
bl VarGet
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _081BE7B8
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagReset
|
||||
b _081BE7EE
|
||||
.pool
|
||||
_081BE7B8:
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
movs r0, 0x1
|
||||
ands r4, r0
|
||||
movs r0, 0x9D
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _081BE7D4
|
||||
movs r4, 0x1
|
||||
_081BE7D4:
|
||||
cmp r4, 0
|
||||
beq _081BE7E6
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagSet
|
||||
bl sub_81BE6B8
|
||||
b _081BE7EE
|
||||
_081BE7E6:
|
||||
movs r0, 0xA7
|
||||
lsls r0, 1
|
||||
bl FlagReset
|
||||
_081BE7EE:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81BE79C
|
||||
|
||||
thumb_func_start sub_81BE7F4
|
||||
sub_81BE7F4: @ 81BE7F4
|
||||
push {lr}
|
||||
ldr r0, =sub_81BE808
|
||||
movs r1, 0x8
|
||||
bl CreateTask
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE7F4
|
||||
|
||||
thumb_func_start sub_81BE808
|
||||
sub_81BE808: @ 81BE808
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrb r1, [r0, 0x5]
|
||||
ldrb r2, [r0, 0x4]
|
||||
movs r0, 0x2D
|
||||
mov r3, sp
|
||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
||||
mov r0, sp
|
||||
ldrb r0, [r0]
|
||||
lsls r2, r0, 3
|
||||
adds r2, r0
|
||||
lsls r2, 2
|
||||
ldr r4, =gMapObjects
|
||||
adds r2, r4
|
||||
ldr r3, =gSprites
|
||||
ldrb r1, [r2, 0x4]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r3
|
||||
ldrh r1, [r0, 0x26]
|
||||
adds r1, 0x4
|
||||
strh r1, [r0, 0x26]
|
||||
ldr r0, =gUnknown_02037590
|
||||
ldrb r0, [r0, 0x5]
|
||||
lsls r1, r0, 3
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r1, r4
|
||||
ldrb r2, [r2, 0x4]
|
||||
lsls r0, r2, 4
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
adds r0, r3
|
||||
movs r4, 0x22
|
||||
ldrsh r2, [r0, r4]
|
||||
movs r4, 0x26
|
||||
ldrsh r0, [r0, r4]
|
||||
adds r2, r0
|
||||
ldrb r1, [r1, 0x4]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r3
|
||||
movs r3, 0x22
|
||||
ldrsh r1, [r0, r3]
|
||||
movs r4, 0x26
|
||||
ldrsh r0, [r0, r4]
|
||||
adds r1, r0
|
||||
cmp r2, r1
|
||||
blt _081BE882
|
||||
adds r0, r5, 0
|
||||
bl DestroyTask
|
||||
bl EnableBothScriptContexts
|
||||
_081BE882:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE808
|
||||
|
||||
thumb_func_start sp136_strengh_sound
|
||||
sp136_strengh_sound: @ 81BE89C
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
mov r8, r0
|
||||
adds r4, r1, 0
|
||||
adds r5, r2, 0
|
||||
adds r6, r3, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
ldr r0, =sub_81BE900
|
||||
movs r1, 0x9
|
||||
bl CreateTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r2
|
||||
movs r0, 0
|
||||
strh r4, [r1, 0x8]
|
||||
strh r0, [r1, 0xA]
|
||||
strh r5, [r1, 0xC]
|
||||
strh r6, [r1, 0xE]
|
||||
mov r0, r8
|
||||
strh r0, [r1, 0x10]
|
||||
movs r0, 0
|
||||
bl SetCameraPanningCallback
|
||||
movs r0, 0xD6
|
||||
bl PlaySE
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sp136_strengh_sound
|
||||
|
||||
thumb_func_start sub_81BE900
|
||||
sub_81BE900: @ 81BE900
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
ldr r1, =gTasks + 0x8
|
||||
adds r4, r0, r1
|
||||
ldrh r0, [r4, 0x2]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x2]
|
||||
movs r1, 0x2
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r2, 0x6
|
||||
ldrsh r1, [r4, r2]
|
||||
bl __modsi3
|
||||
cmp r0, 0
|
||||
bne _081BE95C
|
||||
strh r0, [r4, 0x2]
|
||||
ldrh r0, [r4, 0x4]
|
||||
subs r0, 0x1
|
||||
strh r0, [r4, 0x4]
|
||||
ldrh r0, [r4]
|
||||
negs r0, r0
|
||||
strh r0, [r4]
|
||||
ldrh r0, [r4, 0x8]
|
||||
negs r0, r0
|
||||
strh r0, [r4, 0x8]
|
||||
movs r1, 0
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r2, 0x8
|
||||
ldrsh r1, [r4, r2]
|
||||
bl SetCameraPanning
|
||||
movs r1, 0x4
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _081BE95C
|
||||
bl sub_81BE968
|
||||
adds r0, r5, 0
|
||||
bl DestroyTask
|
||||
bl InstallCameraPanAheadCallback
|
||||
_081BE95C:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE900
|
||||
|
||||
thumb_func_start sub_81BE968
|
||||
sub_81BE968: @ 81BE968
|
||||
push {lr}
|
||||
ldr r0, =sub_81BE9C0
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0xFF
|
||||
beq _081BE988
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r2, 2
|
||||
adds r1, r2
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081BE988:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE968
|
||||
|
||||
thumb_func_start sub_81BE994
|
||||
sub_81BE994: @ 81BE994
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_08617D94
|
||||
bl LoadSpriteSheets
|
||||
bl sub_81BEA20
|
||||
ldr r0, =sub_81BE9C0
|
||||
movs r1, 0x8
|
||||
bl CreateTask
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
movs r2, 0x10
|
||||
movs r3, 0x3
|
||||
bl sp136_strengh_sound
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE994
|
||||
|
||||
thumb_func_start sub_81BE9C0
|
||||
sub_81BE9C0: @ 81BE9C0
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r3, r1, 3
|
||||
ldr r4, =gTasks + 0x8
|
||||
adds r2, r3, r4
|
||||
ldrh r0, [r2, 0x2]
|
||||
adds r0, 0x1
|
||||
strh r0, [r2, 0x2]
|
||||
lsls r0, 16
|
||||
movs r1, 0xFA
|
||||
lsls r1, 18
|
||||
cmp r0, r1
|
||||
beq _081BE9E6
|
||||
ldrh r0, [r2]
|
||||
cmp r0, 0x11
|
||||
bne _081BE9F0
|
||||
_081BE9E6:
|
||||
adds r0, r4, 0
|
||||
subs r0, 0x8
|
||||
adds r0, r3, r0
|
||||
ldr r1, =sub_81BEA00
|
||||
str r1, [r0]
|
||||
_081BE9F0:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BE9C0
|
||||
|
||||
thumb_func_start sub_81BEA00
|
||||
sub_81BEA00: @ 81BEA00
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0xFA
|
||||
lsls r0, 4
|
||||
bl FreeSpriteTilesByTag
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
bl EnableBothScriptContexts
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81BEA00
|
||||
|
||||
thumb_func_start sub_81BEA20
|
||||
sub_81BEA20: @ 81BEA20
|
||||
push {r4-r7,lr}
|
||||
movs r4, 0
|
||||
ldr r5, =gUnknown_08617D64
|
||||
adds r7, r5, 0x2
|
||||
ldr r6, =gSprites
|
||||
_081BEA2A:
|
||||
lsls r0, r4, 1
|
||||
adds r0, r4
|
||||
lsls r0, 1
|
||||
adds r1, r0, r5
|
||||
ldrh r1, [r1]
|
||||
adds r1, 0x78
|
||||
lsls r1, 16
|
||||
asrs r1, 16
|
||||
adds r0, r7
|
||||
movs r3, 0
|
||||
ldrsh r2, [r0, r3]
|
||||
ldr r0, =gUnknown_08617E60
|
||||
movs r3, 0x8
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r6
|
||||
ldrb r2, [r0, 0x5]
|
||||
movs r3, 0xD
|
||||
negs r3, r3
|
||||
adds r1, r3, 0
|
||||
ands r2, r1
|
||||
movs r1, 0xF
|
||||
ands r2, r1
|
||||
strb r2, [r0, 0x5]
|
||||
strh r4, [r0, 0x2E]
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x7
|
||||
bls _081BEA2A
|
||||
movs r4, 0
|
||||
ldr r5, =gUnknown_08617D64
|
||||
adds r7, r5, 0x2
|
||||
ldr r6, =gSprites
|
||||
_081BEA78:
|
||||
lsls r0, r4, 1
|
||||
adds r0, r4
|
||||
lsls r0, 1
|
||||
adds r1, r0, r5
|
||||
ldrh r1, [r1]
|
||||
adds r1, 0x73
|
||||
lsls r1, 16
|
||||
asrs r1, 16
|
||||
adds r0, r7
|
||||
ldrh r2, [r0]
|
||||
subs r2, 0x3
|
||||
lsls r2, 16
|
||||
asrs r2, 16
|
||||
ldr r0, =gUnknown_08617E34
|
||||
movs r3, 0x8
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r6
|
||||
ldrb r2, [r0, 0x5]
|
||||
movs r3, 0xD
|
||||
negs r3, r3
|
||||
adds r1, r3, 0
|
||||
ands r2, r1
|
||||
movs r1, 0xF
|
||||
ands r2, r1
|
||||
strb r2, [r0, 0x5]
|
||||
strh r4, [r0, 0x2E]
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x7
|
||||
bls _081BEA78
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEA20
|
||||
|
||||
thumb_func_start sub_81BEAD8
|
||||
sub_81BEAD8: @ 81BEAD8
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrh r0, [r4, 0x30]
|
||||
adds r0, 0x2
|
||||
strh r0, [r4, 0x30]
|
||||
movs r1, 0x30
|
||||
ldrsh r0, [r4, r1]
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
strh r0, [r4, 0x26]
|
||||
movs r0, 0x22
|
||||
ldrsh r3, [r4, r0]
|
||||
movs r1, 0x26
|
||||
ldrsh r0, [r4, r1]
|
||||
adds r3, r0
|
||||
ldr r2, =gUnknown_08617D64
|
||||
movs r0, 0x2E
|
||||
ldrsh r1, [r4, r0]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 1
|
||||
adds r2, 0x4
|
||||
adds r0, r2
|
||||
movs r1, 0
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r3, r0
|
||||
ble _081BEB1A
|
||||
adds r0, r4, 0
|
||||
bl DestroySprite
|
||||
bl sub_81BE968
|
||||
_081BEB1A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEAD8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
339
asm/fldeff_softboiled.s
Executable file
339
asm/fldeff_softboiled.s
Executable file
@ -0,0 +1,339 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start hm_prepare_dive_probably
|
||||
hm_prepare_dive_probably: @ 8161508
|
||||
push {r4-r6,lr}
|
||||
bl brm_get_pokemon_selection
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r6, 0x64
|
||||
muls r0, r6
|
||||
ldr r4, =gPlayerParty
|
||||
adds r0, r4
|
||||
movs r1, 0x3A
|
||||
bl GetMonData
|
||||
adds r5, r0, 0
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
bl brm_get_pokemon_selection
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
muls r0, r6
|
||||
adds r0, r4
|
||||
movs r1, 0x39
|
||||
bl GetMonData
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x5
|
||||
bl __udivsi3
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r4, r0
|
||||
bhi _08161558
|
||||
movs r0, 0
|
||||
b _0816155A
|
||||
.pool
|
||||
_08161558:
|
||||
movs r0, 0x1
|
||||
_0816155A:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end hm_prepare_dive_probably
|
||||
|
||||
thumb_func_start sub_8161560
|
||||
sub_8161560: @ 8161560
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gUnknown_0203CEC8
|
||||
movs r1, 0xA
|
||||
strb r1, [r0, 0xB]
|
||||
ldrb r1, [r0, 0x9]
|
||||
strb r1, [r0, 0xA]
|
||||
bl brm_get_pokemon_selection
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x1
|
||||
bl sub_81B0FCC
|
||||
movs r0, 0x5
|
||||
bl display_pokemon_menu_message
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_81B1370
|
||||
str r1, [r0]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8161560
|
||||
|
||||
thumb_func_start sub_81615A8
|
||||
sub_81615A8: @ 81615A8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x8
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
str r4, [sp, 0x4]
|
||||
ldr r1, =gUnknown_0203CEC8
|
||||
ldrb r7, [r1, 0x9]
|
||||
mov r8, r7
|
||||
ldrb r0, [r1, 0xA]
|
||||
adds r5, r0, 0
|
||||
cmp r5, 0x6
|
||||
bls _081615EC
|
||||
movs r0, 0
|
||||
strb r0, [r1, 0xB]
|
||||
bl display_pokemon_menu_message
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_81B1370
|
||||
str r1, [r0]
|
||||
b _08161658
|
||||
.pool
|
||||
_081615EC:
|
||||
movs r0, 0x64
|
||||
mov r10, r0
|
||||
mov r0, r10
|
||||
muls r0, r5
|
||||
ldr r1, =gPlayerParty
|
||||
mov r9, r1
|
||||
adds r6, r0, r1
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x39
|
||||
bl GetMonData
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
cmp r4, 0
|
||||
beq _0816161A
|
||||
cmp r7, r5
|
||||
beq _0816161A
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x3A
|
||||
bl GetMonData
|
||||
cmp r0, r4
|
||||
bne _08161628
|
||||
_0816161A:
|
||||
ldr r0, [sp, 0x4]
|
||||
bl sub_81617B8
|
||||
b _08161658
|
||||
.pool
|
||||
_08161628:
|
||||
movs r0, 0x1
|
||||
bl PlaySE
|
||||
mov r1, r10
|
||||
mov r0, r8
|
||||
muls r0, r1
|
||||
add r0, r9
|
||||
movs r1, 0x3A
|
||||
bl GetMonData
|
||||
movs r1, 0x5
|
||||
bl __udivsi3
|
||||
adds r3, r0, 0
|
||||
lsls r3, 16
|
||||
asrs r3, 16
|
||||
movs r2, 0x1
|
||||
negs r2, r2
|
||||
ldr r0, =sub_816166C
|
||||
str r0, [sp]
|
||||
ldr r0, [sp, 0x4]
|
||||
mov r1, r8
|
||||
bl sub_81B1F18
|
||||
_08161658:
|
||||
add sp, 0x8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81615A8
|
||||
|
||||
thumb_func_start sub_816166C
|
||||
sub_816166C: @ 816166C
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0x1
|
||||
bl PlaySE
|
||||
ldr r5, =gUnknown_0203CEC8
|
||||
movs r1, 0x9
|
||||
ldrsb r1, [r5, r1]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0x3A
|
||||
bl GetMonData
|
||||
movs r1, 0x5
|
||||
bl __udivsi3
|
||||
adds r3, r0, 0
|
||||
lsls r3, 16
|
||||
asrs r3, 16
|
||||
ldrb r1, [r5, 0xA]
|
||||
ldr r0, =sub_81616C0
|
||||
str r0, [sp]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0x1
|
||||
bl sub_81B1F18
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_816166C
|
||||
|
||||
thumb_func_start sub_81616C0
|
||||
sub_81616C0: @ 81616C0
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
ldr r0, =gUnknown_0203CEC8
|
||||
movs r1, 0xA
|
||||
ldrsb r1, [r0, r1]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
ldr r1, =gStringVar1
|
||||
bl GetMonNickname
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E9C17
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_81B1B5C
|
||||
movs r0, 0x2
|
||||
bl schedule_bg_copy_tilemap_to_vram
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_8161724
|
||||
str r1, [r0]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81616C0
|
||||
|
||||
thumb_func_start sub_8161724
|
||||
sub_8161724: @ 8161724
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
bl sub_81B1BD4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _08161772
|
||||
ldr r4, =gUnknown_0203CEC8
|
||||
movs r0, 0
|
||||
strb r0, [r4, 0xB]
|
||||
ldrb r0, [r4, 0x9]
|
||||
movs r1, 0
|
||||
bl sub_81B0FCC
|
||||
ldrb r0, [r4, 0xA]
|
||||
strb r0, [r4, 0x9]
|
||||
ldrb r0, [r4, 0xA]
|
||||
movs r1, 0x1
|
||||
bl sub_81B0FCC
|
||||
movs r0, 0x6
|
||||
movs r1, 0
|
||||
bl sub_8198070
|
||||
movs r0, 0x6
|
||||
bl ClearWindowTilemap
|
||||
movs r0, 0
|
||||
bl display_pokemon_menu_message
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_81B1370
|
||||
str r1, [r0]
|
||||
_08161772:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8161724
|
||||
|
||||
thumb_func_start sub_8161784
|
||||
sub_8161784: @ 8161784
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
bl sub_81B1BD4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _081617AA
|
||||
movs r0, 0x5
|
||||
bl display_pokemon_menu_message
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r4, 2
|
||||
adds r1, r4
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldr r0, =sub_81B1370
|
||||
str r0, [r1]
|
||||
_081617AA:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8161784
|
||||
|
||||
thumb_func_start sub_81617B8
|
||||
sub_81617B8: @ 81617B8
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r0, =gUnknown_085E9712
|
||||
movs r1, 0
|
||||
bl sub_81B1B5C
|
||||
movs r0, 0x2
|
||||
bl schedule_bg_copy_tilemap_to_vram
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_8161784
|
||||
str r1, [r0]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81617B8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
998
asm/fossil_specials.s
Executable file
998
asm/fossil_specials.s
Executable file
@ -0,0 +1,998 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81BEB24
|
||||
sub_81BEB24: @ 81BEB24
|
||||
push {r4,r5,lr}
|
||||
movs r4, 0
|
||||
ldr r5, =gUnknown_08617DA4
|
||||
_081BEB2A:
|
||||
lsls r2, r4, 2
|
||||
adds r2, r5
|
||||
ldrb r0, [r2]
|
||||
adds r0, 0x7
|
||||
ldrb r1, [r2, 0x1]
|
||||
adds r1, 0x7
|
||||
ldrh r2, [r2, 0x2]
|
||||
bl MapGridSetMetatileIdAt
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x11
|
||||
bls _081BEB2A
|
||||
bl DrawWholeMapView
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEB24
|
||||
|
||||
thumb_func_start sub_81BEB54
|
||||
sub_81BEB54: @ 81BEB54
|
||||
push {lr}
|
||||
ldr r0, =sub_81BED50
|
||||
movs r1, 0x9
|
||||
bl CreateTask
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEB54
|
||||
|
||||
thumb_func_start sub_81BEB68
|
||||
sub_81BEB68: @ 81BEB68
|
||||
push {lr}
|
||||
ldr r0, =sub_81BEBF4
|
||||
movs r1, 0x9
|
||||
bl CreateTask
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEB68
|
||||
|
||||
thumb_func_start sub_81BEB7C
|
||||
sub_81BEB7C: @ 81BEB7C
|
||||
push {lr}
|
||||
ldr r0, =sub_81BF028
|
||||
movs r1, 0x9
|
||||
bl CreateTask
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEB7C
|
||||
|
||||
thumb_func_start sub_81BEB90
|
||||
sub_81BEB90: @ 81BEB90
|
||||
push {r4,lr}
|
||||
ldr r4, =gUnknown_0203CF14
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r0]
|
||||
movs r0, 0x10
|
||||
bl SetGpuReg
|
||||
ldr r0, [r4]
|
||||
ldrh r1, [r0, 0x2]
|
||||
movs r0, 0x12
|
||||
bl SetGpuReg
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEB90
|
||||
|
||||
thumb_func_start sub_81BEBB4
|
||||
sub_81BEBB4: @ 81BEBB4
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r2, r1, r2
|
||||
ldrh r1, [r2, 0x8]
|
||||
movs r3, 0x8
|
||||
ldrsh r0, [r2, r3]
|
||||
cmp r0, 0
|
||||
bne _081BEBEC
|
||||
ldr r0, =gUnknown_0203CF14
|
||||
ldr r1, [r0]
|
||||
ldrh r0, [r1]
|
||||
negs r0, r0
|
||||
strh r0, [r1]
|
||||
movs r0, 0x2
|
||||
strh r0, [r2, 0x8]
|
||||
bl sub_81BEB90
|
||||
b _081BEBF0
|
||||
.pool
|
||||
_081BEBEC:
|
||||
subs r0, r1, 0x1
|
||||
strh r0, [r2, 0x8]
|
||||
_081BEBF0:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81BEBB4
|
||||
|
||||
thumb_func_start sub_81BEBF4
|
||||
sub_81BEBF4: @ 81BEBF4
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0xC
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, 0x6
|
||||
bls _081BEC10
|
||||
b _081BED40
|
||||
_081BEC10:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BEC24
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BEC24:
|
||||
.4byte _081BEC40
|
||||
.4byte _081BEC50
|
||||
.4byte _081BEC88
|
||||
.4byte _081BECB0
|
||||
.4byte _081BECF8
|
||||
.4byte _081BED00
|
||||
.4byte _081BED1C
|
||||
_081BEC40:
|
||||
bl FreeAllWindowBuffers
|
||||
movs r0, 0
|
||||
movs r1, 0x7
|
||||
movs r2, 0x2
|
||||
bl SetBgAttribute
|
||||
b _081BED04
|
||||
_081BEC50:
|
||||
ldr r4, =gUnknown_0203CF04
|
||||
movs r0, 0x92
|
||||
lsls r0, 4
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
ldr r4, =gUnknown_0203CF08
|
||||
movs r0, 0x80
|
||||
lsls r0, 4
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
b _081BECD8
|
||||
.pool
|
||||
_081BEC88:
|
||||
ldr r0, =gUnknown_08617274
|
||||
ldr r4, =gUnknown_0203CF04
|
||||
ldr r1, [r4]
|
||||
movs r2, 0x92
|
||||
lsls r2, 3
|
||||
bl CpuSet
|
||||
ldr r1, [r4]
|
||||
movs r2, 0x92
|
||||
lsls r2, 4
|
||||
movs r0, 0
|
||||
movs r3, 0
|
||||
bl LoadBgTiles
|
||||
b _081BECD8
|
||||
.pool
|
||||
_081BECB0:
|
||||
ldr r0, =gUnknown_0203CF08
|
||||
ldr r1, [r0]
|
||||
movs r0, 0
|
||||
bl SetBgTilemapBuffer
|
||||
ldr r1, =gUnknown_08617B94
|
||||
movs r0, 0x6
|
||||
str r0, [sp]
|
||||
movs r0, 0xC
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0x11
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0
|
||||
movs r2, 0xC
|
||||
movs r3, 0x1D
|
||||
bl CopyToBgTilemapBufferRect_ChangePalette
|
||||
movs r0, 0
|
||||
bl CopyBgTilemapBufferToVram
|
||||
_081BECD8:
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldrh r1, [r0, 0x8]
|
||||
adds r1, 0x1
|
||||
strh r1, [r0, 0x8]
|
||||
b _081BED40
|
||||
.pool
|
||||
_081BECF8:
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
b _081BED04
|
||||
_081BED00:
|
||||
bl sub_81BEB24
|
||||
_081BED04:
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r5, 2
|
||||
adds r1, r5
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
b _081BED40
|
||||
.pool
|
||||
_081BED1C:
|
||||
ldr r4, =gUnknown_0203CF14
|
||||
movs r0, 0x4
|
||||
bl Alloc
|
||||
str r0, [r4]
|
||||
movs r2, 0
|
||||
movs r1, 0x2
|
||||
strh r1, [r0]
|
||||
strh r2, [r0, 0x2]
|
||||
ldr r0, =sub_81BEBB4
|
||||
movs r1, 0xA
|
||||
bl CreateTask
|
||||
adds r0, r5, 0
|
||||
bl DestroyTask
|
||||
bl EnableBothScriptContexts
|
||||
_081BED40:
|
||||
add sp, 0xC
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BEBF4
|
||||
|
||||
thumb_func_start sub_81BED50
|
||||
sub_81BED50: @ 81BED50
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x10
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r10, r0
|
||||
ldr r1, =gTasks
|
||||
lsls r0, 2
|
||||
add r0, r10
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldrh r0, [r0, 0x8]
|
||||
subs r0, 0x1
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
adds r6, r1, 0
|
||||
cmp r0, 0x7
|
||||
bls _081BED7C
|
||||
b _081BF002
|
||||
_081BED7C:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BED90
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BED90:
|
||||
.4byte _081BEDB0
|
||||
.4byte _081BF002
|
||||
.4byte _081BEDC4
|
||||
.4byte _081BEF64
|
||||
.4byte _081BEF94
|
||||
.4byte _081BEFD0
|
||||
.4byte _081BEFF0
|
||||
.4byte _081BEFF8
|
||||
_081BEDB0:
|
||||
ldr r4, =gUnknown_0203CF10
|
||||
movs r0, 0xC0
|
||||
lsls r0, 2
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
b _081BF002
|
||||
.pool
|
||||
_081BEDC4:
|
||||
mov r1, r10
|
||||
lsls r0, r1, 2
|
||||
adds r1, r0, r1
|
||||
lsls r1, 3
|
||||
adds r2, r1, r6
|
||||
ldrh r3, [r2, 0xE]
|
||||
movs r4, 0xE
|
||||
ldrsh r1, [r2, r4]
|
||||
str r0, [sp, 0x8]
|
||||
cmp r1, 0x5F
|
||||
bgt _081BEE8A
|
||||
movs r1, 0xA
|
||||
ldrsh r0, [r2, r1]
|
||||
cmp r0, 0x1
|
||||
ble _081BEE7C
|
||||
lsls r0, r3, 24
|
||||
lsrs r4, r0, 24
|
||||
movs r0, 0x30
|
||||
bl Alloc
|
||||
ldr r3, =gUnknown_0203CF10
|
||||
ldr r1, [r3]
|
||||
lsls r2, r4, 3
|
||||
adds r1, r2, r1
|
||||
str r0, [r1]
|
||||
movs r5, 0
|
||||
adds r4, r2, 0
|
||||
_081BEDFA:
|
||||
ldr r0, [r3]
|
||||
adds r0, r4, r0
|
||||
ldr r0, [r0]
|
||||
adds r0, r5
|
||||
strb r5, [r0]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x2F
|
||||
bls _081BEDFA
|
||||
movs r5, 0
|
||||
ldr r7, =gUnknown_0203CF10
|
||||
adds r6, r2, 0
|
||||
_081BEE14:
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x30
|
||||
bl __umodsi3
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x30
|
||||
bl __umodsi3
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r1, [r7]
|
||||
adds r1, r6, r1
|
||||
ldr r1, [r1]
|
||||
adds r0, r1, r0
|
||||
ldrb r2, [r0]
|
||||
adds r1, r4
|
||||
ldrb r1, [r1]
|
||||
strb r1, [r0]
|
||||
ldr r0, [r7]
|
||||
adds r0, r6, r0
|
||||
ldr r0, [r0]
|
||||
adds r0, r4
|
||||
strb r2, [r0]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x2F
|
||||
bls _081BEE14
|
||||
ldr r0, =gTasks
|
||||
ldr r1, [sp, 0x8]
|
||||
add r1, r10
|
||||
lsls r1, 3
|
||||
adds r2, r1, r0
|
||||
ldrh r3, [r2, 0xE]
|
||||
movs r4, 0xE
|
||||
ldrsh r1, [r2, r4]
|
||||
adds r6, r0, 0
|
||||
cmp r1, 0x5F
|
||||
bgt _081BEE78
|
||||
adds r0, r3, 0x1
|
||||
strh r0, [r2, 0xE]
|
||||
_081BEE78:
|
||||
movs r0, 0
|
||||
strh r0, [r2, 0xA]
|
||||
_081BEE7C:
|
||||
ldr r1, [sp, 0x8]
|
||||
add r1, r10
|
||||
lsls r1, 3
|
||||
adds r1, r6
|
||||
ldrh r0, [r1, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0xA]
|
||||
_081BEE8A:
|
||||
ldr r0, [sp, 0x8]
|
||||
add r0, r10
|
||||
lsls r0, 3
|
||||
adds r0, r6
|
||||
ldrb r4, [r0, 0xE]
|
||||
ldrb r5, [r0, 0xC]
|
||||
lsls r0, r4, 16
|
||||
cmp r5, r4
|
||||
bcs _081BEF32
|
||||
str r0, [sp, 0xC]
|
||||
_081BEE9E:
|
||||
movs r6, 0
|
||||
adds r0, r5, 0x1
|
||||
str r0, [sp, 0x4]
|
||||
lsls r4, r5, 3
|
||||
movs r2, 0x5F
|
||||
subs r1, r2, r5
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 4
|
||||
mov r9, r0
|
||||
_081BEEB2:
|
||||
ldr r0, =gUnknown_0203CF04
|
||||
ldr r0, [r0]
|
||||
ldr r7, =gUnknown_0203CF10
|
||||
ldr r3, [r7]
|
||||
adds r3, r4, r3
|
||||
ldrb r2, [r3, 0x4]
|
||||
adds r1, r2, 0x1
|
||||
strb r1, [r3, 0x4]
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldr r1, [r3]
|
||||
adds r1, r2
|
||||
ldrb r1, [r1]
|
||||
add r1, r9
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
movs r2, 0x1
|
||||
mov r8, r2
|
||||
str r2, [sp]
|
||||
movs r2, 0
|
||||
movs r3, 0x30
|
||||
bl sub_81BF2B8
|
||||
adds r0, r6, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
cmp r6, 0
|
||||
beq _081BEEB2
|
||||
ldr r0, [r7]
|
||||
adds r1, r4, r0
|
||||
ldrb r0, [r1, 0x4]
|
||||
cmp r0, 0x2F
|
||||
bls _081BEF24
|
||||
ldr r0, [r1]
|
||||
bl Free
|
||||
ldr r0, [r7]
|
||||
adds r0, r4, r0
|
||||
movs r1, 0
|
||||
str r1, [r0]
|
||||
ldr r1, [sp, 0x8]
|
||||
add r1, r10
|
||||
lsls r1, 3
|
||||
ldr r4, =gTasks
|
||||
adds r1, r4
|
||||
ldrh r0, [r1, 0xC]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0xC]
|
||||
mov r0, r8
|
||||
ands r5, r0
|
||||
cmp r5, 0x1
|
||||
bne _081BEF24
|
||||
ldr r0, =gUnknown_0203CF14
|
||||
ldr r1, [r0]
|
||||
ldrh r0, [r1, 0x2]
|
||||
subs r0, 0x1
|
||||
strh r0, [r1, 0x2]
|
||||
_081BEF24:
|
||||
ldr r1, [sp, 0x4]
|
||||
lsls r0, r1, 16
|
||||
lsrs r5, r0, 16
|
||||
ldr r2, [sp, 0xC]
|
||||
lsrs r0, r2, 16
|
||||
cmp r5, r0
|
||||
bcc _081BEE9E
|
||||
_081BEF32:
|
||||
ldr r0, =gUnknown_0203CF04
|
||||
ldr r1, [r0]
|
||||
movs r2, 0x92
|
||||
lsls r2, 4
|
||||
movs r0, 0
|
||||
movs r3, 0
|
||||
bl LoadBgTiles
|
||||
ldr r0, =gUnknown_0203CF10
|
||||
ldr r0, [r0]
|
||||
movs r4, 0xBE
|
||||
lsls r4, 2
|
||||
adds r0, r4
|
||||
ldrb r0, [r0, 0x4]
|
||||
cmp r0, 0x2F
|
||||
bhi _081BF002
|
||||
b _081BF014
|
||||
.pool
|
||||
_081BEF64:
|
||||
movs r0, 0
|
||||
bl UnsetBgTilemapBuffer
|
||||
ldr r0, =sub_81BEBB4
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0xFF
|
||||
beq _081BEF7C
|
||||
bl DestroyTask
|
||||
_081BEF7C:
|
||||
ldr r0, =gUnknown_0203CF14
|
||||
ldr r1, [r0]
|
||||
movs r0, 0
|
||||
strh r0, [r1]
|
||||
strh r0, [r1, 0x2]
|
||||
bl sub_81BEB90
|
||||
b _081BF002
|
||||
.pool
|
||||
_081BEF94:
|
||||
ldr r4, =gUnknown_0203CF14
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
movs r5, 0
|
||||
str r5, [r4]
|
||||
ldr r4, =gUnknown_0203CF10
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
str r5, [r4]
|
||||
ldr r4, =gUnknown_0203CF04
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
str r5, [r4]
|
||||
ldr r4, =gUnknown_0203CF08
|
||||
ldr r0, [r4]
|
||||
bl Free
|
||||
str r5, [r4]
|
||||
b _081BF002
|
||||
.pool
|
||||
_081BEFD0:
|
||||
movs r0, 0xC
|
||||
movs r1, 0x2
|
||||
bl SetGpuRegBits
|
||||
movs r0, 0x8
|
||||
movs r1, 0
|
||||
bl SetGpuRegBits
|
||||
movs r0, 0
|
||||
movs r1, 0x7
|
||||
movs r2, 0
|
||||
bl SetBgAttribute
|
||||
bl sub_81971D0
|
||||
b _081BF002
|
||||
_081BEFF0:
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
b _081BF002
|
||||
_081BEFF8:
|
||||
mov r0, r10
|
||||
bl DestroyTask
|
||||
bl EnableBothScriptContexts
|
||||
_081BF002:
|
||||
ldr r0, =gTasks
|
||||
mov r2, r10
|
||||
lsls r1, r2, 2
|
||||
add r1, r10
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081BF014:
|
||||
add sp, 0x10
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BED50
|
||||
|
||||
thumb_func_start sub_81BF028
|
||||
sub_81BF028: @ 81BF028
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x18
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r7, 2
|
||||
adds r0, r7
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldrh r0, [r0, 0x8]
|
||||
subs r0, 0x1
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x7
|
||||
bls _081BF04C
|
||||
b _081BF228
|
||||
_081BF04C:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BF060
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BF060:
|
||||
.4byte _081BF080
|
||||
.4byte _081BF0B4
|
||||
.4byte _081BF0DC
|
||||
.4byte _081BF0F0
|
||||
.4byte _081BF148
|
||||
.4byte _081BF170
|
||||
.4byte _081BF1CC
|
||||
.4byte _081BF224
|
||||
_081BF080:
|
||||
ldr r4, =gUnknown_0203CF0C
|
||||
movs r0, 0x14
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
movs r0, 0x80
|
||||
bl AllocZeroed
|
||||
ldr r1, [r4]
|
||||
str r0, [r1]
|
||||
movs r0, 0x8
|
||||
bl AllocZeroed
|
||||
ldr r1, [r4]
|
||||
str r0, [r1, 0x4]
|
||||
movs r0, 0x80
|
||||
lsls r0, 2
|
||||
bl AllocZeroed
|
||||
ldr r1, [r4]
|
||||
str r0, [r1, 0xC]
|
||||
movs r0, 0
|
||||
strh r0, [r1, 0x10]
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF0B4:
|
||||
ldr r0, =gUnknown_0203CF0C
|
||||
ldr r0, [r0]
|
||||
ldr r1, [r0]
|
||||
movs r5, 0
|
||||
ldr r2, =gUnknown_08617C44
|
||||
_081BF0BE:
|
||||
adds r0, r5, r2
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r1]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
adds r1, 0x1
|
||||
cmp r5, 0x7F
|
||||
bls _081BF0BE
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF0DC:
|
||||
ldr r0, =gUnknown_0203CF0C
|
||||
ldr r0, [r0]
|
||||
ldr r1, [r0, 0x4]
|
||||
ldr r0, [r0]
|
||||
str r0, [r1]
|
||||
movs r0, 0x80
|
||||
strh r0, [r1, 0x4]
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF0F0:
|
||||
mov r1, sp
|
||||
ldr r0, =gUnknown_08617E00
|
||||
ldm r0!, {r2-r4}
|
||||
stm r1!, {r2-r4}
|
||||
ldm r0!, {r2-r4}
|
||||
stm r1!, {r2-r4}
|
||||
ldr r4, =gUnknown_0203CF0C
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x4]
|
||||
str r0, [sp, 0xC]
|
||||
movs r2, 0x10
|
||||
negs r2, r2
|
||||
mov r0, sp
|
||||
movs r1, 0x80
|
||||
movs r3, 0x1
|
||||
bl CreateSprite
|
||||
ldr r1, [r4]
|
||||
movs r3, 0
|
||||
strb r0, [r1, 0x8]
|
||||
ldr r2, =gSprites
|
||||
ldr r0, [r4]
|
||||
ldrb r1, [r0, 0x8]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
adds r0, 0x28
|
||||
strb r3, [r0]
|
||||
ldr r3, [r4]
|
||||
ldrb r1, [r3, 0x8]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrh r1, [r0, 0x20]
|
||||
strh r1, [r0, 0x2E]
|
||||
ldrb r1, [r3, 0x8]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x1
|
||||
strh r1, [r0, 0x30]
|
||||
_081BF148:
|
||||
movs r5, 0
|
||||
ldr r2, =gUnknown_0203CF0C
|
||||
_081BF14C:
|
||||
ldr r0, [r2]
|
||||
ldr r1, [r0, 0xC]
|
||||
lsls r0, r5, 1
|
||||
adds r0, r1
|
||||
strh r5, [r0]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0xFF
|
||||
bls _081BF14C
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF170:
|
||||
movs r5, 0
|
||||
movs r6, 0xFF
|
||||
ldr r0, =0x000001ff
|
||||
mov r8, r0
|
||||
_081BF178:
|
||||
bl Random
|
||||
adds r4, r6, 0
|
||||
ands r4, r0
|
||||
bl Random
|
||||
adds r1, r6, 0
|
||||
ands r1, r0
|
||||
ldr r0, =gUnknown_0203CF0C
|
||||
ldr r3, [r0]
|
||||
ldr r0, [r3, 0xC]
|
||||
lsls r1, 1
|
||||
adds r1, r0
|
||||
ldrh r2, [r1]
|
||||
lsls r4, 1
|
||||
adds r4, r0
|
||||
ldrh r0, [r4]
|
||||
strh r0, [r1]
|
||||
strh r2, [r4]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, r8
|
||||
bls _081BF178
|
||||
ldr r2, =gSprites
|
||||
ldrb r1, [r3, 0x8]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r2, 0x1C
|
||||
adds r0, r2
|
||||
ldr r1, =sub_81BF248
|
||||
str r1, [r0]
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF1CC:
|
||||
ldr r3, =gSprites
|
||||
ldr r5, =gUnknown_0203CF0C
|
||||
ldr r0, [r5]
|
||||
ldrb r1, [r0, 0x8]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r2, r0, 2
|
||||
adds r0, r3, 0
|
||||
adds r0, 0x1C
|
||||
adds r0, r2, r0
|
||||
ldr r1, [r0]
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
cmp r1, r0
|
||||
bne _081BF238
|
||||
adds r0, r2, r3
|
||||
bl DestroySprite
|
||||
ldr r0, [r5]
|
||||
ldr r0, [r0, 0xC]
|
||||
bl Free
|
||||
ldr r0, [r5]
|
||||
movs r4, 0
|
||||
str r4, [r0, 0xC]
|
||||
ldr r0, [r0, 0x4]
|
||||
bl Free
|
||||
ldr r0, [r5]
|
||||
str r4, [r0, 0x4]
|
||||
ldr r0, [r0]
|
||||
bl Free
|
||||
ldr r0, [r5]
|
||||
str r4, [r0]
|
||||
bl Free
|
||||
str r4, [r5]
|
||||
b _081BF228
|
||||
.pool
|
||||
_081BF224:
|
||||
bl EnableBothScriptContexts
|
||||
_081BF228:
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r7, 2
|
||||
adds r1, r7
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
_081BF238:
|
||||
add sp, 0x18
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF028
|
||||
|
||||
thumb_func_start sub_81BF248
|
||||
sub_81BF248: @ 81BF248
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
ldr r0, =gUnknown_0203CF0C
|
||||
ldr r0, [r0]
|
||||
ldrh r0, [r0, 0x10]
|
||||
cmp r0, 0xFF
|
||||
bls _081BF268
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r5, 0x1C]
|
||||
b _081BF2B0
|
||||
.pool
|
||||
_081BF268:
|
||||
ldrh r1, [r5, 0x22]
|
||||
movs r2, 0x22
|
||||
ldrsh r0, [r5, r2]
|
||||
cmp r0, 0x5F
|
||||
ble _081BF2AC
|
||||
movs r4, 0
|
||||
_081BF274:
|
||||
ldr r0, =gUnknown_0203CF0C
|
||||
ldr r3, [r0]
|
||||
ldr r0, [r3]
|
||||
ldrh r1, [r3, 0x10]
|
||||
adds r2, r1, 0x1
|
||||
strh r2, [r3, 0x10]
|
||||
lsls r1, 16
|
||||
ldr r2, [r3, 0xC]
|
||||
lsrs r1, 15
|
||||
adds r1, r2
|
||||
ldrh r1, [r1]
|
||||
movs r2, 0
|
||||
str r2, [sp]
|
||||
movs r3, 0x10
|
||||
bl sub_81BF2B8
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x1
|
||||
bls _081BF274
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAnim
|
||||
b _081BF2B0
|
||||
.pool
|
||||
_081BF2AC:
|
||||
adds r0, r1, 0x1
|
||||
strh r0, [r5, 0x22]
|
||||
_081BF2B0:
|
||||
add sp, 0x4
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81BF248
|
||||
|
||||
thumb_func_start sub_81BF2B8
|
||||
sub_81BF2B8: @ 81BF2B8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x8
|
||||
str r0, [sp]
|
||||
mov r10, r1
|
||||
adds r6, r2, 0
|
||||
mov r8, r3
|
||||
ldr r0, [sp, 0x28]
|
||||
mov r9, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
mov r10, r1
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
mov r0, r8
|
||||
lsls r0, 24
|
||||
mov r8, r0
|
||||
lsrs r7, r0, 24
|
||||
mov r1, r9
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r9, r1
|
||||
mov r0, r10
|
||||
adds r1, r7, 0
|
||||
bl __divsi3
|
||||
adds r5, r0, 0
|
||||
lsls r5, 24
|
||||
lsrs r4, r5, 24
|
||||
ldr r3, =gUnknown_030012A8
|
||||
strh r4, [r3]
|
||||
mov r0, r10
|
||||
adds r1, r7, 0
|
||||
str r3, [sp, 0x4]
|
||||
bl __modsi3
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
ldr r3, [sp, 0x4]
|
||||
strh r2, [r3, 0x2]
|
||||
movs r1, 0x7
|
||||
ands r4, r1
|
||||
ands r2, r1
|
||||
strh r4, [r3, 0x4]
|
||||
strh r2, [r3, 0x6]
|
||||
lsrs r0, 27
|
||||
lsrs r5, 27
|
||||
strh r0, [r3, 0x8]
|
||||
strh r5, [r3, 0xA]
|
||||
mov r1, r8
|
||||
lsrs r1, 27
|
||||
lsls r1, 6
|
||||
mov r8, r1
|
||||
mov r1, r8
|
||||
muls r1, r5
|
||||
lsls r0, 6
|
||||
adds r1, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
strh r1, [r3, 0xC]
|
||||
lsls r4, 3
|
||||
adds r4, r2
|
||||
adds r1, r4
|
||||
lsls r4, r1, 16
|
||||
lsrs r4, 17
|
||||
strh r1, [r3, 0xE]
|
||||
movs r1, 0x1
|
||||
mov r0, r10
|
||||
ands r1, r0
|
||||
movs r2, 0x1
|
||||
eors r1, r2
|
||||
lsls r0, r1, 2
|
||||
lsls r6, r0
|
||||
eors r1, r2
|
||||
lsls r1, 2
|
||||
movs r0, 0xF
|
||||
lsls r0, r1
|
||||
orrs r6, r0
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
mov r1, r9
|
||||
lsls r1, 5
|
||||
mov r9, r1
|
||||
add r9, r4
|
||||
ldr r1, [sp]
|
||||
add r1, r9
|
||||
ldrb r0, [r1]
|
||||
ands r6, r0
|
||||
strb r6, [r1]
|
||||
add sp, 0x8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81BF2B8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -1235,7 +1235,7 @@ _08173FD0:
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
ldr r2, =gUnknown_085E8C14
|
||||
ldr r2, =gText_LeagueChamp
|
||||
str r5, [sp]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0x4]
|
||||
@ -1858,14 +1858,14 @@ _0817454E:
|
||||
movs r3, 0x3
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r5, =gStringVar4
|
||||
ldr r1, =gUnknown_085E8C00
|
||||
ldr r1, =gText_HOFNumber
|
||||
adds r0, r5, 0
|
||||
bl StringExpandPlaceholders
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bgt _081745C0
|
||||
ldr r1, =gUnknown_085E8574
|
||||
ldr r1, =gText_PickCancel
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
@ -1875,7 +1875,7 @@ _0817454E:
|
||||
b _081745D0
|
||||
.pool
|
||||
_081745C0:
|
||||
ldr r1, =gUnknown_085E855C
|
||||
ldr r1, =gText_PickNextCancel
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
adds r0, r5, 0
|
||||
@ -2321,14 +2321,14 @@ sub_81749A0: @ 81749A0
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gUnknown_085E8588
|
||||
ldr r0, =gText_UnkCtrlF800Exit
|
||||
movs r1, 0x8
|
||||
movs r2, 0x1
|
||||
bl sub_8198180
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_81973C4
|
||||
ldr r2, =gUnknown_085E8BDC
|
||||
ldr r2, =gText_HOFCorrupted
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x2
|
||||
@ -2391,7 +2391,7 @@ sub_8174A38: @ 8174A38
|
||||
bl FillWindowPixelBuffer
|
||||
movs r0, 0
|
||||
bl PutWindowTilemap
|
||||
ldr r4, =gUnknown_085E8B3E
|
||||
ldr r4, =gText_WelcomeToHOF
|
||||
movs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
movs r2, 0xD0
|
||||
@ -2434,7 +2434,7 @@ sub_8174A88: @ 8174A88
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
beq _08174B30
|
||||
ldr r1, =gUnknown_085E8C36
|
||||
ldr r1, =gText_Number
|
||||
add r0, sp, 0xC
|
||||
bl StringCopy
|
||||
adds r6, r0, 0
|
||||
@ -2604,7 +2604,7 @@ _08174C0A:
|
||||
movs r2, 0x80
|
||||
movs r3, 0x1
|
||||
bl box_print
|
||||
ldr r1, =gUnknown_085E8C3B
|
||||
ldr r1, =gText_Level
|
||||
add r0, sp, 0xC
|
||||
bl StringCopy
|
||||
adds r6, r0, 0
|
||||
@ -2622,7 +2622,7 @@ _08174C0A:
|
||||
movs r2, 0x24
|
||||
movs r3, 0x11
|
||||
bl box_print
|
||||
ldr r1, =gUnknown_085E8C4D
|
||||
ldr r1, =gText_IDNumber
|
||||
add r0, sp, 0xC
|
||||
bl StringCopy
|
||||
adds r6, r0, 0
|
||||
@ -2675,7 +2675,7 @@ sub_8174C98: @ 8174C98
|
||||
negs r1, r1
|
||||
mov r9, r1
|
||||
str r1, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8C48
|
||||
ldr r0, =gText_Name
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
@ -2711,7 +2711,7 @@ sub_8174C98: @ 8174C98
|
||||
str r0, [sp]
|
||||
movs r7, 0
|
||||
str r7, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8C4D
|
||||
ldr r0, =gText_IDNumber
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
@ -2787,7 +2787,7 @@ sub_8174C98: @ 8174C98
|
||||
str r0, [sp]
|
||||
mov r1, r9
|
||||
str r1, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E84CE
|
||||
ldr r0, =gText_MainMenuTime
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
|
476
asm/international_string_util.s
Executable file
476
asm/international_string_util.s
Executable file
@ -0,0 +1,476 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start GetStringCenterAlignXOffset
|
||||
@ s32 GetStringCenterAlignXOffset(u8 fontId, u8 *str, s32 totalWidth)
|
||||
GetStringCenterAlignXOffset: @ 81DB35C
|
||||
push {lr}
|
||||
movs r3, 0
|
||||
bl GetStringCenterAlignXOffsetWithLetterSpacing
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetStringCenterAlignXOffset
|
||||
|
||||
thumb_func_start GetStringRightAlignXOffset
|
||||
@ s32 GetStringRightAlignXOffset(u8 fontId, u8 *str, s32 totalWidth)
|
||||
GetStringRightAlignXOffset: @ 81DB368
|
||||
push {lr}
|
||||
movs r3, 0
|
||||
bl GetStringWidthDifference
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetStringRightAlignXOffset
|
||||
|
||||
thumb_func_start GetStringCenterAlignXOffsetWithLetterSpacing
|
||||
@ s32 GetStringCenterAlignXOffsetWithLetterSpacing(u8 fontId, u8 *str, s32 totalWidth, s16 letterSpacing)
|
||||
GetStringCenterAlignXOffsetWithLetterSpacing: @ 81DB374
|
||||
push {lr}
|
||||
bl GetStringWidthDifference
|
||||
lsrs r1, r0, 31
|
||||
adds r0, r1
|
||||
asrs r0, 1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetStringCenterAlignXOffsetWithLetterSpacing
|
||||
|
||||
thumb_func_start GetStringWidthDifference
|
||||
@ s32 GetStringWidthDifference(u8 fontId, u8 *str, s32 totalWidth, s16 letterSpacing)
|
||||
GetStringWidthDifference: @ 81DB384
|
||||
push {r4,lr}
|
||||
adds r4, r2, 0
|
||||
adds r2, r3, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r2, 16
|
||||
asrs r2, 16
|
||||
bl GetStringWidth
|
||||
cmp r4, r0
|
||||
bgt _081DB39E
|
||||
movs r0, 0
|
||||
b _081DB3A0
|
||||
_081DB39E:
|
||||
subs r0, r4, r0
|
||||
_081DB3A0:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetStringWidthDifference
|
||||
|
||||
thumb_func_start GetMaxWidthInMenuTable
|
||||
GetMaxWidthInMenuTable: @ 81DB3A8
|
||||
push {r4-r6,lr}
|
||||
movs r6, 0
|
||||
cmp r6, r1
|
||||
bge _081DB3CC
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
_081DB3B4:
|
||||
ldr r1, [r5]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
cmp r0, r6
|
||||
ble _081DB3C4
|
||||
adds r6, r0, 0
|
||||
_081DB3C4:
|
||||
adds r5, 0x8
|
||||
subs r4, 0x1
|
||||
cmp r4, 0
|
||||
bne _081DB3B4
|
||||
_081DB3CC:
|
||||
adds r0, r6, 0
|
||||
bl convert_pixel_width_to_tile_width
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end GetMaxWidthInMenuTable
|
||||
|
||||
thumb_func_start sub_81DB3D8
|
||||
sub_81DB3D8: @ 81DB3D8
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
mov r8, r0
|
||||
adds r7, r1, 0
|
||||
adds r5, r2, 0
|
||||
movs r6, 0
|
||||
movs r4, 0
|
||||
cmp r6, r5
|
||||
bge _081DB40A
|
||||
_081DB3EC:
|
||||
adds r0, r7, r4
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 3
|
||||
add r0, r8
|
||||
ldr r1, [r0]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
cmp r0, r6
|
||||
ble _081DB404
|
||||
adds r6, r0, 0
|
||||
_081DB404:
|
||||
adds r4, 0x1
|
||||
cmp r4, r5
|
||||
blt _081DB3EC
|
||||
_081DB40A:
|
||||
adds r0, r6, 0
|
||||
bl convert_pixel_width_to_tile_width
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB3D8
|
||||
|
||||
thumb_func_start sub_81DB41C
|
||||
sub_81DB41C: @ 81DB41C
|
||||
push {r4-r7,lr}
|
||||
adds r4, r0, 0
|
||||
ldr r1, [r4]
|
||||
movs r7, 0
|
||||
movs r6, 0
|
||||
ldrh r0, [r4, 0xC]
|
||||
cmp r7, r0
|
||||
bge _081DB44C
|
||||
adds r5, r1, 0
|
||||
_081DB42E:
|
||||
ldrb r0, [r4, 0x17]
|
||||
lsls r0, 26
|
||||
lsrs r0, 26
|
||||
ldr r1, [r5]
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
cmp r0, r7
|
||||
ble _081DB442
|
||||
adds r7, r0, 0
|
||||
_081DB442:
|
||||
adds r5, 0x8
|
||||
adds r6, 0x1
|
||||
ldrh r0, [r4, 0xC]
|
||||
cmp r6, r0
|
||||
blt _081DB42E
|
||||
_081DB44C:
|
||||
ldrb r0, [r4, 0x12]
|
||||
adds r1, r7, r0
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x9
|
||||
cmp r0, 0
|
||||
bge _081DB45A
|
||||
adds r0, 0x7
|
||||
_081DB45A:
|
||||
asrs r0, 3
|
||||
cmp r0, 0x1C
|
||||
ble _081DB462
|
||||
movs r0, 0x1C
|
||||
_081DB462:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB41C
|
||||
|
||||
thumb_func_start sub_81DB468
|
||||
sub_81DB468: @ 81DB468
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
adds r0, r1, 0
|
||||
lsls r2, 5
|
||||
ldr r1, =gPokedexEntries
|
||||
adds r2, r1
|
||||
adds r1, r2, 0
|
||||
bl StringCopy
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
adds r0, 0x1
|
||||
ldr r1, =gText_Pokemon
|
||||
bl StringCopy
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DB468
|
||||
|
||||
thumb_func_start sub_81DB494
|
||||
sub_81DB494: @ 81DB494
|
||||
push {r4-r7,lr}
|
||||
adds r6, r1, 0
|
||||
adds r5, r2, 0
|
||||
adds r7, r3, 0
|
||||
cmp r5, 0
|
||||
beq _081DB4B6
|
||||
adds r1, r5, 0
|
||||
bl StringCopy
|
||||
adds r4, r0, 0
|
||||
lsls r0, r6, 24
|
||||
lsrs r0, 24
|
||||
adds r1, r5, 0
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
b _081DB4BA
|
||||
_081DB4B6:
|
||||
adds r4, r0, 0
|
||||
movs r0, 0
|
||||
_081DB4BA:
|
||||
subs r3, r7, r0
|
||||
cmp r3, 0
|
||||
ble _081DB4D4
|
||||
movs r0, 0xFC
|
||||
strb r0, [r4]
|
||||
adds r4, 0x1
|
||||
movs r0, 0x11
|
||||
strb r0, [r4]
|
||||
adds r4, 0x1
|
||||
strb r3, [r4]
|
||||
adds r4, 0x1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r4]
|
||||
_081DB4D4:
|
||||
adds r0, r4, 0
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB494
|
||||
|
||||
thumb_func_start sub_81DB4DC
|
||||
sub_81DB4DC: @ 81DB4DC
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r5, r1, 24
|
||||
bl StripExtCtrlCodes
|
||||
adds r0, r4, 0
|
||||
bl StringLength
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r5, 0xFC
|
||||
bne _081DB51A
|
||||
cmp r1, 0x5
|
||||
bhi _081DB51E
|
||||
movs r3, 0xFC
|
||||
movs r2, 0x7
|
||||
_081DB4FE:
|
||||
adds r0, r4, r1
|
||||
strb r3, [r0]
|
||||
strb r2, [r0, 0x1]
|
||||
adds r0, r1, 0x2
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0x5
|
||||
bls _081DB4FE
|
||||
b _081DB51E
|
||||
_081DB510:
|
||||
adds r0, r4, r1
|
||||
strb r5, [r0]
|
||||
adds r0, r1, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
_081DB51A:
|
||||
cmp r1, 0x5
|
||||
bls _081DB510
|
||||
_081DB51E:
|
||||
adds r1, r4, r1
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DB4DC
|
||||
|
||||
thumb_func_start sub_81DB52C
|
||||
sub_81DB52C: @ 81DB52C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl StringLength
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x5
|
||||
bhi _081DB546
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl ConvertInternationalString
|
||||
b _081DB54C
|
||||
_081DB546:
|
||||
adds r0, r4, 0
|
||||
bl StripExtCtrlCodes
|
||||
_081DB54C:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DB52C
|
||||
|
||||
thumb_func_start sub_81DB554
|
||||
sub_81DB554: @ 81DB554
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r5, r1, 24
|
||||
bl StringLength
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x5
|
||||
bhi _081DB572
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl ConvertInternationalString
|
||||
b _081DB5A4
|
||||
_081DB572:
|
||||
cmp r5, 0xFC
|
||||
bne _081DB57E
|
||||
adds r0, r4, 0
|
||||
bl StripExtCtrlCodes
|
||||
b _081DB5A4
|
||||
_081DB57E:
|
||||
adds r1, r4, 0
|
||||
b _081DB584
|
||||
_081DB582:
|
||||
adds r1, 0x1
|
||||
_081DB584:
|
||||
ldrb r0, [r1, 0x1]
|
||||
cmp r0, 0xFF
|
||||
bne _081DB582
|
||||
cmp r1, r4
|
||||
bcc _081DB5A4
|
||||
ldrb r0, [r1]
|
||||
cmp r0, r5
|
||||
bne _081DB5A4
|
||||
movs r2, 0xFF
|
||||
_081DB596:
|
||||
strb r2, [r1]
|
||||
subs r1, 0x1
|
||||
cmp r1, r4
|
||||
bcc _081DB5A4
|
||||
ldrb r0, [r1]
|
||||
cmp r0, r5
|
||||
beq _081DB596
|
||||
_081DB5A4:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DB554
|
||||
|
||||
thumb_func_start sub_81DB5AC
|
||||
sub_81DB5AC: @ 81DB5AC
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldrb r0, [r2]
|
||||
adds r2, 0x1
|
||||
cmp r0, 0xFC
|
||||
bne _081DB5E4
|
||||
ldrb r0, [r2]
|
||||
adds r2, 0x1
|
||||
cmp r0, 0x15
|
||||
bne _081DB5E4
|
||||
b _081DB5CE
|
||||
_081DB5C2:
|
||||
cmp r1, 0xFC
|
||||
bne _081DB5CC
|
||||
ldrb r0, [r2, 0x1]
|
||||
cmp r0, 0x16
|
||||
beq _081DB5E4
|
||||
_081DB5CC:
|
||||
adds r2, 0x1
|
||||
_081DB5CE:
|
||||
ldrb r1, [r2]
|
||||
adds r0, r1, 0
|
||||
cmp r0, 0xFF
|
||||
bne _081DB5C2
|
||||
movs r0, 0xFC
|
||||
strb r0, [r2]
|
||||
adds r2, 0x1
|
||||
movs r0, 0x16
|
||||
strb r0, [r2]
|
||||
movs r0, 0xFF
|
||||
strb r0, [r2, 0x1]
|
||||
_081DB5E4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DB5AC
|
||||
|
||||
thumb_func_start sub_81DB5E8
|
||||
sub_81DB5E8: @ 81DB5E8
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r2, 0
|
||||
bl StringCopy
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl ConvertInternationalString
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DB5E8
|
||||
|
||||
thumb_func_start sub_81DB604
|
||||
sub_81DB604: @ 81DB604
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0xFC
|
||||
bne _081DB618
|
||||
ldrb r0, [r1, 0x1]
|
||||
cmp r0, 0x15
|
||||
bne _081DB618
|
||||
movs r0, 0x1
|
||||
b _081DB61A
|
||||
_081DB618:
|
||||
movs r0, 0x2
|
||||
_081DB61A:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB604
|
||||
|
||||
thumb_func_start sub_81DB620
|
||||
sub_81DB620: @ 81DB620
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
lsls r4, r0, 1
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gWindows
|
||||
adds r4, r0
|
||||
lsls r7, r3, 5
|
||||
ldrb r0, [r4, 0x3]
|
||||
lsls r6, r0, 5
|
||||
muls r2, r6
|
||||
ldr r0, [r4, 0x8]
|
||||
adds r0, r2
|
||||
lsls r1, 5
|
||||
adds r5, r0, r1
|
||||
ldr r0, [sp, 0x18]
|
||||
cmp r0, 0
|
||||
ble _081DB66C
|
||||
adds r4, r0, 0
|
||||
_081DB646:
|
||||
ldr r0, =0x11111111
|
||||
str r0, [sp]
|
||||
adds r2, r7, 0
|
||||
cmp r2, 0
|
||||
bge _081DB652
|
||||
adds r2, 0x3
|
||||
_081DB652:
|
||||
lsls r2, 9
|
||||
lsrs r2, 11
|
||||
movs r0, 0x80
|
||||
lsls r0, 17
|
||||
orrs r2, r0
|
||||
mov r0, sp
|
||||
adds r1, r5, 0
|
||||
bl CpuFastSet
|
||||
adds r5, r6
|
||||
subs r4, 0x1
|
||||
cmp r4, 0
|
||||
bne _081DB646
|
||||
_081DB66C:
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DB620
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
468
asm/item_icon.s
Executable file
468
asm/item_icon.s
Executable file
@ -0,0 +1,468 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start AllocItemIconTemporaryBuffers
|
||||
@ bool8 AllocItemIconTemporaryBuffers()
|
||||
AllocItemIconTemporaryBuffers: @ 81AFDE4
|
||||
push {r4,r5,lr}
|
||||
ldr r5, =gUnknown_0203CEBC
|
||||
movs r0, 0x90
|
||||
lsls r0, 1
|
||||
bl Alloc
|
||||
str r0, [r5]
|
||||
cmp r0, 0
|
||||
beq _081AFE1A
|
||||
ldr r4, =gUnknown_0203CEC0
|
||||
movs r0, 0x80
|
||||
lsls r0, 2
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _081AFE14
|
||||
movs r0, 0x1
|
||||
b _081AFE1C
|
||||
.pool
|
||||
_081AFE14:
|
||||
ldr r0, [r5]
|
||||
bl Free
|
||||
_081AFE1A:
|
||||
movs r0, 0
|
||||
_081AFE1C:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end AllocItemIconTemporaryBuffers
|
||||
|
||||
thumb_func_start FreeItemIconTemporaryBuffers
|
||||
@ void FreeItemIconTemporaryBuffers()
|
||||
FreeItemIconTemporaryBuffers: @ 81AFE24
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_0203CEBC
|
||||
ldr r0, [r0]
|
||||
bl Free
|
||||
ldr r0, =gUnknown_0203CEC0
|
||||
ldr r0, [r0]
|
||||
bl Free
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end FreeItemIconTemporaryBuffers
|
||||
|
||||
thumb_func_start CopyItemIconPicTo4x4Buffer
|
||||
@ void CopyItemIconPicTo4x4Buffer(void *src, void *dest)
|
||||
CopyItemIconPicTo4x4Buffer: @ 81AFE44
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
adds r5, r1, 0
|
||||
movs r4, 0
|
||||
_081AFE4C:
|
||||
lsls r0, r4, 1
|
||||
adds r0, r4
|
||||
lsls r0, 5
|
||||
adds r0, r6, r0
|
||||
lsls r1, r4, 7
|
||||
adds r1, r5, r1
|
||||
movs r2, 0x30
|
||||
bl CpuSet
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x2
|
||||
bls _081AFE4C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end CopyItemIconPicTo4x4Buffer
|
||||
|
||||
thumb_func_start AddItemIconObject
|
||||
@ u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId)
|
||||
AddItemIconObject: @ 81AFE70
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x10
|
||||
lsls r0, 16
|
||||
lsrs r7, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r6, r1, 16
|
||||
lsls r2, 16
|
||||
lsrs r5, r2, 16
|
||||
bl AllocItemIconTemporaryBuffers
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081AFF28
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl GetItemIconPicOrPalette
|
||||
ldr r4, =gUnknown_0203CEBC
|
||||
ldr r1, [r4]
|
||||
bl LZDecompressWram
|
||||
ldr r0, [r4]
|
||||
ldr r4, =gUnknown_0203CEC0
|
||||
ldr r1, [r4]
|
||||
bl CopyItemIconPicTo4x4Buffer
|
||||
ldr r0, [r4]
|
||||
str r0, [sp]
|
||||
ldr r4, =0xffff0000
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r4
|
||||
movs r1, 0x80
|
||||
lsls r1, 2
|
||||
orrs r0, r1
|
||||
lsls r2, r7, 16
|
||||
ldr r1, =0x0000ffff
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
str r0, [sp, 0x4]
|
||||
mov r0, sp
|
||||
bl LoadSpriteSheet
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl GetItemIconPicOrPalette
|
||||
str r0, [sp, 0x8]
|
||||
add r0, sp, 0x8
|
||||
ldr r1, [r0, 0x4]
|
||||
ands r1, r4
|
||||
orrs r1, r6
|
||||
str r1, [r0, 0x4]
|
||||
bl LoadCompressedObjectPalette
|
||||
movs r0, 0x18
|
||||
bl Alloc
|
||||
adds r5, r0, 0
|
||||
ldr r0, =gUnknown_08614FF4
|
||||
adds r1, r5, 0
|
||||
movs r2, 0xC
|
||||
bl CpuSet
|
||||
strh r7, [r5]
|
||||
strh r6, [r5, 0x2]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl FreeItemIconTemporaryBuffers
|
||||
adds r0, r5, 0
|
||||
bl Free
|
||||
adds r0, r4, 0
|
||||
b _081AFF2A
|
||||
.pool
|
||||
_081AFF28:
|
||||
movs r0, 0x40
|
||||
_081AFF2A:
|
||||
add sp, 0x10
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end AddItemIconObject
|
||||
|
||||
thumb_func_start AddItemIconObjectWithCustomObjectTemplate
|
||||
@ u8 AddItemIconObjectWithCustomObjectTemplate(struct objtemplate *objectTemplate, u16 tilesTag, u16 paletteTag, u16 itemId)
|
||||
AddItemIconObjectWithCustomObjectTemplate: @ 81AFF34
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x10
|
||||
mov r8, r0
|
||||
lsls r1, 16
|
||||
lsrs r7, r1, 16
|
||||
lsls r2, 16
|
||||
lsrs r6, r2, 16
|
||||
lsls r3, 16
|
||||
lsrs r5, r3, 16
|
||||
bl AllocItemIconTemporaryBuffers
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081AFFEC
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl GetItemIconPicOrPalette
|
||||
ldr r4, =gUnknown_0203CEBC
|
||||
ldr r1, [r4]
|
||||
bl LZDecompressWram
|
||||
ldr r0, [r4]
|
||||
ldr r4, =gUnknown_0203CEC0
|
||||
ldr r1, [r4]
|
||||
bl CopyItemIconPicTo4x4Buffer
|
||||
ldr r0, [r4]
|
||||
str r0, [sp]
|
||||
ldr r4, =0xffff0000
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r4
|
||||
movs r1, 0x80
|
||||
lsls r1, 2
|
||||
orrs r0, r1
|
||||
lsls r2, r7, 16
|
||||
ldr r1, =0x0000ffff
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
str r0, [sp, 0x4]
|
||||
mov r0, sp
|
||||
bl LoadSpriteSheet
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
bl GetItemIconPicOrPalette
|
||||
str r0, [sp, 0x8]
|
||||
add r0, sp, 0x8
|
||||
ldr r1, [r0, 0x4]
|
||||
ands r1, r4
|
||||
orrs r1, r6
|
||||
str r1, [r0, 0x4]
|
||||
bl LoadCompressedObjectPalette
|
||||
movs r0, 0x18
|
||||
bl Alloc
|
||||
adds r5, r0, 0
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
movs r2, 0xC
|
||||
bl CpuSet
|
||||
strh r7, [r5]
|
||||
strh r6, [r5, 0x2]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl FreeItemIconTemporaryBuffers
|
||||
adds r0, r5, 0
|
||||
bl Free
|
||||
adds r0, r4, 0
|
||||
b _081AFFEE
|
||||
.pool
|
||||
_081AFFEC:
|
||||
movs r0, 0x40
|
||||
_081AFFEE:
|
||||
add sp, 0x10
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end AddItemIconObjectWithCustomObjectTemplate
|
||||
|
||||
thumb_func_start GetItemIconPicOrPalette
|
||||
@ u32 GetItemIconPicOrPalette(u16 itemId, u8 which)
|
||||
GetItemIconPicOrPalette: @ 81AFFFC
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r0, =0x0000ffff
|
||||
cmp r3, r0
|
||||
bne _081B0018
|
||||
ldr r3, =0x00000179
|
||||
b _081B0022
|
||||
.pool
|
||||
_081B0018:
|
||||
movs r0, 0xBC
|
||||
lsls r0, 1
|
||||
cmp r3, r0
|
||||
bls _081B0022
|
||||
movs r3, 0
|
||||
_081B0022:
|
||||
ldr r2, =gItemIconTable
|
||||
lsls r0, r1, 2
|
||||
lsls r1, r3, 3
|
||||
adds r0, r1
|
||||
adds r0, r2
|
||||
ldr r0, [r0]
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end GetItemIconPicOrPalette
|
||||
|
||||
thumb_func_start sub_81B0038
|
||||
sub_81B0038: @ 81B0038
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x4
|
||||
ldr r4, [sp, 0x24]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r9, r1
|
||||
lsls r2, 24
|
||||
lsrs r7, r2, 24
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
str r3, [sp]
|
||||
lsls r4, 24
|
||||
lsrs r6, r4, 24
|
||||
bl reset_brm
|
||||
ldr r0, =gUnknown_0203CEC4
|
||||
mov r10, r0
|
||||
movs r0, 0x8E
|
||||
lsls r0, 2
|
||||
bl Alloc
|
||||
adds r5, r0, 0
|
||||
mov r1, r10
|
||||
str r5, [r1]
|
||||
cmp r5, 0
|
||||
bne _081B0088
|
||||
ldr r0, [sp, 0x2C]
|
||||
bl SetMainCallback2
|
||||
b _081B0194
|
||||
.pool
|
||||
_081B0088:
|
||||
ldr r3, =gUnknown_0203CEC8
|
||||
movs r1, 0xF
|
||||
mov r4, r8
|
||||
ands r1, r4
|
||||
ldrb r2, [r3, 0x8]
|
||||
movs r0, 0x10
|
||||
negs r0, r0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r3, 0x8]
|
||||
ldr r0, [sp, 0x2C]
|
||||
str r0, [r3]
|
||||
movs r4, 0
|
||||
strb r7, [r3, 0xB]
|
||||
lsls r2, r6, 2
|
||||
ldrh r1, [r5, 0xA]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
strh r0, [r5, 0xA]
|
||||
ldr r0, [sp, 0x28]
|
||||
str r0, [r5]
|
||||
str r4, [r5, 0x4]
|
||||
ldrb r1, [r5, 0x8]
|
||||
movs r0, 0xF
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
strb r0, [r5, 0x8]
|
||||
mov r1, r10
|
||||
ldr r2, [r1]
|
||||
ldrh r0, [r2, 0x8]
|
||||
movs r4, 0xFE
|
||||
lsls r4, 3
|
||||
adds r1, r4, 0
|
||||
orrs r0, r1
|
||||
strh r0, [r2, 0x8]
|
||||
ldr r0, [r2, 0x8]
|
||||
movs r1, 0xFE
|
||||
lsls r1, 10
|
||||
orrs r0, r1
|
||||
str r0, [r2, 0x8]
|
||||
adds r6, r3, 0
|
||||
mov r5, r8
|
||||
cmp r5, 0x4
|
||||
bne _081B00F0
|
||||
ldrb r0, [r2, 0x8]
|
||||
movs r1, 0x1
|
||||
orrs r0, r1
|
||||
b _081B00F8
|
||||
.pool
|
||||
_081B00F0:
|
||||
ldrb r1, [r2, 0x8]
|
||||
movs r0, 0x2
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
_081B00F8:
|
||||
strb r0, [r2, 0x8]
|
||||
mov r0, r9
|
||||
cmp r0, 0xFF
|
||||
beq _081B0114
|
||||
movs r0, 0x3
|
||||
mov r1, r9
|
||||
ands r0, r1
|
||||
lsls r0, 4
|
||||
ldrb r2, [r6, 0x8]
|
||||
movs r1, 0x31
|
||||
negs r1, r1
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
strb r1, [r6, 0x8]
|
||||
_081B0114:
|
||||
movs r2, 0
|
||||
ldr r5, =gUnknown_0203CEC4
|
||||
movs r4, 0x86
|
||||
lsls r4, 2
|
||||
movs r3, 0
|
||||
_081B011E:
|
||||
ldr r0, [r5]
|
||||
lsls r1, r2, 1
|
||||
adds r0, r4
|
||||
adds r0, r1
|
||||
strh r3, [r0]
|
||||
adds r0, r2, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
cmp r2, 0xF
|
||||
bls _081B011E
|
||||
movs r2, 0
|
||||
ldr r4, =gUnknown_0203CEC4
|
||||
movs r3, 0xFF
|
||||
_081B0138:
|
||||
ldr r0, [r4]
|
||||
adds r0, 0xC
|
||||
adds r0, r2
|
||||
ldrb r1, [r0]
|
||||
orrs r1, r3
|
||||
strb r1, [r0]
|
||||
adds r0, r2, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
cmp r2, 0x2
|
||||
bls _081B0138
|
||||
ldr r4, [sp]
|
||||
cmp r4, 0
|
||||
bne _081B015C
|
||||
strb r4, [r6, 0x9]
|
||||
b _081B017E
|
||||
.pool
|
||||
_081B015C:
|
||||
adds r1, r6, 0
|
||||
movs r0, 0x9
|
||||
ldrsb r0, [r1, r0]
|
||||
cmp r0, 0x5
|
||||
bgt _081B017A
|
||||
adds r1, r0, 0
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
movs r1, 0xB
|
||||
bl GetMonData
|
||||
cmp r0, 0
|
||||
bne _081B017E
|
||||
_081B017A:
|
||||
movs r0, 0
|
||||
strb r0, [r6, 0x9]
|
||||
_081B017E:
|
||||
ldr r2, =gTextFlags
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x5
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
bl CalculatePlayerPartyCount
|
||||
ldr r0, =c2_811EBD0
|
||||
bl SetMainCallback2
|
||||
_081B0194:
|
||||
add sp, 0x4
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81B0038
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
6452
asm/item_menu.s
Executable file
6452
asm/item_menu.s
Executable file
File diff suppressed because it is too large
Load Diff
637
asm/item_menu_icons.s
Executable file
637
asm/item_menu_icons.s
Executable file
@ -0,0 +1,637 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start RemoveBagObject
|
||||
@ void RemoveBagObject(u8 a1)
|
||||
RemoveBagObject: @ 80D4CA8
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r2, =0x00000804
|
||||
adds r1, r4, r2
|
||||
ldr r0, [r0]
|
||||
adds r5, r0, r1
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0xFF
|
||||
beq _080D4CEE
|
||||
adds r4, 0x64
|
||||
adds r0, r4, 0
|
||||
bl FreeSpriteTilesByTag
|
||||
adds r0, r4, 0
|
||||
bl FreeSpritePaletteByTag
|
||||
ldrb r1, [r5]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r4, =gSprites
|
||||
adds r0, r4
|
||||
bl FreeSpriteOamMatrix
|
||||
ldrb r1, [r5]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4
|
||||
bl DestroySprite
|
||||
movs r0, 0xFF
|
||||
strb r0, [r5]
|
||||
_080D4CEE:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end RemoveBagObject
|
||||
|
||||
thumb_func_start AddBagVisualObject
|
||||
@ void AddBagVisualObject(u8 bagPocketId)
|
||||
AddBagVisualObject: @ 80D4D00
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r4, [r0]
|
||||
ldr r0, =0x00000804
|
||||
adds r4, r0
|
||||
ldr r0, =gUnknown_0857FB4C
|
||||
movs r1, 0x44
|
||||
movs r2, 0x42
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
strb r0, [r4]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl SetBagVisualPocketId
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end AddBagVisualObject
|
||||
|
||||
thumb_func_start SetBagVisualPocketId
|
||||
@ void SetBagVisualPocketId(u8 bagPocketId, bool8 isSwitchingPockets)
|
||||
SetBagVisualPocketId: @ 80D4D38
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
lsls r1, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r0, [r0]
|
||||
ldr r2, =0x00000804
|
||||
adds r0, r2
|
||||
ldrb r2, [r0]
|
||||
lsls r0, r2, 4
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
ldr r2, =gSprites
|
||||
adds r2, r0, r2
|
||||
cmp r1, 0
|
||||
beq _080D4D84
|
||||
ldr r0, =0x0000fffb
|
||||
strh r0, [r2, 0x26]
|
||||
ldr r0, =ObjectCB_BagVisualSwitchingPockets
|
||||
str r0, [r2, 0x1C]
|
||||
adds r0, r3, 0x1
|
||||
strh r0, [r2, 0x2E]
|
||||
adds r0, r2, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAnim
|
||||
b _080D4D90
|
||||
.pool
|
||||
_080D4D84:
|
||||
adds r1, r3, 0x1
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r2, 0
|
||||
bl StartSpriteAnim
|
||||
_080D4D90:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end SetBagVisualPocketId
|
||||
|
||||
thumb_func_start ObjectCB_BagVisualSwitchingPockets
|
||||
@ void ObjectCB_BagVisualSwitchingPockets(struct obj *object)
|
||||
ObjectCB_BagVisualSwitchingPockets: @ 80D4D94
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrh r1, [r4, 0x26]
|
||||
movs r2, 0x26
|
||||
ldrsh r0, [r4, r2]
|
||||
cmp r0, 0
|
||||
beq _080D4DA8
|
||||
adds r0, r1, 0x1
|
||||
strh r0, [r4, 0x26]
|
||||
b _080D4DB8
|
||||
_080D4DA8:
|
||||
ldrh r1, [r4, 0x2E]
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r4, 0
|
||||
bl StartSpriteAnim
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x1C]
|
||||
_080D4DB8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ObjectCB_BagVisualSwitchingPockets
|
||||
|
||||
thumb_func_start ShakeBagVisual
|
||||
@ void ShakeBagVisual()
|
||||
ShakeBagVisual: @ 80D4DC4
|
||||
push {r4,lr}
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00000804
|
||||
adds r0, r1
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r4, r0, r1
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x3F
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x20
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _080D4DF4
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAffineAnim
|
||||
ldr r0, =ObjectCB_ShakeBagVisual
|
||||
str r0, [r4, 0x1C]
|
||||
_080D4DF4:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ShakeBagVisual
|
||||
|
||||
thumb_func_start ObjectCB_ShakeBagVisual
|
||||
@ void ObjectCB_ShakeBagVisual(struct obj *object)
|
||||
ObjectCB_ShakeBagVisual: @ 80D4E0C
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
adds r0, 0x3F
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x20
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _080D4E28
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl StartSpriteAffineAnim
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x1C]
|
||||
_080D4E28:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ObjectCB_ShakeBagVisual
|
||||
|
||||
thumb_func_start AddSwitchPocketRotatingBallObject
|
||||
@ void AddSwitchPocketRotatingBallObject(u16 rotationDirection)
|
||||
AddSwitchPocketRotatingBallObject: @ 80D4E34
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r4, [r0]
|
||||
ldr r0, =0x00000805
|
||||
adds r4, r0
|
||||
ldr r0, =gUnknown_0857FBA0
|
||||
bl LoadSpriteSheet
|
||||
ldr r0, =gUnknown_0857FBA8
|
||||
bl LoadSpritePalette
|
||||
ldr r0, =gUnknown_0857FBB0
|
||||
movs r1, 0x10
|
||||
movs r2, 0x10
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
strb r0, [r4]
|
||||
ldr r2, =gSprites
|
||||
ldrb r1, [r4]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
strh r5, [r0, 0x2E]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end AddSwitchPocketRotatingBallObject
|
||||
|
||||
thumb_func_start update_switch_pocket_rotating_ball_coords
|
||||
@ void update_switch_pocket_rotating_ball_coords(struct obj *object)
|
||||
update_switch_pocket_rotating_ball_coords: @ 80D4E8C
|
||||
ldrh r2, [r0, 0x30]
|
||||
ldrh r1, [r0, 0x34]
|
||||
adds r1, 0x1
|
||||
movs r3, 0x1
|
||||
ands r1, r3
|
||||
subs r2, r1
|
||||
adds r1, r0, 0
|
||||
adds r1, 0x28
|
||||
strb r2, [r1]
|
||||
ldrh r2, [r0, 0x30]
|
||||
ldrh r1, [r0, 0x34]
|
||||
adds r1, 0x1
|
||||
ands r1, r3
|
||||
subs r2, r1
|
||||
adds r0, 0x29
|
||||
strb r2, [r0]
|
||||
bx lr
|
||||
thumb_func_end update_switch_pocket_rotating_ball_coords
|
||||
|
||||
thumb_func_start ObjectCB_SwitchPocketRotatingBallInit
|
||||
@ void ObjectCB_SwitchPocketRotatingBallInit(struct obj *object)
|
||||
ObjectCB_SwitchPocketRotatingBallInit: @ 80D4EB0
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrb r1, [r4, 0x1]
|
||||
movs r0, 0x4
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
movs r1, 0x1
|
||||
orrs r0, r1
|
||||
strb r0, [r4, 0x1]
|
||||
movs r0, 0x2E
|
||||
ldrsh r1, [r4, r0]
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r1, r0
|
||||
bne _080D4ED8
|
||||
ldr r0, =gUnknown_0857FB98
|
||||
b _080D4EDA
|
||||
.pool
|
||||
_080D4ED8:
|
||||
ldr r0, =gUnknown_0857FB9C
|
||||
_080D4EDA:
|
||||
str r0, [r4, 0x10]
|
||||
adds r0, r4, 0
|
||||
bl InitSpriteAffineAnim
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x28
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 24
|
||||
asrs r0, 24
|
||||
strh r0, [r4, 0x30]
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x29
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 24
|
||||
asrs r0, 24
|
||||
strh r0, [r4, 0x30]
|
||||
adds r0, r4, 0
|
||||
bl update_switch_pocket_rotating_ball_coords
|
||||
ldr r0, =ObjectCB_SwitchPocketRotatingBallContinue
|
||||
str r0, [r4, 0x1C]
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ObjectCB_SwitchPocketRotatingBallInit
|
||||
|
||||
thumb_func_start ObjectCB_SwitchPocketRotatingBallContinue
|
||||
@ void ObjectCB_SwitchPocketRotatingBallContinue(struct obj *object)
|
||||
ObjectCB_SwitchPocketRotatingBallContinue: @ 80D4F14
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrh r0, [r4, 0x34]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x34]
|
||||
adds r0, r4, 0
|
||||
bl update_switch_pocket_rotating_ball_coords
|
||||
movs r1, 0x34
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0x10
|
||||
bne _080D4F32
|
||||
movs r0, 0x1
|
||||
bl RemoveBagObject
|
||||
_080D4F32:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end ObjectCB_SwitchPocketRotatingBallContinue
|
||||
|
||||
thumb_func_start AddBagItemIconObject
|
||||
@ void AddBagItemIconObject(u16 itemId, u8 a2)
|
||||
AddBagItemIconObject: @ 80D4F38
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
lsls r1, 24
|
||||
lsrs r4, r1, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r2, =0x00000806
|
||||
adds r1, r4, r2
|
||||
ldr r0, [r0]
|
||||
adds r5, r0, r1
|
||||
ldrb r0, [r5]
|
||||
cmp r0, 0xFF
|
||||
bne _080D4F86
|
||||
adds r4, 0x66
|
||||
adds r0, r4, 0
|
||||
bl FreeSpriteTilesByTag
|
||||
adds r0, r4, 0
|
||||
bl FreeSpritePaletteByTag
|
||||
adds r0, r4, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r6, 0
|
||||
bl AddItemIconObject
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0x40
|
||||
beq _080D4F86
|
||||
strb r2, [r5]
|
||||
ldr r1, =gSprites
|
||||
lsls r0, r2, 4
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
movs r1, 0x18
|
||||
strh r1, [r0, 0x24]
|
||||
movs r1, 0x58
|
||||
strh r1, [r0, 0x26]
|
||||
_080D4F86:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end AddBagItemIconObject
|
||||
|
||||
thumb_func_start RemoveBagItemIconObject
|
||||
@ void RemoveBagItemIconObject(u8 a1)
|
||||
RemoveBagItemIconObject: @ 80D4F98
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
movs r1, 0x80
|
||||
lsls r1, 18
|
||||
adds r0, r1
|
||||
lsrs r0, 24
|
||||
bl RemoveBagObject
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end RemoveBagItemIconObject
|
||||
|
||||
thumb_func_start sub_80D4FAC
|
||||
sub_80D4FAC: @ 80D4FAC
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00000808
|
||||
adds r0, r1
|
||||
movs r1, 0x8
|
||||
bl sub_8122344
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D4FAC
|
||||
|
||||
thumb_func_start sub_80D4FC8
|
||||
sub_80D4FC8: @ 80D4FC8
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00000808
|
||||
adds r0, r1
|
||||
movs r1, 0x8
|
||||
bl sub_81223FC
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D4FC8
|
||||
|
||||
thumb_func_start sub_80D4FEC
|
||||
sub_80D4FEC: @ 80D4FEC
|
||||
push {lr}
|
||||
adds r3, r0, 0
|
||||
lsls r3, 24
|
||||
ldr r0, =gUnknown_0203CE54
|
||||
ldr r0, [r0]
|
||||
ldr r1, =0x00000808
|
||||
adds r0, r1
|
||||
lsrs r3, 4
|
||||
movs r1, 0x80
|
||||
lsls r1, 13
|
||||
adds r3, r1
|
||||
lsrs r3, 16
|
||||
movs r1, 0x88
|
||||
movs r2, 0x78
|
||||
bl sub_8122448
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D4FEC
|
||||
|
||||
thumb_func_start sub_80D5018
|
||||
sub_80D5018: @ 80D5018
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r6, r0, 0
|
||||
adds r4, r1, 0
|
||||
movs r2, 0x80
|
||||
lsls r2, 4
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl memset
|
||||
movs r0, 0x80
|
||||
lsls r0, 1
|
||||
adds r4, r0
|
||||
movs r7, 0
|
||||
_080D5036:
|
||||
adds r4, 0x20
|
||||
movs r5, 0
|
||||
adds r1, r7, 0x1
|
||||
mov r8, r1
|
||||
_080D503E:
|
||||
adds r0, r4, 0
|
||||
adds r1, r6, 0
|
||||
movs r2, 0x20
|
||||
bl memcpy
|
||||
adds r4, 0x20
|
||||
adds r6, 0x20
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0x5
|
||||
bls _080D503E
|
||||
cmp r7, 0x5
|
||||
beq _080D505C
|
||||
adds r4, 0x20
|
||||
_080D505C:
|
||||
mov r1, r8
|
||||
lsls r0, r1, 24
|
||||
lsrs r7, r0, 24
|
||||
cmp r7, 0x5
|
||||
bls _080D5036
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D5018
|
||||
|
||||
thumb_func_start sub_80D5070
|
||||
sub_80D5070: @ 80D5070
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r4, r0, 0
|
||||
cmp r4, 0x2A
|
||||
bne _080D5082
|
||||
bl IsEnigmaBerryValid
|
||||
_080D5082:
|
||||
ldr r5, =gBerryPicTable
|
||||
lsls r4, 3
|
||||
adds r0, r5, 0x4
|
||||
adds r0, r4, r0
|
||||
ldr r0, [r0]
|
||||
str r0, [sp]
|
||||
ldr r1, =0xffff0000
|
||||
ldr r0, [sp, 0x4]
|
||||
ands r0, r1
|
||||
ldr r1, =0x00007544
|
||||
orrs r0, r1
|
||||
str r0, [sp, 0x4]
|
||||
mov r0, sp
|
||||
bl LoadCompressedObjectPalette
|
||||
adds r4, r5
|
||||
ldr r0, [r4]
|
||||
ldr r4, =0x0201d000
|
||||
adds r1, r4, 0
|
||||
bl LZDecompressWram
|
||||
ldr r0, =0xfffff000
|
||||
adds r1, r4, r0
|
||||
adds r0, r4, 0
|
||||
bl sub_80D5018
|
||||
add sp, 0x8
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D5070
|
||||
|
||||
thumb_func_start sub_80D50D4
|
||||
sub_80D50D4: @ 80D50D4
|
||||
push {r4,r5,lr}
|
||||
adds r4, r1, 0
|
||||
adds r5, r2, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
bl sub_80D5070
|
||||
ldr r0, =gUnknown_0857FBEC
|
||||
lsls r4, 16
|
||||
asrs r4, 16
|
||||
lsls r5, 16
|
||||
asrs r5, 16
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D50D4
|
||||
|
||||
thumb_func_start sub_80D510C
|
||||
sub_80D510C: @ 80D510C
|
||||
push {lr}
|
||||
ldr r0, =0x00007544
|
||||
bl FreeSpritePaletteByTag
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D510C
|
||||
|
||||
thumb_func_start sub_80D511C
|
||||
sub_80D511C: @ 80D511C
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
adds r4, r0, 0
|
||||
adds r5, r1, 0
|
||||
adds r6, r2, 0
|
||||
mov r8, r3
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
mov r0, r8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
ldr r0, =0x00007544
|
||||
bl FreeSpritePaletteByTag
|
||||
adds r0, r4, 0
|
||||
bl sub_80D5070
|
||||
ldr r0, =gUnknown_0857FC7C
|
||||
adds r1, r5, 0
|
||||
adds r2, r6, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
adds r4, r1, 0
|
||||
mov r0, r8
|
||||
cmp r0, 0x1
|
||||
bne _080D5172
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAffineAnim
|
||||
_080D5172:
|
||||
adds r0, r4, 0
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D511C
|
||||
|
||||
thumb_func_start sub_80D518C
|
||||
sub_80D518C: @ 80D518C
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
ldr r0, =gUnknown_0857FE10
|
||||
lsls r1, 16
|
||||
asrs r1, 16
|
||||
movs r2, 0x74
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D518C
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -157,7 +157,7 @@ DisplayCannotUseItemMessage: @ 80FD164
|
||||
b _080FD1BE
|
||||
.pool
|
||||
_080FD1A0:
|
||||
ldr r1, =gUnknown_085E8F31
|
||||
ldr r1, =gText_DadsAdvice
|
||||
ldr r2, =sub_81C6714
|
||||
adds r0, r5, 0
|
||||
bl DisplayItemMessageInBattlePyramid
|
||||
@ -183,7 +183,7 @@ DisplayDadsAdviceCannotUseItemMessage: @ 80FD1C8
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r2, =gUnknown_085E8F31
|
||||
ldr r2, =gText_DadsAdvice
|
||||
bl DisplayCannotUseItemMessage
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -198,7 +198,7 @@ DisplayCannotDismountBikeMessage: @ 80FD1E0
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r2, =gUnknown_085E8F6E
|
||||
ldr r2, =gText_CantDismountBike
|
||||
bl DisplayCannotUseItemMessage
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -571,7 +571,7 @@ ItemUseOnFieldCB_Itemfinder: @ 80FD4B8
|
||||
b _080FD4F6
|
||||
.pool
|
||||
_080FD4EC:
|
||||
ldr r1, =gUnknown_085E9002
|
||||
ldr r1, =gText_ItemFinderNothing
|
||||
ldr r2, =sub_80FD5CC
|
||||
adds r0, r4, 0
|
||||
bl DisplayItemMessageOnField
|
||||
@ -1363,7 +1363,7 @@ sub_80FDA94: @ 80FDA94
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _080FDACA
|
||||
ldr r1, =gUnknown_085E8F93
|
||||
ldr r1, =gText_ItemFinderNearby
|
||||
ldr r2, =sub_80FD5CC
|
||||
adds r0, r4, 0
|
||||
bl DisplayItemMessageOnField
|
||||
@ -1427,7 +1427,7 @@ _080FDB1C:
|
||||
asrs r0, 16
|
||||
cmp r0, 0x4
|
||||
bne _080FDB50
|
||||
ldr r1, =gUnknown_085E8FDB
|
||||
ldr r1, =gText_ItemFinderOnTop
|
||||
ldr r2, =sub_80FD5CC
|
||||
adds r0, r5, 0
|
||||
bl DisplayItemMessageOnField
|
||||
@ -1542,7 +1542,7 @@ ItemUseOutOfBattle_CoinCase: @ 80FDC34
|
||||
movs r3, 0x4
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E9026
|
||||
ldr r1, =gText_CoinCase
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
ldr r1, =gTasks
|
||||
@ -1586,7 +1586,7 @@ ItemUseOutOfBattle_PowderJar: @ 80FDCA4
|
||||
movs r3, 0x5
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E9138
|
||||
ldr r1, =gText_PowderQty
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
ldr r1, =gTasks
|
||||
@ -1892,7 +1892,7 @@ ItemUseOutOfBattle_TMHM: @ 80FDF48
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
bls _080FDF74
|
||||
ldr r2, =gUnknown_085E9047
|
||||
ldr r2, =gText_BootedUpHM
|
||||
ldr r3, =sub_80FDF90
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
@ -1900,7 +1900,7 @@ ItemUseOutOfBattle_TMHM: @ 80FDF48
|
||||
b _080FDF80
|
||||
.pool
|
||||
_080FDF74:
|
||||
ldr r2, =gUnknown_085E9037
|
||||
ldr r2, =gText_BootedUpTM
|
||||
ldr r3, =sub_80FDF90
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
@ -1957,7 +1957,7 @@ task08_0809AD8C: @ 80FDFBC
|
||||
adds r0, r4, 0
|
||||
bl StringCopy
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E9058
|
||||
ldr r1, =gText_TMHMContainedVar1
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
ldr r3, =sub_80FE024
|
||||
@ -2010,7 +2010,7 @@ sub_80FE058: @ 80FE058
|
||||
ldr r1, =gStringVar2
|
||||
bl CopyItemName
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_085E9080
|
||||
ldr r1, =gText_PlayerUsedVar2
|
||||
bl StringExpandPlaceholders
|
||||
bl InBattlePyramid
|
||||
lsls r0, 24
|
||||
@ -2062,7 +2062,7 @@ _080FE0EC:
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080FE10C
|
||||
ldr r2, =gUnknown_085E9092
|
||||
ldr r2, =gText_RepelEffectsLingered
|
||||
ldr r3, =bag_menu_inits_lists_menu
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
@ -2070,7 +2070,7 @@ _080FE0EC:
|
||||
b _080FE116
|
||||
.pool
|
||||
_080FE10C:
|
||||
ldr r1, =gUnknown_085E9092
|
||||
ldr r1, =gText_RepelEffectsLingered
|
||||
ldr r2, =sub_81C6714
|
||||
adds r0, r5, 0
|
||||
bl DisplayItemMessageInBattlePyramid
|
||||
@ -2217,7 +2217,7 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234
|
||||
ldr r0, =0x000008ae
|
||||
bl FlagReset
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_085E90C6
|
||||
ldr r1, =gText_UsedVar2WildLured
|
||||
bl StringExpandPlaceholders
|
||||
b _080FE28C
|
||||
.pool
|
||||
@ -2227,7 +2227,7 @@ _080FE278:
|
||||
ldr r0, =0x000008ad
|
||||
bl FlagReset
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_085E90F4
|
||||
ldr r1, =gText_UsedVar2WildRepelled
|
||||
bl StringExpandPlaceholders
|
||||
_080FE28C:
|
||||
ldr r1, =gTasks
|
||||
@ -2382,7 +2382,7 @@ _080FE3D0:
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080FE3F0
|
||||
ldr r2, =gUnknown_085E9125
|
||||
ldr r2, =gText_BoxFull
|
||||
ldr r3, =bag_menu_inits_lists_menu
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
@ -2390,7 +2390,7 @@ _080FE3D0:
|
||||
b _080FE3FA
|
||||
.pool
|
||||
_080FE3F0:
|
||||
ldr r1, =gUnknown_085E9125
|
||||
ldr r1, =gText_BoxFull
|
||||
ldr r2, =sub_81C6714
|
||||
adds r0, r5, 0
|
||||
bl DisplayItemMessageInBattlePyramid
|
||||
|
1646
asm/learn_move.s
Executable file
1646
asm/learn_move.s
Executable file
File diff suppressed because it is too large
Load Diff
136
asm/link.s
136
asm/link.s
@ -57,12 +57,12 @@ sub_8009414: @ 8009414
|
||||
lsrs r7, r3, 24
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
ldr r0, =gUnknown_082ECF20
|
||||
ldr r0, =gLinkTestDigitsPal
|
||||
lsls r1, r5, 4
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r3, =0x040000d4
|
||||
ldr r0, =gUnknown_082ECF40
|
||||
ldr r0, =gLinkTestDigitsGfx
|
||||
str r0, [r3]
|
||||
lsls r2, r7, 14
|
||||
lsls r0, r4, 5
|
||||
@ -158,13 +158,13 @@ sub_80094EC: @ 80094EC
|
||||
lsrs r4, 24
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
ldr r0, =gUnknown_082ECF20
|
||||
ldr r0, =gLinkTestDigitsPal
|
||||
mov r2, r8
|
||||
lsls r1, r2, 4
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r2, =0x040000d4
|
||||
ldr r0, =gUnknown_082ECF40
|
||||
ldr r0, =gLinkTestDigitsGfx
|
||||
str r0, [r2]
|
||||
lsls r0, r5, 14
|
||||
movs r1, 0xC0
|
||||
@ -866,7 +866,7 @@ _08009B68:
|
||||
stm r2!, {r3,r6,r7}
|
||||
ldr r1, [r1]
|
||||
str r1, [r2]
|
||||
ldr r4, =gUnknown_082ED1D4
|
||||
ldr r4, =gASCIIGameFreakInc
|
||||
adds r2, r0, 0
|
||||
adds r1, r4, 0
|
||||
ldm r1!, {r5-r7}
|
||||
@ -1025,7 +1025,7 @@ _08009C70:
|
||||
_08009CCA:
|
||||
adds r0, r2, 0
|
||||
bl sub_800B524
|
||||
ldr r5, =gUnknown_082ED1D4
|
||||
ldr r5, =gASCIIGameFreakInc
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
bl strcmp
|
||||
@ -2521,7 +2521,7 @@ _0800A838:
|
||||
task00_link_test: @ 800A850
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x20
|
||||
ldr r1, =gUnknown_082ED1E4
|
||||
ldr r1, =gASCIITestPrint
|
||||
mov r0, sp
|
||||
bl strcpy
|
||||
mov r0, sp
|
||||
@ -3450,26 +3450,26 @@ _0800B03C:
|
||||
sub_800B080: @ 800B080
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0xC
|
||||
ldr r1, =gUnknown_082ED168
|
||||
ldr r1, =g2BlankTilesGfx
|
||||
movs r0, 0
|
||||
movs r2, 0x20
|
||||
movs r3, 0
|
||||
bl LoadBgTiles
|
||||
ldr r1, =gUnknown_082EC88C
|
||||
ldr r1, =gWirelessLinkDisplayGfx
|
||||
movs r5, 0
|
||||
str r5, [sp]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl copy_decompressed_tile_data_to_vram_autofree
|
||||
ldr r1, =gUnknown_082ECD34
|
||||
ldr r1, =gWirelessLinkDisplayTilemap
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBuffer
|
||||
movs r0, 0x1
|
||||
bl CopyBgTilemapBufferToVram
|
||||
ldr r0, =gUnknown_082EC86C
|
||||
ldr r0, =gWirelessLinkDisplayPal
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
@ -3519,7 +3519,7 @@ sub_800B080: @ 800B080
|
||||
sub_800B138: @ 800B138
|
||||
push {lr}
|
||||
sub sp, 0xC
|
||||
ldr r1, =gUnknown_082ED168
|
||||
ldr r1, =g2BlankTilesGfx
|
||||
movs r0, 0
|
||||
movs r2, 0x20
|
||||
movs r3, 0
|
||||
@ -3781,7 +3781,7 @@ sub_800B348: @ 800B348
|
||||
stm r2!, {r3,r4,r6}
|
||||
ldr r0, [r0]
|
||||
str r0, [r2]
|
||||
ldr r3, =gUnknown_082ED1D4
|
||||
ldr r3, =gASCIIGameFreakInc
|
||||
adds r2, r1, 0
|
||||
adds r0, r3, 0
|
||||
ldm r0!, {r4-r6}
|
||||
@ -3831,7 +3831,7 @@ sub_800B3A4: @ 800B3A4
|
||||
str r0, [r1]
|
||||
adds r0, r2, 0
|
||||
bl sub_800B524
|
||||
ldr r5, =gUnknown_082ED1D4
|
||||
ldr r5, =gASCIIGameFreakInc
|
||||
adds r0, r4, 0
|
||||
adds r1, r5, 0
|
||||
bl strcmp
|
||||
@ -17895,7 +17895,7 @@ sub_80125BC: @ 80125BC
|
||||
movs r1, 0x1
|
||||
movs r3, 0
|
||||
bl sub_80173E0
|
||||
ldr r1, =gUnknown_082ED8CC
|
||||
ldr r1, =gText_UnkCtrlCodeF907
|
||||
add r0, sp, 0x8
|
||||
bl StringCopy
|
||||
adds r5, r0, 0
|
||||
@ -17973,7 +17973,7 @@ _08012648:
|
||||
.4byte _080126B8
|
||||
_080126B8:
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_082ED960
|
||||
ldr r1, =gText_AwaitingCommunication
|
||||
bl StringExpandPlaceholders
|
||||
_080126C0:
|
||||
pop {r0}
|
||||
@ -18294,13 +18294,13 @@ _080129C8:
|
||||
cmp r0, 0
|
||||
beq _08012A18
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_082ED990
|
||||
ldr r1, =gText_AwaitingLink
|
||||
bl StringExpandPlaceholders
|
||||
b _08012A34
|
||||
.pool
|
||||
_08012A18:
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_082ED960
|
||||
ldr r1, =gText_AwaitingCommunication
|
||||
bl StringExpandPlaceholders
|
||||
b _08012A34
|
||||
.pool
|
||||
@ -22289,7 +22289,7 @@ _08014E16:
|
||||
_08014E4E:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0xD
|
||||
ldr r1, =gUnknown_082ED8D0
|
||||
ldr r1, =gText_PleaseStartOver
|
||||
bl mevent_0814257C
|
||||
cmp r0, 0
|
||||
beq _08014EF2
|
||||
@ -22719,7 +22719,7 @@ _0801523A:
|
||||
.pool
|
||||
_08015260:
|
||||
bl sub_800E084
|
||||
ldr r0, =gUnknown_082ED8D0
|
||||
ldr r0, =gText_PleaseStartOver
|
||||
bl sub_8018884
|
||||
_0801526A:
|
||||
adds r0, r6, 0
|
||||
@ -23078,7 +23078,7 @@ _0801559A:
|
||||
_080155A8:
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x9
|
||||
ldr r1, =gUnknown_082ED8F8
|
||||
ldr r1, =gText_WirelessSearchCanceled
|
||||
b _080155C2
|
||||
.pool
|
||||
_080155B4:
|
||||
@ -27066,7 +27066,7 @@ sub_80177B8: @ 80177B8
|
||||
movs r2, 0x2
|
||||
movs r3, 0x2
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r1, =gUnknown_082ED8C8
|
||||
ldr r1, =gText_Colon
|
||||
adds r0, r5, 0
|
||||
bl StringAppend
|
||||
str r7, [sp]
|
||||
@ -27111,7 +27111,7 @@ sub_80177B8: @ 80177B8
|
||||
movs r2, 0x2
|
||||
movs r3, 0x5
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r1, =gUnknown_082ED8CC
|
||||
ldr r1, =gText_UnkCtrlCodeF907
|
||||
adds r0, r5, 0
|
||||
bl StringCopy
|
||||
adds r0, r5, 0
|
||||
@ -27186,7 +27186,7 @@ sub_80178A0: @ 80178A0
|
||||
movs r2, 0x2
|
||||
movs r3, 0x5
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r1, =gUnknown_082ED8CC
|
||||
ldr r1, =gText_UnkCtrlCodeF907
|
||||
adds r0, r4, 0
|
||||
bl StringCopy
|
||||
adds r0, r4, 0
|
||||
@ -28719,7 +28719,7 @@ _08018482:
|
||||
b _08018610
|
||||
.pool
|
||||
_08018574:
|
||||
ldr r0, =gUnknown_082F0548
|
||||
ldr r0, =gUnkTextboxBorderPal
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
@ -31126,7 +31126,7 @@ bgid_upload_textbox_1: @ 8019938
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_082F0568
|
||||
ldr r1, =gUnkTextboxBorderGfx
|
||||
movs r2, 0x80
|
||||
lsls r2, 1
|
||||
movs r3, 0
|
||||
@ -32602,14 +32602,14 @@ sub_801A43C: @ 801A43C
|
||||
adds r1, r0, 0
|
||||
movs r0, 0
|
||||
bl SetBgTilemapBuffer
|
||||
ldr r1, =gUnknown_082F0990
|
||||
ldr r1, =gWirelessInfoScreenGfx
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl copy_decompressed_tile_data_to_vram_autofree
|
||||
ldr r1, =gUnknown_082F0BA0
|
||||
ldr r1, =gWirelessInfoScreenTilemap
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
@ -32653,7 +32653,7 @@ sub_801A43C: @ 801A43C
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
ldr r0, =gUnknown_082F0790
|
||||
ldr r0, =gWirelessInfoScreenPal
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
@ -32738,7 +32738,7 @@ _0801A5E4:
|
||||
ldrsh r0, [r1, r2]
|
||||
adds r0, 0x2
|
||||
lsls r0, 5
|
||||
ldr r1, =gUnknown_082F0790
|
||||
ldr r1, =gWirelessInfoScreenPal
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
movs r2, 0x10
|
||||
@ -44323,7 +44323,7 @@ _080202AC:
|
||||
movs r1, 0x1
|
||||
negs r1, r1
|
||||
str r1, [sp, 0x4]
|
||||
ldr r0, =gUnknown_082F2DC4
|
||||
ldr r0, =gText_Ellipsis
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
@ -45129,7 +45129,7 @@ sub_80209AC: @ 80209AC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 2
|
||||
ldr r0, =gUnknown_082F2DF2
|
||||
ldr r0, =gUnknown_082F2DF0+2
|
||||
adds r4, r0
|
||||
movs r0, 0
|
||||
bl IndexOfSpritePaletteTag
|
||||
@ -46151,17 +46151,17 @@ _0802121C:
|
||||
lsls r2, 1
|
||||
movs r1, 0
|
||||
bl LoadPalette
|
||||
ldr r1, =gUnknown_082F3C8C
|
||||
ldr r1, =gBerryCrushGrinderTopTilemap
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBuffer
|
||||
ldr r1, =gUnknown_082F3DBC
|
||||
ldr r1, =gBerryCrushContainerCapTilemap
|
||||
movs r0, 0x2
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBuffer
|
||||
ldr r1, =gUnknown_082F3F54
|
||||
ldr r1, =gBerryCrushBackgroundTilemap
|
||||
movs r0, 0x3
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
@ -46800,7 +46800,7 @@ _0802175A:
|
||||
asrs r0, 24
|
||||
strh r0, [r2, 0x24]
|
||||
ldr r2, [r3]
|
||||
ldr r3, =gUnknown_082F41CD
|
||||
ldr r3, =gUnknown_082F41CC+1
|
||||
adds r1, r3
|
||||
movs r0, 0
|
||||
ldrsb r0, [r1, r0]
|
||||
@ -46860,7 +46860,7 @@ _080217E8:
|
||||
ldr r0, =sub_8022B28
|
||||
str r0, [r2, 0x1C]
|
||||
lsls r1, r4, 1
|
||||
ldr r3, =gUnknown_082F41D2
|
||||
ldr r3, =gUnknown_082F41CC+6
|
||||
adds r0, r1, r3
|
||||
movs r4, 0
|
||||
ldrsb r4, [r0, r4]
|
||||
@ -46868,7 +46868,7 @@ _080217E8:
|
||||
adds r0, 0x78
|
||||
strh r0, [r2, 0x20]
|
||||
ldr r2, [r7]
|
||||
ldr r0, =gUnknown_082F41D3
|
||||
ldr r0, =gUnknown_082F41CC+7
|
||||
adds r1, r0
|
||||
movs r6, 0
|
||||
ldrsb r6, [r1, r6]
|
||||
@ -48771,7 +48771,7 @@ _080227AA:
|
||||
bcc _080227AA
|
||||
_08022822:
|
||||
movs r5, 0
|
||||
ldr r4, =gUnknown_082F41D2
|
||||
ldr r4, =gUnknown_082F41CC+6
|
||||
adds r7, r4, 0x1
|
||||
_08022828:
|
||||
lsls r2, r5, 1
|
||||
@ -56589,7 +56589,7 @@ _08026676:
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bhi _080266D4
|
||||
ldr r0, =gUnknown_082F45AF
|
||||
ldr r0, =gUnknown_082F449C+0x113
|
||||
lsls r1, r4, 1
|
||||
adds r1, r4
|
||||
adds r1, r7, r1
|
||||
@ -56625,7 +56625,7 @@ _080266D0:
|
||||
movs r0, 0x1
|
||||
b _0802670C
|
||||
_080266D4:
|
||||
ldr r0, =gUnknown_082F45AF
|
||||
ldr r0, =gUnknown_082F449C+0x113
|
||||
lsls r1, r4, 1
|
||||
adds r1, r4
|
||||
adds r1, r7, r1
|
||||
@ -57508,7 +57508,7 @@ _08026D76:
|
||||
sub_8026D8C: @ 8026D8C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r3, =gUnknown_082F4648
|
||||
ldr r3, =gUnknown_082F449C+0x1AC
|
||||
ldr r1, =gUnknown_02022C98
|
||||
ldr r1, [r1]
|
||||
adds r1, 0x24
|
||||
@ -57539,7 +57539,7 @@ sub_8026DB0: @ 8026DB0
|
||||
subs r2, 0x1
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
ldr r3, =gUnknown_082F45FA
|
||||
ldr r3, =gUnknown_082F449C+0x15E
|
||||
lsls r1, r0, 1
|
||||
adds r1, r0
|
||||
lsls r0, r2, 4
|
||||
@ -57556,7 +57556,7 @@ sub_8026DB0: @ 8026DB0
|
||||
ldrb r1, [r1]
|
||||
mov r8, r1
|
||||
movs r3, 0
|
||||
ldr r1, =gUnknown_082F467F
|
||||
ldr r1, =gUnknown_082F449C+0x1E3
|
||||
lsls r0, r2, 2
|
||||
adds r2, r0, r2
|
||||
adds r0, r2, r1
|
||||
@ -60392,7 +60392,7 @@ sub_80283A8: @ 80283A8
|
||||
ldr r0, [r0]
|
||||
str r0, [sp, 0x10]
|
||||
str r1, [sp, 0x14]
|
||||
ldr r0, =gUnknown_082F98BC
|
||||
ldr r0, =gDodrioBerryPkmnGfx
|
||||
adds r1, r4, 0
|
||||
bl LZ77UnCompWram
|
||||
cmp r4, 0
|
||||
@ -60848,7 +60848,7 @@ sub_8028734: @ 8028734
|
||||
ldr r0, [r0]
|
||||
str r0, [sp, 0x20]
|
||||
str r1, [sp, 0x24]
|
||||
ldr r0, =gUnknown_082F96E0
|
||||
ldr r0, =gDodrioBerryStatusGfx
|
||||
adds r1, r6, 0
|
||||
bl LZ77UnCompWram
|
||||
cmp r6, 0
|
||||
@ -61225,7 +61225,7 @@ sub_8028A34: @ 8028A34
|
||||
ldr r0, [r0]
|
||||
str r0, [sp, 0x8]
|
||||
str r1, [sp, 0xC]
|
||||
ldr r0, =gUnknown_082F7EB0
|
||||
ldr r0, =gDodrioBerrySpritesGfx
|
||||
adds r1, r4, 0
|
||||
bl LZ77UnCompWram
|
||||
cmp r4, 0
|
||||
@ -61611,7 +61611,7 @@ sub_8028D44: @ 8028D44
|
||||
ldr r0, [r0]
|
||||
str r0, [sp, 0x20]
|
||||
str r1, [sp, 0x24]
|
||||
ldr r0, =gUnknown_082F9774
|
||||
ldr r0, =gDodrioBerryPlatformGfx
|
||||
adds r1, r6, 0
|
||||
bl LZ77UnCompWram
|
||||
cmp r6, 0
|
||||
@ -62386,17 +62386,17 @@ _0802937A:
|
||||
b _0802941C
|
||||
.pool
|
||||
_08029394:
|
||||
ldr r1, =gUnknown_082FAAD8
|
||||
ldr r1, =gDodrioBerryBgTilemap1
|
||||
movs r0, 0x3
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBuffer
|
||||
ldr r1, =gUnknown_082FAF94
|
||||
ldr r1, =gDodrioBerryBgTilemap2Left
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBuffer
|
||||
ldr r1, =gUnknown_082FAD44
|
||||
ldr r1, =gDodrioBerryBgTilemap2Right
|
||||
movs r0, 0x2
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
@ -63848,7 +63848,7 @@ _0802A0CC:
|
||||
ldr r0, [r7]
|
||||
add r0, r10
|
||||
ldrb r0, [r0]
|
||||
ldr r2, =gUnknown_085E8D60
|
||||
ldr r2, =gText_SelectorArrow2
|
||||
str r6, [sp]
|
||||
mov r3, r9
|
||||
str r3, [sp, 0x4]
|
||||
@ -63940,7 +63940,7 @@ _0802A1DC:
|
||||
ldr r0, [r7]
|
||||
add r0, r8
|
||||
ldrb r0, [r0]
|
||||
ldr r2, =gUnknown_085E8D60
|
||||
ldr r2, =gText_SelectorArrow2
|
||||
subs r1, r5, 0x1
|
||||
lsls r1, 4
|
||||
adds r1, 0x1
|
||||
@ -64749,7 +64749,7 @@ _0802A910:
|
||||
.4byte _0802A964
|
||||
.4byte _0802A972
|
||||
_0802A928:
|
||||
ldr r0, =gUnknown_082F7DF0
|
||||
ldr r0, =gDodrioBerryBgPal1
|
||||
movs r1, 0
|
||||
movs r2, 0x40
|
||||
bl LoadPalette
|
||||
@ -64759,14 +64759,14 @@ _0802A938:
|
||||
bl reset_temp_tile_data_buffers
|
||||
b _0802A98A
|
||||
_0802A93E:
|
||||
ldr r1, =gUnknown_082F8084
|
||||
ldr r1, =gDodrioBerryBgGfx1
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x3
|
||||
b _0802A954
|
||||
.pool
|
||||
_0802A94C:
|
||||
ldr r1, =gUnknown_082F8914
|
||||
ldr r1, =gDodrioBerryBgGfx2
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r0, 0x1
|
||||
@ -64995,7 +64995,7 @@ sub_802AB20: @ 802AB20
|
||||
ldr r7, =gUnknown_02022CFC
|
||||
movs r6, 0
|
||||
movs r5, 0
|
||||
ldr r0, =gUnknown_082FB464
|
||||
ldr r0, =gPkmnJumpSpecies
|
||||
mov r8, r0
|
||||
movs r4, 0x4
|
||||
_0802AB32:
|
||||
@ -65091,7 +65091,7 @@ sub_802AC00: @ 802AC00
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
movs r1, 0
|
||||
ldr r2, =gUnknown_082FB464
|
||||
ldr r2, =gPkmnJumpSpecies
|
||||
_0802AC0A:
|
||||
ldrh r0, [r2]
|
||||
cmp r0, r3
|
||||
@ -69939,56 +69939,56 @@ _0802D178:
|
||||
ldr r0, [r6]
|
||||
bl sub_802C974
|
||||
bl sub_802DD08
|
||||
ldr r0, =gUnknown_082FC044
|
||||
ldr r0, =gPkmnJumpBgPal
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r1, =gUnknown_082FC064
|
||||
ldr r1, =gPkmnJumpBgGfx
|
||||
str r5, [sp]
|
||||
movs r0, 0x3
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r1, =gUnknown_082FC290
|
||||
ldr r1, =gPkmnJumpBgTilemap
|
||||
movs r4, 0x1
|
||||
str r4, [sp]
|
||||
movs r0, 0x3
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r0, =gUnknown_082FC440
|
||||
ldr r0, =gPkmnJumpVenusaurPal
|
||||
movs r1, 0x30
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r1, =gUnknown_082FC460
|
||||
ldr r1, =gPkmnJumpVenusaurGfx
|
||||
str r5, [sp]
|
||||
movs r0, 0x2
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r1, =gUnknown_082FCDB0
|
||||
ldr r1, =gPkmnJumpVenusaurTilemap
|
||||
str r4, [sp]
|
||||
movs r0, 0x2
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r0, =gUnknown_082FD168
|
||||
ldr r0, =gPkmnJumpResultsPal
|
||||
movs r1, 0x10
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r1, =gUnknown_082FD188
|
||||
ldr r1, =gPkmnJumpResultsGfx
|
||||
str r5, [sp]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r1, =gUnknown_082FDC38
|
||||
ldr r1, =gPkmnJumpResultsTilemap
|
||||
str r4, [sp]
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl decompress_and_copy_tile_data_to_vram
|
||||
ldr r0, =gUnknown_082FC024
|
||||
ldr r0, =gPkmnJumpPal3
|
||||
movs r1, 0x20
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
|
1643
asm/list_menu.s
Executable file
1643
asm/list_menu.s
Executable file
File diff suppressed because it is too large
Load Diff
589
asm/mail_data.s
Executable file
589
asm/mail_data.s
Executable file
@ -0,0 +1,589 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start ClearMailData
|
||||
ClearMailData: @ 80D436C
|
||||
push {r4,r5,lr}
|
||||
movs r4, 0
|
||||
ldr r5, =gSaveBlock1Ptr
|
||||
_080D4372:
|
||||
lsls r1, r4, 3
|
||||
adds r1, r4
|
||||
lsls r1, 2
|
||||
ldr r0, =0x00002be0
|
||||
adds r1, r0
|
||||
ldr r0, [r5]
|
||||
adds r0, r1
|
||||
bl sub_80D439C
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0xF
|
||||
bls _080D4372
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ClearMailData
|
||||
|
||||
thumb_func_start sub_80D439C
|
||||
sub_80D439C: @ 80D439C
|
||||
push {r4-r6,lr}
|
||||
adds r3, r0, 0
|
||||
ldr r0, =0x0000ffff
|
||||
adds r4, r0, 0
|
||||
adds r1, r3, 0
|
||||
movs r2, 0x8
|
||||
_080D43A8:
|
||||
ldrh r0, [r1]
|
||||
orrs r0, r4
|
||||
strh r0, [r1]
|
||||
adds r1, 0x2
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _080D43A8
|
||||
movs r2, 0
|
||||
adds r6, r3, 0
|
||||
adds r6, 0x1A
|
||||
adds r4, r3, 0
|
||||
adds r4, 0x12
|
||||
movs r5, 0xFF
|
||||
_080D43C2:
|
||||
adds r1, r4, r2
|
||||
ldrb r0, [r1]
|
||||
orrs r0, r5
|
||||
strb r0, [r1]
|
||||
adds r2, 0x1
|
||||
cmp r2, 0x7
|
||||
ble _080D43C2
|
||||
adds r1, r6, 0
|
||||
movs r2, 0
|
||||
adds r0, r1, 0x3
|
||||
_080D43D6:
|
||||
strb r2, [r0]
|
||||
subs r0, 0x1
|
||||
cmp r0, r1
|
||||
bge _080D43D6
|
||||
movs r1, 0
|
||||
movs r0, 0x1
|
||||
strh r0, [r3, 0x1E]
|
||||
strh r1, [r3, 0x20]
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D439C
|
||||
|
||||
thumb_func_start sub_80D43F0
|
||||
sub_80D43F0: @ 80D43F0
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
movs r1, 0xC
|
||||
bl GetMonData
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl itemid_is_mail
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D4418
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x40
|
||||
bl GetMonData
|
||||
cmp r0, 0xFF
|
||||
beq _080D4418
|
||||
movs r0, 0x1
|
||||
b _080D441A
|
||||
_080D4418:
|
||||
movs r0, 0
|
||||
_080D441A:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D43F0
|
||||
|
||||
thumb_func_start sub_80D4420
|
||||
sub_80D4420: @ 80D4420
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0xC
|
||||
mov r8, r0
|
||||
lsls r1, 16
|
||||
lsrs r0, r1, 16
|
||||
str r0, [sp, 0x8]
|
||||
mov r0, sp
|
||||
movs r2, 0
|
||||
ldrb r3, [r0, 0x8]
|
||||
strb r3, [r0]
|
||||
lsrs r1, 24
|
||||
strb r1, [r0, 0x1]
|
||||
add r3, sp, 0x4
|
||||
strb r2, [r3]
|
||||
ldr r4, =gSaveBlock1Ptr
|
||||
mov r10, r4
|
||||
mov r9, r3
|
||||
adds r4, r3, 0
|
||||
_080D444C:
|
||||
mov r1, r10
|
||||
ldr r0, [r1]
|
||||
ldrb r2, [r4]
|
||||
lsls r1, r2, 3
|
||||
adds r1, r2
|
||||
lsls r1, 2
|
||||
adds r0, r1
|
||||
movs r1, 0xB0
|
||||
lsls r1, 6
|
||||
adds r0, r1
|
||||
ldrh r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _080D4468
|
||||
b _080D45A8
|
||||
_080D4468:
|
||||
movs r4, 0
|
||||
ldr r2, =gSaveBlock2Ptr
|
||||
mov r12, r2
|
||||
ldr r7, =gSaveBlock1Ptr
|
||||
add r5, sp, 0x4
|
||||
ldr r3, =0x0000ffff
|
||||
adds r6, r3, 0
|
||||
_080D4476:
|
||||
ldr r2, [r7]
|
||||
lsls r3, r4, 1
|
||||
ldrb r1, [r5]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r3, r0
|
||||
ldr r0, =0x00002be0
|
||||
adds r2, r0
|
||||
adds r2, r3
|
||||
ldrh r0, [r2]
|
||||
orrs r0, r6
|
||||
strh r0, [r2]
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x8
|
||||
bls _080D4476
|
||||
movs r4, 0
|
||||
ldr r5, =gSaveBlock1Ptr
|
||||
add r3, sp, 0x4
|
||||
_080D44A0:
|
||||
ldr r2, [r5]
|
||||
ldrb r1, [r3]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4, r0
|
||||
ldr r1, =0x00002bf2
|
||||
adds r2, r1
|
||||
adds r2, r0
|
||||
mov r1, r12
|
||||
ldr r0, [r1]
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x6
|
||||
bls _080D44A0
|
||||
mov r3, r10
|
||||
ldr r2, [r3]
|
||||
mov r0, r9
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4, r0
|
||||
ldr r1, =0x00002bf2
|
||||
adds r2, r1
|
||||
adds r2, r0
|
||||
movs r0, 0xFF
|
||||
strb r0, [r2]
|
||||
mov r2, r9
|
||||
ldrb r1, [r2]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, [r3]
|
||||
adds r0, r1
|
||||
ldr r3, =0x00002bf2
|
||||
adds r0, r3
|
||||
movs r1, 0
|
||||
bl sub_81DB4DC
|
||||
movs r4, 0
|
||||
ldr r6, =gSaveBlock1Ptr
|
||||
add r3, sp, 0x4
|
||||
ldr r5, =gSaveBlock2Ptr
|
||||
_080D4500:
|
||||
ldr r2, [r6]
|
||||
ldrb r1, [r3]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4, r0
|
||||
ldr r1, =0x00002bfa
|
||||
adds r2, r1
|
||||
adds r2, r0
|
||||
ldr r0, [r5]
|
||||
adds r0, 0xA
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r2]
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x3
|
||||
bls _080D4500
|
||||
mov r0, r8
|
||||
movs r1, 0xB
|
||||
bl GetBoxMonData
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
mov r0, r8
|
||||
movs r1, 0
|
||||
bl GetBoxMonData
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
bl sub_80D45C8
|
||||
mov r2, r10
|
||||
ldr r3, [r2]
|
||||
mov r4, r9
|
||||
ldrb r2, [r4]
|
||||
lsls r1, r2, 3
|
||||
adds r1, r2
|
||||
lsls r1, 2
|
||||
adds r1, r3, r1
|
||||
ldr r2, =0x00002bfe
|
||||
adds r1, r2
|
||||
strh r0, [r1]
|
||||
ldrb r1, [r4]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r3, r0
|
||||
movs r4, 0xB0
|
||||
lsls r4, 6
|
||||
adds r3, r4
|
||||
mov r0, sp
|
||||
ldrh r0, [r0, 0x8]
|
||||
strh r0, [r3]
|
||||
mov r0, r8
|
||||
movs r1, 0x40
|
||||
mov r2, r9
|
||||
bl SetMonData
|
||||
mov r0, r8
|
||||
movs r1, 0xC
|
||||
mov r2, sp
|
||||
bl SetMonData
|
||||
mov r1, r9
|
||||
ldrb r0, [r1]
|
||||
b _080D45B6
|
||||
.pool
|
||||
_080D45A8:
|
||||
adds r0, r2, 0x1
|
||||
strb r0, [r3]
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0x5
|
||||
bhi _080D45B4
|
||||
b _080D444C
|
||||
_080D45B4:
|
||||
movs r0, 0xFF
|
||||
_080D45B6:
|
||||
add sp, 0xC
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D4420
|
||||
|
||||
thumb_func_start sub_80D45C8
|
||||
sub_80D45C8: @ 80D45C8
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0xC9
|
||||
bne _080D45E0
|
||||
adds r0, r1, 0
|
||||
bl mon_icon_personality_to_unown_id
|
||||
lsls r0, 16
|
||||
ldr r1, =0x75300000
|
||||
adds r0, r1
|
||||
lsrs r0, 16
|
||||
_080D45E0:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D45C8
|
||||
|
||||
thumb_func_start sub_80D45E8
|
||||
sub_80D45E8: @ 80D45E8
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
ldr r0, =0xffff8ad0
|
||||
adds r2, r3, r0
|
||||
lsls r0, r2, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x1B
|
||||
bhi _080D4604
|
||||
movs r0, 0xC9
|
||||
strh r2, [r1]
|
||||
b _080D4606
|
||||
.pool
|
||||
_080D4604:
|
||||
adds r0, r3, 0
|
||||
_080D4606:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D45E8
|
||||
|
||||
thumb_func_start sub_80D460C
|
||||
sub_80D460C: @ 80D460C
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x8
|
||||
adds r6, r0, 0
|
||||
adds r7, r1, 0
|
||||
ldrh r5, [r7, 0x20]
|
||||
adds r1, r5, 0
|
||||
bl sub_80D4420
|
||||
add r4, sp, 0x4
|
||||
strb r0, [r4]
|
||||
ldrb r2, [r4]
|
||||
cmp r2, 0xFF
|
||||
beq _080D4670
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r1, [r0]
|
||||
lsls r0, r2, 3
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
adds r1, r0
|
||||
ldr r0, =0x00002be0
|
||||
adds r1, r0
|
||||
adds r0, r7, 0
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
ldm r0!, {r2,r3,r7}
|
||||
stm r1!, {r2,r3,r7}
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x40
|
||||
adds r2, r4, 0
|
||||
bl SetMonData
|
||||
mov r0, sp
|
||||
strb r5, [r0]
|
||||
mov r1, sp
|
||||
lsrs r0, r5, 8
|
||||
strb r0, [r1, 0x1]
|
||||
adds r0, r6, 0
|
||||
movs r1, 0xC
|
||||
mov r2, sp
|
||||
bl SetMonData
|
||||
ldrb r0, [r4]
|
||||
b _080D4672
|
||||
.pool
|
||||
_080D4670:
|
||||
movs r0, 0xFF
|
||||
_080D4672:
|
||||
add sp, 0x8
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D460C
|
||||
|
||||
thumb_func_start sub_80D467C
|
||||
sub_80D467C: @ 80D467C
|
||||
movs r0, 0
|
||||
bx lr
|
||||
thumb_func_end sub_80D467C
|
||||
|
||||
thumb_func_start sub_80D4680
|
||||
sub_80D4680: @ 80D4680
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
bl sub_80D43F0
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D46D2
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x40
|
||||
bl GetMonData
|
||||
add r2, sp, 0x4
|
||||
strb r0, [r2]
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r3, [r0]
|
||||
ldrb r1, [r2]
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r3, r0
|
||||
movs r0, 0xB0
|
||||
lsls r0, 6
|
||||
adds r3, r0
|
||||
movs r1, 0
|
||||
movs r0, 0
|
||||
strh r0, [r3]
|
||||
movs r0, 0xFF
|
||||
strb r0, [r2]
|
||||
mov r0, sp
|
||||
strb r1, [r0]
|
||||
strb r1, [r0, 0x1]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x40
|
||||
bl SetMonData
|
||||
adds r0, r4, 0
|
||||
movs r1, 0xC
|
||||
mov r2, sp
|
||||
bl SetMonData
|
||||
_080D46D2:
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D4680
|
||||
|
||||
thumb_func_start sub_80D46E0
|
||||
sub_80D46E0: @ 80D46E0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gSaveBlock1Ptr
|
||||
ldr r2, [r1]
|
||||
lsls r1, r0, 3
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r2, r1
|
||||
movs r0, 0xB0
|
||||
lsls r0, 6
|
||||
adds r2, r0
|
||||
movs r0, 0
|
||||
strh r0, [r2]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80D46E0
|
||||
|
||||
thumb_func_start sub_80D4700
|
||||
sub_80D4700: @ 80D4700
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0xC
|
||||
adds r5, r0, 0
|
||||
mov r0, sp
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
strb r1, [r0, 0x1]
|
||||
add r1, sp, 0x4
|
||||
movs r0, 0xFF
|
||||
strb r0, [r1]
|
||||
movs r7, 0x6
|
||||
mov r9, r1
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
mov r8, r0
|
||||
ldr r3, =0x00002be0
|
||||
_080D4724:
|
||||
mov r1, r8
|
||||
ldr r0, [r1]
|
||||
lsls r1, r7, 3
|
||||
adds r1, r7
|
||||
lsls r1, 2
|
||||
adds r4, r0, r1
|
||||
movs r2, 0xB0
|
||||
lsls r2, 6
|
||||
adds r0, r4, r2
|
||||
ldrh r6, [r0]
|
||||
cmp r6, 0
|
||||
bne _080D47A0
|
||||
adds r4, r3
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x40
|
||||
str r3, [sp, 0x8]
|
||||
bl GetMonData
|
||||
mov r1, r8
|
||||
ldr r2, [r1]
|
||||
lsls r1, r0, 3
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r1, r2
|
||||
ldr r3, [sp, 0x8]
|
||||
adds r1, r3
|
||||
ldm r1!, {r0,r2,r3}
|
||||
stm r4!, {r0,r2,r3}
|
||||
ldm r1!, {r0,r2,r3}
|
||||
stm r4!, {r0,r2,r3}
|
||||
ldm r1!, {r0,r2,r3}
|
||||
stm r4!, {r0,r2,r3}
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x40
|
||||
bl GetMonData
|
||||
mov r1, r8
|
||||
ldr r2, [r1]
|
||||
lsls r1, r0, 3
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r2, r1
|
||||
movs r3, 0xB0
|
||||
lsls r3, 6
|
||||
adds r2, r3
|
||||
strh r6, [r2]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x40
|
||||
mov r2, r9
|
||||
bl SetMonData
|
||||
adds r0, r5, 0
|
||||
movs r1, 0xC
|
||||
mov r2, sp
|
||||
bl SetMonData
|
||||
adds r0, r7, 0
|
||||
b _080D47AC
|
||||
.pool
|
||||
_080D47A0:
|
||||
adds r0, r7, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
cmp r7, 0xF
|
||||
bls _080D4724
|
||||
movs r0, 0xFF
|
||||
_080D47AC:
|
||||
add sp, 0xC
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D4700
|
||||
|
||||
thumb_func_start itemid_is_mail
|
||||
itemid_is_mail: @ 80D47BC
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x84
|
||||
bgt _080D47CE
|
||||
cmp r0, 0x79
|
||||
blt _080D47CE
|
||||
movs r0, 0x1
|
||||
b _080D47D0
|
||||
_080D47CE:
|
||||
movs r0, 0
|
||||
_080D47D0:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end itemid_is_mail
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -312,7 +312,7 @@ _0802F982:
|
||||
b _0802F9FC
|
||||
.pool
|
||||
_0802F990:
|
||||
ldr r0, =gUnknown_085E8405
|
||||
ldr r0, =gText_SaveFileErased
|
||||
bl CreateMainMenuErrorWindow
|
||||
strh r5, [r4]
|
||||
mov r0, r8
|
||||
@ -321,7 +321,7 @@ _0802F990:
|
||||
b _0802F9FA
|
||||
.pool
|
||||
_0802F9A4:
|
||||
ldr r0, =gUnknown_085E83C2
|
||||
ldr r0, =gText_SaveFileCorrupted
|
||||
bl CreateMainMenuErrorWindow
|
||||
mov r0, r8
|
||||
subs r0, 0x8
|
||||
@ -350,7 +350,7 @@ _0802F9D0:
|
||||
b _0802F9FC
|
||||
.pool
|
||||
_0802F9EC:
|
||||
ldr r0, =gUnknown_085E8440
|
||||
ldr r0, =gJPText_No1MSubCircuit
|
||||
bl CreateMainMenuErrorWindow
|
||||
mov r0, r8
|
||||
subs r0, 0x8
|
||||
@ -495,7 +495,7 @@ Task_MainMenuCheckBattery: @ 802FAB0
|
||||
b _0802FB3C
|
||||
.pool
|
||||
_0802FB28:
|
||||
ldr r0, =gUnknown_085E8453
|
||||
ldr r0, =gText_BatteryRunDry
|
||||
bl CreateMainMenuErrorWindow
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
@ -679,7 +679,7 @@ _0802FCBC:
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E827C
|
||||
ldr r0, =gText_MainMenuNewGame
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0
|
||||
movs r1, 0x1
|
||||
@ -688,7 +688,7 @@ _0802FCBC:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E828E
|
||||
ldr r0, =gText_MainMenuOption
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
movs r1, 0x1
|
||||
@ -728,7 +728,7 @@ _0802FD44:
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8285
|
||||
ldr r0, =gText_MainMenuContinue
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
@ -737,7 +737,7 @@ _0802FD44:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E827C
|
||||
ldr r0, =gText_MainMenuNewGame
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x3
|
||||
movs r1, 0x1
|
||||
@ -746,7 +746,7 @@ _0802FD44:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E828E
|
||||
ldr r0, =gText_MainMenuOption
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x4
|
||||
movs r1, 0x1
|
||||
@ -799,7 +799,7 @@ _0802FE00:
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8285
|
||||
ldr r0, =gText_MainMenuContinue
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
@ -808,7 +808,7 @@ _0802FE00:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E827C
|
||||
ldr r0, =gText_MainMenuNewGame
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x3
|
||||
movs r1, 0x1
|
||||
@ -817,7 +817,7 @@ _0802FE00:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8295
|
||||
ldr r0, =gText_MainMenuMysteryGift
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x4
|
||||
movs r1, 0x1
|
||||
@ -826,7 +826,7 @@ _0802FE00:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E828E
|
||||
ldr r0, =gText_MainMenuOption
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x5
|
||||
movs r1, 0x1
|
||||
@ -895,7 +895,7 @@ _0802FEFC:
|
||||
movs r4, 0x1
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E8285
|
||||
ldr r0, =gText_MainMenuContinue
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
movs r1, 0x1
|
||||
@ -904,7 +904,7 @@ _0802FEFC:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E827C
|
||||
ldr r0, =gText_MainMenuNewGame
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x3
|
||||
movs r1, 0x1
|
||||
@ -913,7 +913,7 @@ _0802FEFC:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E82A2
|
||||
ldr r0, =gText_MainMenuMysteryGift2
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x4
|
||||
movs r1, 0x1
|
||||
@ -922,7 +922,7 @@ _0802FEFC:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E82AF
|
||||
ldr r0, =gText_MainMenuMysteryEvents
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x5
|
||||
movs r1, 0x1
|
||||
@ -931,7 +931,7 @@ _0802FEFC:
|
||||
bl box_print
|
||||
str r5, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
ldr r0, =gUnknown_085E828E
|
||||
ldr r0, =gText_MainMenuOption
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x6
|
||||
movs r1, 0x1
|
||||
@ -1671,17 +1671,17 @@ _080305FC:
|
||||
beq _0803061C
|
||||
b _08030622
|
||||
_08030602:
|
||||
ldr r0, =gUnknown_085E82BE
|
||||
ldr r0, =gText_WirelessNotConnected
|
||||
bl CreateMainMenuErrorWindow
|
||||
b _08030622
|
||||
.pool
|
||||
_08030610:
|
||||
ldr r0, =gUnknown_085E82E5
|
||||
ldr r0, =gText_MysteryGiftCantUse
|
||||
bl CreateMainMenuErrorWindow
|
||||
b _08030622
|
||||
.pool
|
||||
_0803061C:
|
||||
ldr r0, =gUnknown_085E8328
|
||||
ldr r0, =gText_MysteryEventsCantUse
|
||||
bl CreateMainMenuErrorWindow
|
||||
_08030622:
|
||||
ldr r0, =gTasks
|
||||
@ -2123,7 +2123,7 @@ task_new_game_prof_birch_speech_4: @ 80309CC
|
||||
ldr r1, =task_new_game_prof_birch_speech_5
|
||||
str r1, [r0]
|
||||
ldr r0, =gStringVar4
|
||||
ldr r1, =gUnknown_085E8692
|
||||
ldr r1, =gText_ThisIsAPokemon
|
||||
bl StringExpandPlaceholders
|
||||
ldr r1, =sub_80323A0
|
||||
movs r0, 0x1
|
||||
|
570
asm/map_name_popup.s
Executable file
570
asm/map_name_popup.s
Executable file
@ -0,0 +1,570 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80D47D4
|
||||
sub_80D47D4: @ 80D47D4
|
||||
push {lr}
|
||||
bl sub_80A0934
|
||||
bl AddMapNamePopUpWindowTask
|
||||
movs r0, 0x1
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D47D4
|
||||
|
||||
thumb_func_start AddMapNamePopUpWindowTask
|
||||
AddMapNamePopUpWindowTask: @ 80D47E4
|
||||
push {r4,lr}
|
||||
movs r0, 0x80
|
||||
lsls r0, 7
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _080D486C
|
||||
ldr r4, =Task_MapNamePopUpWindow
|
||||
adds r0, r4, 0
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080D4844
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x5A
|
||||
bl CreateTask
|
||||
ldr r4, =gUnknown_02039DD4
|
||||
strb r0, [r4]
|
||||
movs r0, 0x12
|
||||
movs r1, 0x28
|
||||
bl SetGpuReg
|
||||
ldr r2, =gTasks
|
||||
ldrb r1, [r4]
|
||||
lsls r0, r1, 2
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r0, r2
|
||||
movs r1, 0x6
|
||||
strh r1, [r0, 0x8]
|
||||
ldrb r1, [r4]
|
||||
lsls r0, r1, 2
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r0, r2
|
||||
movs r1, 0x28
|
||||
strh r1, [r0, 0xC]
|
||||
b _080D486C
|
||||
.pool
|
||||
_080D4844:
|
||||
ldr r3, =gTasks
|
||||
ldr r2, =gUnknown_02039DD4
|
||||
ldrb r0, [r2]
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r3
|
||||
movs r4, 0x8
|
||||
ldrsh r0, [r1, r4]
|
||||
cmp r0, 0x2
|
||||
beq _080D485E
|
||||
movs r0, 0x2
|
||||
strh r0, [r1, 0x8]
|
||||
_080D485E:
|
||||
ldrb r0, [r2]
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r3
|
||||
movs r0, 0x1
|
||||
strh r0, [r1, 0xE]
|
||||
_080D486C:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end AddMapNamePopUpWindowTask
|
||||
|
||||
thumb_func_start Task_MapNamePopUpWindow
|
||||
Task_MapNamePopUpWindow: @ 80D487C
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks
|
||||
adds r4, r1, r0
|
||||
movs r2, 0x8
|
||||
ldrsh r1, [r4, r2]
|
||||
adds r3, r0, 0
|
||||
cmp r1, 0x6
|
||||
bhi _080D4966
|
||||
lsls r0, r1, 2
|
||||
ldr r1, =_080D48A8
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_080D48A8:
|
||||
.4byte _080D48DE
|
||||
.4byte _080D4908
|
||||
.4byte _080D4920
|
||||
.4byte _080D4966
|
||||
.4byte _080D494C
|
||||
.4byte _080D4960
|
||||
.4byte _080D48C4
|
||||
_080D48C4:
|
||||
ldrh r0, [r4, 0x10]
|
||||
adds r0, 0x1
|
||||
movs r1, 0
|
||||
strh r0, [r4, 0x10]
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x1E
|
||||
ble _080D4966
|
||||
strh r1, [r4, 0x8]
|
||||
strh r1, [r4, 0x10]
|
||||
bl ShowMapNamePopUpWindow
|
||||
b _080D4966
|
||||
_080D48DE:
|
||||
ldrh r0, [r4, 0xC]
|
||||
subs r0, 0x2
|
||||
movs r2, 0
|
||||
strh r0, [r4, 0xC]
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
bgt _080D4966
|
||||
strh r2, [r4, 0xC]
|
||||
movs r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
ldr r0, =gUnknown_02039DD4
|
||||
ldrb r1, [r0]
|
||||
lsls r0, r1, 2
|
||||
adds r0, r1
|
||||
lsls r0, 3
|
||||
adds r0, r3
|
||||
strh r2, [r0, 0xA]
|
||||
b _080D4966
|
||||
.pool
|
||||
_080D4908:
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x78
|
||||
ble _080D4966
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0x2
|
||||
strh r0, [r4, 0x8]
|
||||
b _080D4966
|
||||
_080D4920:
|
||||
ldrh r0, [r4, 0xC]
|
||||
adds r0, 0x2
|
||||
movs r1, 0
|
||||
strh r0, [r4, 0xC]
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
cmp r0, 0x27
|
||||
ble _080D4966
|
||||
movs r0, 0x28
|
||||
strh r0, [r4, 0xC]
|
||||
movs r2, 0xE
|
||||
ldrsh r0, [r4, r2]
|
||||
cmp r0, 0
|
||||
beq _080D4946
|
||||
movs r0, 0x6
|
||||
strh r0, [r4, 0x8]
|
||||
strh r1, [r4, 0x10]
|
||||
strh r1, [r4, 0xE]
|
||||
b _080D4966
|
||||
_080D4946:
|
||||
movs r0, 0x4
|
||||
strh r0, [r4, 0x8]
|
||||
b _080D496E
|
||||
_080D494C:
|
||||
bl GetMapNamePopUpWindowId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x1
|
||||
bl sub_819746C
|
||||
movs r0, 0x5
|
||||
strh r0, [r4, 0x8]
|
||||
b _080D4966
|
||||
_080D4960:
|
||||
bl HideMapNamePopUpWindow
|
||||
b _080D496E
|
||||
_080D4966:
|
||||
ldrh r1, [r4, 0xC]
|
||||
movs r0, 0x12
|
||||
bl SetGpuReg
|
||||
_080D496E:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end Task_MapNamePopUpWindow
|
||||
|
||||
thumb_func_start HideMapNamePopUpWindow
|
||||
HideMapNamePopUpWindow: @ 80D4974
|
||||
push {lr}
|
||||
ldr r0, =Task_MapNamePopUpWindow
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D49A4
|
||||
bl GetMapNamePopUpWindowId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x1
|
||||
bl sub_819746C
|
||||
bl RemoveMapNamePopUpWindow
|
||||
movs r0, 0x12
|
||||
movs r1, 0
|
||||
bl SetGpuReg_ForcedBlank
|
||||
ldr r0, =gUnknown_02039DD4
|
||||
ldrb r0, [r0]
|
||||
bl DestroyTask
|
||||
_080D49A4:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end HideMapNamePopUpWindow
|
||||
|
||||
thumb_func_start ShowMapNamePopUpWindow
|
||||
ShowMapNamePopUpWindow: @ 80D49B0
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x24
|
||||
bl InBattlePyramid
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D4A08
|
||||
ldr r0, =gMapHeader
|
||||
ldrh r1, [r0, 0x12]
|
||||
movs r0, 0xBD
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
bne _080D49DC
|
||||
mov r4, sp
|
||||
adds r4, 0xF
|
||||
ldr r0, =gUnknown_0857F544
|
||||
ldr r1, [r0, 0x1C]
|
||||
b _080D49F2
|
||||
.pool
|
||||
_080D49DC:
|
||||
mov r4, sp
|
||||
adds r4, 0xF
|
||||
ldr r1, =gUnknown_0857F544
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldr r2, =0x00000cb2
|
||||
adds r0, r2
|
||||
ldrh r0, [r0]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r1, [r0]
|
||||
_080D49F2:
|
||||
adds r0, r4, 0
|
||||
bl StringCopy
|
||||
b _080D4A18
|
||||
.pool
|
||||
_080D4A08:
|
||||
mov r4, sp
|
||||
adds r4, 0xF
|
||||
ldr r0, =gMapHeader
|
||||
ldrb r1, [r0, 0x14]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
bl GetMapName
|
||||
_080D4A18:
|
||||
bl AddMapNamePopUpWindow
|
||||
bl LoadMapNamePopUpWindowBg
|
||||
movs r0, 0x7
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x50
|
||||
bl GetStringCenterAlignXOffset
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
add r1, sp, 0xC
|
||||
movs r5, 0
|
||||
movs r0, 0xFC
|
||||
strb r0, [r1]
|
||||
movs r0, 0x2
|
||||
strb r0, [r1, 0x1]
|
||||
adds r0, r1, 0
|
||||
strb r5, [r0, 0x2]
|
||||
bl GetMapNamePopUpWindowId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x3
|
||||
str r1, [sp]
|
||||
movs r1, 0xFF
|
||||
str r1, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r1, 0x7
|
||||
add r2, sp, 0xC
|
||||
adds r3, r4, 0
|
||||
bl PrintTextOnWindow
|
||||
bl GetMapNamePopUpWindowId
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r1, 0x3
|
||||
bl CopyWindowToVram
|
||||
add sp, 0x24
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ShowMapNamePopUpWindow
|
||||
|
||||
thumb_func_start sub_80D4A78
|
||||
sub_80D4A78: @ 80D4A78
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x1C
|
||||
ldr r4, [sp, 0x3C]
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r10, r1
|
||||
lsls r2, 24
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
str r3, [sp, 0x10]
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
str r4, [sp, 0x14]
|
||||
movs r5, 0
|
||||
lsls r0, r1, 24
|
||||
asrs r1, r0, 24
|
||||
lsrs r3, r2, 24
|
||||
str r3, [sp, 0xC]
|
||||
movs r6, 0xFF
|
||||
lsls r6, 24
|
||||
adds r6, r2
|
||||
mov r8, r6
|
||||
str r0, [sp, 0x18]
|
||||
subs r4, r1, 0x1
|
||||
_080D4AB4:
|
||||
ldr r0, =0x0000021d
|
||||
adds r1, r5, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
lsls r2, r4, 24
|
||||
lsrs r2, 24
|
||||
movs r3, 0x1
|
||||
str r3, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
movs r6, 0xE
|
||||
mov r9, r6
|
||||
str r6, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
mov r6, r8
|
||||
lsrs r3, r6, 24
|
||||
bl FillBgTilemapBufferRect
|
||||
adds r4, 0x1
|
||||
adds r5, 0x1
|
||||
cmp r5, 0xB
|
||||
ble _080D4AB4
|
||||
ldr r1, =0x00000229
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
add r0, r10
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
movs r5, 0x1
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r2, r9
|
||||
str r2, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
mov r2, r8
|
||||
ldr r3, [sp, 0xC]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldr r1, =0x0000022a
|
||||
ldr r6, [sp, 0x10]
|
||||
add r6, r10
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r3, r9
|
||||
str r3, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
adds r2, r6, 0
|
||||
ldr r3, [sp, 0xC]
|
||||
bl FillBgTilemapBufferRect
|
||||
ldr r1, =0x0000022b
|
||||
ldr r4, [sp, 0xC]
|
||||
adds r4, 0x1
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
mov r2, r8
|
||||
adds r3, r4, 0
|
||||
bl FillBgTilemapBufferRect
|
||||
movs r1, 0x8B
|
||||
lsls r1, 2
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r2, r9
|
||||
str r2, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
adds r2, r6, 0
|
||||
adds r3, r4, 0
|
||||
bl FillBgTilemapBufferRect
|
||||
ldr r1, =0x0000022d
|
||||
ldr r4, [sp, 0xC]
|
||||
adds r4, 0x2
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r3, r9
|
||||
str r3, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
mov r2, r8
|
||||
adds r3, r4, 0
|
||||
bl FillBgTilemapBufferRect
|
||||
ldr r1, =0x0000022e
|
||||
str r5, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
mov r0, r9
|
||||
str r0, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
adds r2, r6, 0
|
||||
adds r3, r4, 0
|
||||
bl FillBgTilemapBufferRect
|
||||
movs r5, 0
|
||||
ldr r1, [sp, 0xC]
|
||||
ldr r2, [sp, 0x14]
|
||||
adds r0, r1, r2
|
||||
lsls r4, r0, 24
|
||||
movs r6, 0x1
|
||||
_080D4B8A:
|
||||
ldr r3, =0x0000022f
|
||||
adds r1, r5, r3
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
subs r0, r5, 0x1
|
||||
ldr r3, [sp, 0x18]
|
||||
asrs r2, r3, 24
|
||||
adds r2, r0
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
str r6, [sp]
|
||||
str r6, [sp, 0x4]
|
||||
movs r0, 0xE
|
||||
str r0, [sp, 0x8]
|
||||
adds r0, r7, 0
|
||||
lsrs r3, r4, 24
|
||||
bl FillBgTilemapBufferRect
|
||||
adds r5, 0x1
|
||||
cmp r5, 0xB
|
||||
ble _080D4B8A
|
||||
add sp, 0x1C
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D4A78
|
||||
|
||||
thumb_func_start LoadMapNamePopUpWindowBg
|
||||
LoadMapNamePopUpWindowBg: @ 80D4BE0
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x8
|
||||
bl GetMapNamePopUpWindowId
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
ldr r0, =gMapHeader
|
||||
ldrb r1, [r0, 0x14]
|
||||
cmp r1, 0x57
|
||||
bls _080D4C0A
|
||||
cmp r1, 0xC4
|
||||
bls _080D4C08
|
||||
adds r0, r1, 0
|
||||
subs r0, 0x6D
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
b _080D4C0A
|
||||
.pool
|
||||
_080D4C08:
|
||||
movs r1, 0
|
||||
_080D4C0A:
|
||||
ldr r0, =gUnknown_0857F464
|
||||
adds r0, r1, r0
|
||||
ldrb r4, [r0]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0
|
||||
bl GetWindowAttribute
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r4, 4
|
||||
subs r1, r4
|
||||
lsls r1, 6
|
||||
ldr r2, =gUnknown_0857DD04
|
||||
adds r1, r2
|
||||
movs r2, 0x80
|
||||
lsls r2, 3
|
||||
ldr r3, =0x0000021d
|
||||
bl LoadBgTiles
|
||||
ldr r1, =sub_80D4A78
|
||||
adds r0, r5, 0
|
||||
bl CallWindowFunction
|
||||
adds r0, r5, 0
|
||||
bl PutWindowTilemap
|
||||
ldr r0, =gMapHeader
|
||||
ldrb r0, [r0, 0x16]
|
||||
cmp r0, 0xE
|
||||
bne _080D4C6C
|
||||
ldr r0, =gUnknown_0857F444
|
||||
movs r1, 0xE0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
b _080D4C7A
|
||||
.pool
|
||||
_080D4C6C:
|
||||
lsls r0, r4, 5
|
||||
ldr r1, =gUnknown_0857F384
|
||||
adds r0, r1
|
||||
movs r1, 0xE0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
_080D4C7A:
|
||||
lsls r1, r4, 4
|
||||
subs r1, r4
|
||||
lsls r1, 6
|
||||
ldr r0, =gUnknown_0857C684
|
||||
adds r1, r0
|
||||
movs r0, 0x50
|
||||
str r0, [sp]
|
||||
movs r0, 0x18
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r5, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl BlitBitmapToWindow
|
||||
add sp, 0x8
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end LoadMapNamePopUpWindowBg
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
5505
asm/menu.s
Executable file
5505
asm/menu.s
Executable file
File diff suppressed because it is too large
Load Diff
1442
asm/menu_indicators.s
Executable file
1442
asm/menu_indicators.s
Executable file
File diff suppressed because it is too large
Load Diff
@ -669,14 +669,14 @@ sub_8153CC8: @ 8153CC8
|
||||
cmp r4, r0
|
||||
bne _08153D18
|
||||
ldr r0, =gStringVar1
|
||||
ldr r1, =gEggNickname
|
||||
ldr r1, =gText_EggNickname
|
||||
movs r2, 0xB
|
||||
bl StringCopyN
|
||||
b _08153D22
|
||||
.pool
|
||||
_08153D18:
|
||||
ldr r0, =gStringVar1
|
||||
ldr r1, =gUnknown_085E8268
|
||||
ldr r1, =gText_Pokemon
|
||||
movs r2, 0xB
|
||||
bl StringCopyN
|
||||
_08153D22:
|
||||
|
@ -3387,7 +3387,7 @@ sub_80E49BC: @ 80E49BC
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x10
|
||||
movs r4, 0
|
||||
ldr r1, =gUnknown_085E8D49
|
||||
ldr r1, =gText_MaleSymbol
|
||||
add r0, sp, 0xC
|
||||
bl StringCopy
|
||||
ldr r5, =gUnknown_02039F94
|
||||
@ -3399,7 +3399,7 @@ sub_80E49BC: @ 80E49BC
|
||||
beq _080E4A0C
|
||||
cmp r0, 0xFE
|
||||
bne _080E49E6
|
||||
ldr r1, =gUnknown_085E8D4B
|
||||
ldr r1, =gText_FemaleSymbol
|
||||
add r0, sp, 0xC
|
||||
bl StringCopy
|
||||
movs r4, 0x1
|
||||
|
1178
asm/new_menu_helpers.s
Executable file
1178
asm/new_menu_helpers.s
Executable file
File diff suppressed because it is too large
Load Diff
17828
asm/party_menu.s
Executable file
17828
asm/party_menu.s
Executable file
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,7 @@ sub_816AE58: @ 816AE58
|
||||
bl CreateTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_085E8D80
|
||||
ldr r1, =gText_WhatWouldYouLike
|
||||
ldr r2, =sub_816AED8
|
||||
bl DisplayItemMessageOnField
|
||||
pop {r0}
|
||||
@ -91,7 +91,7 @@ sub_816AE98: @ 816AE98
|
||||
bl CreateTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_085E8D80
|
||||
ldr r1, =gText_WhatWouldYouLike
|
||||
ldr r2, =sub_816AED8
|
||||
bl DisplayItemMessageOnField
|
||||
pop {r0}
|
||||
@ -266,7 +266,7 @@ sub_816B060: @ 816B060
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_085E8D80
|
||||
ldr r1, =gText_WhatWouldYouLike
|
||||
ldr r2, =sub_816AED8
|
||||
bl DisplayItemMessageOnField
|
||||
pop {r0}
|
||||
@ -1601,7 +1601,7 @@ sub_816BBB8: @ 816BBB8
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r1, =gUnknown_085E8DE9
|
||||
ldr r1, =gText_NoPokemon
|
||||
ldr r2, =sub_816BBD4
|
||||
bl DisplayItemMessageOnField
|
||||
pop {r0}
|
||||
@ -1808,7 +1808,7 @@ _0816BD58:
|
||||
adds r4, r3
|
||||
ldr r0, [r5]
|
||||
adds r0, r4
|
||||
ldr r1, =gUnknown_085E8CF7
|
||||
ldr r1, =gText_Cancel2
|
||||
bl StringCopy
|
||||
ldr r0, [r5]
|
||||
lsls r2, r6, 3
|
||||
@ -1950,7 +1950,7 @@ _0816BE8E:
|
||||
movs r3, 0x3
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E8DA0
|
||||
ldr r1, =gText_xVar1
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0x7
|
||||
@ -2144,7 +2144,7 @@ _0816C030:
|
||||
lsls r0, r2, 24
|
||||
asrs r0, 24
|
||||
str r0, [sp, 0xC]
|
||||
ldr r0, =gUnknown_085E8D60
|
||||
ldr r0, =gText_SelectorArrow2
|
||||
str r0, [sp, 0x10]
|
||||
adds r0, r5, 0
|
||||
movs r1, 0x1
|
||||
@ -2379,7 +2379,7 @@ _0816C248:
|
||||
.4byte _0816C274
|
||||
.4byte _0816C26C
|
||||
_0816C26C:
|
||||
ldr r0, =gUnknown_085E8D62
|
||||
ldr r0, =gText_GoBackPrevMenu
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C274:
|
||||
@ -2391,11 +2391,11 @@ _0816C27C:
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C284:
|
||||
ldr r0, =gUnknown_085E8EE0
|
||||
ldr r0, =gText_TossHowManyVar1s
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C28C:
|
||||
ldr r0, =gUnknown_085E8EF9
|
||||
ldr r0, =gText_ThrewAwayVar2Var1s
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C294:
|
||||
@ -2403,15 +2403,15 @@ _0816C294:
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C29C:
|
||||
ldr r0, =gUnknown_085E8EB9
|
||||
ldr r0, =gText_TooImportantToToss
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C2A4:
|
||||
ldr r0, =gUnknown_085E8F0E
|
||||
ldr r0, =gText_ConfirmTossItems
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C2AC:
|
||||
ldr r0, =gUnknown_085E8DFE
|
||||
ldr r0, =gText_MoveVar1Where
|
||||
b _0816C2BA
|
||||
.pool
|
||||
_0816C2B4:
|
||||
@ -2892,7 +2892,7 @@ sub_816C6BC: @ 816C6BC
|
||||
ldr r0, =gStringVar1
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E8DA0
|
||||
ldr r1, =gText_xVar1
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0x1
|
||||
|
2861
asm/pokeball.s
Executable file
2861
asm/pokeball.s
Executable file
File diff suppressed because it is too large
Load Diff
@ -7310,7 +7310,7 @@ _080BF38C:
|
||||
b _080BF582
|
||||
.pool
|
||||
_080BF3A0:
|
||||
ldr r0, =gUnknown_085E871B
|
||||
ldr r0, =gText_CryOf
|
||||
movs r1, 0x52
|
||||
movs r2, 0x21
|
||||
bl sub_80BE8DC
|
||||
@ -7893,7 +7893,7 @@ _080BF910:
|
||||
b _080BFB4E
|
||||
.pool
|
||||
_080BF93C:
|
||||
ldr r1, =gUnknown_085E8723
|
||||
ldr r1, =gText_SizeComparedTo
|
||||
add r0, sp, 0x4
|
||||
bl StringCopy
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
@ -8891,7 +8891,7 @@ sub_80C020C: @ 80C020C
|
||||
adds r7, r2, 0
|
||||
cmp r3, 0
|
||||
beq _080C0234
|
||||
ldr r4, =gUnknown_085E8735
|
||||
ldr r4, =gText_PokedexRegistration
|
||||
movs r0, 0x1
|
||||
adds r1, r4, 0
|
||||
movs r2, 0xF0
|
||||
@ -8916,7 +8916,7 @@ _080C024C:
|
||||
adds r5, r6, 0
|
||||
lsls r4, r6, 16
|
||||
_080C0250:
|
||||
ldr r1, =gUnknown_085E8D4F
|
||||
ldr r1, =gText_UnkCtrlF908Clear01
|
||||
mov r0, sp
|
||||
bl StringCopy
|
||||
adds r1, r5, 0
|
||||
@ -8955,16 +8955,16 @@ _080C028E:
|
||||
b _080C02AE
|
||||
.pool
|
||||
_080C02AC:
|
||||
ldr r0, =gUnknown_085E86B8
|
||||
ldr r0, =gText_5MarksPokemon
|
||||
_080C02AE:
|
||||
movs r1, 0x64
|
||||
movs r2, 0x29
|
||||
bl sub_80BE8DC
|
||||
ldr r0, =gUnknown_085E8755
|
||||
ldr r0, =gText_HTHeight
|
||||
movs r1, 0x60
|
||||
movs r2, 0x39
|
||||
bl sub_80BE8DC
|
||||
ldr r0, =gUnknown_085E8758
|
||||
ldr r0, =gText_WTWeight
|
||||
movs r1, 0x60
|
||||
movs r2, 0x49
|
||||
bl sub_80BE8DC
|
||||
@ -8984,11 +8984,11 @@ _080C02AE:
|
||||
b _080C0310
|
||||
.pool
|
||||
_080C02FC:
|
||||
ldr r0, =gUnknown_085E86C6
|
||||
ldr r0, =gText_UnkHeight
|
||||
movs r1, 0x81
|
||||
movs r2, 0x39
|
||||
bl sub_80BE8DC
|
||||
ldr r0, =gUnknown_085E86D0
|
||||
ldr r0, =gText_UnkWeight
|
||||
movs r1, 0x81
|
||||
movs r2, 0x49
|
||||
bl sub_80BE8DC
|
||||
@ -11626,7 +11626,7 @@ _080C17E8:
|
||||
b _080C1994
|
||||
.pool
|
||||
_080C183C:
|
||||
ldr r0, =gUnknown_085E875B
|
||||
ldr r0, =gText_SearchingPleaseWait
|
||||
bl sub_80C2618
|
||||
ldr r0, =sub_80C19A4
|
||||
str r0, [r6]
|
||||
@ -11880,7 +11880,7 @@ sub_80C1A4C: @ 80C1A4C
|
||||
beq _080C1A84
|
||||
movs r0, 0x1F
|
||||
bl PlaySE
|
||||
ldr r0, =gUnknown_085E8773
|
||||
ldr r0, =gText_SearchCompleted
|
||||
bl sub_80C2618
|
||||
b _080C1A90
|
||||
.pool
|
||||
@ -13334,7 +13334,7 @@ sub_80C2638: @ 80C2638
|
||||
sub_80C2650: @ 80C2650
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gUnknown_085E8B3A
|
||||
ldr r0, =gText_SelectorArrow
|
||||
lsls r2, 4
|
||||
adds r2, 0x9
|
||||
movs r1, 0x90
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
|
||||
thumb_func_start CopyPlayerPartyMonToBattleData
|
||||
CopyPlayerPartyMonToBattleData: @ 806B9FC
|
||||
push {r4-r7,lr}
|
||||
|
822
asm/pokemon_icon.s
Executable file
822
asm/pokemon_icon.s
Executable file
@ -0,0 +1,822 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80D2CC4
|
||||
@ int sub_80D2CC4(u16 speciesId, int a2, u16 a3, u16 a4, u8 a5, u32 personality, int a7)
|
||||
sub_80D2CC4: @ 80D2CC4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
sub sp, 0x30
|
||||
adds r4, r0, 0
|
||||
adds r6, r1, 0
|
||||
ldr r0, [sp, 0x4C]
|
||||
ldr r1, [sp, 0x50]
|
||||
ldr r5, [sp, 0x54]
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r2, 16
|
||||
lsrs r2, 16
|
||||
mov r8, r2
|
||||
lsls r3, 16
|
||||
lsrs r7, r3, 16
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r9, r0
|
||||
ldr r0, =gUnknown_0857C570
|
||||
str r0, [sp, 0x18]
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
bl sub_80D2EDC
|
||||
str r0, [sp, 0x1C]
|
||||
ldr r0, =gUnknown_0857C5B4
|
||||
str r0, [sp, 0x20]
|
||||
ldr r0, =gUnknown_0857C5E8
|
||||
str r0, [sp, 0x24]
|
||||
str r6, [sp, 0x28]
|
||||
ldr r0, =gMonIconPaletteIndices
|
||||
adds r0, r4, r0
|
||||
ldr r1, =0x0000dac0
|
||||
adds r5, r1, 0
|
||||
ldrb r0, [r0]
|
||||
adds r1, r5, r0
|
||||
add r0, sp, 0x2C
|
||||
strh r1, [r0]
|
||||
add r1, sp, 0x18
|
||||
mov r0, sp
|
||||
movs r2, 0x18
|
||||
bl memcpy
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r4, r0
|
||||
bls _080D2D2A
|
||||
mov r0, sp
|
||||
strh r5, [r0, 0x14]
|
||||
_080D2D2A:
|
||||
mov r0, r8
|
||||
lsls r1, r0, 16
|
||||
asrs r1, 16
|
||||
lsls r2, r7, 16
|
||||
asrs r2, 16
|
||||
mov r0, sp
|
||||
mov r3, r9
|
||||
bl sub_80D31B4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r0, r4, 4
|
||||
adds r0, r4
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
bl sub_80D30DC
|
||||
adds r0, r4, 0
|
||||
add sp, 0x30
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D2CC4
|
||||
|
||||
thumb_func_start sub_80D2D78
|
||||
sub_80D2D78: @ 80D2D78
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x18
|
||||
adds r4, r2, 0
|
||||
adds r5, r3, 0
|
||||
ldr r6, [sp, 0x2C]
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
mov r3, sp
|
||||
ldr r2, =gUnknown_0857C570
|
||||
str r2, [sp]
|
||||
movs r2, 0
|
||||
str r2, [sp, 0x4]
|
||||
ldr r2, =gUnknown_0857C5B4
|
||||
str r2, [sp, 0x8]
|
||||
ldr r2, =gUnknown_0857C5E8
|
||||
str r2, [sp, 0xC]
|
||||
str r1, [sp, 0x10]
|
||||
ldr r2, =gMonIconPaletteIndices
|
||||
adds r2, r0, r2
|
||||
ldr r7, =0x0000dac0
|
||||
adds r1, r7, 0
|
||||
ldrb r2, [r2]
|
||||
adds r1, r2
|
||||
strh r1, [r3, 0x14]
|
||||
ldr r1, [sp, 0x30]
|
||||
bl GetMonIconTiles
|
||||
str r0, [sp, 0x4]
|
||||
lsls r4, 16
|
||||
asrs r4, 16
|
||||
lsls r5, 16
|
||||
asrs r5, 16
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
adds r3, r6, 0
|
||||
bl sub_80D31B4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r0, r4, 4
|
||||
adds r0, r4
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
bl sub_80D30DC
|
||||
adds r0, r4, 0
|
||||
add sp, 0x18
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D2D78
|
||||
|
||||
thumb_func_start mon_icon_convert_unown_species_id
|
||||
@ u16 mon_icon_convert_unown_species_id(u16 speciesId, u32 personality)
|
||||
mon_icon_convert_unown_species_id: @ 80D2E08
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
cmp r2, 0xC9
|
||||
bne _080D2E32
|
||||
adds r0, r1, 0
|
||||
bl mon_icon_personality_to_unown_id
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0
|
||||
bne _080D2E24
|
||||
movs r0, 0xC9
|
||||
b _080D2E2E
|
||||
_080D2E24:
|
||||
movs r1, 0xCE
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
_080D2E2E:
|
||||
adds r1, r0, 0
|
||||
b _080D2E40
|
||||
_080D2E32:
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
adds r1, r2, 0
|
||||
cmp r1, r0
|
||||
bls _080D2E40
|
||||
movs r1, 0x82
|
||||
lsls r1, 1
|
||||
_080D2E40:
|
||||
adds r0, r1, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end mon_icon_convert_unown_species_id
|
||||
|
||||
thumb_func_start mon_icon_personality_to_unown_id
|
||||
mon_icon_personality_to_unown_id: @ 80D2E48
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
cmp r2, 0
|
||||
beq _080D2E7E
|
||||
movs r0, 0xC0
|
||||
lsls r0, 18
|
||||
ands r0, r2
|
||||
lsrs r0, 18
|
||||
movs r1, 0xC0
|
||||
lsls r1, 10
|
||||
ands r1, r2
|
||||
lsrs r1, 12
|
||||
orrs r0, r1
|
||||
movs r1, 0xC0
|
||||
lsls r1, 2
|
||||
ands r1, r2
|
||||
lsrs r1, 6
|
||||
orrs r0, r1
|
||||
movs r1, 0x3
|
||||
ands r1, r2
|
||||
orrs r0, r1
|
||||
movs r1, 0x1C
|
||||
bl __umodsi3
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
b _080D2E80
|
||||
_080D2E7E:
|
||||
movs r0, 0
|
||||
_080D2E80:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end mon_icon_personality_to_unown_id
|
||||
|
||||
thumb_func_start sub_80D2E84
|
||||
sub_80D2E84: @ 80D2E84
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
adds r0, r4, 0
|
||||
mov r1, sp
|
||||
bl sub_80D45E8
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0xC9
|
||||
bne _080D2EBA
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _080D2EAA
|
||||
mov r1, sp
|
||||
adds r0, 0xC9
|
||||
b _080D2EB2
|
||||
_080D2EAA:
|
||||
mov r1, sp
|
||||
movs r2, 0xCE
|
||||
lsls r2, 1
|
||||
adds r0, r2
|
||||
_080D2EB2:
|
||||
strh r0, [r1]
|
||||
mov r0, sp
|
||||
ldrh r0, [r0]
|
||||
b _080D2ED2
|
||||
_080D2EBA:
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r4, r0
|
||||
bls _080D2EC6
|
||||
movs r4, 0x82
|
||||
lsls r4, 1
|
||||
_080D2EC6:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl mon_icon_convert_unown_species_id
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
_080D2ED2:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D2E84
|
||||
|
||||
thumb_func_start sub_80D2EDC
|
||||
@ void *sub_80D2EDC(u16 speciesId, u32 personality, bool32)
|
||||
sub_80D2EDC: @ 80D2EDC
|
||||
push {r4,lr}
|
||||
adds r4, r2, 0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl mon_icon_convert_unown_species_id
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
adds r1, r4, 0
|
||||
bl GetMonIconTiles
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D2EDC
|
||||
|
||||
thumb_func_start sub_80D2EF8
|
||||
sub_80D2EF8: @ 80D2EF8
|
||||
push {lr}
|
||||
bl sub_80D328C
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D2EF8
|
||||
|
||||
thumb_func_start sub_80D2F04
|
||||
sub_80D2F04: @ 80D2F04
|
||||
push {r4,r5,lr}
|
||||
movs r4, 0
|
||||
ldr r5, =gMonIconPaletteTable
|
||||
_080D2F0A:
|
||||
lsls r0, r4, 3
|
||||
adds r0, r5
|
||||
bl LoadSpritePalette
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x5
|
||||
bls _080D2F0A
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2F04
|
||||
|
||||
thumb_func_start sub_80D2F28
|
||||
sub_80D2F28: @ 80D2F28
|
||||
push {r4,lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
bls _080D2F3A
|
||||
movs r1, 0x82
|
||||
lsls r1, 1
|
||||
_080D2F3A:
|
||||
ldr r0, =gMonIconPaletteIndices
|
||||
adds r0, r1, r0
|
||||
ldrb r0, [r0]
|
||||
ldr r1, =gMonIconPaletteTable
|
||||
lsls r0, 3
|
||||
adds r4, r0, r1
|
||||
ldrh r0, [r4, 0x4]
|
||||
bl IndexOfSpritePaletteTag
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0xFF
|
||||
bne _080D2F5A
|
||||
adds r0, r4, 0
|
||||
bl LoadSpritePalette
|
||||
_080D2F5A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2F28
|
||||
|
||||
thumb_func_start sub_80D2F68
|
||||
sub_80D2F68: @ 80D2F68
|
||||
push {r4,lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r1, =gMonIconPaletteIndices
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
ldr r1, =gMonIconPaletteTable
|
||||
lsls r0, 3
|
||||
adds r4, r0, r1
|
||||
ldrh r0, [r4, 0x4]
|
||||
bl IndexOfSpritePaletteTag
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0xFF
|
||||
bne _080D2F8E
|
||||
adds r0, r4, 0
|
||||
bl LoadSpritePalette
|
||||
_080D2F8E:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2F68
|
||||
|
||||
thumb_func_start sub_80D2F9C
|
||||
sub_80D2F9C: @ 80D2F9C
|
||||
push {r4,r5,lr}
|
||||
movs r4, 0
|
||||
ldr r5, =gMonIconPaletteTable
|
||||
_080D2FA2:
|
||||
lsls r0, r4, 3
|
||||
adds r0, r5
|
||||
ldrh r0, [r0, 0x4]
|
||||
bl FreeSpritePaletteByTag
|
||||
adds r0, r4, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x5
|
||||
bls _080D2FA2
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2F9C
|
||||
|
||||
thumb_func_start sub_80D2FC0
|
||||
sub_80D2FC0: @ 80D2FC0
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
bls _080D2FD2
|
||||
movs r1, 0x82
|
||||
lsls r1, 1
|
||||
_080D2FD2:
|
||||
ldr r0, =gMonIconPaletteIndices
|
||||
adds r0, r1, r0
|
||||
ldrb r0, [r0]
|
||||
ldr r1, =gMonIconPaletteTable
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldrh r0, [r0, 0x4]
|
||||
bl FreeSpritePaletteByTag
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2FC0
|
||||
|
||||
thumb_func_start sub_80D2FF0
|
||||
sub_80D2FF0: @ 80D2FF0
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r1, =gMonIconPaletteIndices
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
ldr r1, =gMonIconPaletteTable
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldrh r0, [r0, 0x4]
|
||||
bl FreeSpritePaletteByTag
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D2FF0
|
||||
|
||||
thumb_func_start sub_80D3014
|
||||
sub_80D3014: @ 80D3014
|
||||
push {lr}
|
||||
bl sub_80D30DC
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D3014
|
||||
|
||||
thumb_func_start GetMonIconTiles
|
||||
@ void *GetMonIconTiles(u16 speciesId, bool32)
|
||||
GetMonIconTiles: @ 80D3020
|
||||
push {lr}
|
||||
adds r3, r1, 0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r2, =gMonIconTable
|
||||
lsls r1, r0, 2
|
||||
adds r1, r2
|
||||
ldr r2, [r1]
|
||||
movs r1, 0xCD
|
||||
lsls r1, 1
|
||||
cmp r0, r1
|
||||
bne _080D3042
|
||||
cmp r3, 0x1
|
||||
bne _080D3042
|
||||
movs r0, 0x80
|
||||
lsls r0, 3
|
||||
adds r2, r0
|
||||
_080D3042:
|
||||
adds r0, r2, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end GetMonIconTiles
|
||||
|
||||
thumb_func_start sub_80D304C
|
||||
sub_80D304C: @ 80D304C
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
cmp r4, 0xA0
|
||||
bhi _080D3074
|
||||
ldr r6, =gMonIconPaletteTable
|
||||
movs r5, 0x5
|
||||
_080D305A:
|
||||
ldr r0, [r6]
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x10
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
adds r6, 0x8
|
||||
subs r5, 0x1
|
||||
cmp r5, 0
|
||||
bge _080D305A
|
||||
_080D3074:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D304C
|
||||
|
||||
thumb_func_start sub_80D3080
|
||||
sub_80D3080: @ 80D3080
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r1, r0, 16
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r1, r0
|
||||
bls _080D3092
|
||||
movs r1, 0x82
|
||||
lsls r1, 1
|
||||
_080D3092:
|
||||
ldr r0, =gMonIconPaletteIndices
|
||||
adds r0, r1, r0
|
||||
ldrb r0, [r0]
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D3080
|
||||
|
||||
thumb_func_start sub_80D30A0
|
||||
sub_80D30A0: @ 80D30A0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
ldr r1, =gMonIconPaletteIndices
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80D30A0
|
||||
|
||||
thumb_func_start sub_80D30B0
|
||||
sub_80D30B0: @ 80D30B0
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 16
|
||||
movs r0, 0xCE
|
||||
lsls r0, 1
|
||||
cmp r2, r0
|
||||
bls _080D30C2
|
||||
movs r2, 0x82
|
||||
lsls r2, 1
|
||||
_080D30C2:
|
||||
ldr r1, =gMonIconPaletteTable
|
||||
ldr r0, =gMonIconPaletteIndices
|
||||
adds r0, r2, r0
|
||||
ldrb r0, [r0]
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D30B0
|
||||
|
||||
thumb_func_start sub_80D30DC
|
||||
sub_80D30DC: @ 80D30DC
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
adds r4, r0, 0
|
||||
movs r7, 0
|
||||
adds r6, r4, 0
|
||||
adds r6, 0x2C
|
||||
ldrb r2, [r6]
|
||||
movs r0, 0x3F
|
||||
mov r9, r0
|
||||
ands r0, r2
|
||||
cmp r0, 0
|
||||
bne _080D3190
|
||||
movs r1, 0x2A
|
||||
adds r1, r4
|
||||
mov r8, r1
|
||||
ldrb r1, [r1]
|
||||
ldr r0, [r4, 0x8]
|
||||
lsls r1, 2
|
||||
adds r1, r0
|
||||
adds r5, r4, 0
|
||||
adds r5, 0x2B
|
||||
ldrb r0, [r5]
|
||||
ldr r1, [r1]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
ldrsh r3, [r0, r1]
|
||||
movs r0, 0x2
|
||||
negs r0, r0
|
||||
cmp r3, r0
|
||||
beq _080D3126
|
||||
adds r0, 0x1
|
||||
cmp r3, r0
|
||||
bne _080D312A
|
||||
b _080D31A4
|
||||
_080D3126:
|
||||
strb r7, [r5]
|
||||
b _080D31A4
|
||||
_080D312A:
|
||||
ldr r2, =gUnknown_0857C5F0
|
||||
ldrb r1, [r4, 0x3]
|
||||
lsrs r1, 6
|
||||
lsls r1, 1
|
||||
ldrb r0, [r4, 0x1]
|
||||
lsrs r0, 6
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
adds r1, r2
|
||||
ldrh r2, [r1]
|
||||
adds r1, r2, 0
|
||||
muls r1, r3
|
||||
ldr r0, [r4, 0xC]
|
||||
adds r0, r1
|
||||
ldrh r1, [r4, 0x4]
|
||||
lsls r1, 22
|
||||
lsrs r1, 17
|
||||
ldr r3, =0x06010000
|
||||
adds r1, r3
|
||||
bl RequestSpriteCopy
|
||||
mov r0, r8
|
||||
ldrb r1, [r0]
|
||||
ldr r0, [r4, 0x8]
|
||||
lsls r1, 2
|
||||
adds r1, r0
|
||||
ldrb r0, [r5]
|
||||
ldr r1, [r1]
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
lsls r0, 10
|
||||
lsrs r0, 26
|
||||
mov r1, r9
|
||||
ands r1, r0
|
||||
ldrb r2, [r6]
|
||||
movs r0, 0x40
|
||||
negs r0, r0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r6]
|
||||
ldrb r0, [r5]
|
||||
adds r0, 0x1
|
||||
strb r0, [r5]
|
||||
ldrb r7, [r5]
|
||||
b _080D31A4
|
||||
.pool
|
||||
_080D3190:
|
||||
lsls r0, r2, 26
|
||||
lsrs r0, 26
|
||||
subs r0, 0x1
|
||||
movs r1, 0x3F
|
||||
ands r0, r1
|
||||
movs r1, 0x40
|
||||
negs r1, r1
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
strb r1, [r6]
|
||||
_080D31A4:
|
||||
adds r0, r7, 0
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D30DC
|
||||
|
||||
thumb_func_start sub_80D31B4
|
||||
sub_80D31B4: @ 80D31B4
|
||||
push {r4-r6,lr}
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5,r6}
|
||||
sub sp, 0x38
|
||||
mov r9, r0
|
||||
adds r4, r1, 0
|
||||
adds r5, r2, 0
|
||||
mov r8, r3
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
mov r0, r8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
movs r0, 0
|
||||
str r0, [sp, 0x30]
|
||||
ldr r2, =gUnknown_0857C5F0
|
||||
mov r0, r9
|
||||
ldr r6, [r0]
|
||||
ldrb r1, [r6, 0x3]
|
||||
lsrs r1, 6
|
||||
lsls r1, 1
|
||||
ldrb r0, [r6, 0x1]
|
||||
lsrs r0, 6
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
adds r1, r2
|
||||
ldrh r2, [r1]
|
||||
ldr r1, =0xffff0000
|
||||
add r3, sp, 0x30
|
||||
ldr r0, [r3, 0x4]
|
||||
ands r0, r1
|
||||
orrs r0, r2
|
||||
str r0, [r3, 0x4]
|
||||
add r1, sp, 0x18
|
||||
ldr r0, =0x0000ffff
|
||||
strh r0, [r1]
|
||||
mov r0, r9
|
||||
ldrh r2, [r0, 0x14]
|
||||
mov r0, sp
|
||||
adds r0, 0x1A
|
||||
strh r2, [r0]
|
||||
str r6, [sp, 0x1C]
|
||||
mov r2, r9
|
||||
ldr r0, [r2, 0x8]
|
||||
str r0, [sp, 0x20]
|
||||
str r3, [sp, 0x24]
|
||||
ldr r0, [r2, 0xC]
|
||||
str r0, [sp, 0x28]
|
||||
ldr r0, [r2, 0x10]
|
||||
str r0, [sp, 0x2C]
|
||||
mov r0, sp
|
||||
movs r2, 0x18
|
||||
bl memcpy
|
||||
lsls r4, 16
|
||||
asrs r4, 16
|
||||
lsls r5, 16
|
||||
asrs r5, 16
|
||||
mov r0, sp
|
||||
adds r1, r4, 0
|
||||
adds r2, r5, 0
|
||||
mov r3, r8
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r6, =gSprites
|
||||
lsls r3, r0, 4
|
||||
adds r3, r0
|
||||
lsls r3, 2
|
||||
adds r4, r3, r6
|
||||
adds r5, r4, 0
|
||||
adds r5, 0x2C
|
||||
ldrb r1, [r5]
|
||||
movs r2, 0x40
|
||||
orrs r1, r2
|
||||
strb r1, [r5]
|
||||
adds r4, 0x3F
|
||||
ldrb r2, [r4]
|
||||
movs r1, 0x5
|
||||
negs r1, r1
|
||||
ands r1, r2
|
||||
strb r1, [r4]
|
||||
adds r6, 0xC
|
||||
adds r3, r6
|
||||
mov r2, r9
|
||||
ldr r1, [r2, 0x4]
|
||||
str r1, [r3]
|
||||
add sp, 0x38
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D31B4
|
||||
|
||||
thumb_func_start sub_80D328C
|
||||
sub_80D328C: @ 80D328C
|
||||
push {lr}
|
||||
sub sp, 0x8
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
ldr r3, =gUnknown_0857C5F0
|
||||
ldrb r2, [r0, 0x3]
|
||||
lsrs r2, 6
|
||||
lsls r2, 1
|
||||
ldrb r1, [r0, 0x1]
|
||||
lsrs r1, 6
|
||||
lsls r1, 3
|
||||
adds r2, r1
|
||||
adds r2, r3
|
||||
ldrh r3, [r2]
|
||||
ldr r2, =0xffff0000
|
||||
ldr r1, [sp, 0x4]
|
||||
ands r1, r2
|
||||
orrs r1, r3
|
||||
str r1, [sp, 0x4]
|
||||
mov r1, sp
|
||||
str r1, [r0, 0xC]
|
||||
bl DestroySprite
|
||||
add sp, 0x8
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D328C
|
||||
|
||||
thumb_func_start sub_80D32C8
|
||||
sub_80D32C8: @ 80D32C8
|
||||
mov r12, r0
|
||||
adds r0, 0x2A
|
||||
movs r3, 0
|
||||
strb r1, [r0]
|
||||
mov r2, r12
|
||||
adds r2, 0x2C
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x40
|
||||
negs r0, r0
|
||||
ands r0, r1
|
||||
strb r0, [r2]
|
||||
mov r0, r12
|
||||
adds r0, 0x2B
|
||||
strb r3, [r0]
|
||||
bx lr
|
||||
thumb_func_end sub_80D32C8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
7073
asm/rom_80C6FA0.s → asm/pokemon_storage_system.s
Normal file → Executable file
7073
asm/rom_80C6FA0.s → asm/pokemon_storage_system.s
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
13904
asm/pokemon_summary_screen.s
Executable file
13904
asm/pokemon_summary_screen.s
Executable file
File diff suppressed because it is too large
Load Diff
25715
asm/rom_81BE66C.s → asm/pokenav.s
Normal file → Executable file
25715
asm/rom_81BE66C.s → asm/pokenav.s
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
5993
asm/rayquaza_scene.s
Executable file
5993
asm/rayquaza_scene.s
Executable file
File diff suppressed because it is too large
Load Diff
@ -3452,7 +3452,7 @@ _0812480C:
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
ldr r2, =gUnknown_085E8CB4
|
||||
ldr r2, =gText_FlyToWhere
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
|
64
asm/reset_save_heap.s
Normal file
64
asm/reset_save_heap.s
Normal file
@ -0,0 +1,64 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81700F8
|
||||
sub_81700F8: @ 81700F8
|
||||
push {r4,r5,lr}
|
||||
ldr r5, =0x04000208
|
||||
ldrh r4, [r5]
|
||||
movs r0, 0
|
||||
strh r0, [r5]
|
||||
movs r0, 0x1
|
||||
bl RegisterRamReset
|
||||
movs r0, 0
|
||||
movs r1, 0x80
|
||||
bl ClearGpuRegBits
|
||||
strh r4, [r5]
|
||||
ldr r1, =gMain
|
||||
ldr r0, =0x00000439
|
||||
adds r1, r0
|
||||
ldrb r2, [r1]
|
||||
movs r0, 0x3
|
||||
negs r0, r0
|
||||
ands r0, r2
|
||||
strb r0, [r1]
|
||||
bl sub_815355C
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl SetSaveBlocksPointers
|
||||
bl sub_808447C
|
||||
bl ResetSaveCounters
|
||||
movs r0, 0
|
||||
bl sub_81534D0
|
||||
ldr r0, =gSaveFileStatus
|
||||
ldrh r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _08170148
|
||||
cmp r0, 0x2
|
||||
bne _0817014C
|
||||
_08170148:
|
||||
bl Sav2_ClearSetDefault
|
||||
_0817014C:
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x15]
|
||||
lsls r0, 31
|
||||
lsrs r0, 31
|
||||
bl SetPokemonCryStereo
|
||||
ldr r0, =0x02000000
|
||||
movs r1, 0xE0
|
||||
lsls r1, 9
|
||||
bl InitHeap
|
||||
ldr r0, =sub_8086230
|
||||
bl SetMainCallback2
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81700F8
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -10753,7 +10753,7 @@ _0813AE1E:
|
||||
ldrh r0, [r6, 0x22]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r2, =gUnknown_085E8B3A
|
||||
ldr r2, =gText_SelectorArrow
|
||||
mov r3, r9
|
||||
ldrh r1, [r3]
|
||||
lsls r1, 28
|
||||
|
2698
asm/rom_80AEFFC.s
2698
asm/rom_80AEFFC.s
File diff suppressed because it is too large
Load Diff
@ -1,530 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_813C5BC
|
||||
sub_813C5BC: @ 813C5BC
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C5DC
|
||||
ldr r0, =gTasks
|
||||
lsls r1, r2, 2
|
||||
adds r1, r2
|
||||
lsls r1, 3
|
||||
adds r1, r0
|
||||
ldr r0, =sub_813C5EC
|
||||
str r0, [r1]
|
||||
_0813C5DC:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C5BC
|
||||
|
||||
thumb_func_start sub_813C5EC
|
||||
sub_813C5EC: @ 813C5EC
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks
|
||||
adds r4, r1, r0
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C610
|
||||
movs r0, 0x2
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0813C61A
|
||||
_0813C610:
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r0, =sub_813C62C
|
||||
str r0, [r4]
|
||||
_0813C61A:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C5EC
|
||||
|
||||
thumb_func_start sub_813C62C
|
||||
sub_813C62C: @ 813C62C
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
movs r2, 0
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r4, 2
|
||||
adds r0, r4
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_813C664
|
||||
str r1, [r0]
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C62C
|
||||
|
||||
thumb_func_start sub_813C664
|
||||
sub_813C664: @ 813C664
|
||||
push {r4,lr}
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _0813C694
|
||||
ldr r0, =c2_exit_to_overworld_1_continue_scripts_restart_music
|
||||
bl SetMainCallback2
|
||||
ldr r0, =gUnknown_0203AB78
|
||||
ldr r0, [r0]
|
||||
bl Free
|
||||
movs r0, 0
|
||||
bl sub_813C6A8
|
||||
bl FreeAllWindowBuffers
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
_0813C694:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C664
|
||||
|
||||
thumb_func_start sub_813C6A8
|
||||
sub_813C6A8: @ 813C6A8
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
adds r0, r4, 0
|
||||
bl ClearWindowTilemap
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
adds r0, r4, 0
|
||||
bl RemoveWindow
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C6A8
|
||||
|
||||
thumb_func_start sub_813C6D4
|
||||
sub_813C6D4: @ 813C6D4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x8
|
||||
movs r3, 0xC0
|
||||
lsls r3, 19
|
||||
movs r4, 0xC0
|
||||
lsls r4, 9
|
||||
add r0, sp, 0x4
|
||||
mov r8, r0
|
||||
mov r2, sp
|
||||
movs r6, 0
|
||||
ldr r1, =0x040000d4
|
||||
movs r5, 0x80
|
||||
lsls r5, 5
|
||||
ldr r7, =0x81000800
|
||||
movs r0, 0x81
|
||||
lsls r0, 24
|
||||
mov r12, r0
|
||||
_0813C6FA:
|
||||
strh r6, [r2]
|
||||
mov r0, sp
|
||||
str r0, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
str r7, [r1, 0x8]
|
||||
ldr r0, [r1, 0x8]
|
||||
adds r3, r5
|
||||
subs r4, r5
|
||||
cmp r4, r5
|
||||
bhi _0813C6FA
|
||||
strh r6, [r2]
|
||||
mov r2, sp
|
||||
str r2, [r1]
|
||||
str r3, [r1, 0x4]
|
||||
lsrs r0, r4, 1
|
||||
mov r2, r12
|
||||
orrs r0, r2
|
||||
str r0, [r1, 0x8]
|
||||
ldr r0, [r1, 0x8]
|
||||
movs r0, 0xE0
|
||||
lsls r0, 19
|
||||
movs r3, 0x80
|
||||
lsls r3, 3
|
||||
movs r4, 0
|
||||
str r4, [sp, 0x4]
|
||||
ldr r2, =0x040000d4
|
||||
mov r1, r8
|
||||
str r1, [r2]
|
||||
str r0, [r2, 0x4]
|
||||
lsrs r0, r3, 2
|
||||
movs r1, 0x85
|
||||
lsls r1, 24
|
||||
orrs r0, r1
|
||||
str r0, [r2, 0x8]
|
||||
ldr r0, [r2, 0x8]
|
||||
movs r1, 0xA0
|
||||
lsls r1, 19
|
||||
mov r0, sp
|
||||
strh r4, [r0]
|
||||
str r0, [r2]
|
||||
str r1, [r2, 0x4]
|
||||
lsrs r3, 1
|
||||
movs r0, 0x81
|
||||
lsls r0, 24
|
||||
orrs r3, r0
|
||||
str r3, [r2, 0x8]
|
||||
ldr r0, [r2, 0x8]
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x8
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x10
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x12
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xA
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x14
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x16
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xC
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x18
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1A
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0xE
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1C
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x1E
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x40
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x44
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x48
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x4A
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x50
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x52
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
movs r0, 0x54
|
||||
movs r1, 0
|
||||
bl SetGpuReg
|
||||
add sp, 0x8
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C6D4
|
||||
|
||||
thumb_func_start sub_813C80C
|
||||
sub_813C80C: @ 813C80C
|
||||
push {lr}
|
||||
bl remove_some_task
|
||||
bl ResetTasks
|
||||
bl ResetSpriteData
|
||||
bl ResetPaletteFade
|
||||
bl FreeAllSpritePalettes
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C80C
|
||||
|
||||
thumb_func_start sub_813C828
|
||||
sub_813C828: @ 813C828
|
||||
push {lr}
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x1
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x2
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0x3
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C828
|
||||
|
||||
thumb_func_start sub_813C880
|
||||
sub_813C880: @ 813C880
|
||||
push {lr}
|
||||
movs r1, 0x94
|
||||
lsls r1, 4
|
||||
movs r0, 0
|
||||
bl SetGpuReg
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C880
|
||||
|
||||
thumb_func_start sub_813C890
|
||||
sub_813C890: @ 813C890
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r1, =gUnknown_085B3484
|
||||
adds r0, r4, 0
|
||||
movs r2, 0xC0
|
||||
movs r3, 0
|
||||
bl LoadBgTiles
|
||||
ldr r1, =gUnknown_085B3564
|
||||
movs r0, 0x20
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CopyToBgTilemapBufferRect
|
||||
ldr r0, =gUnknown_085B3544
|
||||
movs r1, 0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C890
|
||||
|
||||
thumb_func_start sub_813C8D8
|
||||
sub_813C8D8: @ 813C8D8
|
||||
push {lr}
|
||||
bl LoadOam
|
||||
bl ProcessSpriteCopyRequests
|
||||
bl TransferPlttBuffer
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C8D8
|
||||
|
||||
thumb_func_start sub_813C8EC
|
||||
sub_813C8EC: @ 813C8EC
|
||||
push {lr}
|
||||
bl RunTasks
|
||||
bl AnimateSprites
|
||||
bl BuildOamBuffer
|
||||
bl UpdatePaletteFade
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_813C8EC
|
||||
|
||||
thumb_func_start sub_813C904
|
||||
sub_813C904: @ 813C904
|
||||
push {lr}
|
||||
movs r0, 0
|
||||
bl SetVBlankCallback
|
||||
ldr r0, =sub_813C91C
|
||||
bl SetMainCallback2
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C904
|
||||
|
||||
thumb_func_start sub_813C91C
|
||||
sub_813C91C: @ 813C91C
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
ldr r0, =gMain
|
||||
movs r1, 0x87
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0x7
|
||||
bls _0813C930
|
||||
b _0813CA3C
|
||||
_0813C930:
|
||||
lsls r0, 2
|
||||
ldr r1, =_0813C944
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_0813C944:
|
||||
.4byte _0813C964
|
||||
.4byte _0813C970
|
||||
.4byte _0813C976
|
||||
.4byte _0813C9A8
|
||||
.4byte _0813C9BE
|
||||
.4byte _0813C9DE
|
||||
.4byte _0813C9F0
|
||||
.4byte _0813CA14
|
||||
_0813C964:
|
||||
movs r0, 0
|
||||
bl SetVBlankCallback
|
||||
bl sub_813C6D4
|
||||
b _0813CA00
|
||||
_0813C970:
|
||||
bl sub_813C80C
|
||||
b _0813CA00
|
||||
_0813C976:
|
||||
ldr r4, =gUnknown_0203AB78
|
||||
movs r0, 0x80
|
||||
lsls r0, 4
|
||||
bl AllocZeroed
|
||||
str r0, [r4]
|
||||
movs r0, 0
|
||||
bl ResetBgsAndClearDma3BusyFlags
|
||||
ldr r1, =gUnknown_085B3D64
|
||||
movs r0, 0
|
||||
movs r2, 0x2
|
||||
bl InitBgsFromTemplates
|
||||
ldr r1, [r4]
|
||||
movs r0, 0x3
|
||||
bl SetBgTilemapBuffer
|
||||
bl sub_813C828
|
||||
b _0813CA00
|
||||
.pool
|
||||
_0813C9A8:
|
||||
movs r0, 0x3
|
||||
bl sub_813C890
|
||||
movs r0, 0
|
||||
bl stdpal_get
|
||||
movs r1, 0xF0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
b _0813CA00
|
||||
_0813C9BE:
|
||||
bl IsDma3ManagerBusyWithBgCopy
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
beq _0813CA3C
|
||||
movs r0, 0
|
||||
bl ShowBg
|
||||
movs r0, 0x3
|
||||
bl ShowBg
|
||||
movs r0, 0x3
|
||||
bl CopyBgTilemapBufferToVram
|
||||
b _0813CA00
|
||||
_0813C9DE:
|
||||
ldr r0, =gUnknown_085B3D6C
|
||||
bl InitWindows
|
||||
bl DeactivateAllTextPrinters
|
||||
b _0813CA00
|
||||
.pool
|
||||
_0813C9F0:
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0
|
||||
str r1, [sp]
|
||||
movs r2, 0x10
|
||||
movs r3, 0
|
||||
bl BeginNormalPaletteFade
|
||||
_0813CA00:
|
||||
ldr r1, =gMain
|
||||
movs r0, 0x87
|
||||
lsls r0, 3
|
||||
adds r1, r0
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
b _0813CA3C
|
||||
.pool
|
||||
_0813CA14:
|
||||
bl sub_813C880
|
||||
ldr r0, =sub_813C8D8
|
||||
bl SetVBlankCallback
|
||||
bl sub_81D5C8C
|
||||
ldr r0, =sub_813C5BC
|
||||
movs r1, 0x8
|
||||
bl CreateTask
|
||||
ldr r0, =sub_813C8EC
|
||||
bl SetMainCallback2
|
||||
ldr r0, =gMain
|
||||
movs r1, 0x87
|
||||
lsls r1, 3
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strb r1, [r0]
|
||||
_0813CA3C:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_813C91C
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
83686
asm/rom_818E9AC.s
83686
asm/rom_818E9AC.s
File diff suppressed because it is too large
Load Diff
205
asm/save_location.s
Executable file
205
asm/save_location.s
Executable file
@ -0,0 +1,205 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sav1_are_mapnumbers_in_given_list
|
||||
sav1_are_mapnumbers_in_given_list: @ 81AFC84
|
||||
push {r4,lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
movs r1, 0x4
|
||||
ldrsb r1, [r0, r1]
|
||||
lsls r1, 8
|
||||
ldrb r0, [r0, 0x5]
|
||||
lsls r0, 24
|
||||
asrs r0, 24
|
||||
adds r0, r1
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
ldrh r0, [r2]
|
||||
ldr r1, =0x0000ffff
|
||||
cmp r0, r1
|
||||
beq _081AFCC4
|
||||
adds r4, r1, 0
|
||||
adds r1, r2, 0
|
||||
_081AFCAA:
|
||||
ldrh r0, [r1]
|
||||
cmp r0, r3
|
||||
bne _081AFCBC
|
||||
movs r0, 0x1
|
||||
b _081AFCC6
|
||||
.pool
|
||||
_081AFCBC:
|
||||
adds r1, 0x2
|
||||
ldrh r0, [r1]
|
||||
cmp r0, r4
|
||||
bne _081AFCAA
|
||||
_081AFCC4:
|
||||
movs r0, 0
|
||||
_081AFCC6:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sav1_are_mapnumbers_in_given_list
|
||||
|
||||
thumb_func_start sav1_is_in_pokecenter
|
||||
sav1_is_in_pokecenter: @ 81AFCCC
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_086143BC
|
||||
bl sav1_are_mapnumbers_in_given_list
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sav1_is_in_pokecenter
|
||||
|
||||
thumb_func_start sub_81AFCDC
|
||||
sub_81AFCDC: @ 81AFCDC
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_0861440A
|
||||
bl sav1_are_mapnumbers_in_given_list
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81AFCDC
|
||||
|
||||
thumb_func_start sub_81AFCEC
|
||||
sub_81AFCEC: @ 81AFCEC
|
||||
push {lr}
|
||||
ldr r0, =gUnknown_0861440E
|
||||
bl sav1_are_mapnumbers_in_given_list
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81AFCEC
|
||||
|
||||
thumb_func_start sav2_set_x9_bit3_when_sav1_in_pokecenter
|
||||
sav2_set_x9_bit3_when_sav1_in_pokecenter: @ 81AFCFC
|
||||
push {lr}
|
||||
bl sav1_is_in_pokecenter
|
||||
cmp r0, 0
|
||||
bne _081AFD18
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0xFD
|
||||
ands r0, r1
|
||||
b _081AFD22
|
||||
.pool
|
||||
_081AFD18:
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0x2
|
||||
orrs r0, r1
|
||||
_081AFD22:
|
||||
strb r0, [r2, 0x9]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sav2_set_x9_bit3_when_sav1_in_pokecenter
|
||||
|
||||
thumb_func_start sub_81AFD2C
|
||||
sub_81AFD2C: @ 81AFD2C
|
||||
push {lr}
|
||||
bl sub_81AFCDC
|
||||
cmp r0, 0
|
||||
bne _081AFD48
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0xFB
|
||||
ands r0, r1
|
||||
b _081AFD52
|
||||
.pool
|
||||
_081AFD48:
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0x4
|
||||
orrs r0, r1
|
||||
_081AFD52:
|
||||
strb r0, [r2, 0x9]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81AFD2C
|
||||
|
||||
thumb_func_start sub_81AFD5C
|
||||
sub_81AFD5C: @ 81AFD5C
|
||||
push {lr}
|
||||
bl sub_81AFCEC
|
||||
cmp r0, 0
|
||||
bne _081AFD78
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0xF7
|
||||
ands r0, r1
|
||||
b _081AFD82
|
||||
.pool
|
||||
_081AFD78:
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0x8
|
||||
orrs r0, r1
|
||||
_081AFD82:
|
||||
strb r0, [r2, 0x9]
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81AFD5C
|
||||
|
||||
thumb_func_start sav2_set_x9_depending_on_sav1_map
|
||||
sav2_set_x9_depending_on_sav1_map: @ 81AFD8C
|
||||
push {lr}
|
||||
bl sav2_set_x9_bit3_when_sav1_in_pokecenter
|
||||
bl sub_81AFD2C
|
||||
bl sub_81AFD5C
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sav2_set_x9_depending_on_sav1_map
|
||||
|
||||
thumb_func_start sub_81AFDA0
|
||||
sub_81AFDA0: @ 81AFDA0
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
adds r2, 0xA8
|
||||
ldr r0, [r2]
|
||||
movs r1, 0x80
|
||||
lsls r1, 8
|
||||
orrs r0, r1
|
||||
movs r1, 0x1
|
||||
orrs r0, r1
|
||||
movs r1, 0x2
|
||||
orrs r0, r1
|
||||
movs r1, 0x4
|
||||
orrs r0, r1
|
||||
movs r1, 0x10
|
||||
orrs r0, r1
|
||||
movs r1, 0x20
|
||||
orrs r0, r1
|
||||
movs r1, 0x8
|
||||
orrs r0, r1
|
||||
str r0, [r2]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_81AFDA0
|
||||
|
||||
thumb_func_start sub_81AFDD0
|
||||
sub_81AFDD0: @ 81AFDD0
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r2, [r0]
|
||||
ldrb r1, [r2, 0x9]
|
||||
movs r0, 0x80
|
||||
orrs r0, r1
|
||||
strb r0, [r2, 0x9]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_81AFDD0
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
577
asm/script_movement.s
Executable file
577
asm/script_movement.s
Executable file
@ -0,0 +1,577 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start exec_movement
|
||||
exec_movement: @ 80D32E8
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r3, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
mov r3, sp
|
||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D330A
|
||||
movs r0, 0x1
|
||||
b _080D3332
|
||||
_080D330A:
|
||||
ldr r0, =sub_80D3660
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080D331C
|
||||
movs r0, 0x32
|
||||
bl sub_80D33AC
|
||||
_080D331C:
|
||||
bl sub_80D33F4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, sp
|
||||
ldrb r1, [r1]
|
||||
adds r2, r4, 0
|
||||
bl sub_80D3408
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
_080D3332:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end exec_movement
|
||||
|
||||
thumb_func_start sub_80D3340
|
||||
sub_80D3340: @ 80D3340
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
mov r3, sp
|
||||
bl TryGetFieldObjectIdByLocalIdAndMap
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080D3382
|
||||
bl sub_80D33F4
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
mov r0, sp
|
||||
ldrb r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl sub_80D3474
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0x10
|
||||
beq _080D3382
|
||||
adds r0, r4, 0
|
||||
bl sub_80D3584
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
b _080D3384
|
||||
_080D3382:
|
||||
movs r0, 0x1
|
||||
_080D3384:
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D3340
|
||||
|
||||
thumb_func_start sub_80D338C
|
||||
sub_80D338C: @ 80D338C
|
||||
push {r4,lr}
|
||||
bl sub_80D33F4
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0xFF
|
||||
beq _080D33A6
|
||||
adds r0, r4, 0
|
||||
bl sub_80D361C
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
_080D33A6:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D338C
|
||||
|
||||
thumb_func_start sub_80D33AC
|
||||
sub_80D33AC: @ 80D33AC
|
||||
push {r4,r5,lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
ldr r0, =sub_80D3660
|
||||
bl CreateTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
movs r2, 0x1
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r3, r1, 3
|
||||
ldr r5, =gTasks + 0x8
|
||||
ldr r0, =0x0000ffff
|
||||
adds r4, r0, 0
|
||||
_080D33CC:
|
||||
lsls r0, r2, 1
|
||||
adds r0, r3
|
||||
adds r0, r5
|
||||
ldrh r1, [r0]
|
||||
orrs r1, r4
|
||||
strh r1, [r0]
|
||||
adds r0, r2, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
cmp r2, 0xF
|
||||
bls _080D33CC
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D33AC
|
||||
|
||||
thumb_func_start sub_80D33F4
|
||||
sub_80D33F4: @ 80D33F4
|
||||
push {lr}
|
||||
ldr r0, =sub_80D3660
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80D33F4
|
||||
|
||||
thumb_func_start sub_80D3408
|
||||
sub_80D3408: @ 80D3408
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
mov r9, r2
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
adds r7, r5, 0
|
||||
lsls r1, 24
|
||||
lsrs r6, r1, 24
|
||||
mov r8, r6
|
||||
adds r0, r5, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_80D3474
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x10
|
||||
beq _080D3444
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_80D3584
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D3464
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r6, 0
|
||||
b _080D345A
|
||||
_080D3444:
|
||||
adds r0, r7, 0
|
||||
movs r1, 0xFF
|
||||
bl sub_80D3474
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 24
|
||||
cmp r4, 0x10
|
||||
beq _080D3464
|
||||
adds r0, r7, 0
|
||||
adds r1, r4, 0
|
||||
mov r2, r8
|
||||
_080D345A:
|
||||
mov r3, r9
|
||||
bl sub_80D35DC
|
||||
movs r0, 0
|
||||
b _080D3466
|
||||
_080D3464:
|
||||
movs r0, 0x1
|
||||
_080D3466:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D3408
|
||||
|
||||
thumb_func_start sub_80D3474
|
||||
sub_80D3474: @ 80D3474
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r3, r1, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks + 0x8
|
||||
adds r1, r0
|
||||
adds r1, 0x2
|
||||
movs r2, 0
|
||||
_080D348C:
|
||||
ldrb r0, [r1]
|
||||
cmp r0, r3
|
||||
bne _080D349C
|
||||
adds r0, r2, 0
|
||||
b _080D34AA
|
||||
.pool
|
||||
_080D349C:
|
||||
adds r0, r2, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
adds r1, 0x1
|
||||
cmp r2, 0xF
|
||||
bls _080D348C
|
||||
movs r0, 0x10
|
||||
_080D34AA:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D3474
|
||||
|
||||
thumb_func_start sub_80D34B0
|
||||
sub_80D34B0: @ 80D34B0
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r3, r1, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks + 0x8
|
||||
adds r1, r0
|
||||
adds r1, 0x2
|
||||
str r1, [r2]
|
||||
movs r0, 0
|
||||
cmp r0, r3
|
||||
bcs _080D34DC
|
||||
_080D34CE:
|
||||
adds r0, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r1, 0x1
|
||||
cmp r0, r3
|
||||
bcc _080D34CE
|
||||
str r1, [r2]
|
||||
_080D34DC:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D34B0
|
||||
|
||||
thumb_func_start sub_80D34E4
|
||||
sub_80D34E4: @ 80D34E4
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r2, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
mov r2, sp
|
||||
bl sub_80D34B0
|
||||
ldr r0, [sp]
|
||||
strb r4, [r0]
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D34E4
|
||||
|
||||
thumb_func_start sub_80D3508
|
||||
sub_80D3508: @ 80D3508
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r2, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r2, sp
|
||||
bl sub_80D34B0
|
||||
ldr r0, [sp]
|
||||
ldrb r0, [r0]
|
||||
strb r0, [r4]
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D3508
|
||||
|
||||
thumb_func_start sub_80D352C
|
||||
sub_80D352C: @ 80D352C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
ldr r2, =gBitTable
|
||||
lsrs r1, 22
|
||||
adds r1, r2
|
||||
ldr r2, [r1]
|
||||
mvns r2, r2
|
||||
lsls r2, 16
|
||||
lsrs r2, 16
|
||||
ldr r3, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r1, r3
|
||||
ldrh r0, [r1, 0x8]
|
||||
ands r2, r0
|
||||
strh r2, [r1, 0x8]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80D352C
|
||||
|
||||
thumb_func_start sub_80D355C
|
||||
sub_80D355C: @ 80D355C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
ldr r3, =gTasks
|
||||
lsls r2, r0, 2
|
||||
adds r2, r0
|
||||
lsls r2, 3
|
||||
adds r2, r3
|
||||
ldr r0, =gBitTable
|
||||
lsrs r1, 22
|
||||
adds r1, r0
|
||||
ldr r0, [r1]
|
||||
ldrh r1, [r2, 0x8]
|
||||
orrs r0, r1
|
||||
strh r0, [r2, 0x8]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80D355C
|
||||
|
||||
thumb_func_start sub_80D3584
|
||||
sub_80D3584: @ 80D3584
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, 24
|
||||
ldr r3, =gTasks
|
||||
lsls r2, r0, 2
|
||||
adds r2, r0
|
||||
lsls r2, 3
|
||||
adds r2, r3
|
||||
ldr r0, =gBitTable
|
||||
lsrs r1, 22
|
||||
adds r1, r0
|
||||
ldr r0, [r1]
|
||||
ldrh r1, [r2, 0x8]
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _080D35B4
|
||||
movs r0, 0
|
||||
b _080D35B6
|
||||
.pool
|
||||
_080D35B4:
|
||||
movs r0, 0x1
|
||||
_080D35B6:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80D3584
|
||||
|
||||
thumb_func_start npc_obj_offscreen_culling_and_flag_update
|
||||
npc_obj_offscreen_culling_and_flag_update: @ 80D35BC
|
||||
lsls r0, 24
|
||||
ldr r2, =gUnknown_02039D90
|
||||
lsrs r0, 22
|
||||
adds r0, r2
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end npc_obj_offscreen_culling_and_flag_update
|
||||
|
||||
thumb_func_start sub_80D35CC
|
||||
sub_80D35CC: @ 80D35CC
|
||||
lsls r0, 24
|
||||
ldr r1, =gUnknown_02039D90
|
||||
lsrs r0, 22
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_80D35CC
|
||||
|
||||
thumb_func_start sub_80D35DC
|
||||
sub_80D35DC: @ 80D35DC
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
adds r5, r0, 0
|
||||
adds r4, r1, 0
|
||||
adds r6, r2, 0
|
||||
mov r8, r3
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r6, 24
|
||||
lsrs r6, 24
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_80D352C
|
||||
adds r0, r4, 0
|
||||
mov r1, r8
|
||||
bl npc_obj_offscreen_culling_and_flag_update
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
adds r2, r6, 0
|
||||
bl sub_80D34E4
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D35DC
|
||||
|
||||
thumb_func_start sub_80D361C
|
||||
sub_80D361C: @ 80D361C
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
ldr r0, =gTasks + 0x8
|
||||
adds r1, r0
|
||||
adds r4, r1, 0x2
|
||||
movs r5, 0
|
||||
_080D3630:
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0xFF
|
||||
beq _080D3646
|
||||
adds r1, r0, 0
|
||||
lsls r0, r1, 3
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gMapObjects
|
||||
adds r0, r1
|
||||
bl npc_sync_anim_pause_bits
|
||||
_080D3646:
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
adds r4, 0x1
|
||||
cmp r5, 0xF
|
||||
bls _080D3630
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80D361C
|
||||
|
||||
thumb_func_start sub_80D3660
|
||||
sub_80D3660: @ 80D3660
|
||||
push {r4-r7,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
movs r5, 0
|
||||
mov r6, sp
|
||||
_080D366C:
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
mov r2, sp
|
||||
bl sub_80D3508
|
||||
ldrb r0, [r6]
|
||||
cmp r0, 0xFF
|
||||
beq _080D3690
|
||||
adds r4, r0, 0
|
||||
adds r0, r5, 0
|
||||
bl sub_80D35CC
|
||||
adds r3, r0, 0
|
||||
adds r0, r7, 0
|
||||
adds r1, r5, 0
|
||||
adds r2, r4, 0
|
||||
bl sub_80D36A4
|
||||
_080D3690:
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0xF
|
||||
bls _080D366C
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D3660
|
||||
|
||||
thumb_func_start sub_80D36A4
|
||||
sub_80D36A4: @ 80D36A4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r5, r3, 0
|
||||
lsls r0, 24
|
||||
lsrs r7, r0, 24
|
||||
lsls r1, 24
|
||||
lsrs r6, r1, 24
|
||||
mov r8, r6
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
lsls r0, r2, 3
|
||||
adds r0, r2
|
||||
lsls r0, 2
|
||||
ldr r1, =gMapObjects
|
||||
adds r4, r0, r1
|
||||
adds r0, r4, 0
|
||||
bl FieldObjectIsSpecialAnimActive
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D36DC
|
||||
adds r0, r4, 0
|
||||
bl FieldObjectClearAnimIfSpecialAnimFinished
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _080D370E
|
||||
_080D36DC:
|
||||
ldrb r1, [r5]
|
||||
cmp r1, 0xFE
|
||||
bne _080D36F8
|
||||
adds r0, r7, 0
|
||||
adds r1, r6, 0
|
||||
bl sub_80D355C
|
||||
adds r0, r4, 0
|
||||
bl sub_8097404
|
||||
b _080D370E
|
||||
.pool
|
||||
_080D36F8:
|
||||
adds r0, r4, 0
|
||||
bl FieldObjectSetSpecialAnim
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _080D370E
|
||||
adds r5, 0x1
|
||||
mov r0, r8
|
||||
adds r1, r5, 0
|
||||
bl npc_obj_offscreen_culling_and_flag_update
|
||||
_080D370E:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80D36A4
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -2268,7 +2268,7 @@ _080E9D7C:
|
||||
ldr r1, [r4]
|
||||
lsls r3, r6, 3
|
||||
adds r2, r1, r3
|
||||
ldr r0, =gUnknown_085E8CF0
|
||||
ldr r0, =gText_Cancel
|
||||
str r0, [r2]
|
||||
adds r1, 0x4
|
||||
adds r1, r3
|
||||
|
@ -589,7 +589,7 @@ _080DFF78:
|
||||
lsls r5, r6, 4
|
||||
ldr r0, [r4]
|
||||
adds r0, r5
|
||||
ldr r1, =gUnknown_085E8CF7
|
||||
ldr r1, =gText_Cancel2
|
||||
bl StringCopy
|
||||
ldr r2, =gUnknown_02039F74
|
||||
ldr r0, [r2]
|
||||
@ -927,7 +927,7 @@ BuyMenuPrintCursor: @ 80E0250
|
||||
adds r3, r0, 0
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
ldr r1, =gUnknown_085E8D60
|
||||
ldr r1, =gText_SelectorArrow2
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
@ -2642,7 +2642,7 @@ BuyMenuPrintItemQuantityAndPrice: @ 80E10EC
|
||||
movs r3, 0x2
|
||||
bl ConvertIntToDecimalStringN
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gUnknown_085E8DA0
|
||||
ldr r1, =gText_xVar1
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
movs r0, 0
|
||||
|
214
asm/smokescreen.s
Executable file
214
asm/smokescreen.s
Executable file
@ -0,0 +1,214 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_807521C
|
||||
sub_807521C: @ 807521C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r7, r1, 16
|
||||
lsls r2, 24
|
||||
lsrs r4, r2, 24
|
||||
ldr r5, =gUnknown_0831C620
|
||||
ldrh r0, [r5, 0x6]
|
||||
bl GetSpriteTileStartByTag
|
||||
lsls r0, 16
|
||||
ldr r1, =0xffff0000
|
||||
cmp r0, r1
|
||||
bne _0807524E
|
||||
adds r0, r5, 0
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
ldr r0, =gUnknown_0831C628
|
||||
bl LoadCompressedObjectPaletteUsingHeap
|
||||
_0807524E:
|
||||
ldr r0, =sub_8075370
|
||||
bl CreateInvisibleSpriteWithCallback
|
||||
mov r8, r0
|
||||
mov r0, r8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r5, r0, 4
|
||||
add r5, r8
|
||||
lsls r5, 2
|
||||
ldr r0, =gSprites
|
||||
adds r5, r0
|
||||
strh r4, [r5, 0x30]
|
||||
ldr r0, =gUnknown_0831C688
|
||||
mov r9, r0
|
||||
lsls r6, 16
|
||||
asrs r0, r6, 16
|
||||
mov r10, r0
|
||||
ldr r0, =0xfff00000
|
||||
adds r6, r0
|
||||
asrs r6, 16
|
||||
lsls r4, r7, 16
|
||||
asrs r7, r4, 16
|
||||
adds r4, r0
|
||||
asrs r4, 16
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 4
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
ldr r0, =gSprites
|
||||
adds r1, r0
|
||||
mov r0, r8
|
||||
strh r0, [r1, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r1, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
mov r1, r10
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
mov r1, r10
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x3
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_807521C
|
||||
|
||||
thumb_func_start sub_8075370
|
||||
sub_8075370: @ 8075370
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
movs r1, 0x2E
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _080753A8
|
||||
ldr r0, =gUnknown_0831C620
|
||||
ldrh r0, [r0, 0x6]
|
||||
bl FreeSpriteTilesByTag
|
||||
ldr r0, =gUnknown_0831C628
|
||||
ldrh r0, [r0, 0x4]
|
||||
bl FreeSpritePaletteByTag
|
||||
movs r1, 0x30
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _080753A4
|
||||
adds r0, r4, 0
|
||||
bl DestroySprite
|
||||
b _080753A8
|
||||
.pool
|
||||
_080753A4:
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x1C]
|
||||
_080753A8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8075370
|
||||
|
||||
thumb_func_start sub_80753B4
|
||||
sub_80753B4: @ 80753B4
|
||||
push {lr}
|
||||
adds r3, r0, 0
|
||||
adds r0, 0x3F
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _080753DE
|
||||
ldr r2, =gSprites
|
||||
movs r0, 0x2E
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrh r1, [r0, 0x2E]
|
||||
subs r1, 0x1
|
||||
strh r1, [r0, 0x2E]
|
||||
adds r0, r3, 0
|
||||
bl DestroySprite
|
||||
_080753DE:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80753B4
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -328,7 +328,7 @@ sub_81341FC: @ 81341FC
|
||||
movs r1, 0
|
||||
movs r3, 0xD
|
||||
bl SetWindowBorderStyle
|
||||
ldr r2, =gUnknown_085E8C53
|
||||
ldr r2, =gText_BirchInTrouble
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
@ -507,7 +507,7 @@ sub_8134390: @ 8134390
|
||||
movs r0, 0
|
||||
movs r1, 0x11
|
||||
bl FillWindowPixelBuffer
|
||||
ldr r2, =gUnknown_085E8C90
|
||||
ldr r2, =gText_ConfirmStarterChoice
|
||||
movs r0, 0x1
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
|
@ -92,7 +92,7 @@ sub_8133A78: @ 8133A78
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
adds r6, r0, 0
|
||||
ldr r1, =gUnknown_085E8D38
|
||||
ldr r1, =gText_FiveMarks
|
||||
movs r0, 0x1
|
||||
movs r2, 0
|
||||
bl GetStringWidth
|
||||
@ -163,7 +163,7 @@ _08133B3C:
|
||||
movs r1, 0
|
||||
str r1, [sp, 0x8]
|
||||
movs r1, 0x1
|
||||
ldr r2, =gUnknown_085E8D38
|
||||
ldr r2, =gText_FiveMarks
|
||||
movs r3, 0x8
|
||||
bl PrintTextOnWindow
|
||||
b _08133B94
|
||||
|
206
asm/trainer_rematch.s
Executable file
206
asm/trainer_rematch.s
Executable file
@ -0,0 +1,206 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81DA57C
|
||||
sub_81DA57C: @ 81DA57C
|
||||
push {lr}
|
||||
ldr r0, =0x00000864
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA5CA
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x64
|
||||
bl __umodsi3
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x1E
|
||||
bhi _081DA5CA
|
||||
movs r0, 0x5B
|
||||
bl FlagGet
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081DA5C0
|
||||
ldr r0, =gUnknown_0862AD34
|
||||
movs r1, 0x8
|
||||
movs r2, 0x5
|
||||
bl sub_81DA5D4
|
||||
b _081DA5CA
|
||||
.pool
|
||||
_081DA5C0:
|
||||
ldr r0, =gUnknown_0862AD44
|
||||
movs r1, 0x7
|
||||
movs r2, 0x1
|
||||
bl sub_81DA5D4
|
||||
_081DA5CA:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA57C
|
||||
|
||||
thumb_func_start sub_81DA5D4
|
||||
sub_81DA5D4: @ 81DA5D4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x8
|
||||
mov r9, r0
|
||||
adds r7, r1, 0
|
||||
mov r10, r2
|
||||
movs r6, 0
|
||||
movs r0, 0x5
|
||||
mov r8, r0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA61C
|
||||
mov r4, r9
|
||||
_081DA5F4:
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r4]
|
||||
ldr r2, =0x000009ca
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA614
|
||||
adds r0, r1, 0
|
||||
bl sub_81DA6CC
|
||||
cmp r8, r0
|
||||
ble _081DA612
|
||||
mov r8, r0
|
||||
_081DA612:
|
||||
adds r6, 0x1
|
||||
_081DA614:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA5F4
|
||||
_081DA61C:
|
||||
cmp r6, 0
|
||||
beq _081DA6BA
|
||||
cmp r8, r10
|
||||
bhi _081DA6BA
|
||||
movs r6, 0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA654
|
||||
mov r4, r9
|
||||
_081DA62E:
|
||||
ldr r0, =gSaveBlock1Ptr
|
||||
ldr r0, [r0]
|
||||
ldrh r1, [r4]
|
||||
ldr r2, =0x000009ca
|
||||
adds r0, r2
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA64C
|
||||
adds r0, r1, 0
|
||||
bl sub_81DA6CC
|
||||
cmp r0, r8
|
||||
bne _081DA64C
|
||||
adds r6, 0x1
|
||||
_081DA64C:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA62E
|
||||
_081DA654:
|
||||
cmp r6, 0
|
||||
beq _081DA6BA
|
||||
bl Random
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
adds r1, r6, 0
|
||||
bl __modsi3
|
||||
adds r6, r0, 0
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081DA6BA
|
||||
ldr r2, =gSaveBlock1Ptr
|
||||
ldr r3, =0x000009ca
|
||||
mov r4, r9
|
||||
_081DA674:
|
||||
ldr r0, [r2]
|
||||
ldrh r1, [r4]
|
||||
adds r0, r3
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _081DA6B2
|
||||
adds r0, r1, 0
|
||||
str r2, [sp]
|
||||
str r3, [sp, 0x4]
|
||||
bl sub_81DA6CC
|
||||
ldr r2, [sp]
|
||||
ldr r3, [sp, 0x4]
|
||||
cmp r0, r8
|
||||
bne _081DA6B2
|
||||
cmp r6, 0
|
||||
bne _081DA6B0
|
||||
ldr r0, [r2]
|
||||
adds r0, r3
|
||||
ldrh r4, [r4]
|
||||
adds r0, r4
|
||||
mov r1, r8
|
||||
strb r1, [r0]
|
||||
b _081DA6BA
|
||||
.pool
|
||||
_081DA6B0:
|
||||
subs r6, 0x1
|
||||
_081DA6B2:
|
||||
adds r4, 0x2
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081DA674
|
||||
_081DA6BA:
|
||||
add sp, 0x8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DA5D4
|
||||
|
||||
thumb_func_start sub_81DA6CC
|
||||
sub_81DA6CC: @ 81DA6CC
|
||||
push {r4-r6,lr}
|
||||
adds r5, r0, 0
|
||||
movs r4, 0
|
||||
ldr r6, =gUnknown_085500A4
|
||||
_081DA6D4:
|
||||
lsls r0, r4, 1
|
||||
lsls r1, r5, 4
|
||||
adds r0, r1
|
||||
adds r0, r6
|
||||
ldrh r0, [r0]
|
||||
bl trainer_flag_check
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DA6F0
|
||||
adds r0, r4, 0
|
||||
b _081DA6F8
|
||||
.pool
|
||||
_081DA6F0:
|
||||
adds r4, 0x1
|
||||
cmp r4, 0x4
|
||||
ble _081DA6D4
|
||||
movs r0, 0x5
|
||||
_081DA6F8:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DA6CC
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
607
asm/unk_sprite_file.s
Executable file
607
asm/unk_sprite_file.s
Executable file
@ -0,0 +1,607 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81DA700
|
||||
sub_81DA700: @ 81DA700
|
||||
push {lr}
|
||||
sub sp, 0x8
|
||||
add r1, sp, 0x4
|
||||
mov r0, sp
|
||||
bl sub_8149F58
|
||||
ldr r0, =gUnknown_0862AD54
|
||||
ldr r1, [sp, 0x4]
|
||||
bl LZ77UnCompVram
|
||||
ldr r0, =gUnknown_0862AF30
|
||||
ldr r1, [sp]
|
||||
bl LZ77UnCompVram
|
||||
ldr r0, =gUnknown_0862B53C
|
||||
movs r1, 0xF0
|
||||
movs r2, 0x20
|
||||
bl LoadPalette
|
||||
ldr r0, =gUnknown_0862B724
|
||||
bl LoadCompressedObjectPic
|
||||
ldr r0, =gUnknown_0862B72C
|
||||
bl LoadSpritePalette
|
||||
add sp, 0x8
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA700
|
||||
|
||||
thumb_func_start sub_81DA74C
|
||||
sub_81DA74C: @ 81DA74C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x4
|
||||
adds r5, r0, 0
|
||||
adds r6, r1, 0
|
||||
ldr r0, [sp, 0x24]
|
||||
ldr r1, [sp, 0x28]
|
||||
ldr r4, [sp, 0x2C]
|
||||
lsls r2, 24
|
||||
lsrs r2, 24
|
||||
str r2, [sp]
|
||||
lsls r3, 24
|
||||
lsrs r3, 24
|
||||
mov r10, r3
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
mov r9, r1
|
||||
lsls r4, 24
|
||||
lsrs r7, r4, 24
|
||||
ldr r0, =gUnknown_0862B758
|
||||
lsls r5, 16
|
||||
asrs r5, 16
|
||||
lsls r6, 16
|
||||
asrs r6, 16
|
||||
adds r1, r5, 0
|
||||
adds r2, r6, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r7, 0x1
|
||||
beq _081DA7D0
|
||||
cmp r7, 0x1
|
||||
bgt _081DA7A8
|
||||
cmp r7, 0
|
||||
beq _081DA7B8
|
||||
b _081DA7AC
|
||||
.pool
|
||||
_081DA7A8:
|
||||
cmp r7, 0x2
|
||||
beq _081DA7E4
|
||||
_081DA7AC:
|
||||
ldr r6, =gSprites
|
||||
lsls r3, r5, 4
|
||||
b _081DA7F8
|
||||
.pool
|
||||
_081DA7B8:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r5, 4
|
||||
adds r0, r3, r5
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x78
|
||||
strh r1, [r0, 0x2E]
|
||||
movs r1, 0x2D
|
||||
b _081DA7F4
|
||||
.pool
|
||||
_081DA7D0:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r5, 4
|
||||
adds r0, r3, r5
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x59
|
||||
b _081DA7F0
|
||||
.pool
|
||||
_081DA7E4:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r5, 4
|
||||
adds r0, r3, r5
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x97
|
||||
_081DA7F0:
|
||||
strh r1, [r0, 0x2E]
|
||||
movs r1, 0x61
|
||||
_081DA7F4:
|
||||
strh r1, [r0, 0x30]
|
||||
adds r6, r2, 0
|
||||
_081DA7F8:
|
||||
adds r4, r3, r5
|
||||
lsls r4, 2
|
||||
adds r0, r4, r6
|
||||
mov r2, r8
|
||||
lsls r1, r2, 24
|
||||
asrs r1, 24
|
||||
movs r2, 0
|
||||
strh r1, [r0, 0x32]
|
||||
mov r3, r9
|
||||
lsls r1, r3, 24
|
||||
asrs r1, 24
|
||||
strh r1, [r0, 0x34]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1]
|
||||
strh r1, [r0, 0x3A]
|
||||
mov r3, r10
|
||||
strh r3, [r0, 0x3C]
|
||||
strh r2, [r0, 0x36]
|
||||
strh r2, [r0, 0x38]
|
||||
adds r1, r7, 0
|
||||
bl StartSpriteAnim
|
||||
adds r0, r6, 0
|
||||
adds r0, 0x1C
|
||||
adds r4, r0
|
||||
ldr r0, =sub_81DA848
|
||||
str r0, [r4]
|
||||
adds r0, r5, 0
|
||||
add sp, 0x4
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DA74C
|
||||
|
||||
thumb_func_start sub_81DA848
|
||||
sub_81DA848: @ 81DA848
|
||||
push {r4,r5,lr}
|
||||
adds r3, r0, 0
|
||||
adds r2, r3, 0
|
||||
adds r2, 0x2E
|
||||
movs r0, 0x20
|
||||
ldrsh r1, [r3, r0]
|
||||
movs r4, 0x2E
|
||||
ldrsh r0, [r3, r4]
|
||||
cmp r1, r0
|
||||
bne _081DA874
|
||||
movs r5, 0x22
|
||||
ldrsh r1, [r3, r5]
|
||||
movs r4, 0x2
|
||||
ldrsh r0, [r2, r4]
|
||||
cmp r1, r0
|
||||
bne _081DA874
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r3, 0x1C]
|
||||
b _081DA8B4
|
||||
.pool
|
||||
_081DA874:
|
||||
ldrh r4, [r2, 0x8]
|
||||
movs r5, 0x8
|
||||
ldrsh r1, [r2, r5]
|
||||
movs r5, 0xC
|
||||
ldrsh r0, [r2, r5]
|
||||
cmp r1, r0
|
||||
bne _081DA890
|
||||
ldrh r0, [r2, 0x4]
|
||||
ldrh r1, [r3, 0x20]
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strh r0, [r3, 0x20]
|
||||
strh r1, [r2, 0x8]
|
||||
b _081DA894
|
||||
_081DA890:
|
||||
adds r0, r4, 0x1
|
||||
strh r0, [r2, 0x8]
|
||||
_081DA894:
|
||||
ldrh r4, [r2, 0xA]
|
||||
movs r5, 0xA
|
||||
ldrsh r1, [r2, r5]
|
||||
movs r5, 0xE
|
||||
ldrsh r0, [r2, r5]
|
||||
cmp r1, r0
|
||||
bne _081DA8B0
|
||||
ldrh r0, [r2, 0x6]
|
||||
ldrh r1, [r3, 0x22]
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
strh r0, [r3, 0x22]
|
||||
strh r1, [r2, 0xA]
|
||||
b _081DA8B4
|
||||
_081DA8B0:
|
||||
adds r0, r4, 0x1
|
||||
strh r0, [r2, 0xA]
|
||||
_081DA8B4:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81DA848
|
||||
|
||||
thumb_func_start sub_81DA8BC
|
||||
sub_81DA8BC: @ 81DA8BC
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0xC
|
||||
adds r6, r0, 0
|
||||
mov r8, r1
|
||||
ldr r0, [sp, 0x2C]
|
||||
ldr r1, [sp, 0x30]
|
||||
ldr r4, [sp, 0x34]
|
||||
ldr r5, [sp, 0x38]
|
||||
lsls r2, 16
|
||||
lsrs r2, 16
|
||||
str r2, [sp]
|
||||
lsls r3, 16
|
||||
lsrs r3, 16
|
||||
str r3, [sp, 0x4]
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
mov r10, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
mov r9, r1
|
||||
lsls r4, 16
|
||||
lsrs r7, r4, 16
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
ldr r0, =gUnknown_0862B758
|
||||
lsls r6, 16
|
||||
asrs r6, 16
|
||||
mov r1, r8
|
||||
lsls r1, 16
|
||||
asrs r1, 16
|
||||
mov r8, r1
|
||||
adds r1, r6, 0
|
||||
mov r2, r8
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
cmp r5, 0x1
|
||||
beq _081DA94C
|
||||
cmp r5, 0x1
|
||||
bgt _081DA924
|
||||
cmp r5, 0
|
||||
beq _081DA934
|
||||
b _081DA928
|
||||
.pool
|
||||
_081DA924:
|
||||
cmp r5, 0x2
|
||||
beq _081DA960
|
||||
_081DA928:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r6, 4
|
||||
b _081DA972
|
||||
.pool
|
||||
_081DA934:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r6, 4
|
||||
adds r0, r3, r6
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x78
|
||||
strh r1, [r0, 0x2E]
|
||||
movs r1, 0x2D
|
||||
b _081DA970
|
||||
.pool
|
||||
_081DA94C:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r6, 4
|
||||
adds r0, r3, r6
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x59
|
||||
b _081DA96C
|
||||
.pool
|
||||
_081DA960:
|
||||
ldr r2, =gSprites
|
||||
lsls r3, r6, 4
|
||||
adds r0, r3, r6
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
movs r1, 0x97
|
||||
_081DA96C:
|
||||
strh r1, [r0, 0x2E]
|
||||
movs r1, 0x61
|
||||
_081DA970:
|
||||
strh r1, [r0, 0x30]
|
||||
_081DA972:
|
||||
adds r4, r3, r6
|
||||
lsls r4, 2
|
||||
adds r0, r4, r2
|
||||
mov r3, sp
|
||||
ldrh r3, [r3]
|
||||
strh r3, [r0, 0x32]
|
||||
mov r1, sp
|
||||
ldrh r1, [r1, 0x4]
|
||||
strh r1, [r0, 0x34]
|
||||
mov r3, r10
|
||||
strh r3, [r0, 0x36]
|
||||
mov r1, r9
|
||||
strh r1, [r0, 0x38]
|
||||
strh r7, [r0, 0x3A]
|
||||
adds r1, r5, 0
|
||||
str r2, [sp, 0x8]
|
||||
bl StartSpriteAnim
|
||||
ldr r2, [sp, 0x8]
|
||||
adds r0, r2, 0
|
||||
adds r0, 0x1C
|
||||
adds r4, r0
|
||||
ldr r0, =sub_81DA9BC
|
||||
str r0, [r4]
|
||||
adds r0, r6, 0
|
||||
add sp, 0xC
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DA8BC
|
||||
|
||||
thumb_func_start sub_81DA9BC
|
||||
sub_81DA9BC: @ 81DA9BC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrh r0, [r4, 0x32]
|
||||
bl Sin2
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
movs r2, 0x36
|
||||
ldrsh r1, [r4, r2]
|
||||
muls r0, r1
|
||||
asrs r0, 12
|
||||
strh r0, [r4, 0x24]
|
||||
ldrh r0, [r4, 0x32]
|
||||
bl Cos2
|
||||
lsls r0, 16
|
||||
asrs r0, 16
|
||||
movs r3, 0x36
|
||||
ldrsh r1, [r4, r3]
|
||||
muls r0, r1
|
||||
asrs r0, 12
|
||||
strh r0, [r4, 0x26]
|
||||
movs r1, 0x32
|
||||
ldrsh r0, [r4, r1]
|
||||
movs r2, 0x34
|
||||
ldrsh r1, [r4, r2]
|
||||
adds r0, r1
|
||||
movs r1, 0xB4
|
||||
lsls r1, 1
|
||||
bl __modsi3
|
||||
strh r0, [r4, 0x32]
|
||||
ldrh r2, [r4, 0x36]
|
||||
movs r3, 0x36
|
||||
ldrsh r1, [r4, r3]
|
||||
movs r3, 0x38
|
||||
ldrsh r0, [r4, r3]
|
||||
cmp r1, r0
|
||||
beq _081DAA12
|
||||
ldrh r0, [r4, 0x3A]
|
||||
adds r0, r2, r0
|
||||
strh r0, [r4, 0x36]
|
||||
b _081DAA16
|
||||
_081DAA12:
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x1C]
|
||||
_081DAA16:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DA9BC
|
||||
|
||||
thumb_func_start sub_81DAA20
|
||||
sub_81DAA20: @ 81DAA20
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
ldr r4, =0x00002e90
|
||||
adds r0, r4, 0
|
||||
bl FreeSpriteTilesByTag
|
||||
adds r0, r4, 0
|
||||
bl FreeSpritePaletteByTag
|
||||
movs r0, 0x10
|
||||
ldrsh r1, [r5, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r4, =gSprites
|
||||
adds r0, r4
|
||||
bl DestroySprite
|
||||
movs r0, 0x12
|
||||
ldrsh r1, [r5, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4
|
||||
bl DestroySprite
|
||||
movs r0, 0x14
|
||||
ldrsh r1, [r5, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r4
|
||||
bl DestroySprite
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DAA20
|
||||
|
||||
thumb_func_start sub_81DAA74
|
||||
sub_81DAA74: @ 81DAA74
|
||||
push {r4,r5,lr}
|
||||
adds r3, r0, 0
|
||||
ldr r2, =gSprites
|
||||
movs r0, 0x10
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r5, r2, 0
|
||||
adds r5, 0x1C
|
||||
adds r0, r5
|
||||
ldr r4, [r0]
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
cmp r4, r0
|
||||
bne _081DAAC4
|
||||
movs r0, 0x12
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r2, [r0]
|
||||
cmp r2, r4
|
||||
bne _081DAAC4
|
||||
movs r1, 0x14
|
||||
ldrsh r0, [r3, r1]
|
||||
lsls r1, r0, 4
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
adds r1, r5
|
||||
ldr r0, [r1]
|
||||
cmp r0, r2
|
||||
bne _081DAAC4
|
||||
movs r0, 0x1
|
||||
b _081DAAC6
|
||||
.pool
|
||||
_081DAAC4:
|
||||
movs r0, 0
|
||||
_081DAAC6:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAA74
|
||||
|
||||
thumb_func_start sub_81DAACC
|
||||
sub_81DAACC: @ 81DAACC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
movs r1, 0xA
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
beq _081DAB20
|
||||
bl sub_81DA700
|
||||
ldr r1, =0x00003f41
|
||||
movs r0, 0x50
|
||||
bl SetGpuReg
|
||||
movs r1, 0x80
|
||||
lsls r1, 5
|
||||
movs r0, 0x52
|
||||
bl SetGpuReg
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgX
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
bl ChangeBgY
|
||||
movs r1, 0xA0
|
||||
lsls r1, 3
|
||||
movs r0, 0
|
||||
movs r2, 0x2
|
||||
bl ChangeBgY
|
||||
movs r0, 0
|
||||
strh r0, [r4, 0xA]
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
movs r0, 0x1
|
||||
b _081DAB46
|
||||
.pool
|
||||
_081DAB20:
|
||||
movs r1, 0x80
|
||||
lsls r1, 6
|
||||
movs r0, 0
|
||||
bl ClearGpuRegBits
|
||||
movs r1, 0x80
|
||||
lsls r1, 7
|
||||
movs r0, 0
|
||||
bl ClearGpuRegBits
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0
|
||||
bl ClearGpuRegBits
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0
|
||||
_081DAB46:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAACC
|
||||
|
||||
thumb_func_start sub_81DAB4C
|
||||
sub_81DAB4C: @ 81DAB4C
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
movs r1, 0xC
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _081DAB64
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0
|
||||
bl SetGpuRegBits
|
||||
_081DAB64:
|
||||
ldrh r1, [r4, 0xC]
|
||||
movs r2, 0xC
|
||||
ldrsh r0, [r4, r2]
|
||||
cmp r0, 0x10
|
||||
bne _081DAB98
|
||||
ldrh r1, [r4, 0xE]
|
||||
movs r2, 0xE
|
||||
ldrsh r0, [r4, r2]
|
||||
cmp r0, 0x1F
|
||||
bne _081DAB92
|
||||
movs r1, 0x1
|
||||
negs r1, r1
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
adds r0, r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0x10
|
||||
bl BeginNormalPaletteFade
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
b _081DABB0
|
||||
_081DAB92:
|
||||
adds r0, r1, 0x1
|
||||
strh r0, [r4, 0xE]
|
||||
b _081DABB0
|
||||
_081DAB98:
|
||||
adds r0, r1, 0x1
|
||||
strh r0, [r4, 0xC]
|
||||
ldrh r1, [r4, 0xC]
|
||||
movs r0, 0x10
|
||||
subs r0, r1
|
||||
lsls r0, 8
|
||||
orrs r1, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
movs r0, 0x52
|
||||
bl SetGpuReg
|
||||
_081DABB0:
|
||||
movs r0, 0
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAB4C
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
99
asm/unk_text_util.s
Executable file
99
asm/unk_text_util.s
Executable file
@ -0,0 +1,99 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81AFBF0
|
||||
sub_81AFBF0: @ 81AFBF0
|
||||
push {lr}
|
||||
ldr r1, =gUnknown_0203CE9C
|
||||
movs r2, 0
|
||||
adds r0, r1, 0
|
||||
adds r0, 0x1C
|
||||
_081AFBFA:
|
||||
str r2, [r0]
|
||||
subs r0, 0x4
|
||||
cmp r0, r1
|
||||
bge _081AFBFA
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81AFBF0
|
||||
|
||||
thumb_func_start sub_81AFC0C
|
||||
sub_81AFC0C: @ 81AFC0C
|
||||
push {lr}
|
||||
adds r2, r1, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x7
|
||||
bhi _081AFC20
|
||||
ldr r1, =gUnknown_0203CE9C
|
||||
lsls r0, 2
|
||||
adds r0, r1
|
||||
str r2, [r0]
|
||||
_081AFC20:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81AFC0C
|
||||
|
||||
thumb_func_start sub_81AFC28
|
||||
sub_81AFC28: @ 81AFC28
|
||||
push {r4,r5,lr}
|
||||
adds r2, r0, 0
|
||||
adds r4, r1, 0
|
||||
ldrb r1, [r4]
|
||||
adds r0, r1, 0
|
||||
cmp r0, 0xFF
|
||||
beq _081AFC68
|
||||
ldr r5, =gUnknown_0203CE9C
|
||||
_081AFC38:
|
||||
cmp r1, 0xF7
|
||||
beq _081AFC48
|
||||
strb r1, [r2]
|
||||
adds r4, 0x1
|
||||
adds r2, 0x1
|
||||
b _081AFC60
|
||||
.pool
|
||||
_081AFC48:
|
||||
adds r4, 0x1
|
||||
ldrb r0, [r4]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
cmp r1, 0
|
||||
beq _081AFC5E
|
||||
adds r0, r2, 0
|
||||
bl StringCopy
|
||||
adds r2, r0, 0
|
||||
_081AFC5E:
|
||||
adds r4, 0x1
|
||||
_081AFC60:
|
||||
ldrb r1, [r4]
|
||||
adds r0, r1, 0
|
||||
cmp r0, 0xFF
|
||||
bne _081AFC38
|
||||
_081AFC68:
|
||||
movs r0, 0xFF
|
||||
strb r0, [r2]
|
||||
adds r0, r2, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81AFC28
|
||||
|
||||
thumb_func_start sub_81AFC74
|
||||
sub_81AFC74: @ 81AFC74
|
||||
lsls r0, 24
|
||||
ldr r1, =gUnknown_0203CE9C
|
||||
lsrs r0, 22
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_81AFC74
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
583
asm/unk_text_util_2.s
Executable file
583
asm/unk_text_util_2.s
Executable file
@ -0,0 +1,583 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start Font6Func
|
||||
@ int Font6Func(struct TextPrinter *x)
|
||||
Font6Func: @ 81BA250
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
adds r4, r6, 0
|
||||
adds r4, 0x14
|
||||
ldrb r0, [r6, 0x1C]
|
||||
cmp r0, 0x6
|
||||
bls _081BA260
|
||||
b _081BA660
|
||||
_081BA260:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BA270
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BA270:
|
||||
.4byte _081BA28C
|
||||
.4byte _081BA554
|
||||
.4byte _081BA566
|
||||
.4byte _081BA590
|
||||
.4byte _081BA5C8
|
||||
.4byte _081BA63C
|
||||
.4byte _081BA64E
|
||||
_081BA28C:
|
||||
ldr r2, =gMain
|
||||
ldrh r1, [r2, 0x2C]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BA2A6
|
||||
ldrb r1, [r4]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BA2A6
|
||||
movs r0, 0
|
||||
strb r0, [r6, 0x1E]
|
||||
_081BA2A6:
|
||||
ldrb r1, [r6, 0x1E]
|
||||
cmp r1, 0
|
||||
beq _081BA2E8
|
||||
ldrb r0, [r6, 0x1D]
|
||||
cmp r0, 0
|
||||
beq _081BA2E8
|
||||
subs r0, r1, 0x1
|
||||
strb r0, [r6, 0x1E]
|
||||
ldr r0, =gTextFlags
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081BA2C4
|
||||
b _081BA50E
|
||||
_081BA2C4:
|
||||
ldrh r1, [r2, 0x2E]
|
||||
movs r0, 0x3
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081BA2D0
|
||||
b _081BA50E
|
||||
_081BA2D0:
|
||||
ldrb r0, [r4]
|
||||
movs r1, 0x10
|
||||
orrs r0, r1
|
||||
strb r0, [r4]
|
||||
movs r0, 0
|
||||
strb r0, [r6, 0x1E]
|
||||
b _081BA50E
|
||||
.pool
|
||||
_081BA2E8:
|
||||
ldr r2, =gTextFlags
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x4
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BA2FC
|
||||
movs r0, 0x3
|
||||
b _081BA2FE
|
||||
.pool
|
||||
_081BA2FC:
|
||||
ldrb r0, [r6, 0x1D]
|
||||
_081BA2FE:
|
||||
strb r0, [r6, 0x1E]
|
||||
ldr r0, [r6]
|
||||
ldrb r3, [r0]
|
||||
adds r0, 0x1
|
||||
str r0, [r6]
|
||||
adds r0, r3, 0
|
||||
subs r0, 0xF8
|
||||
cmp r0, 0x7
|
||||
bls _081BA312
|
||||
b _081BA52E
|
||||
_081BA312:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BA320
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BA320:
|
||||
.4byte _081BA524
|
||||
.4byte _081BA512
|
||||
.4byte _081BA504
|
||||
.4byte _081BA500
|
||||
.4byte _081BA36E
|
||||
.4byte _081BA368
|
||||
.4byte _081BA340
|
||||
.4byte _081BA660
|
||||
_081BA340:
|
||||
ldrb r0, [r6, 0x6]
|
||||
strb r0, [r6, 0x8]
|
||||
ldrb r1, [r6, 0x5]
|
||||
ldr r0, =gFonts
|
||||
ldr r2, [r0]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrb r1, [r6, 0xB]
|
||||
ldrb r0, [r0, 0x5]
|
||||
adds r1, r0
|
||||
ldrb r0, [r6, 0x9]
|
||||
adds r0, r1
|
||||
strb r0, [r6, 0x9]
|
||||
_081BA35E:
|
||||
movs r0, 0x2
|
||||
b _081BA662
|
||||
.pool
|
||||
_081BA368:
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x1
|
||||
b _081BA4C4
|
||||
_081BA36E:
|
||||
ldr r0, [r6]
|
||||
ldrb r3, [r0]
|
||||
adds r0, 0x1
|
||||
str r0, [r6]
|
||||
subs r0, r3, 0x1
|
||||
cmp r0, 0xF
|
||||
bls _081BA37E
|
||||
b _081BA52E
|
||||
_081BA37E:
|
||||
lsls r0, 2
|
||||
ldr r1, =_081BA38C
|
||||
adds r0, r1
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.pool
|
||||
.align 2, 0
|
||||
_081BA38C:
|
||||
.4byte _081BA3CC
|
||||
.4byte _081BA3EE
|
||||
.4byte _081BA412
|
||||
.4byte _081BA42C
|
||||
.4byte _081BA478
|
||||
.4byte _081BA47E
|
||||
.4byte _081BA35E
|
||||
.4byte _081BA498
|
||||
.4byte _081BA4A8
|
||||
.4byte _081BA4BC
|
||||
.4byte _081BA4C0
|
||||
.4byte _081BA4C8
|
||||
.4byte _081BA4D2
|
||||
.4byte _081BA4DE
|
||||
.4byte _081BA4EE
|
||||
.4byte _081BA4C0
|
||||
_081BA3CC:
|
||||
ldr r2, [r6]
|
||||
ldrb r1, [r2]
|
||||
lsls r1, 4
|
||||
ldrb r3, [r6, 0xC]
|
||||
movs r0, 0xF
|
||||
ands r0, r3
|
||||
orrs r0, r1
|
||||
strb r0, [r6, 0xC]
|
||||
adds r2, 0x1
|
||||
str r2, [r6]
|
||||
lsls r0, 24
|
||||
lsrs r0, 28
|
||||
ldrb r2, [r6, 0xD]
|
||||
lsls r1, r2, 28
|
||||
lsrs r1, 28
|
||||
lsrs r2, 4
|
||||
b _081BA472
|
||||
_081BA3EE:
|
||||
ldr r1, [r6]
|
||||
ldrb r2, [r1]
|
||||
movs r0, 0xF
|
||||
ands r0, r2
|
||||
ldrb r3, [r6, 0xD]
|
||||
movs r2, 0x10
|
||||
negs r2, r2
|
||||
ands r2, r3
|
||||
orrs r2, r0
|
||||
strb r2, [r6, 0xD]
|
||||
adds r1, 0x1
|
||||
str r1, [r6]
|
||||
ldrb r0, [r6, 0xC]
|
||||
lsrs r0, 4
|
||||
lsls r1, r2, 28
|
||||
lsrs r1, 28
|
||||
lsrs r2, 4
|
||||
b _081BA472
|
||||
_081BA412:
|
||||
ldr r1, [r6]
|
||||
ldrb r0, [r1]
|
||||
lsls r0, 4
|
||||
ldrb r3, [r6, 0xD]
|
||||
movs r2, 0xF
|
||||
ands r2, r3
|
||||
orrs r2, r0
|
||||
strb r2, [r6, 0xD]
|
||||
adds r1, 0x1
|
||||
str r1, [r6]
|
||||
ldrb r0, [r6, 0xC]
|
||||
lsrs r0, 4
|
||||
b _081BA46A
|
||||
_081BA42C:
|
||||
ldr r3, [r6]
|
||||
ldrb r1, [r3]
|
||||
lsls r1, 4
|
||||
ldrb r4, [r6, 0xC]
|
||||
movs r2, 0xF
|
||||
adds r0, r2, 0
|
||||
ands r0, r4
|
||||
orrs r0, r1
|
||||
strb r0, [r6, 0xC]
|
||||
adds r5, r3, 0x1
|
||||
str r5, [r6]
|
||||
ldrb r3, [r3, 0x1]
|
||||
adds r1, r2, 0
|
||||
ands r1, r3
|
||||
ldrb r4, [r6, 0xD]
|
||||
movs r3, 0x10
|
||||
negs r3, r3
|
||||
ands r3, r4
|
||||
orrs r3, r1
|
||||
strb r3, [r6, 0xD]
|
||||
adds r4, r5, 0x1
|
||||
str r4, [r6]
|
||||
ldrb r1, [r5, 0x1]
|
||||
lsls r1, 4
|
||||
ands r2, r3
|
||||
orrs r2, r1
|
||||
strb r2, [r6, 0xD]
|
||||
adds r4, 0x1
|
||||
str r4, [r6]
|
||||
lsls r0, 24
|
||||
lsrs r0, 28
|
||||
_081BA46A:
|
||||
lsls r1, r2, 28
|
||||
lsrs r1, 28
|
||||
lsls r2, 24
|
||||
lsrs r2, 28
|
||||
_081BA472:
|
||||
bl GenerateFontHalfRowLookupTable
|
||||
b _081BA35E
|
||||
_081BA478:
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x1
|
||||
b _081BA4C4
|
||||
_081BA47E:
|
||||
ldr r0, [r6]
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0xF
|
||||
ands r1, r0
|
||||
ldrb r2, [r4]
|
||||
movs r0, 0x10
|
||||
negs r0, r0
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
strb r0, [r4]
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x1
|
||||
b _081BA4C4
|
||||
_081BA498:
|
||||
ldr r0, [r6]
|
||||
ldrb r1, [r0]
|
||||
strb r1, [r6, 0x1E]
|
||||
adds r0, 0x1
|
||||
str r0, [r6]
|
||||
movs r0, 0x6
|
||||
strb r0, [r6, 0x1C]
|
||||
b _081BA35E
|
||||
_081BA4A8:
|
||||
movs r0, 0x1
|
||||
strb r0, [r6, 0x1C]
|
||||
ldrb r1, [r2]
|
||||
movs r0, 0x4
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081BA50E
|
||||
movs r0, 0
|
||||
strb r0, [r4, 0x2]
|
||||
b _081BA50E
|
||||
_081BA4BC:
|
||||
movs r0, 0x5
|
||||
b _081BA64A
|
||||
_081BA4C0:
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x2
|
||||
_081BA4C4:
|
||||
str r0, [r6]
|
||||
b _081BA35E
|
||||
_081BA4C8:
|
||||
ldr r1, [r6]
|
||||
adds r0, r1, 0x1
|
||||
str r0, [r6]
|
||||
ldrb r3, [r1, 0x1]
|
||||
b _081BA52E
|
||||
_081BA4D2:
|
||||
ldr r1, [r6]
|
||||
ldrb r0, [r1]
|
||||
ldrb r2, [r6, 0x6]
|
||||
adds r0, r2
|
||||
strb r0, [r6, 0x8]
|
||||
b _081BA4E8
|
||||
_081BA4DE:
|
||||
ldr r1, [r6]
|
||||
ldrb r0, [r1]
|
||||
ldrb r2, [r6, 0x7]
|
||||
adds r0, r2
|
||||
strb r0, [r6, 0x9]
|
||||
_081BA4E8:
|
||||
adds r1, 0x1
|
||||
str r1, [r6]
|
||||
b _081BA35E
|
||||
_081BA4EE:
|
||||
ldrb r0, [r6, 0x4]
|
||||
ldrb r2, [r6, 0xD]
|
||||
lsls r2, 28
|
||||
lsrs r1, r2, 4
|
||||
orrs r1, r2
|
||||
lsrs r1, 24
|
||||
bl FillWindowPixelBuffer
|
||||
b _081BA35E
|
||||
_081BA500:
|
||||
movs r0, 0x2
|
||||
b _081BA506
|
||||
_081BA504:
|
||||
movs r0, 0x3
|
||||
_081BA506:
|
||||
strb r0, [r6, 0x1C]
|
||||
adds r0, r6, 0
|
||||
bl TextPrinterInitDownArrowCounters
|
||||
_081BA50E:
|
||||
movs r0, 0x3
|
||||
b _081BA662
|
||||
_081BA512:
|
||||
ldr r0, [r6]
|
||||
ldrb r3, [r0]
|
||||
movs r2, 0x80
|
||||
lsls r2, 1
|
||||
adds r1, r2, 0
|
||||
orrs r3, r1
|
||||
adds r0, 0x1
|
||||
str r0, [r6]
|
||||
b _081BA52E
|
||||
_081BA524:
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x1
|
||||
str r0, [r6]
|
||||
movs r0, 0
|
||||
b _081BA662
|
||||
_081BA52E:
|
||||
adds r0, r3, 0
|
||||
bl DecompressGlyphFont6
|
||||
adds r0, r6, 0
|
||||
bl CopyGlyphToWindow
|
||||
ldr r0, =gUnknown_03002F90
|
||||
adds r0, 0x80
|
||||
ldrb r1, [r6, 0xA]
|
||||
ldrb r0, [r0]
|
||||
adds r1, r0
|
||||
ldrb r0, [r6, 0x8]
|
||||
adds r0, r1
|
||||
strb r0, [r6, 0x8]
|
||||
movs r0, 0
|
||||
b _081BA662
|
||||
.pool
|
||||
_081BA554:
|
||||
adds r0, r6, 0
|
||||
bl TextPrinterWait
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _081BA50E
|
||||
movs r0, 0
|
||||
strb r0, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
_081BA566:
|
||||
adds r0, r6, 0
|
||||
bl TextPrinterWaitWithDownArrow
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _081BA50E
|
||||
ldrb r0, [r6, 0x4]
|
||||
ldrb r2, [r6, 0xD]
|
||||
lsls r2, 28
|
||||
lsrs r1, r2, 4
|
||||
orrs r1, r2
|
||||
lsrs r1, 24
|
||||
bl FillWindowPixelBuffer
|
||||
ldrb r0, [r6, 0x6]
|
||||
movs r1, 0
|
||||
strb r0, [r6, 0x8]
|
||||
ldrb r0, [r6, 0x7]
|
||||
strb r0, [r6, 0x9]
|
||||
strb r1, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
_081BA590:
|
||||
adds r0, r6, 0
|
||||
bl TextPrinterWaitWithDownArrow
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _081BA50E
|
||||
adds r0, r6, 0
|
||||
bl TextPrinterClearDownArrow
|
||||
ldrb r1, [r6, 0x5]
|
||||
ldr r0, =gFonts
|
||||
ldr r2, [r0]
|
||||
lsls r0, r1, 1
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrb r1, [r6, 0xB]
|
||||
ldrb r0, [r0, 0x5]
|
||||
adds r1, r0
|
||||
strb r1, [r6, 0x1F]
|
||||
ldrb r0, [r6, 0x6]
|
||||
strb r0, [r6, 0x8]
|
||||
movs r0, 0x4
|
||||
strb r0, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
.pool
|
||||
_081BA5C8:
|
||||
ldrb r2, [r6, 0x1F]
|
||||
cmp r2, 0
|
||||
beq _081BA638
|
||||
ldr r4, =gUnknown_08616124
|
||||
ldr r5, =gSaveBlock2Ptr
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsls r1, r0, 29
|
||||
lsrs r0, r1, 29
|
||||
adds r0, r4
|
||||
ldrb r0, [r0]
|
||||
cmp r2, r0
|
||||
bcs _081BA604
|
||||
ldrb r0, [r6, 0x4]
|
||||
ldrb r1, [r6, 0xD]
|
||||
lsls r1, 28
|
||||
lsrs r3, r1, 4
|
||||
orrs r3, r1
|
||||
lsrs r3, 24
|
||||
movs r1, 0
|
||||
bl ScrollWindow
|
||||
movs r0, 0
|
||||
strb r0, [r6, 0x1F]
|
||||
b _081BA62E
|
||||
.pool
|
||||
_081BA604:
|
||||
ldrb r0, [r6, 0x4]
|
||||
lsrs r1, 29
|
||||
adds r1, r4
|
||||
ldrb r2, [r1]
|
||||
ldrb r1, [r6, 0xD]
|
||||
lsls r1, 28
|
||||
lsrs r3, r1, 4
|
||||
orrs r3, r1
|
||||
lsrs r3, 24
|
||||
movs r1, 0
|
||||
bl ScrollWindow
|
||||
ldr r0, [r5]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsls r0, 29
|
||||
lsrs r0, 29
|
||||
adds r0, r4
|
||||
ldrb r1, [r6, 0x1F]
|
||||
ldrb r0, [r0]
|
||||
subs r1, r0
|
||||
strb r1, [r6, 0x1F]
|
||||
_081BA62E:
|
||||
ldrb r0, [r6, 0x4]
|
||||
movs r1, 0x2
|
||||
bl CopyWindowToVram
|
||||
b _081BA50E
|
||||
_081BA638:
|
||||
strb r2, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
_081BA63C:
|
||||
bl IsSEPlaying
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0
|
||||
beq _081BA64A
|
||||
b _081BA50E
|
||||
_081BA64A:
|
||||
strb r0, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
_081BA64E:
|
||||
ldrb r0, [r6, 0x1E]
|
||||
adds r1, r0, 0
|
||||
cmp r1, 0
|
||||
beq _081BA65C
|
||||
subs r0, 0x1
|
||||
strb r0, [r6, 0x1E]
|
||||
b _081BA50E
|
||||
_081BA65C:
|
||||
strb r1, [r6, 0x1C]
|
||||
b _081BA50E
|
||||
_081BA660:
|
||||
movs r0, 0x1
|
||||
_081BA662:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end Font6Func
|
||||
|
||||
thumb_func_start DecompressGlyphFont6
|
||||
DecompressGlyphFont6: @ 81BA668
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 16
|
||||
lsrs r2, r0, 19
|
||||
lsls r2, 9
|
||||
movs r1, 0xE0
|
||||
lsls r1, 11
|
||||
ands r1, r0
|
||||
lsrs r1, 11
|
||||
ldr r0, =gFont6BrailleGlyphs
|
||||
adds r1, r0
|
||||
adds r5, r2, r1
|
||||
ldr r4, =gUnknown_03002F90
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl DecompressGlyphTile
|
||||
adds r0, r5, 0
|
||||
adds r0, 0x10
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x20
|
||||
bl DecompressGlyphTile
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
adds r0, r5, r1
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x40
|
||||
bl DecompressGlyphTile
|
||||
movs r1, 0x88
|
||||
lsls r1, 1
|
||||
adds r0, r5, r1
|
||||
adds r1, r4, 0
|
||||
adds r1, 0x60
|
||||
bl DecompressGlyphTile
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x80
|
||||
movs r1, 0x10
|
||||
strb r1, [r0]
|
||||
adds r0, 0x1
|
||||
strb r1, [r0]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end DecompressGlyphFont6
|
||||
|
||||
thumb_func_start GetGlyphWidthFont6
|
||||
GetGlyphWidthFont6: @ 81BA6CC
|
||||
movs r0, 0x10
|
||||
bx lr
|
||||
thumb_func_end GetGlyphWidthFont6
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
725
asm/unk_transition.s
Executable file
725
asm/unk_transition.s
Executable file
@ -0,0 +1,725 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81DABBC
|
||||
sub_81DABBC: @ 81DABBC
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
bl sub_81DAA74
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _081DABD2
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_081DABD2:
|
||||
movs r0, 0
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DABBC
|
||||
|
||||
thumb_func_start sub_81DABDC
|
||||
sub_81DABDC: @ 81DABDC
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B770
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DABEE:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DABEE
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DABDC
|
||||
|
||||
thumb_func_start sub_81DAC14
|
||||
sub_81DAC14: @ 81DAC14
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0xC
|
||||
adds r6, r0, 0
|
||||
movs r1, 0x33
|
||||
negs r1, r1
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r5, 0x2
|
||||
str r5, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x78
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x10]
|
||||
movs r0, 0x7
|
||||
negs r0, r0
|
||||
str r5, [sp]
|
||||
movs r4, 0x2
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
str r1, [sp, 0x8]
|
||||
movs r1, 0xC1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x12]
|
||||
str r4, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0xF7
|
||||
movs r1, 0xC1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r6, 0x14]
|
||||
ldrh r0, [r6, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r6, 0x8]
|
||||
movs r0, 0
|
||||
add sp, 0xC
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAC14
|
||||
|
||||
thumb_func_start sub_81DAC80
|
||||
sub_81DAC80: @ 81DAC80
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DACA4
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DABDC
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DACA4:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DAC80
|
||||
|
||||
thumb_func_start sub_81DACB4
|
||||
sub_81DACB4: @ 81DACB4
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B784
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DACC6:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DACC6
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DACB4
|
||||
|
||||
thumb_func_start sub_81DACEC
|
||||
sub_81DACEC: @ 81DACEC
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0xC
|
||||
adds r5, r0, 0
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
movs r4, 0x4
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x78
|
||||
movs r1, 0xC5
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x10]
|
||||
str r4, [sp]
|
||||
movs r4, 0x2
|
||||
str r4, [sp, 0x4]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0xF1
|
||||
movs r1, 0x3B
|
||||
movs r2, 0
|
||||
movs r3, 0x1
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x12]
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0x4
|
||||
str r1, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r1, 0x3B
|
||||
movs r2, 0
|
||||
movs r3, 0x1
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r5, 0x14]
|
||||
ldrh r0, [r5, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x8]
|
||||
movs r0, 0
|
||||
add sp, 0xC
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DACEC
|
||||
|
||||
thumb_func_start sub_81DAD58
|
||||
sub_81DAD58: @ 81DAD58
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DAD7C
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DACB4
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DAD7C:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DAD58
|
||||
|
||||
thumb_func_start sub_81DAD8C
|
||||
sub_81DAD8C: @ 81DAD8C
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B798
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DAD9E:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DAD9E
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DAD8C
|
||||
|
||||
thumb_func_start sub_81DADC4
|
||||
sub_81DADC4: @ 81DADC4
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
sub sp, 0x10
|
||||
mov r8, r0
|
||||
movs r6, 0x80
|
||||
str r6, [sp]
|
||||
movs r4, 0
|
||||
str r4, [sp, 0x4]
|
||||
movs r5, 0x4
|
||||
negs r5, r5
|
||||
str r5, [sp, 0x8]
|
||||
str r4, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x2D
|
||||
movs r2, 0xC
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x10]
|
||||
str r6, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x59
|
||||
movs r1, 0x61
|
||||
movs r2, 0xFC
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x12]
|
||||
str r6, [sp]
|
||||
str r4, [sp, 0x4]
|
||||
str r5, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x97
|
||||
movs r1, 0x61
|
||||
movs r2, 0x84
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x14]
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
movs r0, 0
|
||||
add sp, 0x10
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DADC4
|
||||
|
||||
thumb_func_start sub_81DAE44
|
||||
sub_81DAE44: @ 81DAE44
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DAE68
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DAD8C
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DAE68:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DAE44
|
||||
|
||||
thumb_func_start sub_81DAE78
|
||||
sub_81DAE78: @ 81DAE78
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B7AC
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DAE8A:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DAE8A
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DAE78
|
||||
|
||||
thumb_func_start sub_81DAEB0
|
||||
sub_81DAEB0: @ 81DAEB0
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
sub sp, 0x10
|
||||
mov r8, r0
|
||||
movs r2, 0x8E
|
||||
lsls r2, 1
|
||||
movs r6, 0x83
|
||||
str r6, [sp]
|
||||
movs r5, 0x23
|
||||
str r5, [sp, 0x4]
|
||||
movs r4, 0x3
|
||||
negs r4, r4
|
||||
str r4, [sp, 0x8]
|
||||
movs r0, 0
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x50
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x10]
|
||||
str r6, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x50
|
||||
movs r2, 0x2C
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x12]
|
||||
str r6, [sp]
|
||||
str r5, [sp, 0x4]
|
||||
str r4, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x79
|
||||
movs r1, 0x50
|
||||
movs r2, 0xA4
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r1, r8
|
||||
strh r0, [r1, 0x14]
|
||||
ldrh r0, [r1, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r1, 0x8]
|
||||
movs r0, 0
|
||||
add sp, 0x10
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAEB0
|
||||
|
||||
thumb_func_start sub_81DAF34
|
||||
sub_81DAF34: @ 81DAF34
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DAF58
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DAE78
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DAF58:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DAF34
|
||||
|
||||
thumb_func_start sub_81DAF68
|
||||
sub_81DAF68: @ 81DAF68
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B7C0
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DAF7A:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DAF7A
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DAF68
|
||||
|
||||
thumb_func_start sub_81DAFA0
|
||||
sub_81DAFA0: @ 81DAFA0
|
||||
push {r4,lr}
|
||||
sub sp, 0xC
|
||||
adds r4, r0, 0
|
||||
movs r0, 0xA
|
||||
ldrsh r2, [r4, r0]
|
||||
cmp r2, 0
|
||||
bne _081DAFCC
|
||||
movs r1, 0x33
|
||||
negs r1, r1
|
||||
str r2, [sp]
|
||||
movs r0, 0x4
|
||||
str r0, [sp, 0x4]
|
||||
str r2, [sp, 0x8]
|
||||
movs r0, 0x78
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x10]
|
||||
b _081DB01A
|
||||
_081DAFCC:
|
||||
cmp r2, 0x10
|
||||
bne _081DAFF2
|
||||
movs r0, 0x7
|
||||
negs r0, r0
|
||||
movs r1, 0x4
|
||||
str r1, [sp]
|
||||
subs r1, 0x8
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x1
|
||||
str r1, [sp, 0x8]
|
||||
movs r1, 0xC1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x12]
|
||||
b _081DB01A
|
||||
_081DAFF2:
|
||||
cmp r2, 0x20
|
||||
bne _081DB01A
|
||||
movs r0, 0x4
|
||||
negs r0, r0
|
||||
str r0, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0xF7
|
||||
movs r1, 0xC1
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x14]
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_081DB01A:
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0
|
||||
add sp, 0xC
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DAFA0
|
||||
|
||||
thumb_func_start sub_81DB02C
|
||||
sub_81DB02C: @ 81DB02C
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DB050
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DAF68
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DB050:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DB02C
|
||||
|
||||
thumb_func_start sub_81DB060
|
||||
sub_81DB060: @ 81DB060
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B7D4
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DB072:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DB072
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DB060
|
||||
|
||||
thumb_func_start sub_81DB098
|
||||
sub_81DB098: @ 81DB098
|
||||
push {r4,lr}
|
||||
sub sp, 0xC
|
||||
adds r4, r0, 0
|
||||
movs r0, 0xA
|
||||
ldrsh r1, [r4, r0]
|
||||
cmp r1, 0
|
||||
bne _081DB0C4
|
||||
str r1, [sp]
|
||||
movs r0, 0x8
|
||||
negs r0, r0
|
||||
str r0, [sp, 0x4]
|
||||
str r1, [sp, 0x8]
|
||||
movs r0, 0x78
|
||||
movs r1, 0xC5
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x10]
|
||||
b _081DB112
|
||||
_081DB0C4:
|
||||
cmp r1, 0x10
|
||||
bne _081DB0E8
|
||||
movs r0, 0x8
|
||||
negs r0, r0
|
||||
str r0, [sp]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0x4]
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0xF1
|
||||
movs r1, 0x4E
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x12]
|
||||
b _081DB112
|
||||
_081DB0E8:
|
||||
cmp r1, 0x20
|
||||
bne _081DB112
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
movs r1, 0x8
|
||||
str r1, [sp]
|
||||
movs r1, 0x1
|
||||
str r1, [sp, 0x4]
|
||||
movs r1, 0x2
|
||||
str r1, [sp, 0x8]
|
||||
movs r1, 0x4E
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl sub_81DA74C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x14]
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_081DB112:
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0
|
||||
add sp, 0xC
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB098
|
||||
|
||||
thumb_func_start sub_81DB124
|
||||
sub_81DB124: @ 81DB124
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DB148
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DB060
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DB148:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DB124
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
268
asm/unk_transition_2.s
Executable file
268
asm/unk_transition_2.s
Executable file
@ -0,0 +1,268 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_81DB158
|
||||
sub_81DB158: @ 81DB158
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B7E8
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DB16A:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DB16A
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DB158
|
||||
|
||||
thumb_func_start sub_81DB190
|
||||
sub_81DB190: @ 81DB190
|
||||
push {r4,lr}
|
||||
sub sp, 0x10
|
||||
adds r4, r0, 0
|
||||
movs r0, 0xA
|
||||
ldrsh r1, [r4, r0]
|
||||
cmp r1, 0
|
||||
bne _081DB1BE
|
||||
movs r0, 0x80
|
||||
str r0, [sp]
|
||||
str r1, [sp, 0x4]
|
||||
subs r0, 0x84
|
||||
str r0, [sp, 0x8]
|
||||
str r1, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x2D
|
||||
movs r2, 0xC
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x10]
|
||||
b _081DB212
|
||||
_081DB1BE:
|
||||
cmp r1, 0x10
|
||||
bne _081DB1E6
|
||||
movs r0, 0x80
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
str r0, [sp, 0x4]
|
||||
subs r0, 0x4
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x59
|
||||
movs r1, 0x61
|
||||
movs r2, 0xFC
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x12]
|
||||
b _081DB212
|
||||
_081DB1E6:
|
||||
cmp r1, 0x20
|
||||
bne _081DB212
|
||||
movs r0, 0x80
|
||||
str r0, [sp]
|
||||
movs r0, 0
|
||||
str r0, [sp, 0x4]
|
||||
subs r0, 0x4
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x97
|
||||
movs r1, 0x61
|
||||
movs r2, 0x84
|
||||
movs r3, 0x4
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x14]
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_081DB212:
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0
|
||||
add sp, 0x10
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB190
|
||||
|
||||
thumb_func_start sub_81DB224
|
||||
sub_81DB224: @ 81DB224
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DB248
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DB158
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DB248:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DB224
|
||||
|
||||
thumb_func_start sub_81DB258
|
||||
sub_81DB258: @ 81DB258
|
||||
push {r4,r5,lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
ldr r5, =gUnknown_0862B7FC
|
||||
ldr r2, =gTasks
|
||||
lsls r1, r0, 2
|
||||
adds r1, r0
|
||||
lsls r1, 3
|
||||
adds r4, r1, r2
|
||||
_081DB26A:
|
||||
movs r1, 0x8
|
||||
ldrsh r0, [r4, r1]
|
||||
lsls r0, 2
|
||||
adds r0, r5
|
||||
ldr r1, [r0]
|
||||
adds r0, r4, 0
|
||||
bl _call_via_r1
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _081DB26A
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81DB258
|
||||
|
||||
thumb_func_start sub_81DB290
|
||||
sub_81DB290: @ 81DB290
|
||||
push {r4,lr}
|
||||
sub sp, 0x10
|
||||
adds r4, r0, 0
|
||||
movs r0, 0xA
|
||||
ldrsh r1, [r4, r0]
|
||||
cmp r1, 0
|
||||
bne _081DB2C2
|
||||
movs r2, 0x8E
|
||||
lsls r2, 1
|
||||
movs r0, 0x83
|
||||
str r0, [sp]
|
||||
movs r0, 0x23
|
||||
str r0, [sp, 0x4]
|
||||
subs r0, 0x26
|
||||
str r0, [sp, 0x8]
|
||||
str r1, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x50
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x10]
|
||||
b _081DB316
|
||||
_081DB2C2:
|
||||
cmp r1, 0x10
|
||||
bne _081DB2EA
|
||||
movs r0, 0x83
|
||||
str r0, [sp]
|
||||
movs r0, 0x23
|
||||
str r0, [sp, 0x4]
|
||||
subs r0, 0x26
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x1
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x78
|
||||
movs r1, 0x50
|
||||
movs r2, 0x2C
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x12]
|
||||
b _081DB316
|
||||
_081DB2EA:
|
||||
cmp r1, 0x20
|
||||
bne _081DB316
|
||||
movs r0, 0x83
|
||||
str r0, [sp]
|
||||
movs r0, 0x23
|
||||
str r0, [sp, 0x4]
|
||||
subs r0, 0x26
|
||||
str r0, [sp, 0x8]
|
||||
movs r0, 0x2
|
||||
str r0, [sp, 0xC]
|
||||
movs r0, 0x79
|
||||
movs r1, 0x50
|
||||
movs r2, 0xA4
|
||||
movs r3, 0x8
|
||||
bl sub_81DA8BC
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
strh r0, [r4, 0x14]
|
||||
ldrh r0, [r4, 0x8]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x8]
|
||||
_081DB316:
|
||||
ldrh r0, [r4, 0xA]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0xA]
|
||||
movs r0, 0
|
||||
add sp, 0x10
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81DB290
|
||||
|
||||
thumb_func_start sub_81DB328
|
||||
sub_81DB328: @ 81DB328
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gPaletteFade
|
||||
ldrb r1, [r0, 0x7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
bne _081DB34C
|
||||
adds r0, r2, 0
|
||||
bl sub_81DAA20
|
||||
ldr r0, =sub_81DB258
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_081DB34C:
|
||||
movs r0, 0
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81DB328
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
3771
asm/use_pokeblock.s
Executable file
3771
asm/use_pokeblock.s
Executable file
File diff suppressed because it is too large
Load Diff
543
asm/walda_phrase.s
Executable file
543
asm/walda_phrase.s
Executable file
@ -0,0 +1,543 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start walda_maybe
|
||||
walda_maybe: @ 81D99E4
|
||||
push {r4,lr}
|
||||
sub sp, 0x8
|
||||
ldr r4, =gStringVar2
|
||||
bl sub_80D2548
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
bl StringCopy
|
||||
movs r0, 0
|
||||
str r0, [sp]
|
||||
ldr r0, =sub_81D9A1C
|
||||
str r0, [sp, 0x4]
|
||||
movs r0, 0x4
|
||||
adds r1, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl do_choose_name_or_words_screen
|
||||
add sp, 0x8
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end walda_maybe
|
||||
|
||||
thumb_func_start sub_81D9A1C
|
||||
sub_81D9A1C: @ 81D9A1C
|
||||
push {r4,r5,lr}
|
||||
ldr r4, =gSpecialVar_0x8004
|
||||
ldr r5, =gStringVar2
|
||||
adds r0, r5, 0
|
||||
bl sub_81D9A98
|
||||
strh r0, [r4]
|
||||
ldrh r0, [r4]
|
||||
cmp r0, 0x1
|
||||
beq _081D9A68
|
||||
cmp r0, 0x1
|
||||
bgt _081D9A44
|
||||
cmp r0, 0
|
||||
beq _081D9A62
|
||||
b _081D9A68
|
||||
.pool
|
||||
_081D9A44:
|
||||
cmp r0, 0x2
|
||||
bne _081D9A68
|
||||
bl sub_80D2578
|
||||
cmp r0, 0
|
||||
beq _081D9A5C
|
||||
ldr r0, =gUnknown_085EE49A
|
||||
bl sub_80D255C
|
||||
b _081D9A68
|
||||
.pool
|
||||
_081D9A5C:
|
||||
movs r0, 0x1
|
||||
strh r0, [r4]
|
||||
b _081D9A68
|
||||
_081D9A62:
|
||||
adds r0, r5, 0
|
||||
bl sub_80D255C
|
||||
_081D9A68:
|
||||
ldr r4, =gStringVar1
|
||||
bl sub_80D2548
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
bl StringCopy
|
||||
ldr r1, =gUnknown_03005DAC
|
||||
ldr r0, =sub_80AF168
|
||||
str r0, [r1]
|
||||
ldr r0, =c2_exit_to_overworld_2_switch
|
||||
bl SetMainCallback2
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81D9A1C
|
||||
|
||||
thumb_func_start sub_81D9A98
|
||||
sub_81D9A98: @ 81D9A98
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0xFF
|
||||
bne _081D9AA6
|
||||
movs r0, 0x2
|
||||
b _081D9ABC
|
||||
_081D9AA6:
|
||||
bl sub_80D2548
|
||||
adds r1, r0, 0
|
||||
adds r0, r4, 0
|
||||
bl StringCompare
|
||||
cmp r0, 0
|
||||
beq _081D9ABA
|
||||
movs r0, 0
|
||||
b _081D9ABC
|
||||
_081D9ABA:
|
||||
movs r0, 0x1
|
||||
_081D9ABC:
|
||||
pop {r4}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D9A98
|
||||
|
||||
thumb_func_start sub_81D9AC4
|
||||
sub_81D9AC4: @ 81D9AC4
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
sub sp, 0x10
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
adds r0, 0xA
|
||||
bl ReadUnalignedWord
|
||||
adds r4, r0, 0
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
ldr r0, =gScriptResult
|
||||
mov r8, r0
|
||||
bl sub_80D2548
|
||||
mov r7, sp
|
||||
adds r7, 0xA
|
||||
add r6, sp, 0xC
|
||||
mov r5, sp
|
||||
adds r5, 0xD
|
||||
str r4, [sp]
|
||||
str r0, [sp, 0x4]
|
||||
add r0, sp, 0x8
|
||||
adds r1, r7, 0
|
||||
adds r2, r6, 0
|
||||
adds r3, r5, 0
|
||||
bl sub_81D9B68
|
||||
mov r1, r8
|
||||
strh r0, [r1]
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _081D9B1E
|
||||
ldrb r0, [r5]
|
||||
bl sub_80D24BC
|
||||
ldrb r0, [r6]
|
||||
bl sub_80D24F0
|
||||
add r0, sp, 0x8
|
||||
ldrh r0, [r0]
|
||||
ldrh r1, [r7]
|
||||
bl sub_80D2524
|
||||
_081D9B1E:
|
||||
mov r1, r8
|
||||
ldrh r0, [r1]
|
||||
bl sub_80D2480
|
||||
mov r1, r8
|
||||
ldrb r0, [r1]
|
||||
add sp, 0x10
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_81D9AC4
|
||||
|
||||
thumb_func_start sub_81D9B40
|
||||
sub_81D9B40: @ 81D9B40
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r2, r0, 24
|
||||
movs r1, 0
|
||||
ldr r3, =gUnknown_0862AD14
|
||||
_081D9B4A:
|
||||
adds r0, r1, r3
|
||||
ldrb r0, [r0]
|
||||
cmp r0, r2
|
||||
bne _081D9B5C
|
||||
lsls r0, r1, 24
|
||||
lsrs r0, 24
|
||||
b _081D9B64
|
||||
.pool
|
||||
_081D9B5C:
|
||||
adds r1, 0x1
|
||||
cmp r1, 0x1F
|
||||
bls _081D9B4A
|
||||
movs r0, 0x20
|
||||
_081D9B64:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D9B40
|
||||
|
||||
thumb_func_start sub_81D9B68
|
||||
sub_81D9B68: @ 81D9B68
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x2C
|
||||
mov r10, r0
|
||||
str r1, [sp, 0x20]
|
||||
str r2, [sp, 0x24]
|
||||
str r3, [sp, 0x28]
|
||||
ldr r0, [sp, 0x4C]
|
||||
ldr r5, [sp, 0x50]
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
mov r9, r0
|
||||
adds r0, r5, 0
|
||||
bl StringLength
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0xF
|
||||
bne _081D9C7E
|
||||
movs r4, 0
|
||||
add r7, sp, 0x10
|
||||
_081D9B98:
|
||||
adds r0, r5, r4
|
||||
ldrb r0, [r0]
|
||||
bl sub_81D9B40
|
||||
adds r1, r7, r4
|
||||
strb r0, [r1]
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x20
|
||||
beq _081D9C7E
|
||||
adds r4, 0x1
|
||||
cmp r4, 0xE
|
||||
ble _081D9B98
|
||||
movs r6, 0x3
|
||||
movs r5, 0
|
||||
movs r0, 0x5
|
||||
mov r8, r0
|
||||
movs r4, 0xD
|
||||
_081D9BBC:
|
||||
mov r1, r8
|
||||
str r1, [sp]
|
||||
add r0, sp, 0x4
|
||||
adds r1, r7, 0
|
||||
adds r2, r5, 0
|
||||
adds r3, r6, 0
|
||||
bl sub_81D9D5C
|
||||
adds r6, 0x8
|
||||
adds r5, 0x5
|
||||
subs r4, 0x1
|
||||
cmp r4, 0
|
||||
bge _081D9BBC
|
||||
movs r0, 0x2
|
||||
str r0, [sp]
|
||||
add r0, sp, 0x4
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x46
|
||||
movs r3, 0x73
|
||||
bl sub_81D9D5C
|
||||
add r0, sp, 0x4
|
||||
movs r1, 0
|
||||
movs r2, 0x3
|
||||
bl sub_81D9DAC
|
||||
adds r4, r0, 0
|
||||
adds r0, r7, 0
|
||||
movs r1, 0x75
|
||||
movs r2, 0x3
|
||||
bl sub_81D9DAC
|
||||
cmp r4, r0
|
||||
bne _081D9C7E
|
||||
add r0, sp, 0x4
|
||||
movs r1, 0x9
|
||||
movs r2, 0x15
|
||||
bl sub_81D9C90
|
||||
add r0, sp, 0x4
|
||||
ldrb r0, [r0, 0x8]
|
||||
movs r2, 0xF
|
||||
ands r2, r0
|
||||
add r0, sp, 0x4
|
||||
movs r1, 0x8
|
||||
bl sub_81D9C90
|
||||
add r0, sp, 0x4
|
||||
ldrb r2, [r0, 0x8]
|
||||
lsrs r2, 4
|
||||
movs r1, 0x8
|
||||
bl sub_81D9CDC
|
||||
add r0, sp, 0x4
|
||||
ldrb r2, [r0, 0x6]
|
||||
adds r1, r0, 0
|
||||
ldrb r0, [r0]
|
||||
ldrb r1, [r1, 0x2]
|
||||
eors r0, r1
|
||||
add r1, sp, 0x4
|
||||
ldrb r4, [r1, 0x4]
|
||||
eors r0, r4
|
||||
mov r3, r9
|
||||
lsrs r1, r3, 8
|
||||
eors r0, r1
|
||||
cmp r2, r0
|
||||
bne _081D9C7E
|
||||
add r0, sp, 0x4
|
||||
ldrb r3, [r0, 0x7]
|
||||
adds r2, r0, 0
|
||||
ldrb r1, [r0, 0x1]
|
||||
ldrb r0, [r2, 0x3]
|
||||
eors r1, r0
|
||||
adds r0, r2, 0
|
||||
ldrb r2, [r0, 0x5]
|
||||
eors r1, r2
|
||||
movs r0, 0xFF
|
||||
mov r5, r9
|
||||
ands r0, r5
|
||||
eors r1, r0
|
||||
cmp r3, r1
|
||||
bne _081D9C7E
|
||||
add r0, sp, 0x4
|
||||
ldrh r0, [r0]
|
||||
mov r1, r10
|
||||
strh r0, [r1]
|
||||
mov r0, sp
|
||||
adds r0, 0x6
|
||||
ldrh r0, [r0]
|
||||
ldr r3, [sp, 0x20]
|
||||
strh r0, [r3]
|
||||
ldr r5, [sp, 0x24]
|
||||
strb r4, [r5]
|
||||
ldr r0, [sp, 0x28]
|
||||
strb r2, [r0]
|
||||
movs r0, 0x1
|
||||
b _081D9C80
|
||||
_081D9C7E:
|
||||
movs r0, 0
|
||||
_081D9C80:
|
||||
add sp, 0x2C
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D9B68
|
||||
|
||||
thumb_func_start sub_81D9C90
|
||||
sub_81D9C90: @ 81D9C90
|
||||
push {r4-r7,lr}
|
||||
adds r7, r0, 0
|
||||
mov r12, r1
|
||||
subs r3, r2, 0x1
|
||||
cmp r2, 0
|
||||
beq _081D9CD6
|
||||
_081D9C9C:
|
||||
ldrb r1, [r7]
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
lsls r0, 24
|
||||
lsrs r4, r0, 31
|
||||
mov r2, r12
|
||||
subs r2, 0x1
|
||||
subs r5, r3, 0x1
|
||||
cmp r2, 0
|
||||
blt _081D9CCC
|
||||
movs r6, 0x80
|
||||
adds r3, r2, r7
|
||||
_081D9CB4:
|
||||
ldrb r1, [r3]
|
||||
adds r0, r6, 0
|
||||
ands r0, r1
|
||||
lsls r0, 24
|
||||
lsls r1, 1
|
||||
orrs r4, r1
|
||||
strb r4, [r3]
|
||||
lsrs r4, r0, 31
|
||||
subs r3, 0x1
|
||||
subs r2, 0x1
|
||||
cmp r2, 0
|
||||
bge _081D9CB4
|
||||
_081D9CCC:
|
||||
adds r3, r5, 0
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
cmp r3, r0
|
||||
bne _081D9C9C
|
||||
_081D9CD6:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D9C90
|
||||
|
||||
thumb_func_start sub_81D9CDC
|
||||
sub_81D9CDC: @ 81D9CDC
|
||||
push {r4-r6,lr}
|
||||
adds r6, r0, 0
|
||||
adds r5, r1, 0
|
||||
lsls r2, 24
|
||||
lsrs r3, r2, 24
|
||||
lsls r0, r3, 4
|
||||
orrs r3, r0
|
||||
lsls r0, r3, 24
|
||||
lsrs r3, r0, 24
|
||||
movs r4, 0
|
||||
cmp r4, r5
|
||||
bcs _081D9D04
|
||||
_081D9CF4:
|
||||
adds r2, r6, r4
|
||||
ldrb r1, [r2]
|
||||
adds r0, r3, 0
|
||||
eors r0, r1
|
||||
strb r0, [r2]
|
||||
adds r4, 0x1
|
||||
cmp r4, r5
|
||||
bcc _081D9CF4
|
||||
_081D9D04:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D9CDC
|
||||
|
||||
thumb_func_start sub_81D9D0C
|
||||
sub_81D9D0C: @ 81D9D0C
|
||||
push {lr}
|
||||
lsrs r3, r1, 3
|
||||
movs r2, 0x7
|
||||
ands r2, r1
|
||||
movs r1, 0x80
|
||||
asrs r1, r2
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _081D9D24
|
||||
movs r0, 0x1
|
||||
_081D9D24:
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D9D0C
|
||||
|
||||
thumb_func_start sub_81D9D28
|
||||
sub_81D9D28: @ 81D9D28
|
||||
lsrs r3, r1, 3
|
||||
movs r2, 0x7
|
||||
ands r2, r1
|
||||
movs r1, 0x80
|
||||
asrs r1, r2
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r3
|
||||
ldrb r2, [r0]
|
||||
orrs r1, r2
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
thumb_func_end sub_81D9D28
|
||||
|
||||
thumb_func_start sub_81D9D40
|
||||
sub_81D9D40: @ 81D9D40
|
||||
lsrs r3, r1, 3
|
||||
movs r2, 0x7
|
||||
ands r2, r1
|
||||
movs r1, 0x80
|
||||
asrs r1, r2
|
||||
mvns r1, r1
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r3
|
||||
ldrb r2, [r0]
|
||||
ands r1, r2
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
thumb_func_end sub_81D9D40
|
||||
|
||||
thumb_func_start sub_81D9D5C
|
||||
sub_81D9D5C: @ 81D9D5C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r9
|
||||
mov r6, r8
|
||||
push {r6,r7}
|
||||
adds r6, r0, 0
|
||||
mov r9, r1
|
||||
adds r1, r2, 0
|
||||
mov r8, r3
|
||||
ldr r7, [sp, 0x1C]
|
||||
movs r5, 0
|
||||
cmp r5, r7
|
||||
bcs _081D9DA0
|
||||
adds r4, r1, 0
|
||||
_081D9D76:
|
||||
mov r0, r8
|
||||
adds r1, r0, r5
|
||||
mov r0, r9
|
||||
bl sub_81D9D0C
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _081D9D90
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_81D9D28
|
||||
b _081D9D98
|
||||
_081D9D90:
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_81D9D40
|
||||
_081D9D98:
|
||||
adds r4, 0x1
|
||||
adds r5, 0x1
|
||||
cmp r5, r7
|
||||
bcc _081D9D76
|
||||
_081D9DA0:
|
||||
pop {r3,r4}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_81D9D5C
|
||||
|
||||
thumb_func_start sub_81D9DAC
|
||||
sub_81D9DAC: @ 81D9DAC
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
mov r8, r0
|
||||
adds r7, r1, 0
|
||||
adds r6, r2, 0
|
||||
movs r4, 0
|
||||
movs r5, 0
|
||||
cmp r4, r6
|
||||
bcs _081D9DD6
|
||||
_081D9DC0:
|
||||
lsls r4, 1
|
||||
adds r1, r7, r5
|
||||
mov r0, r8
|
||||
bl sub_81D9D0C
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
orrs r4, r0
|
||||
adds r5, 0x1
|
||||
cmp r5, r6
|
||||
bcc _081D9DC0
|
||||
_081D9DD6:
|
||||
adds r0, r4, 0
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_81D9DAC
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
43
charmap.txt
43
charmap.txt
@ -431,21 +431,21 @@ RESUME_MUSIC = FC 18
|
||||
@ colors
|
||||
|
||||
TRANSPARENT = 00
|
||||
DARK_GREY = 01
|
||||
RED = 02
|
||||
GREEN = 03
|
||||
BLUE = 04
|
||||
YELLOW = 05
|
||||
CYAN = 06
|
||||
MAGENTA = 07
|
||||
LIGHT_GREY = 08
|
||||
BLACK = 09
|
||||
BLACK2 = 0A @ duplicate of black?
|
||||
SILVER = 0B
|
||||
WHITE = 0C
|
||||
SKY_BLUE = 0D
|
||||
LIGHT_BLUE = 0E
|
||||
WHITE2 = 0F @ duplicate of white?
|
||||
WHITE = 01
|
||||
DARK_GREY = 02
|
||||
LIGHT_GREY = 03
|
||||
RED = 04
|
||||
LIGHT_RED = 05
|
||||
GREEN = 06
|
||||
LIGHT_GREEN = 07
|
||||
BLUE = 08
|
||||
LIGHT_BLUE = 09
|
||||
BORDER_COLOR1 = 0A @ white
|
||||
BORDER_COLOR2 = 0B @ white with a tinge of green
|
||||
BORDER_COLOR3 = 0C @ white 2
|
||||
BORDER_COLOR4 = 0D @ aquamarine
|
||||
BORDER_COLOR5 = 0E @ blue-green
|
||||
BORDER_COLOR6 = 0F @ cerulean
|
||||
|
||||
@ sound and music
|
||||
|
||||
@ -686,6 +686,19 @@ BGM_BATTLE35 = D0 01
|
||||
BGM_BATTLE38 = D1 01
|
||||
BGM_BATTLE30 = D2 01
|
||||
|
||||
UNK_CTRL_F800 = F8 00
|
||||
UNK_CTRL_F801 = F8 01
|
||||
UNK_CTRL_F80A = F8 0A
|
||||
UNK_CTRL_F80C = F8 0C
|
||||
|
||||
UNK_CTRL_F9 = F9
|
||||
UNK_CTRL_F904 = F9 04
|
||||
UNK_CTRL_F905 = F9 05
|
||||
UNK_CTRL_F907 = F9 07
|
||||
UNK_CTRL_F908 = F9 08
|
||||
UNK_CTRL_F9DD = F9 DD
|
||||
UNK_CTRL_F9F9 = F9 F9
|
||||
|
||||
'\l' = FA @ scroll up window text
|
||||
'\p' = FB @ new paragraph
|
||||
'\n' = FE @ new line
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_085EFCF0:: @ 85EFCF0
|
||||
.incbin "baserom.gba", 0x5efcf0, 0x10
|
||||
|
||||
|
1094
data/data2.s
1094
data/data2.s
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,13 @@ gUnknown_082FF178:: @ 82FF178
|
||||
.incbin "baserom.gba", 0x2ff178, 0x50
|
||||
|
||||
gUnknown_082FF1C8:: @ 82FF1C8
|
||||
.incbin "baserom.gba", 0x2ff1c8, 0x450
|
||||
.incbin "baserom.gba", 0x2ff1c8, 0x10
|
||||
|
||||
gUnknown_082FF1D8:: @ 82FF1D8
|
||||
.incbin "baserom.gba", 0x2ff1d8, 0x20
|
||||
|
||||
gUnknown_082FF1F8:: @ 82FF1F8
|
||||
.incbin "baserom.gba", 0x2ff1f8, 0x420
|
||||
|
||||
gUnknown_082FF618:: @ 82FF618
|
||||
.incbin "baserom.gba", 0x2ff618, 0x7c
|
||||
|
289
data/data3.s
289
data/data3.s
@ -1395,7 +1395,294 @@ gUnknown_0852489C:: @ 852489C
|
||||
.incbin "baserom.gba", 0x52489c, 0x20
|
||||
|
||||
sFanfares:: @ 85248BC
|
||||
.incbin "baserom.gba", 0x5248bc, 0x288
|
||||
.incbin "baserom.gba", 0x5248bc, 0x48
|
||||
|
||||
gUnknown_08524904:: @ 8524904
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852490C:: @ 852490C
|
||||
.byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524914:: @ 8524914
|
||||
.byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852491C:: @ 852491C
|
||||
.byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524924:: @ 8524924
|
||||
.byte 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852492C:: @ 852492C
|
||||
.byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524934:: @ 8524934
|
||||
.byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852493C:: @ 852493C
|
||||
.byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524944:: @ 8524944
|
||||
.byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852494C:: @ 852494C
|
||||
.byte 0x00, 0x80, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524954:: @ 8524954
|
||||
.byte 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852495C:: @ 852495C
|
||||
.byte 0x00, 0x80, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524964:: @ 8524964
|
||||
.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852496C:: @ 852496C
|
||||
.byte 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524974:: @ 8524974
|
||||
.byte 0x00, 0x01, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852497C:: @ 852497C
|
||||
.byte 0x00, 0x01, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524984:: @ 8524984
|
||||
.byte 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852498C:: @ 852498C
|
||||
.byte 0x00, 0x41, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524994:: @ 8524994
|
||||
.byte 0x00, 0x41, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_0852499C:: @ 852499C
|
||||
.byte 0x00, 0x41, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249A4:: @ 85249A4
|
||||
.byte 0x00, 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249AC:: @ 85249AC
|
||||
.byte 0x00, 0x81, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249B4:: @ 85249B4
|
||||
.byte 0x00, 0x81, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249BC:: @ 85249BC
|
||||
.byte 0x00, 0x81, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249C4:: @ 85249C4
|
||||
.byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249CC:: @ 85249CC
|
||||
.byte 0x00, 0x03, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249D4:: @ 85249D4
|
||||
.byte 0x00, 0x03, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249DC:: @ 85249DC
|
||||
.byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249E4:: @ 85249E4
|
||||
.byte 0x00, 0x43, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249EC:: @ 85249EC
|
||||
.byte 0x00, 0x43, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249F4:: @ 85249F4
|
||||
.byte 0x00, 0x43, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_085249FC:: @ 85249FC
|
||||
.byte 0x00, 0x43, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A04:: @ 8524A04
|
||||
.byte 0x00, 0x83, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A0C:: @ 8524A0C
|
||||
.byte 0x00, 0x83, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A14:: @ 8524A14
|
||||
.byte 0x00, 0x83, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A1C:: @ 8524A1C
|
||||
.byte 0x00, 0x83, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A24:: @ 8524A24
|
||||
.byte 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A2C:: @ 8524A2C
|
||||
.byte 0x00, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A34:: @ 8524A34
|
||||
.byte 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A3C:: @ 8524A3C
|
||||
.byte 0x00, 0x04, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A44:: @ 8524A44
|
||||
.byte 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A4C:: @ 8524A4C
|
||||
.byte 0x00, 0x44, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A54:: @ 8524A54
|
||||
.byte 0x00, 0x44, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A5C:: @ 8524A5C
|
||||
.byte 0x00, 0x44, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A64:: @ 8524A64
|
||||
.byte 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A6C:: @ 8524A6C
|
||||
.byte 0x00, 0x84, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A74:: @ 8524A74
|
||||
.byte 0x00, 0x84, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A7C:: @ 8524A7C
|
||||
.byte 0x00, 0x84, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A84:: @ 8524A84
|
||||
.byte 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A8C:: @ 8524A8C
|
||||
.byte 0x00, 0x05, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A94:: @ 8524A94
|
||||
.byte 0x00, 0x05, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524A9C:: @ 8524A9C
|
||||
.byte 0x00, 0x05, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AA4:: @ 8524AA4
|
||||
.byte 0x00, 0x45, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AAC:: @ 8524AAC
|
||||
.byte 0x00, 0x45, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AB4:: @ 8524AB4
|
||||
.byte 0x00, 0x45, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524ABC:: @ 8524ABC
|
||||
.byte 0x00, 0x45, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AC4:: @ 8524AC4
|
||||
.byte 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524ACC:: @ 8524ACC
|
||||
.byte 0x00, 0x85, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AD4:: @ 8524AD4
|
||||
.byte 0x00, 0x85, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524ADC:: @ 8524ADC
|
||||
.byte 0x00, 0x85, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AE4:: @ 8524AE4
|
||||
.byte 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AEC:: @ 8524AEC
|
||||
.byte 0x00, 0x07, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AF4:: @ 8524AF4
|
||||
.byte 0x00, 0x07, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524AFC:: @ 8524AFC
|
||||
.byte 0x00, 0x07, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B04:: @ 8524B04
|
||||
.byte 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B0C:: @ 8524B0C
|
||||
.byte 0x00, 0x47, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B14:: @ 8524B14
|
||||
.byte 0x00, 0x47, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B1C:: @ 8524B1C
|
||||
.byte 0x00, 0x47, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B24:: @ 8524B24
|
||||
.byte 0x00, 0x87, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B2C:: @ 8524B2C
|
||||
.byte 0x00, 0x87, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B34:: @ 8524B34
|
||||
.byte 0x00, 0x87, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
.align 2
|
||||
gUnknown_08524B3C:: @ 8524B3C
|
||||
.byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00
|
||||
|
||||
gUnknown_08524B44:: @ 8524B44
|
||||
.incbin "baserom.gba", 0x524b44, 0x1d0
|
||||
|
@ -1,8 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
@ unknown unreferenced data
|
||||
|
||||
.incbin "baserom.gba", 0x58d977, 0x2a1
|
@ -5,6 +5,9 @@
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
.incbin "baserom.gba", 0x58d978, 0x2a0
|
||||
|
||||
.align 2
|
||||
gFieldEffectObjectPalette7:: @ 858DC18
|
||||
.incbin "graphics/map_objects/palettes/field_effect_object_palette_07.gbapal"
|
||||
|
@ -932,6 +932,114 @@ gUnknown_0862B7E8:: @ 862B7E8
|
||||
.incbin "baserom.gba", 0x62b7e8, 0x14
|
||||
|
||||
gUnknown_0862B7FC:: @ 862B7FC
|
||||
.incbin "baserom.gba", 0x62b7fc, 0x2e8
|
||||
.incbin "baserom.gba", 0x62b7fc, 0x14
|
||||
|
||||
|
||||
.align 2
|
||||
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 26}others$"
|
||||
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L$"
|
||||
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
|
||||
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
|
||||
.string "{CLEAR 11}a{CLEAR 6}b{CLEAR 6}c{CLEAR 26}d{CLEAR 6}e{CLEAR 6}f{CLEAR 6} {CLEAR 30}.$"
|
||||
.string "{CLEAR 11}g{CLEAR 6}h{CLEAR 7}i{CLEAR 27}j{CLEAR 7}k{CLEAR 7}l{CLEAR 7} {CLEAR 30},$"
|
||||
.string "{CLEAR 11}m{CLEAR 6}n{CLEAR 6}o{CLEAR 26}p{CLEAR 6}q{CLEAR 7}r{CLEAR 6}s{CLEAR 27} $"
|
||||
.string "{CLEAR 11}t{CLEAR 6}u{CLEAR 6}v{CLEAR 26}w{CLEAR 6}x{CLEAR 6}y{CLEAR 6}z{CLEAR 26} $"
|
||||
.string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 6} {CLEAR 30}.$"
|
||||
.string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L{CLEAR 6} {CLEAR 30},$"
|
||||
.string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $"
|
||||
.string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $"
|
||||
.string "{CLEAR 11}0{CLEAR 16}1{CLEAR 16}2{CLEAR 16}3{CLEAR 16}4{CLEAR 16} $"
|
||||
.string "{CLEAR 11}5{CLEAR 16}6{CLEAR 16}7{CLEAR 16}8{CLEAR 16}9{CLEAR 16} $"
|
||||
.string "{CLEAR 12}!{CLEAR 17}?{CLEAR 16}♂{CLEAR 16}♀{CLEAR 16}/{CLEAR 17}-$"
|
||||
.string "{CLEAR 11}…{CLEAR 16}“{CLEAR 16}”{CLEAR 18}‘{CLEAR 19}’{CLEAR 18} $"
|
||||
|
||||
gUnknown_0862B9F9:: @ 862B9F9
|
||||
.string "ABCDE$"
|
||||
|
||||
gUnknown_0862B9FF:: @ 862B9FF
|
||||
.string "FGHIJ$"
|
||||
|
||||
gUnknown_0862BA05:: @ 862BA05
|
||||
.string "KLMNO$"
|
||||
|
||||
gUnknown_0862BA0B:: @ 862BA0B
|
||||
.string "PQRST$"
|
||||
|
||||
gUnknown_0862BA11:: @ 862BA11
|
||||
.string "UVWXY$"
|
||||
|
||||
gUnknown_0862BA17:: @ 862BA17
|
||||
.string "Z $"
|
||||
|
||||
gUnknown_0862BA1D:: @ 862BA1D
|
||||
.string "01234$"
|
||||
|
||||
gUnknown_0862BA23:: @ 862BA23
|
||||
.string "56789$"
|
||||
|
||||
gUnknown_0862BA29:: @ 862BA29
|
||||
.string ".,!? $"
|
||||
|
||||
gUnknown_0862BA2F:: @ 862BA2F
|
||||
.string "-/&… $"
|
||||
|
||||
gUnknown_0862BA35:: @ 862BA35
|
||||
.string "abcde$"
|
||||
|
||||
gUnknown_0862BA3B:: @ 862BA3B
|
||||
.string "fghij$"
|
||||
|
||||
gUnknown_0862BA41:: @ 862BA41
|
||||
.string "klmno$"
|
||||
|
||||
gUnknown_0862BA47:: @ 862BA47
|
||||
.string "pqrst$"
|
||||
|
||||
gUnknown_0862BA4D:: @ 862BA4D
|
||||
.string "uvwxy$"
|
||||
|
||||
gUnknown_0862BA53:: @ 862BA53
|
||||
.string "z $"
|
||||
|
||||
gUnknown_0862BA59:: @ 862BA59
|
||||
.string "01234$"
|
||||
|
||||
gUnknown_0862BA5F:: @ 862BA5F
|
||||
.string "56789$"
|
||||
|
||||
gUnknown_0862BA65:: @ 862BA65
|
||||
.string ".,!? $"
|
||||
|
||||
gUnknown_0862BA6B:: @ 862BA6B
|
||||
.string "-/&… $"
|
||||
|
||||
.string "$$$$$$$$"
|
||||
|
||||
gUnknown_0862BA79:: @ 862BA79
|
||||
.string "{UNK_CTRL_F9 245}{UNK_CTRL_F9 246}{UNK_CTRL_F9 247}{UNK_CTRL_F9 248}{UNK_CTRL_F9 254}$"
|
||||
|
||||
gUnknown_0862BA84:: @ 862BA84
|
||||
.string "{UNK_CTRL_F9 249}{UNK_CTRL_F9 250}{UNK_CTRL_F9 252}{UNK_CTRL_F9 251}{UNK_CTRL_F9 253}$"
|
||||
|
||||
gUnknown_0862BA8F:: @ 862BA8F
|
||||
.string "{UNK_CTRL_F9 236}{UNK_CTRL_F9 237}{UNK_CTRL_F9 238}{UNK_CTRL_F9 235}{UNK_CTRL_F9 234}$"
|
||||
|
||||
gUnknown_0862BA9A:: @ 862BA9A
|
||||
.string "♂♀{UNK_CTRL_F9 212}{UNK_CTRL_F9 213}{UNK_CTRL_F9 211}$"
|
||||
|
||||
gUnknown_0862BAA3:: @ 862BAA3
|
||||
.string "{UNK_CTRL_F9 216}{UNK_CTRL_F9 217}{UNK_CTRL_F9 242}{UNK_CTRL_F9 243}{UNK_CTRL_F9 244}$"
|
||||
|
||||
gUnknown_0862BAAE:: @ 862BAAE
|
||||
.string "{UNK_CTRL_F9 218}{UNK_CTRL_F9 241}{UNK_CTRL_F9 224}{UNK_CTRL_F9 226}{UNK_CTRL_F9 227}$"
|
||||
|
||||
gUnknown_0862BAB9:: @ 862BAB9
|
||||
.string "{UNK_CTRL_F9 240}{UNK_CTRL_F9 239}{UNK_CTRL_F9 225}{UNK_CTRL_F9 214}{UNK_CTRL_F9 215}$"
|
||||
|
||||
gUnknown_0862BAC4:: @ 862BAC4
|
||||
.string "{UNK_CTRL_F9 228}{UNK_CTRL_F9 229}{UNK_CTRL_F9 230}{UNK_CTRL_F9 231}{UNK_CTRL_F9 232}$"
|
||||
|
||||
gUnknown_0862BACF:: @ 862BACF
|
||||
.string "{UNK_CTRL_F9 233}{UNK_CTRL_F9 220}{UNK_CTRL_F9 221}{UNK_CTRL_F9 222}{UNK_CTRL_F9 209}$"
|
||||
|
||||
gUnknown_0862BADA:: @ 862BADA
|
||||
.string "{UNK_CTRL_F9 210}{UNK_CTRL_F9 208}ょ: $"
|
||||
|
@ -7,6 +7,7 @@
|
||||
gFont8LatinGlyphs:: @ 862BAE4
|
||||
.incbin "data/graphics/fonts/font8.latfont"
|
||||
|
||||
.align 2
|
||||
gFont8LatinGlyphWidths:: @ 8633AE4
|
||||
.include "data/graphics/fonts/font8_latin_widths.inc"
|
||||
|
||||
@ -14,6 +15,7 @@ gFont8LatinGlyphWidths:: @ 8633AE4
|
||||
gFont0LatinGlyphs:: @ 8633CE4
|
||||
.incbin "data/graphics/fonts/font0.latfont"
|
||||
|
||||
.align 2
|
||||
gFont0LatinGlyphWidths:: @ 863BCE4
|
||||
.include "data/graphics/fonts/font0_latin_widths.inc"
|
||||
|
||||
@ -21,6 +23,7 @@ gFont0LatinGlyphWidths:: @ 863BCE4
|
||||
gFont7LatinGlyphs:: @ 863BEE4
|
||||
.incbin "data/graphics/fonts/font7.latfont"
|
||||
|
||||
.align 2
|
||||
gFont7LatinGlyphWidths:: @ 8643EE4
|
||||
.include "data/graphics/fonts/font7_latin_widths.inc"
|
||||
|
||||
@ -28,6 +31,7 @@ gFont7LatinGlyphWidths:: @ 8643EE4
|
||||
gFont2LatinGlyphs:: @ 86440E4
|
||||
.incbin "data/graphics/fonts/font2.latfont"
|
||||
|
||||
.align 2
|
||||
gFont2LatinGlyphWidths:: @ 864C0E4
|
||||
.include "data/graphics/fonts/font2_latin_widths.inc"
|
||||
|
||||
@ -35,6 +39,7 @@ gFont2LatinGlyphWidths:: @ 864C0E4
|
||||
gFont1LatinGlyphs:: @ 864C2E4
|
||||
.incbin "data/graphics/fonts/font1.latfont"
|
||||
|
||||
.align 2
|
||||
gFont1LatinGlyphWidths:: @ 86542E4
|
||||
.include "data/graphics/fonts/font1_latin_widths.inc"
|
||||
|
||||
@ -50,6 +55,7 @@ gFont1JapaneseGlyphs:: @ 86584E4
|
||||
gUnusedJapaneseFireRedLeafGreenMaleFontGlyphs:: @ 865C4E4
|
||||
.incbin "data/graphics/fonts/unused_frlg_male.fwjpnfont"
|
||||
|
||||
.align 2
|
||||
gUnusedJapaneseFireRedLeafGreenMaleFontGlyphWidths:: @ 86644E4
|
||||
.include "data/graphics/fonts/unused_japanese_frlg_male_font_widths.inc"
|
||||
|
||||
@ -57,6 +63,7 @@ gUnusedJapaneseFireRedLeafGreenMaleFontGlyphWidths:: @ 86644E4
|
||||
gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphs:: @ 86646E4
|
||||
.incbin "data/graphics/fonts/unused_frlg_female.fwjpnfont"
|
||||
|
||||
.align 2
|
||||
gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphWidths:: @ 866C6E4
|
||||
.include "data/graphics/fonts/unused_japanese_frlg_female_font_widths.inc"
|
||||
|
||||
@ -64,5 +71,6 @@ gUnusedJapaneseFireRedLeafGreenFemaleFontGlyphWidths:: @ 866C6E4
|
||||
gFont2JapaneseGlyphs:: @ 866C8E4
|
||||
.incbin "data/graphics/fonts/font2.fwjpnfont"
|
||||
|
||||
.align 2
|
||||
gFont2JapaneseGlyphWidths:: @ 86748E4
|
||||
.include "data/graphics/fonts/font2_japanese_widths.inc"
|
||||
|
@ -952,7 +952,11 @@ gUnknown_08DD4BF0:: @ 8DD4BF0
|
||||
.incbin "baserom.gba", 0xdd4bf0, 0x5c
|
||||
|
||||
gUnknown_08DD4C4C:: @ 8DD4C4C
|
||||
.incbin "baserom.gba", 0xdd4c4c, 0x1c4
|
||||
.incbin "baserom.gba", 0xdd4c4c, 0xac
|
||||
|
||||
.align 2
|
||||
gUnknown_08DD4CF8:: @ 8DD4CF8
|
||||
.incbin "graphics/interface/unk_change_case.4bpp.lz"
|
||||
|
||||
.align 2
|
||||
gTilesetPalettes_General:: @ 8DD4E10
|
||||
|
@ -7,7 +7,22 @@
|
||||
|
||||
.align 2
|
||||
gUnref_82EC784:: @ 82EC784
|
||||
.incbin "baserom.gba", 0x2EC784, 0x40
|
||||
.4byte 0x00000000
|
||||
.4byte 0x00000000
|
||||
.4byte 0x04000008
|
||||
.4byte 0x0400000A
|
||||
.4byte 0x0400000C
|
||||
.4byte 0x0400000E
|
||||
.4byte 0x04000010
|
||||
.4byte 0x04000014
|
||||
.4byte 0x04000018
|
||||
.4byte 0x0400001C
|
||||
.4byte 0x04000012
|
||||
.4byte 0x04000016
|
||||
.4byte 0x0400001A
|
||||
.4byte 0x0400001E
|
||||
.4byte 0x02000100
|
||||
.4byte 0x08000400
|
||||
|
||||
gUnknown_82EC7C4:: @ 82EC7C4
|
||||
.2byte 0x0100
|
||||
|
4861
data/link.s
Normal file
4861
data/link.s
Normal file
File diff suppressed because it is too large
Load Diff
4474
data/strings.s
4474
data/strings.s
File diff suppressed because it is too large
Load Diff
BIN
graphics/interface/berrycrush_background.bin
Normal file
BIN
graphics/interface/berrycrush_background.bin
Normal file
Binary file not shown.
BIN
graphics/interface/berrycrush_btnpress.png
Normal file
BIN
graphics/interface/berrycrush_btnpress.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 642 B |
BIN
graphics/interface/berrycrush_container_cap.bin
Normal file
BIN
graphics/interface/berrycrush_container_cap.bin
Normal file
Binary file not shown.
19
graphics/interface/berrycrush_grinder_base.pal
Normal file
19
graphics/interface/berrycrush_grinder_base.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
255 189 189
|
||||
148 131 82
|
||||
180 164 115
|
||||
205 189 148
|
||||
213 205 172
|
||||
230 222 189
|
||||
246 238 205
|
||||
255 255 238
|
||||
98 106 115
|
||||
115 123 131
|
||||
0 0 0
|
||||
0 90 16
|
||||
255 0 0
|
||||
49 82 205
|
||||
172 164 131
|
||||
65 74 90
|
BIN
graphics/interface/berrycrush_grinder_base.png
Normal file
BIN
graphics/interface/berrycrush_grinder_base.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 626 B |
BIN
graphics/interface/berrycrush_grinder_top.bin
Normal file
BIN
graphics/interface/berrycrush_grinder_top.bin
Normal file
Binary file not shown.
19
graphics/interface/berrycrush_misc.pal
Normal file
19
graphics/interface/berrycrush_misc.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
255 189 189
|
||||
255 238 172
|
||||
255 255 0
|
||||
255 230 74
|
||||
255 139 0
|
||||
197 255 255
|
||||
139 213 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
197 255 205
|
||||
255 213 131
|
||||
255 255 156
|
||||
255 255 255
|
BIN
graphics/interface/berrycrush_sparkle.png
Normal file
BIN
graphics/interface/berrycrush_sparkle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 329 B |
19
graphics/interface/berrycrush_timerdigits.pal
Normal file
19
graphics/interface/berrycrush_timerdigits.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
148 222 164
|
||||
164 230 172
|
||||
180 238 189
|
||||
197 246 205
|
||||
213 255 222
|
||||
238 255 238
|
||||
205 106 255
|
||||
172 82 222
|
||||
148 148 148
|
||||
123 123 123
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
180 189 189
|
||||
255 255 255
|
BIN
graphics/interface/berrycrush_timerdigits.png
Normal file
BIN
graphics/interface/berrycrush_timerdigits.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 282 B |
BIN
graphics/interface/blank_1x2.png
Normal file
BIN
graphics/interface/blank_1x2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 B |
19
graphics/interface/dodrioberry_berrysprites.pal
Normal file
19
graphics/interface/dodrioberry_berrysprites.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
230 255 255
|
||||
65 65 65
|
||||
156 156 230
|
||||
115 115 189
|
||||
139 246 213
|
||||
98 213 172
|
||||
255 213 57
|
||||
246 172 57
|
||||
238 238 238
|
||||
0 148 213
|
||||
230 131 49
|
||||
0 156 189
|
||||
255 148 139
|
||||
0 230 255
|
||||
213 98 90
|
||||
0 238 255
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user