forked from ShuriZma/suyu
tas_input: Amend -Wdocumentation warnings
Parameters shouldn't have the colon by their name.
This commit is contained in:
parent
c126b0718c
commit
d52ad96ce3
|
@ -238,13 +238,13 @@ TasAnalog Tas::ReadCommandAxis(const std::string& line) const {
|
||||||
return {x, y};
|
return {x, y};
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 Tas::ReadCommandButtons(const std::string& data) const {
|
u64 Tas::ReadCommandButtons(const std::string& line) const {
|
||||||
std::stringstream button_text(data);
|
std::stringstream button_text(line);
|
||||||
std::string line;
|
std::string button_line;
|
||||||
u64 buttons = 0;
|
u64 buttons = 0;
|
||||||
while (std::getline(button_text, line, ';')) {
|
while (std::getline(button_text, button_line, ';')) {
|
||||||
for (auto [text, tas_button] : text_to_tas_button) {
|
for (auto [text, tas_button] : text_to_tas_button) {
|
||||||
if (text == line) {
|
if (text == button_line) {
|
||||||
buttons |= static_cast<u64>(tas_button);
|
buttons |= static_cast<u64>(tas_button);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,39 +88,39 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the input status that will be stored in each frame
|
* Changes the input status that will be stored in each frame
|
||||||
* @param buttons: bitfield with the status of the buttons
|
* @param buttons Bitfield with the status of the buttons
|
||||||
* @param left_axis: value of the left axis
|
* @param left_axis Value of the left axis
|
||||||
* @param right_axis: value of the right axis
|
* @param right_axis Value of the right axis
|
||||||
*/
|
*/
|
||||||
void RecordInput(u64 buttons, TasAnalog left_axis, TasAnalog right_axis);
|
void RecordInput(u64 buttons, TasAnalog left_axis, TasAnalog right_axis);
|
||||||
|
|
||||||
// Main loop that records or executes input
|
// Main loop that records or executes input
|
||||||
void UpdateThread();
|
void UpdateThread();
|
||||||
|
|
||||||
// Sets the flag to start or stop the TAS command excecution and swaps controllers profiles
|
// Sets the flag to start or stop the TAS command execution and swaps controllers profiles
|
||||||
void StartStop();
|
void StartStop();
|
||||||
|
|
||||||
// Stop the TAS and reverts any controller profile
|
// Stop the TAS and reverts any controller profile
|
||||||
void Stop();
|
void Stop();
|
||||||
|
|
||||||
// Sets the flag to reload the file and start from the begining in the next update
|
// Sets the flag to reload the file and start from the beginning in the next update
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the flag to enable or disable recording of inputs
|
* Sets the flag to enable or disable recording of inputs
|
||||||
* @return Returns true if the current recording status is enabled
|
* @returns true if the current recording status is enabled
|
||||||
*/
|
*/
|
||||||
bool Record();
|
bool Record();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves contents of record_commands on a file
|
* Saves contents of record_commands on a file
|
||||||
* @param overwrite_file: Indicates if player 1 should be overwritten
|
* @param overwrite_file Indicates if player 1 should be overwritten
|
||||||
*/
|
*/
|
||||||
void SaveRecording(bool overwrite_file);
|
void SaveRecording(bool overwrite_file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current status values of TAS playback/recording
|
* Returns the current status values of TAS playback/recording
|
||||||
* @return Tuple of
|
* @returns A Tuple of
|
||||||
* TasState indicating the current state out of Running ;
|
* TasState indicating the current state out of Running ;
|
||||||
* Current playback progress ;
|
* Current playback progress ;
|
||||||
* Total length of script file currently loaded or being recorded
|
* Total length of script file currently loaded or being recorded
|
||||||
|
@ -139,29 +139,31 @@ private:
|
||||||
/// Loads TAS files from all players
|
/// Loads TAS files from all players
|
||||||
void LoadTasFiles();
|
void LoadTasFiles();
|
||||||
|
|
||||||
/** Loads TAS file from the specified player
|
/**
|
||||||
* @param player_index: player number to save the script
|
* Loads TAS file from the specified player
|
||||||
* @param file_index: script number of the file
|
* @param player_index Player number to save the script
|
||||||
|
* @param file_index Script number of the file
|
||||||
*/
|
*/
|
||||||
void LoadTasFile(size_t player_index, size_t file_index);
|
void LoadTasFile(size_t player_index, size_t file_index);
|
||||||
|
|
||||||
/** Writes a TAS file from the recorded commands
|
/**
|
||||||
* @param file_name: name of the file to be written
|
* Writes a TAS file from the recorded commands
|
||||||
|
* @param file_name Name of the file to be written
|
||||||
*/
|
*/
|
||||||
void WriteTasFile(std::u8string file_name);
|
void WriteTasFile(std::u8string file_name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a string containing the axis values. X and Y have a range from -32767 to 32767
|
* Parses a string containing the axis values. X and Y have a range from -32767 to 32767
|
||||||
* @param line: string containing axis values with the following format "x;y"
|
* @param line String containing axis values with the following format "x;y"
|
||||||
* @return Returns a TAS analog object with axis values with range from -1.0 to 1.0
|
* @returns A TAS analog object with axis values with range from -1.0 to 1.0
|
||||||
*/
|
*/
|
||||||
TasAnalog ReadCommandAxis(const std::string& line) const;
|
TasAnalog ReadCommandAxis(const std::string& line) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a string containing the button values. Each button is represented by it's text format
|
* Parses a string containing the button values. Each button is represented by it's text format
|
||||||
* specified in text_to_tas_button array
|
* specified in text_to_tas_button array
|
||||||
* @param line: string containing button name with the following format "a;b;c;d..."
|
* @param line string containing button name with the following format "a;b;c;d..."
|
||||||
* @return Returns a u64 with each bit representing the status of a button
|
* @returns A u64 with each bit representing the status of a button
|
||||||
*/
|
*/
|
||||||
u64 ReadCommandButtons(const std::string& line) const;
|
u64 ReadCommandButtons(const std::string& line) const;
|
||||||
|
|
||||||
|
@ -172,17 +174,17 @@ private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an u64 containing the button status into the text equivalent
|
* Converts an u64 containing the button status into the text equivalent
|
||||||
* @param buttons: bitfield with the status of the buttons
|
* @param buttons Bitfield with the status of the buttons
|
||||||
* @return Returns a string with the name of the buttons to be written to the file
|
* @returns A string with the name of the buttons to be written to the file
|
||||||
*/
|
*/
|
||||||
std::string WriteCommandButtons(u64 buttons) const;
|
std::string WriteCommandButtons(u64 buttons) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an TAS analog object containing the axis status into the text equivalent
|
* Converts an TAS analog object containing the axis status into the text equivalent
|
||||||
* @param data: value of the axis
|
* @param analog Value of the axis
|
||||||
* @return A string with the value of the axis to be written to the file
|
* @returns A string with the value of the axis to be written to the file
|
||||||
*/
|
*/
|
||||||
std::string WriteCommandAxis(TasAnalog data) const;
|
std::string WriteCommandAxis(TasAnalog analog) const;
|
||||||
|
|
||||||
/// Sets an axis for a particular pad to the given value.
|
/// Sets an axis for a particular pad to the given value.
|
||||||
void SetTasAxis(const PadIdentifier& identifier, TasAxis axis, f32 value);
|
void SetTasAxis(const PadIdentifier& identifier, TasAxis axis, f32 value);
|
||||||
|
|
Loading…
Reference in New Issue