Difference between revisions of "Main Post Movement"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
<font face='Courier New'>
+
 
 
Main Post Movement  00071ee8: 27bdffd8 addiu r29,r29,0xffd8
 
Main Post Movement  00071ee8: 27bdffd8 addiu r29,r29,0xffd8
 
  00071eec: afbf0024 sw r31,0x0024(r29)
 
  00071eec: afbf0024 sw r31,0x0024(r29)
Line 109: Line 109:
 
  00072068: 0801c81f j 0x0007207c call function
 
  00072068: 0801c81f j 0x0007207c call function
 
  0007206c: afa20010 sw r2,0x0010(r29)
 
  0007206c: afa20010 sw r2,0x0010(r29)
 +
 
  enemy team
 
  enemy team
 
  00072070: 9065018a lbu r5,0x018a(r3)
 
  00072070: 9065018a lbu r5,0x018a(r3)
Line 203: Line 204:
 
  000721b4: 1440000d bne r2,r0,0x000721ec branch if enemy team
 
  000721b4: 1440000d bne r2,r0,0x000721ec branch if enemy team
 
  000721b8: 3404000f ori r4,r0,0x000f
 
  000721b8: 3404000f ori r4,r0,0x000f
 +
 
  player team
 
  player team
 
  000721bc: 00003821 addu r7,r0,r0
 
  000721bc: 00003821 addu r7,r0,r0

Revision as of 14:32, 30 January 2024

Main Post Movement 00071ee8: 27bdffd8 addiu r29,r29,0xffd8

00071eec: afbf0024 sw r31,0x0024(r29)
00071ef0: afb20020 sw r18,0x0020(r29)
00071ef4: afb1001c sw r17,0x001c(r29)
00071ef8: 0c01e886 jal 0x0007a218			Get Casting units Misc Data
00071efc: afb00018 sw r16,0x0018(r29)
00071f00: 0c01e875 jal 0x0007a1d4			Get casting unit's misc data
00071f04: 00408021 addu r16,r2,r0
00071f08: 3404000c ori r4,r0,0x000c
00071f0c: 00002821 addu r5,r0,r0
00071f10: 8e030134 lw r3,0x0134(r16)		r3 = unit data
00071f14: 00003821 addu r7,r0,r0
00071f18: 9066018a lbu r6,0x018a(r3)		load Unit ID
00071f1c: 00408821 addu r17,r2,r0
00071f20: 0c05066e jal 0x001419b8			System function setup routine
00071f24: afa00010 sw r0,0x0010(r29)
00071f28: 3c038009 lui r3,0x8009
00071f2c: 8c636208 lw r3,0x6208(r3)			load post movement display
00071f30: 34020015 ori r2,r0,0x0015
00071f34: 3c018009 lui r1,0x8009
00071f38: ac2260e4 sw r2,0x60e4(r1)			store display = 15
00071f3c: 3c01800a lui r1,0x800a
00071f40: ac208db8 sw r0,-0x7248(r1)		clear ??
00071f44: 30620001 andi r2,r3,0x0001		
00071f48: 10400065 beq r2,r0,0x000720e0		branch to move XX up if not ??
<80096208 = 1>
00071f4c: a6200008 sh r0,0x0008(r17)		clear ?? in misc data
if not move xx up
00071f50: 9204007c lbu r4,0x007c(r16)		load X
00071f54: 9205007d lbu r5,0x007d(r16)		load Y
00071f58: 9206007e lbu r6,0x007e(r16)		load map level
00071f5c: 0c01e8fe jal 0x0007a3f8              Get misc data of unit that matches register inputs that isn't crystal/treasure
00071f60: 00000000 nop
00071f64: 8e030134 lw r3,0x0134(r16)		load data
00071f68: 00000000 nop
00071f6c: 9064018a lbu r4,0x018a(r3)		load unit iD
00071f70: 0c0506a3 jal 0x00141a8c			00141a8c - 00141b08 determine treasure chest item?
00071f74: 00409021 addu r18,r2,r0
00071f78: 00408821 addu r17,r2,r0
00071f7c: 2402ffff addiu r2,r0,0xffff
00071f80: 16220003 bne r17,r2,0x00071f90	branch if return isn't 0xff
00071f84: 02002021 addu r4,r16,r0
00071f88: 0801c7e7 j 0x00071f9c
00071f8c: 3404001b ori r4,r0,0x001b			r4 = animation?

