Turn Preview Stats Window on/off

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

001156b4: 27bdffe8 addiu r29,r29,0xffe8
001156b8: afbf0014 sw r31,0x0014(r29)
001156bc: afb00010 sw r16,0x0010(r29)
001156c0: 00808021 addu r16,r4,r0
001156c4: 12000017 beq r16,r0,0x00115724			#if preview box is 0, skip ahead
001156c8: 00000000 nop
001156cc: 3c028019 lui r2,0x8019
001156d0: 8c42ba34 lw r2,-0x45cc(r2)
001156d4: 00000000 nop
001156d8: 30420060 andi r2,r2,0x0060				#check for 0x40 and 0x20 flags (0x40 slides portrait, zodiac, brave/faith, hp/mp/ct window up, 0x20 slides it down. 0x80 makes it vanish)
001156dc: 14400013 bne r2,r0,0x0011572c			#branch if they exist
001156e0: 34100001 ori r16,r0,0x0001				#set flag here to 1
001156e4: 0c03ffbb jal 0x000ffeec				#Check Thread Running Status (WORLD.BIN) - check if preview stats window is running
001156e8: 3404000b ori r4,r0,0x000b				#r4 input = 0xb
001156ec: 1440000f bne r2,r0,0x0011572c			#branch if thread 0xb is running
001156f0: 00000000 nop
001156f4: 3c058011 lui r5,0x8011
001156f8: 24a51ec4 addiu r5,r5,0x1ec4
001156fc: 0c03ff5c jal 0x000ffd70                              # 000ffd70 - 000ffdf0 turns thread b on, among other things
00115700: 3404000b ori r4,r0,0x000b
00115704: 3404000b ori r4,r0,0x000b
00115708: 3c058019 lui r5,0x8019
0011570c: 24a5bab8 addiu r5,r5,0xbab8                          # 0x8019bab8
00115710: 00003021 addu r6,r0,r0
00115714: 0c03ffc2 jal 0x000fff08                              # Store Thread Function Parameters (WORLD.BIN) (b, 8019bab8, 0, 0)
00115718: 00003821 addu r7,r0,r0
0011571c: 080455cb j 0x0011572c
00115720: 00000000 nop
00115724: 0c04a966 jal 0x0012a598                              # 0012a598 - 0012a5bc sets all thread parameters to 0, except p3, which it sets to 1. turns off preview menu?
00115728: 3404000b ori r4,r0,0x000b
0011572c: 3c018019 lui r1,0x8019
00115730: ac30bab4 sw r16,-0x454c(r1)				#store flag here as enabled/disabled?
00115734: 3c018019 lui r1,0x8019
00115738: ac30aa88 sw r16,-0x5578(r1)
0011573c: 8fbf0014 lw r31,0x0014(r29)
00115740: 8fb00010 lw r16,0x0010(r29)
00115744: 27bd0018 addiu r29,r29,0x0018
00115748: 03e00008 jr r31
0011574c: 00000000 nop