Difference between revisions of "Set targeting for weapon attack"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00179a20: 27bdffe0 addiu r29,r29,0xffe0 00179a24: 00803821 addu r7,r4,r0 00179a28: afbf0018 sw r31,0x0018(r29) 00179a2c: afb10014 sw r17,0x0014...")
 
Line 53: Line 53:
 
  00179ae8: 10400005 beq r2,r0,0x00179b00 branch if not striking or lunging
 
  00179ae8: 10400005 beq r2,r0,0x00179b00 branch if not striking or lunging
 
  00179aec: 00e02021 addu r4,r7,r0
 
  00179aec: 00e02021 addu r4,r7,r0
Striking/lunging
+
  00179af0: 0c05e6d6 jal 0x00179b58 [[Striking/lunging modification]]
  00179af0: 0c05e6d6 jal 0x00179b58 striking/lunging modification?
 
 
  00179af4: 00c02821 addu r5,r6,r0
 
  00179af4: 00c02821 addu r5,r6,r0
 
  00179af8: 0805e6ce j 0x00179b38
 
  00179af8: 0805e6ce j 0x00179b38
Line 61: Line 60:
 
  00179b04: 10400009 beq r2,r0,0x00179b2c branch if not direct
 
  00179b04: 10400009 beq r2,r0,0x00179b2c branch if not direct
 
  00179b08: 01002021 addu r4,r8,r0
 
  00179b08: 01002021 addu r4,r8,r0
  00179b0c: 0c05e546 jal 0x00179518 Calculate tiles hit by ability
+
  00179b0c: 0c05e546 jal 0x00179518 [[Calculate Tiles Hit by Ability]]
 
  00179b10: 00002821 addu r5,r0,r0
 
  00179b10: 00002821 addu r5,r0,r0
 
  00179b14: 02002021 addu r4,r16,r0
 
  00179b14: 02002021 addu r4,r16,r0
 
  00179b18: 02202821 addu r5,r17,r0
 
  00179b18: 02202821 addu r5,r17,r0
  00179b1c: 0c05e509 jal 0x00179424 direct modification?
+
  00179b1c: 0c05e509 jal 0x00179424 [[Remove Close Range Routine]]
 
  00179b20: 34060002 ori r6,r0,0x0002
 
  00179b20: 34060002 ori r6,r0,0x0002
 
  00179b24: 0805e6ce j 0x00179b38
 
  00179b24: 0805e6ce j 0x00179b38
 
  00179b28: 00000000 nop
 
  00179b28: 00000000 nop
 
  00179b2c: 00e02021 addu r4,r7,r0
 
  00179b2c: 00e02021 addu r4,r7,r0
  00179b30: 0c05e62c jal 0x001798b0 Set initial Range 1 panels?
+
  00179b30: 0c05e62c jal 0x001798b0 [[Set initial panels]]
 
  00179b34: 01002821 addu r5,r8,r0
 
  00179b34: 01002821 addu r5,r8,r0
  00179b38: 0c05e761 jal 0x00179d84 Remove Targets
+
  00179b38: 0c05e761 jal 0x00179d84 [[Remove ???? targets]]
 
  00179b3c: 00000000 nop
 
  00179b3c: 00000000 nop
 
  00179b40: 8fbf0018 lw r31,0x0018(r29)
 
  00179b40: 8fbf0018 lw r31,0x0018(r29)

Revision as of 18:16, 10 November 2016

