Alien Storm (Genesis) Credits Select Cheat Tool Version 1.2
A command-line tool that computes some stuff regarding the Genesis Alien Storm game's credits select cheat.
Loading...
Searching...
No Matches
ComputeSolutions.cpp File Reference

Functions for computing all the solutions of a certain minimum length, for a certain initial internal state. More...

#include <fstream>
#include "Constants.h"

Functions

long long _FindSolutions (bool OnlySafeSolutions, unsigned short InternalState, unsigned short MaximumRecursiveDepth, unsigned short CurrentRecursiveDepth=0)
long long _ComputeSolutions (bool OnlySafeSolutions)

Variables

unsigned short * SolutionBuffer
fstream SolutionsFileCSV

Detailed Description

Functions for computing all the solutions of a certain minimum length, for a certain initial internal state.

Author
WaluigiBSOD

Function Documentation

◆ _ComputeSolutions()

long long _ComputeSolutions ( bool OnlySafeSolutions)

This function computes all the solution of a certain minimum length.

Solutions found are also saved inside a CSV file.

Parameters
[in]OnlySafeSolutionsIf true, solutions with left/right button presses are discarded, if false nothing happens. main() invokes this function twice, once with this parameter as false, once as true.
Returns
The number of solutions found, -1 if a file write or memory allocation error occurred.
Author
WaluigiBSOD

◆ _FindSolutions()

long long _FindSolutions ( bool OnlySafeSolutions,
unsigned short InternalState,
unsigned short MaximumRecursiveDepth,
unsigned short CurrentRecursiveDepth = 0 )

The main logic behind computing all the solutions of a certain minimum length.

Search is pruned using the result of ComputeMinimumSolutionLengths.cpp. Solutions found are also saved inside a CSV file.

Parameters
[in]OnlySafeSolutionsIf true, solutions with left/right button presses are discarded, if false nothing happens.
[in]InternalStateThe starting internal state.
[in]MaximumRecursiveDepthThe maximum recursive depth allowed to be reached. It's equal to the minimum solution length considered by _ComputeSolutions().
[in]CurrentRecursiveDepthThe current recursive depth. It's automatically set to zero in the function's declaration.
Returns
The number of solutions found, -1 if a file write error occurred.
Author
WaluigiBSOD