- Reverted last commit (rev. 6935), because it was a wrong commit...

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6936 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-02-17 09:38:29 +00:00
parent 977f71596a
commit 12f1fecfa4
2 changed files with 4 additions and 25 deletions
+1 -10
View File
@@ -470,16 +470,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
//WarmSteel - Attachment slots related xml's //WarmSteel - Attachment slots related xml's
strcpy(fileName, directoryName); strcpy(fileName, directoryName);
strcat(fileName, ATTACHMENTSLOTSFILENAME); strcat(fileName, ATTACHMENTSLOTSFILENAME);
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName, FALSE),ATTACHMENTSLOTSFILENAME); SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName),ATTACHMENTSLOTSFILENAME);
#ifndef ENGLISH
AddLanguagePrefix(fileName);
if ( FileExists(fileName) )
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
SGP_THROW_IFFALSE(ReadInAttachmentSlotsStats(fileName,TRUE), fileName);
}
#endif
// Flugente: created separate gun and item choices for different soldier classes - read in different xmls // Flugente: created separate gun and item choices for different soldier classes - read in different xmls
strcpy(fileName, directoryName); strcpy(fileName, directoryName);
+2 -14
View File
@@ -27,8 +27,6 @@ struct
} }
typedef attachmentslotParseData; typedef attachmentslotParseData;
BOOLEAN localizedTextOnly_AttachmentSlots;
static void XMLCALL static void XMLCALL
attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts) attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML_Char **atts)
{ {
@@ -105,15 +103,7 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name)
if(pData->curAttachmentSlot.uiSlotIndex < pData->maxArraySize) if(pData->curAttachmentSlot.uiSlotIndex < pData->maxArraySize)
{ {
if (!localizedTextOnly_AttachmentSlots) pData->curArray[pData->curAttachmentSlot.uiSlotIndex] = pData->curAttachmentSlot; //write the attachmentinfo into the table
{
pData->curArray[pData->curAttachmentSlot.uiSlotIndex] = pData->curAttachmentSlot; //write the attachmentinfo into the table
}
else
{
wcscpy(AttachmentSlots[pData->curAttachmentSlot.uiSlotIndex].szSlotName, pData->curAttachmentSlot.szSlotName);
}
//Save the highest known index up till now. //Save the highest known index up till now.
if(LAST_SLOT_INDEX < pData->curAttachmentSlot.uiSlotIndex){ if(LAST_SLOT_INDEX < pData->curAttachmentSlot.uiSlotIndex){
LAST_SLOT_INDEX = (UINT16) pData->curAttachmentSlot.uiSlotIndex; LAST_SLOT_INDEX = (UINT16) pData->curAttachmentSlot.uiSlotIndex;
@@ -174,7 +164,7 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name)
} }
BOOLEAN ReadInAttachmentSlotsStats(STR fileName, BOOLEAN localizedVersion) BOOLEAN ReadInAttachmentSlotsStats(STR fileName)
{ {
HWFILE hFile; HWFILE hFile;
UINT32 uiBytesRead; UINT32 uiBytesRead;
@@ -184,8 +174,6 @@ BOOLEAN ReadInAttachmentSlotsStats(STR fileName, BOOLEAN localizedVersion)
attachmentslotParseData pData; attachmentslotParseData pData;
localizedTextOnly_AttachmentSlots = localizedVersion;
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading AttachmentSlots.xml" ); DebugMsg(TOPIC_JA2, DBG_LEVEL_3, "Loading AttachmentSlots.xml" );
// Open attachmentinfo file // Open attachmentinfo file