Dr. Mario 64 Password Tool Version 1.1
A command-line tool written in C++ that allows to generate and decode the passwords of Dr. Mario 64.
Loading...
Searching...
No Matches
CheckCommandLineArguments.cpp File Reference

Functions that validate command-line arguments, as strings. More...

#include <cstring>
#include "Constants.h"
#include "PlayerName.h"
#include "PrintError.h"
#include "StringFunctions.h"

Functions

bool _ValidateCommandLineGameMode (char *CommandLineArgument)
bool _ValidateCommandLineLevel (char *CommandLineArgument)
bool _ValidateCommandLineSpeed (char *CommandLineArgument)
bool _ValidateCommandLineScore (char *CommandLineArgument, bool InGameInformation)
bool _ValidateCommandLineTime (char *CommandLineArgument, bool InGameInformation)
bool _ValidateCommandLinePlayerName (char *CommandLineArgument)
bool _ValidateCommandLineFrameCount (char *CommandLineArgument)
unsigned char _CheckCommandLineArguments (char **CommandLineArgumentsArray, bool InGameInformation=false)

Detailed Description

Functions that validate command-line arguments, as strings.

Author
WaluigiBSOD

Function Documentation

◆ _CheckCommandLineArguments()

unsigned char _CheckCommandLineArguments ( char ** CommandLineArgumentsArray,
bool InGameInformation = false )

Checks if all the entered command-line arguments are valid or not, as a string.

Parameters
[in]CommandLineArgumentsArrayAll the command-line arguments to check.
[in]InGameInformationSpecifies if the data to be validated comes directly from the game's screen (true) or is entered as internal data (false).
Returns
True if the entered command-line arguments are valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineFrameCount()

bool _ValidateCommandLineFrameCount ( char * CommandLineArgument)

Checks if the frame count entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
Returns
True if the frame count entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineGameMode()

bool _ValidateCommandLineGameMode ( char * CommandLineArgument)

Checks if the game mode entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
Returns
True if the game mode entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineLevel()

bool _ValidateCommandLineLevel ( char * CommandLineArgument)

Checks if the level entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
Returns
True if the level entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLinePlayerName()

bool _ValidateCommandLinePlayerName ( char * CommandLineArgument)

Checks if the player name entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
Returns
True if the player name entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineScore()

bool _ValidateCommandLineScore ( char * CommandLineArgument,
bool InGameInformation )

Checks if the score entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
[in]InGameInformationSpecifies if the score to be validated comes directly from the game's screen (true) or is entered as internal data (false).
Returns
True if the score entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineSpeed()

bool _ValidateCommandLineSpeed ( char * CommandLineArgument)

Checks if the speed entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
Returns
True if the speed entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD

◆ _ValidateCommandLineTime()

bool _ValidateCommandLineTime ( char * CommandLineArgument,
bool InGameInformation )

Checks if the time entered as a command-line argument is valid or not, as a string.

Parameters
[in]CommandLineArgumentCommand-line argument to check.
[in]InGameInformationSpecifies if the time to be validated comes directly from the game's screen (true) or is entered as internal data (false).
Returns
True if the time entered as a command-line argument is valid as a string, false if not.
Author
WaluigiBSOD