Difference between revisions of "Build Main menu"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00140908: 27bdffe0 addiu r29,r29,0xffe0 0014090c: afbf0018 sw r31,0x0018(r29) 00140910: afb10014 sw r17,0x0014(r29) 00140914: 0c0532f0 jal 0x00...")
 
m (Talcall moved page 00140908 - 0014097c to Build Main menu)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
  0014090c: afbf0018 sw r31,0x0018(r29)
 
  0014090c: afbf0018 sw r31,0x0018(r29)
 
  00140910: afb10014 sw r17,0x0014(r29)
 
  00140910: afb10014 sw r17,0x0014(r29)
  00140914: 0c0532f0 jal 0x0014cbc0
+
  00140914: 0c0532f0 jal 0x0014cbc0                 [[Get First Thread Parameter]] <-- [[00137c10 - 00137ed0]] pointer to current menu
 
  00140918: afb00010 sw r16,0x0010(r29)
 
  00140918: afb00010 sw r16,0x0010(r29)
 
  0014091c: 34040001 ori r4,r0,0x0001
 
  0014091c: 34040001 ori r4,r0,0x0001
  00140920: 00408821 addu r17,r2,r0
+
  00140920: 00408821 addu r17,r2,r0                 r17 = current menu pointer
 
  00140924: 3c028015 lui r2,0x8015
 
  00140924: 3c028015 lui r2,0x8015
  00140928: 2442d46c addiu r2,r2,0xd46c
+
  00140928: 2442d46c addiu r2,r2,0xd46c             0x8014d46c (unit menu data (contains scroll information of main menu.))
 
  0014092c: 3c038017 lui r3,0x8017
 
  0014092c: 3c038017 lui r3,0x8017
  00140930: 8c634038 lw r3,0x4038(r3)
+
  00140930: 8c634038 lw r3,0x4038(r3)               load current thread ID
 
  00140934: 3c058015 lui r5,0x8015
 
  00140934: 3c058015 lui r5,0x8015
  00140938: 84a5d08a lh r5,-0x2f76(r5)
+
  00140938: 84a5d08a lh r5,-0x2f76(r5)              0x8014d08a (menu index?)
 
  0014093c: 00031a80 sll r3,r3,0x0a
 
  0014093c: 00031a80 sll r3,r3,0x0a
 
  00140940: 00058100 sll r16,r5,0x04
 
  00140940: 00058100 sll r16,r5,0x04
  00140944: 02058021 addu r16,r16,r5
+
  00140944: 02058021 addu r16,r16,r5               unit index * 0x11
 
  00140948: 3c018017 lui r1,0x8017
 
  00140948: 3c018017 lui r1,0x8017
 
  0014094c: 00230821 addu r1,r1,r3
 
  0014094c: 00230821 addu r1,r1,r3
  00140950: ac249870 sw r4,-0x6790(r1)
+
  00140950: ac249870 sw r4,-0x6790(r1)             store 1 here
  00140954: 0c04e3b6 jal 0x00138ed8
+
  00140954: 0c04e3b6 jal 0x00138ed8                 [[Display Simple Selection Menu]]    <-- displays the menu
  00140958: 02028021 addu r16,r16,r2
+
  00140958: 02028021 addu r16,r16,r2               current menu + select index * 0x11
  0014095c: 92220038 lbu r2,0x0038(r17)
+
  0014095c: 92220038 lbu r2,0x0038(r17)             ID of current menu
  00140960: 0c053256 jal 0x0014c958
+
  00140960: 0c053256 jal 0x0014c958                 [[Disable Move/Act based on menu ID]] <-- grey out menu text
  00140964: a2020000 sb r2,0x0000(r16)
+
  00140964: a2020000 sb r2,0x0000(r16)             store index in new menu?
 
  00140968: 8fbf0018 lw r31,0x0018(r29)
 
  00140968: 8fbf0018 lw r31,0x0018(r29)
 
  0014096c: 8fb10014 lw r17,0x0014(r29)
 
  0014096c: 8fb10014 lw r17,0x0014(r29)

Latest revision as of 05:25, 28 April 2024

00140908: 27bdffe0 addiu r29,r29,0xffe0
0014090c: afbf0018 sw r31,0x0018(r29)
00140910: afb10014 sw r17,0x0014(r29)
00140914: 0c0532f0 jal 0x0014cbc0                 Get First Thread Parameter <-- 00137c10 - 00137ed0 pointer to current menu
00140918: afb00010 sw r16,0x0010(r29)
0014091c: 34040001 ori r4,r0,0x0001
00140920: 00408821 addu r17,r2,r0                 r17 = current menu pointer
00140924: 3c028015 lui r2,0x8015
00140928: 2442d46c addiu r2,r2,0xd46c             0x8014d46c (unit menu data (contains scroll information of main menu.))
0014092c: 3c038017 lui r3,0x8017
00140930: 8c634038 lw r3,0x4038(r3)               load current thread ID
00140934: 3c058015 lui r5,0x8015
00140938: 84a5d08a lh r5,-0x2f76(r5)              0x8014d08a (menu index?)
0014093c: 00031a80 sll r3,r3,0x0a
00140940: 00058100 sll r16,r5,0x04
00140944: 02058021 addu r16,r16,r5                unit index * 0x11
00140948: 3c018017 lui r1,0x8017
0014094c: 00230821 addu r1,r1,r3
00140950: ac249870 sw r4,-0x6790(r1)              store 1 here
00140954: 0c04e3b6 jal 0x00138ed8                 Display Simple Selection Menu     <-- displays the menu
00140958: 02028021 addu r16,r16,r2                current menu + select index * 0x11
0014095c: 92220038 lbu r2,0x0038(r17)             ID of current menu
00140960: 0c053256 jal 0x0014c958                 Disable Move/Act based on menu ID <-- grey out menu text
00140964: a2020000 sb r2,0x0000(r16)              store index in new menu?
00140968: 8fbf0018 lw r31,0x0018(r29)
0014096c: 8fb10014 lw r17,0x0014(r29)
00140970: 8fb00010 lw r16,0x0010(r29)
00140974: 27bd0020 addiu r29,r29,0x0020
00140978: 03e00008 jr r31
0014097c: 00000000 nop