if return from 141a8c != 0xff
00071f90: 0c01fd17 jal 0x0007f45c			Store Item's Display Data
00071f94: 02202821 addu r5,r17,r0
00071f98: 34040039 ori r4,r0,0x0039			r4 = animation?
00071f9c: 86050070 lh r5,0x0070(r16)		load facing
00071fa0: 0c020662 jal 0x00081988			Store unit animation/facing/someothervalue
00071fa4: 02003021 addu r6,r16,r0
00071fa8: 2402ffff addiu r2,r0,0xffff
00071fac: 16220024 bne r17,r2,0x00072040
00071fb0: 34030008 ori r3,r0,0x0008

if return from 141a8c != 0xff
00071fb4: 8e050134 lw r5,0x0134(r16)
00071fb8: 00000000 nop
00071fbc: 94a201ba lhu r2,0x01ba(r5)		load modified ENTD
00071fc0: 00000000 nop
00071fc4: 30420038 andi r2,r2,0x0038
00071fc8: 14430009 bne r2,r3,0x00071ff0		branch if on enemy team or under AI control
00071fcc: 3404000c ori r4,r0,0x000c

Player unit or control
00071fd0: 00003821 addu r7,r0,r0
00071fd4: 90a5018a lbu r5,0x018a(r5)
00071fd8: 34020001 ori r2,r0,0x0001
00071fdc: afa20010 sw r2,0x0010(r29)
00071fe0: 0c05066e jal 0x001419b8			System function setup routine
00071fe4: 00a03021 addu r6,r5,r0
00071fe8: 0801c82a j 0x000720a8
00071fec: 00000000 nop

Enemy or AI control
00071ff0: 90a5018a lbu r5,0x018a(r5)
00071ff4: 00003821 addu r7,r0,r0
00071ff8: afa00010 sw r0,0x0010(r29)
00071ffc: 0c05066e jal 0x001419b8                      System function setup routine
00072000: 00a03021 addu r6,r5,r0
00072004: 8e040134 lw r4,0x0134(r16)
00072008: 0c060241 jal 0x00180904			Learn from Crystal
0007200c: 34050002 ori r5,r0,0x0002
00072010: 8e020134 lw r2,0x0134(r16)
00072014: 00000000 nop
00072018: 9044018a lbu r4,0x018a(r2)
0007201c: 0c062f82 jal 0x0018be08			Main Reaction Routine - performs ability effects
00072020: 00000000 nop
00072024: 0c0200f9 jal 0x000803e4			Post-Action Display Setup
00072028: 02002021 addu r4,r16,r0
0007202c: 92040004 lbu r4,0x0004(r16)		load unit misc ID
00072030: 0c01a38c jal 0x00068e30			Jump to 68d08
00072034: 00000000 nop
00072038: 0801c82a j 0x000720a8                        
0007203c: 00000000 nop

00072040: 8e030134 lw r3,0x0134(r16)
00072044: 00000000 nop
00072048: 906201ba lbu r2,0x01ba(r3)
0007204c: 00000000 nop
00072050: 30420030 andi r2,r2,0x0030
00072054: 14400006 bne r2,r0,0x00072070		branch if not on players team
00072058: 3404000c ori r4,r0,0x000c
0007205c: 00003821 addu r7,r0,r0
00072060: 9065018a lbu r5,0x018a(r3)
00072064: 34020001 ori r2,r0,0x0001
00072068: 0801c81f j 0x0007207c				call function
0007206c: afa20010 sw r2,0x0010(r29)
enemy team
00072070: 9065018a lbu r5,0x018a(r3)
00072074: 00003821 addu r7,r0,r0
00072078: afa00010 sw r0,0x0010(r29)
0007207c: 0c05066e jal 0x001419b8			System function setup routine
00072080: 00a03021 addu r6,r5,r0

00072084: 8e040134 lw r4,0x0134(r16)
00072088: 00000000 nop
0007208c: 948201ba lhu r2,0x01ba(r4)
00072090: 34030008 ori r3,r0,0x0008
00072094: 30420038 andi r2,r2,0x0038
00072098: 10430003 beq r2,r3,0x000720a8			branch if under player control
0007209c: 00000000 nop
000720a0: 0c060241 jal 0x00180904				Learn from Crystal
000720a4: 34050004 ori r5,r0,0x0004

