mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
First step in making the Cities.xml useable with other languages (Russian.Cities.xml, ...)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2311 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -574,7 +574,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, CITYTABLEFILENAME);
|
||||
if(!ReadInMapStructure(fileName))
|
||||
if(!ReadInMapStructure(fileName, FALSE))
|
||||
return FALSE;
|
||||
|
||||
#ifdef RUSSIAN
|
||||
@@ -582,7 +582,17 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
if(!ReadInMapStructure(fileName))
|
||||
if(!ReadInMapStructure(fileName, TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GERMAN
|
||||
AddLanguagePrefix( fileName, GERMAN_PREFIX);
|
||||
if ( FileExists(fileName) )
|
||||
{
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||
if(!ReadInMapStructure(fileName, TRUE))
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -314,6 +314,8 @@ extern STR16 pBullseyeStrings[];
|
||||
|
||||
extern void HandleRPCDescription( );
|
||||
|
||||
BOOLEAN locTextOnly;
|
||||
|
||||
|
||||
#ifdef CRIPPLED_VERSION
|
||||
void CrippledVersionFailureToLoadMapCallBack( UINT8 bExitValue );
|
||||
@@ -808,6 +810,10 @@ typedef struct
|
||||
|
||||
CHAR8 szCharData[MAX_CHAR_DATA_LENGTH+1];
|
||||
cityInfo curCityInfo;
|
||||
|
||||
//cityInfo * curArray; // ROMAN: added
|
||||
//UINT32 maxArraySize; // ROMAN: added
|
||||
|
||||
UINT32 uiRowNumber;
|
||||
UINT32 uiHighestIndex;
|
||||
|
||||
@@ -1186,6 +1192,10 @@ BOOLEAN ReadInStrategicMapSectorTownNames(STR fileName)
|
||||
|
||||
|
||||
memset(&pData,0,sizeof(pData));
|
||||
|
||||
// TODO: ROMAN
|
||||
//pData.curCityInfo
|
||||
|
||||
NUM_TOWNS = 0;
|
||||
XML_SetUserData(parser, &pData);
|
||||
|
||||
@@ -1208,10 +1218,12 @@ BOOLEAN ReadInStrategicMapSectorTownNames(STR fileName)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN ReadInMapStructure(STR fileName)
|
||||
BOOLEAN ReadInMapStructure(STR fileName, BOOLEAN localizedVersion)
|
||||
{
|
||||
memset(StrategicMap, 0, sizeof(StrategicMap));
|
||||
|
||||
locTextOnly = localizedVersion;
|
||||
|
||||
return ReadInStrategicMapSectorTownNames(fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ BOOLEAN EnterSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
void UpdateMercsInSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ );
|
||||
|
||||
BOOLEAN ReadInMapStructure(STR fileName);
|
||||
BOOLEAN ReadInMapStructure(STR fileName, BOOLEAN localizedVersion);
|
||||
BOOLEAN ReadInStrategicMapSectorTownNames(STR fileName);
|
||||
BOOLEAN WriteInStrategicMapSectorTownNames(STR fileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user