Difference between revisions of "Build Inventory Status List Polygons"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Talcall moved page Build Inventory Status List Polygons to Build Menu Icon Polygons: seems to be more general? moving pre-emptively.)
Tag: New redirect
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
#REDIRECT [[Build Menu Icon Polygons]]
+
<font face='Courier New'>
 +
 
 +
0011d8ac: 27bdff98 addiu r29,r29,0xff98
 +
0011d8b0: afb60058 sw r22,0x0058(r29)
 +
0011d8b4: 0000b021 addu r22,r0,r0 Status Counter = 0
 +
0011d8b8: 00042400 sll r4,r4,0x10
 +
0011d8bc: 00042403 sra r4,r4,0x10
 +
0011d8c0: 00041040 sll r2,r4,0x01 Item ID * 2
 +
0011d8c4: 00441021 addu r2,r2,r4 ID * 3
 +
0011d8c8: 00021080 sll r2,r2,0x02 ID * 12
 +
0011d8cc: afb20048 sw r18,0x0048(r29)
 +
0011d8d0: 00009021 addu r18,r0,r0 Counter = 0
 +
0011d8d4: afbf0064 sw r31,0x0064(r29)
 +
0011d8d8: afbe0060 sw r30,0x0060(r29)
 +
0011d8dc: afb7005c sw r23,0x005c(r29)
 +
0011d8e0: afb50054 sw r21,0x0054(r29)
 +
0011d8e4: afb40050 sw r20,0x0050(r29)
 +
0011d8e8: afb3004c sw r19,0x004c(r29)
 +
0011d8ec: afb10044 sw r17,0x0044(r29)
 +
0011d8f0: afb00040 sw r16,0x0040(r29)
 +
0011d8f4: 3c018006 lui r1,0x8006
 +
0011d8f8: 00220821 addu r1,r1,r2
 +
0011d8fc: 90342ebf lbu r20,0x2ebf(r1) Load Item's Item Attributes ID
 +
0011d900: 3c028006 lui r2,0x8006
 +
0011d904: 244242ce addiu r2,r2,0x42ce
 +
0011d908: 00142040 sll r4,r20,0x01 ID * 2
 +
0011d90c: 00942021 addu r4,r4,r20 ID * 3
 +
0011d910: 000420c0 sll r4,r4,0x03 ID * 24
 +
0011d914: 00942021 addu r4,r4,r20 ID * 25
 +
0011d918: 0c04ac6d jal 0x0012b1b4 Store Data Pointer
 +
0011d91c: 00822021 addu r4,r4,r2 r4 = Item's Status Immunities Data Pointer
 +
0011d920: 0c04ac7b jal 0x0012b1ec Check for Present Flags
 +
0011d924: 34040001 ori r4,r0,0x0001 Flag Counter = 1
 +
0011d928: 10400002 beq r2,r0,0x0011d934 Branch if Status isn't present
 +
0011d92c: 26520001 addiu r18,r18,0x0001 Counter ++
 +
0011d930: 26d60001 addiu r22,r22,0x0001 Status Counter ++
 +
0011d934: 2a420028 slti r2,r18,0x0028
 +
0011d938: 1440fff9 bne r2,r0,0x0011d920 Branch if Counter < 0x28
 +
0011d93c: 00148040 sll r16,r20,0x01 ID * 2
 +
0011d940: 02148021 addu r16,r16,r20 ID * 3
 +
0011d944: 001080c0 sll r16,r16,0x03 ID * 24
 +
0011d948: 02148021 addu r16,r16,r20 ID * 25
 +
0011d94c: 3c118006 lui r17,0x8006
 +
0011d950: 263142c9 addiu r17,r17,0x42c9
 +
0011d954: 0c04ac6d jal 0x0012b1b4 Store Data Pointer
 +
0011d958: 02112021 addu r4,r16,r17 r4 = Item's Innate Status Data Pointer
 +
0011d95c: 2631000a addiu r17,r17,0x000a
 +
0011d960: 0c04ac74 jal 0x0012b1d0 Store Data Pointer 2
 +
0011d964: 02112021 addu r4,r16,r17 r4 = Item's Starting Status Data Pointer
 +
0011d968: 00009021 addu r18,r0,r0 Counter = 0
 +
0011d96c: 0c04ac7b jal 0x0012b1ec Check for Present Flags
 +
0011d970: 34040001 ori r4,r0,0x0001 Flag Counter = 1
 +
0011d974: 00408821 addu r17,r2,r0 r17 = Present Flags
 +
0011d978: 0c04acd5 jal 0x0012b354 Check for Present Flags 2
 +
0011d97c: 34040001 ori r4,r0,0x0001 Flag Counter = 1
 +
0011d980: 02228825 or r17,r17,r2 Present Flags += new Present Flags
 +
0011d984: 12200002 beq r17,r0,0x0011d990 Branch if Flags aren't present
 +
