最近想到绿宝石有个special 0xA2能显示精灵队伍,而火红似乎没有这样的ASM,因此自己写了个:- push {lr}
- ldr r3,=0x08069940+1
- bl call_bx
- mov r0,#1
- mov r1,#0
- ldr r3,=0x0807A818+1
- bl call_bx
- ldr r0,=two+1
- mov r1,#10
- ldr r3,=0x0807741C+1
- bl call_bx
- pop {pc}
- call_bx:
- bx r3
- bx r4
- two:
- push {r4,r5,lr}
- add sp,#-12
- lsl r0,r0,#24
- lsr r5,r0,#24
- ldr r0,=0x02037AB8
- ldrb r1,[r0,#7]
- mov r0,#128
- and r0,r1
- lsl r0,r0,#24
- lsr r4,r0,#24
- cmp r4,#0
- bne end
- ldr r3,=0x080563F0+1
- bl call_bx
- str r4,[sp]
- ldr r0,=0x0811FB28+1
- str r0,[sp,#4]
- ldr r0,=three+1
- str r0,[sp,#8]
- mov r0,#3
- mov r1,#0
- mov r2,#11
- mov r3,#0
- ldr r4,=0x0811EA44+1
- bl call_bx+2
- add r0,r5,#0
- ldr r4,=0x08077508+1
- bl call_bx+2
- end:
- add sp,#12
- pop {r4,r5,pc}
- three:
- push {r4,lr}
- ldr r4,=0x020370C0
- ldr r3,=0x0811FB0C+1
- bl call_bx
- lsl r0,r0,#24
- lsr r0,r0,#24
- strh r0,[r4]
- cmp r0,#5
- bls four
- mov r0,#255
- strh r0,[r4]
- four:
- ldr r0,=0x03005024
- ldr r1,=CB2_FadeFromPartyMenu+1
- str r1,[r0]
- ldr r0,=0x080567DC+1
- ldr r3,=0x08000544+1
- bl call_bx
- CB2_FadeFromPartyMenu:
- push {lr}
- ldr r3,=pal_fill_black+1
- bl call_bx
- ldr r0,=five+1
- mov r1,#10
- ldr r3,=0x0807741C+1
- bl call_bx
- mov r0,#1
- pop {r1}
- bx r1
- five:
- push {r4,lr}
- lsl r0,r0,#24
- lsr r4,r0,#24
- ldr r3,=0x0807AA70+1
- bl call_bx
- lsl r0,r0,#24
- cmp r0,#0
- beq end_
- add r0,r4,#0
- ldr r3,=0x08077508+1
- bl call_bx
- ldr r3,=0x0806994C+1
- bl call_bx
- ldr r3,=0x08069B34+1
- bl call_bx
- end_:
- pop {r4,pc}
- pal_fill_black:
- push {lr}
- ldr r3,=0x0807DB38+1
- bl call_bx
- mov r0,#0
- mov r1,#0
- ldr r3,=0x0807A818+1
- bl call_bx
- pop {pc}
复制代码 |