Remove HandleLimitedNumExecutions()

Not called anywhere in the code. Plus, if we limit the amount of time 1.13 can be played to 10 starts, we'll have at least 5 angry players
This commit is contained in:
Asdow
2024-08-15 22:07:38 +03:00
parent eed4156d48
commit bba7528c76
2 changed files with 0 additions and 59 deletions
-58
View File
@@ -294,64 +294,6 @@ BOOLEAN IfWin95(void)
}
void HandleLimitedNumExecutions( )
{
// Get system directory
HWFILE hFileHandle;
CHAR8 ubSysDir[ 512 ];
INT8 bNumRuns;
GetSystemDirectory( (LPSTR) ubSysDir, sizeof( ubSysDir ) );
// Append filename
strcat( ubSysDir, "\\winaese.dll" );
// Open file and check # runs...
if ( FileExists( (STR)ubSysDir ) )
{
// Open and read
if ( ( hFileHandle = FileOpen( (STR)ubSysDir, FILE_ACCESS_READ, FALSE)) == 0)
{
return;
}
// Read value
FileRead( hFileHandle, &bNumRuns, sizeof( bNumRuns ) , NULL);
// Close file
FileClose( hFileHandle );
if ( bNumRuns <= 0 )
{
// Fail!
SET_ERROR( "Error 1054: Cannot execute - contact Sir-Tech Software." );
return;
}
}
else
{
bNumRuns = 10;
}
// OK, decrement # runs...
bNumRuns--;
// Open and write
if ( ( hFileHandle = FileOpen( (STR)ubSysDir, FILE_ACCESS_WRITE, FALSE)) == 0)
{
return;
}
// Write value
FileWrite( hFileHandle, &bNumRuns, sizeof( bNumRuns ) , NULL);
// Close file
FileClose( hFileHandle );
}
SGPFILENAME gCheckFilenames[] =
{
"DATA\\INTRO.SLF",
-1
View File
@@ -20,7 +20,6 @@ BOOLEAN WrapString( STR16 pStr, STR16 pStr2, UINT16 usWidth, INT32 uiFont );
BOOLEAN IfWinNT(void);
BOOLEAN IfWin95(void);
void HandleLimitedNumExecutions( );
// WANNE: This method replaces characters in a given text with new characters
STR8 Replace(STR8 string, STR8 oldpiece, STR8 newpiece);