000720a8: 92440004 lbu r4,0x0004(r18)			load  unit misc ID
000720ac: 0c02254a jal 0x00089528				00089528 - 00089550
000720b0: 00000000 nop
000720b4: 0c01f4fd jal 0x0007d3f4                              0007d3f4 - 0007d474
000720b8: 02002021 addu r4,r16,r0
000720bc: 96430042 lhu r3,0x0042(r18)			load height mod?
000720c0: 34040085 ori r4,r0,0x0085
000720c4: 00431023 subu r2,r2,r3
000720c8: 34030024 ori r3,r0,0x0024
000720cc: 00621823 subu r3,r3,r2
000720d0: 0c011006 jal 0x00044018                              00044018 - 00044034
000720d4: a6430074 sh r3,0x0074(r18)
000720d8: 0801c8ee j 0x000723b8					jump to end, return r2 = 1
000720dc: 34020001 ori r2,r0,0x0001
</80096108 = 1>

Move XX up
000720e0: 30620002 andi r2,r3,0x0002
000720e4: 1040001c beq r2,r0,0x00072158			branch if not move XX up
000720e8: 00000000 nop
000720ec: 3c038009 lui r3,0x8009
000720f0: 8c636204 lw r3,0x6204(r3)				load secondary byte?
000720f4: 00000000 nop
000720f8: 10600005 beq r3,r0,0x00072110			branch if = 0
000720fc: 34020001 ori r2,r0,0x0001
00072100: 10620011 beq r3,r2,0x00072148			branch if = 1
00072104: 00000000 nop
00072108: 0801c8ee j 0x000723b8					jump to end, return r2 = 1?
0007210c: 00000000 nop

00072110: 8e240134 lw r4,0x0134(r17)
00072114: 0c063751 jal 0x0018dd44				Move-HP Up, Move-MP Up, Gained Exp Up
00072118: 00000000 nop
0007211c: 8e240134 lw r4,0x0134(r17)
00072120: 0c0637c3 jal 0x0018df0c				Prep gained exp/jp/level/job level
00072124: 262501b0 addiu r5,r17,0x01b0			r5 = display data
00072128: 0c0200f9 jal 0x000803e4				Post-Action Display Setup
0007212c: 02202021 addu r4,r17,r0
00072130: 0c0203d1 jal 0x00080f44				00080e54 - 00081740 prep for displaying earned jp/exp
00072134: 02202021 addu r4,r17,r0
00072138: 0c01c77a jal 0x00071de8				00071de8 - 00071e64
0007213c: 02202021 addu r4,r17,r0
00072140: 0801c8ee j 0x000723b8					jump to end, return r2 = 1
00072144: 34020001 ori r2,r0,0x0001

00072148: 0c01c79a jal 0x00071e68				Post Movement Display
0007214c: 02202021 addu r4,r17,r0
00072150: 0801c8ee j 0x000723b8					jump to end, return r2 = 1
00072154: 34020001 ori r2,r0,0x0001

00072158: 30620004 andi r2,r3,0x0004
0007215c: 10400028 beq r2,r0,0x00072200			branch if not move-finding item
00072160: 30620008 andi r2,r3,0x0008

