Difference between revisions of "FF7/Field/Script/Opcodes/C1 AXYZI"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Synergy Blades
(Memory layout: make table fit sizes)
m (4 revisions imported)
 
(2 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
! width="50" | ''B3 / B4''
 
! width="50" | ''B3 / B4''
 
! width="40" | ''A''
 
! width="40" | ''A''
! width="80" | ''X''
+
! width="40" | ''X''
! width="80" | ''Y''
+
! width="40" | ''Y''
! width="80" | ''Z''
+
! width="40" | ''Z''
! width="80" | ''I''
+
! width="40" | ''I''
 
|}
 
|}
  
Line 21: Line 21:
 
* '''const Bit[4]''' ''B3'': Bank to store ''Z''.
 
* '''const Bit[4]''' ''B3'': Bank to store ''Z''.
 
* '''const Bit[4]''' ''B4'': Bank to store ''I''.
 
* '''const Bit[4]''' ''B4'': Bank to store ''I''.
* '''const Byte''' ''A'': Entity ID whose field object will have its position retrieved from.
+
* '''const UByte''' ''A'': Entity ID whose field object will have its position retrieved from.
* '''const Short''' ''X'': Address to store the X-coordinate of the entity's object.
+
* '''const UByte''' ''X'': Address to store the X-coordinate of the entity's object.
* '''const Short''' ''Y'': Address to store the Y-coordinate of the entity's object.
+
* '''const UByte''' ''Y'': Address to store the Y-coordinate of the entity's object.
* '''const Short''' ''Z'': Address to store the Z-coordinate of the entity's object.
+
* '''const UByte''' ''Z'': Address to store the Z-coordinate of the entity's object.
* '''const UShort''' ''I'': Address to store the ID of the walkmesh triangle the object is standing on.
+
* '''const UByte''' ''I'': Address to store the ID of the walkmesh triangle the object is standing on.
  
 
==== Description ====
 
==== Description ====
  
 
Retrieves the coordinates of the field object that the entity, whose ID specified in ''A'', is associated with. This opcode uses an entity ID, not a field object offset; as such, if an entity ID is given that does not have a field object, this opcode will store zero in each of the four address specified.
 
Retrieves the coordinates of the field object that the entity, whose ID specified in ''A'', is associated with. This opcode uses an entity ID, not a field object offset; as such, if an entity ID is given that does not have a field object, this opcode will store zero in each of the four address specified.

Latest revision as of 05:18, 23 May 2019

  • Opcode: 0xC1
  • Short name: AXYZI
  • Long name: Entity Get Position

Memory layout

0xC1 B1 / B2 B3 / B4 A X Y Z I

Arguments

  • const Bit[4] B1: Bank to store X.
  • const Bit[4] B2: Bank to store Y.
  • const Bit[4] B3: Bank to store Z.
  • const Bit[4] B4: Bank to store I.
  • const UByte A: Entity ID whose field object will have its position retrieved from.
  • const UByte X: Address to store the X-coordinate of the entity's object.
  • const UByte Y: Address to store the Y-coordinate of the entity's object.
  • const UByte Z: Address to store the Z-coordinate of the entity's object.
  • const UByte I: Address to store the ID of the walkmesh triangle the object is standing on.

Description

Retrieves the coordinates of the field object that the entity, whose ID specified in A, is associated with. This opcode uses an entity ID, not a field object offset; as such, if an entity ID is given that does not have a field object, this opcode will store zero in each of the four address specified.