diff --git a/GameVersion.cpp b/GameVersion.cpp index 674d4530..34d2b679 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -15,9 +15,9 @@ #ifdef JA2EDITOR #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8297 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8297 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8297 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8297 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8297 (Development Build)" }; #endif #elif defined CRIPPLED_VERSION @@ -46,16 +46,16 @@ //RELEASE BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8297 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8297 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8295 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8297 (Development Build)" }; #endif #endif -CHAR8 czVersionNumber[16] = { "Build 16.09.11" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 16.09.12" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Strategic/Strategic Movement Costs.cpp b/Strategic/Strategic Movement Costs.cpp index 828b1db8..bd57a819 100644 --- a/Strategic/Strategic Movement Costs.cpp +++ b/Strategic/Strategic Movement Costs.cpp @@ -41,6 +41,7 @@ typedef enum SMCTABLE_ELEMENT_TRAVELRATING, SMCTABLE_ELEMENT_TRAVELTYPE, SMCTABLE_ELEMENT_SHORTNAME, + SMCTABLE_ELEMENT_BADSECTOR, } SMCTABLE_PARSE_STAGE; typedef struct @@ -137,7 +138,7 @@ smctableStartElementHandle(void *userData, const XML_Char *name, const XML_Char } else if(strcmp(name, "BadSector") == 0 && pData->curElement == SMCTABLE_ELEMENT_SECTOR) { - pData->curElement = SMCTABLE_ELEMENT_TRAVELTYPE; + pData->curElement = SMCTABLE_ELEMENT_BADSECTOR; pData->maxReadDepth++; //we are not skipping this element } pData->szCharData[0] = '\0'; @@ -323,8 +324,8 @@ smctableEndElementHandle(void *userData, const XML_Char *name) } else { - // silversurfer: don't just assign type GROUNDBARRIER. Let modders know that the data is incorrect! - AssertMsg(0, String( "Incorrect traversal data '%s' for sector row=%d column=%d !", pData->szCharData, pData->uiRowNumber, pData->uiColNumber) ); + // silversurfer: don't just assign type GROUNDBARRIER. Let modders know that traversal data is incorrect! + AssertMsg(0, String( "Incorrect traversal data '%s' for sector row=%d column=%d in MovementCosts.xml!", pData->szCharData, pData->uiRowNumber, pData->uiColNumber) ); //trav_type = GROUNDBARRIER; } // Now assign it to the correct directory using the close tag as a guide @@ -348,11 +349,6 @@ smctableEndElementHandle(void *userData, const XML_Char *name) { pData->travHere = trav_type; } - else if(strcmp(name, "BadSector") == 0) - { - bool fBadSector = atoi(pData->szCharData) > 0; - sBadSectorsList[pData->uiColNumber][pData->uiRowNumber] = fBadSector; - } else { // Bogus Traversal Reference @@ -362,6 +358,13 @@ smctableEndElementHandle(void *userData, const XML_Char *name) //fprintf (outfile, "Exiting Traversal Type\n"); pData->curElement = SMCTABLE_ELEMENT_SECTOR; } + else if(pData->curElement == SMCTABLE_ELEMENT_BADSECTOR) + { + bool fBadSector = atoi(pData->szCharData) > 0; + sBadSectorsList[pData->uiColNumber][pData->uiRowNumber] = fBadSector; + + pData->curElement = SMCTABLE_ELEMENT_SECTOR; + } //else if(strcmp(name, "Shortname") == 0 && pData->curElement == SMCTABLE_ELEMENT_SHORTNAME) //{ // // Copy this string into the pTownNames array