summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/World.cpp2
-rw-r--r--src/core/config.h5
-rw-r--r--src/core/main.cpp49
-rw-r--r--src/core/main.h1
-rw-r--r--src/core/re3.cpp7
5 files changed, 26 insertions, 38 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 43af9f12..fb0323ae 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -1931,6 +1931,7 @@ CWorld::Process(void)
if(movingEnt->GetIsStatic()) { movingEnt->RemoveFromMovingList(); }
}
}
+#ifdef VIS_DISTANCE_ALPHA
for(int y = 0; y < NUMSECTORS_Y; y++)
for(int x = 0; x < NUMSECTORS_X; x++){
CPtrNode *node;
@@ -1952,6 +1953,7 @@ CWorld::Process(void)
for(node = sect->m_lists[ENTITYLIST_DUMMIES_OVERLAP].first; node; node = node->next)
((CEntity*)node->item)->UpdateDistanceFade();
}
+#endif
bForceProcessControl = true;
for(CPtrNode *node = ms_listMovingEntityPtrs.first; node; node = node->next) {
CPhysical *movingEnt = (CPhysical *)node->item;
diff --git a/src/core/config.h b/src/core/config.h
index bee60489..681d239b 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -248,6 +248,11 @@ enum Config {
# define PS2_MATFX
#endif
+// Mobile only.
+// Looks like they tried to fix fading but it still sucks
+// do not use this
+//#define VIS_DISTANCE_ALPHA
+
#ifdef VU_COLLISION
#define COMPRESSED_COL_VECTORS // currently need compressed vectors in this code
#endif
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 4a61267d..2a130684 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -94,6 +94,7 @@ bool gSecondExportPass;
bool gUseModelResources;
bool gUseResources;
bool gNASTY_NASTY_MEM_SHUTDOWN_HACK; // rather unused
+bool gbPreviewCity; // don't do worldstream-style rendering but traditional method
float FramesPerSecond = 30.0f;
@@ -1228,7 +1229,6 @@ DisplayGameDebugText()
#ifdef NEW_RENDERER
bool gbRenderRoads = true;
bool gbRenderEverythingBarRoads = true;
-bool gbRenderFadingInUnderwaterEntities = true;
bool gbRenderFadingInEntities = true;
bool gbRenderWater = true;
bool gbRenderBoats = true;
@@ -1246,7 +1246,8 @@ MattRenderScene(void)
/// CRenderer::ClearForFrame(); // before ConstructRenderList
CClock::CalcEnvMapTimeMultiplicator();
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
- CWaterLevel::RenderWater(); // actually CMattRenderer::RenderWater
+if(gbRenderWater)
+ CRenderer::RenderWater(); // actually CMattRenderer::RenderWater
CClock::ms_EnvMapTimeMultiplicator = 1.0f;
// cWorldStream::ClearDynamics
/// CRenderer::ConstructRenderList(); // before PreRender
@@ -1260,24 +1261,14 @@ if(gbRenderWorld1)
if(gbRenderRoads)
CRenderer::RenderRoads();
- CRenderer::GenerateEnvironmentMap(); // should be after static shadows, but that's weird
-
- CRenderer::RenderPeds();
-
- // not sure where to put these since LCS has no underwater entities
-if(gbRenderBoats)
- CRenderer::RenderBoats();
-if(gbRenderFadingInUnderwaterEntities)
- CRenderer::RenderFadingInUnderwaterEntities();
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
-if(gbRenderWater)
- CRenderer::RenderTransparentWater();
if(gbRenderEverythingBarRoads)
CRenderer::RenderEverythingBarRoads();
- // seam fixer
- // moved this:
- // CRenderer::RenderFadingInEntities();
+ // TODO: seam fixer
+ // these aren't very transparent. just objects
+if(gbRenderFadingInEntities)
+ CRenderer::RenderFadingInEntities();
}
void
@@ -1290,7 +1281,8 @@ RenderScene_new(void)
MattRenderScene();
DefinedState();
// CMattRenderer::ResetRenderStates
- // moved CRenderer::RenderBoats to before transparent water
+if(gbRenderBoats)
+ CRenderer::RenderBoats();
POP_RENDERGROUP();
}
@@ -1300,12 +1292,12 @@ void
RenderEffects_new(void)
{
PUSH_RENDERGROUP("RenderEffects_new");
-/* // stupid to do this before the whole world is drawn!
- CShadows::RenderStaticShadows();
- CShadows::RenderStoredShadows();
- CSkidmarks::Render();
- CRubbish::Render();
-*/
+ // stupid to do this before the whole world is drawn!
+// CShadows::RenderStaticShadows();
+ CRenderer::GenerateEnvironmentMap();
+// CShadows::RenderStoredShadows();
+// CSkidmarks::Render();
+// CRubbish::Render();
// these aren't really effects
DefinedState();
@@ -1323,9 +1315,6 @@ if(gbRenderWorld2)
if(gbRenderVehicles)
CRenderer::RenderVehicles();
}
- // better render these after transparent world
-if(gbRenderFadingInEntities)
- CRenderer::RenderFadingInEntities();
// actual effects here
@@ -1592,12 +1581,8 @@ Idle(void *arg)
#ifdef PC_WATER
CWaterLevel::PreCalcWaterGeometry();
#endif
-#ifdef NEW_RENDERER
- if(gbNewRenderer){
- CWorld::AdvanceCurrentScanCode(); // don't think this is even necessary
- CRenderer::ClearForFrame();
- }
-#endif
+ CWorld::AdvanceCurrentScanCode();
+ CRenderer::ClearForFrame();
CRenderer::ConstructRenderList();
tbEndTimer("CnstrRenderList");
diff --git a/src/core/main.h b/src/core/main.h
index 3fa26e78..400730a0 100644
--- a/src/core/main.h
+++ b/src/core/main.h
@@ -42,6 +42,7 @@ extern bool gSecondExportPass;
extern bool gUseModelResources;
extern bool gUseResources;
extern bool gNASTY_NASTY_MEM_SHUTDOWN_HACK;
+extern bool gbPreviewCity;
class CSprite2d;
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index c66ce82a..2cd40e57 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -629,9 +629,6 @@ void SaveINISettings()
StoreIni("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
#endif
StoreIni("Rendering", "BackfaceCulling", gBackfaceCulling);
-#ifdef NEW_RENDERER
- StoreIni("Rendering", "NewRenderer", gbNewRenderer);
-#endif
#ifdef PROPER_SCALING
StoreIni("Draw", "ProperScaling", CDraw::ms_bProperScaling);
@@ -1005,10 +1002,8 @@ DebugMenuPopulate(void)
DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil);
DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil);
#ifdef NEW_RENDERER
- DebugMenuAddVarBool8("Render", "New Renderer", &gbNewRenderer, nil);
extern bool gbRenderRoads;
extern bool gbRenderEverythingBarRoads;
-extern bool gbRenderFadingInUnderwaterEntities;
extern bool gbRenderFadingInEntities;
extern bool gbRenderWater;
extern bool gbRenderBoats;
@@ -1018,7 +1013,6 @@ extern bool gbRenderWorld1;
extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Debug Render", "gbRenderRoads", &gbRenderRoads, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil);
- DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderWater", &gbRenderWater, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderBoats", &gbRenderBoats, nil);
@@ -1026,6 +1020,7 @@ extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld0", &gbRenderWorld0, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld1", &gbRenderWorld1, nil);
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld2", &gbRenderWorld2, nil);
+ DebugMenuAddVarBool8("Debug Render", "gbPreviewCity", &gbPreviewCity, nil);
#endif
#ifdef EXTENDED_COLOURFILTER