KEYSCAN.cs 952 B

12345678910111213141516171819202122232425262728
  1. namespace OpenVIII.Fields.Scripts.Instructions
  2. {
  3. /// <summary>
  4. /// <para>Scan for pressed key</para>
  5. /// <para>Writes 1 to temporary variable 0 (access with PSHI_L 0) if the user is pressing any of the indicated keys. 0 otherwise. The script does not pause while doing this, so you have to run it in a touch or push script, or inside a looping subroutine.</para>
  6. /// </summary>
  7. /// <see cref="http://wiki.ffrtt.ru/index.php?title=FF8/Field/Script/Opcodes/06D_KEYSCAN"/>
  8. public sealed class KEYSCAN : Abstract.KEY
  9. {
  10. #region Constructors
  11. public KEYSCAN(KeyFlags flags) : base(flags)
  12. {
  13. }
  14. public KEYSCAN(int parameter, IStack<IJsmExpression> stack) : base(parameter, stack)
  15. {
  16. }
  17. #endregion Constructors
  18. #region Methods
  19. public override string ToString() => $"{nameof(KEYSCAN)}({nameof(_flags)}: {_flags})";
  20. #endregion Methods
  21. }
  22. }