Some Knockback Handling

From Final Fantasy Hacktics Wiki
(Redirected from 0006cc94 - 0006d05c)
Jump to navigation Jump to search

Some Knockback Handling 0x6cc94: 0006cc94 - 0006d05c

	0006c2bc: 0006c2bc - 0006c31c
	0006af7c: 0006af7c - 0006b95c
	0006be8c: 0006be8c - 0006c020
	0006cbb8: 0006cbb8 - 0006cc90
	0006c94c: 0006c94c - 0006ca38
	0017c158: Calculate Height Data
	0007cff8: 0007cff8 - 0007d09c
	0007a25c: Get Misc Data of unit that matches register inputs
	0017c158: Calculate Height Data
	0007cff8: 0007cff8 - 0007d09c
	000692bc: Set Animation/Facing for Mounted Units
	0006a20c: 0006a20c - 0006a37c
	0006a380: 0006a380 - 0006a534
	00069254: Set some data for Mounted Units
	0006aa80: 0006aa80 - 0006ad14
	0006a7c0: 0006a7c0 - 0006aa7c
	0006a538: 0006a538 - 0006a7bc

0006cc94: 27bdffe0 addiu r29,r29,0xffe0			
0006cc98: afb00010 sw r16,0x0010(r29)			Store 0x0 onto Stack
0006cc9c: 00808021 addu r16,r4,r0
0006cca0: afbf0018 sw r31,0x0018(r29)			Store 0x0 onto Stack
0006cca4: 0c01b0af jal 0x0006c2bc			0006c2bc - 0006c31c
0006cca8: afb10014 sw r17,0x0014(r29)			Store 0x0 onto Stack
0006ccac: 02002021 addu r4,r16,r0
0006ccb0: 0c01abdf jal 0x0006af7c			0006af7c - 0006b95c
0006ccb4: 00408821 addu r17,r2,r0
0006ccb8: 3c038009 lui r3,0x8009			
0006ccbc: 8c6360e4 lw r3,0x60e4(r3)			Load Main battle control variable
0006ccc0: 34020034 ori r2,r0,0x0034			r2 = (0x34) 52
0006ccc4: 10620003 beq r3,r2,0x0006ccd4			Branch if Main battle control variable == 34 (52)
0006ccc8: 02002021 addu r4,r16,r0
0006cccc: 0c01afa3 jal 0x0006be8c			0006be8c - 0006c020
0006ccd0: 02202821 addu r5,r17,r0
0006ccd4: 02202021 addu r4,r17,r0
0006ccd8: 0c01b2ee jal 0x0006cbb8			0006cbb8 - 0006cc90
0006ccdc: 02002821 addu r5,r16,r0
0006cce0: 104000d9 beq r2,r0,0x0006d048			Branch if 34 (52) == 0x0
0006cce4: 02202021 addu r4,r17,r0

0006cce8: 0c01b253 jal 0x0006c94c			0006c94c - 0006ca38
0006ccec: 02002821 addu r5,r16,r0
0006ccf0: 3c028009 lui r2,0x8009			
0006ccf4: 9042621c lbu r2,0x621c(r2)			???
0006ccf8: 00000000 nop
0006ccfc: 30420003 andi r2,r2,0x0003			Unit misc ID when selected by cursor & 0x3
0006cd00: 144000c9 bne r2,r0,0x0006d028			Branch if ??? & 0x3 != 0x0
0006cd04: 02002021 addu r4,r16,r0

0006cd08: 9205011e lbu r5,0x011e(r16)			Load ???
0006cd0c: 00000000 nop
0006cd10: 10a00021 beq r5,r0,0x0006cd98			Branch if  == 0x0
0006cd14: 00000000 nop

0006cd18: 3c048009 lui r4,0x8009			
0006cd1c: 24846238 addiu r4,r4,0x6238			Exception
0006cd20: 0c05f056 jal 0x0017c158			Calculate Height Data
0006cd24: 24a5ffff addiu r5,r5,0xffff

0006cd28: 3c028009 lui r2,0x8009			
0006cd2c: 9042623b lbu r2,0x623b(r2)			Load ???
0006cd30: 00000000 nop
0006cd34: 30420080 andi r2,r2,0x0080			 & 0x80
0006cd38: 10400011 beq r2,r0,0x0006cd80			Branch if  & 0x80 == 0x0
0006cd3c: 00000000 nop

