New feature (by DepressivesBrot): Molle Items

- individual LBE gear can be created via MOLLE items. For each LBE item, there's a definition which pockets may be changed and how much space the new pockets may take up in total.
- If there's a free pocket slot and enough space -> attach item and enable pocket.
- for further description, see Doc/Design Document- MOLLE.txt

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5441 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-02 22:30:15 +00:00
parent 832335d904
commit 3077e27d9f
65 changed files with 766 additions and 294 deletions
+11 -1
View File
@@ -50,6 +50,7 @@ attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML
pData->maxReadDepth++; //we are not skipping this element
}
//DBrot: MOLLE new tag
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiSlotIndex") == 0 ||
strcmp(name, "szSlotName") == 0 ||
@@ -58,6 +59,7 @@ attachmentslotStartElementHandle(void *userData, const XML_Char *name, const XML
strcmp(name, "usDescPanelPosX") == 0 ||
strcmp(name, "usDescPanelPosY") == 0 ||
strcmp(name, "fMultiShot") == 0 ||
strcmp(name, "ubPocketMapping") == 0 ||
strcmp(name, "fBigSlot") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -139,6 +141,12 @@ attachmentslotEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curAttachmentSlot.usDescPanelPosY = (UINT16) atol(pData->szCharData);
}
//DBrot: MOLLE
else if(strcmp(name, "ubPocketMapping") == 0)
{
pData->curElement = ELEMENT;
pData->curAttachmentSlot.ubPocketMapping = (UINT8) atol(pData->szCharData);
}
else if(strcmp(name, "fMultiShot") == 0)
{
pData->curElement = ELEMENT;
@@ -252,8 +260,10 @@ BOOLEAN WriteAttachmentSlotsStats()
FilePrintf(hFile,"\t\t<usDescPanelPosX>%d</usDescPanelPosX>\r\n", AttachmentSlots[cnt].usDescPanelPosX );
FilePrintf(hFile,"\t\t<usDescPanelPosY>%d</usDescPanelPosY>\r\n", AttachmentSlots[cnt].usDescPanelPosY );
FilePrintf(hFile,"\t\t<fMultiShot>%d</fMultiShot>\r\n", AttachmentSlots[cnt].fMultiShot );
//DBrot: MOLLE
FilePrintf(hFile,"\t\t<ubPocketMapping>%d</ubPocketMapping>\r\n", AttachmentSlots[cnt].ubPocketMapping );
FilePrintf(hFile,"\t\t<fBigSlot>%d</fBigSlot>\r\n", AttachmentSlots[cnt].fBigSlot );
FilePrintf(hFile,"\t</ATTACHMENTSLOT>\r\n");
}
FilePrintf(hFile,"</ATTACHMENTSLOTLIST>\r\n");