Difference between revisions of "Map calculations for attack"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0017cd24: 27bdffe0 addiu r29,r29,0xffe0 0017cd28: 00004021 addu r8,r0,r0 0017cd2c: afbf0018 sw r31,0x0018(r29) 0017cd30: afb10014 sw r17,0x0014(r2...")
 
Line 46: Line 46:
 
  0017cdd4: 10400005 beq r2,r0,0x0017cdec branch if not ranged weapon  
 
  0017cdd4: 10400005 beq r2,r0,0x0017cdec branch if not ranged weapon  
 
  0017cdd8: 00000000 nop
 
  0017cdd8: 00000000 nop
  0017cddc: 0c05eb24 jal 0x0017ac90 attack map calculations
+
  0017cddc: 0c05eb24 jal 0x0017ac90 [[Targeting validation (weapon flags)]]
 
  0017cde0: 00000000 nop returns 0x00 -success, 0xff - fail
 
  0017cde0: 00000000 nop returns 0x00 -success, 0xff - fail
 
  0017cde4: 0805f38a j 0x0017ce28 jump to end,  
 
  0017cde4: 0805f38a j 0x0017ce28 jump to end,  
 
  0017cde8: 00408021 addu r16,r2,r0
 
  0017cde8: 00408021 addu r16,r2,r0
  0017cdec: 0c05eabe jal 0x0017aaf8
+
  0017cdec: 0c05eabe jal 0x0017aaf8                     [[Calculate Targeting for Menu Types]]
 
  0017cdf0: 00000000 nop
 
  0017cdf0: 00000000 nop
 
  0017cdf4: 00408021 addu r16,r2,r0
 
  0017cdf4: 00408021 addu r16,r2,r0
Line 63: Line 63:
 
  0017ce18: 14400004 bne r2,r0,0x0017ce2c
 
  0017ce18: 14400004 bne r2,r0,0x0017ce2c
 
  0017ce1c: 02001021 addu r2,r16,r0
 
  0017ce1c: 02001021 addu r2,r16,r0
  0017ce20: 0c05f5c2 jal 0x0017d708
+
  0017ce20: 0c05f5c2 jal 0x0017d708                     [[0017d708 - 0017d84c]]
 
  0017ce24: 00000000 nop
 
  0017ce24: 00000000 nop
 
  0017ce28: 02001021 addu r2,r16,r0 return value
 
  0017ce28: 02001021 addu r2,r16,r0 return value

Revision as of 02:51, 18 May 2016

0017cd24: 27bdffe0 addiu r29,r29,0xffe0

0017cd28: 00004021 addu r8,r0,r0
0017cd2c: afbf0018 sw r31,0x0018(r29)
0017cd30: afb10014 sw r17,0x0014(r29)
0017cd34: afb00010 sw r16,0x0010(r29)
0017cd38: 90820001 lbu r2,0x0001(r4)		load skillset of last attack byte
0017cd3c: 00003821 addu r7,r0,r0
0017cd40: 3c018006 lui r1,0x8006
0017cd44: 00220821 addu r1,r1,r2
0017cd48: 90265cb4 lbu r6,0x5cb4(r1)		load action menu byte
0017cd4c: 00008821 addu r17,r0,r0
0017cd50: 30c300ff andi r3,r6,0x00ff		
0017cd54: 10600004 beq r3,r0,0x0017cd68		branch if [Default]
0017cd58: a0a00000 sb r0,0x0000(r5)			store 0x00 on the stack
0017cd5c: 34020006 ori r2,r0,0x0006
0017cd60: 14620013 bne r3,r2,0x0017cdb0		branch if not [Monster]
0017cd64: 34020008 ori r2,r0,0x0008		
0017cd68: 84830002 lh r3,0x0002(r4)			load last attack used
0017cd6c: 00000000 nop
0017cd70: 28620170 slti r2,r3,0x0170		set if last attack was an action ability
0017cd74: 1040000c beq r2,r0,0x0017cda8		branch if not
0017cd78: 000310c0 sll r2,r3,0x03
0017cd7c: 00431023 subu r2,r2,r3
0017cd80: 00021040 sll r2,r2,0x01
0017cd84: 3c038006 lui r3,0x8006
0017cd88: 2463fbf0 addiu r3,r3,0xfbf0		
0017cd8c: 00431021 addu r2,r2,r3			r2 = ability data pointer
0017cd90: 90430005 lbu r3,0x0005(r2)		load flags 3
0017cd94: 00000000 nop
0017cd98: a0a30000 sb r3,0x0000(r5)			store on the stack?
0017cd9c: 90480006 lbu r8,0x0006(r2)		load flags 4
0017cda0: 90470003 lbu r7,0x0003(r2)		load flags 1
0017cda4: 90510004 lbu r17,0x0004(r2)		load flags 2
0017cda8: 30c300ff andi r3,r6,0x00ff		
0017cdac: 34020008 ori r2,r0,0x0008
0017cdb0: 1062000a beq r3,r2,0x0017cddc		branch if action menu = attack
0017cdb4: 3402000a ori r2,r0,0x000a
0017cdb8: 10620008 beq r3,r2,0x0017cddc		branch if action menu = charge
0017cdbc: 24c2ffff addiu r2,r6,0xffff
0017cdc0: 2c420002 sltiu r2,r2,0x0002
0017cdc4: 14400005 bne r2,r0,0x0017cddc		branch if item/weapon inventory
0017cdc8: 31020020 andi r2,r8,0x0020		
0017cdcc: 14400003 bne r2,r0,0x0017cddc		branch if direct attack flag is true
0017cdd0: 30e20020 andi r2,r7,0x0020
0017cdd4: 10400005 beq r2,r0,0x0017cdec		branch if not ranged weapon 
0017cdd8: 00000000 nop
0017cddc: 0c05eb24 jal 0x0017ac90			Targeting validation (weapon flags)
0017cde0: 00000000 nop						returns 0x00 -success, 0xff - fail
0017cde4: 0805f38a j 0x0017ce28				jump to end, 
0017cde8: 00408021 addu r16,r2,r0
0017cdec: 0c05eabe jal 0x0017aaf8                      Calculate Targeting for Menu Types
0017cdf0: 00000000 nop
0017cdf4: 00408021 addu r16,r2,r0
0017cdf8: 2402ffff addiu r2,r0,0xffff
0017cdfc: 1202000a beq r16,r2,0x0017ce28
0017ce00: 32220008 andi r2,r17,0x0008
0017ce04: 10400009 beq r2,r0,0x0017ce2c
0017ce08: 02001021 addu r2,r16,r0
0017ce0c: 3c028019 lui r2,0x8019
0017ce10: 8c42f5fc lw r2,-0x0a04(r2)
0017ce14: 00000000 nop
0017ce18: 14400004 bne r2,r0,0x0017ce2c
0017ce1c: 02001021 addu r2,r16,r0
0017ce20: 0c05f5c2 jal 0x0017d708                      0017d708 - 0017d84c
0017ce24: 00000000 nop
0017ce28: 02001021 addu r2,r16,r0			return value
0017ce2c: 8fbf0018 lw r31,0x0018(r29)
0017ce30: 8fb10014 lw r17,0x0014(r29)
0017ce34: 8fb00010 lw r16,0x0010(r29)
0017ce38: 27bd0020 addiu r29,r29,0x0020
0017ce3c: 03e00008 jr r31
0017ce40: 00000000 nop