Difference between revisions of "Image Loading Setup (0x14a5e8)"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
  #  ROUTINE: Image loading setup (0x14a5e8)
 
  #  ROUTINE: Image loading setup (0x14a5e8)
 
  #  Parameters:
 
  #  Parameters:
  #      r4 = (Display Data Pointer) Reference to struct for image display: 52 bytes
+
  #      r4 = (displayPointer) Reference to struct for image display: 52 bytes
 
   
 
   
 
  0014a5e8: 27bdffe8 addiu r29,r29,-0x0018
 
  0014a5e8: 27bdffe8 addiu r29,r29,-0x0018
Line 9: Line 9:
 
  0014a5f8: 10400005 beq r2,r0,0x0014a610        #  if (*0x80165ff2 != 0) {
 
  0014a5f8: 10400005 beq r2,r0,0x0014a610        #  if (*0x80165ff2 != 0) {
 
  0014a5fc: afbf0010 sw r31,0x0010(r29)
 
  0014a5fc: afbf0010 sw r31,0x0010(r29)
  0014a600: 0c0092f6 jal 0x00024bd8              #      ROUTINE: [[SYS DrawPrim]]
+
  0014a600: 0c0092f6 jal 0x00024bd8              #      ROUTINE: [[SYS DrawPrim]] (displayPointer);
 
  0014a604: 00000000 nop
 
  0014a604: 00000000 nop
 
  0014a608: 08052994 j 0x0014a650
 
  0014a608: 08052994 j 0x0014a650
Line 19: Line 19:
 
  0014a61c: 3c058017 lui r5,0x8017                 
 
  0014a61c: 3c058017 lui r5,0x8017                 
 
  0014a620: 8ca53f44 lw r5,0x3f44(r5)            #      *0x80173f44
 
  0014a620: 8ca53f44 lw r5,0x3f44(r5)            #      *0x80173f44
  0014a624: 8ce30000 lw r3,0x0000(r7)            #      *(Display Data Pointer)
+
  0014a624: 8ce30000 lw r3,0x0000(r7)            #      *(displayPointer)
 
  0014a628: 8ca20000 lw r2,0x0000(r5)            #      *(*0x80173f44)
 
  0014a628: 8ca20000 lw r2,0x0000(r5)            #      *(*0x80173f44)
  0014a62c: 00661824 and r3,r3,r6                #      *(Display Data Pointer) & 0xff000000
+
  0014a62c: 00661824 and r3,r3,r6                #      *displayPointer & 0xff000000
 
  0014a630: 00441024 and r2,r2,r4                #      *(*0x80173f44) & 0x00ffffff
 
  0014a630: 00441024 and r2,r2,r4                #      *(*0x80173f44) & 0x00ffffff
  0014a634: 00621825 or r3,r3,r2                  #      (*(Display Data Pointer) & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)
+
  0014a634: 00621825 or r3,r3,r2                  #      (*displayPointer & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)
  0014a638: ace30000 sw r3,0x0000(r7)            #      *(Display Data Pointer) = (*(Display Data Pointer) & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)    // This affects what gets displayed
+
  0014a638: ace30000 sw r3,0x0000(r7)            #      *displayPointer = (*displayPointer & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)    // This affects what gets displayed
 
  0014a63c: 8ca20000 lw r2,0x0000(r5)            #      *(*0x80173f44)
 
  0014a63c: 8ca20000 lw r2,0x0000(r5)            #      *(*0x80173f44)
  0014a640: 00e42024 and r4,r7,r4                #      (Display Data Pointer) & 0x00ffffff
+
  0014a640: 00e42024 and r4,r7,r4                #      displayPointer & 0x00ffffff
 
  0014a644: 00461024 and r2,r2,r6                #      *(*0x80173f44) & 0xff000000
 
  0014a644: 00461024 and r2,r2,r6                #      *(*0x80173f44) & 0xff000000
  0014a648: 00441025 or r2,r2,r4                  #      (*(*0x80173f44) & 0xff000000) | ((Display Data Pointer) & 0x00ffffff)
