mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Data and Source v1.13 Mod High Resolution version from 2006-03-01
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@23 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Tactical All.h"
|
||||
#include "language defines.h"
|
||||
@@ -1062,37 +1063,6 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
|
||||
{
|
||||
// CHECK FOR COMPATIBILITY WITH MAGAZINES
|
||||
|
||||
/* OLD VERSION OF GUN/AMMO MATCH HIGHLIGHTING
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
UINT16 usLineColor;
|
||||
|
||||
if ( ( Item [ pSoldier->inv[ HANDPOS ].usItem ].usItemClass & IC_GUN ) && ( Item[ pObject->usItem ].usItemClass & IC_AMMO ) )
|
||||
{
|
||||
// CHECK
|
||||
if (Weapon[pSoldier->inv[ HANDPOS ].usItem].ubCalibre == Magazine[Item[pObject->usItem].ubClassIndex].ubCalibre )
|
||||
{
|
||||
// IT's an OK calibre ammo, do something!
|
||||
// Render Item with specific color
|
||||
//fOutline = TRUE;
|
||||
//sOutlineColor = Get16BPPColor( FROMRGB( 96, 104, 128 ) );
|
||||
//sOutlineColor = Get16BPPColor( FROMRGB( 20, 20, 120 ) );
|
||||
|
||||
// Draw rectangle!
|
||||
pDestBuf = LockVideoSurface( guiSAVEBUFFER, &uiDestPitchBYTES );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
|
||||
|
||||
//usLineColor = Get16BPPColor( FROMRGB( 255, 255, 0 ) );
|
||||
usLineColor = Get16BPPColor( FROMRGB( 230, 215, 196 ) );
|
||||
RectangleDraw( TRUE, (sX+1), (sY+1), (sX + gSMInvData[ sPocket ].sWidth - 2 ),( sY + gSMInvData[ sPocket ].sHeight - 2 ), usLineColor, pDestBuf );
|
||||
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
|
||||
|
||||
UnLockVideoSurface( guiSAVEBUFFER );
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if ( gbCompatibleAmmo[ sPocket ] )
|
||||
{
|
||||
fOutline = TRUE;
|
||||
@@ -4913,7 +4883,7 @@ BOOLEAN HandleItemPointerClick( UINT16 usMapPos )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel );
|
||||
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel, gpItemPointerSoldier );
|
||||
|
||||
// Check LOS....
|
||||
if ( !SoldierTo3DLocationLineOfSightTest( pSoldier, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel, 3, (UINT8) sDistVisible, TRUE ) )
|
||||
@@ -7221,15 +7191,34 @@ void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldi
|
||||
}
|
||||
else if ( usItem != NOTHING )
|
||||
{
|
||||
if ( !gGameOptions.fGunNut && Item[ usItem ].usItemClass == IC_GUN && !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle )
|
||||
// Retrieve the status of the items
|
||||
// Find the minimum status value - not just the first one
|
||||
INT16 sValue = pObject->bStatus[ 0 ];
|
||||
INT16 i;
|
||||
for(i = 1; i < pObject->ubNumberOfObjects; i++)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s (%s)", ItemNames[ usItem ], AmmoCaliber[ Weapon[ usItem ].ubCalibre ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s", ItemNames[ usItem ] );
|
||||
if(pObject->bStatus[ i ] < sValue)
|
||||
{
|
||||
sValue = pObject->bStatus[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
// The first tool tip is for rocket rifles
|
||||
if ( !gGameOptions.fGunNut && Item[ usItem ].usItemClass == IC_GUN && !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle )
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s (%s) [%d%%]", ItemNames[ usItem ], AmmoCaliber[ Weapon[ usItem ].ubCalibre ], sValue );
|
||||
}
|
||||
// The next is for ammunition which gets the measurement 'rnds'
|
||||
else if (Item[ usItem ].usItemClass == IC_AMMO)
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d rnds]", ItemNames[ usItem ], sValue );
|
||||
}
|
||||
// The final, and typical case, is that of an item with a percent status
|
||||
else
|
||||
{
|
||||
swprintf( (wchar_t *)pStr, L"%s [%d%%]", ItemNames[ usItem ], sValue );
|
||||
}
|
||||
|
||||
if ( ( Item[pObject->usItem].fingerprintid ) && pObject->ubImprintID < NO_PROFILE )
|
||||
{
|
||||
INT16 pStr2[20];
|
||||
@@ -7531,9 +7520,10 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
|
||||
}
|
||||
|
||||
// CHECK FOR LEFT/RIGHT
|
||||
if ( ( sX + gItemPickupMenu.sWidth ) > 640 )
|
||||
// WANNE 2
|
||||
if ( ( sX + gItemPickupMenu.sWidth ) > SCREEN_WIDTH )
|
||||
{
|
||||
sX = 640 - gItemPickupMenu.sWidth - ITEMPICK_START_X_OFFSET;
|
||||
sX = SCREEN_WIDTH - gItemPickupMenu.sWidth - ITEMPICK_START_X_OFFSET;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7552,9 +7542,10 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
|
||||
}
|
||||
|
||||
// Check for bottom
|
||||
if ( ( sY + gItemPickupMenu.sHeight ) > 340 )
|
||||
// WANNE 2
|
||||
if ( ( sY + gItemPickupMenu.sHeight ) > (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) )
|
||||
{
|
||||
sY = 340 - gItemPickupMenu.sHeight;
|
||||
sY = (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) - gItemPickupMenu.sHeight;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7580,8 +7571,14 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
|
||||
|
||||
|
||||
// Build a mouse region here that is over any others.....
|
||||
MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( 532 ), (INT16)( 367 ), (INT16)( 640 ),(INT16)( 480 ), MSYS_PRIORITY_HIGHEST,
|
||||
/*MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( 532 ), (INT16)( 367 ), (INT16)( 640 ),(INT16)( 480 ), MSYS_PRIORITY_HIGHEST,
|
||||
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK ); */
|
||||
|
||||
// WANNE 2
|
||||
// Build a mouse region here that is over any others.....
|
||||
MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( iScreenWidthOffset + 532 ), (INT16)( iScreenHeightOffset + 367 ), (INT16)( SCREEN_WIDTH ),(INT16)( SCREEN_HEIGHT ), MSYS_PRIORITY_HIGHEST,
|
||||
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||
|
||||
// Add region
|
||||
MSYS_AddRegion( &(gItemPickupMenu.BackRegion ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user