Skip to content

Commit

Permalink
Remove useless CD check
Browse files Browse the repository at this point in the history
  • Loading branch information
Asdow committed Aug 15, 2024
1 parent 23bf32e commit eed4156
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 68 deletions.
1 change: 0 additions & 1 deletion Ja2/Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,6 @@ UINT32 InitializeJA2(void)
HandleLaserLockResult( PrepareLaserLockSystem() );
#endif

HandleJA2CDCheck( );

gfWorldLoaded = FALSE;

Expand Down
59 changes: 0 additions & 59 deletions Utils/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ extern BOOLEAN GetCDromDriveLetter( STR8 pString );

#define DATA_8_BIT_DIR "8-Bit\\"

BOOLEAN PerformTimeLimitedCheck();

// WANNE: Given a string, replaces all instances of "oldpiece" with "newpiece"
/*
Expand Down Expand Up @@ -371,65 +370,7 @@ UINT32 gCheckFileMinSizes[] =
187000000,
236000000
};
#define NOCDCHECK

#if defined( JA2TESTVERSION ) || defined( _DEBUG )
#define NOCDCHECK
#endif

#if defined( RUSSIANGOLD )
// CD check enabled
#else
#define NOCDCHECK
#endif

BOOLEAN HandleJA2CDCheck( )
{
#ifdef TIME_LIMITED_VERSION
if( !PerformTimeLimitedCheck() )
{
return( FALSE );
}
#endif



return( TRUE );


}


BOOLEAN HandleJA2CDCheckTwo( )
{

return( TRUE );

}


BOOLEAN PerformTimeLimitedCheck()
{
#ifndef TIME_LIMITED_VERSION
return( TRUE );

#else
SYSTEMTIME sSystemTime;

GetSystemTime( &sSystemTime );


//if according to the system clock, we are past july 1999, quit the game
if( sSystemTime.wYear > 1999 || sSystemTime.wMonth > 7 )
{
//spit out an error message
MessageBox( NULL, "This time limited version of Jagged Alliance 2 v1.13 has expired.", "Ja2 Error!", MB_OK );
return( FALSE );
}

return( TRUE );
#endif
}

BOOLEAN DoJA2FilesExistsOnDrive( CHAR8 *zCdLocation )
{
Expand Down
3 changes: 0 additions & 3 deletions Utils/Utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ BOOLEAN IfWin95(void);

void HandleLimitedNumExecutions( );

BOOLEAN HandleJA2CDCheck( );
BOOLEAN HandleJA2CDCheckTwo( );

// WANNE: This method replaces characters in a given text with new characters
STR8 Replace(STR8 string, STR8 oldpiece, STR8 newpiece);

Expand Down
5 changes: 0 additions & 5 deletions sgp/sgp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,6 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
//Process the command line BEFORE initialization
ProcessJa2CommandLineBeforeInitialization( pCommandLine );

// Handle Check for CD
if ( !HandleJA2CDCheck( ) )
{
return( 0 );
}

// ShowCursor(FALSE);

Expand Down

0 comments on commit eed4156

Please sign in to comment.