mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Fixed redundant code duplication when initializing SectorNames.xml for foreign (not English) language
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4549 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -615,65 +615,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
if(!ReadInSectorNames(fileName,TRUE,0))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// moved to lua
|
||||
//strcpy(fileName, directoryName);
|
||||
//strcat(fileName, SECTORLEVEL1NAMESFILENAME);
|
||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
//SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,1), SECTORLEVEL1NAMESFILENAME);
|
||||
//
|
||||
//#ifndef ENGLISH
|
||||
//AddLanguagePrefix(fileName);
|
||||
//if ( FileExists(fileName) )
|
||||
//{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
// if(!ReadInSectorNames(fileName,TRUE,1))
|
||||
// return FALSE;
|
||||
//}
|
||||
//#endif
|
||||
|
||||
//strcpy(fileName, directoryName);
|
||||
//strcat(fileName, SECTORLEVEL2NAMESFILENAME);
|
||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
//SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,2), SECTORLEVEL2NAMESFILENAME);
|
||||
//
|
||||
//#ifndef ENGLISH
|
||||
//AddLanguagePrefix(fileName);
|
||||
//if ( FileExists(fileName) )
|
||||
//{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
// if(!ReadInSectorNames(fileName,TRUE,2))
|
||||
// return FALSE;
|
||||
//}
|
||||
//#endif
|
||||
|
||||
//strcpy(fileName, directoryName);
|
||||
//strcat(fileName, SECTORLEVEL3NAMESFILENAME);
|
||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
//SGP_THROW_IFFALSE(ReadInSectorNames(fileName,FALSE,3), SECTORLEVEL3NAMESFILENAME);
|
||||
//
|
||||
//#ifndef ENGLISH
|
||||
//AddLanguagePrefix(fileName);
|
||||
//if ( FileExists(fileName) )
|
||||
//{
|
||||
// DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
// if(!ReadInSectorNames(fileName,TRUE,3))
|
||||
// return FALSE;
|
||||
//}
|
||||
//#endif
|
||||
|
||||
|
||||
// code duplication?
|
||||
#ifndef ENGLISH
|
||||
AddLanguagePrefix(fileName);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
if(!ReadInSectorNames(fileName,TRUE,0))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// WANNE: Why do we need it. It should also run without that file!!
|
||||
// SANDRO - always initialize those files, we need it on game start
|
||||
|
||||
Reference in New Issue
Block a user