Enemy Taunts

- Added support for localized version of the EnemyTaunts.xml file
- Added <uiIndex> tag

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6579 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-11-11 09:46:50 +00:00
parent 6ac2d94e5f
commit 294b67ce22
2 changed files with 90 additions and 65 deletions
+16 -17
View File
@@ -1002,22 +1002,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
strcat(fileName, BACKGROUNDSFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,FALSE), BACKGROUNDSFILENAME);
// Externalised taunts
strcpy(fileName, directoryName);
strcat(fileName, TAUNTSFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), TAUNTSFILENAME);
//Madd: Simple localization
// The idea here is that we can have a separate xml file that's named differently
// but only contains the relevant tags that need to be localized
// then when the file is read in using the same xml reader code, it will only overwrite
// the tags that are contained in the localized file. This only works for items.xml
// since I tweaked the xml_items.cpp to make it work :p
// So for instance, the german file would be called German.Items.xml and would only contain
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
#ifndef ENGLISH
AddLanguagePrefix(fileName);
if ( FileExists(fileName) )
@@ -1026,8 +1011,22 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
SGP_THROW_IFFALSE(ReadInBackgrounds(fileName,TRUE), BACKGROUNDSFILENAME);
}
#endif
//////////////////
// Externalised taunts
strcpy(fileName, directoryName);
strcat(fileName, TAUNTSFILENAME);
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInTaunts(fileName,FALSE), TAUNTSFILENAME);
#ifndef ENGLISH
AddLanguagePrefix(fileName);
if ( FileExists(fileName) )
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInTaunts(fileName,TRUE), TAUNTSFILENAME);
}
#endif
// IMP Portraits List by Jazz
strcpy(fileName, directoryName);
strcat(fileName, IMPPORTRAITS);