Difference between revisions of "Set some target coordinates/attacker animation, others"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00073b9c: 27bdffc0 addiu r29,r29,0xffc0 00073ba0: 34020001 ori r2,r0,0x0001 00073ba4: 3c018004 lui r1,0x8004 00073ba8: ac225980 sw r2,0x5980(r1...")
 
Line 27: Line 27:
 
  00073bfc: 00000000 nop
 
  00073bfc: 00000000 nop
 
  00073c00: 1040001c beq r2,r0,0x00073c74 branch if no targets hit?
 
  00073c00: 1040001c beq r2,r0,0x00073c74 branch if no targets hit?
  00073c04: 2653018c addiu r19,r18,0x018c r19 = misc data + 0x18c
+
  00073c04: 2653018c addiu r19,r18,0x018c r19 = misc data + 0x18c (misc current action data)
 
  Check some reaction
 
  Check some reaction
  00073c08: 1040001a beq r2,r0,0x00073c74
+
  00073c08: 1040001a beq r2,r0,0x00073c74 Branch if no targets hit? again?
  00073c0c: 00008821 addu r17,r0,r0
+
  00073c0c: 00008821 addu r17,r0,r0 r17 = 0
  00073c10: 2414ffff addiu r20,r0,0xffff
+
  00073c10: 2414ffff addiu r20,r0,0xffff r20 = -1
 
  00073c14: 02711021 addu r2,r19,r17 r2 = misc data + 0x18c
 
  00073c14: 02711021 addu r2,r19,r17 r2 = misc data + 0x18c
 
  00073c18: 90440002 lbu r4,0x0002(r2) load target ID
 
  00073c18: 90440002 lbu r4,0x0002(r2) load target ID
Line 38: Line 38:
 
  00073c24: 00408021 addu r16,r2,r0
 
  00073c24: 00408021 addu r16,r2,r0
 
  00073c28: 1200000d beq r16,r0,0x00073c60 branch if no misc data found?
 
  00073c28: 1200000d beq r16,r0,0x00073c60 branch if no misc data found?
  00073c2c: 26310001 addiu r17,r17,0x0001
+
  00073c2c: 26310001 addiu r17,r17,0x0001 r17 + 1 (r17 is number of accounted targets)
 
  00073c30: 8e020134 lw r2,0x0134(r16) load target unit data
 
  00073c30: 8e020134 lw r2,0x0134(r16) load target unit data
 
  00073c34: 00000000 nop
 
  00073c34: 00000000 nop

Revision as of 04:13, 25 October 2021

00073b9c: 27bdffc0 addiu r29,r29,0xffc0
00073ba0: 34020001 ori r2,r0,0x0001
00073ba4: 3c018004 lui r1,0x8004
00073ba8: ac225980 sw r2,0x5980(r1)				
00073bac: 3402002c ori r2,r0,0x002c
00073bb0: afbf003c sw r31,0x003c(r29)
00073bb4: afb40038 sw r20,0x0038(r29)
00073bb8: afb30034 sw r19,0x0034(r29)
00073bbc: afb20030 sw r18,0x0030(r29)
00073bc0: afb1002c sw r17,0x002c(r29)
00073bc4: afb00028 sw r16,0x0028(r29)
00073bc8: 3c018009 lui r1,0x8009
00073bcc: ac2260e4 sw r2,0x60e4(r1)
00073bd0: 0c01e875 jal 0x0007a1d4				get misc unit data
00073bd4: 00000000 nop
00073bd8: 00409021 addu r18,r2,r0
00073bdc: 924201b5 lbu r2,0x01b5(r18)			
00073be0: 00000000 nop
00073be4: 14400004 bne r2,r0,0x00073bf8			branch if ?? != 0
00073be8: a6400008 sh r0,0x0008(r18)			??
00073bec: 02402021 addu r4,r18,r0
00073bf0: 0c01c9cf jal 0x0007273c				set sprite facing direction for attack?
00073bf4: 00002821 addu r5,r0,r0
00073bf8: 9242018d lbu r2,0x018d(r18)			load target hit counter
00073bfc: 00000000 nop
00073c00: 1040001c beq r2,r0,0x00073c74			branch if no targets hit?
00073c04: 2653018c addiu r19,r18,0x018c			r19 = misc data + 0x18c (misc current action data)
Check some reaction
00073c08: 1040001a beq r2,r0,0x00073c74			Branch if no targets hit? again? 
00073c0c: 00008821 addu r17,r0,r0				r17 = 0
00073c10: 2414ffff addiu r20,r0,0xffff				r20 = -1
00073c14: 02711021 addu r2,r19,r17				r2 = misc data + 0x18c
00073c18: 90440002 lbu r4,0x0002(r2)			load target ID
00073c1c: 0c01e9c9 jal 0x0007a724				find misc unit data
00073c20: 00000000 nop
00073c24: 00408021 addu r16,r2,r0
00073c28: 1200000d beq r16,r0,0x00073c60		branch if no misc data found?
00073c2c: 26310001 addiu r17,r17,0x0001		r17 + 1 (r17 is number of accounted targets)
00073c30: 8e020134 lw r2,0x0134(r16)			load target unit data
00073c34: 00000000 nop
00073c38: 9044018a lbu r4,0x018a(r2)			load unit ID
00073c3c: 0c062f82 jal 0x0018be08				Main reaction routine
00073c40: 00000000 nop
00073c44: 14540006 bne r2,r20,0x00073c60        branch if reaction occurred?
00073c48: ae020180 sw r2,0x0180(r16)            store reaction ID?
00073c4c: 8e020134 lw r2,0x0134(r16)
00073c50: 00000000 nop
00073c54: 9044018a lbu r4,0x018a(r2)
00073c58: 0c05fb06 jal 0x0017ec18				map/panel validation?
00073c5c: 26050184 addiu r5,r16,0x0184			r5 = target misc data + 0x184
00073c60: 92620001 lbu r2,0x0001(r19)			load hit counter
00073c64: 00000000 nop
00073c68: 0222102a slt r2,r17,r2				set if counter < hit counter
00073c6c: 1440ffea bne r2,r0,0x00073c18			branch if so
00073c70: 02711021 addu r2,r19,r17				r2 = address of next target in list
00073c74: 3c038009 lui r3,0x8009
00073c78: 8c636214 lw r3,0x6214(r3)				load action phase
00073c7c: 34020001 ori r2,r0,0x0001
00073c80: 1462002b bne r3,r2,0x00073d30			branch if not first attack
00073c84: 34020200 ori r2,r0,0x0200
00073c88: 96420138 lhu r2,0x0138(r18)			load used ability ID
00073c8c: 00000000 nop
00073c90: 1040001d beq r2,r0,0x00073d08			branch if = 0x00 (attack)
00073c94: 00000000 nop
If not attack
00073c98: 9242013a lbu r2,0x013a(r18)			load used Item/weapon ID
00073c9c: 00000000 nop
00073ca0: 2442ffb6 addiu r2,r2,0xffb6			
00073ca4: 2c420002 sltiu r2,r2,0x0002
00073ca8: 14400009 bne r2,r0,0x00073cd0			branch if item is an elemental gun
00073cac: 3402004c ori r2,r0,0x004c
00073cb0: 9243013a lbu r3,0x013a(r18)			load used item/weapon
00073cb4: 00000000 nop
00073cb8: 10620005 beq r3,r2,0x00073cd0			branch if = blast gun
00073cbc: 00000000 nop
00073cc0: 92620017 lbu r2,0x0017(r19)			load last attack used
00073cc4: 00000000 nop
00073cc8: 1040005c beq r2,r0,0x00073e3c			branch if = attack
00073ccc: 00000000 nop
Elemental Gun
00073cd0: 96420138 lhu r2,0x0138(r18)			load used ability
00073cd4: 00000000 nop
00073cd8: 1040000b beq r2,r0,0x00073d08			branch if = attack
00073cdc: 00000000 nop
00073ce0: 9242013a lbu r2,0x013a(r18)			load used item/weapon
00073ce4: 00000000 nop
00073ce8: 2442ffb6 addiu r2,r2,0xffb6
00073cec: 2c420002 sltiu r2,r2,0x0002
00073cf0: 14400005 bne r2,r0,0x00073d08			branch if elemental gun (again)
00073cf4: 3402004c ori r2,r0,0x004c
00073cf8: 9243013a lbu r3,0x013a(r18)
00073cfc: 00000000 nop
00073d00: 14620071 bne r3,r2,0x00073ec8			Skip to end if not an elemental gun
00073d04: 00000000 nop							Don't overwrite animation
Attack + elemental gun
00073d08: 92620001 lbu r2,0x0001(r19)			load hit counter
00073d0c: 00000000 nop
00073d10: 1040006a beq r2,r0,0x00073ebc			branch if no targets hit
00073d14: 02402021 addu r4,r18,r0				r4 = misc data
00073d18: 92640002 lbu r4,0x0002(r19)			load target ID
00073d1c: 0c01e9c9 jal 0x0007a724				get misc data
00073d20: 00000000 nop
00073d24: 02402021 addu r4,r18,r0
00073d28: 0801cfb0 j 0x00073ec0					jump to bottom
00073d2c: 00402821 addu r5,r2,r0
<Change Facing/coordinates for multi hits?> If targeting or reacting
00073d30: 96440138 lhu r4,0x0138(r18)			load used ability
00073d34: 00000000 nop
00073d38: 14820028 bne r4,r2,0x00073ddc			branch if not = 0x200
00073d3c: 340201b8 ori r2,r0,0x01b8
00073d40: 9242018d lbu r2,0x018d(r18)			load target hit counter
00073d44: 00000000 nop
00073d48: 1840005f blez r2,0x00073ec8			branch if no targets hit
00073d4c: 00008821 addu r17,r0,r0
00073d50: 02711021 addu r2,r19,r17
00073d54: 90440002 lbu r4,0x0002(r2)			load target ID
00073d58: 0c01e9c9 jal 0x0007a724				get misc data 
00073d5c: 00000000 nop
00073d60: 00408021 addu r16,r2,r0
00073d64: 12000016 beq r16,r0,0x00073dc0		branch if unit data not found?
00073d68: 00000000 nop
00073d6c: 924201a8 lbu r2,0x01a8(r18)			load target X coordinate
00073d70: 86080070 lh r8,0x0070(r16)			load facing
00073d74: 8e030134 lw r3,0x0134(r16)			r3 = unit data
00073d78: a202007c sb r2,0x007c(r16)			store X coordinate (to move to?)
00073d7c: 924201a9 lbu r2,0x01a9(r18)			load Y
00073d80: 9205007c lbu r5,0x007c(r16)			load X
00073d84: a202007d sb r2,0x007d(r16)			store Y coordinate (to move to?)
00073d88: 924201aa lbu r2,0x01aa(r18)			load map level
00073d8c: 9206007d lbu r6,0x007d(r16)			load Y
00073d90: a202007e sb r2,0x007e(r16)			store map level
00073d94: 9064018a lbu r4,0x018a(r3)			load unit ID
00073d98: 9207007e lbu r7,0x007e(r16)			load map level
00073d9c: 05010003 bgez r8,0x00073dac			branch if facing is greater/equal to zero
00073da0: 00081282 srl r2,r8,0x0a
00073da4: 250803ff addiu r8,r8,0x03ff
00073da8: 00081282 srl r2,r8,0x0a
00073dac: 304200ff andi r2,r2,0x00ff
00073db0: 0c05ff77 jal 0x0017fddc				set rider/mount data?
00073db4: afa20010 sw r2,0x0010(r29)
00073db8: 0c0206c3 jal 0x00081b0c				??
00073dbc: 02002021 addu r4,r16,r0
00073dc0: 9242018d lbu r2,0x018d(r18)			load hit counter
00073dc4: 26310001 addiu r17,r17,0x0001			coutner++
00073dc8: 0222102a slt r2,r17,r2				set if counter < hit counter
00073dcc: 1440ffe1 bne r2,r0,0x00073d54			branch if so
00073dd0: 02711021 addu r2,r19,r17				r2 = next targets address in list
00073dd4: 0801cfb2 j 0x00073ec8					jump to end, don't store animation
00073dd8: 00000000 nop
ability is not 0x200
00073ddc: 86630020 lh r3,0x0020(r19)			load ??
00073de0: 00000000 nop
00073de4: 10620038 beq r3,r2,0x00073ec8			branch if not = 0x18d?
00073de8: 00000000 nop
00073dec: 10800029 beq r4,r0,0x00073e94			branch if attack?
00073df0: 00000000 nop
00073df4: 9242013a lbu r2,0x013a(r18)			load used item/weapon
00073df8: 00000000 nop
00073dfc: 2442ffb6 addiu r2,r2,0xffb6
00073e00: 2c420002 sltiu r2,r2,0x0002
00073e04: 14400015 bne r2,r0,0x00073e5c			branch if elemental gun (are you serious?)
00073e08: 3402004c ori r2,r0,0x004c
00073e0c: 9243013a lbu r3,0x013a(r18)			load used item/weapon
00073e10: 00000000 nop
00073e14: 10620011 beq r3,r2,0x00073e5c			branch if blast gun
00073e18: 00000000 nop
00073e1c: 924201b5 lbu r2,0x01b5(r18)			load ??
00073e20: 00000000 nop
00073e24: 1440000d bne r2,r0,0x00073e5c			branch if not zero
00073e28: 00000000 nop
00073e2c: 92620017 lbu r2,0x0017(r19)			load reaction?
00073e30: 00000000 nop
00073e34: 14400024 bne r2,r0,0x00073ec8			branch if reaction occurred?
00073e38: 00000000 nop
Attack + no elemental gun
00073e3c: 92640002 lbu r4,0x0002(r19)			load hit counter
00073e40: 0c01e9c9 jal 0x0007a724				get misc data
00073e44: 00000000 nop
00073e48: 02402021 addu r4,r18,r0
00073e4c: 0c020b04 jal 0x00082c10				
00073e50: 00402821 addu r5,r2,r0
00073e54: 0801cfb2 j 0x00073ec8					jump to end
00073e58: 00000000 nop
Elemental Gun
00073e5c: 96420138 lhu r2,0x0138(r18)			load used ability
00073e60: 00000000 nop
00073e64: 1040000b beq r2,r0,0x00073e94			branch if attack
00073e68: 00000000 nop
00073e6c: 9242013a lbu r2,0x013a(r18)			load used weapon
00073e70: 00000000 nop
00073e74: 2442ffb6 addiu r2,r2,0xffb6
00073e78: 2c420002 sltiu r2,r2,0x0002
00073e7c: 14400005 bne r2,r0,0x00073e94			branch if elemental gun
00073e80: 3402004c ori r2,r0,0x004c
00073e84: 9243013a lbu r3,0x013a(r18)			load used weapon
00073e88: 00000000 nop
00073e8c: 1462000e bne r3,r2,0x00073ec8			branch if not blast gun
00073e90: 00000000 nop
Elemental Gun
00073e94: 92620001 lbu r2,0x0001(r19)			load hit counter
00073e98: 00000000 nop
00073e9c: 10400007 beq r2,r0,0x00073ebc			branch if no targets hit
00073ea0: 02402021 addu r4,r18,r0
00073ea4: 92640002 lbu r4,0x0002(r19)			load unit ID
00073ea8: 0c01e9c9 jal 0x0007a724				get good ol' misc data
00073eac: 00000000 nop
00073eb0: 02402021 addu r4,r18,r0
00073eb4: 0801cfb0 j 0x00073ec0
00073eb8: 00402821 addu r5,r2,r0
If no targets hit
00073ebc: 00002821 addu r5,r0,r0				Store no animation			
00073ec0: 0c020a23 jal 0x0008288c				Store attack/weapon strike animation
00073ec4: 00000000 nop
00073ec8: 8fbf003c lw r31,0x003c(r29)			occurs after animation is stored for non-attack abilities?
00073ecc: 8fb40038 lw r20,0x0038(r29)
00073ed0: 8fb30034 lw r19,0x0034(r29)
00073ed4: 8fb20030 lw r18,0x0030(r29)
00073ed8: 8fb1002c lw r17,0x002c(r29)
00073edc: 8fb00028 lw r16,0x0028(r29)
00073ee0: 27bd0040 addiu r29,r29,0x0040
00073ee4: 03e00008 jr r31
00073ee8: 00000000 nop