blob: 814d3105a4ee01879a4e2957fea4fcc6477efdcc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
#pragma once
class CEntity;
extern bool gbShowCollisionPolys;
extern bool gbShowCollisionLines;
extern bool gbBigWhiteDebugLightSwitchedOn;
extern bool gbDontRenderBuildings;
extern bool gbDontRenderBigBuildings;
extern bool gbDontRenderPeds;
extern bool gbDontRenderObjects;
extern bool gbDontRenderVehicles;
class CVehicle;
class CPtrList;
class CRenderer
{
static int32 ms_nNoOfVisibleEntities;
static CEntity *ms_aVisibleEntityPtrs[NUMVISIBLEENTITIES];
static int32 ms_nNoOfInVisibleEntities;
static CEntity *ms_aInVisibleEntityPtrs[NUMINVISIBLEENTITIES];
#ifdef NEW_RENDERER
static int32 ms_nNoOfVisibleVehicles;
static CEntity *ms_aVisibleVehiclePtrs[NUMVISIBLEENTITIES];
// for cWorldStream emulation
static int32 ms_nNoOfVisibleBuildings;
static CEntity *ms_aVisibleBuildingPtrs[NUMVISIBLEENTITIES];
#endif
static CVector ms_vecCameraPosition;
static CVehicle *m_pFirstPersonVehicle;
public:
static float ms_lodDistScale;
static bool m_loadingPriority;
static void Init(void);
static void Shutdown(void);
static void PreRender(void);
static void RenderRoads(void);
static void RenderFadingInEntities(void);
static void RenderFadingInUnderwaterEntities(void);
static void RenderEverythingBarRoads(void);
static void RenderBoats(void);
static void RenderOneRoad(CEntity *);
static void RenderOneNonRoad(CEntity *);
static void RenderFirstPersonVehicle(void);
static void RenderCollisionLines(void);
static int32 SetupEntityVisibility(CEntity *ent);
static int32 SetupBigBuildingVisibility(CEntity *ent);
static void ConstructRenderList(void);
static void ScanWorld(void);
static void RequestObjectsInFrustum(void);
static void ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrList *));
static void ScanBigBuildingList(CPtrList &list);
static void ScanSectorList(CPtrList *lists);
static void ScanSectorList_Priority(CPtrList *lists);
static void ScanSectorList_Subway(CPtrList *lists);
static void ScanSectorList_RequestModels(CPtrList *lists);
static void SortBIGBuildings(void);
static void SortBIGBuildingsForSectorList(CPtrList *list);
static bool ShouldModelBeStreamed(CEntity *ent, const CVector &campos);
static void RemoveVehiclePedLights(CEntity *ent, bool reset);
#ifdef NEW_RENDERER
static void ClearForFrame(void);
static void RenderVehiclesAndPeds(void); // just called RenderVehicles in LCS
static void RenderOneBuilding(CEntity *ent, float camdist = 0.0f);
static void RenderWorld(int pass); // like cWorldStream::Render(int)
#endif
};
|