mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Altered the pName field from Pockets.xml to a CHAR16 value so it will support multilingual code.
Updated the Pockets.xml reader function so that we can include a german.pockets.xml and russian.pockets.xml (and any other language we eventually choose to support) just like we have with Items.xml. I moved the "Sold Item" and "Delete Item" phrases to the language specific cpp files. I updated the SHIFT+N hotkey so that it will now work from the strategic screen. On tactical it handles the entire team. On strategic, it handles only the one merc who is currently active. I fixed a problem with the ALT+W cheat key so that it cycles properly. I fixed a problem with the backpack buttons where the button key wasn't being properly deleted. This could sometimes cause an "overload" which would result in a crash. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1873 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -133,7 +133,7 @@ lbepocketEndElementHandle(void *userData, const XML_Char *name)
|
||||
if ( !onlyLocalizedText )
|
||||
LBEPocketType.push_back(pData->curLBEPocket);
|
||||
else
|
||||
strcpy(LBEPocketType[pData->curLBEPocket.pIndex].pName, pData->curLBEPocket.pName);
|
||||
wcscpy(LBEPocketType[pData->curLBEPocket.pIndex].pName,pData->curLBEPocket.pName);
|
||||
}
|
||||
else if(strcmp(name, "pIndex") == 0)
|
||||
{
|
||||
@@ -143,6 +143,7 @@ lbepocketEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "pName") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
#if 0
|
||||
if(MAX_CHAR_DATA_LENGTH >= strlen(pData->szCharData))
|
||||
strcpy(pData->curLBEPocket.pName,pData->szCharData);
|
||||
else
|
||||
@@ -150,6 +151,10 @@ lbepocketEndElementHandle(void *userData, const XML_Char *name)
|
||||
strncpy(pData->curLBEPocket.pName,pData->szCharData,MAX_CHAR_DATA_LENGTH);
|
||||
pData->curLBEPocket.pName[MAX_CHAR_DATA_LENGTH] = '\0';
|
||||
}
|
||||
#else
|
||||
MultiByteToWideChar( CP_UTF8, 0, pData->szCharData, -1, pData->curLBEPocket.pName, sizeof(pData->curLBEPocket.pName)/sizeof(pData->curLBEPocket.pName[0]) );
|
||||
pData->curLBEPocket.pName[sizeof(pData->curLBEPocket.pName)/sizeof(pData->curLBEPocket.pName[0]) - 1] = '\0';
|
||||
#endif
|
||||
}
|
||||
else if(strcmp(name, "pSilhouette") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user