当前位置: 首页>>代码示例>>C++>>正文


C++ cl_enginefunc_t::COM_ExpandFilename方法代码示例

本文整理汇总了C++中cl_enginefunc_t::COM_ExpandFilename方法的典型用法代码示例。如果您正苦于以下问题:C++ cl_enginefunc_t::COM_ExpandFilename方法的具体用法?C++ cl_enginefunc_t::COM_ExpandFilename怎么用?C++ cl_enginefunc_t::COM_ExpandFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cl_enginefunc_t的用法示例。


在下文中一共展示了cl_enginefunc_t::COM_ExpandFilename方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CL_LoadParticleMan

void CL_LoadParticleMan( void )
{
	char szPDir[512];

	if ( gEngfuncs.COM_ExpandFilename( PARTICLEMAN_DLLNAME, szPDir, sizeof( szPDir ) ) == FALSE )
	{
		g_pParticleMan = NULL;
		g_hParticleManModule = NULL;
		return;
	}

	g_hParticleManModule = Sys_LoadModule( szPDir );
	CreateInterfaceFn particleManFactory = Sys_GetFactory( g_hParticleManModule );

	if ( particleManFactory == NULL )
	{
		g_pParticleMan = NULL;
		g_hParticleManModule = NULL;
		return;
	}

	g_pParticleMan = (IParticleMan *)particleManFactory( PARTICLEMAN_INTERFACE, NULL);

	if ( g_pParticleMan )
	{
		 g_pParticleMan->SetUp( &gEngfuncs );

		 // Add custom particle classes here BEFORE calling anything else or you will die.
		 g_pParticleMan->AddCustomParticleClassSize ( sizeof ( CBaseParticle ) );
	}
}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:31,代码来源:cdll_int.cpp

示例2: Initialize

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;
}
开发者ID:Arkshine,项目名称:NS,代码行数:33,代码来源:cdll_int.cpp

示例3: Initialize

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;
}
开发者ID:ChunHungLiu,项目名称:halflife,代码行数:57,代码来源:cdll_int.cpp


注:本文中的cl_enginefunc_t::COM_ExpandFilename方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。