0011d988: 26520001 addiu r18,r18,0x0001 Counter ++
 +
0011d98c: 26d60001 addiu r22,r22,0x0001 Status Counter ++
 +
0011d990: 2a420028 slti r2,r18,0x0028
 +
0011d994: 1440fff5 bne r2,r0,0x0011d96c Branch if Counter < 0x28
 +
0011d998: 00161400 sll r2,r22,0x10
 +
0011d99c: 00021403 sra r2,r2,0x10
 +
0011d9a0: 2842000d slti r2,r2,0x000d
 +
0011d9a4: 14400002 bne r2,r0,0x0011d9b0 Branch if Status Counter < 0xd
 +
0011d9a8: 341100c2 ori r17,r0,0x00c2 Status Y Draw Location = 0xc2
 +
0011d9ac: 3416000c ori r22,r0,0x000c Status Counter = 0xc
 +
0011d9b0: 3c03801d lui r3,0x801d
 +
0011d9b4: 90638518 lbu r3,-0x7ae8(r3) Load Item Type?
 +
0011d9b8: 34020003 ori r2,r0,0x0003
 +
0011d9bc: 14620002 bne r3,r2,0x0011d9c8 Branch if Item isn't an Accessory
 +
0011d9c0: 00168400 sll r16,r22,0x10
 +
0011d9c4: 341100da ori r17,r0,0x00da Status Y Draw Location = 0xda
 +
0011d9c8: 00108403 sra r16,r16,0x10
 +
0011d9cc: 001010c0 sll r2,r16,0x03 Status Counter * 8
 +
0011d9d0: 00501021 addu r2,r2,r16 Status Counter * 9
 +
0011d9d4: 02229823 subu r19,r17,r2 Status Y Draw Location - Status Counter * 9
 +
0011d9d8: 341e00d1 ori r30,r0,0x00d1 x draw location = 0xd1
 +
0011d9dc: 00002021 addu r4,r0,r0 r4 = 0
 +
0011d9e0: 00002821 addu r5,r0,r0 r5 = 0
 +
0011d9e4: 34060180 ori r6,r0,0x0180 r6 = 0x180
 +
0011d9e8: 0c008e63 jal 0x0002398c [[P00 GetTpage]] <-- returns tpage 6 (textbox text + window graphics)
 +
0011d9ec: 00003821 addu r7,r0,r0 r7 = 0
 +
0011d9f0: 0000a821 addu r21,r0,r0 r21 = 0
 +
0011d9f4: 00142040 sll r4,r20,0x01 ID * 2
 +
0011d9f8: 00942021 addu r4,r4,r20 ID * 3
 +
0011d9fc: 000420c0 sll r4,r4,0x03 ID * 24
 +
0011da00: 00942021 addu r4,r4,r20 ID * 25
 +
0011da04: 3c038006 lui r3,0x8006
 +
0011da08: 246342ce addiu r3,r3,0x42ce
 +
0011da0c: 3c088019 lui r8,0x8019
 +
0011da10: 9508df8a lhu r8,-0x2076(r8) Load TPAGE?
 +
0011da14: 00832021 addu r4,r4,r3 r4 = Item's Status Immunities Data Pointer
 +
0011da18: a7a20030 sh r2,0x0030(r29) Store tpage ID = 6
 +
0011da1c: 0c04ac6d jal 0x0012b1b4 Store Data Pointer
 +
0011da20: a7a80028 sh r8,0x0028(r29) Store second TPAGE we're working with today
 +
0011da24: 00009021 addu r18,r0,r0 Counter = 0
 +
0011da28: 34173fd9 ori r23,r0,0x3fd9 r23 = 0x3fd9
 +
0011da2c: afb00038 sw r16,0x0038(r29) Store Status Counter
 +
0011da30: 34100008 ori r16,r0,0x0008 r16 = 8
 +
0011da34: 00008821 addu r17,r0,r0 Status Mod = 0
 +
<loop> status immunity list
 +
0011da38: 8fa80038 lw r8,0x0038(r29) Load Status Counter
 +
0011da3c: 00000000 nop
 +
0011da40: 02a8102a slt r2,r21,r8
 +
0011da44: 10400033 beq r2,r0,0x0011db14 Branch if r21 >= Status Counter
 +
0011da48: 00000000 nop
 +
0011da4c: 0c04ac7b jal 0x0012b1ec Check for Present Flags
 +
0011da50: 34040001 ori r4,r0,0x0001 Flag Counter = 1
 +
0011da54: 1040002c beq r2,r0,0x0011db08 Branch if Flags aren't present
 +
0011da58: 26520001 addiu r18,r18,0x0001 Counter ++
 +
0011da5c: 27a40020 addiu r4,r29,0x0020 r4 = Stack Pointer + 0x20
 +