0006cd40: 3c048009 lui r4,0x8009			
0006cd44: 8c846220 lw r4,0x6220(r4)			Load Target/Attacker Tile pointer
0006cd48: 00000000 nop
0006cd4c: 90820003 lbu r2,0x0003(r4)			load height
0006cd50: 92030097 lbu r3,0x0097(r16)			Load Main battle control variable
0006cd54: 3042001f andi r2,r2,0x001f			 height halves
0006cd58: 00430018 mult r2,r3				height halves*??
0006cd5c: 90820002 lbu r2,0x0002(r4)			load height whole numbers
0006cd60: 00000000 nop
0006cd64: 00021040 sll r2,r2,0x01			Shift left 1 bits (*0x2) (*2)
0006cd68: 00001812 mflo r3				0x0
0006cd6c: 00431021 addu r2,r2,r3
0006cd70: 3c018009 lui r1,0x8009			
0006cd74: a0226230 sb r2,0x6230(r1)			store total height
0006cd78: 0801b37c j 0x0006cdf0			
0006cd7c: 00000000 nop

0006cd80: 3c028009 lui r2,0x8009			
0006cd84: 9042623e lbu r2,0x623e(r2)			Load ???
0006cd88: 3c018009 lui r1,0x8009			
0006cd8c: a0226230 sb r2,0x6230(r1)			store height?
0006cd90: 0801b37c j 0x0006cdf0			
0006cd94: 00000000 nop

0006cd98: 3c058009 lui r5,0x8009			
0006cd9c: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006cda0: 00000000 nop
0006cda4: 90a20003 lbu r2,0x0003(r5)			load height
0006cda8: 92030097 lbu r3,0x0097(r16)			load ??
0006cdac: 3042001f andi r2,r2,0x001f			 
0006cdb0: 00430018 mult r2,r3				get halves
0006cdb4: 90a20002 lbu r2,0x0002(r5)			Load Target/Attacker Tile pointer
0006cdb8: 00000000 nop
0006cdbc: 00021040 sll r2,r2,0x01			Shift left 1 bits (*0x2) (*2)
0006cdc0: 00001812 mflo r3				0x0
0006cdc4: 00431021 addu r2,r2,r3			r2 = height
0006cdc8: 3c018009 lui r1,0x8009			
0006cdcc: a0226230 sb r2,0x6230(r1)			Store height
0006cdd0: 0c01f3fe jal 0x0007cff8			0007cff8 - 0007d09c
0006cdd4: 02002021 addu r4,r16,r0
0006cdd8: 3c038009 lui r3,0x8009			
0006cddc: 90636230 lbu r3,0x6230(r3)			Load ???
0006cde0: 00000000 nop
0006cde4: 00621821 addu r3,r3,r2
0006cde8: 3c018009 lui r1,0x8009			
0006cdec: a0236230 sb r3,0x6230(r1)			Store 0x0 +  +  into 0x80096230
0006cdf0: 3c028009 lui r2,0x8009			
0006cdf4: 9042621c lbu r2,0x621c(r2)			load ??
0006cdf8: 00000000 nop
0006cdfc: 30420010 andi r2,r2,0x0010			
0006ce00: 10400033 beq r2,r0,0x0006ced0			Branch if not 0x10 
0006ce04: 00000000 nop

0006ce08: 92040080 lbu r4,0x0080(r16)			load X coordinate
0006ce0c: 92050081 lbu r5,0x0081(r16)			load Y coordinate
0006ce10: 92060082 lbu r6,0x0082(r16)			load map level
0006ce14: 0c01e897 jal 0x0007a25c			Get Misc Data of unit that matches register inputs
0006ce18: 00000000 nop
0006ce1c: 8c430134 lw r3,0x0134(r2)			Load unit data
0006ce20: 3c018009 lui r1,0x8009			
0006ce24: ac226234 sw r2,0x6234(r1)			store unit misc data?
0006ce28: 9062018a lbu r2,0x018a(r3)			load unit id w/ exists check?
0006ce2c: 00000000 nop
0006ce30: 24420001 addiu r2,r2,0x0001
0006ce34: a202011e sb r2,0x011e(r16)			store unit id w/ exists check into 0x11e
0006ce38: 3c028009 lui r2,0x8009			
0006ce3c: 8c426234 lw r2,0x6234(r2)			load unit misc ID
0006ce40: 00000000 nop
0006ce44: 8c420134 lw r2,0x0134(r2)			load unit data
0006ce48: 00000000 nop
0006ce4c: 9045018a lbu r5,0x018a(r2)			Load ID and exists check
0006ce50: 3c048009 lui r4,0x8009			
0006ce54: 24846238 addiu r4,r4,0x6238			80096238
0006ce58: 0c05f056 jal 0x0017c158			Calculate Height Data
0006ce5c: 00000000 nop
0006ce60: 3c028009 lui r2,0x8009			
0006ce64: 9042623b lbu r2,0x623b(r2)			Load ???
0006ce68: 00000000 nop
0006ce6c: 30420080 andi r2,r2,0x0080			 & 0x80
0006ce70: 10400011 beq r2,r0,0x0006ceb8			Branch if  & 0x80 == 0x0
0006ce74: 00000000 nop
0006ce78: 3c048009 lui r4,0x8009			
0006ce7c: 8c846224 lw r4,0x6224(r4)			Load Target/Attacker Tile Pointer
0006ce80: 00000000 nop
0006ce84: 90820003 lbu r2,0x0003(r4)			Load Target/Attacker Tile Pointer
0006ce88: 92030096 lbu r3,0x0096(r16)			Load ???
0006ce8c: 3042001f andi r2,r2,0x001f			 & 0x1F
0006ce90: 00430018 mult r2,r3				 & 0x1F * 
0006ce94: 90820002 lbu r2,0x0002(r4)			Load Target/Attacker Tile Pointer
0006ce98: 00000000 nop
0006ce9c: 00021040 sll r2,r2,0x01			Shift left 1 bits (*0x2) (*2)
0006cea0: 00001812 mflo r3				0x0
0006cea4: 00431021 addu r2,r2,r3
0006cea8: 3c018009 lui r1,0x8009			r2 = height
0006ceac: a022622c sb r2,0x622c(r1)			store total height
0006ceb0: 0801b3cb j 0x0006cf2c			
0006ceb4: 00000000 nop

