Changes

Jump to navigation Jump to search

FF7/Field/Script/Opcodes/9F SEARCHX

1,292 bytes added, 00:41, 3 September 2012
no edit summary
* Opcode: '''0x9F'''
* Short name: '''SEARCHX'''
* Long name: Search into var map

==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0x9F
! width="50" | ''B1 / B2''
! width="50" | ''B3 / B4''
! width="50" | ''0 / B6''
! width="40" | ''Ofst''
! width="80" | ''Start''
! width="80" | ''End''
! width="40" | ''V''
! width="40" | ''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.
Anonymous user

Navigation menu