Difference between revisions of "Ability Preview handling"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00076c50: 27bdffe8 addiu r29,r29,0xffe8 00076c54: afbf0014 sw r31,0x0014(r29) 00076c58: 0c01e886 jal 0x0007a218 00076c5c: afb00010 sw r16,0x001...")
 
m (Nyzer moved page 00076c50 - 00076d80 to Ability Preview handling: Giving it a title)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
  00076c50: 27bdffe8 addiu r29,r29,0xffe8
 
  00076c50: 27bdffe8 addiu r29,r29,0xffe8
 
  00076c54: afbf0014 sw r31,0x0014(r29)
 
  00076c54: afbf0014 sw r31,0x0014(r29)
  00076c58: 0c01e886 jal 0x0007a218
+
  00076c58: 0c01e886 jal 0x0007a218                 # [[Get Casting units Misc Data]]
 
  00076c5c: afb00010 sw r16,0x0010(r29)
 
  00076c5c: afb00010 sw r16,0x0010(r29)
 
  00076c60: 00408021 addu r16,r2,r0
 
  00076c60: 00408021 addu r16,r2,r0
  00076c64: 9202013d lbu r2,0x013d(r16)
+
  00076c64: 9202013d lbu r2,0x013d(r16)             # r2 = Misc Data byte 0x13D: ENTD flags from unit data
 
  00076c68: 00000000 nop
 
  00076c68: 00000000 nop
  00076c6c: 30420008 andi r2,r2,0x0008
+
  00076c6c: 30420008 andi r2,r2,0x0008             # r2 = Flag 0x08 (Control)
  00076c70: 10400029 beq r2,r0,0x00076d18
+
  00076c70: 10400029 beq r2,r0,0x00076d18           # Branch if the caster is AI controlled
 
  00076c74: 00000000 nop
 
  00076c74: 00000000 nop
 
  00076c78: 0c01bca3 jal 0x0006f28c
 
  00076c78: 0c01bca3 jal 0x0006f28c
Line 18: Line 18:
 
  00076c8c: 00000000 nop
 
  00076c8c: 00000000 nop
 
  00076c90: 3c038004 lui r3,0x8004
 
  00076c90: 3c038004 lui r3,0x8004
  00076c94: 8c63594c lw r3,0x594c(r3)
+
  00076c94: 8c63594c lw r3,0x594c(r3)               # Check the button that was pressed
 
  00076c98: 00000000 nop
 
  00076c98: 00000000 nop
  00076c9c: 30620020 andi r2,r3,0x0020
+
  00076c9c: 30620020 andi r2,r3,0x0020             # Check if O
  00076ca0: 14400023 bne r2,r0,0x00076d30
+
  00076ca0: 14400023 bne r2,r0,0x00076d30           # Branch if O was pressed
  00076ca4: 30620040 andi r2,r3,0x0040
+
  00076ca4: 30620040 andi r2,r3,0x0040             # Check if X
  00076ca8: 10400029 beq r2,r0,0x00076d50
+
  00076ca8: 10400029 beq r2,r0,0x00076d50           # Branch if neither X nor O
 
  00076cac: 34040008 ori r4,r0,0x0008
 
  00076cac: 34040008 ori r4,r0,0x0008
 
  00076cb0: 3c028009 lui r2,0x8009
 
  00076cb0: 3c028009 lui r2,0x8009
Line 79: Line 79:
 
  00076d80: 00000000 nop
 
  00076d80: 00000000 nop
 
</font>
 
</font>
 +
 +
== Return Locations ==
 +
 +
00079de4: [[Game Flow Control routine]]

Latest revision as of 16:40, 22 December 2024

