Difference between revisions of "Get Positive Priority (00196908)"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Dokurider moved page 00196908 - 00196938 to Get Positive Priority (00196908): Renaming and adding new documentation)
(Uploaded the correct routine)
Line 1: Line 1:
<font face='Courier New'>
+
  Get Positive Priority
   
+
 
0019689c: 3c03801a lui r3,0x801a
+
  00196908: 27bdffe8 addiu r29,r29,0xffe8
  001968a0: 8c6301f8 lw r3,0x01f8(r3) acting units AI decision data
+
  0019690c: afbf0010 sw r31,0x0010(r29)
001968a4: 27bdffe8 addiu r29,r29,0xffe8
+
  00196910: 0c065a4f jal 0x0019693c Find Closest Highest Priority
  001968a8: afbf0010 sw r31,0x0010(r29)
+
  00196914: 00002821 addu r5,r0,r0 Prioritize Distance over Priority
  001968ac: 90620005 lbu r2,0x0005(r3) load main target ID
+
  00196918: 14400004 bne r2,r0,0x0019692c Exit if Priority was positive
001968b0: 00000000 nop
+
  0019691c: 3c047fff lui r4,0x7fff
  001968b4: 00021100 sll r2,r2,0x04
+
  00196920: 3484ffff ori r4,r4,0xffff
001968b8: 3c01801a lui r1,0x801a
+
  00196924: 0c065a4f jal 0x0019693c Find Closest Highest Priority
001968bc: 00220821 addu r1,r1,r2
+
  00196928: 34050001 ori r5,r0,0x0001 Prioritize Priority over Distance
001968c0: 90220bf8 lbu r2,0x0bf8(r1) load enemy flag
+
  0019692c: 8fbf0010 lw r31,0x0010(r29)
001968c4: 00000000 nop
+
  00196930: 27bd0018 addiu r29,r29,0x0018
001968c8: 10400009 beq r2,r0,0x001968f0 branch if ally
+
  00196934: 03e00008 jr r31
  001968cc: 00000000 nop
+
  00196938: 00000000 nop
001968d0: 90620006 lbu r2,0x0006(r3) load
 
001968d4: 00000000 nop
 
001968d8: 30420001 andi r2,r2,0x0001
 
001968dc: 10400004 beq r2,r0,0x001968f0 branch if not ??
 
  001968e0: 28820003 slti r2,r4,0x0003
 
  001968e4: 10400002 beq r2,r0,0x001968f0 branch if ?? is not < 3
 
  001968e8: 00000000 nop
 
  001968ec: 34040003 ori r4,r0,0x0003
 
001968f0: 0c065a42 jal 0x00196908
 
  001968f4: 00000000 nop
 
001968f8: 8fbf0010 lw r31,0x0010(r29)
 
  001968fc: 27bd0018 addiu r29,r29,0x0018
 
  00196900: 03e00008 jr r31
 
  00196904: 00000000 nop
 
</font>
 

Revision as of 00:48, 9 March 2017

Get Positive Priority
00196908: 27bdffe8 addiu r29,r29,0xffe8
0019690c: afbf0010 sw r31,0x0010(r29)
00196910: 0c065a4f jal 0x0019693c				Find Closest Highest Priority
00196914: 00002821 addu r5,r0,r0				Prioritize Distance over Priority
00196918: 14400004 bne r2,r0,0x0019692c			Exit if Priority was positive
0019691c: 3c047fff lui r4,0x7fff
00196920: 3484ffff ori r4,r4,0xffff
00196924: 0c065a4f jal 0x0019693c				Find Closest Highest Priority
00196928: 34050001 ori r5,r0,0x0001				Prioritize Priority over Distance
0019692c: 8fbf0010 lw r31,0x0010(r29)
00196930: 27bd0018 addiu r29,r29,0x0018
00196934: 03e00008 jr r31
00196938: 00000000 nop