Difference between revisions of "Set and Validate Arc Trajectory"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " 001aff18: 27bdff30 addiu r29,r29,0xff30 001aff1c: afb500bc sw r21,0x00bc(r29) 001aff20: 0080a821 addu r21,r4,r0 r21 = Attacker ID 001aff24: afb000a8 sw r16,0x00a8(r29) 0...")
 
m (link)
Line 118: Line 118:
 
  001b00ec: 8fa40068 lw r4,0x0068(r29)
 
  001b00ec: 8fa40068 lw r4,0x0068(r29)
 
  001b00f0: afa2006c sw r2,0x006c(r29)
 
  001b00f0: afa2006c sw r2,0x006c(r29)
  001b00f4: 0c00763a jal 0x0001d8e8
+
  001b00f4: 0c00763a jal 0x0001d8e8                 [[Get_Angle_Value_via_ArcTan_Table]]
 
  001b00f8: 00042023 subu r4,r0,r4
 
  001b00f8: 00042023 subu r4,r0,r4
 
  001b00fc: 27a40060 addiu r4,r29,0x0060
 
  001b00fc: 27a40060 addiu r4,r29,0x0060

Revision as of 21:32, 2 January 2022

001aff18: 27bdff30 addiu r29,r29,0xff30
001aff1c: afb500bc sw r21,0x00bc(r29)
001aff20: 0080a821 addu r21,r4,r0		r21 = Attacker ID
001aff24: afb000a8 sw r16,0x00a8(r29)
001aff28: 00a08021 addu r16,r5,r0		r16 = Unit's Target X Data Pointer
001aff2c: afb400b8 sw r20,0x00b8(r29)
001aff30: 00c0a021 addu r20,r6,r0		r20 = Tile ID
001aff34: afbf00cc sw r31,0x00cc(r29)
001aff38: afbe00c8 sw r30,0x00c8(r29)
001aff3c: afb700c4 sw r23,0x00c4(r29)
001aff40: afb600c0 sw r22,0x00c0(r29)
001aff44: afb300b4 sw r19,0x00b4(r29)
001aff48: afb200b0 sw r18,0x00b0(r29)
001aff4c: afb100ac sw r17,0x00ac(r29)
001aff50: 3c01801c lui r1,0x801c
001aff54: ac358b60 sw r21,-0x74a0(r1)		Store Attacker ID
001aff58: afb50078 sw r21,0x0078(r29)		Store Attacker ID
001aff5c: 0c023727 jal 0x0008dc9c		Find Unit's Misc Data Pointer and Load Spritesheet Value
001aff60: afb40088 sw r20,0x0088(r29)		Store Tile ID
001aff64: 3c035555 lui r3,0x5555
001aff68: 34635556 ori r3,r3,0x5556
001aff6c: 00021040 sll r2,r2,0x01		Value * 2
001aff70: 00430018 mult r2,r3			Value * 2 / 3
001aff74: 000217c3 sra r2,r2,0x1f
001aff78: 00001810 mfhi r3
001aff7c: 00621823 subu r3,r3,r2
001aff80: 2402ffff addiu r2,r0,0xffff		r2 = -1
001aff84: 12820005 beq r20,r2,0x001aff9c	Branch if Tile ID doesn't exist
001aff88: afa3007c sw r3,0x007c(r29)		Store Value * 2 / 3
001aff8c: 0c023727 jal 0x0008dc9c		Find Unit's Misc Data Pointer and Load Spritesheet Value
001aff90: 02802021 addu r4,r20,r0		r4 = Tile ID
001aff94: 0806bfe8 j 0x001affa0
001aff98: afa2008c sw r2,0x008c(r29)		Store Spritesheet Value
001aff9c: afa0008c sw r0,0x008c(r29)		Store Spritesheet Value = 0
001affa0: 02a02021 addu r4,r21,r0		r4 = Attacker ID
001affa4: 2405ffff addiu r5,r0,0xffff		r5 = -1
001affa8: 0c06bddc jal 0x001af770
001affac: 27a60090 addiu r6,r29,0x0090		r6 = Stack Pointer + 0x90
001affb0: 3c05801c lui r5,0x801c
001affb4: 24a5925c addiu r5,r5,0x925c		r5 = ? Pointer
001affb8: 0c02311a jal 0x0008c468
001affbc: 02a02021 addu r4,r21,r0		r4 = Attacker ID
001affc0: 3c02801c lui r2,0x801c
001affc4: 9442925e lhu r2,-0x6da2(r2)
001affc8: 97a3007c lhu r3,0x007c(r29)
001affcc: 00000000 nop
001affd0: 00431023 subu r2,r2,r3
001affd4: 3c01801c lui r1,0x801c
001affd8: a422925e sh r2,-0x6da2(r1)
001affdc: 2402ffff addiu r2,r0,0xffff
001affe0: 16820022 bne r20,r2,0x001b006c
001affe4: 00000000 nop
001affe8: 86040000 lh r4,0x0000(r16)
001affec: 86050004 lh r5,0x0004(r16)
001afff0: 86060002 lh r6,0x0002(r16)
001afff4: 0c060fed jal 0x00183fb4		Get Tile's Data Pointer
001afff8: 00000000 nop
001afffc: 86040000 lh r4,0x0000(r16)
001b0000: 00000000 nop
001b0004: 000418c0 sll r3,r4,0x03
001b0008: 00641823 subu r3,r3,r4
001b000c: 00031880 sll r3,r3,0x02
001b0010: 2463000e addiu r3,r3,0x000e
001b0014: 3c01801c lui r1,0x801c
001b0018: a4239264 sh r3,-0x6d9c(r1)
001b001c: 86040004 lh r4,0x0004(r16)
001b0020: 00000000 nop
001b0024: 000418c0 sll r3,r4,0x03
001b0028: 00641823 subu r3,r3,r4
001b002c: 00031880 sll r3,r3,0x02
001b0030: 2463000e addiu r3,r3,0x000e
001b0034: 3c01801c lui r1,0x801c
001b0038: a4239268 sh r3,-0x6d98(r1)
001b003c: 90430003 lbu r3,0x0003(r2)
001b0040: 90440002 lbu r4,0x0002(r2)
001b0044: 00031942 srl r3,r3,0x05
001b0048: 00832021 addu r4,r4,r3
001b004c: 00041040 sll r2,r4,0x01
001b0050: 00441021 addu r2,r2,r4
001b0054: 00021080 sll r2,r2,0x02
001b0058: 00021023 subu r2,r0,r2
001b005c: 3c01801c lui r1,0x801c
001b0060: a4229266 sh r2,-0x6d9a(r1)
001b0064: 0806c01f j 0x001b007c
001b0068: 00000000 nop
001b006c: 3c05801c lui r5,0x801c
001b0070: 24a59264 addiu r5,r5,0x9264
001b0074: 0c02311a jal 0x0008c468
001b0078: 02802021 addu r4,r20,r0
001b007c: 3c05801c lui r5,0x801c
001b0080: 84a59264 lh r5,-0x6d9c(r5)
001b0084: 3c02801c lui r2,0x801c
001b0088: 8442925c lh r2,-0x6da4(r2)
001b008c: 00000000 nop
001b0090: 00a22823 subu r5,r5,r2
001b0094: 00a50018 mult r5,r5
001b0098: 3c03801c lui r3,0x801c
001b009c: 84639268 lh r3,-0x6d98(r3)
001b00a0: 3c02801c lui r2,0x801c
001b00a4: 84429260 lh r2,-0x6da0(r2)
001b00a8: 00002012 mflo r4
001b00ac: 00621823 subu r3,r3,r2
001b00b0: 00000000 nop
001b00b4: 00630018 mult r3,r3
001b00b8: 3c06801c lui r6,0x801c
001b00bc: 84c69266 lh r6,-0x6d9a(r6)
001b00c0: 3c02801c lui r2,0x801c
001b00c4: 8442925e lh r2,-0x6da2(r2)
001b00c8: afa50060 sw r5,0x0060(r29)
001b00cc: afa30068 sw r3,0x0068(r29)
001b00d0: 00461023 subu r2,r2,r6
001b00d4: afa20064 sw r2,0x0064(r29)
001b00d8: 00001012 mflo r2
001b00dc: 00822021 addu r4,r4,r2
001b00e0: 0c00709a jal 0x0001c268
001b00e4: 00042300 sll r4,r4,0x0c
001b00e8: 8fa50060 lw r5,0x0060(r29)
001b00ec: 8fa40068 lw r4,0x0068(r29)
001b00f0: afa2006c sw r2,0x006c(r29)
001b00f4: 0c00763a jal 0x0001d8e8                 Get_Angle_Value_via_ArcTan_Table 
001b00f8: 00042023 subu r4,r0,r4
001b00fc: 27a40060 addiu r4,r29,0x0060
001b0100: 27b20094 addiu r18,r29,0x0094
001b0104: 02402821 addu r5,r18,r0
001b0108: 27b00098 addiu r16,r29,0x0098
001b010c: 02003021 addu r6,r16,r0
001b0110: 0c06bcf7 jal 0x001af3dc
001b0114: a7a2002a sh r2,0x002a(r29)
001b0118: 14400004 bne r2,r0,0x001b012c
001b011c: 02002821 addu r5,r16,r0
001b0120: 34021000 ori r2,r0,0x1000
001b0124: afa20098 sw r2,0x0098(r29)
001b0128: afa20094 sw r2,0x0094(r29)
001b012c: 3c04801c lui r4,0x801c
001b0130: 2484925c addiu r4,r4,0x925c
001b0134: 27b1006c addiu r17,r29,0x006c
001b0138: 02203021 addu r6,r17,r0
001b013c: 27b00028 addiu r16,r29,0x0028
001b0140: 8fa20090 lw r2,0x0090(r29)
001b0144: 02003821 addu r7,r16,r0
001b0148: 0c06bece jal 0x001afb38
001b014c: afa20010 sw r2,0x0010(r29)
001b0150: 3c1e801c lui r30,0x801c
001b0154: 27de8b7c addiu r30,r30,0x8b7c
001b0158: 8fc30000 lw r3,0x0000(r30)
001b015c: 8fc40004 lw r4,0x0004(r30)
001b0160: 8fc50008 lw r5,0x0008(r30)
001b0164: 8fc6000c lw r6,0x000c(r30)
001b0168: afa30040 sw r3,0x0040(r29)
001b016c: afa40044 sw r4,0x0044(r29)
001b0170: afa50048 sw r5,0x0048(r29)
001b0174: afa6004c sw r6,0x004c(r29)
001b0178: 3c17801c lui r23,0x801c
001b017c: 26f78b8c addiu r23,r23,0x8b8c
001b0180: 8ae30003 lwl r3,0x0003(r23)
001b0184: 9ae30000 lwr r3,0x0000(r23)
001b0188: 8ae40007 lwl r4,0x0007(r23)
001b018c: 9ae40004 lwr r4,0x0004(r23)
001b0190: aba3005b swl r3,0x005b(r29)
001b0194: bba30058 swr r3,0x0058(r29)
001b0198: aba4005f swl r4,0x005f(r29)
001b019c: bba4005c swr r4,0x005c(r29)
001b01a0: 00401821 addu r3,r2,r0
001b01a4: 3c13801c lui r19,0x801c
001b01a8: 8e738b64 lw r19,-0x749c(r19)
001b01ac: 3c02801c lui r2,0x801c
001b01b0: 8c428b64 lw r2,-0x749c(r2)
001b01b4: 3c08801c lui r8,0x801c
001b01b8: 8d08bf3c lw r8,-0x40c4(r8)
001b01bc: 2416ffff addiu r22,r0,0xffff
001b01c0: 14560003 bne r2,r22,0x001b01d0
001b01c4: afa800a0 sw r8,0x00a0(r29)
001b01c8: 3c16801c lui r22,0x801c
001b01cc: 8ed68b94 lw r22,-0x746c(r22)
001b01d0: 10600004 beq r3,r0,0x001b01e4
001b01d4: 02801021 addu r2,r20,r0
001b01d8: 8fa30098 lw r3,0x0098(r29)
001b01dc: 0806c109 j 0x001b0424
001b01e0: 00000000 nop
001b01e4: 3c04801c lui r4,0x801c
001b01e8: 2484925c addiu r4,r4,0x925c
001b01ec: 02402821 addu r5,r18,r0
001b01f0: 02203021 addu r6,r17,r0
001b01f4: 02003821 addu r7,r16,r0
001b01f8: 8fa20090 lw r2,0x0090(r29)
001b01fc: 2411ffff addiu r17,r0,0xffff
001b0200: 0c06bece jal 0x001afb38
001b0204: afa20010 sw r2,0x0010(r29)
001b0208: 8fc30000 lw r3,0x0000(r30)
001b020c: 8fc40004 lw r4,0x0004(r30)
001b0210: 8fc50008 lw r5,0x0008(r30)
001b0214: 8fc6000c lw r6,0x000c(r30)
001b0218: afa30030 sw r3,0x0030(r29)
001b021c: afa40034 sw r4,0x0034(r29)
001b0220: afa50038 sw r5,0x0038(r29)
001b0224: afa6003c sw r6,0x003c(r29)
001b0228: 8ae30003 lwl r3,0x0003(r23)
001b022c: 9ae30000 lwr r3,0x0000(r23)
001b0230: 8ae40007 lwl r4,0x0007(r23)
001b0234: 9ae40004 lwr r4,0x0004(r23)
001b0238: aba30053 swl r3,0x0053(r29)
001b023c: bba30050 swr r3,0x0050(r29)
001b0240: aba40057 swl r4,0x0057(r29)
001b0244: bba40054 swr r4,0x0054(r29)
001b0248: 00401821 addu r3,r2,r0
001b024c: 3c10801c lui r16,0x801c
001b0250: 8e108b64 lw r16,-0x749c(r16)
001b0254: 3c02801c lui r2,0x801c
001b0258: 8c428b64 lw r2,-0x749c(r2)
001b025c: 3c12801c lui r18,0x801c
001b0260: 8e52bf3c lw r18,-0x40c4(r18)
001b0264: 14510003 bne r2,r17,0x001b0274
001b0268: 00000000 nop
001b026c: 3c11801c lui r17,0x801c
001b0270: 8e318b94 lw r17,-0x746c(r17)
001b0274: 10600004 beq r3,r0,0x001b0288
001b0278: 02801021 addu r2,r20,r0
001b027c: 8fa30094 lw r3,0x0094(r29)
001b0280: 0806c109 j 0x001b0424
001b0284: 00000000 nop
001b0288: 0c0602bf jal 0x00180afc		Get Unit's Data Pointer
001b028c: 02a02021 addu r4,r21,r0
001b0290: 2408ffff addiu r8,r0,0xffff
001b0294: 1268001f beq r19,r8,0x001b0314
001b0298: 0040a021 addu r20,r2,r0
001b029c: 0c0602bf jal 0x00180afc		Get Unit's Data Pointer
001b02a0: 02602021 addu r4,r19,r0
001b02a4: 92830005 lbu r3,0x0005(r20)
001b02a8: 904201ba lbu r2,0x01ba(r2)
001b02ac: 30630030 andi r3,r3,0x0030
001b02b0: 30420030 andi r2,r2,0x0030
001b02b4: 10620018 beq r3,r2,0x001b0318
001b02b8: 2415ffff addiu r21,r0,0xffff
001b02bc: 8fa20040 lw r2,0x0040(r29)
001b02c0: 8fa30044 lw r3,0x0044(r29)
001b02c4: 8fa40048 lw r4,0x0048(r29)
001b02c8: 8fa5004c lw r5,0x004c(r29)
001b02cc: afc20000 sw r2,0x0000(r30)
001b02d0: afc30004 sw r3,0x0004(r30)
001b02d4: afc40008 sw r4,0x0008(r30)
001b02d8: afc5000c sw r5,0x000c(r30)
001b02dc: 8ba2005b lwl r2,0x005b(r29)
001b02e0: 9ba20058 lwr r2,0x0058(r29)
001b02e4: 8ba3005f lwl r3,0x005f(r29)
001b02e8: 9ba3005c lwr r3,0x005c(r29)
001b02ec: aae20003 swl r2,0x0003(r23)
001b02f0: bae20000 swr r2,0x0000(r23)
001b02f4: aae30007 swl r3,0x0007(r23)
001b02f8: bae30004 swr r3,0x0004(r23)
001b02fc: 8fa30098 lw r3,0x0098(r29)
001b0300: 8fa800a0 lw r8,0x00a0(r29)
001b0304: 3c01801c lui r1,0x801c
001b0308: ac338b64 sw r19,-0x749c(r1)
001b030c: 0806c107 j 0x001b041c
001b0310: 02601021 addu r2,r19,r0
001b0314: 2415ffff addiu r21,r0,0xffff
001b0318: 12150010 beq r16,r21,0x001b035c
001b031c: 00000000 nop
001b0320: 0c0602bf jal 0x00180afc		Get Unit's Data Pointer
001b0324: 02002021 addu r4,r16,r0
001b0328: 92830005 lbu r3,0x0005(r20)
001b032c: 904201ba lbu r2,0x01ba(r2)
001b0330: 30630030 andi r3,r3,0x0030
001b0334: 30420030 andi r2,r2,0x0030
001b0338: 10620011 beq r3,r2,0x001b0380
001b033c: 02001021 addu r2,r16,r0
001b0340: 8fa30094 lw r3,0x0094(r29)
001b0344: 3c01801c lui r1,0x801c
001b0348: ac32bf3c sw r18,-0x40c4(r1)
001b034c: 3c01801c lui r1,0x801c
001b0350: ac228b64 sw r2,-0x749c(r1)
001b0354: 0806c109 j 0x001b0424
001b0358: 00000000 nop
001b035c: 8fa30094 lw r3,0x0094(r29)
001b0360: 3c01801c lui r1,0x801c
001b0364: ac32bf3c sw r18,-0x40c4(r1)
001b0368: 3c01801c lui r1,0x801c
001b036c: ac308b64 sw r16,-0x749c(r1)
001b0370: 3c01801c lui r1,0x801c
001b0374: ac318b94 sw r17,-0x746c(r1)
001b0378: 0806c109 j 0x001b0424
001b037c: 2402ffff addiu r2,r0,0xffff
001b0380: 1275000a beq r19,r21,0x001b03ac
001b0384: 00000000 nop
001b0388: 8fa30094 lw r3,0x0094(r29)
001b038c: 3c01801c lui r1,0x801c
001b0390: ac32bf3c sw r18,-0x40c4(r1)
001b0394: 3c01801c lui r1,0x801c
001b0398: ac318b94 sw r17,-0x746c(r1)
001b039c: 3c01801c lui r1,0x801c
001b03a0: ac228b64 sw r2,-0x749c(r1)
001b03a4: 0806c109 j 0x001b0424
001b03a8: 00000000 nop
001b03ac: 3c05801c lui r5,0x801c
001b03b0: 24a58b7c addiu r5,r5,0x8b7c
001b03b4: 8fa20040 lw r2,0x0040(r29)
001b03b8: 8fa30044 lw r3,0x0044(r29)
001b03bc: 8fa40048 lw r4,0x0048(r29)
001b03c0: aca20000 sw r2,0x0000(r5)
001b03c4: aca30004 sw r3,0x0004(r5)
001b03c8: aca40008 sw r4,0x0008(r5)
001b03cc: 8fa2004c lw r2,0x004c(r29)
001b03d0: 00000000 nop
001b03d4: aca2000c sw r2,0x000c(r5)
001b03d8: 3c05801c lui r5,0x801c
001b03dc: 24a58b8c addiu r5,r5,0x8b8c
001b03e0: 8ba2005b lwl r2,0x005b(r29)
001b03e4: 9ba20058 lwr r2,0x0058(r29)
001b03e8: 8ba3005f lwl r3,0x005f(r29)
001b03ec: 9ba3005c lwr r3,0x005c(r29)
001b03f0: a8a20003 swl r2,0x0003(r5)
001b03f4: b8a20000 swr r2,0x0000(r5)
001b03f8: a8a30007 swl r3,0x0007(r5)
001b03fc: b8a30004 swr r3,0x0004(r5)
001b0400: 8fa30098 lw r3,0x0098(r29)
001b0404: 8fa800a0 lw r8,0x00a0(r29)
001b0408: 2402ffff addiu r2,r0,0xffff
001b040c: 3c01801c lui r1,0x801c
001b0410: ac338b64 sw r19,-0x749c(r1)
001b0414: 3c01801c lui r1,0x801c
001b0418: ac368b94 sw r22,-0x746c(r1)
001b041c: 3c01801c lui r1,0x801c
001b0420: ac28bf3c sw r8,-0x40c4(r1)
001b0424: 3c01801c lui r1,0x801c
001b0428: ac238b74 sw r3,-0x748c(r1)
001b042c: 8fbf00cc lw r31,0x00cc(r29)
001b0430: 8fbe00c8 lw r30,0x00c8(r29)
001b0434: 8fb700c4 lw r23,0x00c4(r29)
001b0438: 8fb600c0 lw r22,0x00c0(r29)
001b043c: 8fb500bc lw r21,0x00bc(r29)
001b0440: 8fb400b8 lw r20,0x00b8(r29)
001b0444: 8fb300b4 lw r19,0x00b4(r29)
001b0448: 8fb200b0 lw r18,0x00b0(r29)
001b044c: 8fb100ac lw r17,0x00ac(r29)
001b0450: 8fb000a8 lw r16,0x00a8(r29)
001b0454: 27bd00d0 addiu r29,r29,0x00d0
001b0458: 03e00008 jr r31
001b045c: 00000000 nop