Difference between revisions of "Store Menu Parameters"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "# ROUTINE: STORE MENU PARAMETERS # Parameters: # r4 = (p1) Menu block entry ID # r5 = (p2) Value to store at offset 0 # r6 = (p3) Value t...")
 
 
Line 1: Line 1:
#  ROUTINE: STORE MENU PARAMETERS
+
#  ROUTINE: STORE MENU PARAMETERS
#      Parameters:
+
#      Parameters:
#          r4 = (p1) Menu block entry ID
+
#          r4 = (p1) Menu block entry ID
#          r5 = (p2) Value to store at offset 0
+
#          r5 = (p2) Value to store at offset 0
#          r6 = (p3) Value to store at offset 4 (Combined text index?)
+
#          r6 = (p3) Value to store at offset 4 (Combined text index?)
#          r7 = (p4) Value to store at offset 8
+
#          r7 = (p4) Value to store at offset 8
 
+
8014ca38: 3c028016 lui r2,0x8016
+
8014ca38: 3c028016 lui r2,0x8016
8014ca3c: 8c425f98 lw r2,0x5f98(r2)        #  *0x80165f98
+
8014ca3c: 8c425f98 lw r2,0x5f98(r2)        #  *0x80165f98
8014ca40: 00042280 sll r4,r4,0x0a          #  p1 * 1024
+
8014ca40: 00042280 sll r4,r4,0x0a          #  p1 * 1024
8014ca44: 00822021 addu r4,r4,r2            #  ptr = (*0x80165f98 + (p1 * 1024))
+
8014ca44: 00822021 addu r4,r4,r2            #  ptr = (*0x80165f98 + (p1 * 1024))
8014ca48: ac850000 sw r5,0x0000(r4)        #  *ptr = p2
+
8014ca48: ac850000 sw r5,0x0000(r4)        #  *ptr = p2
8014ca4c: ac860004 sw r6,0x0004(r4)        #  *(ptr + 4) = p3
+
8014ca4c: ac860004 sw r6,0x0004(r4)        #  *(ptr + 4) = p3
8014ca50: 03e00008 jr r31
+
8014ca50: 03e00008 jr r31
8014ca54: ac870008 sw r7,0x0008(r4)        #  *(ptr + 8) = p4
+
8014ca54: ac870008 sw r7,0x0008(r4)        #  *(ptr + 8) = p4

Latest revision as of 16:30, 29 November 2016

#   ROUTINE: STORE MENU PARAMETERS
#       Parameters:
#           r4 = (p1) Menu block entry ID
#           r5 = (p2) Value to store at offset 0
#           r6 = (p3) Value to store at offset 4 (Combined text index?)
#           r7 = (p4) Value to store at offset 8

8014ca38: 3c028016 lui r2,0x8016
8014ca3c: 8c425f98 lw r2,0x5f98(r2)         #   *0x80165f98
8014ca40: 00042280 sll r4,r4,0x0a           #   p1 * 1024
8014ca44: 00822021 addu r4,r4,r2            #   ptr = (*0x80165f98 + (p1 * 1024))
8014ca48: ac850000 sw r5,0x0000(r4)         #   *ptr = p2
8014ca4c: ac860004 sw r6,0x0004(r4)         #   *(ptr + 4) = p3
8014ca50: 03e00008 jr r31
8014ca54: ac870008 sw r7,0x0008(r4)         #   *(ptr + 8) = p4