Difference between revisions of "World Map Script 0x04"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 13:21, 29 June 2020

If Sprite Set Unit is present on the team, continue

00091574: 27bdffe0 addiu r29,r29,0xffe0			
00091578: afb00010 sw r16,0x0010(r29)			
0009157c: 00008021 addu r16,r0,r0		r16 = 0x0000 (counter)
00091580: afb20018 sw r18,0x0018(r29)		
00091584: 341200ff ori r18,r0,0x00ff		r18 = 0x00ff
00091588: 3c05800d lui r5,0x800d		r5 = 0x800d0000
0009158c: 24a54650 addiu r5,r5,0x4650		r5 = 0x800d4650
00091590: afbf001c sw r31,0x001c(r29)		
00091594: afb10014 sw r17,0x0014(r29)		
00091598: 94a30000 lhu r3,0x0000(r5)		byte # into the World Map Control offset that is being read
0009159c: 3c04800d lui r4,0x800d		r4 = 0x800d0000
000915a0: 8c84464c lw r4,0x464c(r4)		Load World Map Control String
000915a4: 00031040 sll r2,r3,0x01		byte * 2
000915a8: 00441021 addu r2,r2,r4		World Map Control offset  + r3 * 2
000915ac: 94510000 lhu r17,0x0000(r2)		Load Unit ID that will be checked
000915b0: 24630001 addiu r3,r3,0x0001		Prep for next byte to be checked
000915b4: a4a30000 sh r3,0x0000(r5)		Store next byte into 0x800d4650

000915b8: 0c01a78e jal 0x00069e38		Get Party Data Pointer
000915bc: 02002021 addu r4,r16,r0		r4 = r16
000915c0: 00401821 addu r3,r2,r0		Move Party Data Pointer into r3
000915c4: 90620001 lbu r2,0x0001(r3)		Load Party ID
000915c8: 00000000 nop						
000915cc: 10520005 beq r2,r18,0x000915e4	Branch if Party ID = 0xff (Doesn't exist)
000915d0: 00000000 nop						
000915d4: 90620000 lbu r2,0x0000(r3)		Load Unit Sprite Set Base Class / Character ID
000915d8: 00000000 nop						
000915dc: 10510005 beq r2,r17,0x000915f4	Branch if Party contains this unit is the needed ID to pass World Map Control this conditional
000915e0: 34020014 ori r2,r0,0x0014		r2 = 0x14 (20)
000915e4: 26100001 addiu r16,r16,0x0001		r16 + 1 (Next unit to be checked)
000915e8: 2a020014 slti r2,r16,0x0014		
000915ec: 1440fff2 bne r2,r0,0x000915b8		Branch if all party members have not been checked yet
000915f0: 34020014 ori r2,r0,0x0014		r2 = 0x14 (20) 

000915f4: 16020007 bne r16,r2,0x00091614	If all party members have been checked, continue RETURN
000915f8: 00000000 nop						
000915fc: 3c03800d lui r3,0x800d		r3 = 0x800d0000
00091600: 24634644 addiu r3,r3,0x4644		r3 = 0x800d4644
00091604: 8c620000 lw r2,0x0000(r3)		Load value 0x800d4644
00091608: 00000000 nop						
0009160c: 34420002 ori r2,r2,0x0002			
00091610: ac620000 sw r2,0x0000(r3)		Activate flag 0x02 at 0x800d4644
00091614: 8fbf001c lw r31,0x001c(r29)		
00091618: 8fb20018 lw r18,0x0018(r29)		
0009161c: 8fb10014 lw r17,0x0014(r29)		
00091620: 8fb00010 lw r16,0x0010(r29)		
00091624: 27bd0020 addiu r29,r29,0x0020		
00091628: 03e00008 jr r31					
0009162c: 00000000 nop