summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-30 18:27:46 +0100
committerGitHub <noreply@github.com>2020-11-30 18:27:46 +0100
commit356a32eb0954f8f924a4817c7b67d79f80611718 (patch)
treef3d376094b50e4cdbfe4b65afef37aab1ccde9a6 /src
parentadd debug script hotkey (diff)
parentGTA_VERSION define and some config.h cleanup (diff)
downloadre3-356a32eb0954f8f924a4817c7b67d79f80611718.tar
re3-356a32eb0954f8f924a4817c7b67d79f80611718.tar.gz
re3-356a32eb0954f8f924a4817c7b67d79f80611718.tar.bz2
re3-356a32eb0954f8f924a4817c7b67d79f80611718.tar.lz
re3-356a32eb0954f8f924a4817c7b67d79f80611718.tar.xz
re3-356a32eb0954f8f924a4817c7b67d79f80611718.tar.zst
re3-356a32eb0954f8f924a4817c7b67d79f80611718.zip
Diffstat (limited to '')
-rw-r--r--src/audio/sampman_miles.cpp16
-rw-r--r--src/control/Script.cpp2
-rw-r--r--src/control/Script6.cpp2
-rw-r--r--src/control/ScriptCommands.h2
-rw-r--r--src/core/Cam.cpp4
-rw-r--r--src/core/Camera.cpp8
-rw-r--r--src/core/Frontend.cpp14
-rw-r--r--src/core/MenuScreensCustom.cpp2
-rw-r--r--src/core/Pad.cpp2
-rw-r--r--src/core/config.h26
-rw-r--r--src/entities/Physical.cpp2
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp2
-rw-r--r--src/peds/CopPed.cpp2
-rw-r--r--src/render/2dEffect.h4
-rw-r--r--src/render/Clouds.cpp10
-rw-r--r--src/render/Particle.cpp52
-rw-r--r--src/render/Rubbish.cpp8
-rw-r--r--src/render/Skidmarks.cpp6
-rw-r--r--src/skel/glfw/glfw.cpp4
-rw-r--r--src/skel/win/win.cpp4
-rw-r--r--src/vehicles/Vehicle.cpp2
-rw-r--r--src/weapons/WeaponEffects.cpp2
22 files changed, 93 insertions, 83 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 185e08d6..db38da64 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -65,7 +65,7 @@ uint32 _CurMP3Index;
int32 _CurMP3Pos;
bool _bIsMp3Active;
-#if defined(GTA3_1_1_PATCH) || defined(GTA3_STEAM_PATCH) || defined(NO_CDCHECK)
+#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
bool _bUseHDDAudio;
char _aHDDPath[MAX_PATH];
#endif
@@ -1043,7 +1043,7 @@ cSampleManager::Initialise(void)
if ( !m_bInitialised )
{
-#if !defined(GTA3_STEAM_PATCH) && !defined(NO_CDCHECK)
+#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
FrontEndMenuManager.WaitForUserCD();
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
@@ -1060,7 +1060,7 @@ cSampleManager::Initialise(void)
}
}
-#if defined(GTA3_1_1_PATCH) || defined(GTA3_STEAM_PATCH) || defined(NO_CDCHECK)
+#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
// hddaudio
/**
Option for user to play audio files directly from hard disk.
@@ -1297,17 +1297,17 @@ cSampleManager::Terminate(void)
bool
cSampleManager::CheckForAnAudioFileOnCD(void)
{
-#if !defined(GTA3_STEAM_PATCH) && !defined(NO_CDCHECK)
+#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
char filepath[MAX_PATH];
-#if defined(GTA3_1_1_PATCH)
+#if GTA_VERSION >= GTA3_PC_11
if (_bUseHDDAudio)
strcpy(filepath, _aHDDPath);
else
strcpy(filepath, m_szCDRomRootPath);
#else
strcpy(filepath, m_szCDRomRootPath);
-#endif // #if defined(GTA3_1_1_PATCH)
+#endif // #if GTA_VERSION >= GTA3_PC_11
strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
@@ -1324,13 +1324,13 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
#else
return true;
-#endif // #if !defined(GTA3_STEAM_PATCH) && !defined(NO_CDCHECK)
+#endif // #if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
}
char
cSampleManager::GetCDAudioDriveLetter(void)
{
-#if defined(GTA3_1_1_PATCH) || defined(GTA3_STEAM_PATCH) || defined(NO_CDCHECK)
+#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
if (_bUseHDDAudio)
{
if ( strlen(_aHDDPath) != 0 )
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 085c773a..dbd477e2 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1273,7 +1273,7 @@ const tScriptCommandData commands[] = {
REGISTER_COMMAND(COMMAND_IS_CHAR_LYING_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_CAN_CHAR_SEE_DEAD_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
REGISTER_COMMAND(COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
#endif
#endif
diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp
index ca6a1853..acd9e424 100644
--- a/src/control/Script6.cpp
+++ b/src/control/Script6.cpp
@@ -1326,7 +1326,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
#endif
return 0;
#endif
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
case COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER:
CollectParameters(&m_nIp, 1);
#ifdef FIX_BUGS
diff --git a/src/control/ScriptCommands.h b/src/control/ScriptCommands.h
index 56908edb..b9067bea 100644
--- a/src/control/ScriptCommands.h
+++ b/src/control/ScriptCommands.h
@@ -1156,7 +1156,7 @@ enum {
COMMAND_IS_CHAR_LYING_DOWN,
COMMAND_CAN_CHAR_SEE_DEAD_CHAR,
COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER,
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER,
#endif
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index 3e016667..0e1c9d9f 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -2570,7 +2570,7 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
ResetStatics = false;
}
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
Source = HeadPos;
Source.z += 0.1f;
@@ -2605,7 +2605,7 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
if(Alpha > DEGTORAD(60.0f)) Alpha = DEGTORAD(60.0f);
else if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
HeadPos.x = 0.0f;
HeadPos.y = 0.0f;
HeadPos.z = 0.0f;
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 56225fed..1e1aa722 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -74,7 +74,7 @@ bool bDidWeProcessAnyCinemaCam;
CCamera::CCamera(void)
{
-#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
+#if GTA_VERSION >= GTA3_PC_11 || defined(FIX_BUGS)
m_fMouseAccelHorzntl = 0.0025f;
m_fMouseAccelVertical = 0.003f;
#endif
@@ -88,7 +88,7 @@ CCamera::CCamera(float)
void
CCamera::Init(void)
{
-#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
+#if GTA_VERSION >= GTA3_PC_11 || defined(FIX_BUGS)
float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
float fMouseAccelVertical = m_fMouseAccelVertical;
#endif
@@ -104,7 +104,7 @@ CCamera::Init(void)
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
#endif
- #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
+ #if GTA_VERSION >= GTA3_PC_11 || defined(FIX_BUGS)
m_fMouseAccelHorzntl = fMouseAccelHorzntl;
m_fMouseAccelVertical = fMouseAccelVertical;
#endif
@@ -237,7 +237,7 @@ CCamera::Init(void)
m_uiTransitionState = 0;
m_uiTimeTransitionStart = 0;
m_bLookingAtPlayer = true;
-#if !defined(GTA3_1_1_PATCH) && !defined(FIX_BUGS)
+#if GTA_VERSION < GTA3_PC_11 && !defined(FIX_BUGS)
m_fMouseAccelHorzntl = 0.0025f;
m_fMouseAccelVertical = 0.003f;
#endif
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 318e5903..5597b358 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1009,7 +1009,7 @@ CMenuManager::Draw()
CFont::SetCentreOff();
CFont::SetJustifyOn();
CFont::SetBackGroundOnlyTextOn();
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
#ifdef DRAW_MENU_VERSION_TEXT
CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
CFont::SetRightJustifyOn();
@@ -3538,7 +3538,7 @@ CMenuManager::LoadAllTextures()
CTxdStore::LoadTxd(frontendTxdSlot, "MODELS/FRONTEND.TXD");
CTxdStore::AddRef(frontendTxdSlot);
CTxdStore::SetCurrentTxd(frontendTxdSlot);
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
CStreaming::IHaveUsedStreamingMemory();
CTimer::Update();
#endif
@@ -3568,7 +3568,7 @@ CMenuManager::LoadAllTextures()
m_aMapSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
}
#endif
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
CStreaming::IHaveUsedStreamingMemory();
CTimer::Update();
#endif
@@ -3583,7 +3583,7 @@ CMenuManager::LoadSettings()
int fileHandle = CFileMgr::OpenFile("gta3.set", "r");
int32 prevLang = m_PrefsLanguage;
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
CMBlur::BlurOn = (_dwOperatingSystemVersion != OS_WIN98);
#else
CMBlur::BlurOn = true;
@@ -3882,7 +3882,7 @@ void
CMenuManager::PrintStats()
{
int rowNum = ConstructStatLine(99999);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
#endif
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why
@@ -4936,7 +4936,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsUseWideScreen = false;
m_PrefsShowSubtitles = true;
m_nDisplayVideoMode = m_nPrefsVideoMode;
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
if (_dwOperatingSystemVersion == OS_WIN98) {
CMBlur::BlurOn = false;
CMBlur::MotionBlurClose();
@@ -5588,7 +5588,7 @@ CMenuManager::WaitForUserCD()
CSprite2d *splash;
char *splashscreen = nil;
-#if (!(defined RANDOMSPLASH) && !(defined GTA3_1_1_PATCH))
+#if (!(defined RANDOMSPLASH) && GTA_VERSION < GTA3_PC_11)
if (CGame::frenchGame || CGame::germanGame || !CGame::nastyGame)
splashscreen = "mainsc2";
else
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index f8ff3acf..ae08f5f5 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -115,7 +115,7 @@ void RestoreDefGraphics(int8 action) {
CMenuManager::m_PrefsVsync = true;
CMenuManager::m_PrefsUseWideScreen = false;
FrontEndMenuManager.m_nDisplayVideoMode = FrontEndMenuManager.m_nPrefsVideoMode;
- #ifdef GTA3_1_1_PATCH
+ #if GTA_VERSION >= GTA3_PC_11
if (_dwOperatingSystemVersion == OS_WIN98) {
CMBlur::BlurOn = false;
CMBlur::MotionBlurClose();
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 9c6bdc98..b971f3ec 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -937,7 +937,7 @@ void CPad::AddToPCCheatString(char c)
if ( !_CHEATCMP("GNIROOOOOB") )
SlowTimeCheat();
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
// "TURTOISE"
if ( !_CHEATCMP("ESIOTRUT") )
ArmourCheat();
diff --git a/src/core/config.h b/src/core/config.h
index 99c5f6ef..5d528d50 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -135,10 +135,6 @@ enum Config {
NUM_EXPLOSIONS = 48,
};
-// We'll use this once we're ready to become independent of the game
-// Use it to mark bugs in the code that will prevent the game from working then
-//#define STANDALONE
-
// We don't expect to compile for PS2 or Xbox
// but it might be interesting for documentation purposes
#define GTA_PC
@@ -165,6 +161,16 @@ enum Config {
#define FINAL
#endif
+// Version defines
+#define GTA3_PS2_140 300
+#define GTA3_PS2_160 301
+#define GTA3_PC_10 310
+#define GTA3_PC_11 311
+#define GTA3_PC_STEAM 312
+// TODO? maybe something for xbox or android?
+
+#define GTA_VERSION GTA3_PC_11
+
// quality of life fixes that should also be in FINAL
#define NASTY_GAME // nasty game for all languages
#define NO_CDCHECK
@@ -173,14 +179,18 @@ enum Config {
#define DRAW_GAME_VERSION_TEXT
#define DRAW_MENU_VERSION_TEXT
+// Memory allocation and compression
+// #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet
+//#define COMPRESSED_COL_VECTORS // use compressed vectors for collision vertices
+//#define ANIM_COMPRESSION // only keep most recently used anims uncompressed
+
#if defined GTA_PS2
# define GTA_PS2_STUFF
# define RANDOMSPLASH
+# define USE_CUSTOM_ALLOCATOR
# define VU_COLLISION
# define ANIM_COMPRESSION
#elif defined GTA_PC
-# define GTA3_1_1_PATCH
-//# define GTA3_STEAM_PATCH
# ifdef GTA_PS2_STUFF
# define USE_PS2_RAND
# define RANDOMSPLASH // use random splash as on PS2
@@ -190,7 +200,7 @@ enum Config {
#endif
#ifdef VU_COLLISION
-#define COMPRESSED_COL_VECTORS // current need compressed vectors in this code
+#define COMPRESSED_COL_VECTORS // currently need compressed vectors in this code
#endif
#ifdef MASTER
@@ -242,7 +252,7 @@ enum Config {
#endif
#ifndef EXTENDED_COLOURFILTER
-#undef SCREEN_DROPLETS // we need the frontbuffer for this effect
+#undef SCREEN_DROPLETS // we need the backbuffer for this effect
#endif
#ifndef EXTENDED_PIPELINES
#undef SCREEN_DROPLETS // we need neo.txd
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index 172bae3f..04cec96b 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -824,7 +824,7 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV
normalSpeed = DotProduct(speed, colpoint.normal);
if(normalSpeed < 0.0f){
float minspeed = 1.3f*GRAVITY * CTimer::GetTimeStep();
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
if ((IsObject() || IsVehicle() && (GetUp().z < -0.3f || ((CVehicle*)this)->IsBike() && (GetStatus() == STATUS_ABANDONED || GetStatus() == STATUS_WRECKED))) &&
#else
if((IsObject() || IsVehicle() && GetUp().z < -0.3f) &&
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index 5b212f62..afda70d3 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -962,7 +962,7 @@ CVehicleModelInfo::DeleteVehicleColourTextures(void)
for(i = 0; i < 256; i++){
if(ms_colourTextureTable[i]){
RwTextureDestroy(ms_colourTextureTable[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
ms_colourTextureTable[i] = nil;
#endif
}
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index f289697e..d9f55559 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -667,7 +667,7 @@ CCopPed::ProcessControl(void)
}
if (bDuckAndCover) {
-#if !defined(GTA3_1_1_PATCH) && !defined(VC_PED_PORTS)
+#if GTA_VERSION < GTA3_PC_11 && !defined(VC_PED_PORTS)
if (!bNotAllowedToDuck && Seek()) {
SetMoveState(PEDMOVE_STILL);
SetMoveAnim();
diff --git a/src/render/2dEffect.h b/src/render/2dEffect.h
index 628d64c2..a8013b34 100644
--- a/src/render/2dEffect.h
+++ b/src/render/2dEffect.h
@@ -78,12 +78,12 @@ public:
if(type == EFFECT_LIGHT){
if(light.corona)
RwTextureDestroy(light.corona);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
light.corona = nil;
#endif
if(light.shadow)
RwTextureDestroy(light.shadow);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
light.shadow = nil;
#endif
}
diff --git a/src/render/Clouds.cpp b/src/render/Clouds.cpp
index 05ddbcdc..161418b9 100644
--- a/src/render/Clouds.cpp
+++ b/src/render/Clouds.cpp
@@ -44,23 +44,23 @@ void
CClouds::Shutdown(void)
{
RwTextureDestroy(gpCloudTex[0]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex[0] = nil;
#endif
RwTextureDestroy(gpCloudTex[1]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex[1] = nil;
#endif
RwTextureDestroy(gpCloudTex[2]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex[2] = nil;
#endif
RwTextureDestroy(gpCloudTex[3]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex[3] = nil;
#endif
RwTextureDestroy(gpCloudTex[4]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex[4] = nil;
#endif
}
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index acce946b..2b19486e 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -590,7 +590,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_SMOKE_FILES; i++ )
{
RwTextureDestroy(gpSmokeTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpSmokeTex[i] = nil;
#endif
}
@@ -598,7 +598,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_SMOKE2_FILES; i++ )
{
RwTextureDestroy(gpSmoke2Tex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpSmoke2Tex[i] = nil;
#endif
}
@@ -606,7 +606,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_RUBBER_FILES; i++ )
{
RwTextureDestroy(gpRubberTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRubberTex[i] = nil;
#endif
}
@@ -614,7 +614,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_RAINSPLASH_FILES; i++ )
{
RwTextureDestroy(gpRainSplashTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRainSplashTex[i] = nil;
#endif
}
@@ -622,7 +622,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_WATERSPRAY_FILES; i++ )
{
RwTextureDestroy(gpWatersprayTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpWatersprayTex[i] = nil;
#endif
}
@@ -630,7 +630,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_EXPLOSIONMEDIUM_FILES; i++ )
{
RwTextureDestroy(gpExplosionMediumTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpExplosionMediumTex[i] = nil;
#endif
}
@@ -638,7 +638,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_GUNFLASH_FILES; i++ )
{
RwTextureDestroy(gpGunFlashTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpGunFlashTex[i] = nil;
#endif
}
@@ -646,7 +646,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_RAINDROP_FILES; i++ )
{
RwTextureDestroy(gpRainDropTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRainDropTex[i] = nil;
#endif
}
@@ -654,7 +654,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_RAINSPLASHUP_FILES; i++ )
{
RwTextureDestroy(gpRainSplashupTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRainSplashupTex[i] = nil;
#endif
}
@@ -662,7 +662,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_BIRDFRONT_FILES; i++ )
{
RwTextureDestroy(gpBirdfrontTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpBirdfrontTex[i] = nil;
#endif
}
@@ -670,7 +670,7 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_CARDEBRIS_FILES; i++ )
{
RwTextureDestroy(gpCarDebrisTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCarDebrisTex[i] = nil;
#endif
}
@@ -678,78 +678,78 @@ void CParticle::Shutdown()
for ( int32 i = 0; i < MAX_CARSPLASH_FILES; i++ )
{
RwTextureDestroy(gpCarSplashTex[i]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCarSplashTex[i] = nil;
#endif
}
RwTextureDestroy(gpFlame1Tex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpFlame1Tex = nil;
#endif
RwTextureDestroy(gpFlame5Tex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpFlame5Tex = nil;
#endif
RwTextureDestroy(gpRainDropSmallTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRainDropSmallTex = nil;
#endif
RwTextureDestroy(gpBloodTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpBloodTex = nil;
#endif
RwTextureDestroy(gpLeafTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpLeafTex = nil;
#endif
RwTextureDestroy(gpCloudTex1);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex1 = nil;
#endif
RwTextureDestroy(gpCloudTex4);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCloudTex4 = nil;
#endif
RwTextureDestroy(gpBloodSmallTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpBloodSmallTex = nil;
#endif
RwTextureDestroy(gpGungeTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpGungeTex = nil;
#endif
RwTextureDestroy(gpCollisionSmokeTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCollisionSmokeTex = nil;
#endif
RwTextureDestroy(gpBulletHitTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpBulletHitTex = nil;
#endif
RwTextureDestroy(gpGunShellTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpGunShellTex = nil;
#endif
RwTextureDestroy(gpWakeOldTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpWakeOldTex = nil;
#endif
RwTextureDestroy(gpPointlightTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpPointlightTex = nil;
#endif
diff --git a/src/render/Rubbish.cpp b/src/render/Rubbish.cpp
index bfd50c07..18a20bc7 100644
--- a/src/render/Rubbish.cpp
+++ b/src/render/Rubbish.cpp
@@ -414,19 +414,19 @@ void
CRubbish::Shutdown(void)
{
RwTextureDestroy(gpRubbishTexture[0]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRubbishTexture[0] = nil;
#endif
RwTextureDestroy(gpRubbishTexture[1]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRubbishTexture[1] = nil;
#endif
RwTextureDestroy(gpRubbishTexture[2]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRubbishTexture[2] = nil;
#endif
RwTextureDestroy(gpRubbishTexture[3]);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpRubbishTexture[3] = nil;
#endif
}
diff --git a/src/render/Skidmarks.cpp b/src/render/Skidmarks.cpp
index ad036d58..9e509b52 100644
--- a/src/render/Skidmarks.cpp
+++ b/src/render/Skidmarks.cpp
@@ -54,15 +54,15 @@ void
CSkidmarks::Shutdown(void)
{
RwTextureDestroy(gpSkidTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpSkidTex = nil;
#endif
RwTextureDestroy(gpSkidBloodTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpSkidBloodTex = nil;
#endif
RwTextureDestroy(gpSkidMudTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpSkidMudTex = nil;
#endif
}
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 56877d37..cad84b8a 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -389,7 +389,7 @@ psInitialize(void)
InitialiseLanguage();
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION < GTA3_PC_11
FrontEndMenuManager.LoadSettings();
#endif
@@ -443,7 +443,7 @@ psInitialize(void)
#ifndef PS2_MENU
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
FrontEndMenuManager.LoadSettings();
#endif
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 5f6d662c..6d0c2d67 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -651,7 +651,7 @@ psInitialize(void)
C_PcSave::SetSaveDirectory(_psGetUserFilesFolder());
InitialiseLanguage();
-#ifndef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
FrontEndMenuManager.LoadSettings();
#endif
@@ -703,7 +703,7 @@ psInitialize(void)
#ifndef PS2_MENU
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
FrontEndMenuManager.LoadSettings();
#endif
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index d2ca5a1a..9adcf148 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -405,7 +405,7 @@ CVehicle::FlyingControl(eFlightModel flightModel)
else
fThrust = fThrustVar * (CPad::GetPad(0)->GetAccelerate() - 2 * CPad::GetPad(0)->GetBrake()) / 255.0f + 0.95f;
fThrust -= fRotorFallOff * DotProduct(m_vecMoveSpeed, GetUp());
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
if (fThrust > 0.9f && GetPosition().z > 80.0f)
fThrust = 0.9f;
#endif
diff --git a/src/weapons/WeaponEffects.cpp b/src/weapons/WeaponEffects.cpp
index 46195d2c..214ae9c7 100644
--- a/src/weapons/WeaponEffects.cpp
+++ b/src/weapons/WeaponEffects.cpp
@@ -46,7 +46,7 @@ void
CWeaponEffects::Shutdown(void)
{
RwTextureDestroy(gpCrossHairTex);
-#ifdef GTA3_1_1_PATCH
+#if GTA_VERSION >= GTA3_PC_11
gpCrossHairTex = nil;
#endif
}