0006ceb8: 3c028009 lui r2,0x8009			
0006cebc: 9042623e lbu r2,0x623e(r2)			Load ???
0006cec0: 3c018009 lui r1,0x8009			
0006cec4: a022622c sb r2,0x622c(r1)			Store  into 0x8009622C
0006cec8: 0801b3cb j 0x0006cf2c			
0006cecc: 00000000 nop

0006ced0: a200011e sb r0,0x011e(r16)			Store 0x0 into 0x11E
0006ced4: 3c058009 lui r5,0x8009			
0006ced8: 8ca56224 lw r5,0x6224(r5)			Load Target/Attacker Tile Pointer
0006cedc: 00000000 nop
0006cee0: 90a20003 lbu r2,0x0003(r5)			Load Target/Attacker Tile Pointer
0006cee4: 92030096 lbu r3,0x0096(r16)			Load ???
0006cee8: 3042001f andi r2,r2,0x001f			 & 0x1F
0006ceec: 00430018 mult r2,r3				 & 0x1F * 
0006cef0: 90a20002 lbu r2,0x0002(r5)			Load Target/Attacker Tile Pointer
0006cef4: 00000000 nop
0006cef8: 00021040 sll r2,r2,0x01			Shift left 1 bits (*0x2) (*2)
0006cefc: 00001812 mflo r3				0x0
0006cf00: 00431021 addu r2,r2,r3
0006cf04: 3c018009 lui r1,0x8009			
0006cf08: a022622c sb r2,0x622c(r1)			Store 0x0 +  into 0x8009622C
0006cf0c: 0c01f3fe jal 0x0007cff8			0007cff8 - 0007d09c
0006cf10: 02002021 addu r4,r16,r0
0006cf14: 3c038009 lui r3,0x8009			
0006cf18: 90636230 lbu r3,0x6230(r3)			load height
0006cf1c: 00000000 nop
0006cf20: 00621821 addu r3,r3,r2			add ??
0006cf24: 3c018009 lui r1,0x8009			
0006cf28: a0236230 sb r3,0x6230(r1)			store new height
0006cf2c: 3c038009 lui r3,0x8009			
0006cf30: 90636230 lbu r3,0x6230(r3)			load height
0006cf34: 3c048009 lui r4,0x8009			
0006cf38: 9084622c lbu r4,0x622c(r4)			load height
0006cf3c: 24620001 addiu r2,r3,0x0001			 height++
0006cf40: 0044102a slt r2,r2,r4				Set if height reached other height
0006cf44: 14400020 bne r2,r0,0x0006cfc8			Branch if so
0006cf48: 24620007 addiu r2,r3,0x0007			height + 0x07

0006cf4c: 0c01a4af jal 0x000692bc			Set Animation/Facing for Mounted Units
0006cf50: 02002021 addu r4,r16,r0
0006cf54: 3c028009 lui r2,0x8009			
0006cf58: 9042621c lbu r2,0x621c(r2)			Load ???
0006cf5c: 00000000 nop
0006cf60: 000210c2 srl r2,r2,0x03			Shift right 3 bits (/0x8) (/8)r2 = Unit misc ID when selected by cursor >> 3 * 0x3 (3)
0006cf64: 30430001 andi r3,r2,0x0001			Unit misc ID when selected by cursor >> 3 & 0x1
0006cf68: 10600005 beq r3,r0,0x0006cf80			Branch if Unit misc ID when selected by cursor >> 3 & 0x1 == 0x0
0006cf6c: 34020001 ori r2,r0,0x0001			r2 = (0x1) 1
0006cf70: 1062000c beq r3,r2,0x0006cfa4			Branch if Unit misc ID when selected by cursor >> 3 & 0x1 == 1 (1)
0006cf74: 00000000 nop
0006cf78: 0801b412 j 0x0006d048			
0006cf7c: 00000000 nop

