/* ================== SCR_VidInit ================== */ void SCR_VidInit( void ) { Q_memset( &clgame.ds, 0, sizeof( clgame.ds )); // reset a draw state Q_memset( &menu.ds, 0, sizeof( menu.ds )); // reset a draw state Q_memset( &clgame.centerPrint, 0, sizeof( clgame.centerPrint )); // update screen sizes for menu menu.globals->scrWidth = scr_width->integer; menu.globals->scrHeight = scr_height->integer; SCR_RebuildGammaTable(); #ifndef NO_VGUI VGui_Startup (); #endif clgame.load_sequence++; // now all hud sprites are invalid // vid_state has changed if( menu.hInstance ) menu.dllFuncs.pfnVidInit(); if( clgame.hInstance ) clgame.dllFuncs.pfnVidInit(); // restart console size Con_VidInit (); }
int DLLEXPORT HUD_VidInit( void ) { gHUD.VidInit(); VGui_Startup(); return 1; }
int CL_DLLEXPORT HUD_VidInit( void ) { // RecClHudVidInit(); gHUD.VidInit(); VGui_Startup(); return 1; }
int DLLEXPORT HUD_VidInit( void ) { gHUD.VidInit(); VGui_Startup(); //LRCTEMP 1.8 if (CVAR_GET_FLOAT("r_glow") != 0) //check the cvar for the glow is on.//AJH Modified to include glow mode (1&2) //LRCTEMP 1.8 InitScreenGlow(); // glow effect --FragBait0 return 1; }
int DLLEXPORT HUD_VidInit( void ) { gHUD.VidInit(); #ifndef NO_VGUI VGui_Startup(); #endif return 1; }
//----------------------------------------------------------------------------- // Purpose: Called when the DLL is first loaded. // Input : engineFactory - // Output : int //----------------------------------------------------------------------------- int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physicsFactory, CGlobalVarsBase *pGlobals ) { InitCRTMemDebug(); MathLib_Init( 2.2f, 2.2f, 0.0f, 2.0f ); // Hook up global variables gpGlobals = pGlobals; // We aren't happy unless we get all of our interfaces. if( !(engine = (IVEngineClient *)appSystemFactory( VENGINE_CLIENT_INTERFACE_VERSION, NULL )) || !(modelrender = (IVModelRender *)appSystemFactory( VENGINE_HUDMODEL_INTERFACE_VERSION, NULL )) || !(effects = (IVEfx *)appSystemFactory( VENGINE_EFFECTS_INTERFACE_VERSION, NULL )) || !(cvar = (ICvar *)appSystemFactory( VENGINE_CVAR_INTERFACE_VERSION, NULL )) || !(enginetrace = (IEngineTrace *)appSystemFactory( INTERFACEVERSION_ENGINETRACE_CLIENT, NULL )) || !(render = (IVRenderView *)appSystemFactory( VENGINE_RENDERVIEW_INTERFACE_VERSION, NULL )) || !(debugoverlay = (IVDebugOverlay *)appSystemFactory( VDEBUG_OVERLAY_INTERFACE_VERSION, NULL )) || !(materials = (IMaterialSystem *)appSystemFactory( MATERIAL_SYSTEM_INTERFACE_VERSION, NULL )) || !(engineCache = (IVEngineCache*)appSystemFactory(VENGINE_CACHE_INTERFACE_VERSION, NULL )) || !(modelinfo = (IVModelInfo *)appSystemFactory(VMODELINFO_CLIENT_INTERFACE_VERSION, NULL )) || !(netgraph = (INetGraph *)appSystemFactory(VNETGRAPH_INTERFACE_VERSION, NULL )) || !(enginevgui = (IEngineVGui *)appSystemFactory(VENGINE_VGUI_VERSION, NULL )) || !(networkstringtable = (INetworkStringTableClient *)appSystemFactory(INTERFACENAME_NETWORKSTRINGTABLECLIENT,NULL)) || !(partition = (ISpatialPartition *)appSystemFactory(INTERFACEVERSION_SPATIALPARTITION, NULL)) || !(shadowmgr = (IShadowMgr *)appSystemFactory(ENGINE_SHADOWMGR_INTERFACE_VERSION, NULL)) || !(staticpropmgr = (IStaticPropMgrClient *)appSystemFactory(INTERFACEVERSION_STATICPROPMGR_CLIENT, NULL)) || !(enginesound = (IEngineSound *)appSystemFactory(IENGINESOUND_CLIENT_INTERFACE_VERSION, NULL)) || !(filesystem = (IFileSystem *)appSystemFactory(FILESYSTEM_INTERFACE_VERSION, NULL)) || !(random = (IUniformRandomStream *)appSystemFactory(VENGINE_CLIENT_RANDOM_INTERFACE_VERSION, NULL)) || !(gameuifuncs = (IGameUIFuncs * )appSystemFactory( VENGINE_GAMEUIFUNCS_VERSION, NULL )) || !(gameeventmanager = (IGameEventManager *)appSystemFactory(INTERFACEVERSION_GAMEEVENTSMANAGER,NULL)) ) { return false; } g_pMaterialSystemHardwareConfig = materials->GetHardwareConfig( MATERIALSYSTEM_HARDWARECONFIG_INTERFACE_VERSION, NULL ); if( !g_pMaterialSystemHardwareConfig ) { return false; } SetScreenSize(); // Hook up the gaussian random number generator s_GaussianRandomStream.AttachToStream( random ); // Initialize the console variables. ConCommandBaseMgr::OneTimeInit(&g_ConVarAccessor); if(!Initializer::InitializeAllObjects()) return false; if(!g_ParticleMgr.Init(8192, materials)) return false; // load used game events gameeventmanager->LoadEventsFromFile("resource/gameevents.res"); if(!VGui_Startup( appSystemFactory )) return false; g_pMatSystemSurface = (IMatSystemSurface*)vgui::surface()->QueryInterface( MAT_SYSTEM_SURFACE_INTERFACE_VERSION ); if (!g_pMatSystemSurface) return false; // Add the client systems. // Client Leaf System has to be initialized first, since DetailObjectSystem uses it IGameSystem::Add( GameStringSystem() ); IGameSystem::Add( ClientLeafSystem() ); IGameSystem::Add( DetailObjectSystem() ); IGameSystem::Add( ViewportClientSystem() ); IGameSystem::Add( ClientEffectPrecacheSystem() ); IGameSystem::Add( g_pClientShadowMgr ); IGameSystem::Add( ClientThinkList() ); IGameSystem::Add( ClientSoundscapeSystem() ); #if defined( CLIENT_DLL ) && defined( COPY_CHECK_STRESSTEST ) IGameSystem::Add( GetPredictionCopyTester() ); #endif modemanager->Init( ); gHUD.Init(); g_pClientMode->Init(); if( !IGameSystem::InitAllSystems() ) return false; g_pClientMode->Enable(); view->Init(); vieweffects->Init(); C_BaseTempEntity::PrecacheTempEnts(); input->Init_All(); VGui_CreateGlobalPanels(); InitSmokeFogOverlay(); C_TerrainMod_Init(); // Register user messages.. CUserMessageRegister::RegisterAll(); ClientVoiceMgr_Init(); // Embed voice status icons inside chat element { CHudChat *chatElement = GET_HUDELEMENT( CHudChat ); vgui::VPANEL parent = enginevgui->GetPanel( PANEL_CLIENTDLL ); if ( chatElement ) { parent = chatElement->GetVoiceArea()->GetVPanel(); } GetClientVoiceMgr()->Init( &g_VoiceStatusHelper, parent ); } if ( !PhysicsDLLInit( physicsFactory ) ) return false; g_pGameSaveRestoreBlockSet->AddBlockHandler( GetEntitiySaveRestoreBlockHandler() ); g_pGameSaveRestoreBlockSet->AddBlockHandler( GetPhysSaveRestoreBlockHandler() ); return true; }