From 5307881cb701b097eb7d32b91342f985cfeffe58 Mon Sep 17 00:00:00 2001 From: silversurfer Date: Sun, 5 Jun 2016 13:23:26 +0000 Subject: [PATCH] Fixes (by Sevenfm): - incorrect sized array for secondary item stat regions - incorrect check for secondary item stat display removed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8248 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 18 +++++++++--------- Standard Gaming Platform/mousesystem.cpp | 2 ++ Tactical/Interface Enhanced.cpp | 8 +------- Tactical/Interface Items.cpp | 2 +- Tactical/Interface Items.h | 3 ++- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 4dfb3467..97fb90ce 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.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8248 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8248 (Development Build)" }; #endif // ------------------------------ @@ -27,11 +27,11 @@ //DEBUG BUILD VERSION #ifdef JA2UB - CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8248 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8248 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8248 (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.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8248 (Development Build)" }; #elif defined (JA113DEMO) - CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8248 (Development Build)" }; #else - CHAR16 zVersionLabel[256] = { L"Release v1.13.8247 (Development Build)" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.8248 (Development Build)" }; #endif #endif -CHAR8 czVersionNumber[16] = { "Build 16.06.04" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 16.06.05" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; // SAVE_GAME_VERSION is defined in header, change it there diff --git a/Standard Gaming Platform/mousesystem.cpp b/Standard Gaming Platform/mousesystem.cpp index 5071d13e..e939df13 100644 --- a/Standard Gaming Platform/mousesystem.cpp +++ b/Standard Gaming Platform/mousesystem.cpp @@ -1163,6 +1163,8 @@ void MSYS_RemoveRegion(MOUSE_REGION *region) // void MSYS_EnableRegion(MOUSE_REGION *region) { + Assert( region ); + region->uiFlags |= MSYS_REGION_ENABLED; } diff --git a/Tactical/Interface Enhanced.cpp b/Tactical/Interface Enhanced.cpp index 4c0e3eaa..9d3c1e2e 100644 --- a/Tactical/Interface Enhanced.cpp +++ b/Tactical/Interface Enhanced.cpp @@ -2323,7 +2323,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr iFirstDataRegion = iRegionsCreated; CHAR16 pStr[1000]; - for (cnt = 0; cnt < 36; cnt++) + for (cnt = 0; cnt < GEN_SEC_REGION_ENTRIES; cnt++) { MSYS_DefineRegion( &gUDBFasthelpRegions[ iRegionsCreated ], (INT16)(gItemDescGenSecondaryRegions[cnt].sLeft), @@ -5885,12 +5885,6 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject ) return; } - if (Item[ gpItemDescObject->usItem ].usItemClass & (IC_WEAPON || IC_PUNCH)) - { - // Weapons have no space on their UDB General page to show Secondary Stats anyway. - return; - } - INT32 cnt = 0; INT32 sOffsetX = 0; INT32 sOffsetY = 0; diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 836bee44..86e263cd 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -575,7 +575,7 @@ INV_DESC_REGIONS gItemDescLBEBackground[4]; // Coordinates for displaying LBE ba INV_DESC_REGIONS gItemDescGenHeaderRegions[3]; // Header text regions for various parts of the General Tab INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each -INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5 +INV_DESC_REGIONS gItemDescGenSecondaryRegions[GEN_SEC_REGION_ENTRIES]; // Secondary data regions, 6 lines x 4 icons INV_DESC_REGIONS gItemDescTextRegions[9]; // Main description regions INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4]; INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each diff --git a/Tactical/Interface Items.h b/Tactical/Interface Items.h index 52c7a9f7..e2d3f3f7 100644 --- a/Tactical/Interface Items.h +++ b/Tactical/Interface Items.h @@ -21,6 +21,7 @@ #define NUM_UDB_GEN_LINES 12 #define NUM_UDB_ADV_LINES 13 // Flugente FTW 1.1: 12->13 +#define GEN_SEC_REGION_ENTRIES 24 // 6 lines x 4 icons // HEADROCK HAM 4: These rectangle definitions are used in UDB to determine locations for icons, data, and tooltip // regions. They replace the plethora of region data provided in EDB. @@ -36,7 +37,7 @@ extern INV_DESC_REGIONS gItemDescLBEBackground[4]; // Coordinates for displaying extern INV_DESC_REGIONS gItemDescGenHeaderRegions[3]; // Header text regions for various parts of the General Tab extern INV_DESC_REGIONS gItemDescGenIndexRegions[3][4]; // Index text regions for various parts of the General Tab extern INV_DESC_REGIONS gItemDescGenRegions[NUM_UDB_GEN_LINES * 2][4]; // Data regions, 4 sub-columns each -extern INV_DESC_REGIONS gItemDescGenSecondaryRegions[26]; // Secondary data regions, 3x5 for now (possible 3x6?) +extern INV_DESC_REGIONS gItemDescGenSecondaryRegions[GEN_SEC_REGION_ENTRIES]; // Secondary data regions, 6 lines x 4 icons extern INV_DESC_REGIONS gItemDescTextRegions[9]; // Main description regions extern INV_DESC_REGIONS gItemDescAdvIndexRegions[1][4]; extern INV_DESC_REGIONS gItemDescAdvRegions[NUM_UDB_ADV_LINES][4]; // Advanced data regions, 4 sub-columns each