Throw

From Final Fantasy Hacktics Wiki
Revision as of 15:43, 16 March 2014 by Choto (talk | contribs) (Created page with " 00181cb8: 27bdffe8 addiu r29,r29,0xffe8 00181cbc: afbf0010 sw r31,0x0010(r29) 00181cc0: 0c060737 jal 0x 00181cdc 00181cc4: 30a500ff andi r5,r5,0x00ff 00181cc8: 304200ff a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
00181cb8: 27bdffe8 addiu r29,r29,0xffe8
00181cbc: afbf0010 sw r31,0x0010(r29)
00181cc0: 0c060737 jal 0x 00181cdc
00181cc4: 30a500ff andi r5,r5,0x00ff
00181cc8: 304200ff andi r2,r2,0x00ff
00181ccc: 8fbf0010 lw r31,0x0010(r29)
00181cd0: 27bd0018 addiu r29,r29,0x0018
00181cd4: 03e00008 jr r31
00181cd8: 00000000 nop

Throw

00181cdc: 27bdff10 addiu r29,r29,0xff10
00181ce0: afb100cc sw r17,0x00cc(r29)
00181ce4: 00808821 addu r17,r4,r0			unit ID
00181ce8: afb400d8 sw r20,0x00d8(r29)
00181cec: 00c0a021 addu r20,r6,r0			stack address
00181cf0: afb500dc sw r21,0x00dc(r29)
00181cf4: 0000a821 addu r21,r0,r0
00181cf8: afb000c8 sw r16,0x00c8(r29)
00181cfc: 00a08021 addu r16,r5,r0			Skillset
00181d00: afbf00e8 sw r31,0x00e8(r29)
00181d04: afb700e4 sw r23,0x00e4(r29)
00181d08: afb600e0 sw r22,0x00e0(r29)
00181d0c: afb300d4 sw r19,0x00d4(r29)
00181d10: 0c060435 jal 0x 001810d4			get unit data
00181d14: afb200d0 sw r18,0x00d0(r29)
00181d18: 0040b021 addu r22,r2,r0
00181d1c: 16c00003 bne r22,r0,0x 00181d2c	branch if found
00181d20: 320300ff andi r3,r16,0x00ff		r3 = skillset
00181d24: 080607b0 j 0x 00181ec0
00181d28: 00001021 addu r2,r0,r0
00181d2c: 34020014 ori r2,r0,0x0014
00181d30: 14620010 bne r3,r2,0x 00181d74		branch if not throw
00181d34: 340200ff ori r2,r0,0x00ff
00181d38: 02202021 addu r4,r17,r0			r4 = unit ID
00181d3c: 34050014 ori r5,r0,0x0014
00181d40: 27a60020 addiu r6,r29,0x0020
00181d44: 27a20078 addiu r2,r29,0x0078
00181d48: afa20010 sw r2,0x0010(r29)
00181d4c: 27a20090 addiu r2,r29,0x0090
00181d50: afa20018 sw r2,0x0018(r29)
00181d54: 27a200a8 addiu r2,r29,0x00a8
00181d58: 27a70060 addiu r7,r29,0x0060
00181d5c: afa00014 sw r0,0x0014(r29)
00181d60: 0c0605f0 jal 0x 001817c0				get ability data for skillset display
00181d64: afa2001c sw r2,0x001c(r29)			
00181d68: 00409021 addu r18,r2,r0				number of abilities
00181d6c: 16400004 bne r18,r0,0x 00181d80		branch if any abilities are known
00181d70: 340200ff ori r2,r0,0x00ff
00181d74: a2820000 sb r2,0x0000(r20)			store no known abilities
00181d78: 080607b0 j 0x 00181ec0				
00181d7c: 00001021 addu r2,r0,r0				return r2 = 0
00181d80: 02b2102a slt r2,r21,r18				set if ??
00181d84: 10400018 beq r2,r0,0x 00181de8
00181d88: 00008821 addu r17,r0,r0
00181d8c: 3407fe82 ori r7,r0,0xfe82
00181d90: 3c068006 lui r6,0x8006
00181d94: 24c61020 addiu r6,r6,0x1020			throw ability bytes
00181d98: 27a50048 addiu r5,r29,0x0048			r5 = item type thrown list
00181d9c: 27a40020 addiu r4,r29,0x0020			r4 = ability list
00181da0: 94830000 lhu r3,0x0000(r4)			load ability ID?
00181da4: 00000000 nop
00181da8: 00671021 addu r2,r3,r7
00181dac: 3042ffff andi r2,r2,0xffff
00181db0: 2c42000c sltiu r2,r2,0x000c
00181db4: 10400008 beq r2,r0,0x 00181dd8			branch if not throw ability?
00181db8: 24840002 addiu r4,r4,0x0002			ability list++
00181dbc: 2462fe82 addiu r2,r3,0xfe82			
00181dc0: 00021400 sll r2,r2,0x10
00181dc4: 00021403 sra r2,r2,0x10
00181dc8: 00461021 addu r2,r2,r6
00181dcc: 90420000 lbu r2,0x0000(r2)			load item type thrown?
00181dd0: 00000000 nop
00181dd4: a0a20000 sb r2,0x0000(r5)				store item type
00181dd8: 26310001 addiu r17,r17,0x0001			counter++
00181ddc: 0232102a slt r2,r17,r18				set if less than number of known abilities
00181de0: 1440ffef bne r2,r0,0x 00181da0			branch if so
00181de4: 24a50001 addiu r5,r5,0x0001			item type list++
00181de8: 00008821 addu r17,r0,r0
00181dec: 27b70048 addiu r23,r29,0x0048			r23 = item type thrown list
00181df0: 00009821 addu r19,r0,r0
00181df4: 3c028006 lui r2,0x8006
00181df8: 24422eb8 addiu r2,r2,0x2eb8			item data
00181dfc: 02623021 addu r6,r19,r2
00181e00: 90c20005 lbu r2,0x0005(r6)			load item type
00181e04: 1a40000e blez r18,0x 00181e40			branch if no known abilities
00181e08: 00002021 addu r4,r0,r0
00181e0c: 304700ff andi r7,r2,0x00ff			r7 = item type
00181e10: 02e01821 addu r3,r23,r0				r3 = item type thrown list
00181e14: 02432821 addu r5,r18,r3				r5 = end of item type thrown list
00181e18: 90620000 lbu r2,0x0000(r3)			load item type
00181e1c: 00000000 nop
00181e20: 14e20003 bne r7,r2,0x 00181e30			branch if not equal
00181e24: 00000000 nop
00181e28: 08060790 j 0x 00181e40					branch if found
00181e2c: 34040001 ori r4,r0,0x0001
00181e30: 24630001 addiu r3,r3,0x0001			list++
00181e34: 0065102a slt r2,r3,r5					set if not end of list
00181e38: 1440fff7 bne r2,r0,0x 00181e18			loop if so
00181e3c: 00000000 nop
00181e40: 10800019 beq r4,r0,0x 00181ea8			branch if not found
00181e44: 2673000c addiu r19,r19,0x000c			item data address++
00181e48: 90c20003 lbu r2,0x0003(r6)			load type flags
00181e4c: 00000000 nop
00181e50: 30420080 andi r2,r2,0x0080
00181e54: 10400014 beq r2,r0,0x 00181ea8			branch if not weapon
00181e58: 00000000 nop
00181e5c: 90c20004 lbu r2,0x0004(r6)			load second table ID
00181e60: 00000000 nop
00181e64: 000210c0 sll r2,r2,0x03
00181e68: 3c018006 lui r1,0x8006
00181e6c: 00220821 addu r1,r1,r2
00181e70: 90223ab9 lbu r2,0x3ab9(r1)			load weapon attack flags
00181e74: 00000000 nop
00181e78: 30420002 andi r2,r2,0x0002
00181e7c: 1040000a beq r2,r0,0x 00181ea8			branch if not throwable
00181e80: 02c02021 addu r4,r22,r0				r4 = unit data
00181e84: 02208021 addu r16,r17,r0							
00181e88: 320500ff andi r5,r16,0x00ff			r5 = item considered for quantity
00181e8c: 0c05f255 jal 0x0017c954				player item quantity decrement
00181e90: 00003021 addu r6,r0,r0				r6 = PV control
00181e94: 14400004 bne r2,r0,0x 00181ea8			branch if no items
00181e98: 00000000 nop
00181e9c: a2900000 sb r16,0x0000(r20)			store throwable item type
00181ea0: 26940001 addiu r20,r20,0x0001			throwable item type list++
00181ea4: 26b50001 addiu r21,r21,0x0001			number of throwable items++
00181ea8: 26310001 addiu r17,r17,0x0001			r17 = item counter?
00181eac: 2a220100 slti r2,r17,0x0100
00181eb0: 1440ffd0 bne r2,r0,0x 00181df4	
00181eb4: 340200ff ori r2,r0,0x00ff
00181eb8: a2820000 sb r2,0x0000(r20)			store end of list
00181ebc: 26a20100 addiu r2,r21,0x0100			number+ 0x100
00181ec0: 8fbf00e8 lw r31,0x00e8(r29)
00181ec4: 8fb700e4 lw r23,0x00e4(r29)
00181ec8: 8fb600e0 lw r22,0x00e0(r29)
00181ecc: 8fb500dc lw r21,0x00dc(r29)
00181ed0: 8fb400d8 lw r20,0x00d8(r29)
00181ed4: 8fb300d4 lw r19,0x00d4(r29)
00181ed8: 8fb200d0 lw r18,0x00d0(r29)
00181edc: 8fb100cc lw r17,0x00cc(r29)
00181ee0: 8fb000c8 lw r16,0x00c8(r29)
00181ee4: 27bd00f0 addiu r29,r29,0x00f0
00181ee8: 03e00008 jr r31
00181eec: 00000000 nop