Difference between revisions of "Status/CT based decision"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 +
Status/CT based decision <font face='Courier New'>
 +
 
 +
  0019f15c: 27bdffe0 addiu r29,r29,0xffe0
 +
  0019f160: afb10014 sw r17,0x0014(r29)
 +
  0019f164: 000510c0 sll r2,r5,0x03
 +
  0019f168: 00451023 subu r2,r2,r5
 +
  0019f16c: 00021180 sll r2,r2,0x06
 +
  0019f170: 3c038019 lui r3,0x8019
 +
  0019f174: 246308cc addiu r3,r3,0x08cc        r3 = unit data
 +
  0019f178: afb00010 sw r16,0x0010(r29)
 +
  0019f17c: 00438021 addu r16,r2,r3            r16 = unit data
 +
  0019f180: afbf0018 sw r31,0x0018(r29)
 +
  0019f184: 92030001 lbu r3,0x0001(r16)        load unit ID
 +
  0019f188: 340200ff ori r2,r0,0x00ff
 +
  0019f18c: 1062002b beq r3,r2,0x0019f23c      branch if doesn't exist
 +
  0019f190: 00808821 addu r17,r4,r0
 +
  0019f194: 92020038 lbu r2,0x0038(r16)        load speed
 +
  0019f198: 00000000 nop
 +
  0019f19c: 10400028 beq r2,r0,0x0019f240      branch if none
 +
  0019f1a0: 00001021 addu r2,r0,r0
 +
  0019f1a4: 96020058 lhu r2,0x0058(r16)        load status
 +
  0019f1a8: 00000000 nop
 +
  0019f1ac: 30428140 andi r2,r2,0x8140
 +
  0019f1b0: 14400023 bne r2,r0,0x0019f240      branch if crystal,petrify, or treasure
 +
  0019f1b4: 00001021 addu r2,r0,r0
 +
  0019f1b8: 02202021 addu r4,r17,r0
 +
  0019f1bc: 02002821 addu r5,r16,r0
 +
  0019f1c0: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
 +
  0019f1c4: 3406001e ori r6,r0,0x001e
 +
  0019f1c8: 1440001d bne r2,r0,0x0019f240
 +
  0019f1cc: 00001021 addu r2,r0,r0
 
   
 
   
0019f15c: 27bdffe0 addiu r29,r29,0xffe0
+
  0019f1d0: 02202021 addu r4,r17,r0
0019f160: afb10014 sw r17,0x0014(r29)
+
  0019f1d4: 02002821 addu r5,r16,r0
0019f164: 000510c0 sll r2,r5,0x03
+
  0019f1d8: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
0019f168: 00451023 subu r2,r2,r5
+
  0019f1dc: 34060024 ori r6,r0,0x0024
0019f16c: 00021180 sll r2,r2,0x06
+
  0019f1e0: 14400017 bne r2,r0,0x0019f240
0019f170: 3c038019 lui r3,0x8019
+
  0019f1e4: 00001021 addu r2,r0,r0
0019f174: 246308cc addiu r3,r3,0x08cc        r3 = unit data
+
0019f178: afb00010 sw r16,0x0010(r29)
+
  0019f1e8: 02202021 addu r4,r17,r0
0019f17c: 00438021 addu r16,r2,r3            r16 = unit data
+
  0019f1ec: 02002821 addu r5,r16,r0
0019f180: afbf0018 sw r31,0x0018(r29)
+
  0019f1f0: 0c067bc9 jal 0x0019ef24 [[Check if Status Should/Can be Added]]
0019f184: 92030001 lbu r3,0x0001(r16)        load unit ID
+
  0019f1f4: 34060023 ori r6,r0,0x0023
0019f188: 340200ff ori r2,r0,0x00ff
+
  0019f1f8: 14400011 bne r2,r0,0x0019f240
0019f18c: 1062002b beq r3,r2,0x0019f23c      branch if doesn't exist
+
  0019f1fc: 00001021 addu r2,r0,r0
0019f190: 00808821 addu r17,r4,r0
+
0019f194: 92020038 lbu r2,0x0038(r16)        load speed
+
  0019f200: 92020058 lbu r2,0x0058(r16)                   
0019f198: 00000000 nop
+
  0019f204: 00000000 nop
