mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Merged from revision: 7350
Fixes (by Buggler) - Fixed mouse region for item stack popup in strategic screen for non-standard resolutions - Disabled Ctrl+Click for dropping item to sector inventory in combat - Disabled Sector Inventory Stack Popup in combat - Removed unused Ja2Options.ini: MIN_RANGE_FOR_FULL_COWERING_TARGET_PENALTY and STAMINA_HIT (by Buggler & Sevenfm) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7351 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1447,9 +1447,6 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.iQuickItem9 = iniReader.ReadInteger("Tactical Interface Settings", "QUICK_ITEM_9", 0, -100, MAXITEMS);
|
gGameExternalOptions.iQuickItem9 = iniReader.ReadInteger("Tactical Interface Settings", "QUICK_ITEM_9", 0, -100, MAXITEMS);
|
||||||
gGameExternalOptions.iQuickItem0 = iniReader.ReadInteger("Tactical Interface Settings", "QUICK_ITEM_0", 0, -100, MAXITEMS);
|
gGameExternalOptions.iQuickItem0 = iniReader.ReadInteger("Tactical Interface Settings", "QUICK_ITEM_0", 0, -100, MAXITEMS);
|
||||||
|
|
||||||
// New setting to change stamina
|
|
||||||
gGameExternalOptions.uStaminaHit = iniReader.ReadInteger("Tactical Interface Settings", "STAMINA_HIT", 10000);
|
|
||||||
|
|
||||||
// Alternative system for aiming - progressive method depending on marksmanship of Merc
|
// Alternative system for aiming - progressive method depending on marksmanship of Merc
|
||||||
gGameExternalOptions.bAltAimEnabled = iniReader.ReadBoolean("Tactical Interface Settings","ALT_AIMING_ENABLED",FALSE);
|
gGameExternalOptions.bAltAimEnabled = iniReader.ReadBoolean("Tactical Interface Settings","ALT_AIMING_ENABLED",FALSE);
|
||||||
|
|
||||||
|
|||||||
@@ -816,8 +816,6 @@ typedef struct
|
|||||||
|
|
||||||
// for small progress bar
|
// for small progress bar
|
||||||
BOOLEAN fSmallSizeProgressbar;
|
BOOLEAN fSmallSizeProgressbar;
|
||||||
// stamina multiplier (for all weapons eg knife fist gun
|
|
||||||
INT32 uStaminaHit;
|
|
||||||
//enable ext mouse key
|
//enable ext mouse key
|
||||||
BOOLEAN bAltAimEnabled;
|
BOOLEAN bAltAimEnabled;
|
||||||
BOOLEAN bAimedBurstEnabled;
|
BOOLEAN bAimedBurstEnabled;
|
||||||
|
|||||||
@@ -1323,8 +1323,8 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
{
|
{
|
||||||
DeleteItemDescriptionBox();
|
DeleteItemDescriptionBox();
|
||||||
}
|
}
|
||||||
// HEADROCK HAM 5: Sector Inventory Item Desc Box no longer accessible during combat.
|
|
||||||
|
|
||||||
|
// HEADROCK HAM 5: Sector Inventory Item Desc Box no longer accessible during combat.
|
||||||
if( !CanPlayerUseSectorInventory( &(Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ]) ) )
|
if( !CanPlayerUseSectorInventory( &(Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ]) ) )
|
||||||
{
|
{
|
||||||
DoScreenIndependantMessageBox( New113HAMMessage[ 22 ], MSG_BOX_FLAG_OK, NULL );
|
DoScreenIndependantMessageBox( New113HAMMessage[ 22 ], MSG_BOX_FLAG_OK, NULL );
|
||||||
@@ -1343,9 +1343,18 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
else if(fValidPointer)
|
else if(fValidPointer)
|
||||||
{
|
{
|
||||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, (SCREEN_WIDTH - INTERFACE_WIDTH)/2, yResOffset - 10, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
// Sector Inventory Stack Popup no longer accessible during combat.
|
||||||
fTeamPanelDirty=TRUE;
|
if( !CanPlayerUseSectorInventory( &(Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ]) ) )
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
{
|
||||||
|
DoScreenIndependantMessageBox( New113HAMMessage[ 22 ], MSG_BOX_FLAG_OK, NULL );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, xResOffset, yResOffset - 10, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||||
|
fTeamPanelDirty=TRUE;
|
||||||
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3689,18 +3698,18 @@ BOOLEAN CanPlayerUseSectorInventory( SOLDIERTYPE *pSelectedSoldier )
|
|||||||
if(gGameExternalOptions.fEnableInventoryPoolQ)
|
if(gGameExternalOptions.fEnableInventoryPoolQ)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
#endif
|
#endif
|
||||||
INT16 sSectorX, sSectorY, sSectorZ;
|
INT16 sX, sY, sZ;
|
||||||
|
|
||||||
//Get the sector that has a battle
|
//Get the sector that has a battle
|
||||||
BOOLEAN fInCombat = GetCurrentBattleSectorXYZAndReturnTRUEIfThereIsABattle( &sSectorX, &sSectorY, &sSectorZ );
|
BOOLEAN fInCombat = GetCurrentBattleSectorXYZAndReturnTRUEIfThereIsABattle( &sX, &sY, &sZ );
|
||||||
|
|
||||||
//if there is a battle going on
|
//if there is a battle going on
|
||||||
if( fInCombat )
|
if( fInCombat )
|
||||||
{
|
{
|
||||||
//if the selected map is the one with the combat
|
//if the selected soldier is in combat sector
|
||||||
if( ( ( sSelMapX == sSectorX ) &&
|
if( ( ( pSelectedSoldier->sSectorX == sX ) &&
|
||||||
( sSelMapY == sSectorY ) &&
|
( pSelectedSoldier->sSectorY == sY ) &&
|
||||||
( iCurrentMapSectorZ == sSectorZ )
|
( pSelectedSoldier->bSectorZ == sZ )
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
+11
-3
@@ -888,6 +888,7 @@ void InvmaskRegionBtnCallBack( MOUSE_REGION *pRegion, INT32 iReason );
|
|||||||
void TrashCanBtnCallback( MOUSE_REGION *pRegion, INT32 iReason);
|
void TrashCanBtnCallback( MOUSE_REGION *pRegion, INT32 iReason);
|
||||||
|
|
||||||
extern void KeyRingItemPanelButtonCallback( MOUSE_REGION *pRegion, INT32 iReason );
|
extern void KeyRingItemPanelButtonCallback( MOUSE_REGION *pRegion, INT32 iReason );
|
||||||
|
extern BOOLEAN CanPlayerUseSectorInventory( SOLDIERTYPE *pSelectedSoldier );
|
||||||
|
|
||||||
// handle talking
|
// handle talking
|
||||||
void HandleSpontanousTalking( void );
|
void HandleSpontanousTalking( void );
|
||||||
@@ -9801,7 +9802,7 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
|||||||
if ( !InItemStackPopup( ) )
|
if ( !InItemStackPopup( ) )
|
||||||
{
|
{
|
||||||
// CHRISL: Changed final parameter so that we fill the inventory screen
|
// CHRISL: Changed final parameter so that we fill the inventory screen
|
||||||
InitItemStackPopup( pSoldier, (UINT8)uiHandPos, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
InitItemStackPopup( pSoldier, (UINT8)uiHandPos, xResOffset, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||||
fTeamPanelDirty=TRUE;
|
fTeamPanelDirty=TRUE;
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
@@ -9890,10 +9891,17 @@ void MAPBeginItemPointer( SOLDIERTYPE *pSoldier, UINT8 ubHandPos )
|
|||||||
|
|
||||||
pSoldier->inv[ubHandPos].MoveThisObjectTo(gItemPointer, numToMove, pSoldier, ubHandPos);
|
pSoldier->inv[ubHandPos].MoveThisObjectTo(gItemPointer, numToMove, pSoldier, ubHandPos);
|
||||||
|
|
||||||
//Autoplace to map sector invectory
|
//Autoplace to map sector inventory
|
||||||
if ( _KeyDown(CTRL) )
|
if ( _KeyDown(CTRL) )
|
||||||
{
|
{
|
||||||
if( AutoPlaceObjectToWorld(pSoldier, &gItemPointer) )
|
// if in battle inform player they will have to do this in tactical
|
||||||
|
if( !CanPlayerUseSectorInventory( &Menptr[ gCharactersList[ bSelectedInfoChar ].usSolID ] ) )
|
||||||
|
{
|
||||||
|
// return item to original slot
|
||||||
|
PlaceObject( pSoldier, ubHandPos, &gItemPointer );
|
||||||
|
DoMapMessageBox( MSG_BOX_BASIC_STYLE, pMapInventoryErrorString[ 4 ], MAP_SCREEN, MSG_BOX_FLAG_OK, NULL );
|
||||||
|
}
|
||||||
|
else if( AutoPlaceObjectToWorld(pSoldier, &gItemPointer) )
|
||||||
{
|
{
|
||||||
//INVRenderINVPanelItem( pSoldier, uiHandPos, DIRTYLEVEL2); // redraw the empty slot
|
//INVRenderINVPanelItem( pSoldier, uiHandPos, DIRTYLEVEL2); // redraw the empty slot
|
||||||
|
|
||||||
|
|||||||
@@ -9581,7 +9581,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set some globals
|
// Set some globals
|
||||||
gsItemPopupInvX = sInvX + xResOffset;
|
gsItemPopupInvX = sInvX;
|
||||||
gsItemPopupInvY = sInvY;
|
gsItemPopupInvY = sInvY;
|
||||||
gsItemPopupInvWidth = sInvWidth;
|
gsItemPopupInvWidth = sInvWidth;
|
||||||
gsItemPopupInvHeight = sInvHeight;
|
gsItemPopupInvHeight = sInvHeight;
|
||||||
@@ -9715,7 +9715,7 @@ BOOLEAN InitItemStackPopup( SOLDIERTYPE *pSoldier, UINT8 ubPosition, INT16 sInvX
|
|||||||
gfInItemStackPopup = TRUE;
|
gfInItemStackPopup = TRUE;
|
||||||
|
|
||||||
//Restrict mouse cursor to panel
|
//Restrict mouse cursor to panel
|
||||||
aRect.iLeft = sInvX + xResOffset;
|
aRect.iLeft = sInvX + sOffSetX;
|
||||||
aRect.iTop = sInvY + sOffSetY;
|
aRect.iTop = sInvY + sOffSetY;
|
||||||
aRect.iRight = aRect.iLeft + min(cnt,sItemWidth) * usPopupWidth;
|
aRect.iRight = aRect.iLeft + min(cnt,sItemWidth) * usPopupWidth;
|
||||||
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
|
aRect.iBottom = aRect.iTop + (INT32)(ceil((float)cnt/(float)sItemWidth)+1) * usPopupHeight;
|
||||||
|
|||||||
@@ -4218,7 +4218,7 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
inv_interface_start_x = 213;
|
inv_interface_start_x = 213;
|
||||||
else
|
else
|
||||||
inv_interface_start_x = 248;
|
inv_interface_start_x = 248;
|
||||||
InitItemStackPopup( gpSMCurrentMerc, (UINT8)uiHandPos, inv_interface_start_x, INV_INTERFACE_START_Y, invWidth, ( SCREEN_HEIGHT - INV_INTERFACE_START_Y ) );
|
InitItemStackPopup( gpSMCurrentMerc, (UINT8)uiHandPos, inv_interface_start_x + xResOffset, INV_INTERFACE_START_Y, invWidth, ( SCREEN_HEIGHT - INV_INTERFACE_START_Y ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user