mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
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:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user