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
CheckRawData.cpp File Reference

Functions that validate command-line arguments as raw data and decoded password data. More...

#include <iostream>
#include "Constants.h"
#include "PlayerName.h"
#include "PrintError.h"

Functions

unsigned char _CheckDecodedPasswordData (unsigned char GameMode, unsigned char Level, unsigned char Speed, unsigned int Score, unsigned short Time, unsigned char PlayerName[], unsigned short FrameCount, bool Argument=false)
unsigned char _DisplayDecodedPasswordError (unsigned char Result)

Detailed Description

Functions that validate command-line arguments as raw data and decoded password data.

Author
WaluigiBSOD

Function Documentation

◆ _CheckDecodedPasswordData()

unsigned char _CheckDecodedPasswordData ( unsigned char GameMode,
unsigned char Level,
unsigned char Speed,
unsigned int Score,
unsigned short Time,
unsigned char PlayerName[],
unsigned short FrameCount,
bool Argument = false )

Checks if the raw game data given input is valid or not.

More information on valid in-game data that can be found in the documentation of _GeneratePassword().

Parameters
[in]GameModeGame mode to check.
[in]LevelVirus/game level to check.
[in]SpeedSpeed to check.
[in]ScoreScore to check.
[in]TimeTime to check.
[in]PlayerNamePlayer name to check.
[in]FrameCountFrame count to check.
[in]ArgumentSpecifies if data was comes from command-line arguments (true) or comes from a decoded password (false).
Returns
PasswordOK value if all the data is valid, the corresponding error code if not after having printed an error message to screen.
Author
WaluigiBSOD

◆ _DisplayDecodedPasswordError()

unsigned char _DisplayDecodedPasswordError ( unsigned char Result)

Displays password decoding errors on screen.

Parameters
[in]ResultThe corresponding error code.
Returns
The error code given in input.
Author
WaluigiBSOD