Difference between revisions of "Talk:FF7/Field/Script/Opcodes/14 IFUB"
< Talk:FF7
Jump to navigation
Jump to search
Qhimm>Halkun (→=) |
Qhimm>Synergy Blades |
||
Line 45: | Line 45: | ||
--[[User:Halkun|Halkun]] 22:03, 6 Sep 2006 (CDT) | --[[User:Halkun|Halkun]] 22:03, 6 Sep 2006 (CDT) | ||
:Looks about right actually. The GET opcode will be getting (whatever AI is) into bank 6, address D, then again into bank 6, address F (this odd ordering of args follows the GETPC argument list). So to compare the two, if the second nybble is non-zero, we're comparing values at the two address found around the comparison type, rather than a value at an address compared with an explicit value. I've seen another comparing two in bank 5 but I think we can assume it's valid to do this in non-temporary memory banks as well? Can write a script in Meteor and test it in-game to check. [[User:Synergy Blades|SB]] 22:33, 6 Sep 2006 (CDT) |
Revision as of 05:33, 7 September 2006
I had split the first byte arg into two nybbles as per halkun's document. However, the second nybble of the first argument is not always zero. Example: itown1a, timer, script 1; note the second if statement after label j0:
<cpp>
init: return
base:
j1: if(<50>[A] == 1) { GETAI(6,E,D)
j0: if(<50>[11] < 50) { GETAI(6,E,F) if(<66>[D] == F) { INC(5,11) jump(j0) } SETBYTE(50,11,0) } else { SETBYTE(50,A,0) BITOFF(F0,B1,2) SETBYTE(50,11,0) SETBYTE(50,C,1) REQ(E,65) } } jump(j1) return
</cpp>
SB 20:58, 6 Sep 2006 (CDT)
That's odd. It might be a destination bank/source bank pair. (Like the maths use) That makes sense as both values being compaired are in the same bank (6 and 6). In that case, the value being compaired is most likely the source bank address. (i.e. not explicit)
--Halkun 22:03, 6 Sep 2006 (CDT)
- Looks about right actually. The GET opcode will be getting (whatever AI is) into bank 6, address D, then again into bank 6, address F (this odd ordering of args follows the GETPC argument list). So to compare the two, if the second nybble is non-zero, we're comparing values at the two address found around the comparison type, rather than a value at an address compared with an explicit value. I've seen another comparing two in bank 5 but I think we can assume it's valid to do this in non-temporary memory banks as well? Can write a script in Meteor and test it in-game to check. SB 22:33, 6 Sep 2006 (CDT)