@@ -1022,13 +1022,13 @@ bool InitGameSystems( CreateInterfaceFn appSystemFactory )
10221022 }
10231023
10241024 // Each mod is required to implement this
1025- view = GetViewRenderInstance ();
1026- if ( !view )
1025+ g_view = GetViewRenderInstance ();
1026+ if ( !g_view )
10271027 {
10281028 Error ( " GetViewRenderInstance() must be implemented by game." );
10291029 }
10301030
1031- view ->Init ();
1031+ g_view ->Init ();
10321032 for ( int hh = 0 ; hh < MAX_SPLITSCREEN_PLAYERS ; ++hh )
10331033 {
10341034 ACTIVE_SPLITSCREEN_PLAYER_GUARD_VGUI ( hh );
@@ -1313,7 +1313,7 @@ void CHLClient::Shutdown( void )
13131313 input->Shutdown_All ();
13141314 C_BaseTempEntity::ClearDynamicTempEnts ();
13151315 TermSmokeFogOverlay ();
1316- view ->Shutdown ();
1316+ g_view ->Shutdown ();
13171317 g_pParticleSystemMgr->UncacheAllParticleSystems ();
13181318 UncacheAllMaterials ();
13191319
@@ -1602,7 +1602,7 @@ void CHLClient::View_Render( vrect_t *rect )
16021602 if ( rect->width == 0 || rect->height == 0 )
16031603 return ;
16041604
1605- view ->Render ( rect );
1605+ g_view ->Render ( rect );
16061606 UpdatePerfStats ();
16071607}
16081608
@@ -1612,7 +1612,7 @@ void CHLClient::View_Render( vrect_t *rect )
16121612// -----------------------------------------------------------------------------
16131613bool CHLClient::GetPlayerView ( CViewSetup &playerView )
16141614{
1615- playerView = *view ->GetPlayerViewSetup ();
1615+ playerView = *g_view ->GetPlayerViewSetup ();
16161616 return true ;
16171617}
16181618
@@ -1782,9 +1782,9 @@ void ConfigureCurrentSystemLevel()
17821782 }
17831783
17841784 C_BaseEntity::UpdateVisibilityAllEntities ();
1785- if ( view )
1785+ if ( g_view )
17861786 {
1787- view ->InitFadeData ();
1787+ g_view ->InitFadeData ();
17881788 }
17891789}
17901790
@@ -1823,7 +1823,7 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
18231823
18241824 C_BaseTempEntity::ClearDynamicTempEnts ();
18251825 clienteffects->Flush ();
1826- view ->LevelInit ();
1826+ g_view ->LevelInit ();
18271827 tempents->LevelInit ();
18281828 for ( int hh = 0 ; hh < MAX_SPLITSCREEN_PLAYERS ; ++hh )
18291829 {
@@ -1948,7 +1948,7 @@ void CHLClient::LevelShutdown( void )
19481948 // Now do the post-entity shutdown of all systems
19491949 IGameSystem::LevelShutdownPostEntityAllSystems ();
19501950
1951- view ->LevelShutdown ();
1951+ g_view ->LevelShutdown ();
19521952 beams->ClearBeams ();
19531953 ParticleMgr ()->RemoveAllEffects ();
19541954
@@ -2431,7 +2431,7 @@ void OnRenderStart()
24312431 // This will place the player + the view models + all parent
24322432 // entities at the correct abs position so that their attachment points
24332433 // are at the correct location
2434- view ->OnRenderStart ();
2434+ g_view ->OnRenderStart ();
24352435 partition->SuppressLists ( PARTITION_ALL_CLIENT_EDICTS , false );
24362436
24372437 // Process OnDataChanged events.
@@ -2681,7 +2681,7 @@ void CHLClient::WriteSaveGameScreenshot( const char *pFilename )
26812681{
26822682 // Single player doesn't support split screen yet!!!
26832683 ACTIVE_SPLITSCREEN_PLAYER_GUARD ( 0 );
2684- view ->WriteSaveGameScreenshot ( pFilename );
2684+ g_view ->WriteSaveGameScreenshot ( pFilename );
26852685}
26862686
26872687// Given a list of "S(wavname) S(wavname2)" tokens, look up the localized text and emit
@@ -2817,14 +2817,14 @@ bool CHLClient::CacheReplayRagdolls( const char* pFilename, int nStartTick )
28172817// save game screenshot writing
28182818void CHLClient::WriteSaveGameScreenshotOfSize ( const char *pFilename, int width, int height )
28192819{
2820- view ->WriteSaveGameScreenshotOfSize ( pFilename, width, height );
2820+ g_view ->WriteSaveGameScreenshotOfSize ( pFilename, width, height );
28212821}
28222822
28232823// See RenderViewInfo_t
28242824void CHLClient::RenderView ( const CViewSetup &setup, int nClearFlags, int whatToDraw )
28252825{
28262826 VPROF (" RenderView" );
2827- view ->RenderView ( setup, setup, nClearFlags, whatToDraw );
2827+ g_view ->RenderView ( setup, setup, nClearFlags, whatToDraw );
28282828}
28292829
28302830bool CHLClient::ShouldHideLoadingPlaque ( void )
@@ -3042,7 +3042,7 @@ bool CHLClient::SupportsRandomMaps()
30423042#endif
30433043}
30443044
3045- extern IViewRender *view ;
3045+ extern IViewRender *g_view ;
30463046
30473047// -----------------------------------------------------------------------------
30483048// Purpose: interface from materialsystem to client, currently just for recording into tools
@@ -3057,7 +3057,7 @@ class CClientMaterialSystem : public IClientMaterialSystem
30573057 if ( !clienttools->IsInRecordingMode () )
30583058 return HTOOLHANDLE_INVALID ;
30593059
3060- C_BaseEntity *pEnt = view ->GetCurrentlyDrawingEntity ();
3060+ C_BaseEntity *pEnt = g_view ->GetCurrentlyDrawingEntity ();
30613061 if ( !pEnt || !pEnt->IsToolRecording () )
30623062 return HTOOLHANDLE_INVALID ;
30633063
0 commit comments