0019f19c: 10400028 beq r2,r0,0x0019f240      branch if none
+
  0019f208: 30420020 andi r2,r2,0x0020
0019f1a0: 00001021 addu r2,r0,r0
+
  0019f20c: 1040000c beq r2,r0,0x0019f240            branch if not dead
0019f1a4: 96020058 lhu r2,0x0058(r16)        load status
+
  0019f210: 34020001 ori r2,r0,0x0001
0019f1a8: 00000000 nop
+
  0019f214: 9202005a lbu r2,0x005a(r16)
0019f1ac: 30428140 andi r2,r2,0x8140
+
  0019f218: 00000000 nop
0019f1b0: 14400023 bne r2,r0,0x0019f240      branch if crystal,petrify, or treasure
+
  0019f21c: 30420020 andi r2,r2,0x0020
0019f1b4: 00001021 addu r2,r0,r0
+
  0019f220: 10400007 beq r2,r0,0x0019f240            branch if not reraise
0019f1b8: 02202021 addu r4,r17,r0
+
  0019f224: 00001021 addu r2,r0,r0
0019f1bc: 02002821 addu r5,r16,r0
+
  0019f228: 0c0666e6 jal 0x00199b98 [[Calculate Clockticks Until Unit Acts]]
0019f1c0: 0c067bc9 jal 0x0019ef24
+
  0019f22c: 02002021 addu r4,r16,r0
0019f1c4: 3406001e ori r6,r0,0x001e
+
  0019f230: 0222102a slt r2,r17,r2
0019f1c8: 1440001d bne r2,r0,0x0019f240
+
  0019f234: 10400002 beq r2,r0,0x0019f240
0019f1cc: 00001021 addu r2,r0,r0
+
  0019f238: 34020001 ori r2,r0,0x0001
 
+
  0019f23c: 00001021 addu r2,r0,r0
0019f1d0: 02202021 addu r4,r17,r0
+
  0019f240: 8fbf0018 lw r31,0x0018(r29)
0019f1d4: 02002821 addu r5,r16,r0
+
  0019f244: 8fb10014 lw r17,0x0014(r29)
0019f1d8: 0c067bc9 jal 0x0019ef24
+
  0019f248: 8fb00010 lw r16,0x0010(r29)
0019f1dc: 34060024 ori r6,r0,0x0024
+
  0019f24c: 27bd0020 addiu r29,r29,0x0020
0019f1e0: 14400017 bne r2,r0,0x0019f240
+
  0019f250: 03e00008 jr r31
0019f1e4: 00001021 addu r2,r0,r0
+
  0019f254: 00000000 nop
 
+
</font></font>
0019f1e8: 02202021 addu r4,r17,r0
 
0019f1ec: 02002821 addu r5,r16,r0
 
0019f1f0: 0c067bc9 jal 0x0019ef24
 
0019f1f4: 34060023 ori r6,r0,0x0023
 
0019f1f8: 14400011 bne r2,r0,0x0019f240
 
0019f1fc: 00001021 addu r2,r0,r0
 
 
 
0019f200: 92020058 lbu r2,0x0058(r16)                   
 
0019f204: 00000000 nop
 
0019f208: 30420020 andi r2,r2,0x0020
 
0019f20c: 1040000c beq r2,r0,0x0019f240            branch if not dead
 
0019f210: 34020001 ori r2,r0,0x0001
 
0019f214: 9202005a lbu r2,0x005a(r16)
 
0019f218: 00000000 nop
 
0019f21c: 30420020 andi r2,r2,0x0020
 
0019f220: 10400007 beq r2,r0,0x0019f240            branch if not reraise
 
0019f224: 00001021 addu r2,r0,r0
 
0019f228: 0c0666e6 jal 0x00199b98
 
0019f22c: 02002021 addu r4,r16,r0
 
0019f230: 0222102a slt r2,r17,r2
 
0019f234: 10400002 beq r2,r0,0x0019f240
 
0019f238: 34020001 ori r2,r0,0x0001
 
0019f23c: 00001021 addu r2,r0,r0
 
0019f240: 8fbf0018 lw r31,0x0018(r29)
 
0019f244: 8fb10014 lw r17,0x0014(r29)
 
0019f248: 8fb00010 lw r16,0x0010(r29)
 
0019f24c: 27bd0020 addiu r29,r29,0x0020
 
0019f250: 03e00008 jr r31
 
