Difference between revisions of "000870ac - 00087198"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 000870ac: 27bdffe0 addiu r29,r29,0xffe0 000870b0: afb00018 sw r16,0x0018(r29) 000870b4: 00808021 addu r16,r4,r0 000870b8: afbf001c sw r31,0x001...")
 
m
 
Line 5: Line 5:
 
  000870b4: 00808021 addu r16,r4,r0
 
  000870b4: 00808021 addu r16,r4,r0
 
  000870b8: afbf001c sw r31,0x001c(r29)
 
  000870b8: afbf001c sw r31,0x001c(r29)
  000870bc: 9203013e lbu r3,0x013e(r16)
+
  000870bc: 9203013e lbu r3,0x013e(r16) #load modified palette byte
 
  000870c0: 00000000 nop
 
  000870c0: 00000000 nop
  000870c4: 10600030 beq r3,r0,0x00087188
+
  000870c4: 10600030 beq r3,r0,0x00087188 #branch if no such thing
 
  000870c8: 00001021 addu r2,r0,r0
 
  000870c8: 00001021 addu r2,r0,r0
  000870cc: 92040004 lbu r4,0x0004(r16)
+
  000870cc: 92040004 lbu r4,0x0004(r16) #load unit's misc ID
 
  000870d0: 00000000 nop
 
  000870d0: 00000000 nop
  000870d4: 000410c0 sll r2,r4,0x03
+
  000870d4: 000410c0 sll r2,r4,0x03 #ID * 8
 
  000870d8: 3c01800a lui r1,0x800a
 
  000870d8: 3c01800a lui r1,0x800a
 
  000870dc: 00220821 addu r1,r1,r2
 
  000870dc: 00220821 addu r1,r1,r2
  000870e0: 9022b27c lbu r2,-0x4d84(r1)
+
  000870e0: 9022b27c lbu r2,-0x4d84(r1) #8 byte table entries per misc. unit ID?
 
  000870e4: 00000000 nop
 
  000870e4: 00000000 nop
  000870e8: 14400027 bne r2,r0,0x00087188
+
  000870e8: 14400027 bne r2,r0,0x00087188 #end if != 0
 
  000870ec: 00001021 addu r2,r0,r0
 
  000870ec: 00001021 addu r2,r0,r0
 
  000870f0: 34020001 ori r2,r0,0x0001
 
  000870f0: 34020001 ori r2,r0,0x0001
  000870f4: 10620005 beq r3,r2,0x0008710c
+
  000870f4: 10620005 beq r3,r2,0x0008710c #branch if modified palette is 1
 
  000870f8: 34020002 ori r2,r0,0x0002
 
  000870f8: 34020002 ori r2,r0,0x0002
  000870fc: 1062000f beq r3,r2,0x0008713c
+
  000870fc: 1062000f beq r3,r2,0x0008713c #branch if modified palette is 2 (counter?)
 
  00087100: 00001021 addu r2,r0,r0
 
  00087100: 00001021 addu r2,r0,r0
  00087104: 08021c62 j 0x00087188
+
  00087104: 08021c62 j 0x00087188 #if not 1 or 2, end, fail.
 
  00087108: 00000000 nop
 
  00087108: 00000000 nop
 +
 +
mod. palette = 1
 
  0008710c: 34040004 ori r4,r0,0x0004
 
  0008710c: 34040004 ori r4,r0,0x0004
 
  00087110: 34020002 ori r2,r0,0x0002
 
  00087110: 34020002 ori r2,r0,0x0002
  00087114: a202013e sb r2,0x013e(r16)
+
  00087114: a202013e sb r2,0x013e(r16) #store modify palette byte as 2 (increment)
  00087118: 2402ffe1 addiu r2,r0,0xffe1
+
  00087118: 2402ffe1 addiu r2,r0,0xffe1 #-0x1f
  0008711c: 34050004 ori r5,r0,0x0004
+
  0008711c: 34050004 ori r5,r0,0x0004 #PV2 = 4 (rgb + rgb input)
  00087120: 92060004 lbu r6,0x0004(r16)
