diff options
author | german77 <juangerman-13@hotmail.com> | 2021-07-26 03:52:19 +0200 |
---|---|---|
committer | MonsterDruide1 <5958456@gmail.com> | 2021-09-18 23:23:03 +0200 |
commit | 75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8 (patch) | |
tree | a11be198f5f4933a68c8cc5cfc183e08c3b01fcb /src/input_common/tas/tas_input.h | |
parent | input_common/tas: new update method (diff) | |
download | yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar.gz yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar.bz2 yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar.lz yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar.xz yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.tar.zst yuzu-75d8ec1e9f474ce6c2bfc0b8ebe574ca44f9f3d8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/tas/tas_input.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/input_common/tas/tas_input.h b/src/input_common/tas/tas_input.h index 52d000db4..3e2db8f00 100644 --- a/src/input_common/tas/tas_input.h +++ b/src/input_common/tas/tas_input.h @@ -13,8 +13,8 @@ /* To play back TAS scripts on Yuzu, select the folder with scripts in the configuration menu below -Emulation -> Configure TAS. The file itself has normal text format and has to be called -script0-1.txt for controller 1, script0-2.txt for controller 2 and so forth (with max. 8 players). +Tools -> Configure TAS. The file itself has normal text format and has to be called script0-1.txt +for controller 1, script0-2.txt for controller 2 and so forth (with max. 8 players). A script file has the same format as TAS-nx uses, so final files will look like this: @@ -56,26 +56,26 @@ enum class TasState { }; enum class TasButton : u32 { - BUTTON_A = 0x000001, - BUTTON_B = 0x000002, - BUTTON_X = 0x000004, - BUTTON_Y = 0x000008, - STICK_L = 0x000010, - STICK_R = 0x000020, - TRIGGER_L = 0x000040, - TRIGGER_R = 0x000080, - TRIGGER_ZL = 0x000100, - TRIGGER_ZR = 0x000200, - BUTTON_PLUS = 0x000400, - BUTTON_MINUS = 0x000800, - BUTTON_LEFT = 0x001000, - BUTTON_UP = 0x002000, - BUTTON_RIGHT = 0x004000, - BUTTON_DOWN = 0x008000, - BUTTON_SL = 0x010000, - BUTTON_SR = 0x020000, - BUTTON_HOME = 0x040000, - BUTTON_CAPTURE = 0x080000, + BUTTON_A = 1U << 0, + BUTTON_B = 1U << 1, + BUTTON_X = 1U << 2, + BUTTON_Y = 1U << 3, + STICK_L = 1U << 4, + STICK_R = 1U << 5, + TRIGGER_L = 1U << 6, + TRIGGER_R = 1U << 7, + TRIGGER_ZL = 1U << 8, + TRIGGER_ZR = 1U << 9, + BUTTON_PLUS = 1U << 10, + BUTTON_MINUS = 1U << 11, + BUTTON_LEFT = 1U << 12, + BUTTON_UP = 1U << 13, + BUTTON_RIGHT = 1U << 14, + BUTTON_DOWN = 1U << 15, + BUTTON_SL = 1U << 16, + BUTTON_SR = 1U << 17, + BUTTON_HOME = 1U << 18, + BUTTON_CAPTURE = 1U << 19, }; enum class TasAxes : u8 { @@ -105,6 +105,9 @@ public: // Sets the flag to start or stop the TAS command excecution and swaps controllers profiles void StartStop(); + // Stop the TAS and reverts any controller profile + void Stop(); + // Sets the flag to reload the file and start from the begining in the next update void Reset(); @@ -219,6 +222,7 @@ private: size_t script_length{0}; std::array<TasData, PLAYER_NUMBER> tas_data; + bool is_old_input_saved{false}; bool is_recording{false}; bool is_running{false}; bool needs_reset{false}; |