Widescreen UI patch (by Asdow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9216 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-11-21 12:56:27 +00:00
parent abb1aeeea2
commit 0cc70519d3
25 changed files with 3124 additions and 2060 deletions
+8 -36
View File
@@ -101,6 +101,7 @@
//forward declarations of common classes to eliminate includes
class OBJECTTYPE;
class SOLDIERTYPE;
extern INV_REGION_DESC gMapScreenInvPocketXY[NUM_INV_SLOTS]; // ARRAY FOR INV PANEL INTERFACE ITEM POSITIONS
//CHRISL: Moved to Interface Items.h for EDB
//#define ITEMDESC_FONT BLOCKFONT2
@@ -1652,7 +1653,6 @@ void RenderInvBodyPanel( SOLDIERTYPE *pSoldier, INT16 sX, INT16 sY )
else
{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiBodyInvVO[ pSoldier->ubBodyType ][ bSubImageIndex ], 0, sX, sY, VO_BLT_SRCTRANSPARENCY, NULL );
}
}
@@ -2642,38 +2642,6 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
if ( fDirtyLevel == DIRTYLEVEL2 )
{
// 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;
@@ -2693,8 +2661,9 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
}
else
{
newX = !UsingNewInventorySystem( ) ? (14 + xResOffset) : (6 + xResOffset);
newY = !UsingNewInventorySystem( ) ? (218 + yResOffset) : (217 + yResOffset);
newX = gMapScreenInvPocketXY[SECONDHANDPOS].sX - 10;
newY = gMapScreenInvPocketXY[SECONDHANDPOS].sY;
BltVideoObjectFromIndex( guiSAVEBUFFER, guiMapInvSecondHandBlockout, UsingNewInventorySystem(), newX, newY, VO_BLT_SRCTRANSPARENCY, NULL );
RestoreExternBackgroundRect( newX, newY, 102, 24 );
}
@@ -9755,7 +9724,10 @@ BOOLEAN InitSectorStackPopup( SOLDIERTYPE *pSoldier, WORLDITEM *pInventoryPoolLi
fInterfacePanelDirty = DIRTYLEVEL2;
gfInSectorStackPopup = TRUE;
fShowInventoryFlag = TRUE;
if (!isWidescreenUI())
{
fShowInventoryFlag = TRUE;
}
//Restrict mouse cursor to panel
aRect.iLeft = sInvX + sOffSetX;