Bugfix: Problems with refreshing fast help text in mapscreen (by jones bearpit)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2825 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-05-07 20:07:22 +00:00
parent c54e61ce75
commit a0b75319ad
5 changed files with 26 additions and 7 deletions
+2 -1
View File
@@ -295,7 +295,8 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
// render whole panel
// HEADROCK Changed this line to accept outside influence through the new boolean:
if ( fForceMapscreenFullRender == TRUE || fMapScreenBottomDirty == TRUE)
//if ( fForceMapscreenFullRender == TRUE || fMapScreenBottomDirty == TRUE)
if ( fMapScreenBottomDirty )
{
// get and blt panel
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
+9 -2
View File
@@ -424,7 +424,10 @@ INT16 gpSamSectorY[ MAX_NUMBER_OF_SAMS ];
extern BOOLEAN fSamSiteFoundOrig[ MAX_NUMBER_OF_SAMS ];
// map region
SGPRect MapScreenRect={ (MAP_VIEW_START_X+MAP_GRID_X - 2), ( MAP_VIEW_START_Y+MAP_GRID_Y - 1), MAP_VIEW_START_X + MAP_VIEW_WIDTH - 1 + MAP_GRID_X , MAP_VIEW_START_Y+MAP_VIEW_HEIGHT-10+MAP_GRID_Y};
SGPRect MapScreenRect={ (MAP_VIEW_START_X+MAP_GRID_X - 2),
( MAP_VIEW_START_Y+MAP_GRID_Y - 1),
MAP_VIEW_START_X + MAP_VIEW_WIDTH - 1 + MAP_GRID_X ,
MAP_VIEW_START_Y+MAP_VIEW_HEIGHT-10+MAP_GRID_Y};
extern SGPRect gOldClipRect; // symbol already declared globally in renderworld.cpp (jonathanl)
@@ -1328,6 +1331,7 @@ BOOLEAN ShadeMapElem( INT16 sMapX, INT16 sMapY, INT32 iColor )
if( iColor != MAP_SHADE_BLACK )
{
//sScreenX +=1;
// airspace
/*
if( sMapX == 1 )
@@ -3943,7 +3947,10 @@ void RestoreBackgroundForMapGrid( INT16 sMapX, INT16 sMapY )
void ClipBlitsToMapViewRegion( void )
{
// the standard mapscreen rectangle doesn't work for clipping while zoomed...
SGPRect ZoomedMapScreenClipRect={ MAP_VIEW_START_X + MAP_GRID_X, MAP_VIEW_START_Y + MAP_GRID_Y - 1, MAP_VIEW_START_X + MAP_VIEW_WIDTH + MAP_GRID_X, MAP_VIEW_START_Y + MAP_VIEW_HEIGHT + MAP_GRID_Y - 10 };
SGPRect ZoomedMapScreenClipRect={ MAP_VIEW_START_X + MAP_GRID_X,
MAP_VIEW_START_Y + MAP_GRID_Y - 1,
MAP_VIEW_START_X + MAP_VIEW_WIDTH + MAP_GRID_X,
MAP_VIEW_START_Y + MAP_VIEW_HEIGHT + MAP_GRID_Y - 10 };
SGPRect *pRectToUse;
if (fZoomFlag)
+4 -3
View File
@@ -5257,9 +5257,9 @@ UINT32 MapScreenHandle(void)
{
fShowInventoryFlag = FALSE;
// CHRISL: Added call to re-render the bottom panel
RenderMapScreenInterfaceBottom ( TRUE );
// RenderMapScreenInterfaceBottom ( TRUE );
// set help text for item glow region
SetRegionFastHelpText( &gCharInfoHandRegion, pMiscMapScreenMouseRegionHelpText[ 0 ] );
//XXXj? SetRegionFastHelpText( &gCharInfoHandRegion, pMiscMapScreenMouseRegionHelpText[ 0 ] );
}
@@ -15377,7 +15377,8 @@ void RequestToggleMercInventoryPanel( void )
else
{
// Headrock. New line forces InvBottom rerender when the inventory is opened and closed.
RenderMapScreenInterfaceBottom ( TRUE );
//RenderMapScreenInterfaceBottom ( TRUE );
fMapScreenBottomDirty = TRUE;
SetRegionFastHelpText( &gCharInfoHandRegion, pMiscMapScreenMouseRegionHelpText[ 0 ] );
}
}
+6 -1
View File
@@ -930,7 +930,8 @@ void StartViewportOverlays( )
memcpy( &gOldClippingRect, &ClippingRect, sizeof( gOldClippingRect ) );
// Save old dirty clipping rect
memcpy( &gOldDirtyClippingRect, &ClippingRect, sizeof( gOldDirtyClippingRect ) );
// memcpy( &gOldDirtyClippingRect, &ClippingRect, sizeof( gOldDirtyClippingRect ) );
memcpy( &gOldDirtyClippingRect, &gDirtyClipRect, sizeof( gOldDirtyClippingRect ) );
// Set bottom clipping value for blitter clipping rect
ClippingRect.iLeft = INTERFACE_START_X;
@@ -954,6 +955,10 @@ void EndViewportOverlays( )
// Reset clipping rect
memcpy( &ClippingRect, &gOldClippingRect, sizeof( gOldClippingRect ) );
memcpy( &gDirtyClipRect, &gOldDirtyClippingRect, sizeof( gOldDirtyClippingRect ) );
if(gDirtyClipRect.iBottom < SCREEN_HEIGHT)
gDirtyClipRect.iBottom = SCREEN_HEIGHT;
RestoreFontSettings( );
}
+5
View File
@@ -208,6 +208,11 @@ INT32 iTempX, iTempY;
//{
// return(-1 );
//}
//only time this shoudl be true is tactical..fix for games saved in broken state
extern UINT32 guiTacticalInterfaceFlags;
if (guiTacticalInterfaceFlags & 0x00000001)
if(gDirtyClipRect.iBottom < SCREEN_HEIGHT)
gDirtyClipRect.iBottom = SCREEN_HEIGHT;
ClipX1= gDirtyClipRect.iLeft;
ClipY1= gDirtyClipRect.iTop;