tata2007 |
2011-10-18 18:47 |
新人士兵3和新人士兵2搞混了,谢谢指正。
以制作连续为例,首先找到二次攻击武器的相关代码: 0802AF88 B5F0 push r4-r7,lr 0802AF8A 4647 mov r7,r8 0802AF8C B480 push r7 0802AF8E 1C06 add r6, r0, #0x0 0802AF90 4688 mov r8,r1 0802AF92 3048 add r0,48h 0802AF94 8800 ldrh r0,[r0,0h] 0802AF96 2800 cmp r0,0h 0802AF98 D102 bne 0802AFA0h 0802AF9A E01F b 0802AFDCh 0802AF9C 2001 mov r0,1h 0802AF9E E01E b 0802AFDEh 0802AFA0 4811 ldr r0,=0203A604h 0802AFA2 6800 ldr r0,[r0,0h] 0802AFA4 8807 ldrh r7,[r0,0h] 0802AFA6 1C30 add r0,r6,0h 0802AFA8 F000 bl 0802AFF0h ;武器双攻处理子程序 0802AFAC 1C05 add r5,r0,0h 0802AFAE 2400 mov r4,0h 0802AFB0 42AC cmp r4,r5 0802AFB2 DA13 bge 0802AFDCh 然后使用远程跳转指令跳到某个空白区,然后插入一段新程序如下: push {r1} add r5,r0,#0x0 mov r4,#0x0 cmp r4,r5 bge goto_0802AFDC ldr r0,[r6,#0x0] ldrb r0,[r0,#0x4] ldr r1, =#0x08ff0200 ldrb r0,[r0,r1] mov r1,#0x10 tst r0,r1 beq goto_0802AFB4 mov r1,#0x5e ldrb r0, [r6,r1] mov r1,#0x14 add r0,r0,r1 mov r1,#0x0 bl $0902a490 lsl r0,r0,#0x18 asr r0,r0,#0x18 cmp r0,#0x1 bne goto_0802AFB4 lsl r5,r5,#0x1 goto_0802AFB4 pop {r1} ldr r0, =#0x0802AFB4 mov pc, r0 goto_0802AFDC pop {r1} ldr r0, =#0x0802AFDC mov pc, r0 就可以实现连续的判定了,当然你还得指定一块区域作为个人特技数据 |
|