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 <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
This commit is contained in:
MonsterDruide1 2021-06-18 16:15:42 +02:00
parent 35f46fc079
commit b42c3ce21d
14 changed files with 818 additions and 9 deletions

View file

@ -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();