From eed4156d48965711b4e0687f4aa62e6294f98419 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Thu, 15 Aug 2024 22:04:55 +0300 Subject: [PATCH] Remove useless CD check --- Ja2/Init.cpp | 1 - Utils/Utilities.cpp | 59 --------------------------------------------- Utils/Utilities.h | 3 --- sgp/sgp.cpp | 5 ---- 4 files changed, 68 deletions(-) diff --git a/Ja2/Init.cpp b/Ja2/Init.cpp index c5832091..86ce288b 100644 --- a/Ja2/Init.cpp +++ b/Ja2/Init.cpp @@ -1442,7 +1442,6 @@ UINT32 InitializeJA2(void) HandleLaserLockResult( PrepareLaserLockSystem() ); #endif - HandleJA2CDCheck( ); gfWorldLoaded = FALSE; diff --git a/Utils/Utilities.cpp b/Utils/Utilities.cpp index a2634b5f..4558afda 100644 --- a/Utils/Utilities.cpp +++ b/Utils/Utilities.cpp @@ -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" /* @@ -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 ) { diff --git a/Utils/Utilities.h b/Utils/Utilities.h index 3ffc30e0..5d138766 100644 --- a/Utils/Utilities.h +++ b/Utils/Utilities.h @@ -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); diff --git a/sgp/sgp.cpp b/sgp/sgp.cpp index 6686d637..19b3ddc7 100644 --- a/sgp/sgp.cpp +++ b/sgp/sgp.cpp @@ -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);