mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- bugfix for scrolling items on BR mail order screen
- bugfix for display errors on empty lines on BR mail order screen - externalized noise threshold for silenced shots to Ja2_Options.ini (MAX_PERCENT_NOISE_SILENCED_SOUND) - updated version numbers git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6484 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -955,8 +955,8 @@ void LoadGameExternalOptions()
|
||||
|
||||
//################# Sound Settings #################
|
||||
|
||||
gGameExternalOptions.guiWeaponSoundEffectsVolume = iniReader.ReadInteger("Sound Settings","WEAPON_SOUND_EFFECTS_VOLUME",0, 0, 1000 /*1000 = 10x?*/);
|
||||
|
||||
gGameExternalOptions.guiWeaponSoundEffectsVolume = iniReader.ReadInteger("Sound Settings","WEAPON_SOUND_EFFECTS_VOLUME", 0, 0, 1000 /*1000 = 10x?*/);
|
||||
gGameExternalOptions.gubMaxPercentNoiseSilencedSound = iniReader.ReadInteger("Sound Settings","MAX_PERCENT_NOISE_SILENCED_SOUND", 35, 0, 100 );
|
||||
|
||||
|
||||
//################# Tactical Interface Settings #################
|
||||
|
||||
@@ -435,6 +435,7 @@ typedef struct
|
||||
|
||||
//Sound settings
|
||||
UINT32 guiWeaponSoundEffectsVolume;
|
||||
UINT8 gubMaxPercentNoiseSilencedSound;
|
||||
|
||||
// WDS - Option to turn off stealing
|
||||
BOOLEAN fStealingDisabled;
|
||||
|
||||
+9
-9
@@ -15,9 +15,9 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.6484 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.6484 (Development Build)" };
|
||||
#endif
|
||||
|
||||
// ------------------------------
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
//DEBUG BUILD VERSION
|
||||
#ifdef JA2UB
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.6484 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.6484 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.6484 (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.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.6484 (Development Build)" };
|
||||
#elif defined (JA113DEMO)
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.6484 (Development Build)" };
|
||||
#else
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.6353 (Development Build)" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.6484 (Development Build)" };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 12.08.24" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 13.10.13" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -394,6 +394,8 @@ void PurchaseBobbyOrder();
|
||||
UINT32 CalcPackageTotalWeight();
|
||||
void DisplayPackageWeight( );
|
||||
void ShutDownBobbyRNewMailOrders();
|
||||
// sorts the list of selected items for the mail order screen
|
||||
void SortBobbyRayPurchases();
|
||||
//ppp
|
||||
|
||||
void DrawOrderGoldRectangle(UINT16 usGridX, UINT16 usGridY);
|
||||
@@ -585,6 +587,10 @@ BOOLEAN EnterBobbyRMailOrder()
|
||||
|
||||
gfRemoveItemsFromStock = FALSE;
|
||||
|
||||
// silversurfer: This sorts the list of items that we marked for purchase.
|
||||
// This helps us get rid of the empty line display errors in the mail order screen.
|
||||
SortBobbyRayPurchases();
|
||||
|
||||
RenderBobbyRMailOrder();
|
||||
return(TRUE);
|
||||
}
|
||||
@@ -1022,7 +1028,7 @@ void DisplayPurchasedItems( BOOLEAN fCalledFromOrderPage, UINT16 usGridX, UINT16
|
||||
UINT8 *pDestBuf;
|
||||
HVOBJECT hArrowHandle;
|
||||
//JMich TODO add a way to check for empty index in the middle of pBobbyRayPurchase
|
||||
|
||||
// silversurfer: Not necessary anymore. Function SortBobbyRayPurchases() will remove any empty indexes for us before we call the mail order screen.
|
||||
|
||||
//Output the qty
|
||||
DrawTextToScreen(BobbyROrderFormText[BOBBYR_QTY], (UINT16)(usGridX+BOBBYR_GRID_FIRST_COLUMN_X), (UINT16)(usGridY+BOBBYR_GRID_FIRST_COLUMN_Y-BOBBYR_GRID_TITLE_OFFSET), BOBBYR_GRID_FIRST_COLUMN_WIDTH, BOBBYR_ORDER_STATIC_TEXT_FONT, BOBBYR_ORDER_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
@@ -2153,15 +2159,20 @@ void SelectGridScrollColumnMovementCallBack(MOUSE_REGION * pRegion, INT32 reason
|
||||
|
||||
pRegion->uiFlags |= BUTTON_CLICKED_ON ;
|
||||
|
||||
// scroll up
|
||||
if( ubPurchaseNumber < gubPurchaseAtTopOfList )
|
||||
{
|
||||
gubPurchaseAtTopOfList = ubPurchaseNumber;
|
||||
gubPurchaseAtTopOfList = ubPurchaseNumber;
|
||||
}
|
||||
|
||||
// scroll down
|
||||
if( ubPurchaseNumber > gubPurchaseAtTopOfList )
|
||||
{
|
||||
if( ( ubPurchaseNumber - gubPurchaseAtTopOfList ) >= BOBBYR_NUM_DISPLAYED_ITEMS )
|
||||
gubPurchaseAtTopOfList = ubPurchaseNumber - BOBBYR_NUM_DISPLAYED_ITEMS + 1;
|
||||
// silversurfer: No idea what this was supposed to do. We always have only BOBBYR_NUM_DISPLAYED_ITEMS in the list.
|
||||
// Why should we handle scrolling up and down differently?
|
||||
/* if( ( ubPurchaseNumber - gubPurchaseAtTopOfList ) >= BOBBYR_NUM_DISPLAYED_ITEMS )
|
||||
gubPurchaseAtTopOfList = ubPurchaseNumber - BOBBYR_NUM_DISPLAYED_ITEMS + 1; */
|
||||
gubPurchaseAtTopOfList = ubPurchaseNumber;
|
||||
}
|
||||
gfReDrawBobbyOrder = TRUE;
|
||||
gfBobbyRShipmentsDirty = TRUE;
|
||||
@@ -2826,7 +2837,37 @@ UINT16 CountNumberOfBobbyPurchasesThatAreInTransit()
|
||||
return( usItemCount );
|
||||
}
|
||||
|
||||
void SortBobbyRayPurchases()
|
||||
{
|
||||
INT16 ubLastEmptyIndex = -1;
|
||||
|
||||
for ( UINT8 i = 0; i < gGameExternalOptions.ubBobbyRayMaxPurchaseAmount; i++ )
|
||||
{
|
||||
// we have no item here
|
||||
if ( BobbyRayPurchases[i].ubNumberPurchased == 0 )
|
||||
{
|
||||
// store this index as the first last empty index
|
||||
if ( ubLastEmptyIndex < 0 )
|
||||
ubLastEmptyIndex = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ubLastEmptyIndex >= 0 )
|
||||
{
|
||||
// move data to last empty index
|
||||
BobbyRayPurchases[ubLastEmptyIndex] = BobbyRayPurchases[i];
|
||||
// clean up data
|
||||
BobbyRayPurchases[i].bItemQuality = 0;
|
||||
BobbyRayPurchases[i].fUsed = 0;
|
||||
BobbyRayPurchases[i].ubNumberPurchased = 0;
|
||||
BobbyRayPurchases[i].usBobbyItemIndex = 0;
|
||||
BobbyRayPurchases[i].usItemIndex = 0;
|
||||
// set new last empty index
|
||||
ubLastEmptyIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOLEAN NewWayOfSavingBobbyRMailOrdersToSaveGameFile( HWFILE hFile )
|
||||
{
|
||||
|
||||
+1
-1
@@ -5768,7 +5768,7 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
{
|
||||
// Switch on silencer...
|
||||
UINT16 noisefactor = GetPercentNoiseVolume( pObj );
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ pObj->usItem ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ pObj->usItem ].ubAttackVolume <= 10 )
|
||||
{
|
||||
INT32 uiSound;
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
// Switch on silencer...
|
||||
INT16 noisefactor = GetPercentNoiseVolume( pObjUsed );
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ usedGun ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ usedGun ].ubAttackVolume <= 10 )
|
||||
{
|
||||
INT32 uiSound;
|
||||
|
||||
|
||||
@@ -1812,7 +1812,7 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
// IF we are silenced?
|
||||
noisefactor = GetPercentNoiseVolume( pObjAttHand );
|
||||
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
{
|
||||
// Pick sound file baed on how many bullets we are going to fire...
|
||||
sprintf( zBurstString, gzBurstSndStrings[ Weapon[ usUBItem ].sSilencedBurstSound ], bShotsToFire );
|
||||
@@ -1869,7 +1869,7 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
{
|
||||
// Switch on silencer...
|
||||
UINT16 noisefactor = GetPercentNoiseVolume( pObjAttHand );
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
{
|
||||
INT32 uiSound;
|
||||
|
||||
@@ -2390,7 +2390,7 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
// IF we are silenced?
|
||||
UINT16 noisefactor = GetPercentNoiseVolume( pObjUsed );
|
||||
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
{
|
||||
// Pick sound file baed on how many bullets we are going to fire...
|
||||
sprintf( zBurstString, gzBurstSndStrings[ Weapon[ usUBItem ].sSilencedBurstSound ], bShotsToFire );
|
||||
@@ -2447,7 +2447,7 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
{
|
||||
// Switch on silencer...
|
||||
UINT16 noisefactor = GetPercentNoiseVolume( pObjUsed );
|
||||
if( noisefactor < MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
if( noisefactor < gGameExternalOptions.gubMaxPercentNoiseSilencedSound || Weapon[ usUBItem ].ubAttackVolume <= 10 )
|
||||
{
|
||||
INT32 uiSound;
|
||||
|
||||
|
||||
+2
-1
@@ -47,7 +47,8 @@ void HandleTacticalEffectsOfEquipmentChange( SOLDIERTYPE *pSoldier, UINT32 uiInv
|
||||
#define SOLID_SLUG_RANGE_BONUS 65
|
||||
#define DUCKBILL_RANGE_BONUS 40
|
||||
|
||||
#define MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND 50 //35 silversurfer changed that to make sound suppressors always play the silenced sound
|
||||
// silversurfer: externalized this to gGameExternalOptions.gubMaxPercentNoiseSilencedSound
|
||||
//#define MAX_PERCENT_NOISE_VOLUME_FOR_SILENCED_SOUND 35
|
||||
|
||||
// JA2 GOLD: for weapons and attachments, give penalties only for status values below 85
|
||||
#define WEAPON_STATUS_MOD( x ) ( (x) >= 85 ? 100 : (((x) * 100) / 85) )
|
||||
|
||||
Reference in New Issue
Block a user