From b42c3ce21db249d5e3bc04b4f73202e757da317c Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Fri, 18 Jun 2021 16:15:42 +0200 Subject: input_common/tas: Base playback & recording system The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called. The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate. Co-authored-by: Naii-the-Baf Co-authored-by: Narr-the-Reg --- src/input_common/main.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/input_common/main.h') diff --git a/src/input_common/main.h b/src/input_common/main.h index 5d6f26385..1d06fc5f5 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h @@ -29,6 +29,10 @@ namespace MouseInput { class Mouse; } +namespace TasInput { +class Tas; +} + namespace InputCommon { namespace Polling { @@ -64,6 +68,8 @@ class MouseButtonFactory; class MouseAnalogFactory; class MouseMotionFactory; class MouseTouchFactory; +class TasButtonFactory; +class TasAnalogFactory; class Keyboard; /** @@ -103,6 +109,11 @@ public: /// Retrieves the underlying mouse device. [[nodiscard]] const MouseInput::Mouse* GetMouse() const; + /// Retrieves the underlying tas device. + [[nodiscard]] TasInput::Tas* GetTas(); + + /// Retrieves the underlying tas device. + [[nodiscard]] const TasInput::Tas* GetTas() const; /** * Returns all available input devices that this Factory can create a new device with. * Each returned ParamPackage should have a `display` field used for display, a class field for @@ -168,6 +179,18 @@ public: /// Retrieves the underlying udp touch handler. [[nodiscard]] const MouseTouchFactory* GetMouseTouch() const; + /// Retrieves the underlying tas button handler. + [[nodiscard]] TasButtonFactory* GetTasButtons(); + + /// Retrieves the underlying tas button handler. + [[nodiscard]] const TasButtonFactory* GetTasButtons() const; + + /// Retrieves the underlying tas touch handler. + [[nodiscard]] TasAnalogFactory* GetTasAnalogs(); + + /// Retrieves the underlying tas touch handler. + [[nodiscard]] const TasAnalogFactory* GetTasAnalogs() const; + /// Reloads the input devices void ReloadInputDevices(); -- cgit v1.2.3 From e6c4bf52f0eb2c9c78e983ffbc667891463d3253 Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 27 Jun 2021 14:02:38 -0500 Subject: input_common/tas: Add swap controller --- src/input_common/main.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/input_common/main.h') diff --git a/src/input_common/main.h b/src/input_common/main.h index 1d06fc5f5..6390d3f09 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h @@ -155,28 +155,28 @@ public: /// Retrieves the underlying udp touch handler. [[nodiscard]] const UDPTouchFactory* GetUDPTouch() const; - /// Retrieves the underlying GameCube button handler. + /// Retrieves the underlying mouse button handler. [[nodiscard]] MouseButtonFactory* GetMouseButtons(); - /// Retrieves the underlying GameCube button handler. + /// Retrieves the underlying mouse button handler. [[nodiscard]] const MouseButtonFactory* GetMouseButtons() const; - /// Retrieves the underlying udp touch handler. + /// Retrieves the underlying mouse analog handler. [[nodiscard]] MouseAnalogFactory* GetMouseAnalogs(); - /// Retrieves the underlying udp touch handler. + /// Retrieves the underlying mouse analog handler. [[nodiscard]] const MouseAnalogFactory* GetMouseAnalogs() const; - /// Retrieves the underlying udp motion handler. + /// Retrieves the underlying mouse motion handler. [[nodiscard]] MouseMotionFactory* GetMouseMotions(); - /// Retrieves the underlying udp motion handler. + /// Retrieves the underlying mouse motion handler. [[nodiscard]] const MouseMotionFactory* GetMouseMotions() const; - /// Retrieves the underlying udp touch handler. + /// Retrieves the underlying mouse touch handler. [[nodiscard]] MouseTouchFactory* GetMouseTouch(); - /// Retrieves the underlying udp touch handler. + /// Retrieves the underlying mouse touch handler. [[nodiscard]] const MouseTouchFactory* GetMouseTouch() const; /// Retrieves the underlying tas button handler. @@ -185,10 +185,10 @@ public: /// Retrieves the underlying tas button handler. [[nodiscard]] const TasButtonFactory* GetTasButtons() const; - /// Retrieves the underlying tas touch handler. + /// Retrieves the underlying tas analogs handler. [[nodiscard]] TasAnalogFactory* GetTasAnalogs(); - /// Retrieves the underlying tas touch handler. + /// Retrieves the underlying tas analogs handler. [[nodiscard]] const TasAnalogFactory* GetTasAnalogs() const; /// Reloads the input devices -- cgit v1.2.3