diff --git a/GameSettings.cpp b/GameSettings.cpp index 54f6e835a..289bbe5ac 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -750,6 +750,9 @@ void LoadGameExternalOptions() // CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip gGameExternalOptions.ubWrongMagMult = iniReader.ReadFloat("JA2 Gameplay Settings","WRONG_MAG_MULT",2); + + // CHRISL: Setting to turn off the description and stack popup options from the sector inventory panel + gGameExternalOptions.fSectorDesc = iniReader.ReadBoolean("JA2 Gameplay Settings","ALLOW_SECTOR_DESCRIPTION_WINDOW",TRUE); } diff --git a/GameSettings.h b/GameSettings.h index 5b53560bc..58ab2ea54 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -446,6 +446,9 @@ typedef struct // CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip FLOAT ubWrongMagMult; + + // CHRISL: Setting to turn off the description and stack popup options from the sector inventory panel + BOOLEAN fSectorDesc; } GAME_EXTERNAL_OPTIONS; //This structure will contain general Ja2 settings NOT individual game settings. diff --git a/GameVersion.cpp b/GameVersion.cpp index 77f0a2c70..686bc3373 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -13,12 +13,12 @@ #ifdef JA2EDITOR //MAP EDITOR BUILD VERSION -CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.2058" }; +CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.2063" }; #elif defined JA2BETAVERSION //BETA/TEST BUILD VERSION -CHAR16 zVersionLabel[256] = { L"Debug v1.13.2058" }; +CHAR16 zVersionLabel[256] = { L"Debug v1.13.2063" }; #elif defined CRIPPLED_VERSION @@ -28,11 +28,11 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - CHAR16 zVersionLabel[256] = { L"Release v1.13.2058" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.2063" }; #endif -CHAR8 czVersionNumber[16] = { "Build 08.04.20" }; //YY.MM.DD +CHAR8 czVersionNumber[16] = { "Build 08.04.21" }; //YY.MM.DD CHAR16 zTrackingNumber[16] = { L"Z" }; diff --git a/Strategic/Map Screen Interface Map Inventory.cpp b/Strategic/Map Screen Interface Map Inventory.cpp index edcad4af5..5b6399434 100644 --- a/Strategic/Map Screen Interface Map Inventory.cpp +++ b/Strategic/Map Screen Interface Map Inventory.cpp @@ -582,6 +582,13 @@ void CreateDestroyMapInventoryPoolButtons( BOOLEAN fExitFromMapScreen ) fTeamPanelDirty = TRUE; fCharacterInfoPanelDirty = TRUE; + //CHRISL: close stack popup and item description windows + DeleteItemStackPopup(); + if ( gfInItemDescBox ) + { + DeleteItemDescriptionBox(); + } + //DEF: added to remove the 'item blip' from staying on the radar map iCurrentlyHighLightedItem = -1; @@ -824,27 +831,33 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason ) if( ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP ) ) { - //CHRISL: Make it possible to right click and pull up stack popup and/or item description boxes - WORLDITEM * twItem = &(pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ]); - if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid)) + if(gGameExternalOptions.fSectorDesc == TRUE) { - if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1) + //CHRISL: Make it possible to right click and pull up stack popup and/or item description boxes + WORLDITEM * twItem = &(pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ]); + if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid)) { - fShowInventoryFlag = TRUE; - MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] ); - } - else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE) - { - InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) ); - fTeamPanelDirty=TRUE; - fInterfacePanelDirty = DIRTYLEVEL2; + if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1) + { + fShowInventoryFlag = TRUE; + MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] ); + } + else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE) + { + InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) ); + fTeamPanelDirty=TRUE; + fInterfacePanelDirty = DIRTYLEVEL2; + } } } - if ( gpItemPointer == NULL ) + else { - //fShowMapInventoryPool = FALSE; + if ( gpItemPointer == NULL ) + { + //fShowMapInventoryPool = FALSE; + } + // else do nothing } - // else do nothing } else if( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP ) { diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 2a1059e4a..ec0f311a3 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -6563,6 +6563,10 @@ void DeleteItemStackPopup( ) { INT32 cnt; + //CHRISL: if neither item or sector stack popups are open, just return. + if(!gfInItemStackPopup && !gfInSectorStackPopup) + return; + //Remove DeleteVideoObjectFromIndex( guiItemPopupBoxes ); diff --git a/ja2_2005Express.vcproj b/ja2_2005Express.vcproj index 35264e6c7..da918c932 100644 --- a/ja2_2005Express.vcproj +++ b/ja2_2005Express.vcproj @@ -66,7 +66,7 @@