+
  00087120: 92060004 lbu r6,0x0004(r16) #load misc. unit ID
  00087124: 2407ffe1 addiu r7,r0,0xffe1
+
  00087124: 2407ffe1 addiu r7,r0,0xffe1 #-0x1f
 
  00087128: afa20010 sw r2,0x0010(r29)
 
  00087128: afa20010 sw r2,0x0010(r29)
 
  0008712c: 0c024cf1 jal 0x000933c4
 
  0008712c: 0c024cf1 jal 0x000933c4
  00087130: afa20014 sw r2,0x0014(r29)
+
  00087130: afa20014 sw r2,0x0014(r29) #parse -0x1f as r, g, and b palette modification.
 
  00087134: 08021c62 j 0x00087188
 
  00087134: 08021c62 j 0x00087188
 
  00087138: 00001021 addu r2,r0,r0
 
  00087138: 00001021 addu r2,r0,r0
 +
 +
Mod. palette = 2
 
  0008713c: 3c028009 lui r2,0x8009
 
  0008713c: 3c028009 lui r2,0x8009
  00087140: 8c426118 lw r2,0x6118(r2)
+
  00087140: 8c426118 lw r2,0x6118(r2) #casting unit misc ID?
 
  00087144: 00000000 nop
 
  00087144: 00000000 nop
  00087148: 1082000c beq r4,r2,0x0008717c
+
  00087148: 1082000c beq r4,r2,0x0008717c #branch if same as current ID
 
  0008714c: 34020003 ori r2,r0,0x0003
 
  0008714c: 34020003 ori r2,r0,0x0003
  00087150: 8e030134 lw r3,0x0134(r16)
+
  00087150: 8e030134 lw r3,0x0134(r16) #load pointer to unit battle data
 
  00087154: 00000000 nop
 
  00087154: 00000000 nop
 
  00087158: 10600004 beq r3,r0,0x0008716c
 
  00087158: 10600004 beq r3,r0,0x0008716c
  0008715c: a202013e sb r2,0x013e(r16)
+
  0008715c: a202013e sb r2,0x013e(r16) #mod. palette byte = 3 (increment?)
  00087160: 9064018a lbu r4,0x018a(r3)
+
  00087160: 9064018a lbu r4,0x018a(r3) #load unit's ID
  00087164: 0c05ff32 jal 0x0017fcc8
+
  00087164: 0c05ff32 jal 0x0017fcc8 #[[Disable/Remove unit]] - deletes the unit
 
  00087168: 00000000 nop
 
  00087168: 00000000 nop
  0008716c: 0c021bcb jal 0x00086f2c
+
  0008716c: 0c021bcb jal 0x00086f2c #[[00086f2c - 00087060]]
 
  00087170: 02002021 addu r4,r16,r0
 
  00087170: 02002021 addu r4,r16,r0
 
  00087174: 08021c62 j 0x00087188
 
  00087174: 08021c62 j 0x00087188
  00087178: 34020001 ori r2,r0,0x0001
+
  00087178: 34020001 ori r2,r0,0x0001 #return 'unit has been deleted'? IDK lol.
  0008717c: 0c023463 jal 0x0008d18c
+
 
 +
Mod. palette = 2 & caster == unit to modify palette of
 +
  0008717c: 0c023463 jal 0x0008d18c #[[Reset Misc Unit Graphic Trigger]] - deletes the unit
 
  00087180: 00000000 nop
 
  00087180: 00000000 nop
  00087184: 00001021 addu r2,r0,r0
+
  00087184: 00001021 addu r2,r0,r0 #but returns 0?
 
  00087188: 8fbf001c lw r31,0x001c(r29)
 
  00087188: 8fbf001c lw r31,0x001c(r29)
 
  0008718c: 8fb00018 lw r16,0x0018(r29)
 
  0008718c: 8fb00018 lw r16,0x0018(r29)

Latest revision as of 04:49, 16 November 2022

