Difference between revisions of "R/S/M Flag Setting"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " R/S/M Flag Setting 0005b82c: 24a2fe5a addiu r2,r5,0xfe5a Ability + fe5a (= 0 if R/S/M) 0005b830: 00a01821 addu r3,r5,r0 r3 = Ability 0005b834: 3045ffff andi r5,r2,0xffff...")
 
Line 21: Line 21:
 
  0005b878: 03e00008 jr r31
 
  0005b878: 03e00008 jr r31
 
  0005b87c: 00000000 nop
 
  0005b87c: 00000000 nop
 +
 +
 +
== Return Locations ==
 +
 +
0005b7d8:  [[Enable Unit's R/S/M Flags]]
 +
0005b7f0: ^^
 +
0005b7fc: ^^
 +
0005b808: ^^

Revision as of 14:05, 29 February 2012

R/S/M Flag Setting
0005b82c: 24a2fe5a addiu r2,r5,0xfe5a		Ability + fe5a (= 0 if R/S/M)
0005b830: 00a01821 addu r3,r5,r0		r3 = Ability
0005b834: 3045ffff andi r5,r2,0xffff
0005b838: 2ca20058 sltiu r2,r5,0x0058
0005b83c: 1040000e beq r2,r0,0x0005b878		Branch if Ability is not an R/S/M Ability
0005b840: 3062ffff andi r2,r3,0xffff
0005b844: 2c4201c6 sltiu r2,r2,0x01c6
0005b848: 10400002 beq r2,r0,0x0005b854		Branch if Ability is not a reaction
0005b84c: 00000000 nop
0005b850: a4830014 sh r3,0x0014(r4)		Store Ability as Unit's Reaction Ability
0005b854: 2484008b addiu r4,r4,0x008b		r4 = Unit's Data Pointer (1st set of Reactions)
0005b858: 000510c2 srl r2,r5,0x03		Ability ID / 8
0005b85c: 00822021 addu r4,r4,r2		Unit's Data Pointer + Ability ID / 8
0005b860: 30a50007 andi r5,r5,0x0007
0005b864: 34020080 ori r2,r0,0x0080		r2 = 80
0005b868: 90830000 lbu r3,0x0000(r4)		r3 = Ability's R/S/M set
0005b86c: 00a21007 srav r2,r2,r5		r2 = R/S/M's active flag
0005b870: 00621825 or r3,r3,r2			Add Ability's R/S/M Flag to active R/S/M
0005b874: a0830000 sb r3,0x0000(r4)		Store new R/S/M
0005b878: 03e00008 jr r31
0005b87c: 00000000 nop


Return Locations

0005b7d8: Enable Unit's R/S/M Flags 0005b7f0: ^^ 0005b7fc: ^^ 0005b808: ^^