Difference between revisions of "Set Jump Ability Targeting"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00179dc8: 27bdfee0 addiu r29,r29,0xfee0 00179dcc: afb40108 sw r20,0x0108(r29) 00179dd0: 34140001 ori r20,r0,0x0001 00179dd4: 27a500d8 addiu r5,...")
 
m (link)
Line 120: Line 120:
 
  00179f94: a2020001 sb r2,0x0001(r16)
 
  00179f94: a2020001 sb r2,0x0001(r16)
 
  00179f98: 02802021 addu r4,r20,r0
 
  00179f98: 02802021 addu r4,r20,r0
  00179f9c: 0c05e546 jal 0x00179518 calculate tiles hit by ability
+
  00179f9c: 0c05e546 jal 0x00179518 [[Calculate_Tiles_Hit_by_Ability]]
 
  00179fa0: 00002821 addu r5,r0,r0
 
  00179fa0: 00002821 addu r5,r0,r0
 
  00179fa4: 001118c0 sll r3,r17,0x03
 
  00179fa4: 001118c0 sll r3,r17,0x03

Revision as of 13:50, 6 February 2022

00179dc8: 27bdfee0 addiu r29,r29,0xfee0
00179dcc: afb40108 sw r20,0x0108(r29)
00179dd0: 34140001 ori r20,r0,0x0001
00179dd4: 27a500d8 addiu r5,r29,0x00d8
00179dd8: afbf0118 sw r31,0x0118(r29)
00179ddc: afb70114 sw r23,0x0114(r29)
00179de0: afb60110 sw r22,0x0110(r29)
00179de4: afb5010c sw r21,0x010c(r29)
00179de8: afb30104 sw r19,0x0104(r29)
00179dec: afb20100 sw r18,0x0100(r29)
00179df0: afb100fc sw r17,0x00fc(r29)
00179df4: 0c01788b jal 0x0005e22c			transfer 0x14 data
00179df8: afb000f8 sw r16,0x00f8(r29)
00179dfc: 93a300d8 lbu r3,0x00d8(r29)
00179e00: 00000000 nop
00179e04: 000310c0 sll r2,r3,0x03
00179e08: 00431023 subu r2,r2,r3
00179e0c: 00021180 sll r2,r2,0x06
00179e10: 3c038019 lui r3,0x8019
00179e14: 246308cc addiu r3,r3,0x08cc
00179e18: 00432021 addu r4,r2,r3			r4=  unit data
00179e1c: 90830003 lbu r3,0x0003(r4)		load job
00179e20: 3402005d ori r2,r0,0x005d
00179e24: 14620003 bne r3,r2,0x00179e34		branch if not mime
00179e28: 34100002 ori r16,r0,0x0002
00179e2c: 34140008 ori r20,r0,0x0008
00179e30: 34100010 ori r16,r0,0x0010
00179e34: 0c060428 jal 0x001810a0			map location calculation
00179e38: 00000000 nop
00179e3c: 00409821 addu r19,r2,r0
00179e40: 001318c0 sll r3,r19,0x03
00179e44: 3c028019 lui r2,0x8019
00179e48: 2442f8cc addiu r2,r2,0xf8cc
00179e4c: 00621021 addu r2,r3,r2
00179e50: 90460002 lbu r6,0x0002(r2)		load height
00179e54: 90430003 lbu r3,0x0003(r2)		load height
00179e58: 93a400d8 lbu r4,0x00d8(r29)
00179e5c: 93a500d9 lbu r5,0x00d9(r29)
00179e60: 27a20060 addiu r2,r29,0x0060
00179e64: afa20010 sw r2,0x0010(r29)
00179e68: 27a200a8 addiu r2,r29,0x00a8
00179e6c: afa20018 sw r2,0x0018(r29)
00179e70: 27a200c0 addiu r2,r29,0x00c0
00179e74: 27a70048 addiu r7,r29,0x0048
00179e78: afa00014 sw r0,0x0014(r29)
00179e7c: afa2001c sw r2,0x001c(r29)
00179e80: 3063001f andi r3,r3,0x001f
00179e84: 00063040 sll r6,r6,0x01
00179e88: 0066a821 addu r21,r3,r6
00179e8c: 0c0605f0 jal 0x001817c0			ability loading
00179e90: 27a60020 addiu r6,r29,0x0020
00179e94: 00403821 addu r7,r2,r0
00179e98: 18e00020 blez r7,0x00179f1c
00179e9c: 00004021 addu r8,r0,r0
00179ea0: 340afe76 ori r10,r0,0xfe76
00179ea4: 3c098006 lui r9,0x8006
00179ea8: 2529102c addiu r9,r9,0x102c		jump abilities
00179eac: 27a60020 addiu r6,r29,0x0020
<Loop> do something for abilities
00179eb0: 94c30000 lhu r3,0x0000(r6)		load ability
00179eb4: 00000000 nop
00179eb8: 006a1021 addu r2,r3,r10			ability + 0xfe76
00179ebc: 3042ffff andi r2,r2,0xffff		
00179ec0: 2c42000c sltiu r2,r2,0x000c		
00179ec4: 10400011 beq r2,r0,0x00179f0c		branch if not jump ability
00179ec8: 2462fe76 addiu r2,r3,0xfe76
Jump Ability
00179ecc: 3042ffff andi r2,r2,0xffff
00179ed0: 00021040 sll r2,r2,0x01
00179ed4: 00492021 addu r4,r2,r9			
00179ed8: 90830001 lbu r3,0x0001(r4)		load Verticle
00179edc: 90820000 lbu r2,0x0000(r4)		load Range
00179ee0: 00000000 nop
00179ee4: 0282102b sltu r2,r20,r2			8 < range?
00179ee8: 10400002 beq r2,r0,0x00179ef4		branch if not
00179eec: 00032840 sll r5,r3,0x01			verticle*2
00179ef0: 90940000 lbu r20,0x0000(r4)		load range
00179ef4: 30a300ff andi r3,r5,0x00ff		r3 = verticle*2
00179ef8: 320200ff andi r2,r16,0x00ff		??
00179efc: 0043102b sltu r2,r2,r3			
00179f00: 10400002 beq r2,r0,0x00179f0c		???
00179f04: 00000000 nop
00179f08: 00a08021 addu r16,r5,r0
00179f0c: 25080001 addiu r8,r8,0x0001		r8++
00179f10: 0107102a slt r2,r8,r7				set if less than # of abilities
00179f14: 1440ffe6 bne r2,r0,0x00179eb0
00179f18: 24c60002 addiu r6,r6,0x0002
00179f1c: 320200ff andi r2,r16,0x00ff
00179f20: 02a21823 subu r3,r21,r2
00179f24: 0060b021 addu r22,r3,r0
00179f28: 02a21021 addu r2,r21,r2
00179f2c: 04610002 bgez r3,0x00179f38
00179f30: 0040b821 addu r23,r2,r0
00179f34: 0000b021 addu r22,r0,r0
00179f38: 0c05f7b4 jal 0x0017ded0				clear panels?
00179f3c: 00000000 nop
00179f40: 2a620100 slti r2,r19,0x0100			do for ??
00179f44: 14400002 bne r2,r0,0x00179f50
00179f48: 26710100 addiu r17,r19,0x0100
00179f4c: 2671ff00 addiu r17,r19,0xff00
00179f50: 00131080 sll r2,r19,0x02
00179f54: 00531021 addu r2,r2,r19
00179f58: 3c048019 lui r4,0x8019
00179f5c: 24842dd8 addiu r4,r4,0x2dd8			grid data
00179f60: 00449021 addu r18,r2,r4
00179f64: 26830001 addiu r3,r20,0x0001			aoe + 1 ?
00179f68: 00111080 sll r2,r17,0x02
00179f6c: 00511021 addu r2,r2,r17
00179f70: 00448021 addu r16,r2,r4
00179f74: 2a620100 slti r2,r19,0x0100
00179f78: a2430000 sb r3,0x0000(r18)			store aoe
00179f7c: 10400004 beq r2,r0,0x00179f90
00179f80: a2030000 sb r3,0x0000(r16)
00179f84: 34020001 ori r2,r0,0x0001
00179f88: 0805e7e6 j 0x00179f98
00179f8c: a2420001 sb r2,0x0001(r18)
00179f90: 34020001 ori r2,r0,0x0001
00179f94: a2020001 sb r2,0x0001(r16)
00179f98: 02802021 addu r4,r20,r0
00179f9c: 0c05e546 jal 0x00179518				Calculate_Tiles_Hit_by_Ability
00179fa0: 00002821 addu r5,r0,r0
00179fa4: 001118c0 sll r3,r17,0x03
00179fa8: 3c028019 lui r2,0x8019
00179fac: 2442f8cc addiu r2,r2,0xf8cc			tile data
00179fb0: 00621021 addu r2,r3,r2
00179fb4: a2400000 sb r0,0x0000(r18)			
00179fb8: a2000000 sb r0,0x0000(r16)
00179fbc: 90440003 lbu r4,0x0003(r2)			load height
00179fc0: 90430002 lbu r3,0x0002(r2)			load height
00179fc4: 90420006 lbu r2,0x0006(r2)			load selectability
00179fc8: 3084001f andi r4,r4,0x001f			
00179fcc: 00031840 sll r3,r3,0x01				height*2
00179fd0: 30420001 andi r2,r2,0x0001			
00179fd4: 14400004 bne r2,r0,0x00179fe8			branch if non-selectable tile
00179fd8: 00832021 addu r4,r4,r3
00179fdc: 02a4102a slt r2,r21,r4
00179fe0: 14400056 bne r2,r0,0x0017a13c			jump to end if ??
00179fe4: 00001021 addu r2,r0,r0
00179fe8: 00005821 addu r11,r0,r0
00179fec: 00004021 addu r8,r0,r0
00179ff0: 3c0c8019 lui r12,0x8019
00179ff4: 258cf8cc addiu r12,r12,0xf8cc			tile data
00179ff8: 258f0800 addiu r15,r12,0x0800
00179ffc: 00161400 sll r2,r22,0x10
0017a000: 00027403 sra r14,r2,0x10
0017a004: 02e06821 addu r13,r23,r0
0017a008: 3c028019 lui r2,0x8019
0017a00c: 24422dd8 addiu r2,r2,0x2dd8			grid data
0017a010: 00404821 addu r9,r2,r0
0017a014: 252a0500 addiu r10,r9,0x0500
0017a018: 000810c0 sll r2,r8,0x03
0017a01c: 004c2821 addu r5,r2,r12
0017a020: 91230000 lbu r3,0x0000(r9)			load aoe?
0017a024: 00000000 nop
0017a028: 10600006 beq r3,r0,0x0017a044			branch if aoe = 0
0017a02c: 004f3821 addu r7,r2,r15
0017a030: 90a20006 lbu r2,0x0006(r5)			load selectability
0017a034: 00000000 nop
0017a038: 30420001 andi r2,r2,0x0001
0017a03c: 10400003 beq r2,r0,0x0017a04c			branch if selectable tile?
0017a040: 00000000 nop
0017a044: 0805e818 j 0x0017a060
0017a048: 2406ffff addiu r6,r0,0xffff
0017a04c: 90a30003 lbu r3,0x0003(r5)			load height
0017a050: 90a20002 lbu r2,0x0002(r5)			load height
0017a054: 3063001f andi r3,r3,0x001f
0017a058: 00021040 sll r2,r2,0x01
0017a05c: 00623021 addu r6,r3,r2
0017a060: 91420000 lbu r2,0x0000(r10)			load ?
0017a064: 00000000 nop
0017a068: 10400006 beq r2,r0,0x0017a084
0017a06c: 2404ffff addiu r4,r0,0xffff
0017a070: 90e20006 lbu r2,0x0006(r7)
0017a074: 00000000 nop
0017a078: 30420001 andi r2,r2,0x0001
0017a07c: 10400003 beq r2,r0,0x0017a08c
0017a080: 00000000 nop
0017a084: 0805e829 j 0x0017a0a4
0017a088: 00061c00 sll r3,r6,0x10
0017a08c: 90e30003 lbu r3,0x0003(r7)
0017a090: 90e20002 lbu r2,0x0002(r7)
0017a094: 3063001f andi r3,r3,0x001f
0017a098: 00021040 sll r2,r2,0x01
0017a09c: 00622021 addu r4,r3,r2
0017a0a0: 00061c00 sll r3,r6,0x10
0017a0a4: 00031c03 sra r3,r3,0x10
0017a0a8: 00041400 sll r2,r4,0x10
0017a0ac: 00021403 sra r2,r2,0x10
0017a0b0: 0062182a slt r3,r3,r2
0017a0b4: 10600004 beq r3,r0,0x0017a0c8			height checks?
0017a0b8: 00a01021 addu r2,r5,r0
0017a0bc: 00803021 addu r6,r4,r0
0017a0c0: 00e02821 addu r5,r7,r0
0017a0c4: 00403821 addu r7,r2,r0
0017a0c8: 00061400 sll r2,r6,0x10
0017a0cc: 00021c03 sra r3,r2,0x10
0017a0d0: 006e102a slt r2,r3,r14
0017a0d4: 1440000c bne r2,r0,0x0017a108			height checks?
0017a0d8: 01a3102a slt r2,r13,r3
0017a0dc: 1440000a bne r2,r0,0x0017a108
0017a0e0: 00000000 nop
0017a0e4: 90a20006 lbu r2,0x0006(r5)
0017a0e8: 00000000 nop
0017a0ec: 30420002 andi r2,r2,0x0002
0017a0f0: 14400005 bne r2,r0,0x0017a108
0017a0f4: 00000000 nop
0017a0f8: 90a20005 lbu r2,0x0005(r5)			load tile flags ???
0017a0fc: 256b0001 addiu r11,r11,0x0001
0017a100: 0805e845 j 0x0017a114
0017a104: 34420040 ori r2,r2,0x0040				add ?? flag
0017a108: 90a20005 lbu r2,0x0005(r5)
0017a10c: 00000000 nop
0017a110: 304200bf andi r2,r2,0x00bf			remove 0x40 flag
0017a114: a0a20005 sb r2,0x0005(r5)				store
0017a118: 25290005 addiu r9,r9,0x0005
0017a11c: 90e20005 lbu r2,0x0005(r7)			load 
0017a120: 25080001 addiu r8,r8,0x0001
0017a124: 304200bf andi r2,r2,0x00bf			Check r5 vs. r7
0017a128: a0e20005 sb r2,0x0005(r7)
0017a12c: 29020100 slti r2,r8,0x0100
0017a130: 1440ffb9 bne r2,r0,0x0017a018			do for each panel
0017a134: 254a0005 addiu r10,r10,0x0005
0017a138: 01601021 addu r2,r11,r0
0017a13c: 8fbf0118 lw r31,0x0118(r29)
0017a140: 8fb70114 lw r23,0x0114(r29)
0017a144: 8fb60110 lw r22,0x0110(r29)
0017a148: 8fb5010c lw r21,0x010c(r29)
0017a14c: 8fb40108 lw r20,0x0108(r29)
0017a150: 8fb30104 lw r19,0x0104(r29)
0017a154: 8fb20100 lw r18,0x0100(r29)
0017a158: 8fb100fc lw r17,0x00fc(r29)
0017a15c: 8fb000f8 lw r16,0x00f8(r29)
0017a160: 27bd0120 addiu r29,r29,0x0120
0017a164: 03e00008 jr r31
0017a168: 00000000 nop