Difference between revisions of "Another intermediate routine"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " another intermediate routine 00183e00: 27bdffe8 addiu r29,r29,0xffe8 00183e04: afbf0010 sw r31,0x0010(r29) 00183e08: 000410c0 sll r2,r4,0x03 00183e0c: 00441023 subu r2,r2...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
  another intermediate routine
+
  '''BATTLE.BIN''' - Another intermediate routine --> AI Simulation - Inflict defending
  00183e00: 27bdffe8 addiu r29,r29,0xffe8
+
---------------------------------------------------------------------------------------
  00183e04: afbf0010 sw r31,0x0010(r29)
+
Parameters : r4 = Unit ID
  00183e08: 000410c0 sll r2,r4,0x03
+
Returns : r2 = 0x00 (always..)
  00183e0c: 00441023 subu r2,r2,r4
+
  00183e10: 00021180 sll r2,r2,0x06
+
This routine inflict defending to Unit (AI simulation only ?)
  00183e14: 3c048019 lui r4,0x8019
+
---------------------------------------------------------------------------------------
  00183e18: 248408cc addiu r4,r4,0x08cc
+
  00183e00: 27bdffe8 addiu r29,r29,-0x0018
  00183e1c: 00442021 addu r4,r2,r4
+
  00183e04: afbf0010 sw r31,0x0010(r29
  00183e20: 0c0179ea jal 0x0005e7a8
+
  00183e08: 000410c0 sll r2,r4,0x03           |{{f/std|ID*8}}
  00183e24: 34050007 ori r5,r0,0x0007
+
  00183e0c: 00441023 subu r2,r2,r4           |{{f/std|ID*7}}
 +
  00183e10: 00021180 sll r2,r2,0x06           |{{f/std|<nowiki>ID=0x1c0</nowiki>}}
 +
  00183e14: 3c048019 lui r4,0x8019           |
 +
  00183e18: 248408cc addiu r4,r4,0x08cc       |
 +
  00183e1c: 00442021 addu r4,r2,r4           |{{f/adr|Pointer to unit Battle stats}}
 +
  00183e20: 0c0179ea jal 0x0005e7a8           |{{f/jal|Status_infliction/removal%3F|Status_infliction/removal%3F}} {{f/std|Inflict defending}}
 +
  00183e24: 34050007 ori r5,r0,0x0007         |{{f/std|Parameter for above}}
 
  00183e28: 00001021 addu r2,r0,r0
 
  00183e28: 00001021 addu r2,r0,r0
 
  00183e2c: 8fbf0010 lw r31,0x0010(r29)
 
  00183e2c: 8fbf0010 lw r31,0x0010(r29)
Line 15: Line 21:
 
  00183e34: 03e00008 jr r31
 
  00183e34: 03e00008 jr r31
 
  00183e38: 00000000 nop
 
  00183e38: 00000000 nop
 +
===Return location===
 +
'''Battle.bin'''
 +
0007513c: [[Decide_what_to_do_based_on_skillset/ability_selections%3F]]
 +
000754bc: [[Set_move/act_based_on_skillset]]
 +
0019d4fc: [[AI_End_of_turn,_in_between_turn,_etc.]]

Latest revision as of 07:21, 1 August 2023

BATTLE.BIN - Another intermediate routine --> AI Simulation - Inflict defending 
---------------------------------------------------------------------------------------
Parameters : r4 = Unit ID
Returns : r2 = 0x00 (always..)

This routine inflict defending to Unit (AI simulation only ?)
---------------------------------------------------------------------------------------
00183e00: 27bdffe8 addiu r29,r29,-0x0018 
00183e04: afbf0010 sw r31,0x0010(r29
00183e08: 000410c0 sll r2,r4,0x03           |ID*8
00183e0c: 00441023 subu r2,r2,r4            |ID*7
00183e10: 00021180 sll r2,r2,0x06           |ID=0x1c0
00183e14: 3c048019 lui r4,0x8019            |
00183e18: 248408cc addiu r4,r4,0x08cc       |
00183e1c: 00442021 addu r4,r2,r4            |Pointer to unit Battle stats
00183e20: 0c0179ea jal 0x0005e7a8           |-->Status_infliction/removal%3F Inflict defending
00183e24: 34050007 ori r5,r0,0x0007         |Parameter for above
00183e28: 00001021 addu r2,r0,r0
00183e2c: 8fbf0010 lw r31,0x0010(r29)
00183e30: 27bd0018 addiu r29,r29,0x0018
00183e34: 03e00008 jr r31
00183e38: 00000000 nop

Return location

Battle.bin
0007513c: Decide_what_to_do_based_on_skillset/ability_selections?
000754bc: Set_move/act_based_on_skillset
0019d4fc: AI_End_of_turn,_in_between_turn,_etc.