Difference between revisions of "ENTD Open - Initialize Unit Data"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00042930: 27bdffe0 addiu r29,r29,0xffe0 00042934: afbf0018 sw r31,0x0018(r29) 00042938: afb10014 sw r17,0x0014(r29) 0004293c: afb00010 sw r16,0...")
 
m
Line 19: Line 19:
 
  00042970: 08010a52 j 0x00042948
 
  00042970: 08010a52 j 0x00042948
 
  00042974: 00000000 nop
 
  00042974: 00000000 nop
  00042978: 0c010a20 jal 0x00042880
+
  00042978: 0c010a20 jal 0x00042880 returns an ENTD data pointer
 
  0004297c: 00000000 nop
 
  0004297c: 00000000 nop
 
  00042980: 00408821 addu r17,r2,r0
 
  00042980: 00408821 addu r17,r2,r0
 
  00042984: 1230001c beq r17,r16,0x000429f8
 
  00042984: 1230001c beq r17,r16,0x000429f8
 
  00042988: 00000000 nop
 
  00042988: 00000000 nop
  0004298c: 12200012 beq r17,r0,0x000429d8
+
  0004298c: 12200012 beq r17,r0,0x000429d8 Do not erase party data if ENTD pointer = 0 ?
 
  00042990: 00000000 nop
 
  00042990: 00000000 nop
  00042994: 0c0166b2 jal 0x00059ac8
+
  00042994: 0c0166b2 jal 0x00059ac8 [[Initialize Party ID to FF]]
 
  00042998: 00008021 addu r16,r0,r0
 
  00042998: 00008021 addu r16,r0,r0
  0004299c: 02202021 addu r4,r17,r0
+
  0004299c: 02202021 addu r4,r17,r0 ENTD data pointer
  000429a0: 02002821 addu r5,r16,r0
+
  000429a0: 02002821 addu r5,r16,r0 #appears to be a loop
  000429a4: 00003021 addu r6,r0,r0
+
  000429a4: 00003021 addu r6,r0,r0 No new party members? (could an event instruction call unit initialization that allows them to join the party?)
  000429a8: 0c0166c6 jal 0x00059b18
+
  000429a8: 0c0166c6 jal 0x00059b18 [[Unit Initialization]]
  000429ac: 34070001 ori r7,r0,0x0001
+
  000429ac: 34070001 ori r7,r0,0x0001 initialization flag = 1 (initialize units for battle)
  000429b0: 26100001 addiu r16,r16,0x0001
+
  000429b0: 26100001 addiu r16,r16,0x0001 counter ++ (unit ENTD ID)
  000429b4: 2a020010 slti r2,r16,0x0010
+
  000429b4: 2a020010 slti r2,r16,0x0010 set while less than 16 (battle cap)
  000429b8: 1440fff9 bne r2,r0,0x000429a0
+
  000429b8: 1440fff9 bne r2,r0,0x000429a0 #Loop back
 
  000429bc: 02202021 addu r4,r17,r0
 
  000429bc: 02202021 addu r4,r17,r0
 
  000429c0: 3c048004 lui r4,0x8004
 
  000429c0: 3c048004 lui r4,0x8004

Revision as of 12:07, 21 September 2022

00042930: 27bdffe0 addiu r29,r29,0xffe0
00042934: afbf0018 sw r31,0x0018(r29)
00042938: afb10014 sw r17,0x0014(r29)
0004293c: afb00010 sw r16,0x0010(r29)
00042940: 3c018004 lui r1,0x8004
00042944: ac247600 sw r4,0x7600(r1)
00042948: 0c0109e9 jal 0x000427a4
0004294c: 00000000 nop
00042950: 14400009 bne r2,r0,0x00042978
00042954: 2410ffff addiu r16,r0,0xffff
00042958: 0c0076ea jal 0x0001dba8
0004295c: 00002021 addu r4,r0,r0
00042960: 3c048005 lui r4,0x8005
00042964: 2484eaf4 addiu r4,r4,0xeaf4
00042968: 0c00478e jal 0x00011e38
0004296c: 00000000 nop
00042970: 08010a52 j 0x00042948
00042974: 00000000 nop
00042978: 0c010a20 jal 0x00042880			returns an ENTD data pointer
0004297c: 00000000 nop
00042980: 00408821 addu r17,r2,r0
00042984: 1230001c beq r17,r16,0x000429f8
00042988: 00000000 nop
0004298c: 12200012 beq r17,r0,0x000429d8		Do not erase party data if ENTD pointer = 0 ?
00042990: 00000000 nop
00042994: 0c0166b2 jal 0x00059ac8			Initialize Party ID to FF 
00042998: 00008021 addu r16,r0,r0
0004299c: 02202021 addu r4,r17,r0			ENTD data pointer
000429a0: 02002821 addu r5,r16,r0			#appears to be a loop
000429a4: 00003021 addu r6,r0,r0			No new party members? (could an event instruction call unit initialization that allows them to join the party?)
000429a8: 0c0166c6 jal 0x00059b18			Unit Initialization
000429ac: 34070001 ori r7,r0,0x0001			initialization flag = 1 (initialize units for battle)
000429b0: 26100001 addiu r16,r16,0x0001		counter ++ (unit ENTD ID)
000429b4: 2a020010 slti r2,r16,0x0010			set while less than 16 (battle cap)
000429b8: 1440fff9 bne r2,r0,0x000429a0		#Loop back
000429bc: 02202021 addu r4,r17,r0
000429c0: 3c048004 lui r4,0x8004
000429c4: 8c847604 lw r4,0x7604(r4)
000429c8: 0c011273 jal 0x000449cc
000429cc: 00000000 nop
000429d0: 08010a7e j 0x000429f8
000429d4: 00000000 nop
000429d8: 0c0076ea jal 0x0001dba8
000429dc: 00002021 addu r4,r0,r0
000429e0: 3c048005 lui r4,0x8005
000429e4: 2484eaf4 addiu r4,r4,0xeaf4
000429e8: 0c00478e jal 0x00011e38
000429ec: 00000000 nop
000429f0: 08010a5e j 0x00042978
000429f4: 00000000 nop
000429f8: 8fbf0018 lw r31,0x0018(r29)
000429fc: 8fb10014 lw r17,0x0014(r29)
00042a00: 8fb00010 lw r16,0x0010(r29)
00042a04: 27bd0020 addiu r29,r29,0x0020
00042a08: 03e00008 jr r31
00042a0c: 00000000 nop