Some minor features added:

1. Ja2Options.ini option to override chance of items appearing in maps (MAP_ITEM_CHANCE_OVERRIDE).  Useful for debugging maps.  Not including this one in the ini file for everyone to mess with though.  Value range = 0-100%, where 0 (default) = use map settings.
2. AttachmentComboMerges is underused, so it's been extended to use up to 20 attachments to make it more useful.  Build your own guns, anyone?
3. New merge types:  Easy Explosive (existing one renamed to Hard), Easy Mechanical, Hard Mechanical.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5300 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2012-05-25 06:15:30 +00:00
parent 00ac266521
commit 21024ed557
6 changed files with 185 additions and 22 deletions
+6 -10
View File
@@ -18,6 +18,7 @@ struct
ComboMergeInfoStruct * curArray;
UINT32 maxArraySize;
UINT32 curAttIndex;
UINT32 currentDepth;
UINT32 maxReadDepth;
}
@@ -43,14 +44,13 @@ attachmentcombomergeStartElementHandle(void *userData, const XML_Char *name, con
pData->curElement = ELEMENT;
memset(&pData->curAttachmentComboMerge,0,sizeof(ComboMergeInfoStruct));
pData->curAttIndex = 0;
pData->maxReadDepth++; //we are not skipping this element
}
else if(pData->curElement == ELEMENT &&
(strcmp(name, "uiIndex") == 0 ||
strcmp(name, "usItem") == 0 ||
strcmp(name, "usAttachment1") == 0 ||
strcmp(name, "usAttachment2") == 0 ||
strstr(name, "usAttachment") > 0 ||
strcmp(name, "usResult") == 0 ))
{
pData->curElement = ELEMENT_PROPERTY;
@@ -108,15 +108,11 @@ attachmentcombomergeEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT;
pData->curAttachmentComboMerge.usItem = (UINT16) atol(pData->szCharData);
}
else if(strcmp(name, "usAttachment1") == 0)
else if(strstr(name, "usAttachment") > 0)
{
pData->curElement = ELEMENT;
pData->curAttachmentComboMerge.usAttachment[0] = (UINT16) atol(pData->szCharData);
}
else if(strcmp(name, "usAttachment2") == 0)
{
pData->curElement = ELEMENT;
pData->curAttachmentComboMerge.usAttachment[1] = (UINT16) atol(pData->szCharData);
pData->curAttachmentComboMerge.usAttachment[pData->curAttIndex] = (UINT16) atol(pData->szCharData);
pData->curAttIndex++;
}
else if(strcmp(name, "usResult") == 0)
{