+
  0014a648: 00441025 or r2,r2,r4                  #      (*(*0x80173f44) & 0xff000000) | (displayPointer & 0x00ffffff)
  0014a64c: aca20000 sw r2,0x0000(r5)            #      *0x80173f44 = (*(*0x80173f44) & 0xff000000) | ((Display Data Pointer) & 0x00ffffff)    // Must store this or image doesn't load/display
+
  0014a64c: aca20000 sw r2,0x0000(r5)            #      *0x80173f44 = (*(*0x80173f44) & 0xff000000) | (displayPointer & 0x00ffffff)    // Must store this or image doesn't load/display
 
                                                 #  }
 
                                                 #  }
 
  0014a650: 8fbf0010 lw r31,0x0010(r29)
 
  0014a650: 8fbf0010 lw r31,0x0010(r29)

Latest revision as of 16:20, 29 October 2024

#   ROUTINE: Image loading setup (0x14a5e8)
#   Parameters:
#       r4 = (displayPointer) Reference to struct for image display: 52 bytes

0014a5e8: 27bdffe8 addiu r29,r29,-0x0018
0014a5ec: 3c028016 lui r2,0x8016
0014a5f0: 94425ff2 lhu r2,0x5ff2(r2)            #   *0x80165ff2
0014a5f4: 00803821 addu r7,r4,r0
0014a5f8: 10400005 beq r2,r0,0x0014a610         #   if (*0x80165ff2 != 0) {
0014a5fc: afbf0010 sw r31,0x0010(r29)
0014a600: 0c0092f6 jal 0x00024bd8               #       ROUTINE: SYS DrawPrim (displayPointer);
0014a604: 00000000 nop
0014a608: 08052994 j 0x0014a650
0014a60c: 00000000 nop
                                                #   } else {
0014a610: 3c0400ff lui r4,0x00ff
0014a614: 3484ffff ori r4,r4,0xffff             #       0x00ffffff
0014a618: 3c06ff00 lui r6,0xff00                #       0xff000000
0014a61c: 3c058017 lui r5,0x8017                
0014a620: 8ca53f44 lw r5,0x3f44(r5)             #       *0x80173f44
0014a624: 8ce30000 lw r3,0x0000(r7)             #       *(displayPointer)
0014a628: 8ca20000 lw r2,0x0000(r5)             #       *(*0x80173f44)
0014a62c: 00661824 and r3,r3,r6                 #       *displayPointer & 0xff000000
0014a630: 00441024 and r2,r2,r4                 #       *(*0x80173f44) & 0x00ffffff
0014a634: 00621825 or r3,r3,r2                  #       (*displayPointer & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)
0014a638: ace30000 sw r3,0x0000(r7)             #       *displayPointer = (*displayPointer & 0xff000000) | (*(*0x80173f44) & 0x00ffffff)    // This affects what gets displayed
0014a63c: 8ca20000 lw r2,0x0000(r5)             #       *(*0x80173f44)
0014a640: 00e42024 and r4,r7,r4                 #       displayPointer & 0x00ffffff
0014a644: 00461024 and r2,r2,r6                 #       *(*0x80173f44) & 0xff000000
0014a648: 00441025 or r2,r2,r4                  #       (*(*0x80173f44) & 0xff000000) | (displayPointer & 0x00ffffff)
0014a64c: aca20000 sw r2,0x0000(r5)             #       *0x80173f44 = (*(*0x80173f44) & 0xff000000) | (displayPointer & 0x00ffffff)     // Must store this or image doesn't load/display
                                                #   }
0014a650: 8fbf0010 lw r31,0x0010(r29)
0014a654: 27bd0018 addiu r29,r29,0x0018
0014a658: 03e00008 jr r31
0014a65c: 00000000 nop