Initialize Status Check Data

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Initialize Status Check Data
00059854: 27bdffe8 addiu r29,r29,0xffe8
00059858: afbf0010 sw r31,0x0010(r29)
0005985c: 3c048006 lui r4,0x8006
00059860: 24849414 addiu r4,r4,0x9414		r4 = Pointer to ?
00059864: 0c017991 jal 0x0005e644		Data Nullifying
00059868: 34050080 ori r5,r0,0x0080		Limit = 0x80
0005986c: 3c048006 lui r4,0x8006
00059870: 248462d0 addiu r4,r4,0x62d0		r4 = Pointer to Status Checks
00059874: 0c017991 jal 0x0005e644		Data Nullifying
00059878: 34050037 ori r5,r0,0x0037		Limit = 0x37 (11 total check types)
0005987c: 00003821 addu r7,r0,r0		Current Status = 0
00059880: 00004021 addu r8,r0,r0		Status Pointer Mod = 0
00059884: 3c018006 lui r1,0x8006
00059888: 00280821 addu r1,r1,r8
0005988c: 90255de8 lbu r5,0x5de8(r1)		Load Status Effects Byte 4
00059890: 3c018006 lui r1,0x8006
00059894: 00280821 addu r1,r1,r8
00059898: 90265de9 lbu r6,0x5de9(r1)		Load Status Effects Byte 5
0005989c: 04e10002 bgez r7,0x000598a8		Branch if Current Status >= 0
000598a0: 00e01021 addu r2,r7,r0		r2 = Current Status
000598a4: 24e20007 addiu r2,r7,0x0007		r2 = Current Status + 7 (random  negative crap)
000598a8: 000220c3 sra r4,r2,0x03		Current Status / 8 (rather than setting back to 0 each loop)
000598ac: 30e20007 andi r2,r7,0x0007		Current Status AND 7 (get actual  status bit)
000598b0: 34030080 ori r3,r0,0x0080		r3 = 0x80
000598b4: 00431807 srav r3,r3,r2		0x80 >> Current Status (which  status to enable)
000598b8: 30a20001 andi r2,r5,0x0001
000598bc: 1040000a beq r2,r0,0x000598e8		Branch if KO Flag isn't enabled
000598c0: 30a20002 andi r2,r5,0x0002
000598c4: 3c018006 lui r1,0x8006
000598c8: 00240821 addu r1,r1,r4
000598cc: 902262d0 lbu r2,0x62d0(r1)		Load KO Status Checks
000598d0: 00000000 nop
000598d4: 00621025 or r2,r3,r2			Enable Current Status
000598d8: 3c018006 lui r1,0x8006
000598dc: 00240821 addu r1,r1,r4
000598e0: a02262d0 sb r2,0x62d0(r1)		Store new KO Status Checks
000598e4: 30a20002 andi r2,r5,0x0002
000598e8: 1040000a beq r2,r0,0x00059914		Branch if 0x02 isn't enabled (byte  0x04)
000598ec: 30a20004 andi r2,r5,0x0004
000598f0: 3c018006 lui r1,0x8006
000598f4: 00240821 addu r1,r1,r4
000598f8: 902262d5 lbu r2,0x62d5(r1)		Load 0x02 Status Checks
000598fc: 00000000 nop
00059900: 00621025 or r2,r3,r2			Enable Current Status
00059904: 3c018006 lui r1,0x8006
00059908: 00240821 addu r1,r1,r4
0005990c: a02262d5 sb r2,0x62d5(r1)		Store new 0x02 Status Checks
00059910: 30a20004 andi r2,r5,0x0004
00059914: 1040000a beq r2,r0,0x00059940		Branch if 0x04 isn't enabled (byte 0x04)
00059918: 30a20080 andi r2,r5,0x0080
0005991c: 3c018006 lui r1,0x8006
00059920: 00240821 addu r1,r1,r4
00059924: 902262da lbu r2,0x62da(r1)		Load 0x04 Status Checks
00059928: 00000000 nop
0005992c: 00621025 or r2,r3,r2			Enable Current Status
00059930: 3c018006 lui r1,0x8006
00059934: 00240821 addu r1,r1,r4
00059938: a02262da sb r2,0x62da(r1)		Store new 0x04 Status Checks
0005993c: 30a20080 andi r2,r5,0x0080
00059940: 1040000a beq r2,r0,0x0005996c		Branch if 0x80 isn't enabled (byte  0x04)
00059944: 30c20080 andi r2,r6,0x0080
00059948: 3c018006 lui r1,0x8006
0005994c: 00240821 addu r1,r1,r4
00059950: 902262df lbu r2,0x62df(r1)		Load 0x80 Status Checks
00059954: 00000000 nop
00059958: 00621025 or r2,r3,r2			Enable Current Status
0005995c: 3c018006 lui r1,0x8006
00059960: 00240821 addu r1,r1,r4
00059964: a02262df sb r2,0x62df(r1)		Store new 0x80 Status Checks
00059968: 30c20080 andi r2,r6,0x0080
0005996c: 1040000a beq r2,r0,0x00059998		Branch if 0x80 isn't present (byte  0x05)
00059970: 30c20001 andi r2,r6,0x0001
00059974: 3c018006 lui r1,0x8006
00059978: 00240821 addu r1,r1,r4
0005997c: 902262e4 lbu r2,0x62e4(r1)		Load 0x80 Status Checks
00059980: 00000000 nop
00059984: 00621025 or r2,r3,r2			Enable Current Status
00059988: 3c018006 lui r1,0x8006
0005998c: 00240821 addu r1,r1,r4
00059990: a02262e4 sb r2,0x62e4(r1)		Store new 0x80 Status Checks
00059994: 30c20001 andi r2,r6,0x0001
00059998: 1040000a beq r2,r0,0x000599c4		Branch if Immortal Immunity isn't  enabled
0005999c: 30c20002 andi r2,r6,0x0002
000599a0: 3c018006 lui r1,0x8006
000599a4: 00240821 addu r1,r1,r4
000599a8: 902262e9 lbu r2,0x62e9(r1)		Load Immortal Immunities
000599ac: 00000000 nop
000599b0: 00621025 or r2,r3,r2			Enable Current Status
000599b4: 3c018006 lui r1,0x8006
000599b8: 00240821 addu r1,r1,r4
000599bc: a02262e9 sb r2,0x62e9(r1)		Store new Immortal Immunities
000599c0: 30c20002 andi r2,r6,0x0002
000599c4: 1040000a beq r2,r0,0x000599f0		Branch if Load/Save Formation  Immunities isn't enabled
000599c8: 30c20004 andi r2,r6,0x0004
000599cc: 3c018006 lui r1,0x8006
000599d0: 00240821 addu r1,r1,r4
000599d4: 902262ee lbu r2,0x62ee(r1)		Load Load/Save Formation Immunities
000599d8: 00000000 nop
000599dc: 00621025 or r2,r3,r2			Enable Current Status
000599e0: 3c018006 lui r1,0x8006
000599e4: 00240821 addu r1,r1,r4
000599e8: a02262ee sb r2,0x62ee(r1)		Store new Load/Save Formation  Immunities
000599ec: 30c20004 andi r2,r6,0x0004
000599f0: 1040000a beq r2,r0,0x00059a1c		Branch if 0x04 isn't present (byte  0x05)
000599f4: 30c20008 andi r2,r6,0x0008
000599f8: 3c018006 lui r1,0x8006
000599fc: 00240821 addu r1,r1,r4
00059a00: 902262f3 lbu r2,0x62f3(r1)		Load 0x04 Status Checks
00059a04: 00000000 nop
00059a08: 00621025 or r2,r3,r2			Enable Current Status
00059a0c: 3c018006 lui r1,0x8006
00059a10: 00240821 addu r1,r1,r4
00059a14: a02262f3 sb r2,0x62f3(r1)		Store new 0x04 Status Checks
00059a18: 30c20008 andi r2,r6,0x0008
00059a1c: 1040000a beq r2,r0,0x00059a48		Branch if 0x08 isn't present (byte  0x05)
00059a20: 30c20010 andi r2,r6,0x0010
00059a24: 3c018006 lui r1,0x8006
00059a28: 00240821 addu r1,r1,r4
00059a2c: 902262f8 lbu r2,0x62f8(r1)		Load 0x08 Status Checks
00059a30: 00000000 nop
00059a34: 00621025 or r2,r3,r2			Enable Current Status
00059a38: 3c018006 lui r1,0x8006
00059a3c: 00240821 addu r1,r1,r4
00059a40: a02262f8 sb r2,0x62f8(r1)		Store new 0x08 Status Chekcs
00059a44: 30c20010 andi r2,r6,0x0010
00059a48: 10400009 beq r2,r0,0x00059a70		Branch if 0x10 isn't present (byte  0x05)
00059a4c: 25080010 addiu r8,r8,0x0010		Status Pointer Mod += 0x10
00059a50: 3c018006 lui r1,0x8006
00059a54: 00240821 addu r1,r1,r4
00059a58: 902262fd lbu r2,0x62fd(r1)		Load 0x10 Status Checks
00059a5c: 00000000 nop
00059a60: 00621025 or r2,r3,r2			Enable Current Status
00059a64: 3c018006 lui r1,0x8006
00059a68: 00240821 addu r1,r1,r4
00059a6c: a02262fd sb r2,0x62fd(r1)		Store new 0x10 Status Checks
00059a70: 24e70001 addiu r7,r7,0x0001		Current Status += 1
00059a74: 28e20028 slti r2,r7,0x0028
00059a78: 1440ff82 bne r2,r0,0x00059884		Branch if Current Status < 40
00059a7c: 00000000 nop
  • hardcoded unmountable status checks*
00059a80: 34020060 ori r2,r0,0x0060		r2 = Crystal/Dead
00059a84: 3c018006 lui r1,0x8006
00059a88: a0226302 sb r2,0x6302(r1)		Store new Unmountable Status Checks 1
00059a8c: 34020085 ori r2,r0,0x0085		r2 = Petrify/Blood Suck/Treasure
00059a90: 3c018006 lui r1,0x8006
00059a94: a0226303 sb r2,0x6303(r1)		Store new Unmountable Status Checks 2
00059a98: 3402000e ori r2,r0,0x000e		r2 = Berserk/Chicken/Frog
00059a9c: 3c018006 lui r1,0x8006
00059aa0: a0226304 sb r2,0x6304(r1)		Store new Unmountable Status Checks 3
00059aa4: 34020020 ori r2,r0,0x0020		r2 = Charm
00059aa8: 3c018006 lui r1,0x8006
00059aac: a0226306 sb r2,0x6306(r1)		Store new Unmountable Status Checks 5
00059ab0: 8fbf0010 lw r31,0x0010(r29)
00059ab4: 27bd0018 addiu r29,r29,0x0018
00059ab8: 03e00008 jr r31
00059abc: 00000000 nop


Return Locations

00042734: Routine at 42690