001adfec - 001ae1a4

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
001adfec: 27bdffe0 addiu r29,r29,0xffe0		this routine takes r6 = 0 or 1 as an input. and doesn't fucking do anything with it. also stack - 0x40
001adff0: afb00010 sw r16,0x0010(r29)
001adff4: 00a08021 addu r16,r5,r0			r16 strait up a stack pointer. pain. stack + 0x50
001adff8: afbf0018 sw r31,0x0018(r29)
001adffc: afb10014 sw r17,0x0014(r29)
001ae000: 96020000 lhu r2,0x0000(r16)			load hit count
001ae004: 00000000 nop
001ae008: 1040005f beq r2,r0,0x001ae188		branch if no hits
001ae00c: 00808821 addu r17,r4,r0			weapon element
001ae010: 0c06b7eb jal 0x001adfac			Get Ninja Ball effect
001ae014: 00000000 nop
001ae018: 0c06b60a jal 0x001ad828			returns current ETID
001ae01c: 00408821 addu r17,r2,r0			r17 = element, but bad, and in the wrong order, and it's numbers instead of bitflags.
001ae020: 92030007 lbu r3,0x0007(r16)			load evade type saved byte (0x03 if guarded w/ equipment or arrow guard, 0x04 if nullified, caught, or blade grasped, 0x5 if golem, 0x6 if reflect (not critical) or hit, or 0x01 critical hit (either reflect or hit))
001ae024: 00404821 addu r9,r2,r0			ETID into r9
001ae028: 2c620008 sltiu r2,r3,0x0008			set if that is not an error
001ae02c: 10400021 beq r2,r0,0x001ae0b4
001ae030: 00031080 sll r2,r3,0x02
001ae034: 3c01801a lui r1,0x801a
001ae038: 00220821 addu r1,r1,r2
001ae03c: 8c220e60 lw r2,0x0e60(r1)			evade related return addresses? 0x801a0e60
								801a0e60: 801ae04c -
								801a0e64: 801ae04c Critical hit (reflect/hit)
								801a0e68: 801ae0b4 -
								801a0e6c: 801ae04c guarded w/ equipment or arrow guard
								801a0e70: 801ae04c nullified/caught/blade grasped
								801a0e74: 801ae08c golem
								801a0e78: 801ae06c equipment broken
								801a0e7c: 801ae06c - 
