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

Functions for for computing prune tables. More...

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

Functions

void _WritePruneTablesHeader ()
 
void _WritePruneTablesContent (bool OnlySafeSolutions, unsigned short InternalState, short CurrentRecursiveDepth, short MaximumRecursiveDepth)
 
void _FindPruneTables (bool OnlySafeSolutions, unsigned short InternalState, unsigned short MaximumRecursiveDepth, unsigned short CurrentRecursiveDepth=0)
 
void _ComputePruneTables (bool OnlySafeSolutions)
 

Variables

unsigned short * PruneTableSolutionBuffer
 
fstream PruneTablesFileCSV
 

Detailed Description

Functions for for computing prune tables.

Author
WaluigiBSOD

Function Documentation

◆ _ComputePruneTables()

void _ComputePruneTables ( bool  OnlySafeSolutions)

This method computes all the prune tables used inside ComputeSolutions.cpp to prune their recursive search.

Are only saved inside a CSV file, I/O errors are silently ignored, for now.

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.
Author
WaluigiBSOD

◆ _FindPruneTables()

void _FindPruneTables ( bool  OnlySafeSolutions,
unsigned short  InternalState,
unsigned short  MaximumRecursiveDepth,
unsigned short  CurrentRecursiveDepth = 0 
)

The main logic behing computing all the all the prune tables used inside ComputeSolutions.cpp.

Search is still pruned using the result of ComputeMinimumSolutionLengths.cpp. Tables are saved inside a CSV file, I/O errors are silently ignored, for now.

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.
Author
WaluigiBSOD

◆ _WritePruneTablesContent()

void _WritePruneTablesContent ( bool  OnlySafeSolutions,
unsigned short  InternalState,
short  CurrentRecursiveDepth,
short  MaximumRecursiveDepth 
)

The method that handles writing all the content of all the prune tables used inside ComputeSolutions.cpp, inside a CSV file.

I/O errors are silently ignored, for now.

Parameters
[in]OnlySafeSolutionsIf true, solutions with left/right button presses are discarded, if false nothing happens.
[in]InternalStateThe starting internal state.
[in]CurrentRecursiveDepthThe current recursive depth.
[in]MaximumRecursiveDepthThe maximum recursive depth allowed to be reached. It's equal to the minimum solution length considered by _ComputeSolutions().
Author
WaluigiBSOD

◆ _WritePruneTablesHeader()

void _WritePruneTablesHeader ( )

The method that handles writing the header of all the prune tables used inside ComputeSolutions.cpp, inside a CSV file.

I/O errors are silently ignored, for now.

Author
WaluigiBSOD