000870ac: 27bdffe0 addiu r29,r29,0xffe0
000870b0: afb00018 sw r16,0x0018(r29)
000870b4: 00808021 addu r16,r4,r0
000870b8: afbf001c sw r31,0x001c(r29)
000870bc: 9203013e lbu r3,0x013e(r16)				#load modified palette byte
000870c0: 00000000 nop
000870c4: 10600030 beq r3,r0,0x00087188			#branch if no such thing
000870c8: 00001021 addu r2,r0,r0
000870cc: 92040004 lbu r4,0x0004(r16)				#load unit's misc ID
000870d0: 00000000 nop
000870d4: 000410c0 sll r2,r4,0x03				#ID * 8
000870d8: 3c01800a lui r1,0x800a
000870dc: 00220821 addu r1,r1,r2
000870e0: 9022b27c lbu r2,-0x4d84(r1)				#8 byte table entries per misc. unit ID?
000870e4: 00000000 nop
000870e8: 14400027 bne r2,r0,0x00087188			#end if != 0
000870ec: 00001021 addu r2,r0,r0
000870f0: 34020001 ori r2,r0,0x0001
000870f4: 10620005 beq r3,r2,0x0008710c			#branch if modified palette is 1
000870f8: 34020002 ori r2,r0,0x0002
000870fc: 1062000f beq r3,r2,0x0008713c			#branch if modified palette is 2 (counter?)
00087100: 00001021 addu r2,r0,r0
00087104: 08021c62 j 0x00087188				#if not 1 or 2, end, fail.
00087108: 00000000 nop

mod. palette = 1

0008710c: 34040004 ori r4,r0,0x0004
00087110: 34020002 ori r2,r0,0x0002
00087114: a202013e sb r2,0x013e(r16)				#store modify palette byte as 2 (increment)
00087118: 2402ffe1 addiu r2,r0,0xffe1				#-0x1f
0008711c: 34050004 ori r5,r0,0x0004				#PV2 = 4 (rgb + rgb input)
00087120: 92060004 lbu r6,0x0004(r16)				#load misc. unit ID
00087124: 2407ffe1 addiu r7,r0,0xffe1				#-0x1f
00087128: afa20010 sw r2,0x0010(r29)
0008712c: 0c024cf1 jal 0x000933c4
00087130: afa20014 sw r2,0x0014(r29)				#parse -0x1f as r, g, and b palette modification.
00087134: 08021c62 j 0x00087188
00087138: 00001021 addu r2,r0,r0

Mod. palette = 2

0008713c: 3c028009 lui r2,0x8009
00087140: 8c426118 lw r2,0x6118(r2)				#casting unit misc ID?
00087144: 00000000 nop
00087148: 1082000c beq r4,r2,0x0008717c			#branch if same as current ID
0008714c: 34020003 ori r2,r0,0x0003
00087150: 8e030134 lw r3,0x0134(r16)				#load pointer to unit battle data
00087154: 00000000 nop
00087158: 10600004 beq r3,r0,0x0008716c
0008715c: a202013e sb r2,0x013e(r16)				#mod. palette byte = 3 (increment?)
00087160: 9064018a lbu r4,0x018a(r3)				#load unit's ID
00087164: 0c05ff32 jal 0x0017fcc8				#Disable/Remove unit - deletes the unit
00087168: 00000000 nop
0008716c: 0c021bcb jal 0x00086f2c				#00086f2c - 00087060
00087170: 02002021 addu r4,r16,r0
00087174: 08021c62 j 0x00087188
00087178: 34020001 ori r2,r0,0x0001				#return 'unit has been deleted'? IDK lol.

Mod. palette = 2 & caster == unit to modify palette of

0008717c: 0c023463 jal 0x0008d18c				#Reset Misc Unit Graphic Trigger - deletes the unit
00087180: 00000000 nop
00087184: 00001021 addu r2,r0,r0				#but returns 0?
00087188: 8fbf001c lw r31,0x001c(r29)
0008718c: 8fb00018 lw r16,0x0018(r29)
00087190: 27bd0020 addiu r29,r29,0x0020
00087194: 03e00008 jr r31
00087198: 00000000 nop