Increase Casualties/Injured Counters

From Final Fantasy Hacktics Wiki
Revision as of 03:28, 25 September 2021 by Pride (talk | contribs) (→‎Return Locations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Increase Casualties/Injured Counters
0005e670: 27bdffe8 addiu r29,r29,0xffe8
0005e674: afbf0014 sw r31,0x0014(r29)
0005e678: afb00010 sw r16,0x0010(r29)
0005e67c: 908201ba lbu r2,0x01ba(r4)		Load Unit's Modified ENTD Flags
0005e680: 00000000 nop
0005e684: 30420030 andi r2,r2,0x0030
0005e688: 10400002 beq r2,r0,0x0005e694		Branch if Unit is on the Blue Team
0005e68c: 34100062 ori r16,r0,0x0062		r16 = 0x62 (Casualties ++)
0005e690: 34100061 ori r16,r0,0x0061		r16 = 0x61 (Injured ++)
0005e694: 0c04ed64 jal 0x0013b590		Load X Main Data Word?
0005e698: 02002021 addu r4,r16,r0		r4 = Casualties/Injured Data
0005e69c: 00402821 addu r5,r2,r0
0005e6a0: 28a2270f slti r2,r5,0x270f
0005e6a4: 10400002 beq r2,r0,0x0005e6b0		Branch if Casualties/Injured Counter >= 9999
0005e6a8: 00000000 nop
0005e6ac: 24a50001 addiu r5,r5,0x0001		Counter ++
0005e6b0: 0c04ed91 jal 0x0013b644		Store X Main Data Word?
0005e6b4: 02002021 addu r4,r16,r0		r4 = Casualties/Injured Data
0005e6b8: 8fbf0014 lw r31,0x0014(r29)
0005e6bc: 8fb00010 lw r16,0x0010(r29)
0005e6c0: 27bd0018 addiu r29,r29,0x0018
0005e6c4: 03e00008 jr r31
0005e6c8: 00000000 nop


Return Locations

BATTLE.BIN
00182b34:
Could be moved exclusively to BATTLE.BIN
Pride: 0015e66c was marked as a return location but no such routine call is made.