mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged from revision: 6953
- Increased text limit for load screen hints from 190 to 254 o Hopefully this does not cause any problems when rendering on the loadscreens. Tests resulted in success - Support for localization of LoadScreenHints.xml (*.LoadScreenHints.xml) o Now the language specific xmls only have the <uiIndex> and <szName> attributes. All other attributes are in the LoadScreenHints.xml git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6954 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -24,6 +24,8 @@ struct
|
||||
}
|
||||
typedef enemyRankParseData;
|
||||
|
||||
BOOLEAN localizedTextOnly_LoadScreenHints;
|
||||
|
||||
UINT16 num_found_loadscreenhints = 0; // the correct number is set on reading the xml
|
||||
|
||||
LOADSCREENHINT_STRUCT zLoadScreenHint[LOADSCREENHINT_MAX];
|
||||
@@ -39,7 +41,8 @@ loadscreenhintsStartElementHandle(void *userData, const XML_Char *name, const XM
|
||||
{
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
|
||||
memset(pData->curArray,0,sizeof(LOADSCREENHINT_STRUCT)*pData->maxArraySize);
|
||||
if (!localizedTextOnly_LoadScreenHints)
|
||||
memset(pData->curArray,0,sizeof(LOADSCREENHINT_STRUCT)*pData->maxArraySize);
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
@@ -47,7 +50,8 @@ loadscreenhintsStartElementHandle(void *userData, const XML_Char *name, const XM
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
memset(&pData->curLoadScreenHint,0,sizeof(LOADSCREENHINT_STRUCT));
|
||||
if (!localizedTextOnly_LoadScreenHints)
|
||||
memset(&pData->curLoadScreenHint,0,sizeof(LOADSCREENHINT_STRUCT));
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
@@ -104,7 +108,14 @@ loadscreenhintsEndElementHandle(void *userData, const XML_Char *name)
|
||||
|
||||
if(pData->curLoadScreenHint.uiIndex < pData->maxArraySize)
|
||||
{
|
||||
pData->curArray[pData->curLoadScreenHint.uiIndex] = pData->curLoadScreenHint;
|
||||
if (!localizedTextOnly_LoadScreenHints)
|
||||
{
|
||||
pData->curArray[pData->curLoadScreenHint.uiIndex] = pData->curLoadScreenHint;
|
||||
}
|
||||
else
|
||||
{
|
||||
wcscpy(zLoadScreenHint[pData->curLoadScreenHint.uiIndex].szName, pData->curLoadScreenHint.szName);
|
||||
}
|
||||
}
|
||||
|
||||
num_found_loadscreenhints = pData->curLoadScreenHint.uiIndex;
|
||||
@@ -172,7 +183,7 @@ loadscreenhintsEndElementHandle(void *userData, const XML_Char *name)
|
||||
pData->currentDepth--;
|
||||
}
|
||||
|
||||
BOOLEAN ReadInLoadScreenHints(STR fileName)
|
||||
BOOLEAN ReadInLoadScreenHints(STR fileName, BOOLEAN localizedVersion)
|
||||
{
|
||||
HWFILE hFile;
|
||||
UINT32 uiBytesRead;
|
||||
@@ -182,6 +193,8 @@ BOOLEAN ReadInLoadScreenHints(STR fileName)
|
||||
|
||||
enemyRankParseData pData;
|
||||
|
||||
localizedTextOnly_LoadScreenHints = localizedVersion;
|
||||
|
||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading LoadScreenHints.xml" );
|
||||
|
||||
// Open file
|
||||
|
||||
Reference in New Issue
Block a user