Difference between revisions of "00071de8 - 00071e64"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00071de8: 27bdffe0 addiu r29,r29,0xffe0 00071dec: afb00018 sw r16,0x0018(r29) 00071df0: 00808021 addu r16,r4,r0 00071df4: afbf001c sw r31,0x001...")
 
(This routine seems to prepare and execute the level up animation/report. Added several notes.)
 
Line 3: Line 3:
 
  00071de8: 27bdffe0 addiu r29,r29,0xffe0
 
  00071de8: 27bdffe0 addiu r29,r29,0xffe0
 
  00071dec: afb00018 sw r16,0x0018(r29)
 
  00071dec: afb00018 sw r16,0x0018(r29)
  00071df0: 00808021 addu r16,r4,r0
+
  00071df0: 00808021 addu r16,r4,r0                   r16 = Misc Unit Data pointer for acting unit
 
  00071df4: afbf001c sw r31,0x001c(r29)
 
  00071df4: afbf001c sw r31,0x001c(r29)
  00071df8: 920201b2 lbu r2,0x01b2(r16)
+
  00071df8: 920201b2 lbu r2,0x01b2(r16)              r2 = Misc Unit Data offset 0x1b2 - Level (For Level UP! event?)
 
  00071dfc: 00000000 nop
 
  00071dfc: 00000000 nop
  00071e00: 10400014 beq r2,r0,0x00071e54
+
  00071e00: 10400014 beq r2,r0,0x00071e54             Branch to end if not leveling up
  00071e04: 00001021 addu r2,r0,r0
+
  00071e04: 00001021 addu r2,r0,r0                   r2 = 0
 
  00071e08: 0c04ebb7 jal 0x0013aedc
 
  00071e08: 0c04ebb7 jal 0x0013aedc
 
  00071e0c: 340400b4 ori r4,r0,0x00b4
 
  00071e0c: 340400b4 ori r4,r0,0x00b4
 
  00071e10: 3404000a ori r4,r0,0x000a
 
  00071e10: 3404000a ori r4,r0,0x000a
  00071e14: 8e020134 lw r2,0x0134(r16)
+
  00071e14: 8e020134 lw r2,0x0134(r16)               r2 = Pointer to unit's Battle Stats
 
  00071e18: 3405183f ori r5,r0,0x183f
 
  00071e18: 3405183f ori r5,r0,0x183f
  00071e1c: 9046018a lbu r6,0x018a(r2)
+
  00071e1c: 9046018a lbu r6,0x018a(r2)               r6 = Load unit ID from Battle Stat offset 0x018a. This ID is used for reporting the name of the unit that leveled up.
 
  00071e20: 34020001 ori r2,r0,0x0001
 
  00071e20: 34020001 ori r2,r0,0x0001
 
  00071e24: afa20010 sw r2,0x0010(r29)
 
  00071e24: afa20010 sw r2,0x0010(r29)
  00071e28: 0c05066e jal 0x001419b8
+
  00071e28: 0c05066e jal 0x001419b8                   System function setup routine? Text Variable 1 is set to the Unit ID of the unit that leveled up here.
  00071e2c: 00c03821 addu r7,r6,r0
+
  00071e2c: 00c03821 addu r7,r6,r0                   r7 = Unit ID of unit that leveled up
  00071e30: 0c020b31 jal 0x00082cc4
+
  00071e30: 0c020b31 jal 0x00082cc4                   [[Set Level up/Job level up animations?]]
  00071e34: 02002021 addu r4,r16,r0
+
  00071e34: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
 
  00071e38: 0c01a0f9 jal 0x000683e4
 
  00071e38: 0c01a0f9 jal 0x000683e4
  00071e3c: 02002021 addu r4,r16,r0
+
  00071e3c: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
 
  00071e40: 0c01a2ad jal 0x00068ab4
 
  00071e40: 0c01a2ad jal 0x00068ab4
  00071e44: 02002021 addu r4,r16,r0
+
  00071e44: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
 
  00071e48: 0c010f48 jal 0x00043d20
 
  00071e48: 0c010f48 jal 0x00043d20
 
  00071e4c: 34040001 ori r4,r0,0x0001
 
  00071e4c: 34040001 ori r4,r0,0x0001

Latest revision as of 19:38, 4 May 2024

00071de8: 27bdffe0 addiu r29,r29,0xffe0
00071dec: afb00018 sw r16,0x0018(r29)
00071df0: 00808021 addu r16,r4,r0                   r16 = Misc Unit Data pointer for acting unit
00071df4: afbf001c sw r31,0x001c(r29)
00071df8: 920201b2 lbu r2,0x01b2(r16)               r2 = Misc Unit Data offset 0x1b2 - Level (For Level UP! event?)
00071dfc: 00000000 nop
00071e00: 10400014 beq r2,r0,0x00071e54             Branch to end if not leveling up
00071e04: 00001021 addu r2,r0,r0                    r2 = 0
00071e08: 0c04ebb7 jal 0x0013aedc
00071e0c: 340400b4 ori r4,r0,0x00b4
00071e10: 3404000a ori r4,r0,0x000a
00071e14: 8e020134 lw r2,0x0134(r16)                r2 = Pointer to unit's Battle Stats
00071e18: 3405183f ori r5,r0,0x183f
00071e1c: 9046018a lbu r6,0x018a(r2)                r6 = Load unit ID from Battle Stat offset 0x018a. This ID is used for reporting the name of the unit that leveled up.
00071e20: 34020001 ori r2,r0,0x0001
00071e24: afa20010 sw r2,0x0010(r29)
00071e28: 0c05066e jal 0x001419b8                   System function setup routine? Text Variable 1 is set to the Unit ID of the unit that leveled up here.
00071e2c: 00c03821 addu r7,r6,r0                    r7 = Unit ID of unit that leveled up
00071e30: 0c020b31 jal 0x00082cc4                   Set Level up/Job level up animations?
00071e34: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
00071e38: 0c01a0f9 jal 0x000683e4
00071e3c: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
00071e40: 0c01a2ad jal 0x00068ab4
00071e44: 02002021 addu r4,r16,r0                   r4 = Misc Unit Data pointer for acting unit
00071e48: 0c010f48 jal 0x00043d20
00071e4c: 34040001 ori r4,r0,0x0001
00071e50: 34020001 ori r2,r0,0x0001
00071e54: 8fbf001c lw r31,0x001c(r29)
00071e58: 8fb00018 lw r16,0x0018(r29)
00071e5c: 27bd0020 addiu r29,r29,0x0020
00071e60: 03e00008 jr r31
00071e64: 00000000 nop