diff options
author | aap <aap@papnet.eu> | 2020-12-20 19:13:58 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-20 19:13:58 +0100 |
commit | 43b4c8dd335ecf0948d5da1218c2298d2c043cb7 (patch) | |
tree | a9b5dd2649c084338ff9557893a5d675203629e8 /src/core/main.cpp | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-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.cpp | 15 |
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(); |