00179a20: 27bdffe0 addiu r29,r29,0xffe0
00179a24: 00803821 addu r7,r4,r0
00179a28: afbf0018 sw r31,0x0018(r29)
00179a2c: afb10014 sw r17,0x0014(r29)
00179a30: afb00010 sw r16,0x0010(r29)
00179a34: 90f10048 lbu r17,0x0048(r7)		load Y
00179a38: 3c02800e lui r2,0x800e
00179a3c: 90424e9c lbu r2,0x4e9c(r2)		load max
00179a40: 00000000 nop
00179a44: 02220018 mult r17,r2
00179a48: 90e4001d lbu r4,0x001d(r7)		load weapon
00179a4c: 90e2005a lbu r2,0x005a(r7)		load status
00179a50: 90f00047 lbu r16,0x0047(r7)		load X
00179a54: 30420002 andi r2,r2,0x0002
00179a58: 00001812 mflo r3
00179a5c: 10400002 beq r2,r0,0x00179a68		branch if not ?
00179a60: 02032821 addu r5,r16,r3
00179a64: 00002021 addu r4,r0,r0
00179a68: 308300ff andi r3,r4,0x00ff
00179a6c: 340200ff ori r2,r0,0x00ff
00179a70: 14620006 bne r3,r2,0x00179a8c		branch if ?
00179a74: 00000000 nop
00179a78: 90e4001f lbu r4,0x001f(r7)		load weapon
00179a7c: 00000000 nop
00179a80: 14830003 bne r4,r3,0x00179a90
00179a84: 308200ff andi r2,r4,0x00ff
00179a88: 00002021 addu r4,r0,r0
00179a8c: 308200ff andi r2,r4,0x00ff
00179a90: 2c420080 sltiu r2,r2,0x0080		set if weapon
00179a94: 14400002 bne r2,r0,0x00179aa0		branch if so
00179a98: 00051880 sll r3,r5,0x02
00179a9c: 00002021 addu r4,r0,r0			set unarmed
00179aa0: 000420c0 sll r4,r4,0x03
00179aa4: 3c028006 lui r2,0x8006
00179aa8: 24423ab8 addiu r2,r2,0x3ab8		weapon data pointer
00179aac: 00822021 addu r4,r4,r2
00179ab0: 00651821 addu r3,r3,r5
00179ab4: 3c028019 lui r2,0x8019
00179ab8: 24422dd8 addiu r2,r2,0x2dd8		panel grid data
00179abc: 00622821 addu r5,r3,r2
00179ac0: 24420500 addiu r2,r2,0x0500
00179ac4: 00621821 addu r3,r3,r2
00179ac8: 34020001 ori r2,r0,0x0001
00179acc: 90880000 lbu r8,0x0000(r4)		load weapon range
00179ad0: 90860001 lbu r6,0x0001(r4)		load targeting flags
00179ad4: 25040001 addiu r4,r8,0x0001		range++
00179ad8: a0a40000 sb r4,0x0000(r5)			store weapon range +1 into grid
00179adc: a0640000 sb r4,0x0000(r3)			store weapon range + 1 into grid
00179ae0: a0a20001 sb r2,0x0001(r5)			store 1 set panel targeteD?
00179ae4: 30c200c0 andi r2,r6,0x00c0
00179ae8: 10400005 beq r2,r0,0x00179b00		branch if not striking or lunging
00179aec: 00e02021 addu r4,r7,r0
00179af0: 0c05e6d6 jal 0x00179b58			Striking/lunging modification
00179af4: 00c02821 addu r5,r6,r0
00179af8: 0805e6ce j 0x00179b38
00179afc: 00000000 nop
00179b00: 30c20020 andi r2,r6,0x0020
00179b04: 10400009 beq r2,r0,0x00179b2c		branch if not direct
00179b08: 01002021 addu r4,r8,r0
00179b0c: 0c05e546 jal 0x00179518			Calculate Tiles Hit by Ability
00179b10: 00002821 addu r5,r0,r0
00179b14: 02002021 addu r4,r16,r0
00179b18: 02202821 addu r5,r17,r0
00179b1c: 0c05e509 jal 0x00179424			Remove Close Range Routine
00179b20: 34060002 ori r6,r0,0x0002
00179b24: 0805e6ce j 0x00179b38
00179b28: 00000000 nop
00179b2c: 00e02021 addu r4,r7,r0
00179b30: 0c05e62c jal 0x001798b0			Set initial panels
00179b34: 01002821 addu r5,r8,r0
00179b38: 0c05e761 jal 0x00179d84			Remove ???? targets
00179b3c: 00000000 nop
00179b40: 8fbf0018 lw r31,0x0018(r29)
00179b44: 8fb10014 lw r17,0x0014(r29)
00179b48: 8fb00010 lw r16,0x0010(r29)
00179b4c: 27bd0020 addiu r29,r29,0x0020
00179b50: 03e00008 jr r31
00179b54: 00000000 nop