0019f254: 00000000 nop
 
</font>
 

Revision as of 00:56, 18 February 2015

Status/CT based decision

 0019f15c: 27bdffe0 addiu r29,r29,0xffe0
 0019f160: afb10014 sw r17,0x0014(r29)
 0019f164: 000510c0 sll r2,r5,0x03
 0019f168: 00451023 subu r2,r2,r5
 0019f16c: 00021180 sll r2,r2,0x06
 0019f170: 3c038019 lui r3,0x8019
 0019f174: 246308cc addiu r3,r3,0x08cc         r3 = unit data
 0019f178: afb00010 sw r16,0x0010(r29)
 0019f17c: 00438021 addu r16,r2,r3             r16 = unit data
 0019f180: afbf0018 sw r31,0x0018(r29)
 0019f184: 92030001 lbu r3,0x0001(r16)         load unit ID
 0019f188: 340200ff ori r2,r0,0x00ff
 0019f18c: 1062002b beq r3,r2,0x0019f23c       branch if doesn't exist
 0019f190: 00808821 addu r17,r4,r0
 0019f194: 92020038 lbu r2,0x0038(r16)         load speed
 0019f198: 00000000 nop
 0019f19c: 10400028 beq r2,r0,0x0019f240       branch if none
 0019f1a0: 00001021 addu r2,r0,r0
 0019f1a4: 96020058 lhu r2,0x0058(r16)         load status
 0019f1a8: 00000000 nop
 0019f1ac: 30428140 andi r2,r2,0x8140
 0019f1b0: 14400023 bne r2,r0,0x0019f240       branch if crystal,petrify, or treasure
 0019f1b4: 00001021 addu r2,r0,r0
 0019f1b8: 02202021 addu r4,r17,r0
 0019f1bc: 02002821 addu r5,r16,r0
 0019f1c0: 0c067bc9 jal 0x0019ef24			Check if Status Should/Can be Added
 0019f1c4: 3406001e ori r6,r0,0x001e
 0019f1c8: 1440001d bne r2,r0,0x0019f240
 0019f1cc: 00001021 addu r2,r0,r0

 0019f1d0: 02202021 addu r4,r17,r0
 0019f1d4: 02002821 addu r5,r16,r0
 0019f1d8: 0c067bc9 jal 0x0019ef24			Check if Status Should/Can be Added
 0019f1dc: 34060024 ori r6,r0,0x0024
 0019f1e0: 14400017 bne r2,r0,0x0019f240
 0019f1e4: 00001021 addu r2,r0,r0

 0019f1e8: 02202021 addu r4,r17,r0
 0019f1ec: 02002821 addu r5,r16,r0
 0019f1f0: 0c067bc9 jal 0x0019ef24			Check if Status Should/Can be Added
 0019f1f4: 34060023 ori r6,r0,0x0023
 0019f1f8: 14400011 bne r2,r0,0x0019f240
 0019f1fc: 00001021 addu r2,r0,r0

 0019f200: 92020058 lbu r2,0x0058(r16)                   
 0019f204: 00000000 nop
 0019f208: 30420020 andi r2,r2,0x0020
 0019f20c: 1040000c beq r2,r0,0x0019f240            branch if not dead
 0019f210: 34020001 ori r2,r0,0x0001
 0019f214: 9202005a lbu r2,0x005a(r16)
 0019f218: 00000000 nop
 0019f21c: 30420020 andi r2,r2,0x0020
 0019f220: 10400007 beq r2,r0,0x0019f240            branch if not reraise
 0019f224: 00001021 addu r2,r0,r0
 0019f228: 0c0666e6 jal 0x00199b98			Calculate Clockticks Until Unit Acts
 0019f22c: 02002021 addu r4,r16,r0
 0019f230: 0222102a slt r2,r17,r2
 0019f234: 10400002 beq r2,r0,0x0019f240
 0019f238: 34020001 ori r2,r0,0x0001
 0019f23c: 00001021 addu r2,r0,r0
 0019f240: 8fbf0018 lw r31,0x0018(r29)
 0019f244: 8fb10014 lw r17,0x0014(r29)
 0019f248: 8fb00010 lw r16,0x0010(r29)
 0019f24c: 27bd0020 addiu r29,r29,0x0020
 0019f250: 03e00008 jr r31
 0019f254: 00000000 nop