0006cf80: 3c058009 lui r5,0x8009			
0006cf84: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006cf88: 3c068009 lui r6,0x8009			
0006cf8c: 8cc66224 lw r6,0x6224(r6)			Load Target/Attacker Tile Pointer
0006cf90: 0c01a883 jal 0x0006a20c			0006a20c - 0006a37c
0006cf94: 02002021 addu r4,r16,r0
0006cf98: 34020006 ori r2,r0,0x0006			r2 = (0x6) 6
0006cf9c: 0801b412 j 0x0006d048			
0006cfa0: a202007f sb r2,0x007f(r16)			save new control variable

0006cfa4: 3c058009 lui r5,0x8009			
0006cfa8: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006cfac: 3c068009 lui r6,0x8009			
0006cfb0: 8cc66224 lw r6,0x6224(r6)			Load Target/Attacker Tile Pointer
0006cfb4: 0c01a8e0 jal 0x0006a380			0006a380 - 0006a534
0006cfb8: 02002021 addu r4,r16,r0
0006cfbc: 3402000e ori r2,r0,0x000e			r2 = (0xE) 14
0006cfc0: 0801b412 j 0x0006d048			
0006cfc4: a202007f sb r2,0x007f(r16)			save new control variable

if 80096230 height reached 8009622c height
0006cfc8: 0044102a slt r2,r2,r4			Set if E (14) < 0x0
0006cfcc: 1440000d bne r2,r0,0x0006d004			Branch if so
0006cfd0: 02002021 addu r4,r16,r0
0006cfd4: 0c01a495 jal 0x00069254			Set some data for Mounted Units
0006cfd8: 02002021 addu r4,r16,r0
0006cfdc: 02002021 addu r4,r16,r0
0006cfe0: 3c058009 lui r5,0x8009			
0006cfe4: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006cfe8: 3c068009 lui r6,0x8009			
0006cfec: 8cc66224 lw r6,0x6224(r6)			Load Target/Attacker Tile Pointer
0006cff0: 34022000 ori r2,r0,0x2000			r2 = (0x2000) 8192
0006cff4: 0c01aaa0 jal 0x0006aa80			0006aa80 - 0006ad14
0006cff8: ae02003c sw r2,0x003c(r16)			Store 2000 (8192) into 0x3C
0006cffc: 0801b412 j 0x0006d048			
0006d000: a200011e sb r0,0x011e(r16)			Store 0x0 into 0x11E

0006d004: 3c058009 lui r5,0x8009			
0006d008: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006d00c: 3c068009 lui r6,0x8009			
0006d010: 8cc66224 lw r6,0x6224(r6)			Load Target/Attacker Tile Pointer
0006d014: 34022000 ori r2,r0,0x2000			r2 = (0x2000) 8192
0006d018: 0c01a9f0 jal 0x0006a7c0			0006a7c0 - 0006aa7c
0006d01c: ae02003c sw r2,0x003c(r16)			Store 2000 (8192) into 0x3C
0006d020: 0801b412 j 0x0006d048			
0006d024: a200011e sb r0,0x011e(r16)			Store 0x0 into 0x11E

0006d028: 3c058009 lui r5,0x8009			
0006d02c: 8ca56220 lw r5,0x6220(r5)			Load Target/Attacker Tile pointer
0006d030: 3c068009 lui r6,0x8009			
0006d034: 8cc66224 lw r6,0x6224(r6)			Load Target/Attacker Tile Pointer
0006d038: 34022000 ori r2,r0,0x2000			r2 = (0x2000) 8192
0006d03c: 0c01a94e jal 0x0006a538			0006a538 - 0006a7bc
0006d040: ae02003c sw r2,0x003c(r16)			Store 2000 (8192) into 0x3C
0006d044: a200011e sb r0,0x011e(r16)			Store 0x0 into 0x11E

0006d048: 8fbf0018 lw r31,0x0018(r29)			Load Stack + 0x18
0006d04c: 8fb10014 lw r17,0x0014(r29)			Load Stack + 0x14
0006d050: 8fb00010 lw r16,0x0010(r29)			Load Stack + 0x10
0006d054: 27bd0020 addiu r29,r29,0x0020			
0006d058: 03e00008 jr r31			Jump to Address
0006d05c: 00000000 nop