Difference between revisions of "FF7/Field/Script/Opcodes/9F SEARCHX"

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Myst6re
 
m (2 revisions imported)
 
(One intermediate revision by one other user not shown)
(No difference)

Latest revision as of 05:18, 23 May 2019

  • Opcode: 0x9F
  • Short name: SEARCHX
  • Long name: Search into var map

Memory layout

0x9F B1 / B2 B3 / B4 0 / B6 Ofst Start End V R

Arguments

  • const Bit[4] B1: Bank where to look.
  • const Bit[4] B2: Bank to retrieve Start, or zero if Start is specified as a literal value.
  • const Bit[4] B3: Bank to retrieve End, or zero if End is specified as a literal value.
  • const Bit[4] B4: Bank to retrieve V, or zero if V is specified as a literal value.
  • const Bit[4] 0: Zero.
  • const Bit[4] B6: Bank to store Result.
  • const UByte Ofst: Offset.
  • const UShort Start: Start offset.
  • const UShort End: End offset.
  • const UByte V: Value to search.
  • const UByte R: Result adress.

Description

Search the value V between Ofst + Start and Ofst + End in the bank B1 and store the position in R if found, or -1 of not.