Spell Quote determination

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

0014175c: 27bdffc8 addiu r29,r29,0xffc8
00141760: afb00020 sw r16,0x0020(r29)
00141764: 00808021 addu r16,r4,r0				r16 = units targeting data (0x16e)
00141768: afb20028 sw r18,0x0028(r29)
0014176c: 00a09021 addu r18,r5,r0
00141770: afb3002c sw r19,0x002c(r29)
00141774: 00c09821 addu r19,r6,r0
00141778: 27a50018 addiu r5,r29,0x0018
0014177c: afbf0030 sw r31,0x0030(r29)
00141780: afb10024 sw r17,0x0024(r29)
00141784: 96040002 lhu r4,0x0002(r16)			
00141788: 27a6001c addiu r6,r29,0x001c
0014178c: 0c0169cb jal 0x0005a72c				calculate ability pointers and type
00141790: 308401ff andi r4,r4,0x01ff			r4 = ability
00141794: 0c0602bf jal 0x00180afc				get units data pointer
00141798: 02402021 addu r4,r18,r0
0014179c: 92040001 lbu r4,0x0001(r16)			load skillset used
001417a0: 00000000 nop
001417a4: 10800005 beq r4,r0,0x001417bc			branch if skillset = 00
001417a8: 00408821 addu r17,r2,r0
001417ac: 0c050458 jal 0x00141160				get something skillset related?
001417b0: 00000000 nop
001417b4: 080505f0 j 0x001417c0
001417b8: 00402021 addu r4,r2,r0
001417bc: 34040001 ori r4,r0,0x0001
001417c0: 92030001 lbu r3,0x0001(r16)			load skillset used
001417c4: 92220012 lbu r2,0x0012(r17)			load primary skillset
001417c8: 00000000 nop
001417cc: 14620008 bne r3,r2,0x001417f0			branch if used skillset isn't primary
001417d0: 00000000 nop
001417d4: 96220048 lhu r2,0x0048(r17)			load Y coordinate
001417d8: 00000000 nop
001417dc: 00021302 srl r2,r2,0x0c
001417e0: 30420002 andi r2,r2,0x0002
001417e4: 10400002 beq r2,r0,0x001417f0			branch if Y coordinate < 1
001417e8: 00000000 nop
001417ec: 34040001 ori r4,r0,0x0001
001417f0: 92220013 lbu r2,0x0013(r17)			load secondary skillset
001417f4: 00000000 nop
001417f8: 14620008 bne r3,r2,0x0014181c			branch if used skillset isn't secondary
001417fc: 00000000 nop
00141800: 96220048 lhu r2,0x0048(r17)
00141804: 00000000 nop
00141808: 00021302 srl r2,r2,0x0c
0014180c: 30420001 andi r2,r2,0x0001
00141810: 10400002 beq r2,r0,0x0014181c			Y branch if on different map level?
00141814: 00000000 nop
00141818: 34040001 ori r4,r0,0x0001
0014181c: 14800033 bne r4,r0,0x001418ec			branch if Y coordinate stuff was 0
00141820: 00000000 nop
00141824: 96040002 lhu r4,0x0002(r16)			load ability used
00141828: 3c038015 lui r3,0x8015
0014182c: 8c63d308 lw r3,-0x2cf8(r3)			load used ability for spell qoute
00141830: 308201ff andi r2,r4,0x01ff
00141834: 1062002d beq r3,r2,0x001418ec			branch if ability has spell qoute?
00141838: 3402005a ori r2,r0,0x005a
0014183c: 92230003 lbu r3,0x0003(r17)			load job
00141840: 00000000 nop
00141844: 10620029 beq r3,r2,0x001418ec			branch if job = calculator
00141848: 3402005d ori r2,r0,0x005d
0014184c: 10620027 beq r3,r2,0x001418ec			branch if job = mime
00141850: 00041400 sll r2,r4,0x10
00141854: 00021403 sra r2,r2,0x10
00141858: 28420170 slti r2,r2,0x0170
0014185c: 10400023 beq r2,r0,0x001418ec			branch if ability is special or R/S/M
00141860: 00000000 nop
00141864: 8fa2001c lw r2,0x001c(r29)
00141868: 00000000 nop
0014186c: 90420005 lbu r2,0x0005(r2)			load ability flags
00141870: 00000000 nop
00141874: 30420002 andi r2,r2,0x0002
00141878: 1040001c beq r2,r0,0x001418ec			branch if spell qoute = false
0014187c: 00000000 nop
00141880: 9222005a lbu r2,0x005a(r17)			load status
00141884: 00000000 nop
00141888: 30420012 andi r2,r2,0x0012
0014188c: 14400017 bne r2,r0,0x001418ec			branch if transparent/frog
00141890: 3c030006 lui r3,0x0006
00141894: 3c028004 lui r2,0x8004
00141898: 8c4273ac lw r2,0x73ac(r2)				load customized option
0014189c: 00000000 nop
001418a0: 00431024 and r2,r2,r3
001418a4: 14400011 bne r2,r0,0x001418ec			branch if don't show spell qoutes?
001418a8: 00000000 nop
001418ac: 0c04ed64 jal 0x0013b590				0013b590 - 0013b640	
001418b0: 34040021 ori r4,r0,0x0021
001418b4: 3042000f andi r2,r2,0x000f
001418b8: 28420004 slti r2,r2,0x0004
001418bc: 1040000b beq r2,r0,0x001418ec
001418c0: 34040005 ori r4,r0,0x0005
001418c4: 00002821 addu r5,r0,r0
001418c8: 02403021 addu r6,r18,r0
001418cc: 96020002 lhu r2,0x0002(r16)			load last attack used
001418d0: afb30010 sw r19,0x0010(r29)
001418d4: afb00014 sw r16,0x0014(r29)
001418d8: 304201ff andi r2,r2,0x01ff
001418dc: 3c018015 lui r1,0x8015
001418e0: ac22d308 sw r2,-0x2cf8(r1)			store spell qoute ability?
001418e4: 08050664 j 0x00141990
001418e8: 00003821 addu r7,r0,r0
001418ec: 92040001 lbu r4,0x0001(r16)			load skillset
001418f0: 00000000 nop
001418f4: 10800005 beq r4,r0,0x0014190c			branch if none
001418f8: 00000000 nop
001418fc: 0c050458 jal 0x00141160                     00141160 - 001411b0
00141900: 00000000 nop
00141904: 08050644 j 0x00141910
00141908: 00402021 addu r4,r2,r0
0014190c: 00002021 addu r4,r0,r0
00141910: 1480000e bne r4,r0,0x0014194c
00141914: 00000000 nop
00141918: 8fa20018 lw r2,0x0018(r29)
0014191c: 00000000 nop
00141920: 90420003 lbu r2,0x0003(r2)
00141924: 00000000 nop
00141928: 30420040 andi r2,r2,0x0040
0014192c: 10400007 beq r2,r0,0x0014194c		branch if tile not hit?
00141930: 3c030006 lui r3,0x0006
00141934: 3c028004 lui r2,0x8004
00141938: 8c4273ac lw r2,0x73ac(r2)			load customized options
0014193c: 00000000 nop
00141940: 00431024 and r2,r2,r3
00141944: 10400008 beq r2,r0,0x00141968		??? check
00141948: 34040007 ori r4,r0,0x0007
0014194c: 92030001 lbu r3,0x0001(r16)		load skillset
00141950: 34020006 ori r2,r0,0x0006
00141954: 10620003 beq r3,r2,0x00141964		branch if item
00141958: 34020014 ori r2,r0,0x0014
0014195c: 14620007 bne r3,r2,0x0014197c		branch if not throw
00141960: 34040007 ori r4,r0,0x0007
00141964: 34040007 ori r4,r0,0x0007
00141968: 00002821 addu r5,r0,r0
0014196c: 02403021 addu r6,r18,r0
00141970: 00003821 addu r7,r0,r0
00141974: 08050663 j 0x0014198c
00141978: afb30010 sw r19,0x0010(r29)
0014197c: 00002821 addu r5,r0,r0
00141980: 02403021 addu r6,r18,r0
00141984: 00003821 addu r7,r0,r0
00141988: afa00010 sw r0,0x0010(r29)
0014198c: afb00014 sw r16,0x0014(r29)
00141990: 0c0506c3 jal 0x00141b0c			System function routine - spell quote?
00141994: 00000000 nop
00141998: 8fbf0030 lw r31,0x0030(r29)
0014199c: 8fb3002c lw r19,0x002c(r29)
001419a0: 8fb20028 lw r18,0x0028(r29)
001419a4: 8fb10024 lw r17,0x0024(r29)
001419a8: 8fb00020 lw r16,0x0020(r29)
001419ac: 27bd0038 addiu r29,r29,0x0038
001419b0: 03e00008 jr r31
001419b4: 00000000 nop