Move find Item
00072164: 8e240134 lw r4,0x0134(r17)
00072168: 0c06008c jal 0x00180230				Rare/common item determination
0007216c: 00000000 nop
00072170: 8c430000 lw r3,0x0000(r2)				load trap?
00072174: 8c440004 lw r4,0x0004(r2)				load item
00072178: 3c018009 lui r1,0x8009
0007217c: ac23620c sw r3,0x620c(r1)				store trap to display?
00072180: 3c018009 lui r1,0x8009
00072184: ac246210 sw r4,0x6210(r1)				store Item
00072188: 3c058009 lui r5,0x8009
0007218c: 90a56210 lbu r5,0x6210(r5)			load item
00072190: 0c01fd17 jal 0x0007f45c				Store Item's Display Data
00072194: 02002021 addu r4,r16,r0
00072198: 34040033 ori r4,r0,0x0033
0007219c: 86050070 lh r5,0x0070(r16)			load facing
000721a0: 0c020662 jal 0x00081988				Store unit animation/facing/someothervalue
000721a4: 02003021 addu r6,r16,r0
000721a8: 9202013d lbu r2,0x013d(r16)			load entd flags
000721ac: 00000000 nop
000721b0: 30420030 andi r2,r2,0x0030
000721b4: 1440000d bne r2,r0,0x000721ec			branch if enemy team
000721b8: 3404000f ori r4,r0,0x000f
player team
000721bc: 00003821 addu r7,r0,r0
000721c0: 8e020134 lw r2,0x0134(r16)			load unit data
000721c4: 3c058009 lui r5,0x8009
000721c8: 90a56210 lbu r5,0x6210(r5)			load item to display
000721cc: 9046018a lbu r6,0x018a(r2)			load unit ID
000721d0: 34020001 ori r2,r0,0x0001
000721d4: 0c05066e jal 0x001419b8				System function setup routine			
000721d8: afa20010 sw r2,0x0010(r29)
000721dc: 0c010f48 jal 0x00043d20				00043d20 - 00043d7c
000721e0: 34040002 ori r4,r0,0x0002
000721e4: 0801c8ee j 0x000723b8
000721e8: 34020001 ori r2,r0,0x0001
if enemy
000721ec: 8e020134 lw r2,0x0134(r16)
000721f0: 3c058009 lui r5,0x8009
000721f4: 90a56210 lbu r5,0x6210(r5)			load item to display
000721f8: 0801c8b2 j 0x000722c8
000721fc: 00000000 nop

Traps
00072200: 10400029 beq r2,r0,0x000722a8			branch if not trap
00072204: 30620010 andi r2,r3,0x0010
00072208: 8e240134 lw r4,0x0134(r17)
0007220c: 0c0636ec jal 0x0018dbb0				Traps Routine
00072210: 00000000 nop
00072214: 8e030134 lw r3,0x0134(r16)
00072218: 00000000 nop
0007221c: 9064018a lbu r4,0x018a(r3)
00072220: 0c062f82 jal 0x0018be08				Main Reaction Routine - performs ability effects
00072224: 00409021 addu r18,r2,r0
00072228: 2403ffff addiu r3,r0,0xffff
0007222c: 14430008 bne r2,r3,0x00072250
00072230: ae020180 sw r2,0x0180(r16)
00072234: 8e020134 lw r2,0x0134(r16)
00072238: 00000000 nop
0007223c: 9044018a lbu r4,0x018a(r2)
00072240: 0c05fb06 jal 0x0017ec18				Big map/panel routine
00072244: 26050184 addiu r5,r16,0x0184
00072248: 0c0206e2 jal 0x00081b88				Store some movement coordinate data
0007224c: 02002021 addu r4,r16,r0
00072250: 0c0200f9 jal 0x000803e4				Post-Action Display Setup
00072254: 02002021 addu r4,r16,r0
00072258: 00002021 addu r4,r0,r0
0007225c: 0c020e5e jal 0x00083978				Set targets animation based on attack type
00072260: 02002821 addu r5,r16,r0
00072264: 0c01a2b5 jal 0x00068ad4				Call palette routine 4
00072268: 02002021 addu r4,r16,r0
0007226c: 3404000e ori r4,r0,0x000e				function = 0x0e
00072270: 02402821 addu r5,r18,r0				r5 = trap
00072274: 8e020134 lw r2,0x0134(r16)			load data
00072278: 00003821 addu r7,r0,r0
0007227c: 9046018a lbu r6,0x018a(r2)
00072280: 34020001 ori r2,r0,0x0001
00072284: 0c05066e jal 0x001419b8				System function setup routine	
00072288: afa20010 sw r2,0x0010(r29)
0007228c: 9224007c lbu r4,0x007c(r17)			
00072290: 9225007e lbu r5,0x007e(r17)
00072294: 9226007d lbu r6,0x007d(r17)
00072298: 0c066b96 jal 0x0019ae58				0019ae58 - 0019aeec			
0007229c: 00000000 nop
000722a0: 0801c8ee j 0x000723b8					jump to end return r2 = 1
000722a4: 34020001 ori r2,r0,0x0001

Remove charge
000722a8: 1040000d beq r2,r0,0x000722e0			branch if not removing charge status
000722ac: 30620200 andi r2,r3,0x0200
000722b0: 8e240134 lw r4,0x0134(r17)
000722b4: 0c06005e jal 0x00180178				Remove charging status/ability CT
000722b8: 34050001 ori r5,r0,0x0001
000722bc: 3404000c ori r4,r0,0x000c
000722c0: 8e020134 lw r2,0x0134(r16)
000722c4: 00002821 addu r5,r0,r0

