经过一番修改后,我发现变成了0号精灵,代码如下:- .gba
- .thumb
- .create "test.gba",0x8000000
- .close
- .open "永暗.gba","test.gba",0x8000000
- .org 0x08F2EB24
- .func new
- ldr r5,=0x0202420B
- ldrb r5,[r5]
- mov r2,#0x58
- mul r5,r2
- ldr r2,=0x02024084
- add r5,r2
- add r5,#0x20
- ldrb r5,[r5]
- cmp r5,#0xE9 ;"饱了又饿"特性编号
- beq yes
- end:
- lsl r6,r2,#0
- mov r2,#0x9B
- add sp,#-0x2C
- str r3,[sp,#12]
- ldr r1,=0x08E0368A
- mov pc,r1
- yes:
- ldrh r5,[r2]
- ; 经过计算将"空腹花纹"编号存入r2
- cmp r5,#4
- bne cmp
- mov r2,#5
- keep:
- mov r5,r0
- mov r0,r2
- mov r1,#0xFF
- add r1,#0x22
- lsl r1,r1,#1
- ldr r0,=BS_Script
- bl 0x08E073E4
- mov r0,r5
- b end
- cmp:
- ; 经过计算将"满腹花纹"编号存入r2
- cmp r5,#5
- bne end
- mov r2,#4
- b keep
- .endfunc
- .pool
- BS_Script:
- .byte 0x10,0x30,0x1,0x83,0x77,0x0,0x45,0xA,0x21,0x0,0x0,0x0,0x0,0x3A,0x83,0x7A,0x0,0x12,0x40,0x0,0x83,0x73,0x0,0x3F
- .org 0x08E03682
- ldr r2,=new
- mov pc,r2
- .pool
- .close
复制代码 |