Esempio n. 1
0
LTRESULT CKeyMgrPlugin::PreHook_EditStringList(
	const char* szRezPath,
	const char* szPropName,
	char** aszStrings,
    uint32* pcStrings,
    const uint32 cMaxStrings,
    const uint32 cMaxStringLength)
{
	if (!g_pKeyMgr)
	{
		// This will set the g_pKeyMgr...Since this could also be
		// set elsewhere, just check for the global bute mgr...

		char szFile[256];
		sprintf(szFile, "%s\\%s", szRezPath, KEY_DEFAULT_FILE);
        sm_KeyMgr.SetInRezFile(LTFALSE);
        sm_KeyMgr.Init(szFile);
	}

	if (!PopulateStringList(aszStrings, pcStrings, cMaxStrings, cMaxStringLength))
	{
		return LT_UNSUPPORTED;
	}

	return LT_OK;
}
Esempio n. 2
0
LTRESULT CRadarTypeMgrPlugin::PreHook_EditStringList( const char* szRezPath,
													  const char* szPropName,
													  char** aszStrings,
													  uint32* pcStrings,
													  const uint32 cMaxStrings,
													  const uint32 cMaxStringLength )
{
	if( !sm_bInitted )
	{
		char szFile[256] = {0};
		sprintf( szFile, "%s\\%s", szRezPath, RTMGR_DEFAULT_FILE );
		
		CRadarTypeMgr& RadarType = CRadarTypeMgr::Instance( );
        
		RadarType.SetInRezFile( LTFALSE );
        RadarType.Init( szFile );
        
		sm_bInitted = true;

		if( !g_pRadarTypeMgr )
		{
			strcpy( aszStrings[(*pcStrings)++], "<Error - Radar Type Mgr not Inited!>" );
			return LT_UNSUPPORTED;
		}
	}

	if( !PopulateStringList( aszStrings, pcStrings, cMaxStrings, cMaxStringLength ))
	{
		strcpy( aszStrings[(*pcStrings)++], "<Error - Populating String List!>" );
	}

	return LT_OK;
}
Esempio n. 3
0
LTRESULT SpecialFXPlugin::PreHook_EditStringList( const char *szRezPath, const char *szPropName, char **aszStrings,
													 uint32 *pcStrings, const uint32 cMaxStrings, const uint32 cMaxStringLength)
{
	// Make sure this is the prop we want
	if( !stricmp( "FxName", szPropName ) )
	{
		return PopulateStringList( szRezPath, aszStrings, pcStrings, cMaxStrings, cMaxStringLength );
	}

	return LT_UNSUPPORTED;
}
Esempio n. 4
0
LTRESULT CTriggerTypeMgrPlugin::PreHook_EditStringList( const char* szRezPath,
														 const char* szPropName,
														 char** aszStrings,
														 uint32* pcStrings,
														 const uint32 cMaxStrings,
														 const uint32 cMaxStringLength )
{
	if( !sm_bInitted )
	{
		char szFile[256] = {0};
		sprintf( szFile, "%s\\%s", szRezPath, TTMGR_DEFAULT_FILE );
		
		CTriggerTypeMgr& TriggerType = CTriggerTypeMgr::Instance( );
        
		TriggerType.SetInRezFile( LTFALSE );
        TriggerType.Init( szFile );
        
		sm_bInitted = true;

		if( !g_pTriggerTypeMgr )
		{
			strcpy( aszStrings[(*pcStrings)++], "<Error - Trigger Type Mgr not Inited!>" );
		}
	}

	if( !PopulateStringList( aszStrings, pcStrings, cMaxStrings, cMaxStringLength ))
	{
		strcpy( aszStrings[(*pcStrings)++], "<Error - Populating String List!>" );
	}
	else
	{
		// Sort the list...
			
		qsort( aszStrings, *pcStrings, sizeof( char * ), CaseInsensitiveCompare );
	}

	return LT_OK;
}