Difference between revisions of "WLDCORE Get Ramza's Roster Index"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Commented the page)
(Return Locations)
 
(One intermediate revision by the same user not shown)
Line 31: Line 31:
 
  00091f70: 00000000 nop
 
  00091f70: 00000000 nop
 
</font>
 
</font>
 +
 +
==Return Locations==
 +
 +
00091e90: [[World Map Script 0x25]]
 +
00091f84: [[World Map Script 0x26]]
 +
00092000: [[World Map Script 0x27]]
 +
0009207c: [[World Map Script 0x28]]

Latest revision as of 21:50, 3 March 2025

00091f00: 27bdffe0 addiu r29,r29,0xffe0
00091f04: afb00010 sw r16,0x0010(r29)
00091f08: 00008021 addu r16,r0,r0          # r16 = Current roster index, set to 0
00091f0c: afb10014 sw r17,0x0014(r29)
00091f10: 341100ff ori r17,r0,0x00ff
00091f14: afbf0018 sw r31,0x0018(r29)
00091f18: 0c01a78e jal 0x00069e38          # WLDCORE Get Party Data
00091f1c: 02002021 addu r4,r16,r0          # r4 = Current roster index
00091f20: 00401821 addu r3,r2,r0           # r3 = Pointer to unit's World Stats address
00091f24: 90620001 lbu r2,0x0001(r3)       # Load unit's Party ID
00091f28: 00000000 nop
00091f2c: 10510007 beq r2,r17,0x00091f4c   # Branch to check next iteration if roster slot is empty
00091f30: 00000000 nop
00091f34: 90620000 lbu r2,0x0000(r3)       # r2 = Sprite Set
00091f38: 00000000 nop
00091f3c: 10400003 beq r2,r0,0x00091f4c    # Branch to check next iteration if no sprite set
00091f40: 2c420004 sltiu r2,r2,0x0004      # r2 = 0x01 if Sprite Set is 1-3 (one of the Ramzas)
00091f44: 14400005 bne r2,r0,0x00091f5c    # Branch if Ramza
00091f48: 02001021 addu r2,r16,r0          # r2 = Ramza's roster index
00091f4c: 26100001 addiu r16,r16,0x0001    # r16 = Counter ++
00091f50: 2a020010 slti r2,r16,0x0010      # r2 = 0x01 if still within the main 16 roster slots
00091f54: 1440fff0 bne r2,r0,0x00091f18    # Loop back if still units to check
00091f58: 02001021 addu r2,r16,r0          # r2 = current roster index
00091f5c: 8fbf0018 lw r31,0x0018(r29)
00091f60: 8fb10014 lw r17,0x0014(r29)
00091f64: 8fb00010 lw r16,0x0010(r29)
00091f68: 27bd0020 addiu r29,r29,0x0020
00091f6c: 03e00008 jr r31
00091f70: 00000000 nop

Return Locations

00091e90: World Map Script 0x25
00091f84: World Map Script 0x26
00092000: World Map Script 0x27
0009207c: World Map Script 0x28