Difference between revisions of "0018e660 - 0018e6b4"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
  0018e660: 27bdffe8 addiu r29,r29,0xffe8
 
  0018e660: 27bdffe8 addiu r29,r29,0xffe8
 
  0018e664: afbf0010 sw r31,0x0010(r29)
 
  0018e664: afbf0010 sw r31,0x0010(r29)
  0018e668: 0c04ed64 jal 0x0013b590               [[Unknown 1]]
+
  0018e668: 0c04ed64 jal 0x0013b590 [[Unknown 1]] // probably an executable map command that grabs weather. like steal gil refers to overworld gil amount
 
  0018e66c: 34040023 ori r4,r0,0x0023
 
  0018e66c: 34040023 ori r4,r0,0x0023
 
  0018e670: 3c04800b lui r4,0x800b
 
  0018e670: 3c04800b lui r4,0x800b
  0018e674: 8c846698 lw r4,0x6698(r4)
+
  0018e674: 8c846698 lw r4,0x6698(r4) weather palette mods
  0018e678: 00401821 addu r3,r2,r0
+
  0018e678: 00401821 addu r3,r2,r0 r3 = output (raw weather?)
  0018e67c: 30820002 andi r2,r4,0x0002
+
  0018e67c: 30820002 andi r2,r4,0x0002 r2 = 0x2 palette mod bitflag
  0018e680: 14400009 bne r2,r0,0x0018e6a8
+
  0018e680: 14400009 bne r2,r0,0x0018e6a8 branch if 0x2 bitflag is true (ignore weather? (useful for inside of buildings, or specific events that require dry weather?))
  0018e684: 00001021 addu r2,r0,r0
+
  0018e684: 00001021 addu r2,r0,r0 return 0
  0018e688: 28620002 slti r2,r3,0x0002
+
  0018e688: 28620002 slti r2,r3,0x0002 r2 = true if weather < 2 (not storming, snowing, or raining, among other things?)
  0018e68c: 14400006 bne r2,r0,0x0018e6a8
+
  0018e68c: 14400006 bne r2,r0,0x0018e6a8 branch if weather < 2
  0018e690: 00601021 addu r2,r3,r0
+
  0018e690: 00601021 addu r2,r3,r0 return 0
  0018e694: 30820001 andi r2,r4,0x0001
+
  0018e694: 30820001 andi r2,r4,0x0001 r2 = 0x1 palette mod bitflag
  0018e698: 10400003 beq r2,r0,0x0018e6a8
+
  0018e698: 10400003 beq r2,r0,0x0018e6a8 branch if 0x1 bitflag is false (ignore time of day? (probably useful for events or inside buildings))
  0018e69c: 00601021 addu r2,r3,r0
+
  0018e69c: 00601021 addu r2,r3,r0 r2 = weather
  0018e6a0: 24630003 addiu r3,r3,0x0003
+
  0018e6a0: 24630003 addiu r3,r3,0x0003 add 3 to weather
  0018e6a4: 00601021 addu r2,r3,r0
+
  0018e6a4: 00601021 addu r2,r3,r0 r2 = weather + 3 (night weather? if snowing, will not boost ice damage. weird flex but okay)
 
  0018e6a8: 8fbf0010 lw r31,0x0010(r29)
 
  0018e6a8: 8fbf0010 lw r31,0x0010(r29)
 
  0018e6ac: 27bd0018 addiu r29,r29,0x0018
 
  0018e6ac: 27bd0018 addiu r29,r29,0x0018
 
  0018e6b0: 03e00008 jr r31
 
  0018e6b0: 03e00008 jr r31
 
  0018e6b4: 00000000 nop
 
  0018e6b4: 00000000 nop

Revision as of 06:55, 1 January 2022

Used in Weather Elemental effects routine.  Credit goes to Dokurider for finding it for me.
0018e660: 27bdffe8 addiu r29,r29,0xffe8
0018e664: afbf0010 sw r31,0x0010(r29)
0018e668: 0c04ed64 jal 0x0013b590			Unknown 1 // probably an executable map command that grabs weather. like steal gil refers to overworld gil amount
0018e66c: 34040023 ori r4,r0,0x0023
0018e670: 3c04800b lui r4,0x800b
0018e674: 8c846698 lw r4,0x6698(r4)		weather palette mods
0018e678: 00401821 addu r3,r2,r0		r3 = output (raw weather?)
0018e67c: 30820002 andi r2,r4,0x0002		r2 = 0x2 palette mod bitflag
0018e680: 14400009 bne r2,r0,0x0018e6a8		branch if 0x2 bitflag is true (ignore weather? (useful for inside of buildings, or specific events that require dry weather?))
0018e684: 00001021 addu r2,r0,r0		return 0
0018e688: 28620002 slti r2,r3,0x0002		r2 = true if weather < 2 (not storming, snowing, or raining, among other things?)
0018e68c: 14400006 bne r2,r0,0x0018e6a8		branch if weather < 2
0018e690: 00601021 addu r2,r3,r0		return 0
0018e694: 30820001 andi r2,r4,0x0001		r2 = 0x1 palette mod bitflag
0018e698: 10400003 beq r2,r0,0x0018e6a8		branch if 0x1 bitflag is false (ignore time of day? (probably useful for events or inside buildings))
0018e69c: 00601021 addu r2,r3,r0		r2 = weather
0018e6a0: 24630003 addiu r3,r3,0x0003		add 3 to weather
0018e6a4: 00601021 addu r2,r3,r0		r2 = weather + 3 (night weather? if snowing, will not boost ice damage. weird flex but okay)
0018e6a8: 8fbf0010 lw r31,0x0010(r29)
0018e6ac: 27bd0018 addiu r29,r29,0x0018
0018e6b0: 03e00008 jr r31
0018e6b4: 00000000 nop