mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fixed a CTD that occurs when closing sector inventory while the item description window is open.
Added a new ALLOW_SECTOR_DESCRIPTION_WINDOW flag to the ja2_options.ini that allows players to turn off the stack popup and item description functionality for the sector inventory panel. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2063 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
+4
-4
@@ -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" };
|
||||
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Winmm.lib"
|
||||
OutputFile="$(OutDir)\ja2_deb_en_2058.exe"
|
||||
OutputFile="$(OutDir)\ja2_deb_en_2063.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
@@ -145,7 +145,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Winmm.lib"
|
||||
OutputFile="$(OutDir)\ja2_rel_en_2058.exe"
|
||||
OutputFile="$(OutDir)\ja2_rel_en_2063.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
|
||||
Reference in New Issue
Block a user