mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-02 14:04:14 +01:00
finished cullzones
This commit is contained in:
parent
02c7f8381b
commit
07303c62d1
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ public:
|
|||||||
float maxz;
|
float maxz;
|
||||||
|
|
||||||
int32 m_indexStart;
|
int32 m_indexStart;
|
||||||
int16 m_groupIndexCount[3];
|
int16 m_groupIndexCount[3]; // only useful during resolution stage
|
||||||
int16 m_numBuildings;
|
int16 m_numBuildings;
|
||||||
int16 m_numTreadablesPlus10m;
|
int16 m_numTreadablesPlus10m;
|
||||||
int16 m_numTreadables;
|
int16 m_numTreadables;
|
||||||
@ -26,30 +26,35 @@ public:
|
|||||||
static void DoStuffEnteringZone_OneTreadable(uint16 i);
|
static void DoStuffEnteringZone_OneTreadable(uint16 i);
|
||||||
|
|
||||||
|
|
||||||
static bool TestLine(CVector a1, CVector a2);
|
static bool TestLine(CVector vec1, CVector vec2);
|
||||||
|
static bool DoThoroughLineTest(CVector vec1, CVector vec2, CEntity *testEntity);
|
||||||
float CalcDistToCullZoneSquared(float x, float y);
|
float CalcDistToCullZoneSquared(float x, float y);
|
||||||
float CalcDistToCullZone(float x, float y) { return Sqrt(CalcDistToCullZoneSquared(x, y)); };
|
float CalcDistToCullZone(float x, float y) { return Sqrt(CalcDistToCullZoneSquared(x, y)); };
|
||||||
bool IsEntityCloseEnoughToZone(CEntity* entity, bool checkLevel);
|
bool IsEntityCloseEnoughToZone(CEntity* entity, bool checkLevel);
|
||||||
|
bool PointFallsWithinZone(CVector pos, float radius);
|
||||||
|
bool TestEntityVisibilityFromCullZone(CEntity *entity, float extraDist, CEntity *LODentity);
|
||||||
|
void FindTestPoints();
|
||||||
|
|
||||||
void GetGroupStartAndSize(int32 groupid, int32 &start, int32 &size) {
|
void GetGroupStartAndSize(int32 groupid, int32 &start, int32 &size) {
|
||||||
switch (groupid) {
|
switch (groupid) {
|
||||||
|
case 0:
|
||||||
|
default:
|
||||||
|
// buildings
|
||||||
|
start = m_indexStart;
|
||||||
|
size = m_groupIndexCount[0];
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
// treadables + 10m
|
||||||
start = m_groupIndexCount[0] + m_indexStart;
|
start = m_groupIndexCount[0] + m_indexStart;
|
||||||
size = m_groupIndexCount[1];
|
size = m_groupIndexCount[1];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
// treadables
|
||||||
start = m_groupIndexCount[0] + m_groupIndexCount[1] + m_indexStart;
|
start = m_groupIndexCount[0] + m_groupIndexCount[1] + m_indexStart;
|
||||||
size = m_groupIndexCount[2];
|
size = m_groupIndexCount[2];
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
start = m_indexStart;
|
|
||||||
size = m_groupIndexCount[0];
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FindTestPoints() {}; // todo
|
|
||||||
bool TestEntityVisibilityFromCullZone(CEntity*, float, CEntity*) { return false; }; // todo
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum eZoneAttribs
|
enum eZoneAttribs
|
||||||
@ -121,5 +126,12 @@ public:
|
|||||||
static void DoVisibilityTestCullZone(int zoneId, bool doIt);
|
static void DoVisibilityTestCullZone(int zoneId, bool doIt);
|
||||||
static bool DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set);
|
static bool DoWeHaveMoreThanXOccurencesOfSet(int32 count, uint16 *set);
|
||||||
|
|
||||||
static void CompressIndicesArray() {};// todo
|
static void CompressIndicesArray();
|
||||||
|
static bool PickRandomSetForGroup(int32 zone, int32 group, uint16 *set);
|
||||||
|
static void ReplaceSetForAllGroups(uint16 *set, uint16 setid);
|
||||||
|
static void TidyUpAndMergeLists(uint16 *extraIndices, int32 numExtraIndices);
|
||||||
|
|
||||||
|
// debug
|
||||||
|
static bool LoadTempFile(void);
|
||||||
|
static void SaveTempFile(void);
|
||||||
};
|
};
|
||||||
|
@ -565,6 +565,9 @@ DebugMenuPopulate(void)
|
|||||||
DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil);
|
DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil);
|
||||||
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil);
|
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil);
|
||||||
|
|
||||||
|
DebugMenuAddVarBool8("Debug", "Show cullzone debug stuff", &gbShowCullZoneDebugStuff, nil);
|
||||||
|
DebugMenuAddVarBool8("Debug", "Disable zone cull", &gbDisableZoneCull, nil);
|
||||||
|
|
||||||
DebugMenuAddVarBool8("Debug", "pad 1 -> pad 2", &CPad::m_bMapPadOneToPadTwo, nil);
|
DebugMenuAddVarBool8("Debug", "pad 1 -> pad 2", &CPad::m_bMapPadOneToPadTwo, nil);
|
||||||
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
|
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
|
||||||
#ifdef MENU_MAP
|
#ifdef MENU_MAP
|
||||||
|
@ -21,12 +21,14 @@
|
|||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#include "custompipes.h"
|
#include "custompipes.h"
|
||||||
|
#include "Debug.h"
|
||||||
|
|
||||||
bool gbShowPedRoadGroups;
|
bool gbShowPedRoadGroups;
|
||||||
bool gbShowCarRoadGroups;
|
bool gbShowCarRoadGroups;
|
||||||
bool gbShowCollisionPolys;
|
bool gbShowCollisionPolys;
|
||||||
bool gbShowCollisionLines;
|
bool gbShowCollisionLines;
|
||||||
bool gbShowCullZoneDebugStuff;
|
bool gbShowCullZoneDebugStuff;
|
||||||
|
bool gbDisableZoneCull; // not original
|
||||||
bool gbBigWhiteDebugLightSwitchedOn;
|
bool gbBigWhiteDebugLightSwitchedOn;
|
||||||
|
|
||||||
bool gbDontRenderBuildings;
|
bool gbDontRenderBuildings;
|
||||||
@ -35,6 +37,25 @@ bool gbDontRenderPeds;
|
|||||||
bool gbDontRenderObjects;
|
bool gbDontRenderObjects;
|
||||||
bool gbDontRenderVehicles;
|
bool gbDontRenderVehicles;
|
||||||
|
|
||||||
|
int32 EntitiesRendered;
|
||||||
|
int32 EntitiesNotRendered;
|
||||||
|
int32 RenderedBigBuildings;
|
||||||
|
int32 RenderedBuildings;
|
||||||
|
int32 RenderedCars;
|
||||||
|
int32 RenderedPeds;
|
||||||
|
int32 RenderedObjects;
|
||||||
|
int32 RenderedDummies;
|
||||||
|
int32 TestedBigBuildings;
|
||||||
|
int32 TestedBuildings;
|
||||||
|
int32 TestedCars;
|
||||||
|
int32 TestedPeds;
|
||||||
|
int32 TestedObjects;
|
||||||
|
int32 TestedDummies;
|
||||||
|
|
||||||
|
// unused
|
||||||
|
int16 TestCloseThings;
|
||||||
|
int16 TestBigThings;
|
||||||
|
|
||||||
struct EntityInfo
|
struct EntityInfo
|
||||||
{
|
{
|
||||||
CEntity *ent;
|
CEntity *ent;
|
||||||
@ -61,6 +82,11 @@ float CRenderer::ms_lodDistScale = 1.2f;
|
|||||||
#define BACKFACE_CULLING_OFF
|
#define BACKFACE_CULLING_OFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// unused
|
||||||
|
BlockedRange CRenderer::aBlockedRanges[16];
|
||||||
|
BlockedRange *CRenderer::pFullBlockedRanges;
|
||||||
|
BlockedRange *CRenderer::pEmptyBlockedRanges;
|
||||||
|
|
||||||
void
|
void
|
||||||
CRenderer::Init(void)
|
CRenderer::Init(void)
|
||||||
{
|
{
|
||||||
@ -347,6 +373,14 @@ CRenderer::RenderCollisionLines(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unused
|
||||||
|
void
|
||||||
|
CRenderer::RenderBlockBuildingLines(void)
|
||||||
|
{
|
||||||
|
for(BlockedRange *br = pFullBlockedRanges; br; br = br->next)
|
||||||
|
printf("Blocked: %f %f\n", br->a, br->b);
|
||||||
|
}
|
||||||
|
|
||||||
enum Visbility
|
enum Visbility
|
||||||
{
|
{
|
||||||
VIS_INVISIBLE,
|
VIS_INVISIBLE,
|
||||||
@ -355,14 +389,6 @@ enum Visbility
|
|||||||
VIS_STREAMME
|
VIS_STREAMME
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
#define LOD_DISTANCE (300.0f*TheCamera.LODDistMultiplier)
|
|
||||||
#else
|
|
||||||
#define LOD_DISTANCE 300.0f
|
|
||||||
#endif
|
|
||||||
#define FADE_DISTANCE 20.0f
|
|
||||||
#define STREAM_DISTANCE 30.0f
|
|
||||||
|
|
||||||
// Time Objects can be time culled if
|
// Time Objects can be time culled if
|
||||||
// other == -1 || CModelInfo::GetModelInfo(other)->GetRwObject()
|
// other == -1 || CModelInfo::GetModelInfo(other)->GetRwObject()
|
||||||
// i.e. we have to draw even at the wrong time if
|
// i.e. we have to draw even at the wrong time if
|
||||||
@ -611,7 +637,21 @@ CRenderer::ConstructRenderList(void)
|
|||||||
ms_nNoOfVisibleEntities = 0;
|
ms_nNoOfVisibleEntities = 0;
|
||||||
ms_nNoOfInVisibleEntities = 0;
|
ms_nNoOfInVisibleEntities = 0;
|
||||||
ms_vecCameraPosition = TheCamera.GetPosition();
|
ms_vecCameraPosition = TheCamera.GetPosition();
|
||||||
// TODO: blocked ranges, but unused
|
|
||||||
|
// unused
|
||||||
|
pFullBlockedRanges = nil;
|
||||||
|
pEmptyBlockedRanges = aBlockedRanges;
|
||||||
|
for(int i = 0; i < 16; i++){
|
||||||
|
aBlockedRanges[i].prev = &aBlockedRanges[i-1];
|
||||||
|
aBlockedRanges[i].next = &aBlockedRanges[i+1];
|
||||||
|
}
|
||||||
|
aBlockedRanges[0].prev = nil;
|
||||||
|
aBlockedRanges[15].next = nil;
|
||||||
|
|
||||||
|
// unused
|
||||||
|
TestCloseThings = 0;
|
||||||
|
TestBigThings = 0;
|
||||||
|
|
||||||
ScanWorld();
|
ScanWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -647,6 +687,24 @@ CRenderer::ScanWorld(void)
|
|||||||
RwMatrix *cammatrix;
|
RwMatrix *cammatrix;
|
||||||
RwV2d poly[3];
|
RwV2d poly[3];
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
// missing in game but has to be done somewhere
|
||||||
|
EntitiesRendered = 0;
|
||||||
|
EntitiesNotRendered = 0;
|
||||||
|
RenderedBigBuildings = 0;
|
||||||
|
RenderedBuildings = 0;
|
||||||
|
RenderedCars = 0;
|
||||||
|
RenderedPeds = 0;
|
||||||
|
RenderedObjects = 0;
|
||||||
|
RenderedDummies = 0;
|
||||||
|
TestedBigBuildings = 0;
|
||||||
|
TestedBuildings = 0;
|
||||||
|
TestedCars = 0;
|
||||||
|
TestedPeds = 0;
|
||||||
|
TestedObjects = 0;
|
||||||
|
TestedDummies = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
memset(vectors, 0, sizeof(vectors));
|
memset(vectors, 0, sizeof(vectors));
|
||||||
vectors[CORNER_FAR_TOPLEFT].x = -vw.x * f;
|
vectors[CORNER_FAR_TOPLEFT].x = -vw.x * f;
|
||||||
vectors[CORNER_FAR_TOPLEFT].y = vw.y * f;
|
vectors[CORNER_FAR_TOPLEFT].y = vw.y * f;
|
||||||
@ -765,6 +823,19 @@ CRenderer::ScanWorld(void)
|
|||||||
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_GENERIC));
|
ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_GENERIC));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
if(gbShowCullZoneDebugStuff){
|
||||||
|
sprintf(gString, "Rejected: %d/%d.", EntitiesNotRendered, EntitiesNotRendered + EntitiesRendered);
|
||||||
|
CDebug::PrintAt(gString, 10, 10);
|
||||||
|
sprintf(gString, "Tested:BBuild:%d Build:%d Peds:%d Cars:%d Obj:%d Dummies:%d",
|
||||||
|
TestedBigBuildings, TestedBuildings, TestedPeds, TestedCars, TestedObjects, TestedDummies);
|
||||||
|
CDebug::PrintAt(gString, 10, 11);
|
||||||
|
sprintf(gString, "Rendered:BBuild:%d Build:%d Peds:%d Cars:%d Obj:%d Dummies:%d",
|
||||||
|
RenderedBigBuildings, RenderedBuildings, RenderedPeds, RenderedCars, RenderedObjects, RenderedDummies);
|
||||||
|
CDebug::PrintAt(gString, 10, 12);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1014,8 +1085,20 @@ CRenderer::ScanBigBuildingList(CPtrList &list)
|
|||||||
|
|
||||||
for(node = list.first; node; node = node->next){
|
for(node = list.first; node; node = node->next){
|
||||||
ent = (CEntity*)node->item;
|
ent = (CEntity*)node->item;
|
||||||
if(!ent->bZoneCulled && SetupBigBuildingVisibility(ent) == VIS_VISIBLE)
|
#ifndef MASTER
|
||||||
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
// all missing from game actually
|
||||||
|
TestedBigBuildings++;
|
||||||
|
#endif
|
||||||
|
if(!ent->bZoneCulled){
|
||||||
|
if(SetupBigBuildingVisibility(ent) == VIS_VISIBLE)
|
||||||
|
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
||||||
|
#ifndef MASTER
|
||||||
|
EntitiesRendered++;
|
||||||
|
RenderedBigBuildings++;
|
||||||
|
}else{
|
||||||
|
EntitiesNotRendered++;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1036,7 +1119,7 @@ CRenderer::ScanSectorList(CPtrList *lists)
|
|||||||
continue; // already seen
|
continue; // already seen
|
||||||
ent->m_scanCode = CWorld::GetCurrentScanCode();
|
ent->m_scanCode = CWorld::GetCurrentScanCode();
|
||||||
|
|
||||||
if(IsEntityCullZoneVisible(ent))
|
if(IsEntityCullZoneVisible(ent)){
|
||||||
switch(SetupEntityVisibility(ent)){
|
switch(SetupEntityVisibility(ent)){
|
||||||
case VIS_VISIBLE:
|
case VIS_VISIBLE:
|
||||||
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
||||||
@ -1059,11 +1142,37 @@ CRenderer::ScanSectorList(CPtrList *lists)
|
|||||||
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable()){
|
#ifndef MASTER
|
||||||
if(!CStreaming::ms_disableStreaming)
|
EntitiesRendered++;
|
||||||
if(SetupEntityVisibility(ent) == VIS_STREAMME)
|
switch(ent->GetType()){
|
||||||
if(!m_loadingPriority || CStreaming::ms_numModelsRequested < 10)
|
case ENTITY_TYPE_BUILDING:
|
||||||
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
if(ent->bIsBIGBuilding)
|
||||||
|
RenderedBigBuildings++;
|
||||||
|
else
|
||||||
|
RenderedBuildings++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_VEHICLE:
|
||||||
|
RenderedCars++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_PED:
|
||||||
|
RenderedPeds++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_OBJECT:
|
||||||
|
RenderedObjects++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_DUMMY:
|
||||||
|
RenderedDummies++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}else if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable() && !CStreaming::ms_disableStreaming){
|
||||||
|
if(SetupEntityVisibility(ent) == VIS_STREAMME)
|
||||||
|
if(!m_loadingPriority || CStreaming::ms_numModelsRequested < 10)
|
||||||
|
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
||||||
|
}else{
|
||||||
|
#ifndef MASTER
|
||||||
|
EntitiesNotRendered++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1086,7 +1195,7 @@ CRenderer::ScanSectorList_Priority(CPtrList *lists)
|
|||||||
continue; // already seen
|
continue; // already seen
|
||||||
ent->m_scanCode = CWorld::GetCurrentScanCode();
|
ent->m_scanCode = CWorld::GetCurrentScanCode();
|
||||||
|
|
||||||
if(IsEntityCullZoneVisible(ent))
|
if(IsEntityCullZoneVisible(ent)){
|
||||||
switch(SetupEntityVisibility(ent)){
|
switch(SetupEntityVisibility(ent)){
|
||||||
case VIS_VISIBLE:
|
case VIS_VISIBLE:
|
||||||
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent;
|
||||||
@ -1111,10 +1220,38 @@ CRenderer::ScanSectorList_Priority(CPtrList *lists)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable()){
|
#ifndef MASTER
|
||||||
if(!CStreaming::ms_disableStreaming)
|
// actually missing in game
|
||||||
if(SetupEntityVisibility(ent) == VIS_STREAMME)
|
EntitiesRendered++;
|
||||||
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
switch(ent->GetType()){
|
||||||
|
case ENTITY_TYPE_BUILDING:
|
||||||
|
if(ent->bIsBIGBuilding)
|
||||||
|
RenderedBigBuildings++;
|
||||||
|
else
|
||||||
|
RenderedBuildings++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_VEHICLE:
|
||||||
|
RenderedCars++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_PED:
|
||||||
|
RenderedPeds++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_OBJECT:
|
||||||
|
RenderedObjects++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_DUMMY:
|
||||||
|
RenderedDummies++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}else if(ent->IsBuilding() && ((CBuilding*)ent)->GetIsATreadable() && !CStreaming::ms_disableStreaming){
|
||||||
|
if(SetupEntityVisibility(ent) == VIS_STREAMME)
|
||||||
|
CStreaming::RequestModel(ent->GetModelIndex(), 0);
|
||||||
|
}else{
|
||||||
|
#ifndef MASTER
|
||||||
|
// actually missing in game
|
||||||
|
EntitiesNotRendered++;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1220,9 +1357,34 @@ CRenderer::IsEntityCullZoneVisible(CEntity *ent)
|
|||||||
CPed *ped;
|
CPed *ped;
|
||||||
CObject *obj;
|
CObject *obj;
|
||||||
|
|
||||||
|
if(gbDisableZoneCull) return true;
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
switch(ent->GetType()){
|
||||||
|
case ENTITY_TYPE_BUILDING:
|
||||||
|
if(ent->bIsBIGBuilding)
|
||||||
|
TestedBigBuildings++;
|
||||||
|
else
|
||||||
|
TestedBuildings++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_VEHICLE:
|
||||||
|
TestedCars++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_PED:
|
||||||
|
TestedPeds++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_OBJECT:
|
||||||
|
TestedObjects++;
|
||||||
|
break;
|
||||||
|
case ENTITY_TYPE_DUMMY:
|
||||||
|
TestedDummies++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if(ent->bZoneCulled)
|
if(ent->bZoneCulled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
switch(ent->GetType()){
|
switch(ent->GetType()){
|
||||||
case ENTITY_TYPE_VEHICLE:
|
case ENTITY_TYPE_VEHICLE:
|
||||||
return IsVehicleCullZoneVisible(ent);
|
return IsVehicleCullZoneVisible(ent);
|
||||||
|
@ -2,11 +2,20 @@
|
|||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
#define LOD_DISTANCE (300.0f*TheCamera.LODDistMultiplier)
|
||||||
|
#else
|
||||||
|
#define LOD_DISTANCE 300.0f
|
||||||
|
#endif
|
||||||
|
#define FADE_DISTANCE 20.0f
|
||||||
|
#define STREAM_DISTANCE 30.0f
|
||||||
|
|
||||||
extern bool gbShowPedRoadGroups;
|
extern bool gbShowPedRoadGroups;
|
||||||
extern bool gbShowCarRoadGroups;
|
extern bool gbShowCarRoadGroups;
|
||||||
extern bool gbShowCollisionPolys;
|
extern bool gbShowCollisionPolys;
|
||||||
extern bool gbShowCollisionLines;
|
extern bool gbShowCollisionLines;
|
||||||
extern bool gbShowCullZoneDebugStuff;
|
extern bool gbShowCullZoneDebugStuff;
|
||||||
|
extern bool gbDisableZoneCull; // not original
|
||||||
extern bool gbBigWhiteDebugLightSwitchedOn;
|
extern bool gbBigWhiteDebugLightSwitchedOn;
|
||||||
|
|
||||||
extern bool gbDontRenderBuildings;
|
extern bool gbDontRenderBuildings;
|
||||||
@ -18,6 +27,13 @@ extern bool gbDontRenderVehicles;
|
|||||||
class CVehicle;
|
class CVehicle;
|
||||||
class CPtrList;
|
class CPtrList;
|
||||||
|
|
||||||
|
// unused
|
||||||
|
struct BlockedRange
|
||||||
|
{
|
||||||
|
float a, b; // unknown
|
||||||
|
BlockedRange *prev, *next;
|
||||||
|
};
|
||||||
|
|
||||||
class CRenderer
|
class CRenderer
|
||||||
{
|
{
|
||||||
static int32 ms_nNoOfVisibleEntities;
|
static int32 ms_nNoOfVisibleEntities;
|
||||||
@ -28,6 +44,10 @@ class CRenderer
|
|||||||
static CVector ms_vecCameraPosition;
|
static CVector ms_vecCameraPosition;
|
||||||
static CVehicle *m_pFirstPersonVehicle;
|
static CVehicle *m_pFirstPersonVehicle;
|
||||||
|
|
||||||
|
// unused
|
||||||
|
static BlockedRange aBlockedRanges[16];
|
||||||
|
static BlockedRange *pFullBlockedRanges;
|
||||||
|
static BlockedRange *pEmptyBlockedRanges;
|
||||||
public:
|
public:
|
||||||
static float ms_lodDistScale;
|
static float ms_lodDistScale;
|
||||||
static bool m_loadingPriority;
|
static bool m_loadingPriority;
|
||||||
@ -46,6 +66,8 @@ public:
|
|||||||
static void RenderFirstPersonVehicle(void);
|
static void RenderFirstPersonVehicle(void);
|
||||||
|
|
||||||
static void RenderCollisionLines(void);
|
static void RenderCollisionLines(void);
|
||||||
|
// unused
|
||||||
|
static void RenderBlockBuildingLines(void);
|
||||||
|
|
||||||
static int32 SetupEntityVisibility(CEntity *ent);
|
static int32 SetupEntityVisibility(CEntity *ent);
|
||||||
static int32 SetupBigBuildingVisibility(CEntity *ent);
|
static int32 SetupBigBuildingVisibility(CEntity *ent);
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "custompipes.h"
|
#include "custompipes.h"
|
||||||
|
|
||||||
#define FADE_DISTANCE 20.0f
|
|
||||||
|
|
||||||
CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList;
|
CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaList;
|
||||||
CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList;
|
CLinkList<CVisibilityPlugins::AlphaObjectInfo> CVisibilityPlugins::m_alphaEntityList;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user