001ae040: 00000000 nop
001ae044: 00400008 jr r2
001ae048: 00000000 nop
Critical hit reflect/hit, guarded /w equipment, arrow guard, nullified/caught/blade grasped
001ae04c: 312200ff andi r2,r9,0x00ff			effect target ID
001ae050: 00021880 sll r3,r2,0x02
001ae054: 00621821 addu r3,r3,r2
001ae058: 00031880 sll r3,r3,0x02
001ae05c: 00621821 addu r3,r3,r2
001ae060: 00031880 sll r3,r3,0x02			ETID * 0x54
001ae064: 0806b82a j 0x001ae0a8
001ae068: 34020007 ori r2,r0,0x0007			r2 = 0x7 (hit glow)
Reflect/hit
001ae06c: 312200ff andi r2,r9,0x00ff
001ae070: 00021880 sll r3,r2,0x02
001ae074: 00621821 addu r3,r3,r2
001ae078: 00031880 sll r3,r3,0x02
001ae07c: 00621821 addu r3,r3,r2
001ae080: 00031880 sll r3,r3,0x02			ETID * 0x54
001ae084: 0806b82a j 0x001ae0a8
001ae088: 34020012 ori r2,r0,0x0012			r2 = 0x12 (break particles)
Golem
001ae08c: 312200ff andi r2,r9,0x00ff
001ae090: 00021880 sll r3,r2,0x02
001ae094: 00621821 addu r3,r3,r2
001ae098: 00031880 sll r3,r3,0x02
001ae09c: 00621821 addu r3,r3,r2
001ae0a0: 00031880 sll r3,r3,0x02			ETID * 0x54
001ae0a4: 34020014 ori r2,r0,0x0014			r2 = 0x14 (golem block)
All:
001ae0a8: 3c01801c lui r1,0x801c
001ae0ac: 00230821 addu r1,r1,r3
001ae0b0: a4228ba0 sh r2,-0x7460(r1)			store secondary effect to ETID data
001ae0b4: 312300ff andi r3,r9,0x00ff
001ae0b8: 00031080 sll r2,r3,0x02
001ae0bc: 00431021 addu r2,r2,r3
001ae0c0: 00021080 sll r2,r2,0x02
001ae0c4: 00431021 addu r2,r2,r3
001ae0c8: 00021080 sll r2,r2,0x02			ETID * 0x54
001ae0cc: 3c01801c lui r1,0x801c
001ae0d0: 00220821 addu r1,r1,r2
001ae0d4: 94238ba0 lhu r3,-0x7460(r1)			load additional effect instead of just moving it from one register to another
001ae0d8: 3c01801c lui r1,0x801c
001ae0dc: 00220821 addu r1,r1,r2
001ae0e0: a4318ba2 sh r17,-0x745e(r1)			store element
001ae0e4: 00031880 sll r3,r3,0x02			animation effect * 4?
001ae0e8: 3c01801c lui r1,0x801c
001ae0ec: 00230821 addu r1,r1,r3
001ae0f0: 902384dc lbu r3,-0x7b24(r1)			load effect's function byte
001ae0f4: 3c01801c lui r1,0x801c
001ae0f8: 00220821 addu r1,r1,r2
001ae0fc: a0238b9f sb r3,-0x7461(r1)			store function byte in ETID data
001ae100: 3c03801c lui r3,0x801c
001ae104: 24638bac addiu r3,r3,0x8bac			0x801b8b9c + 0x10
001ae108: 00432021 addu r4,r2,r3			+ ETID * 0x54
001ae10c: 8a0500a7 lwl r5,0x00a7(r16)
001ae110: 9a0500a4 lwr r5,0x00a4(r16)			includes unit misc. ID
001ae114: 8a0600ab lwl r6,0x00ab(r16)
001ae118: 9a0600a8 lwr r6,0x00a8(r16)			-
001ae11c: 860700ac lh r7,0x00ac(r16)			gotta be a reason this is specified as a halfword. blank as far as I know though.
001ae120: a8850003 swl r5,0x0003(r4)
001ae124: b8850000 swr r5,0x0000(r4)			includes unit misc ID
001ae128: a8860007 swl r6,0x0007(r4)
001ae12c: b8860004 swr r6,0x0004(r4)
001ae130: a4870008 sh r7,0x0008(r4)			
001ae134: 2463000a addiu r3,r3,0x000a			0x801b8b9c + 0x1a
001ae138: 00431821 addu r3,r2,r3			+ ? * 0x54
001ae13c: 8a040007 lwl r4,0x0007(r16)			if attack has valid target/hit count if no targets are hit.  or evade type if they are.
001ae140: 9a040004 lwr r4,0x0004(r16)			and X coord of target if no targets are hit
001ae144: 8a05000b lwl r5,0x000b(r16)			Y coord of target if no targets are hit
001ae148: 9a050008 lwr r5,0x0008(r16)			Map level of target if no targets are hit (lwl and lwr were the worst things to happen to a compiler.)
001ae14c: 8606000c lh r6,0x000c(r16)			... :)?
001ae150: a8640003 swl r4,0x0003(r3)
001ae154: b8640000 swr r4,0x0000(r3)
001ae158: a8650007 swl r5,0x0007(r3)
001ae15c: b8650004 swr r5,0x0004(r3)			
001ae160: a4660008 sh r6,0x0008(r3)
001ae164: 34030001 ori r3,r0,0x0001			r3 = 1
001ae168: 3c01801c lui r1,0x801c
001ae16c: 00220821 addu r1,r1,r2
001ae170: a4208ba8 sh r0,-0x7458(r1)			0x801b8ba8 + ? * 0x54 = 0
001ae174: 3c01801c lui r1,0x801c
001ae178: 00220821 addu r1,r1,r2
001ae17c: ac238ba4 sw r3,-0x745c(r1)			initialised?
001ae180: 0806b864 j 0x001ae190
001ae184: 312200ff andi r2,r9,0x00ff			return target effect ID?
001ae188: 00004821 addu r9,r0,r0			return no Target effect ID?
001ae18c: 312200ff andi r2,r9,0x00ff
001ae190: 8fbf0018 lw r31,0x0018(r29)
001ae194: 8fb10014 lw r17,0x0014(r29)
001ae198: 8fb00010 lw r16,0x0010(r29)
001ae19c: 27bd0020 addiu r29,r29,0x0020
001ae1a0: 03e00008 jr r31
001ae1a4: 00000000 nop