Difference between revisions of "Store Skillset's Abilities"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Store Skillset's Abilities 0005a638: 27bdffd8 addiu r29,r29,0xffd8 0005a63c: afb40020 sw r20,0x0020(r29) 0005a640: 0080a021 addu r20,r4,r0 r20 = Unit's Skillset 0005a644...")
 
Line 61: Line 61:
 
  0005a724: 03e00008 jr r31
 
  0005a724: 03e00008 jr r31
 
  0005a728: 00000000 nop
 
  0005a728: 00000000 nop
 +
 +
 +
== Return Locations ==
 +
 +
00133a0c: 00133754
 +
001975d8:  00197538
 +
0019a678: [[Usable Ability Setting]]
 +
0019bc68: 0019bbbc
 +
001c2b40: 01c2888
 +
001c5c84: 001c58d0 - check this routine, looks interesting

Revision as of 01:30, 29 February 2012

Store Skillset's Abilities
0005a638: 27bdffd8 addiu r29,r29,0xffd8
0005a63c: afb40020 sw r20,0x0020(r29)
0005a640: 0080a021 addu r20,r4,r0		r20 = Unit's Skillset
0005a644: afb20018 sw r18,0x0018(r29)
0005a648: 00a09021 addu r18,r5,r0		r18 = Check
0005a64c: 2a820100 slti r2,r20,0x0100
0005a650: afbf0024 sw r31,0x0024(r29)
0005a654: afb3001c sw r19,0x001c(r29)
0005a658: afb10014 sw r17,0x0014(r29)
0005a65c: 14400002 bne r2,r0,0x0005a668		Branch if Skillset is valid
0005a660: afb00010 sw r16,0x0010(r29)
0005a664: 0000a021 addu r20,r0,r0		Skillset = 0
0005a668: 00008021 addu r16,r0,r0		Counter = 0 (useless)
0005a66c: 00008821 addu r17,r0,r0		Counter2 = 0
0005a670: 3c138006 lui r19,0x8006
0005a674: 26736204 addiu r19,r19,0x6204		r19 = Pointer to Temp Ability List
0005a678: 02802021 addu r4,r20,r0		r4 = Skillset
0005a67c: 0c01695a jal 0x0005a568		Load Ability From Skillset
0005a680: 02202821 addu r5,r17,r0		r5 = Counter2
0005a684: 00402021 addu r4,r2,r0		r4 = Ability ID
0005a688: 3083ffff andi r3,r4,0xffff		r3 = Ability ID
0005a68c: 2c6201a6 sltiu r2,r3,0x01a6		(pretty useless series of checks)
0005a690: 14400008 bne r2,r0,0x0005a6b4		Branch if Ability is an Ability
0005a694: 32420001 andi r2,r18,0x0001		Check = Ability
0005a698: 2c6201c6 sltiu r2,r3,0x01c6
0005a69c: 14400005 bne r2,r0,0x0005a6b4		Branch if Ability is a Reaction
0005a6a0: 32420002 andi r2,r18,0x0002		Check = Reaction
0005a6a4: 2c6201e7 sltiu r2,r3,0x01e7		(should be 0x1e6, but doesn't matter anyway)
0005a6a8: 14400002 bne r2,r0,0x0005a6b4		Branch if Ability is a Support
0005a6ac: 32420008 andi r2,r18,0x0008		Check = Support
0005a6b0: 32420004 andi r2,r18,0x0004		Check = Movement 
0005a6b4: 14400002 bne r2,r0,0x0005a6c0		Branch if Check != 0 (Can't get here with r2 = 0)
0005a6b8: 26100001 addiu r16,r16,0x0001		Counter ++ (Counter and Counter2 are always the same)
0005a6bc: 00002021 addu r4,r0,r0		Ability ID = 0
0005a6c0: a6640000 sh r4,0x0000(r19)		Store Ability ID
0005a6c4: 26310001 addiu r17,r17,0x0001		Counter2 ++
0005a6c8: 2a220018 slti r2,r17,0x0018		(Load Ability function stops at 0x16 :/)
0005a6cc: 1440ffea bne r2,r0,0x0005a678		Branch if Counter2 < 0x18
0005a6d0: 26730002 addiu r19,r19,0x0002		Temp Ability List Pointer += 2
0005a6d4: 2a020018 slti r2,r16,0x0018
0005a6d8: 10400009 beq r2,r0,0x0005a700		Branch if Counter >= 0x18 (guaranteed)
0005a6dc: 00101040 sll r2,r16,0x01		Counter * 2
0005a6e0: 3c038006 lui r3,0x8006
0005a6e4: 24636204 addiu r3,r3,0x6204		(think this was just to null the last
0005a6e8: 00431821 addu r3,r2,r3		 abilities, but isn't needed anyway)
0005a6ec: a4600000 sh r0,0x0000(r3)		Store Ability ID = 0
0005a6f0: 26100001 addiu r16,r16,0x0001		Counter * 2
0005a6f4: 2a020018 slti r2,r16,0x0018
0005a6f8: 1440fffc bne r2,r0,0x0005a6ec		Branch if Counter < 0x18
0005a6fc: 24630002 addiu r3,r3,0x0002		Temp Ability List Pointer += 2
0005a700: 3c028006 lui r2,0x8006
0005a704: 24426204 addiu r2,r2,0x6204		r2 = Temp Ability List Pointer
0005a708: 8fbf0024 lw r31,0x0024(r29)
0005a70c: 8fb40020 lw r20,0x0020(r29)
0005a710: 8fb3001c lw r19,0x001c(r29)
0005a714: 8fb20018 lw r18,0x0018(r29)
0005a718: 8fb10014 lw r17,0x0014(r29)
0005a71c: 8fb00010 lw r16,0x0010(r29)
0005a720: 27bd0028 addiu r29,r29,0x0028
0005a724: 03e00008 jr r31
0005a728: 00000000 nop


Return Locations

00133a0c: 00133754
001975d8:  00197538
0019a678: Usable Ability Setting
0019bc68: 0019bbbc
001c2b40: 01c2888
001c5c84: 001c58d0 - check this routine, looks interesting