0011da60: 340500a9 ori r5,r0,0x00a9 u0 = 0xa9
 +
0011da64: 340600f5 ori r6,r0,0x00f5 v0 = 0xf5 (these, shouldn't correspond to anything yet. the building here probably has yet to be done.)
 +
0011da68: 27c2fff9 addiu r2,r30,0xfff9        list x draw location - 7
 +
0011da6c: a7a20020 sh r2,0x0020(r29) store rectangle.x0
 +
0011da70: 26620001 addiu r2,r19,0x0001        list y draw location + 1
 +
0011da74: a7a20022 sh r2,0x0022(r29) store rectangle.y0
 +
0011da78: 97a20030 lhu r2,0x0030(r29) Load TPAGE
 +
0011da7c: 00003821 addu r7,r0,r0 rgb tint pointer = NULL
 +
0011da80: a7b00024 sh r16,0x0024(r29) width = 8
 +
0011da84: a7b00026 sh r16,0x0026(r29) height = 8
 +
0011da88: afa00010 sw r0,0x0010(r29) Store not semi-transparent
 +
0011da8c: afb70018 sw r23,0x0018(r29) Store CLUT = 0x3fd9 (I would guess one of FRAME.BIN's colour palettes)
 +
0011da90: afb0001c sw r16,0x001c(r29) OTAG depth = 8
 +
0011da94: 0c04b1aa jal 0x0012c6a8              [[Build Menu Icon Polygons]] <-- builds blue inventory "immune status" icon
 +
0011da98: afa20014 sw r2,0x0014(r29) store TPAGE
 +
0011da9c: 27a40020 addiu r4,r29,0x0020 r4 = point to rectangle
 +
0011daa0: 02601021 addu r2,r19,r0
 +
0011daa4: a7be0020 sh r30,0x0020(r29)          x0
 +
0011daa8: a7a20022 sh r2,0x0022(r29)          y0
 +
0011daac: 3c018019 lui r1,0x8019
 +
0011dab0: 00310821 addu r1,r1,r17
 +
0011dab4: 9422cf6c lhu r2,-0x3094(r1)
 +
0011dab8: 97a80028 lhu r8,0x0028(r29)
 +
0011dabc: 00003821 addu r7,r0,r0
 +
0011dac0: a7a20024 sh r2,0x0024(r29)          width
 +
0011dac4: 3c018019 lui r1,0x8019
 +
0011dac8: 00310821 addu r1,r1,r17
 +
0011dacc: 9422cf6e lhu r2,-0x3092(r1)
 +
0011dad0: 26730009 addiu r19,r19,0x0009
 +
0011dad4: a7a20026 sh r2,0x0026(r29)          height
 +
0011dad8: 3c018019 lui r1,0x8019
 +
0011dadc: 00310821 addu r1,r1,r17
 +
0011dae0: 8425cf68 lh r5,-0x3098(r1)          upper left corner u0
 +
0011dae4: 3c018019 lui r1,0x8019
 +
0011dae8: 00310821 addu r1,r1,r17
 +
0011daec: 8426cf6a lh r6,-0x3096(r1)          upper left corner v0 (built somewhere else?)
 +
0011daf0: 26b50001 addiu r21,r21,0x0001
 +
0011daf4: afa00010 sw r0,0x0010(r29) Store not semi transparent
 +
0011daf8: afa80014 sw r8,0x0014(r29)          store TPAGE
 +
0011dafc: afb70018 sw r23,0x0018(r29)
 +
0011db00: 0c04b1aa jal 0x0012c6a8              [[Build Menu Icon Polygons]] <-- builds blue inventory "immune status" text
 +
0011db04: afb0001c sw r16,0x001c(r29)
 +
0011db08: 2a420028 slti r2,r18,0x0028
 +
0011db0c: 1440ffca bne r2,r0,0x0011da38 Branch if Counter < 0x28
 +
0011db10: 26310008 addiu r17,r17,0x0008 Status Mod += 8
 +
</loop>
 +
0011db14: 00148040 sll r16,r20,0x01
 +
0011db18: 02148021 addu r16,r16,r20
 +
0011db1c: 001080c0 sll r16,r16,0x03
 +
0011db20: 02148021 addu r16,r16,r20
 +
0011db24: 3c118006 lui r17,0x8006
 +
0011db28: 263142c9 addiu r17,r17,0x42c9
 +
0011db2c: 0c04ac6d jal 0x0012b1b4 Store Data Pointer
 +
0011db30: 02112021 addu r4,r16,r17
 +
0011db34: 2631000a addiu r17,r17,0x000a
 +
0011db38: 0c04ac74 jal 0x0012b1d0 Store Data Pointer 2
 +
0011db3c: 02112021 addu r4,r16,r17
 +
0011db40: 00009021 addu r18,r0,r0
 +
0011db44: 00161400 sll r2,r22,0x10
 +
0011db48: 0002bc03 sra r23,r2,0x10
 +
0011db4c: 34163fd8 ori r22,r0,0x3fd8
 +
0011db50: 34140008 ori r20,r0,0x0008         
 +
0011db54: 00008021 addu r16,r0,r0
 +
<loop> status innate list
 +
0011db58: 02b7102a slt r2,r21,r23
 +
0011db5c: 10400037 beq r2,r0,0x0011dc3c
 +
0011db60: 00000000 nop
 +
0011db64: 0c04ac7b jal 0x0012b1ec Check for Present Flags
 +
0011db68: 34040001 ori r4,r0,0x0001
 +
0011db6c: 00408821 addu r17,r2,r0              flag count?
 +
0011db70: 0c04acd5 jal 0x0012b354 Check for Present Flags 2
 +
0011db74: 34040001 ori r4,r0,0x0001
 +
0011db78: 02228825 or r17,r17,r2              bit flag merge
 +
0011db7c: 1220002c beq r17,r0,0x0011dc30      loop if none
 +
0011db80: 26520001 addiu r18,r18,0x0001        status counter ++
 +
0011db84: 27a40020 addiu r4,r29,0x0020
 +
0011db88: 340500a0 ori r5,r0,0x00a0            u0 = 0xa0
 +
0011db8c: 340600f5 ori r6,r0,0x00f5            v0 = 0xf5
 +
0011db90: 27c2fff8 addiu r2,r30,0xfff8        xpos - 0x8
 +
0011db94: a7a20020 sh r2,0x0020(r29)          store x pos
 +
0011db98: 26620001 addiu r2,r19,0x0001        ypos + 0x1
 +
0011db9c: a7a20022 sh r2,0x0022(r29)          store y pos
 +
0011dba0: 97a20030 lhu r2,0x0030(r29)
 +
0011dba4: 00003821 addu r7,r0,r0              rgb tint pointer = NULL
 +
0011dba8: a7b40024 sh r20,0x0024(r29)         
 +
0011dbac: a7b40026 sh r20,0x0026(r29)          store width & height = 8
 +
0011dbb0: afa00010 sw r0,0x0010(r29) Store not semi-transparent
 +
0011dbb4: afb60018 sw r22,0x0018(r29)          store CLUT = 0x3fd8
 +
0011dbb8: afb4001c sw r20,0x001c(r29)          store otag depth = 8
 +
0011dbbc: 0c04b1aa jal 0x0012c6a8              [[Build Menu Icon Polygons]] <-- builds yellow inventory "innate status" icon
 +
0011dbc0: afa20014 sw r2,0x0014(r29)          store TPAGE = 6
 +
0011dbc4: 27a40020 addiu r4,r29,0x0020
 +
0011dbc8: 02601021 addu r2,r19,r0
 +
0011dbcc: a7be0020 sh r30,0x0020(r29)
 +
0011dbd0: a7a20022 sh r2,0x0022(r29)
 +
0011dbd4: 3c018019 lui r1,0x8019
 +
0011dbd8: 00300821 addu r1,r1,r16
 +
0011dbdc: 9422cf6c lhu r2,-0x3094(r1)
 +
0011dbe0: 97a80028 lhu r8,0x0028(r29)
 +
0011dbe4: 00003821 addu r7,r0,r0
 +
0011dbe8: a7a20024 sh r2,0x0024(r29)
 +
0011dbec: 3c018019 lui r1,0x8019
 +
0011dbf0: 00300821 addu r1,r1,r16
 +
0011dbf4: 9422cf6e lhu r2,-0x3092(r1)
 +
0011dbf8: 26730009 addiu r19,r19,0x0009
 +
0011dbfc: a7a20026 sh r2,0x0026(r29)
 +
0011dc00: 3c018019 lui r1,0x8019
 +
0011dc04: 00300821 addu r1,r1,r16
 +
0011dc08: 8425cf68 lh r5,-0x3098(r1)
 +
0011dc0c: 3c018019 lui r1,0x8019
 +
0011dc10: 00300821 addu r1,r1,r16
 +
0011dc14: 8426cf6a lh r6,-0x3096(r1)
 +
0011dc18: 26b50001 addiu r21,r21,0x0001
 +
0011dc1c: afa00010 sw r0,0x0010(r29) Store 0 (Disable 0x2)
 +
0011dc20: afa80014 sw r8,0x0014(r29)
 +
0011dc24: afb60018 sw r22,0x0018(r29)
 +
0011dc28: 0c04b1aa jal 0x0012c6a8              [[Build Menu Icon Polygons]] <-- builds yellow inventory "innate status" text
 +
0011dc2c: afb4001c sw r20,0x001c(r29)
 +
0011dc30: 2a420028 slti r2,r18,0x0028
 +
0011dc34: 1440ffc8 bne r2,r0,0x0011db58
 +
0011dc38: 26100008 addiu r16,r16,0x0008
 +
</loop>
 +
0011dc3c: 8fbf0064 lw r31,0x0064(r29)
 +
0011dc40: 8fbe0060 lw r30,0x0060(r29)
 +
0011dc44: 8fb7005c lw r23,0x005c(r29)
 +
0011dc48: 8fb60058 lw r22,0x0058(r29)
 +
0011dc4c: 8fb50054 lw r21,0x0054(r29)
 +
0011dc50: 8fb40050 lw r20,0x0050(r29)
 +
0011dc54: 8fb3004c lw r19,0x004c(r29)
 +
0011dc58: 8fb20048 lw r18,0x0048(r29)
 +
0011dc5c: 8fb10044 lw r17,0x0044(r29)
 +
0011dc60: 8fb00040 lw r16,0x0040(r29)
 +
0011dc64: 27bd0068 addiu r29,r29,0x0068
 +
0011dc68: 03e00008 jr r31
 +
0011dc6c: 00000000 nop
 +
</font>

Latest revision as of 07:47, 1 July 2024

0011d8ac: 27bdff98 addiu r29,r29,0xff98
0011d8b0: afb60058 sw r22,0x0058(r29)
0011d8b4: 0000b021 addu r22,r0,r0		Status Counter = 0
0011d8b8: 00042400 sll r4,r4,0x10
0011d8bc: 00042403 sra r4,r4,0x10
0011d8c0: 00041040 sll r2,r4,0x01		Item ID * 2
0011d8c4: 00441021 addu r2,r2,r4		ID * 3
0011d8c8: 00021080 sll r2,r2,0x02		ID * 12
0011d8cc: afb20048 sw r18,0x0048(r29)
0011d8d0: 00009021 addu r18,r0,r0		Counter = 0
0011d8d4: afbf0064 sw r31,0x0064(r29)
0011d8d8: afbe0060 sw r30,0x0060(r29)
0011d8dc: afb7005c sw r23,0x005c(r29)
0011d8e0: afb50054 sw r21,0x0054(r29)
0011d8e4: afb40050 sw r20,0x0050(r29)
0011d8e8: afb3004c sw r19,0x004c(r29)
0011d8ec: afb10044 sw r17,0x0044(r29)
0011d8f0: afb00040 sw r16,0x0040(r29)
0011d8f4: 3c018006 lui r1,0x8006
0011d8f8: 00220821 addu r1,r1,r2
0011d8fc: 90342ebf lbu r20,0x2ebf(r1)		Load Item's Item Attributes ID
0011d900: 3c028006 lui r2,0x8006
0011d904: 244242ce addiu r2,r2,0x42ce
0011d908: 00142040 sll r4,r20,0x01		ID * 2
0011d90c: 00942021 addu r4,r4,r20		ID * 3
0011d910: 000420c0 sll r4,r4,0x03		ID * 24
0011d914: 00942021 addu r4,r4,r20		ID * 25
0011d918: 0c04ac6d jal 0x0012b1b4		Store Data Pointer
0011d91c: 00822021 addu r4,r4,r2		r4 = Item's Status Immunities Data Pointer
0011d920: 0c04ac7b jal 0x0012b1ec		Check for Present Flags
0011d924: 34040001 ori r4,r0,0x0001		Flag Counter = 1
0011d928: 10400002 beq r2,r0,0x0011d934		Branch if Status isn't present
0011d92c: 26520001 addiu r18,r18,0x0001		Counter ++
0011d930: 26d60001 addiu r22,r22,0x0001		Status Counter ++
0011d934: 2a420028 slti r2,r18,0x0028
0011d938: 1440fff9 bne r2,r0,0x0011d920		Branch if Counter < 0x28
0011d93c: 00148040 sll r16,r20,0x01		ID * 2
0011d940: 02148021 addu r16,r16,r20		ID * 3
0011d944: 001080c0 sll r16,r16,0x03		ID * 24
0011d948: 02148021 addu r16,r16,r20		ID * 25
0011d94c: 3c118006 lui r17,0x8006
0011d950: 263142c9 addiu r17,r17,0x42c9
0011d954: 0c04ac6d jal 0x0012b1b4		Store Data Pointer
0011d958: 02112021 addu r4,r16,r17		r4 = Item's Innate Status Data Pointer
0011d95c: 2631000a addiu r17,r17,0x000a
0011d960: 0c04ac74 jal 0x0012b1d0		Store Data Pointer 2
0011d964: 02112021 addu r4,r16,r17		r4 = Item's Starting Status Data Pointer
0011d968: 00009021 addu r18,r0,r0		Counter = 0
0011d96c: 0c04ac7b jal 0x0012b1ec		Check for Present Flags
0011d970: 34040001 ori r4,r0,0x0001		Flag Counter = 1
0011d974: 00408821 addu r17,r2,r0		r17 = Present Flags
0011d978: 0c04acd5 jal 0x0012b354		Check for Present Flags 2
0011d97c: 34040001 ori r4,r0,0x0001		Flag Counter = 1
0011d980: 02228825 or r17,r17,r2		Present Flags += new Present Flags
0011d984: 12200002 beq r17,r0,0x0011d990	Branch if Flags aren't present
0011d988: 26520001 addiu r18,r18,0x0001		Counter ++
0011d98c: 26d60001 addiu r22,r22,0x0001		Status Counter ++
0011d990: 2a420028 slti r2,r18,0x0028
0011d994: 1440fff5 bne r2,r0,0x0011d96c		Branch if Counter < 0x28
0011d998: 00161400 sll r2,r22,0x10
0011d99c: 00021403 sra r2,r2,0x10
0011d9a0: 2842000d slti r2,r2,0x000d
0011d9a4: 14400002 bne r2,r0,0x0011d9b0		Branch if Status Counter < 0xd
0011d9a8: 341100c2 ori r17,r0,0x00c2		Status Y Draw Location = 0xc2
0011d9ac: 3416000c ori r22,r0,0x000c		Status Counter = 0xc
0011d9b0: 3c03801d lui r3,0x801d
0011d9b4: 90638518 lbu r3,-0x7ae8(r3)		Load Item Type?
0011d9b8: 34020003 ori r2,r0,0x0003
0011d9bc: 14620002 bne r3,r2,0x0011d9c8		Branch if Item isn't an Accessory
0011d9c0: 00168400 sll r16,r22,0x10
0011d9c4: 341100da ori r17,r0,0x00da		Status Y Draw Location = 0xda
0011d9c8: 00108403 sra r16,r16,0x10
0011d9cc: 001010c0 sll r2,r16,0x03		Status Counter * 8
0011d9d0: 00501021 addu r2,r2,r16		Status Counter * 9
0011d9d4: 02229823 subu r19,r17,r2		Status Y Draw Location - Status Counter * 9
0011d9d8: 341e00d1 ori r30,r0,0x00d1		x draw location = 0xd1
0011d9dc: 00002021 addu r4,r0,r0		r4 = 0
0011d9e0: 00002821 addu r5,r0,r0		r5 = 0
0011d9e4: 34060180 ori r6,r0,0x0180		r6 = 0x180
0011d9e8: 0c008e63 jal 0x0002398c		P00 GetTpage <-- returns tpage 6 (textbox text + window graphics)
0011d9ec: 00003821 addu r7,r0,r0		r7 = 0
0011d9f0: 0000a821 addu r21,r0,r0		r21 = 0
0011d9f4: 00142040 sll r4,r20,0x01		ID * 2
0011d9f8: 00942021 addu r4,r4,r20		ID * 3
0011d9fc: 000420c0 sll r4,r4,0x03		ID * 24
0011da00: 00942021 addu r4,r4,r20		ID * 25
0011da04: 3c038006 lui r3,0x8006
0011da08: 246342ce addiu r3,r3,0x42ce
0011da0c: 3c088019 lui r8,0x8019
0011da10: 9508df8a lhu r8,-0x2076(r8)		Load TPAGE?
0011da14: 00832021 addu r4,r4,r3		r4 = Item's Status Immunities Data Pointer
0011da18: a7a20030 sh r2,0x0030(r29)		Store tpage ID = 6
0011da1c: 0c04ac6d jal 0x0012b1b4		Store Data Pointer
0011da20: a7a80028 sh r8,0x0028(r29)		Store second TPAGE we're working with today
0011da24: 00009021 addu r18,r0,r0		Counter = 0
0011da28: 34173fd9 ori r23,r0,0x3fd9		r23 = 0x3fd9
0011da2c: afb00038 sw r16,0x0038(r29)		Store Status Counter
0011da30: 34100008 ori r16,r0,0x0008		r16 = 8
0011da34: 00008821 addu r17,r0,r0		Status Mod = 0

<loop> status immunity list

0011da38: 8fa80038 lw r8,0x0038(r29)		Load Status Counter
0011da3c: 00000000 nop
0011da40: 02a8102a slt r2,r21,r8
0011da44: 10400033 beq r2,r0,0x0011db14		Branch if r21 >= Status Counter
0011da48: 00000000 nop
0011da4c: 0c04ac7b jal 0x0012b1ec		Check for Present Flags
0011da50: 34040001 ori r4,r0,0x0001		Flag Counter = 1
0011da54: 1040002c beq r2,r0,0x0011db08		Branch if Flags aren't present
0011da58: 26520001 addiu r18,r18,0x0001		Counter ++
0011da5c: 27a40020 addiu r4,r29,0x0020		r4 = Stack Pointer + 0x20
0011da60: 340500a9 ori r5,r0,0x00a9		u0 = 0xa9
0011da64: 340600f5 ori r6,r0,0x00f5		v0 = 0xf5 (these, shouldn't correspond to anything yet. the building here probably has yet to be done.)
0011da68: 27c2fff9 addiu r2,r30,0xfff9         list x draw location - 7
0011da6c: a7a20020 sh r2,0x0020(r29)		store rectangle.x0
0011da70: 26620001 addiu r2,r19,0x0001         list y draw location + 1
0011da74: a7a20022 sh r2,0x0022(r29)		store rectangle.y0
0011da78: 97a20030 lhu r2,0x0030(r29)		Load TPAGE
0011da7c: 00003821 addu r7,r0,r0		rgb tint pointer = NULL
0011da80: a7b00024 sh r16,0x0024(r29)		width = 8
0011da84: a7b00026 sh r16,0x0026(r29)		height = 8
0011da88: afa00010 sw r0,0x0010(r29)		Store not semi-transparent
0011da8c: afb70018 sw r23,0x0018(r29)		Store CLUT = 0x3fd9 (I would guess one of FRAME.BIN's colour palettes)
0011da90: afb0001c sw r16,0x001c(r29)		OTAG depth = 8
0011da94: 0c04b1aa jal 0x0012c6a8              Build Menu Icon Polygons <-- builds blue inventory "immune status" icon
0011da98: afa20014 sw r2,0x0014(r29)		store TPAGE
0011da9c: 27a40020 addiu r4,r29,0x0020		r4 = point to rectangle
0011daa0: 02601021 addu r2,r19,r0
0011daa4: a7be0020 sh r30,0x0020(r29)          x0
0011daa8: a7a20022 sh r2,0x0022(r29)           y0
0011daac: 3c018019 lui r1,0x8019
0011dab0: 00310821 addu r1,r1,r17
0011dab4: 9422cf6c lhu r2,-0x3094(r1)
0011dab8: 97a80028 lhu r8,0x0028(r29)
0011dabc: 00003821 addu r7,r0,r0
0011dac0: a7a20024 sh r2,0x0024(r29)           width
0011dac4: 3c018019 lui r1,0x8019
0011dac8: 00310821 addu r1,r1,r17
0011dacc: 9422cf6e lhu r2,-0x3092(r1)
0011dad0: 26730009 addiu r19,r19,0x0009
0011dad4: a7a20026 sh r2,0x0026(r29)           height
0011dad8: 3c018019 lui r1,0x8019
0011dadc: 00310821 addu r1,r1,r17
0011dae0: 8425cf68 lh r5,-0x3098(r1)           upper left corner u0
0011dae4: 3c018019 lui r1,0x8019
0011dae8: 00310821 addu r1,r1,r17
0011daec: 8426cf6a lh r6,-0x3096(r1)           upper left corner v0 (built somewhere else?)
0011daf0: 26b50001 addiu r21,r21,0x0001
0011daf4: afa00010 sw r0,0x0010(r29)		Store not semi transparent
0011daf8: afa80014 sw r8,0x0014(r29)           store TPAGE
0011dafc: afb70018 sw r23,0x0018(r29)
0011db00: 0c04b1aa jal 0x0012c6a8              Build Menu Icon Polygons <-- builds blue inventory "immune status" text
0011db04: afb0001c sw r16,0x001c(r29)
0011db08: 2a420028 slti r2,r18,0x0028
0011db0c: 1440ffca bne r2,r0,0x0011da38		Branch if Counter < 0x28
0011db10: 26310008 addiu r17,r17,0x0008		Status Mod += 8

</loop>

0011db14: 00148040 sll r16,r20,0x01
0011db18: 02148021 addu r16,r16,r20
0011db1c: 001080c0 sll r16,r16,0x03
0011db20: 02148021 addu r16,r16,r20
0011db24: 3c118006 lui r17,0x8006
0011db28: 263142c9 addiu r17,r17,0x42c9
0011db2c: 0c04ac6d jal 0x0012b1b4		Store Data Pointer
0011db30: 02112021 addu r4,r16,r17
0011db34: 2631000a addiu r17,r17,0x000a
0011db38: 0c04ac74 jal 0x0012b1d0		Store Data Pointer 2
0011db3c: 02112021 addu r4,r16,r17
0011db40: 00009021 addu r18,r0,r0
0011db44: 00161400 sll r2,r22,0x10
0011db48: 0002bc03 sra r23,r2,0x10
0011db4c: 34163fd8 ori r22,r0,0x3fd8
0011db50: 34140008 ori r20,r0,0x0008          
0011db54: 00008021 addu r16,r0,r0

<loop> status innate list

0011db58: 02b7102a slt r2,r21,r23
0011db5c: 10400037 beq r2,r0,0x0011dc3c
0011db60: 00000000 nop
0011db64: 0c04ac7b jal 0x0012b1ec		Check for Present Flags
0011db68: 34040001 ori r4,r0,0x0001
0011db6c: 00408821 addu r17,r2,r0              flag count?
0011db70: 0c04acd5 jal 0x0012b354		Check for Present Flags 2
0011db74: 34040001 ori r4,r0,0x0001
0011db78: 02228825 or r17,r17,r2               bit flag merge
0011db7c: 1220002c beq r17,r0,0x0011dc30       loop if none
0011db80: 26520001 addiu r18,r18,0x0001        status counter ++
0011db84: 27a40020 addiu r4,r29,0x0020
0011db88: 340500a0 ori r5,r0,0x00a0            u0 = 0xa0
0011db8c: 340600f5 ori r6,r0,0x00f5            v0 = 0xf5
0011db90: 27c2fff8 addiu r2,r30,0xfff8         xpos - 0x8
0011db94: a7a20020 sh r2,0x0020(r29)           store x pos
0011db98: 26620001 addiu r2,r19,0x0001         ypos + 0x1
0011db9c: a7a20022 sh r2,0x0022(r29)           store y pos
0011dba0: 97a20030 lhu r2,0x0030(r29)
0011dba4: 00003821 addu r7,r0,r0               rgb tint pointer = NULL
0011dba8: a7b40024 sh r20,0x0024(r29)          
0011dbac: a7b40026 sh r20,0x0026(r29)          store width & height = 8
0011dbb0: afa00010 sw r0,0x0010(r29)		Store not semi-transparent
0011dbb4: afb60018 sw r22,0x0018(r29)          store CLUT = 0x3fd8
0011dbb8: afb4001c sw r20,0x001c(r29)          store otag depth = 8
0011dbbc: 0c04b1aa jal 0x0012c6a8              Build Menu Icon Polygons <-- builds yellow inventory "innate status" icon
0011dbc0: afa20014 sw r2,0x0014(r29)           store TPAGE = 6
0011dbc4: 27a40020 addiu r4,r29,0x0020
0011dbc8: 02601021 addu r2,r19,r0
0011dbcc: a7be0020 sh r30,0x0020(r29)
0011dbd0: a7a20022 sh r2,0x0022(r29)
0011dbd4: 3c018019 lui r1,0x8019
0011dbd8: 00300821 addu r1,r1,r16
0011dbdc: 9422cf6c lhu r2,-0x3094(r1)
0011dbe0: 97a80028 lhu r8,0x0028(r29)
0011dbe4: 00003821 addu r7,r0,r0
0011dbe8: a7a20024 sh r2,0x0024(r29)
0011dbec: 3c018019 lui r1,0x8019
0011dbf0: 00300821 addu r1,r1,r16
0011dbf4: 9422cf6e lhu r2,-0x3092(r1)
0011dbf8: 26730009 addiu r19,r19,0x0009
0011dbfc: a7a20026 sh r2,0x0026(r29)
0011dc00: 3c018019 lui r1,0x8019
0011dc04: 00300821 addu r1,r1,r16
0011dc08: 8425cf68 lh r5,-0x3098(r1)
0011dc0c: 3c018019 lui r1,0x8019
0011dc10: 00300821 addu r1,r1,r16
0011dc14: 8426cf6a lh r6,-0x3096(r1)
0011dc18: 26b50001 addiu r21,r21,0x0001
0011dc1c: afa00010 sw r0,0x0010(r29)		Store 0 (Disable 0x2)
0011dc20: afa80014 sw r8,0x0014(r29)
0011dc24: afb60018 sw r22,0x0018(r29)
0011dc28: 0c04b1aa jal 0x0012c6a8              Build Menu Icon Polygons <-- builds yellow inventory "innate status" text
0011dc2c: afb4001c sw r20,0x001c(r29)
0011dc30: 2a420028 slti r2,r18,0x0028
0011dc34: 1440ffc8 bne r2,r0,0x0011db58
0011dc38: 26100008 addiu r16,r16,0x0008

</loop>

0011dc3c: 8fbf0064 lw r31,0x0064(r29)
0011dc40: 8fbe0060 lw r30,0x0060(r29)
0011dc44: 8fb7005c lw r23,0x005c(r29)
0011dc48: 8fb60058 lw r22,0x0058(r29)
0011dc4c: 8fb50054 lw r21,0x0054(r29)
0011dc50: 8fb40050 lw r20,0x0050(r29)
0011dc54: 8fb3004c lw r19,0x004c(r29)
0011dc58: 8fb20048 lw r18,0x0048(r29)
0011dc5c: 8fb10044 lw r17,0x0044(r29)
0011dc60: 8fb00040 lw r16,0x0040(r29)
0011dc64: 27bd0068 addiu r29,r29,0x0068
0011dc68: 03e00008 jr r31
0011dc6c: 00000000 nop