diff options
author | aap <aap@papnet.eu> | 2020-08-19 14:36:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 14:36:38 +0200 |
commit | 76fe1247c86873fa548c85ae8598efd4ce1947c2 (patch) | |
tree | 0d7d5e42a8e92841af0f89dc577eb0888831fd9f /src/core/main.cpp | |
parent | Island loading cleanup and fix (diff) | |
parent | Merge branch 'master' of github.com:gtamodding/re3 (diff) | |
download | re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar.gz re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar.bz2 re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar.lz re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar.xz re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.tar.zst re3-76fe1247c86873fa548c85ae8598efd4ce1947c2.zip |
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r-- | src/core/main.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp index 8458a248..99868dbd 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -63,6 +63,7 @@ #include "SceneEdit.h" #include "debugmenu.h" #include "Clock.h" +#include "custompipes.h" GlobalScene Scene; @@ -387,6 +388,9 @@ PluginAttach(void) return FALSE; } +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeRegister(); +#endif return TRUE; } @@ -400,7 +404,11 @@ Initialise3D(void *param) DebugMenuInit(); DebugMenuPopulate(); #endif // !DEBUGMENU - return CGame::InitialiseRenderWare(); + bool ret = CGame::InitialiseRenderWare(); +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeInit(); // need Scene.world for this +#endif + return ret; } return (FALSE); @@ -409,6 +417,9 @@ Initialise3D(void *param) static void Terminate3D(void) { +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeShutdown(); +#endif CGame::ShutdownRenderWare(); #ifdef DEBUGMENU DebugMenuShutdown(); @@ -1099,6 +1110,12 @@ Idle(void *arg) tbEndTimer("PreRender"); #endif +#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()){ if(!DoRWStuffStartOfFrame_Horizon(255, 255, 255, 255, 255, 255, 255)) return; @@ -1111,9 +1128,10 @@ Idle(void *arg) DefinedState(); - // BUG. This has to be done BEFORE RwCameraBeginUpdate +#ifndef FIX_BUGS RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip()); RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart()); +#endif #ifdef TIMEBARS tbStartTimer(0, "RenderScene"); @@ -1122,6 +1140,11 @@ Idle(void *arg) #ifdef TIMEBARS tbEndTimer("RenderScene"); #endif + +#ifdef EXTENDED_PIPELINES + CustomPipes::EnvMapRender(); +#endif + RenderDebugShit(); RenderEffects(); |