summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-20 19:13:58 +0100
committeraap <aap@papnet.eu>2020-12-20 19:13:58 +0100
commit43b4c8dd335ecf0948d5da1218c2298d2c043cb7 (patch)
treea9b5dd2649c084338ff9557893a5d675203629e8 /src/core/main.cpp
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar.gz
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar.bz2
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar.lz
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar.xz
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.tar.zst
re3-43b4c8dd335ecf0948d5da1218c2298d2c043cb7.zip
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index dabb962a..3a855e20 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1688,7 +1688,7 @@ void TheGame(void)
CTimer::Initialise();
-#ifdef GTA_PS2
+#if GTA_VERSION <= GTA3_PS2_160
CGame::Initialise();
#else
CGame::Initialise("DATA\\GTA3.DAT");
@@ -1758,7 +1758,7 @@ void TheGame(void)
PUSH_MEMID(MEMID_RENDER);
- if (!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu == true && TheCamera.GetScreenFadeStatus() != FADE_2 )
+ if ((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu == true) && TheCamera.GetScreenFadeStatus() != FADE_2 )
{
PUSH_MEMID(MEMID_RENDERLIST);
@@ -1766,14 +1766,22 @@ void TheGame(void)
CRenderer::PreRender();
POP_MEMID();
+#ifdef FIX_BUGS
+ // This has to be done BEFORE RwCameraBeginUpdate
+ RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
+ RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
+#endif
+
if (CWeather::LightningFlash && !CCullZones::CamNoRain())
DoRWStuffStartOfFrame_Horizon(255, 255, 255, 255, 255, 255, 255);
else
DoRWStuffStartOfFrame_Horizon(CTimeCycle::GetSkyTopRed(), CTimeCycle::GetSkyTopGreen(), CTimeCycle::GetSkyTopBlue(), CTimeCycle::GetSkyBottomRed(), CTimeCycle::GetSkyBottomGreen(), CTimeCycle::GetSkyBottomBlue(), 255);
DefinedState();
+#ifndef FIX_BUGS
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
+#endif
RenderScene();
RenderDebugShit();
@@ -1794,8 +1802,7 @@ void TheGame(void)
#endif
CVisibilityPlugins::SetRenderWareCamera(Scene.camera);
RwCameraClear(Scene.camera, &gColourTop, rwCAMERACLEARZ);
- if (!RsCameraBeginUpdate(Scene.camera))
- break;
+ RsCameraBeginUpdate(Scene.camera);
}
RenderMenus();