through sub_8094D84
This commit is contained in:
@@ -5,612 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start AddBoxMenu
|
|
||||||
AddBoxMenu: @ 8094900
|
|
||||||
push {lr}
|
|
||||||
bl InitMenu
|
|
||||||
movs r0, 0x9
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0xA
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0xB
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0
|
|
||||||
bl SetMenuText
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end AddBoxMenu
|
|
||||||
|
|
||||||
thumb_func_start sub_8094924
|
|
||||||
sub_8094924: @ 8094924
|
|
||||||
push {lr}
|
|
||||||
bl InitMenu
|
|
||||||
ldr r0, _0809493C @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
ldrb r0, [r0, 0x1]
|
|
||||||
cmp r0, 0x3
|
|
||||||
bne _08094940
|
|
||||||
bl sub_8094A0C
|
|
||||||
b _08094944
|
|
||||||
.align 2, 0
|
|
||||||
_0809493C: .4byte sPSSData
|
|
||||||
_08094940:
|
|
||||||
bl sub_809494C
|
|
||||||
_08094944:
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_8094924
|
|
||||||
|
|
||||||
thumb_func_start sub_809494C
|
|
||||||
sub_809494C: @ 809494C
|
|
||||||
push {lr}
|
|
||||||
bl sub_8092458
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r1, r0, 16
|
|
||||||
ldr r0, _0809496C @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
ldrb r0, [r0, 0x1]
|
|
||||||
cmp r0, 0x1
|
|
||||||
beq _08094976
|
|
||||||
cmp r0, 0x1
|
|
||||||
bgt _08094970
|
|
||||||
cmp r0, 0
|
|
||||||
beq _08094982
|
|
||||||
b _080949BC
|
|
||||||
.align 2, 0
|
|
||||||
_0809496C: .4byte sPSSData
|
|
||||||
_08094970:
|
|
||||||
cmp r0, 0x2
|
|
||||||
beq _0809498E
|
|
||||||
b _080949BC
|
|
||||||
_08094976:
|
|
||||||
cmp r1, 0
|
|
||||||
beq _080949BC
|
|
||||||
movs r0, 0x1
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949C0
|
|
||||||
_08094982:
|
|
||||||
cmp r1, 0
|
|
||||||
beq _080949BC
|
|
||||||
movs r0, 0x2
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949C0
|
|
||||||
_0809498E:
|
|
||||||
ldr r0, _080949A4 @ =sIsMonBeingMoved
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _080949B0
|
|
||||||
cmp r1, 0
|
|
||||||
beq _080949A8
|
|
||||||
movs r0, 0x4
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949C0
|
|
||||||
.align 2, 0
|
|
||||||
_080949A4: .4byte sIsMonBeingMoved
|
|
||||||
_080949A8:
|
|
||||||
movs r0, 0x5
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949C0
|
|
||||||
_080949B0:
|
|
||||||
cmp r1, 0
|
|
||||||
beq _080949BC
|
|
||||||
movs r0, 0x3
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949C0
|
|
||||||
_080949BC:
|
|
||||||
movs r0, 0
|
|
||||||
b _08094A06
|
|
||||||
_080949C0:
|
|
||||||
movs r0, 0x6
|
|
||||||
bl SetMenuText
|
|
||||||
ldr r0, _080949E4 @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
ldrb r0, [r0, 0x1]
|
|
||||||
cmp r0, 0x2
|
|
||||||
bne _080949F2
|
|
||||||
ldr r0, _080949E8 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _080949EC
|
|
||||||
movs r0, 0x2
|
|
||||||
bl SetMenuText
|
|
||||||
b _080949F2
|
|
||||||
.align 2, 0
|
|
||||||
_080949E4: .4byte sPSSData
|
|
||||||
_080949E8: .4byte sBoxCursorArea
|
|
||||||
_080949EC:
|
|
||||||
movs r0, 0x1
|
|
||||||
bl SetMenuText
|
|
||||||
_080949F2:
|
|
||||||
movs r0, 0x8
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0x7
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0x1
|
|
||||||
_08094A06:
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_809494C
|
|
||||||
|
|
||||||
thumb_func_start sub_8094A0C
|
|
||||||
sub_8094A0C: @ 8094A0C
|
|
||||||
push {r4,r5,lr}
|
|
||||||
ldr r4, _08094A48 @ =sPSSData
|
|
||||||
ldr r0, [r4]
|
|
||||||
movs r5, 0xCE
|
|
||||||
lsls r5, 4
|
|
||||||
adds r0, r5
|
|
||||||
ldrh r1, [r0]
|
|
||||||
movs r0, 0xCE
|
|
||||||
lsls r0, 1
|
|
||||||
cmp r1, r0
|
|
||||||
beq _08094A9E
|
|
||||||
bl IsActiveItemMoving
|
|
||||||
lsls r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094A70
|
|
||||||
ldr r2, [r4]
|
|
||||||
ldr r0, _08094A4C @ =0x00000ce2
|
|
||||||
adds r1, r2, r0
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094A50
|
|
||||||
adds r0, r2, r5
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _08094A9E
|
|
||||||
movs r0, 0xE
|
|
||||||
bl SetMenuText
|
|
||||||
b _08094AA8
|
|
||||||
.align 2, 0
|
|
||||||
_08094A48: .4byte sPSSData
|
|
||||||
_08094A4C: .4byte 0x00000ce2
|
|
||||||
_08094A50:
|
|
||||||
ldrh r0, [r1]
|
|
||||||
bl ItemIsMail
|
|
||||||
lsls r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094A68
|
|
||||||
movs r0, 0xC
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0x10
|
|
||||||
bl SetMenuText
|
|
||||||
_08094A68:
|
|
||||||
movs r0, 0x11
|
|
||||||
bl SetMenuText
|
|
||||||
b _08094AA8
|
|
||||||
_08094A70:
|
|
||||||
ldr r2, [r4]
|
|
||||||
ldr r0, _08094A8C @ =0x00000ce2
|
|
||||||
adds r1, r2, r0
|
|
||||||
ldrh r0, [r1]
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094A90
|
|
||||||
adds r0, r2, r5
|
|
||||||
ldrh r0, [r0]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _08094A9E
|
|
||||||
movs r0, 0xD
|
|
||||||
bl SetMenuText
|
|
||||||
b _08094AA8
|
|
||||||
.align 2, 0
|
|
||||||
_08094A8C: .4byte 0x00000ce2
|
|
||||||
_08094A90:
|
|
||||||
ldrh r0, [r1]
|
|
||||||
bl ItemIsMail
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
cmp r0, 0x1
|
|
||||||
bne _08094AA2
|
|
||||||
_08094A9E:
|
|
||||||
movs r0, 0
|
|
||||||
b _08094AB0
|
|
||||||
_08094AA2:
|
|
||||||
movs r0, 0xF
|
|
||||||
bl SetMenuText
|
|
||||||
_08094AA8:
|
|
||||||
movs r0, 0
|
|
||||||
bl SetMenuText
|
|
||||||
movs r0, 0x1
|
|
||||||
_08094AB0:
|
|
||||||
pop {r4,r5}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_8094A0C
|
|
||||||
|
|
||||||
thumb_func_start sub_8094AB8
|
|
||||||
sub_8094AB8: @ 8094AB8
|
|
||||||
ldr r1, _08094AD4 @ =sPSSData
|
|
||||||
ldr r1, [r1]
|
|
||||||
movs r2, 0xCB
|
|
||||||
lsls r2, 4
|
|
||||||
adds r1, r2
|
|
||||||
ldr r2, [r1]
|
|
||||||
ldrh r2, [r2, 0x20]
|
|
||||||
strh r2, [r0, 0x20]
|
|
||||||
ldr r1, [r1]
|
|
||||||
ldrh r1, [r1, 0x22]
|
|
||||||
adds r1, 0x14
|
|
||||||
strh r1, [r0, 0x22]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
_08094AD4: .4byte sPSSData
|
|
||||||
thumb_func_end sub_8094AB8
|
|
||||||
|
|
||||||
thumb_func_start sub_8094AD8
|
|
||||||
sub_8094AD8: @ 8094AD8
|
|
||||||
push {r4-r6,lr}
|
|
||||||
sub sp, 0x2C
|
|
||||||
mov r1, sp
|
|
||||||
ldr r0, _08094BA4 @ =gUnknown_83D34A0
|
|
||||||
ldm r0!, {r2-r4}
|
|
||||||
stm r1!, {r2-r4}
|
|
||||||
ldm r0!, {r2,r3,r5}
|
|
||||||
stm r1!, {r2,r3,r5}
|
|
||||||
add r4, sp, 0x18
|
|
||||||
adds r1, r4, 0
|
|
||||||
ldr r0, _08094BA8 @ =gUnknown_83D34B8
|
|
||||||
ldm r0!, {r2,r3,r5}
|
|
||||||
stm r1!, {r2,r3,r5}
|
|
||||||
ldr r0, [r0]
|
|
||||||
str r0, [r1]
|
|
||||||
mov r0, sp
|
|
||||||
bl LoadSpriteSheets
|
|
||||||
adds r0, r4, 0
|
|
||||||
bl LoadSpritePalettes
|
|
||||||
ldr r0, _08094BAC @ =0x0000daca
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
ldr r6, _08094BB0 @ =sPSSData
|
|
||||||
ldr r1, [r6]
|
|
||||||
ldr r4, _08094BB4 @ =0x00000cd4
|
|
||||||
adds r1, r4
|
|
||||||
strb r0, [r1]
|
|
||||||
ldr r0, _08094BB8 @ =0x0000dac7
|
|
||||||
bl IndexOfSpritePaletteTag
|
|
||||||
ldr r1, [r6]
|
|
||||||
ldr r5, _08094BBC @ =0x00000cd5
|
|
||||||
adds r1, r5
|
|
||||||
strb r0, [r1]
|
|
||||||
ldr r0, _08094BC0 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
ldr r1, _08094BC4 @ =sBoxCursorPosition
|
|
||||||
ldrb r1, [r1]
|
|
||||||
add r4, sp, 0x28
|
|
||||||
mov r5, sp
|
|
||||||
adds r5, 0x2A
|
|
||||||
adds r2, r4, 0
|
|
||||||
adds r3, r5, 0
|
|
||||||
bl sub_8092398
|
|
||||||
ldr r0, _08094BC8 @ =gUnknown_83D350C
|
|
||||||
movs r2, 0
|
|
||||||
ldrsh r1, [r4, r2]
|
|
||||||
movs r3, 0
|
|
||||||
ldrsh r2, [r5, r3]
|
|
||||||
movs r3, 0x6
|
|
||||||
bl CreateSprite
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
cmp r0, 0x40
|
|
||||||
beq _08094BD8
|
|
||||||
ldr r2, [r6]
|
|
||||||
movs r4, 0xCB
|
|
||||||
lsls r4, 4
|
|
||||||
adds r3, r2, r4
|
|
||||||
lsls r1, r0, 4
|
|
||||||
adds r1, r0
|
|
||||||
lsls r1, 2
|
|
||||||
ldr r0, _08094BCC @ =gSprites
|
|
||||||
adds r1, r0
|
|
||||||
str r1, [r3]
|
|
||||||
ldr r0, _08094BD0 @ =sCanOnlyMove
|
|
||||||
ldr r5, _08094BB4 @ =0x00000cd4
|
|
||||||
adds r2, r5
|
|
||||||
ldrb r0, [r0]
|
|
||||||
adds r2, r0
|
|
||||||
ldrb r2, [r2]
|
|
||||||
lsls r2, 4
|
|
||||||
ldrb r3, [r1, 0x5]
|
|
||||||
movs r0, 0xF
|
|
||||||
ands r0, r3
|
|
||||||
orrs r0, r2
|
|
||||||
strb r0, [r1, 0x5]
|
|
||||||
ldr r0, [r6]
|
|
||||||
adds r0, r4
|
|
||||||
ldr r2, [r0]
|
|
||||||
ldrb r1, [r2, 0x5]
|
|
||||||
movs r0, 0xD
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, 0x4
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2, 0x5]
|
|
||||||
ldr r0, _08094BD4 @ =sIsMonBeingMoved
|
|
||||||
ldrb r0, [r0]
|
|
||||||
cmp r0, 0
|
|
||||||
beq _08094BE4
|
|
||||||
ldr r0, [r6]
|
|
||||||
adds r0, r4
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r1, 0x3
|
|
||||||
bl StartSpriteAnim
|
|
||||||
b _08094BE4
|
|
||||||
.align 2, 0
|
|
||||||
_08094BA4: .4byte gUnknown_83D34A0
|
|
||||||
_08094BA8: .4byte gUnknown_83D34B8
|
|
||||||
_08094BAC: .4byte 0x0000daca
|
|
||||||
_08094BB0: .4byte sPSSData
|
|
||||||
_08094BB4: .4byte 0x00000cd4
|
|
||||||
_08094BB8: .4byte 0x0000dac7
|
|
||||||
_08094BBC: .4byte 0x00000cd5
|
|
||||||
_08094BC0: .4byte sBoxCursorArea
|
|
||||||
_08094BC4: .4byte sBoxCursorPosition
|
|
||||||
_08094BC8: .4byte gUnknown_83D350C
|
|
||||||
_08094BCC: .4byte gSprites
|
|
||||||
_08094BD0: .4byte sCanOnlyMove
|
|
||||||
_08094BD4: .4byte sIsMonBeingMoved
|
|
||||||
_08094BD8:
|
|
||||||
ldr r0, [r6]
|
|
||||||
movs r1, 0xCB
|
|
||||||
lsls r1, 4
|
|
||||||
adds r0, r1
|
|
||||||
movs r1, 0
|
|
||||||
str r1, [r0]
|
|
||||||
_08094BE4:
|
|
||||||
ldr r0, _08094BF8 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0x1
|
|
||||||
bne _08094BFC
|
|
||||||
movs r3, 0xD
|
|
||||||
movs r4, 0x1
|
|
||||||
b _08094C00
|
|
||||||
.align 2, 0
|
|
||||||
_08094BF8: .4byte sBoxCursorArea
|
|
||||||
_08094BFC:
|
|
||||||
movs r3, 0x15
|
|
||||||
movs r4, 0x2
|
|
||||||
_08094C00:
|
|
||||||
ldr r0, _08094C54 @ =gUnknown_83D3524
|
|
||||||
movs r1, 0
|
|
||||||
movs r2, 0
|
|
||||||
bl CreateSprite
|
|
||||||
lsls r0, 24
|
|
||||||
lsrs r0, 24
|
|
||||||
cmp r0, 0x40
|
|
||||||
beq _08094C68
|
|
||||||
ldr r5, _08094C58 @ =sPSSData
|
|
||||||
ldr r2, [r5]
|
|
||||||
ldr r3, _08094C5C @ =0x00000cb4
|
|
||||||
adds r2, r3
|
|
||||||
lsls r1, r0, 4
|
|
||||||
adds r1, r0
|
|
||||||
lsls r1, 2
|
|
||||||
ldr r0, _08094C60 @ =gSprites
|
|
||||||
adds r1, r0
|
|
||||||
str r1, [r2]
|
|
||||||
lsls r3, r4, 2
|
|
||||||
ldrb r2, [r1, 0x5]
|
|
||||||
movs r0, 0xD
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r3
|
|
||||||
strb r0, [r1, 0x5]
|
|
||||||
ldr r0, _08094C64 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
beq _08094C74
|
|
||||||
ldr r0, [r5]
|
|
||||||
ldr r4, _08094C5C @ =0x00000cb4
|
|
||||||
adds r0, r4
|
|
||||||
ldr r1, [r0]
|
|
||||||
adds r1, 0x3E
|
|
||||||
ldrb r0, [r1]
|
|
||||||
movs r2, 0x4
|
|
||||||
orrs r0, r2
|
|
||||||
strb r0, [r1]
|
|
||||||
b _08094C74
|
|
||||||
.align 2, 0
|
|
||||||
_08094C54: .4byte gUnknown_83D3524
|
|
||||||
_08094C58: .4byte sPSSData
|
|
||||||
_08094C5C: .4byte 0x00000cb4
|
|
||||||
_08094C60: .4byte gSprites
|
|
||||||
_08094C64: .4byte sBoxCursorArea
|
|
||||||
_08094C68:
|
|
||||||
ldr r0, _08094C7C @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
ldr r5, _08094C80 @ =0x00000cb4
|
|
||||||
adds r0, r5
|
|
||||||
movs r1, 0
|
|
||||||
str r1, [r0]
|
|
||||||
_08094C74:
|
|
||||||
add sp, 0x2C
|
|
||||||
pop {r4-r6}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08094C7C: .4byte sPSSData
|
|
||||||
_08094C80: .4byte 0x00000cb4
|
|
||||||
thumb_func_end sub_8094AD8
|
|
||||||
|
|
||||||
thumb_func_start sub_8094C84
|
|
||||||
sub_8094C84: @ 8094C84
|
|
||||||
push {lr}
|
|
||||||
ldr r2, _08094CBC @ =sCanOnlyMove
|
|
||||||
movs r1, 0
|
|
||||||
ldrb r0, [r2]
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094C92
|
|
||||||
movs r1, 0x1
|
|
||||||
_08094C92:
|
|
||||||
strb r1, [r2]
|
|
||||||
ldr r0, _08094CC0 @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r3, 0xCB
|
|
||||||
lsls r3, 4
|
|
||||||
adds r1, r0, r3
|
|
||||||
ldr r3, [r1]
|
|
||||||
ldr r1, _08094CC4 @ =0x00000cd4
|
|
||||||
adds r0, r1
|
|
||||||
ldrb r2, [r2]
|
|
||||||
adds r0, r2
|
|
||||||
ldrb r1, [r0]
|
|
||||||
lsls r1, 4
|
|
||||||
ldrb r2, [r3, 0x5]
|
|
||||||
movs r0, 0xF
|
|
||||||
ands r0, r2
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r3, 0x5]
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08094CBC: .4byte sCanOnlyMove
|
|
||||||
_08094CC0: .4byte sPSSData
|
|
||||||
_08094CC4: .4byte 0x00000cd4
|
|
||||||
thumb_func_end sub_8094C84
|
|
||||||
|
|
||||||
thumb_func_start GetBoxCursorPosition
|
|
||||||
GetBoxCursorPosition: @ 8094CC8
|
|
||||||
ldr r0, _08094CD0 @ =sBoxCursorPosition
|
|
||||||
ldrb r0, [r0]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
_08094CD0: .4byte sBoxCursorPosition
|
|
||||||
thumb_func_end GetBoxCursorPosition
|
|
||||||
|
|
||||||
thumb_func_start sub_8094CD4
|
|
||||||
sub_8094CD4: @ 8094CD4
|
|
||||||
push {r4-r6,lr}
|
|
||||||
adds r5, r0, 0
|
|
||||||
adds r6, r1, 0
|
|
||||||
ldr r0, _08094D00 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094D08
|
|
||||||
ldr r4, _08094D04 @ =sBoxCursorPosition
|
|
||||||
movs r0, 0
|
|
||||||
ldrsb r0, [r4, r0]
|
|
||||||
movs r1, 0x6
|
|
||||||
bl __modsi3
|
|
||||||
strb r0, [r5]
|
|
||||||
movs r0, 0
|
|
||||||
ldrsb r0, [r4, r0]
|
|
||||||
movs r1, 0x6
|
|
||||||
bl __divsi3
|
|
||||||
b _08094D0C
|
|
||||||
.align 2, 0
|
|
||||||
_08094D00: .4byte sBoxCursorArea
|
|
||||||
_08094D04: .4byte sBoxCursorPosition
|
|
||||||
_08094D08:
|
|
||||||
movs r0, 0
|
|
||||||
strb r0, [r5]
|
|
||||||
_08094D0C:
|
|
||||||
strb r0, [r6]
|
|
||||||
pop {r4-r6}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end sub_8094CD4
|
|
||||||
|
|
||||||
thumb_func_start sub_8094D14
|
|
||||||
sub_8094D14: @ 8094D14
|
|
||||||
push {lr}
|
|
||||||
adds r1, r0, 0
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
ldr r0, _08094D30 @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r2, 0xCB
|
|
||||||
lsls r2, 4
|
|
||||||
adds r0, r2
|
|
||||||
ldr r0, [r0]
|
|
||||||
bl StartSpriteAnim
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08094D30: .4byte sPSSData
|
|
||||||
thumb_func_end sub_8094D14
|
|
||||||
|
|
||||||
thumb_func_start sub_8094D34
|
|
||||||
sub_8094D34: @ 8094D34
|
|
||||||
ldr r0, _08094D3C @ =sMovingMonOrigBoxId
|
|
||||||
ldrb r0, [r0]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
_08094D3C: .4byte sMovingMonOrigBoxId
|
|
||||||
thumb_func_end sub_8094D34
|
|
||||||
|
|
||||||
thumb_func_start sub_8094D40
|
|
||||||
sub_8094D40: @ 8094D40
|
|
||||||
ldr r0, _08094D5C @ =sPSSData
|
|
||||||
ldr r0, [r0]
|
|
||||||
movs r1, 0xCB
|
|
||||||
lsls r1, 4
|
|
||||||
adds r0, r1
|
|
||||||
ldr r2, [r0]
|
|
||||||
ldrb r1, [r2, 0x5]
|
|
||||||
movs r0, 0xD
|
|
||||||
negs r0, r0
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, 0x4
|
|
||||||
orrs r0, r1
|
|
||||||
strb r0, [r2, 0x5]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
_08094D5C: .4byte sPSSData
|
|
||||||
thumb_func_end sub_8094D40
|
|
||||||
|
|
||||||
thumb_func_start sub_8094D60
|
|
||||||
sub_8094D60: @ 8094D60
|
|
||||||
push {lr}
|
|
||||||
ldr r0, _08094D7C @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094D78
|
|
||||||
ldr r0, _08094D80 @ =sBoxCursorPosition
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, 0
|
|
||||||
bl sub_8095D44
|
|
||||||
_08094D78:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08094D7C: .4byte sBoxCursorArea
|
|
||||||
_08094D80: .4byte sBoxCursorPosition
|
|
||||||
thumb_func_end sub_8094D60
|
|
||||||
|
|
||||||
thumb_func_start sub_8094D84
|
|
||||||
sub_8094D84: @ 8094D84
|
|
||||||
push {lr}
|
|
||||||
ldr r0, _08094DA0 @ =sBoxCursorArea
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, 24
|
|
||||||
asrs r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094D9C
|
|
||||||
ldr r0, _08094DA4 @ =sBoxCursorPosition
|
|
||||||
ldrb r1, [r0]
|
|
||||||
movs r0, 0
|
|
||||||
bl sub_8095C84
|
|
||||||
_08094D9C:
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_08094DA0: .4byte sBoxCursorArea
|
|
||||||
_08094DA4: .4byte sBoxCursorPosition
|
|
||||||
thumb_func_end sub_8094D84
|
|
||||||
|
|
||||||
@ file boundary?
|
@ file boundary?
|
||||||
|
|
||||||
thumb_func_start InitMenu
|
thumb_func_start InitMenu
|
||||||
|
|||||||
@@ -6,50 +6,6 @@
|
|||||||
.section .rodata
|
.section .rodata
|
||||||
.align 2
|
.align 2
|
||||||
|
|
||||||
gUnknown_83D34A0:: @ 83D34A0
|
|
||||||
obj_tiles gUnknown_83D2BEC, 0x0800, 0
|
|
||||||
obj_tiles gUnknown_83D33EC, 0x0080, 1
|
|
||||||
null_obj_tiles
|
|
||||||
|
|
||||||
gUnknown_83D34B8:: @ 83D34B8
|
|
||||||
obj_pal gUnknown_83D2BCC, 56007
|
|
||||||
null_obj_pal
|
|
||||||
|
|
||||||
gUnknown_83D34C8::
|
|
||||||
.4byte 0x80000000, 0x00000400
|
|
||||||
|
|
||||||
gUnknown_83D34D0::
|
|
||||||
.4byte 0x40000000, 0x00000400
|
|
||||||
|
|
||||||
gUnknown_83D34D8::
|
|
||||||
obj_image_anim_frame 0x0000, 30
|
|
||||||
obj_image_anim_frame 0x0010, 30
|
|
||||||
obj_image_anim_jump 0
|
|
||||||
|
|
||||||
gUnknown_83D34E4::
|
|
||||||
obj_image_anim_frame 0x0000, 5
|
|
||||||
obj_image_anim_end
|
|
||||||
|
|
||||||
gUnknown_83D34EC::
|
|
||||||
obj_image_anim_frame 0x0020, 5
|
|
||||||
obj_image_anim_end
|
|
||||||
|
|
||||||
gUnknown_83D34F4::
|
|
||||||
obj_image_anim_frame 0x0030, 5
|
|
||||||
obj_image_anim_end
|
|
||||||
|
|
||||||
gUnknown_83D34FC::
|
|
||||||
.4byte gUnknown_83D34D8
|
|
||||||
.4byte gUnknown_83D34E4
|
|
||||||
.4byte gUnknown_83D34EC
|
|
||||||
.4byte gUnknown_83D34F4
|
|
||||||
|
|
||||||
gUnknown_83D350C:: @ 83D350C
|
|
||||||
spr_template 0, 56010, gUnknown_83D34C8, gUnknown_83D34FC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
|
||||||
|
|
||||||
gUnknown_83D3524:: @ 83D3524
|
|
||||||
spr_template 1, 56010, gUnknown_83D34D0, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8094AB8
|
|
||||||
|
|
||||||
gUnknown_83D353C:: @ 83D353C
|
gUnknown_83D353C:: @ 83D353C
|
||||||
.4byte gUnknown_8418468
|
.4byte gUnknown_8418468
|
||||||
.4byte gUnknown_841846F
|
.4byte gUnknown_841846F
|
||||||
|
|||||||
@@ -72,6 +72,48 @@ enum
|
|||||||
PC_TEXT_FMT_ITEM_NAME,
|
PC_TEXT_FMT_ITEM_NAME,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PC_TEXT_CANCEL,
|
||||||
|
PC_TEXT_STORE,
|
||||||
|
PC_TEXT_WITHDRAW,
|
||||||
|
PC_TEXT_MOVE,
|
||||||
|
PC_TEXT_SHIFT,
|
||||||
|
PC_TEXT_PLACE,
|
||||||
|
PC_TEXT_SUMMARY,
|
||||||
|
PC_TEXT_RELEASE,
|
||||||
|
PC_TEXT_MARK,
|
||||||
|
PC_TEXT_JUMP,
|
||||||
|
PC_TEXT_WALLPAPER,
|
||||||
|
PC_TEXT_NAME,
|
||||||
|
PC_TEXT_TAKE,
|
||||||
|
PC_TEXT_GIVE,
|
||||||
|
PC_TEXT_GIVE2,
|
||||||
|
PC_TEXT_SWITCH,
|
||||||
|
PC_TEXT_BAG,
|
||||||
|
PC_TEXT_INFO,
|
||||||
|
PC_TEXT_SCENERY1,
|
||||||
|
PC_TEXT_SCENERY2,
|
||||||
|
PC_TEXT_SCENERY3,
|
||||||
|
PC_TEXT_ETCETERA,
|
||||||
|
PC_TEXT_FOREST,
|
||||||
|
PC_TEXT_CITY,
|
||||||
|
PC_TEXT_DESERT,
|
||||||
|
PC_TEXT_SAVANNA,
|
||||||
|
PC_TEXT_CRAG,
|
||||||
|
PC_TEXT_VOLCANO,
|
||||||
|
PC_TEXT_SNOW,
|
||||||
|
PC_TEXT_CAVE,
|
||||||
|
PC_TEXT_BEACH,
|
||||||
|
PC_TEXT_SEAFLOOR,
|
||||||
|
PC_TEXT_RIVER,
|
||||||
|
PC_TEXT_SKY,
|
||||||
|
PC_TEXT_POLKADOT,
|
||||||
|
PC_TEXT_POKECENTER,
|
||||||
|
PC_TEXT_MACHINE,
|
||||||
|
PC_TEXT_SIMPLE,
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CURSOR_AREA_IN_BOX,
|
CURSOR_AREA_IN_BOX,
|
||||||
|
|||||||
@@ -2616,10 +2616,10 @@ void ClearBottomWindow(void)
|
|||||||
void AddWallpaperSetsMenu(void)
|
void AddWallpaperSetsMenu(void)
|
||||||
{
|
{
|
||||||
InitMenu();
|
InitMenu();
|
||||||
SetMenuText(18);
|
SetMenuText(PC_TEXT_SCENERY1);
|
||||||
SetMenuText(19);
|
SetMenuText(PC_TEXT_SCENERY2);
|
||||||
SetMenuText(20);
|
SetMenuText(PC_TEXT_SCENERY3);
|
||||||
SetMenuText(21);
|
SetMenuText(PC_TEXT_ETCETERA);
|
||||||
AddMenu();
|
AddMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2629,28 +2629,28 @@ void AddWallpapersMenu(u8 wallpaperSet)
|
|||||||
switch (wallpaperSet)
|
switch (wallpaperSet)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
SetMenuText(22);
|
SetMenuText(PC_TEXT_FOREST);
|
||||||
SetMenuText(23);
|
SetMenuText(PC_TEXT_CITY);
|
||||||
SetMenuText(24);
|
SetMenuText(PC_TEXT_DESERT);
|
||||||
SetMenuText(25);
|
SetMenuText(PC_TEXT_SAVANNA);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
SetMenuText(26);
|
SetMenuText(PC_TEXT_CRAG);
|
||||||
SetMenuText(27);
|
SetMenuText(PC_TEXT_VOLCANO);
|
||||||
SetMenuText(28);
|
SetMenuText(PC_TEXT_SNOW);
|
||||||
SetMenuText(29);
|
SetMenuText(PC_TEXT_CAVE);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
SetMenuText(30);
|
SetMenuText(PC_TEXT_BEACH);
|
||||||
SetMenuText(31);
|
SetMenuText(PC_TEXT_SEAFLOOR);
|
||||||
SetMenuText(32);
|
SetMenuText(PC_TEXT_RIVER);
|
||||||
SetMenuText(33);
|
SetMenuText(PC_TEXT_SKY);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
SetMenuText(34);
|
SetMenuText(PC_TEXT_POLKADOT);
|
||||||
SetMenuText(35);
|
SetMenuText(PC_TEXT_POKECENTER);
|
||||||
SetMenuText(36);
|
SetMenuText(PC_TEXT_MACHINE);
|
||||||
SetMenuText(37);
|
SetMenuText(PC_TEXT_SIMPLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
AddMenu();
|
AddMenu();
|
||||||
|
|||||||
+307
-12
@@ -2,10 +2,11 @@
|
|||||||
#include "gflib.h"
|
#include "gflib.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
#include "mail_data.h"
|
||||||
#include "pokemon_storage_system_internal.h"
|
#include "pokemon_storage_system_internal.h"
|
||||||
#include "pokemon_summary_screen.h"
|
#include "pokemon_summary_screen.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
#include "constants/species.h"
|
#include "constants/items.h"
|
||||||
#include "constants/moves.h"
|
#include "constants/moves.h"
|
||||||
|
|
||||||
EWRAM_DATA struct Pokemon gUnknown_20397BC = {};
|
EWRAM_DATA struct Pokemon gUnknown_20397BC = {};
|
||||||
@@ -39,12 +40,14 @@ u8 InBoxInput_GrabbingMultiple(void);
|
|||||||
u8 InBoxInput_MovingMultiple(void);
|
u8 InBoxInput_MovingMultiple(void);
|
||||||
void AddBoxMenu(void);
|
void AddBoxMenu(void);
|
||||||
bool8 sub_8094924(void);
|
bool8 sub_8094924(void);
|
||||||
|
bool8 sub_809494C(void);
|
||||||
|
bool8 sub_8094A0C(void);
|
||||||
void sub_8094AD8(void);
|
void sub_8094AD8(void);
|
||||||
void sub_8094C84(void);
|
void sub_8094C84(void);
|
||||||
|
|
||||||
const u16 gUnknown_83D2BCC[] = INCBIN_U16("graphics/interface/pss_unk_83D2BCC.gbapal");
|
const u16 gHandCursorPalette[] = INCBIN_U16("graphics/interface/pss_unk_83D2BCC.gbapal");
|
||||||
const u16 gUnknown_83D2BEC[] = INCBIN_U16("graphics/interface/pss_unk_83D2BEC.4bpp");
|
const u16 gHandCursorTiles[] = INCBIN_U16("graphics/interface/pss_unk_83D2BEC.4bpp");
|
||||||
const u16 gUnknown_83D33EC[] = INCBIN_U16("graphics/interface/pss_unk_83D33EC.4bpp");
|
const u16 gHandCursorShadowTiles[] = INCBIN_U16("graphics/interface/pss_unk_83D33EC.4bpp");
|
||||||
|
|
||||||
void sub_80922C0(void)
|
void sub_80922C0(void)
|
||||||
{
|
{
|
||||||
@@ -1720,14 +1723,13 @@ u8 HandleInput(void)
|
|||||||
u8 (*func)(void);
|
u8 (*func)(void);
|
||||||
s8 area;
|
s8 area;
|
||||||
}
|
}
|
||||||
static const inputFuncs[] =
|
static const inputFuncs[] = {
|
||||||
{
|
{HandleInput_InBox, CURSOR_AREA_IN_BOX},
|
||||||
{HandleInput_InBox, CURSOR_AREA_IN_BOX},
|
{HandleInput_InParty, CURSOR_AREA_IN_PARTY},
|
||||||
{HandleInput_InParty, CURSOR_AREA_IN_PARTY},
|
{HandleInput_OnBox, CURSOR_AREA_BOX},
|
||||||
{HandleInput_OnBox, CURSOR_AREA_BOX},
|
{HandleInput_OnButtons, CURSOR_AREA_BUTTONS},
|
||||||
{HandleInput_OnButtons, CURSOR_AREA_BUTTONS},
|
{NULL, 0},
|
||||||
{NULL, 0},
|
};
|
||||||
};
|
|
||||||
|
|
||||||
u16 i = 0;
|
u16 i = 0;
|
||||||
while (inputFuncs[i].func != NULL)
|
while (inputFuncs[i].func != NULL)
|
||||||
@@ -1739,3 +1741,296 @@ u8 HandleInput(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddBoxMenu(void)
|
||||||
|
{
|
||||||
|
InitMenu();
|
||||||
|
SetMenuText(PC_TEXT_JUMP);
|
||||||
|
SetMenuText(PC_TEXT_WALLPAPER);
|
||||||
|
SetMenuText(PC_TEXT_NAME);
|
||||||
|
SetMenuText(PC_TEXT_CANCEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_8094924(void)
|
||||||
|
{
|
||||||
|
InitMenu();
|
||||||
|
if (sPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
|
||||||
|
return sub_809494C();
|
||||||
|
else
|
||||||
|
return sub_8094A0C();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_809494C(void)
|
||||||
|
{
|
||||||
|
u16 var0 = sub_8092458();
|
||||||
|
|
||||||
|
switch (sPSSData->boxOption)
|
||||||
|
{
|
||||||
|
case BOX_OPTION_DEPOSIT:
|
||||||
|
if (var0)
|
||||||
|
SetMenuText(PC_TEXT_STORE);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
break;
|
||||||
|
case BOX_OPTION_WITHDRAW:
|
||||||
|
if (var0)
|
||||||
|
SetMenuText(PC_TEXT_WITHDRAW);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
break;
|
||||||
|
case BOX_OPTION_MOVE_MONS:
|
||||||
|
if (sIsMonBeingMoved)
|
||||||
|
{
|
||||||
|
if (var0)
|
||||||
|
SetMenuText(PC_TEXT_SHIFT);
|
||||||
|
else
|
||||||
|
SetMenuText(PC_TEXT_PLACE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (var0)
|
||||||
|
SetMenuText(PC_TEXT_MOVE);
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BOX_OPTION_MOVE_ITEMS:
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_SUMMARY);
|
||||||
|
if (sPSSData->boxOption == BOX_OPTION_MOVE_MONS)
|
||||||
|
{
|
||||||
|
if (!sBoxCursorArea)
|
||||||
|
SetMenuText(PC_TEXT_WITHDRAW);
|
||||||
|
else
|
||||||
|
SetMenuText(PC_TEXT_STORE);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_MARK);
|
||||||
|
SetMenuText(PC_TEXT_RELEASE);
|
||||||
|
SetMenuText(PC_TEXT_CANCEL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_8094A0C(void)
|
||||||
|
{
|
||||||
|
if (sPSSData->cursorMonSpecies == SPECIES_EGG)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!IsActiveItemMoving())
|
||||||
|
{
|
||||||
|
if (sPSSData->cursorMonItem == ITEM_NONE)
|
||||||
|
{
|
||||||
|
if (sPSSData->cursorMonSpecies == SPECIES_NONE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_GIVE2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!ItemIsMail(sPSSData->cursorMonItem))
|
||||||
|
{
|
||||||
|
SetMenuText(PC_TEXT_TAKE);
|
||||||
|
SetMenuText(PC_TEXT_BAG);
|
||||||
|
}
|
||||||
|
SetMenuText(PC_TEXT_INFO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (sPSSData->cursorMonItem == ITEM_NONE)
|
||||||
|
{
|
||||||
|
if (sPSSData->cursorMonSpecies == SPECIES_NONE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_GIVE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (ItemIsMail(sPSSData->cursorMonItem) == TRUE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_SWITCH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SetMenuText(PC_TEXT_CANCEL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094AB8(struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
sprite->pos1.x = sPSSData->field_CB4->pos1.x;
|
||||||
|
sprite->pos1.y = sPSSData->field_CB4->pos1.y + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094AD8(void)
|
||||||
|
{
|
||||||
|
u16 x, y;
|
||||||
|
u8 spriteId;
|
||||||
|
u8 priority, subpriority;
|
||||||
|
struct SpriteSheet spriteSheets[] = {
|
||||||
|
{gHandCursorTiles, 0x800, TAG_TILE_0},
|
||||||
|
{gHandCursorShadowTiles, 0x80, TAG_TILE_1},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SpritePalette spritePalettes[] = {
|
||||||
|
{gHandCursorPalette, TAG_PAL_DAC7},
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct OamData sOamData_857BA0C = {
|
||||||
|
.shape = SPRITE_SHAPE(32x32),
|
||||||
|
.size = SPRITE_SIZE(32x32),
|
||||||
|
.priority = 1,
|
||||||
|
};
|
||||||
|
static const struct OamData sOamData_857BA14 = {
|
||||||
|
.shape = SPRITE_SHAPE(16x16),
|
||||||
|
.size = SPRITE_SIZE(16x16),
|
||||||
|
.priority = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd sSpriteAnim_857BA1C[] = {
|
||||||
|
ANIMCMD_FRAME(0, 30),
|
||||||
|
ANIMCMD_FRAME(16, 30),
|
||||||
|
ANIMCMD_JUMP(0)
|
||||||
|
};
|
||||||
|
static const union AnimCmd sSpriteAnim_857BA28[] = {
|
||||||
|
ANIMCMD_FRAME(0, 5),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
static const union AnimCmd sSpriteAnim_857BA30[] = {
|
||||||
|
ANIMCMD_FRAME(32, 5),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
static const union AnimCmd sSpriteAnim_857BA38[] = {
|
||||||
|
ANIMCMD_FRAME(48, 5),
|
||||||
|
ANIMCMD_END
|
||||||
|
};
|
||||||
|
|
||||||
|
static const union AnimCmd *const sSpriteAnimTable_857BA40[] = {
|
||||||
|
sSpriteAnim_857BA1C,
|
||||||
|
sSpriteAnim_857BA28,
|
||||||
|
sSpriteAnim_857BA30,
|
||||||
|
sSpriteAnim_857BA38
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct SpriteTemplate gSpriteTemplate_857BA50 = {
|
||||||
|
.tileTag = TAG_TILE_0,
|
||||||
|
.paletteTag = TAG_PAL_WAVEFORM,
|
||||||
|
.oam = &sOamData_857BA0C,
|
||||||
|
.anims = sSpriteAnimTable_857BA40,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = SpriteCallbackDummy,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct SpriteTemplate gSpriteTemplate_857BA68 = {
|
||||||
|
.tileTag = TAG_TILE_1,
|
||||||
|
.paletteTag = TAG_PAL_WAVEFORM,
|
||||||
|
.oam = &sOamData_857BA14,
|
||||||
|
.anims = gDummySpriteAnimTable,
|
||||||
|
.images = NULL,
|
||||||
|
.affineAnims = gDummySpriteAffineAnimTable,
|
||||||
|
.callback = sub_8094AB8,
|
||||||
|
};
|
||||||
|
|
||||||
|
LoadSpriteSheets(spriteSheets);
|
||||||
|
LoadSpritePalettes(spritePalettes);
|
||||||
|
sPSSData->field_CD8[0] = IndexOfSpritePaletteTag(TAG_PAL_WAVEFORM);
|
||||||
|
sPSSData->field_CD8[1] = IndexOfSpritePaletteTag(TAG_PAL_DAC7);
|
||||||
|
|
||||||
|
sub_8092398(sBoxCursorArea, sBoxCursorPosition, &x, &y);
|
||||||
|
spriteId = CreateSprite(&gSpriteTemplate_857BA50, x, y, 6);
|
||||||
|
if (spriteId != MAX_SPRITES)
|
||||||
|
{
|
||||||
|
sPSSData->field_CB4 = &gSprites[spriteId];
|
||||||
|
sPSSData->field_CB4->oam.paletteNum = sPSSData->field_CD8[sCanOnlyMove];
|
||||||
|
sPSSData->field_CB4->oam.priority = 1;
|
||||||
|
if (sIsMonBeingMoved)
|
||||||
|
StartSpriteAnim(sPSSData->field_CB4, 3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sPSSData->field_CB4 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sBoxCursorArea == CURSOR_AREA_IN_PARTY)
|
||||||
|
{
|
||||||
|
subpriority = 13;
|
||||||
|
priority = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
subpriority = 21;
|
||||||
|
priority = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
spriteId = CreateSprite(&gSpriteTemplate_857BA68, 0, 0, subpriority);
|
||||||
|
if (spriteId != MAX_SPRITES)
|
||||||
|
{
|
||||||
|
sPSSData->field_CB8 = &gSprites[spriteId];
|
||||||
|
sPSSData->field_CB8->oam.priority = priority;
|
||||||
|
if (sBoxCursorArea)
|
||||||
|
sPSSData->field_CB8->invisible = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sPSSData->field_CB8 = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094C84(void)
|
||||||
|
{
|
||||||
|
sCanOnlyMove = !sCanOnlyMove;
|
||||||
|
sPSSData->field_CB4->oam.paletteNum = sPSSData->field_CD8[sCanOnlyMove];
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 GetBoxCursorPosition(void)
|
||||||
|
{
|
||||||
|
return sBoxCursorPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094CD4(u8 *arg0, u8 *arg1)
|
||||||
|
{
|
||||||
|
if (sBoxCursorArea == CURSOR_AREA_IN_BOX)
|
||||||
|
{
|
||||||
|
*arg0 = sBoxCursorPosition % IN_BOX_ROWS;
|
||||||
|
*arg1 = sBoxCursorPosition / IN_BOX_ROWS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*arg0 = 0;
|
||||||
|
*arg1 = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094D14(u8 animNum)
|
||||||
|
{
|
||||||
|
StartSpriteAnim(sPSSData->field_CB4, animNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
u8 sub_8094D34(void)
|
||||||
|
{
|
||||||
|
return sMovingMonOrigBoxId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094D40(void)
|
||||||
|
{
|
||||||
|
sPSSData->field_CB4->oam.priority = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094D60(void)
|
||||||
|
{
|
||||||
|
if (sBoxCursorArea == CURSOR_AREA_IN_BOX)
|
||||||
|
sub_8095D44(CURSOR_AREA_IN_BOX, sBoxCursorPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
void sub_8094D84(void)
|
||||||
|
{
|
||||||
|
if (sBoxCursorArea == CURSOR_AREA_IN_BOX)
|
||||||
|
sub_8095C84(CURSOR_AREA_IN_BOX, sBoxCursorPosition);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user