Difference between revisions of "Main Reaction subroutine - ENTD/ID stuff"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " main action routine subroutine 0018dff8: 27bdffd8 addiu r29,r29,0xffd8 0018dffc: afb0 0018 sw r16,0x 0018(r29) 0018e000: 00808021 addu r16,r4,r0 0018e004: 27a60010 addiu ...")
 
Line 1: Line 1:
  main action routine subroutine
+
  Calculate unlocked jobs from JP gain, set ability element?
 
  0018dff8: 27bdffd8 addiu r29,r29,0xffd8
 
  0018dff8: 27bdffd8 addiu r29,r29,0xffd8
 
  0018dffc: afb0 0018 sw r16,0x 0018(r29)
 
  0018dffc: afb0 0018 sw r16,0x 0018(r29)
Line 9: Line 9:
 
  0018e014: 92120003 lbu r18,0x0003(r16) load job ID
 
  0018e014: 92120003 lbu r18,0x0003(r16) load job ID
 
  0018e018: 9211018a lbu r17,0x018a(r16) load Unit ID
 
  0018e018: 9211018a lbu r17,0x018a(r16) load Unit ID
  0018e01c: 0c05fa8a jal 0x0017ea28 ???
+
  0018e01c: 0c05fa8a jal 0x0017ea28 Calculate JP/Unlocked jobs
 
  0018e020: 02402821 addu r5,r18,r0
 
  0018e020: 02402821 addu r5,r18,r0
 
  0018e024: 02202021 addu r4,r17,r0
 
  0018e024: 02202021 addu r4,r17,r0
 
  0018e028: 00408821 addu r17,r2,r0
 
  0018e028: 00408821 addu r17,r2,r0
 
  0018e02c: 920601ba lbu r6,0x01ba(r16) load ENTD flags
 
  0018e02c: 920601ba lbu r6,0x01ba(r16) load ENTD flags
  0018e030: 920501b5 lbu r5,0x01b5(r16) load ???
+
  0018e030: 920501b5 lbu r5,0x01b5(r16) load Gained JP
 
  0018e034: 8fa70010 lw r7,0x0010(r29)
 
  0018e034: 8fa70010 lw r7,0x0010(r29)
  0018e038: 0c05faa0 jal 0x0017ea80 ???
+
  0018e038: 0c05faa0 jal 0x0017ea80 Calculate JP/Unlocked jobs
  0018e03c: 30c60030 andi r6,r6,0x0030
+
  0018e03c: 30c60030 andi r6,r6,0x0030           r6 = enemy team check
 
  0018e040: 02002021 addu r4,r16,r0
 
  0018e040: 02002021 addu r4,r16,r0
 
  0018e044: 02402821 addu r5,r18,r0
 
  0018e044: 02402821 addu r5,r18,r0
  0018e048: 0c05fa8a jal 0x0017ea28 ????
+
  0018e048: 0c05fa8a jal 0x0017ea28 Calculate JP/Unlocked Jobs
 
  0018e04c: 27a60010 addiu r6,r29,0x0010
 
  0018e04c: 27a60010 addiu r6,r29,0x0010
  0018e050: 10510003 beq r2,r17,0x 0018e060
+
  0018e050: 10510003 beq r2,r17,0x 0018e060     jump to end, return 0x01
 
  0018e054: 34020001 ori r2,r0,0x0001
 
  0018e054: 34020001 ori r2,r0,0x0001
 
  0018e058: 3c018019 lui r1,0x8019
 
  0018e058: 3c018019 lui r1,0x8019
  0018e05c: a022390d sb r2,0x390d(r1) AI ability element decision?
+
  0018e05c: a022390d sb r2,0x390d(r1) AI ability element = 0x01 (dark?)
 
  0018e060: 8fbf0024 lw r31,0x0024(r29)
 
  0018e060: 8fbf0024 lw r31,0x0024(r29)
 
  0018e064: 8fb20020 lw r18,0x0020(r29)
 
  0018e064: 8fb20020 lw r18,0x0020(r29)

Revision as of 13:35, 30 November 2012

Calculate unlocked jobs from JP gain, set ability element?
0018dff8: 27bdffd8 addiu r29,r29,0xffd8
0018dffc: afb0 0018 sw r16,0x 0018(r29)
0018e000: 00808021 addu r16,r4,r0
0018e004: 27a60010 addiu r6,r29,0x0010
0018e008: afbf0024 sw r31,0x0024(r29)
0018e00c: afb20020 sw r18,0x0020(r29)
0018e010: afb1001c sw r17,0x001c(r29)
0018e014: 92120003 lbu r18,0x0003(r16)		load job ID
0018e018: 9211018a lbu r17,0x018a(r16)		load Unit ID
0018e01c: 0c05fa8a jal 0x0017ea28		Calculate JP/Unlocked jobs
0018e020: 02402821 addu r5,r18,r0
0018e024: 02202021 addu r4,r17,r0
0018e028: 00408821 addu r17,r2,r0
0018e02c: 920601ba lbu r6,0x01ba(r16)		load ENTD flags
0018e030: 920501b5 lbu r5,0x01b5(r16)		load Gained JP
0018e034: 8fa70010 lw r7,0x0010(r29)
0018e038: 0c05faa0 jal 0x0017ea80		Calculate JP/Unlocked jobs
0018e03c: 30c60030 andi r6,r6,0x0030           r6 = enemy team check
0018e040: 02002021 addu r4,r16,r0
0018e044: 02402821 addu r5,r18,r0
0018e048: 0c05fa8a jal 0x0017ea28		Calculate JP/Unlocked Jobs
0018e04c: 27a60010 addiu r6,r29,0x0010
0018e050: 10510003 beq r2,r17,0x 0018e060      jump to end, return 0x01
0018e054: 34020001 ori r2,r0,0x0001
0018e058: 3c018019 lui r1,0x8019
0018e05c: a022390d sb r2,0x390d(r1)		AI ability element = 0x01 (dark?)
0018e060: 8fbf0024 lw r31,0x0024(r29)
0018e064: 8fb20020 lw r18,0x0020(r29)
0018e068: 8fb1001c lw r17,0x001c(r29)
0018e06c: 8fb0 0018 lw r16,0x 0018(r29)
0018e070: 27bd0028 addiu r29,r29,0x0028
0018e074: 03e00008 jr r31
0018e078: 00000000 nop