void HUD_Init( void ) { g_engfuncs.pfnAddCommand ("noclip", NULL, "enable or disable no clipping mode" ); g_engfuncs.pfnAddCommand ("notarget", NULL, "notarget mode (monsters do not see you)" ); g_engfuncs.pfnAddCommand ("fullupdate", NULL, "re-init HUD on start demo recording" ); g_engfuncs.pfnAddCommand ("give", NULL, "give specified item or weapon" ); g_engfuncs.pfnAddCommand ("drop", NULL, "drop current/specified item or weapon" ); g_engfuncs.pfnAddCommand ("intermission", NULL, "go to intermission" ); g_engfuncs.pfnAddCommand ("spectate", NULL, "enable spectator mode" ); g_engfuncs.pfnAddCommand ("gametitle", NULL, "show game logo" ); g_engfuncs.pfnAddCommand ("god", NULL, "classic cheat" ); g_engfuncs.pfnAddCommand ("fov", NULL, "set client field of view" ); g_engfuncs.pfnAddCommand ("fly", NULL, "fly mode (flight)" ); HUD_ShutdownEffects (); g_pParticleSystems = new ParticleSystemManager(); g_pViewRenderBeams = new CViewRenderBeams(); g_pParticles = new CParticleSystem(); g_pTempEnts = new CTempEnts(); InitRain(); // init weather system gHUD.Init(); IN_Init (); // link all events EV_HookEvents (); }
int CL_DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; RecClInitialize(pEnginefuncs, iVersion); if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); // get tracker interface, if any char szDir[512]; if (!gEngfuncs.COM_ExpandFilename("Bin/TrackerUI.dll", szDir, sizeof(szDir))) { g_pTrackerUser = NULL; g_hTrackerModule = NULL; return 1; } g_hTrackerModule = Sys_LoadModule(szDir); CreateInterfaceFn trackerFactory = Sys_GetFactory(g_hTrackerModule); if (!trackerFactory) { g_pTrackerUser = NULL; g_hTrackerModule = NULL; return 1; } g_pTrackerUser = (ITrackerUser *)trackerFactory(TRACKERUSER_INTERFACE_VERSION, NULL); return 1; }
int EXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; //!!! mwh UNDONE We need to think about our versioning strategy. Do we want to try to be compatible // with previous versions, especially when we're only 'bonus' functionality? Should it be the engine // that decides if the DLL is compliant? if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); // Determine which filesystem to use. #if defined ( _WIN32 ) char *szFsModule = "filesystem_stdio.dll"; #elif defined(OSX) char *szFsModule = "filesystem_stdio.dylib"; #elif defined(LINUX) char *szFsModule = "filesystem_stdio.so"; #else #error #endif char szFSDir[MAX_PATH]; szFSDir[0] = 0; if ( gEngfuncs.COM_ExpandFilename( szFsModule, szFSDir, sizeof( szFSDir ) ) == FALSE ) { return false; } // Get filesystem interface. g_pFileSystemModule = Sys_LoadModule( szFSDir ); assert( g_pFileSystemModule ); if( !g_pFileSystemModule ) { return false; } CreateInterfaceFn fileSystemFactory = Sys_GetFactory( g_pFileSystemModule ); if( !fileSystemFactory ) { return false; } g_pFileSystem = ( IFileSystem * )fileSystemFactory( FILESYSTEM_INTERFACE_VERSION, NULL ); assert( g_pFileSystem ); if( !g_pFileSystem ) { return false; } return 1; }
int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); return 1; }
int CL_DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); CL_LoadParticleMan(); // get tracker interface, if any return 1; }
int DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); // if ( CVAR_GET_FLOAT( "r_stencil_buffer" ) != 0 ) // ENGINE_SetContext(); return 1; }
int EXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion ) { gEngfuncs = *pEnginefuncs; //!!! mwh UNDONE We need to think about our versioning strategy. Do we want to try to be compatible // with previous versions, especially when we're only 'bonus' functionality? Should it be the engine // that decides if the DLL is compliant? if (iVersion != CLDLL_INTERFACE_VERSION) return 0; memcpy(&gEngfuncs, pEnginefuncs, sizeof(cl_enginefunc_t)); EV_HookEvents(); return 1; }