diff options
author | aap <aap@papnet.eu> | 2020-08-18 10:58:15 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-08-18 10:58:15 +0200 |
commit | c556cbbbe016858537ebc2950e2803bcb85f93d5 (patch) | |
tree | b301c8f091840a378b82b27806546a28abd6d221 /src/core/main.cpp | |
parent | Move stuff to vendor (diff) | |
download | re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar.gz re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar.bz2 re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar.lz re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar.xz re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.tar.zst re3-c556cbbbe016858537ebc2950e2803bcb85f93d5.zip |
Diffstat (limited to '')
-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 b63688ec..7cde9c4d 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -61,6 +61,7 @@ #include "MemoryCard.h" #include "SceneEdit.h" #include "debugmenu.h" +#include "custompipes.h" GlobalScene Scene; @@ -349,6 +350,9 @@ PluginAttach(void) return FALSE; } +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeRegister(); +#endif return TRUE; } @@ -362,7 +366,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); @@ -371,6 +379,9 @@ Initialise3D(void *param) static void Terminate3D(void) { +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeShutdown(); +#endif CGame::ShutdownRenderWare(); #ifdef DEBUGMENU DebugMenuShutdown(); @@ -1061,6 +1072,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; @@ -1073,9 +1090,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"); @@ -1084,6 +1102,11 @@ Idle(void *arg) #ifdef TIMEBARS tbEndTimer("RenderScene"); #endif + +#ifdef EXTENDED_PIPELINES + CustomPipes::EnvMapRender(); +#endif + RenderDebugShit(); RenderEffects(); |