Difference between revisions of "Item Inventory Ability Display"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "item inventory? 00181b70: 27bdffe8 addiu r29,r29,0xffe8 00181b74: afbf0010 sw r31,0x0010(r29) 00181b78: 0c0606e5 jal 0x 00181b94 00181b7c: 30a500ff andi r5,r5,0x00ff 0018...")
 
m
 
Line 1: Line 1:
 
item inventory?
 
item inventory?
  00181b70: 27bdffe8 addiu r29,r29,0xffe8
+
  00181b70: 27bdffe8 addiu r29,r29,0xffe8       DUPLICATED [[Item_Ability_Loading]]
 
  00181b74: afbf0010 sw r31,0x0010(r29)
 
  00181b74: afbf0010 sw r31,0x0010(r29)
 
  00181b78: 0c0606e5 jal 0x 00181b94
 
  00181b78: 0c0606e5 jal 0x 00181b94

Latest revision as of 12:13, 1 August 2023

item inventory?

00181b70: 27bdffe8 addiu r29,r29,0xffe8       DUPLICATED Item_Ability_Loading
00181b74: afbf0010 sw r31,0x0010(r29)
00181b78: 0c0606e5 jal 0x 00181b94
00181b7c: 30a500ff andi r5,r5,0x00ff
00181b80: 304200ff andi r2,r2,0x00ff		r2 = number of items found
00181b84: 8fbf0010 lw r31,0x0010(r29)
00181b88: 27bd0018 addiu r29,r29,0x0018
00181b8c: 03e00008 jr r31
00181b90: 00000000 nop

Item Inventory

00181b94: 27bdff40 addiu r29,r29,0xff40
00181b98: afb200b0 sw r18,0x00b0(r29)
00181b9c: 00809021 addu r18,r4,r0			r4 = active unit ID
00181ba0: afb000a8 sw r16,0x00a8(r29)
00181ba4: 00c08021 addu r16,r6,r0			1ec address - items list
00181ba8: afb300b4 sw r19,0x00b4(r29)
00181bac: 00009821 addu r19,r0,r0
00181bb0: afb100ac sw r17,0x00ac(r29)
00181bb4: afbf00b8 sw r31,0x00b8(r29)
00181bb8: 0c060435 jal 0x 001810d4			get unit data
00181bbc: 00a08821 addu r17,r5,r0			r5 = skillset
00181bc0: 14400003 bne r2,r0,0x 00181bd0		branch if unit found
00181bc4: 322300ff andi r3,r17,0x00ff
00181bc8: 08060726 j 0x 00181c98
00181bcc: 00001021 addu r2,r0,r0
00181bd0: 34020006 ori r2,r0,0x0006
00181bd4: 14620010 bne r3,r2,0x 00181c18			branch if not item skillset
00181bd8: 340200ff ori r2,r0,0x00ff
00181bdc: 02402021 addu r4,r18,r0				r4 = unit data
00181be0: 27a20060 addiu r2,r29,0x0060
00181be4: afa20010 sw r2,0x0010(r29)
00181be8: 27a20078 addiu r2,r29,0x0078
00181bec: afa20018 sw r2,0x0018(r29)
00181bf0: 27a20090 addiu r2,r29,0x0090
00181bf4: 34050006 ori r5,r0,0x0006
00181bf8: 27a60020 addiu r6,r29,0x0020
00181bfc: 27a70048 addiu r7,r29,0x0048
00181c00: afa00014 sw r0,0x0014(r29)
00181c04: 0c0605f0 jal 0x 001817c0				Load Skillset abilities?
00181c08: afa2001c sw r2,0x001c(r29)
00181c0c: 00403021 addu r6,r2,r0
00181c10: 14c00004 bne r6,r0,0x 00181c24			branch if abilities found
00181c14: 340200ff ori r2,r0,0x00ff
00181c18: a2020000 sb r2,0x0000(r16)			store none in list
00181c1c: 08060726 j 0x 00181c98
00181c20: 00001021 addu r2,r0,r0				return 0

<Store Item ID based on Ability ID>

00181c24: 0266102a slt r2,r19,r6
00181c28: 10400018 beq r2,r0,0x 00181c8c
00181c2c: 00002821 addu r5,r0,r0
00181c30: 3408fe90 ori r8,r0,0xfe90				-170
00181c34: 3c078006 lui r7,0x8006
00181c38: 24e71010 addiu r7,r7,0x1010			Item abilities pointer
00181c3c: 27a40020 addiu r4,r29,0x0020

<Loop> Store item ID

00181c40: 94830000 lhu r3,0x0000(r4)			load item used ID
00181c44: 00000000 nop
00181c48: 00681021 addu r2,r3,r8				used item ID - 170?
00181c4c: 3042ffff andi r2,r2,0xffff
00181c50: 2c42000e sltiu r2,r2,0x000e
00181c54: 10400009 beq r2,r0,0x 00181c7c
00181c58: 24840002 addiu r4,r4,0x0002
00181c5c: 2462fe90 addiu r2,r3,0xfe90			used item - 170
00181c60: 00021400 sll r2,r2,0x10
00181c64: 00021403 sra r2,r2,0x10
00181c68: 00471021 addu r2,r2,r7
00181c6c: 90420000 lbu r2,0x0000(r2)			load used item ID
00181c70: 26730001 addiu r19,r19,0x0001
00181c74: a2020000 sb r2,0x0000(r16)			store used item ID
00181c78: 26100001 addiu r16,r16,0x0001
00181c7c: 24a50001 addiu r5,r5,0x0001
00181c80: 00a6102a slt r2,r5,r6
00181c84: 1440ffee bne r2,r0,0x 00181c40
00181c88: 00000000 nop
00181c8c: 340200ff ori r2,r0,0x00ff
00181c90: a2020000 sb r2,0x0000(r16)			store end of items
00181c94: 26620100 addiu r2,r19,0x0100			r2 = number of items + 0x0100
00181c98: 8fbf00b8 lw r31,0x00b8(r29)
00181c9c: 8fb300b4 lw r19,0x00b4(r29)
00181ca0: 8fb200b0 lw r18,0x00b0(r29)
00181ca4: 8fb100ac lw r17,0x00ac(r29)
00181ca8: 8fb000a8 lw r16,0x00a8(r29)
00181cac: 27bd00c0 addiu r29,r29,0x00c0
00181cb0: 03e00008 jr r31
00181cb4: 00000000 nop