00076c50: 27bdffe8 addiu r29,r29,0xffe8
00076c54: afbf0014 sw r31,0x0014(r29)
00076c58: 0c01e886 jal 0x0007a218                 # Get Casting units Misc Data
00076c5c: afb00010 sw r16,0x0010(r29)
00076c60: 00408021 addu r16,r2,r0
00076c64: 9202013d lbu r2,0x013d(r16)             # r2 = Misc Data byte 0x13D: ENTD flags from unit data
00076c68: 00000000 nop
00076c6c: 30420008 andi r2,r2,0x0008              # r2 = Flag 0x08 (Control)
00076c70: 10400029 beq r2,r0,0x00076d18           # Branch if the caster is AI controlled
00076c74: 00000000 nop
00076c78: 0c01bca3 jal 0x0006f28c
00076c7c: 00000000 nop
00076c80: 0c01bd8d jal 0x0006f634
00076c84: 00000000 nop
00076c88: 0c01be5a jal 0x0006f968
00076c8c: 00000000 nop
00076c90: 3c038004 lui r3,0x8004
00076c94: 8c63594c lw r3,0x594c(r3)               # Check the button that was pressed
00076c98: 00000000 nop
00076c9c: 30620020 andi r2,r3,0x0020              # Check if O
00076ca0: 14400023 bne r2,r0,0x00076d30           # Branch if O was pressed
00076ca4: 30620040 andi r2,r3,0x0040              # Check if X
00076ca8: 10400029 beq r2,r0,0x00076d50           # Branch if neither X nor O
00076cac: 34040008 ori r4,r0,0x0008
00076cb0: 3c028009 lui r2,0x8009
00076cb4: 8c4260c4 lw r2,0x60c4(r2)
00076cb8: 3c018009 lui r1,0x8009
00076cbc: ac2260c0 sw r2,0x60c0(r1)
00076cc0: 0c03b1c6 jal 0x000ec718
00076cc4: 34050003 ori r5,r0,0x0003
00076cc8: 8e030174 lw r3,0x0174(r16)
00076ccc: 34020002 ori r2,r0,0x0002
00076cd0: 14620009 bne r3,r2,0x00076cf8
00076cd4: 00002021 addu r4,r0,r0
00076cd8: 0c03b1c6 jal 0x000ec718
00076cdc: 34050003 ori r5,r0,0x0003
00076ce0: 0c01a125 jal 0x00068494
00076ce4: 00000000 nop
00076ce8: 0c01c4e8 jal 0x000713a0
00076cec: 00000000 nop
00076cf0: 0801db54 j 0x00076d50
00076cf4: 00000000 nop
00076cf8: 0c03b1c6 jal 0x000ec718
00076cfc: 34050003 ori r5,r0,0x0003
00076d00: 0c01a125 jal 0x00068494
00076d04: 00000000 nop
00076d08: 0c01d132 jal 0x000744c8
00076d0c: 00000000 nop
00076d10: 0801db54 j 0x00076d50
00076d14: 00000000 nop
00076d18: 96020008 lhu r2,0x0008(r16)
00076d1c: 00000000 nop
00076d20: 24430001 addiu r3,r2,0x0001
00076d24: 2c42001f sltiu r2,r2,0x001f
00076d28: 14400009 bne r2,r0,0x00076d50
00076d2c: a6030008 sh r3,0x0008(r16)
00076d30: 3c028009 lui r2,0x8009
00076d34: 8c4260c4 lw r2,0x60c4(r2)
00076d38: 3c018009 lui r1,0x8009
00076d3c: ac2260c0 sw r2,0x60c0(r1)
00076d40: 0c01a125 jal 0x00068494
00076d44: 00000000 nop
00076d48: 0c01d16b jal 0x000745ac
00076d4c: 00000000 nop
00076d50: 0c01d2eb jal 0x00074bac
00076d54: 00000000 nop
00076d58: 0c011298 jal 0x00044a60
00076d5c: 00000000 nop
00076d60: 3c058004 lui r5,0x8004
00076d64: 8ca55944 lw r5,0x5944(r5)
00076d68: 0c04fd48 jal 0x0013f520
00076d6c: 00402021 addu r4,r2,r0
00076d70: 8fbf0014 lw r31,0x0014(r29)
00076d74: 8fb00010 lw r16,0x0010(r29)
00076d78: 27bd0018 addiu r29,r29,0x0018
00076d7c: 03e00008 jr r31
00076d80: 00000000 nop

Return Locations

00079de4: Game Flow Control routine