enemy move find item
000722c8: 9046018a lbu r6,0x018a(r2)
000722cc: 00003821 addu r7,r0,r0
000722d0: 0c05066e jal 0x001419b8				System function setup routine
000722d4: afa00010 sw r0,0x0010(r29)
000722d8: 0801c8ee j 0x000723b8					return r2 = 1
000722dc: 34020001 ori r2,r0,0x0001

????
000722e0: 1040000d beq r2,r0,0x00072318			branch if not ???
000722e4: 3404000c ori r4,r0,0x000c
000722e8: 8e020134 lw r2,0x0134(r16)			load unit data
000722ec: 00002821 addu r5,r0,r0
000722f0: 9046018a lbu r6,0x018a(r2)			load Unit ID
000722f4: 00003821 addu r7,r0,r0
000722f8: 0c05066e jal 0x001419b8				System function setup routine
000722fc: afa00010 sw r0,0x0010(r29)
00072300: 92040004 lbu r4,0x0004(r16)			load misc ID
00072304: 0c01a2f5 jal 0x00068bd4				Jump to post action display	
00072308: 00000000 nop
0007230c: 92040004 lbu r4,0x0004(r16)			load misc ID
00072310: 0801c8dd j 0x00072374
00072314: 00000000 nop

??
00072318: 30620400 andi r2,r3,0x0400
0007231c: 10400019 beq r2,r0,0x00072384			branch if not changing status?
00072320: 00002821 addu r5,r0,r0
00072324: 8e020134 lw r2,0x0134(r16)
00072328: 00000000 nop
0007232c: 9046018a lbu r6,0x018a(r2)
00072330: 00003821 addu r7,r0,r0
00072334: 0c05066e jal 0x001419b8				System function setup routine
00072338: afa00010 sw r0,0x0010(r29)
0007233c: 92020130 lbu r2,0x0130(r16)			load mount stuff?
00072340: 00000000 nop
00072344: 1040001c beq r2,r0,0x000723b8			
00072348: 34020001 ori r2,r0,0x0001
0007234c: 92040131 lbu r4,0x0131(r16)			load mounted ID?
00072350: 0c01e9b9 jal 0x0007a6e4				Find Current Misc Unit Data Pointer (external ID)?
00072354: 00000000 nop
00072358: 00409021 addu r18,r2,r0
0007235c: 12400016 beq r18,r0,0x000723b8		branch if none
00072360: 34020001 ori r2,r0,0x0001
00072364: 92440004 lbu r4,0x0004(r18)			load misc ID
00072368: 0c01a2f5 jal 0x00068bd4				Jump to post action display
0007236c: 00000000 nop
00072370: 92440004 lbu r4,0x0004(r18)			load misc ID
00072374: 0c01a38c jal 0x00068e30				Jump to 68d08
00072378: 00000000 nop
0007237c: 0801c8ee j 0x000723b8
00072380: 34020001 ori r2,r0,0x0001

none?
00072384: 92040004 lbu r4,0x0004(r16)
00072388: 0c01a38c jal 0x00068e30				Jump to 68d08
0007238c: 00000000 nop
00072390: 92240004 lbu r4,0x0004(r17)
00072394: 0c01a38c jal 0x00068e30				Jump to 68d08
00072398: 00000000 nop
0007239c: 0c01c389 jal 0x00070e24                              00070e24 - 00070e68
000723a0: 00000000 nop
000723a4: 14400004 bne r2,r0,0x000723b8
000723a8: 00001021 addu r2,r0,r0
000723ac: 0c01c723 jal 0x00071c8c                              00071c8c - 00071ce8
000723b0: 00000000 nop
000723b4: 00001021 addu r2,r0,r0				return r2 = 0
000723b8: 8fbf0024 lw r31,0x0024(r29)
000723bc: 8fb20020 lw r18,0x0020(r29)
000723c0: 8fb1001c lw r17,0x001c(r29)
000723c4: 8fb00018 lw r16,0x0018(r29)
000723c8: 27bd0028 addiu r29,r29,0x0028
000723cc: 03e00008 jr r31
000723d0: 00000000 nop