mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
+40
-25
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "GameSettings.h"
|
||||
@@ -8589,6 +8590,7 @@ BOOLEAN CreateDestroyAssignmentPopUpBoxes( void )
|
||||
|
||||
// these boxes are always created while in mapscreen...
|
||||
CreateEPCBox( );
|
||||
// WANNE 2 <ab>
|
||||
CreateAssignmentsBox( );
|
||||
CreateTrainingBox( );
|
||||
CreateAttributeBox();
|
||||
@@ -8745,16 +8747,19 @@ void SetTacticalPopUpAssignmentBoxXY( void )
|
||||
gsAssignmentBoxesY = sY;
|
||||
|
||||
|
||||
// WANNE 2
|
||||
// ATE: Check if we are past tactical viewport....
|
||||
// Use estimate width's/heights
|
||||
if ( ( gsAssignmentBoxesX + 100 ) > 640 )
|
||||
if ( ( gsAssignmentBoxesX + 100 ) > SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = 540;
|
||||
//gsAssignmentBoxesX = 540;
|
||||
gsAssignmentBoxesX = SCREEN_WIDTH - 100;
|
||||
}
|
||||
|
||||
if ( ( gsAssignmentBoxesY + 130 ) > 320 )
|
||||
// WANNE 2
|
||||
if ( ( gsAssignmentBoxesY + 130 ) > (SCREEN_HEIGHT - 160) )
|
||||
{
|
||||
gsAssignmentBoxesY = 190;
|
||||
gsAssignmentBoxesY = SCREEN_HEIGHT - 290;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -8823,9 +8828,10 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
{
|
||||
GetBoxSize( ghRepairBox, &pDimensions );
|
||||
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= 640 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = ( INT16 ) ( 639 - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
gsAssignmentBoxesX = ( INT16 ) ( (SCREEN_WIDTH - 1) - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8838,9 +8844,10 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
sLongest = ( INT16 )pDimensions.iBottom + ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_REPAIR );
|
||||
}
|
||||
|
||||
if( gsAssignmentBoxesY + sLongest >= 360 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesY + sLongest >= (SCREEN_HEIGHT - 120) )
|
||||
{
|
||||
gsAssignmentBoxesY = ( INT16 )( 359 - ( sLongest ) );
|
||||
gsAssignmentBoxesY = ( INT16 )( (SCREEN_HEIGHT - 121) - ( sLongest ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8854,9 +8861,9 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
GetBoxSize( ghSquadBox, &pDimensions );
|
||||
|
||||
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= 640 )
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = ( INT16 ) ( 639 - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
gsAssignmentBoxesX = ( INT16 ) ( (SCREEN_WIDTH - 1) - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8869,9 +8876,10 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
sLongest = ( INT16 )pDimensions.iBottom;
|
||||
}
|
||||
|
||||
if( gsAssignmentBoxesY + sLongest >= 360 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesY + sLongest >= (SCREEN_HEIGHT - 120) )
|
||||
{
|
||||
gsAssignmentBoxesY = ( INT16 )( 359 - ( sLongest ) );
|
||||
gsAssignmentBoxesY = ( INT16 )( (SCREEN_HEIGHT - 121) - ( sLongest ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8885,15 +8893,17 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
GetBoxSize( ghTrainingBox, &pDimensions );
|
||||
GetBoxSize( ghAttributeBox, &pDimensions3 );
|
||||
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight + pDimensions3.iRight >= 640 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight + pDimensions3.iRight >= SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = ( INT16 ) ( 639 - ( pDimensions2.iRight + pDimensions.iRight + pDimensions3.iRight ) );
|
||||
gsAssignmentBoxesX = ( INT16 ) ( (SCREEN_WIDTH - 1) - ( pDimensions2.iRight + pDimensions.iRight + pDimensions3.iRight ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
if( gsAssignmentBoxesY + pDimensions3.iBottom + ( GetFontHeight( MAP_SCREEN_FONT ) * ASSIGN_MENU_TRAIN ) >= 360 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesY + pDimensions3.iBottom + ( GetFontHeight( MAP_SCREEN_FONT ) * ASSIGN_MENU_TRAIN ) >= (SCREEN_HEIGHT - 120) )
|
||||
{
|
||||
gsAssignmentBoxesY = ( INT16 )( 359 - ( pDimensions3.iBottom ) );
|
||||
gsAssignmentBoxesY = ( INT16 )( (SCREEN_HEIGHT - 121) - ( pDimensions3.iBottom ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8916,15 +8926,17 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
{
|
||||
GetBoxSize( ghTrainingBox, &pDimensions );
|
||||
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= 640 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight + pDimensions.iRight >= SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = ( INT16 ) ( 639 - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
gsAssignmentBoxesX = ( INT16 ) ( (SCREEN_WIDTH - 1) - ( pDimensions2.iRight + pDimensions.iRight ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
if( gsAssignmentBoxesY + pDimensions2.iBottom + ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_TRAIN ) >= 360 )
|
||||
// WANNE 2
|
||||
if( gsAssignmentBoxesY + pDimensions2.iBottom + ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_TRAIN ) >= (SCREEN_HEIGHT - 120) )
|
||||
{
|
||||
gsAssignmentBoxesY = ( INT16 )( 359 - ( pDimensions2.iBottom ) - ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_TRAIN ) );
|
||||
gsAssignmentBoxesY = ( INT16 )( (SCREEN_HEIGHT - 121) - ( pDimensions2.iBottom ) - ( ( GetFontHeight( MAP_SCREEN_FONT ) + 2 ) * ASSIGN_MENU_TRAIN ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8938,16 +8950,17 @@ void CheckAndUpdateTacticalAssignmentPopUpPositions( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
// WANNE 2
|
||||
// just the assignment box
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight >= 640 )
|
||||
if( gsAssignmentBoxesX + pDimensions2.iRight >= SCREEN_WIDTH )
|
||||
{
|
||||
gsAssignmentBoxesX = ( INT16 ) ( 639 - ( pDimensions2.iRight ) );
|
||||
gsAssignmentBoxesX = ( INT16 ) ( (SCREEN_WIDTH - 1) - ( pDimensions2.iRight ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
if( gsAssignmentBoxesY + pDimensions2.iBottom >= 360 )
|
||||
if( gsAssignmentBoxesY + pDimensions2.iBottom >= (SCREEN_HEIGHT - 120) )
|
||||
{
|
||||
gsAssignmentBoxesY = ( INT16 )( 359 - ( pDimensions2.iBottom ) );
|
||||
gsAssignmentBoxesY = ( INT16 )( (SCREEN_HEIGHT - 121) - ( pDimensions2.iBottom ) );
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
}
|
||||
|
||||
@@ -8984,9 +8997,10 @@ void PositionCursorForTacticalAssignmentBox( void )
|
||||
|
||||
iFontHeight = GetLineSpace( ghAssignmentBox ) + GetFontHeight( GetBoxFont( ghAssignmentBox ) );
|
||||
|
||||
// WANNE 2
|
||||
if( gGameSettings.fOptions[ TOPTION_DONT_MOVE_MOUSE ] == FALSE )
|
||||
{
|
||||
SimulateMouseMovement( pPosition.iX + pDimensions.iRight - 6, pPosition.iY + ( iFontHeight / 2 ) + 2 );
|
||||
//SimulateMouseMovement( pPosition.iX + pDimensions.iRight - 6, pPosition.iY + ( iFontHeight / 2 ) + 2 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10557,6 +10571,7 @@ void RebuildAssignmentsBox( void )
|
||||
ghAssignmentBox = -1;
|
||||
}
|
||||
|
||||
// WANNE 2 <ab>
|
||||
CreateAssignmentsBox( );
|
||||
}
|
||||
|
||||
|
||||
+49
-31
@@ -1,3 +1,5 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
// MAXIMUM NUMBER OF ENEMIES: 32
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "GameSettings.h"
|
||||
@@ -506,7 +508,7 @@ void DoTransitionFromPreBattleInterfaceToAutoResolve()
|
||||
sEndTop = SrcRect.iTop + gpAR->sHeight / 2;
|
||||
|
||||
//save the prebattle/mapscreen interface background
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, 640, 480 );
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
|
||||
//render the autoresolve panel
|
||||
RenderAutoResolve();
|
||||
@@ -644,12 +646,16 @@ UINT32 AutoResolveScreenHandle()
|
||||
//Take the framebuffer, shade it, and save it to the SAVEBUFFER.
|
||||
ClipRect.iLeft = 0;
|
||||
ClipRect.iTop = 0;
|
||||
ClipRect.iRight = 640;
|
||||
ClipRect.iBottom = 480;
|
||||
/*ClipRect.iRight = 640;
|
||||
ClipRect.iBottom = 480;*/
|
||||
ClipRect.iRight = SCREEN_WIDTH;
|
||||
ClipRect.iBottom = SCREEN_HEIGHT;
|
||||
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
|
||||
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
KillPreBattleInterface();
|
||||
CalculateAutoResolveInfo();
|
||||
CalculateSoldierCells( FALSE );
|
||||
@@ -658,7 +664,9 @@ UINT32 AutoResolveScreenHandle()
|
||||
DetermineTeamLeader( FALSE ); //enemy team
|
||||
CalculateAttackValues();
|
||||
if( gfExtraBuffer )
|
||||
{
|
||||
DoTransitionFromPreBattleInterfaceToAutoResolve();
|
||||
}
|
||||
else
|
||||
gpAR->fExpanding = TRUE;
|
||||
gpAR->fRenderAutoResolve = TRUE;
|
||||
@@ -826,8 +834,9 @@ void CalculateSoldierCells( BOOLEAN fReset )
|
||||
}
|
||||
gpAR->uiTimeSlice = gpAR->uiTimeSlice * gpAR->ubTimeModifierPercentage / 100;
|
||||
|
||||
iTop = 240 - gpAR->sHeight/2;
|
||||
if( iTop > 120 )
|
||||
// WANNE 2
|
||||
iTop = iScreenHeightOffset + (240 - gpAR->sHeight/2);
|
||||
if( iTop > (iScreenHeightOffset + 120) )
|
||||
iTop -= 40;
|
||||
|
||||
if( gpAR->ubMercs )
|
||||
@@ -843,6 +852,7 @@ void CalculateSoldierCells( BOOLEAN fReset )
|
||||
if( y >= gapStartRow )
|
||||
index -= y - gapStartRow + 1;
|
||||
Assert( index >= 0 && index < gpAR->ubMercs );
|
||||
|
||||
gpMercs[ index ].xp = gpAR->sCenterStartX + 3 - 55*(x+1);
|
||||
gpMercs[ index ].yp = iStartY + y*47;
|
||||
gpMercs[ index ].uiFlags = CELL_MERC;
|
||||
@@ -1047,15 +1057,16 @@ void BuildInterfaceBuffer()
|
||||
INT32 x,y;
|
||||
|
||||
//Setup the blitting clip regions, so we don't draw outside of the region (for excess panelling)
|
||||
gpAR->Rect.iLeft = 320 - gpAR->sWidth/2;
|
||||
// WANNE 2
|
||||
gpAR->Rect.iLeft = iScreenWidthOffset + (320 - gpAR->sWidth/2);
|
||||
gpAR->Rect.iRight = gpAR->Rect.iLeft + gpAR->sWidth;
|
||||
gpAR->Rect.iTop = 240 - gpAR->sHeight/2;
|
||||
if( gpAR->Rect.iTop > 120 )
|
||||
gpAR->Rect.iTop = iScreenHeightOffset + (240 - gpAR->sHeight/2);
|
||||
if( gpAR->Rect.iTop > (iScreenHeightOffset + 120) )
|
||||
gpAR->Rect.iTop -= 40;
|
||||
gpAR->Rect.iBottom = gpAR->Rect.iTop + gpAR->sHeight;
|
||||
|
||||
DestRect.iLeft = 0;
|
||||
DestRect.iTop = 0;
|
||||
DestRect.iTop = 0;
|
||||
DestRect.iRight = gpAR->sWidth;
|
||||
DestRect.iBottom = gpAR->sHeight;
|
||||
|
||||
@@ -1200,7 +1211,7 @@ void ExpandWindow()
|
||||
|
||||
//The new rect now determines the state of the current rectangle.
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
RectangleDraw( TRUE, gpAR->ExRect.iLeft, gpAR->ExRect.iTop, gpAR->ExRect.iRight, gpAR->ExRect.iBottom, Get16BPPColor( FROMRGB( 200, 200, 100 ) ), pDestBuf );
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
//left
|
||||
@@ -1623,7 +1634,8 @@ void RenderAutoResolve()
|
||||
|
||||
if( gpAR->fPendingSurrender )
|
||||
{
|
||||
DisplayWrappedString( (UINT16)(gpAR->sCenterStartX+16), (UINT16)(230+gpAR->bVerticalOffset), 108, 2,
|
||||
// WANNE 2
|
||||
DisplayWrappedString( (UINT16)(gpAR->sCenterStartX+16), (UINT16)(iScreenHeightOffset + 230+gpAR->bVerticalOffset), 108, 2,
|
||||
(UINT8)FONT10ARIAL, FONT_YELLOW, gpStrategicString[ STR_ENEMY_SURRENDER_OFFER ], FONT_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
}
|
||||
|
||||
@@ -1727,7 +1739,7 @@ void RenderAutoResolve()
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayWrappedString( (UINT16)(gpAR->sCenterStartX+16), 310, 108, 2,
|
||||
DisplayWrappedString( (UINT16)(gpAR->sCenterStartX+16), iScreenHeightOffset + 310, 108, 2,
|
||||
FONT10ARIAL, FONT_YELLOW, gpStrategicString[ STR_ENEMY_CAPTURED ], FONT_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||
swprintf( str, gpStrategicString[ STR_AR_OVER_CAPTURED ] );
|
||||
}
|
||||
@@ -1743,12 +1755,13 @@ void RenderAutoResolve()
|
||||
break;
|
||||
}
|
||||
//Render the results of the battle.
|
||||
// WANNE 2
|
||||
SetFont( BLOCKFONT2 );
|
||||
xp = gpAR->sCenterStartX + 12;
|
||||
yp = 218 + gpAR->bVerticalOffset;
|
||||
yp = iScreenHeightOffset + 218 + gpAR->bVerticalOffset;
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, gpAR->iIndent, 0, xp, yp, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
xp = gpAR->sCenterStartX + 70 - StringPixLength( str, BLOCKFONT2 )/2;
|
||||
yp = 227 + gpAR->bVerticalOffset;
|
||||
yp = iScreenHeightOffset + 227 + gpAR->bVerticalOffset;
|
||||
mprintf( xp, yp, str );
|
||||
|
||||
//Render the total battle time elapsed.
|
||||
@@ -1758,7 +1771,8 @@ void RenderAutoResolve()
|
||||
gpAR->uiTotalElapsedBattleTimeInMilliseconds/60000,
|
||||
(gpAR->uiTotalElapsedBattleTimeInMilliseconds%60000)/1000 );
|
||||
xp = gpAR->sCenterStartX + 70 - StringPixLength( str, FONT10ARIAL )/2;
|
||||
yp = 290 + gpAR->bVerticalOffset;
|
||||
// WANNE 2
|
||||
yp = iScreenHeightOffset + 290 + gpAR->bVerticalOffset;
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( xp, yp, str );
|
||||
}
|
||||
@@ -1774,7 +1788,7 @@ void CreateAutoResolveInterface()
|
||||
HVOBJECT hVObject;
|
||||
UINT8 ubGreenMilitia, ubRegMilitia, ubEliteMilitia;
|
||||
//Setup new autoresolve blanket interface.
|
||||
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0, 0, 640, 480, MSYS_PRIORITY_HIGH-1, 0,
|
||||
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-1, 0,
|
||||
MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||
gpAR->fRenderAutoResolve = TRUE;
|
||||
gpAR->fExitAutoResolve = FALSE;
|
||||
@@ -2018,28 +2032,30 @@ void CreateAutoResolveInterface()
|
||||
//Build the interface buffer, and blit the "shaded" background. This info won't
|
||||
//change from now on, but will be used to restore text.
|
||||
BuildInterfaceBuffer();
|
||||
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 0, 0, 640, 480 );
|
||||
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
|
||||
//If we are bumping up the interface, then also use that piece of info to
|
||||
//move the buttons up by the same amount.
|
||||
gpAR->bVerticalOffset = 240 - gpAR->sHeight/2 > 120 ? -40 : 0;
|
||||
|
||||
gpAR->bVerticalOffset = (240 - gpAR->sHeight/2) > 120 ? -40 : 0;
|
||||
|
||||
// WANNE 2
|
||||
//Create the buttons -- subject to relocation
|
||||
gpAR->iButton[ PLAY_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ PLAY_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ PLAY_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(iScreenHeightOffset + 240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, PlayButtonCallback );
|
||||
gpAR->iButton[ FAST_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ FAST_BUTTON ] , (INT16)(gpAR->sCenterStartX+51), (INT16)(240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ FAST_BUTTON ] , (INT16)(gpAR->sCenterStartX+51), (INT16)(iScreenHeightOffset + 240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, FastButtonCallback );
|
||||
gpAR->iButton[ FINISH_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ FINISH_BUTTON ] , (INT16)(gpAR->sCenterStartX+91), (INT16)(240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ FINISH_BUTTON ] , (INT16)(gpAR->sCenterStartX+91), (INT16)(iScreenHeightOffset + 240+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, FinishButtonCallback );
|
||||
gpAR->iButton[ PAUSE_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ PAUSE_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(274+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ PAUSE_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(iScreenHeightOffset + 274+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, PauseButtonCallback );
|
||||
|
||||
gpAR->iButton[ RETREAT_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ RETREAT_BUTTON ], (INT16)(gpAR->sCenterStartX+51), (INT16)(274+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ RETREAT_BUTTON ], (INT16)(gpAR->sCenterStartX+51), (INT16)(iScreenHeightOffset + 274+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, RetreatButtonCallback );
|
||||
if( !gpAR->ubMercs )
|
||||
{
|
||||
@@ -2048,23 +2064,23 @@ void CreateAutoResolveInterface()
|
||||
SpecifyGeneralButtonTextAttributes( gpAR->iButton[ RETREAT_BUTTON ], gpStrategicString[STR_AR_RETREAT_BUTTON], BLOCKFONT2, 169, FONT_NEARBLACK );
|
||||
|
||||
gpAR->iButton[ BANDAGE_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ BANDAGE_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(245+gpAR->bVerticalOffset), BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ BANDAGE_BUTTON ] , (INT16)(gpAR->sCenterStartX+11), (INT16)(iScreenHeightOffset + 245+gpAR->bVerticalOffset), BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, BandageButtonCallback );
|
||||
|
||||
gpAR->iButton[ DONEWIN_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ DONEWIN_BUTTON ], (INT16)(gpAR->sCenterStartX+51), (INT16)(245+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ DONEWIN_BUTTON ], (INT16)(gpAR->sCenterStartX+51), (INT16)(iScreenHeightOffset + 245+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, DoneButtonCallback );
|
||||
SpecifyGeneralButtonTextAttributes( gpAR->iButton[ DONEWIN_BUTTON ], gpStrategicString[STR_AR_DONE_BUTTON], BLOCKFONT2, 169, FONT_NEARBLACK );
|
||||
|
||||
gpAR->iButton[ DONELOSE_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ DONELOSE_BUTTON ], (INT16)(gpAR->sCenterStartX+25), (INT16)(245+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ DONELOSE_BUTTON ], (INT16)(gpAR->sCenterStartX+25), (INT16)(iScreenHeightOffset + 245+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, DoneButtonCallback );
|
||||
SpecifyGeneralButtonTextAttributes( gpAR->iButton[ DONELOSE_BUTTON ], gpStrategicString[STR_AR_DONE_BUTTON], BLOCKFONT2, 169, FONT_NEARBLACK );
|
||||
gpAR->iButton[ YES_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ YES_BUTTON ], (INT16)(gpAR->sCenterStartX+21), (INT16)(257+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ YES_BUTTON ], (INT16)(gpAR->sCenterStartX+21), (INT16)(iScreenHeightOffset + 257+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, AcceptSurrenderCallback );
|
||||
gpAR->iButton[ NO_BUTTON ] =
|
||||
QuickCreateButton( gpAR->iButtonImage[ NO_BUTTON ], (INT16)(gpAR->sCenterStartX+81), (INT16)(257+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
QuickCreateButton( gpAR->iButtonImage[ NO_BUTTON ], (INT16)(gpAR->sCenterStartX+81), (INT16)(iScreenHeightOffset + 257+gpAR->bVerticalOffset), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
DEFAULT_MOVE_CALLBACK, RejectSurrenderCallback );
|
||||
HideButton( gpAR->iButton[ YES_BUTTON ] );
|
||||
HideButton( gpAR->iButton[ NO_BUTTON ] );
|
||||
@@ -2839,11 +2855,13 @@ void CalculateRowsAndColumns()
|
||||
}
|
||||
|
||||
if( gpAR->ubMercCols + gpAR->ubEnemyCols == 9 )
|
||||
gpAR->sWidth = 640;
|
||||
gpAR->sWidth = SCREEN_WIDTH;
|
||||
else
|
||||
gpAR->sWidth = 146 + 55 * (max( max( gpAR->ubMercCols, gpAR->ubCivCols ), 2 ) + max( gpAR->ubEnemyCols, 2 ));
|
||||
|
||||
gpAR->sCenterStartX = 323 - gpAR->sWidth/2 + max( max( gpAR->ubMercCols, 2), max( gpAR->ubCivCols, 2 ) ) *55;
|
||||
// WANNE 2
|
||||
//gpAR->sCenterStartX = 323 - gpAR->sWidth/2 + max( max( gpAR->ubMercCols, 2), max( gpAR->ubCivCols, 2 ) ) *55;
|
||||
gpAR->sCenterStartX = iScreenWidthOffset + (323 - gpAR->sWidth/2 + max( max( gpAR->ubMercCols, 2), max( gpAR->ubCivCols, 2 ) ) *55);
|
||||
|
||||
//Anywhere from 48*3 to 48*10
|
||||
gpAR->sHeight = 48 * max( 3, max( gpAR->ubMercRows + gpAR->ubCivRows, gpAR->ubEnemyRows ) );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifndef __WORLD_CLOCK
|
||||
#define __WORLD_CLOCK
|
||||
|
||||
@@ -5,14 +6,16 @@
|
||||
|
||||
|
||||
// where the time string itself is rendered
|
||||
#define CLOCK_X 554
|
||||
#define CLOCK_Y 459
|
||||
// WANNE 2
|
||||
#define CLOCK_X (SCREEN_WIDTH - 86) //554
|
||||
#define CLOCK_Y (SCREEN_HEIGHT - 21) //459
|
||||
|
||||
// WANNE 2
|
||||
// the mouse region around the clock (bigger)
|
||||
#define CLOCK_REGION_START_X 552
|
||||
#define CLOCK_REGION_START_Y 456
|
||||
#define CLOCK_REGION_WIDTH ( 620 - CLOCK_REGION_START_X )
|
||||
#define CLOCK_REGION_HEIGHT ( 468 - CLOCK_REGION_START_Y )
|
||||
#define CLOCK_REGION_START_X (SCREEN_WIDTH - 88) //552
|
||||
#define CLOCK_REGION_START_Y (SCREEN_HEIGHT - 24) //456
|
||||
#define CLOCK_REGION_WIDTH ((SCREEN_WIDTH - 20) - CLOCK_REGION_START_X) // ( 620 - CLOCK_REGION_START_X )
|
||||
#define CLOCK_REGION_HEIGHT ((SCREEN_HEIGHT - 12) - CLOCK_REGION_START_Y) //( 468 - CLOCK_REGION_START_Y )
|
||||
|
||||
#define NUM_SEC_IN_DAY 86400
|
||||
#define NUM_SEC_IN_HOUR 3600
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#else
|
||||
@@ -24,14 +25,13 @@
|
||||
#include "strategicmap.h"
|
||||
#endif
|
||||
|
||||
#define MAP_BORDER_X 261
|
||||
#define MAP_BORDER_Y 0
|
||||
|
||||
#define MAP_BORDER_CORNER_X 584
|
||||
#define MAP_BORDER_CORNER_Y 279
|
||||
|
||||
|
||||
|
||||
|
||||
//#define MAP_BORDER_CORNER_X 584
|
||||
//#define MAP_BORDER_CORNER_Y 279
|
||||
|
||||
// extern to anchored button in winbart97
|
||||
extern GUI_BUTTON *gpAnchoredButton;
|
||||
extern BOOLEAN gfAnchoredState;
|
||||
@@ -108,6 +108,9 @@ void LevelMarkerBtnCallback(MOUSE_REGION * pRegion, INT32 iReason );
|
||||
|
||||
void CommonBtnCallbackBtnDownChecks( void );
|
||||
|
||||
// WANNE 2
|
||||
void DrawTextOnMapBorder( void );
|
||||
|
||||
|
||||
/*
|
||||
void BtnScrollNorthMapScreenCallback( GUI_BUTTON *btn,INT32 reason );
|
||||
@@ -118,6 +121,31 @@ void BtnLowerLevelBtnCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
void BtnRaiseLevelBtnCallback(GUI_BUTTON *btn,INT32 reason);
|
||||
*/
|
||||
|
||||
// WANNE 2
|
||||
void DrawTextOnMapBorder( void )
|
||||
{
|
||||
INT16 sX = 0, sY = 0;
|
||||
CHAR16 sString[ 64 ];
|
||||
|
||||
// parse the string
|
||||
swprintf( sString, zMarksMapScreenText[ 24 ] );
|
||||
|
||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
//FindFontCenterCoordinates( MAP_INV_X_OFFSET + MAP_INVENTORY_POOL_SLOT_START_X, MAP_INVENTORY_POOL_SLOT_START_Y - 20, 630 - MAP_INVENTORY_POOL_SLOT_START_X, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||
|
||||
FindFontCenterCoordinates( 271, 18, SCREEN_WIDTH - 271, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||
|
||||
SetFont( FONT14ARIAL );
|
||||
SetFontForeground( FONT_WHITE );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
mprintf( sX, sY, sString );
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN LoadMapBorderGraphics( void )
|
||||
{
|
||||
@@ -133,11 +161,11 @@ BOOLEAN LoadMapBorderGraphics( void )
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP( "INTERFACE\\MBS_540x360.sti", VObjectDesc.ImageFile );
|
||||
FilenameForBPP( "INTERFACE\\MBS_800x600.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP( "INTERFACE\\MBS_764x360.sti", VObjectDesc.ImageFile );
|
||||
FilenameForBPP( "INTERFACE\\MBS_1024x768.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
|
||||
CHECKF( AddVideoObject( &VObjectDesc, &guiMapBorder ) );
|
||||
@@ -189,7 +217,13 @@ void RenderMapBorder( void )
|
||||
|
||||
// get and blt border
|
||||
GetVideoObject(&hHandle, guiMapBorder );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0,MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
// WANNE 2
|
||||
if (iResolution == 1 || iResolution == 2)
|
||||
{
|
||||
DrawTextOnMapBorder();
|
||||
}
|
||||
|
||||
// WANNE Invalidate!!
|
||||
RestoreExternBackgroundRect( MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT );
|
||||
@@ -255,9 +289,15 @@ void RenderMapBorderEtaPopUp( void )
|
||||
|
||||
// get and blt ETA box
|
||||
GetVideoObject(&hHandle, guiMapBorderEtaPopUp );
|
||||
BltVideoObject( FRAME_BUFFER , hHandle, 0, MAP_BORDER_X + 215, 291, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
// WANNE 2 <change ETA position>
|
||||
/*BltVideoObject( FRAME_BUFFER , hHandle, 0, MAP_BORDER_X + 215, 291, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
InvalidateRegion( MAP_BORDER_X + 215, 291, MAP_BORDER_X + 215 + 100 , 310);
|
||||
InvalidateRegion( MAP_BORDER_X + 215, 291, MAP_BORDER_X + 215 + 100 , 310);*/
|
||||
|
||||
BltVideoObject( FRAME_BUFFER , hHandle, 0, MAP_BORDER_X + MAP_BORDER_X_OFFSET + 215, MAP_BORDER_Y_OFFSET + 291, VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
InvalidateRegion( MAP_BORDER_X + MAP_BORDER_X_OFFSET + 215, MAP_BORDER_Y_OFFSET + 291, MAP_BORDER_X + MAP_BORDER_X_OFFSET + 215 + 100 , MAP_BORDER_Y_OFFSET + 310);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -299,40 +339,41 @@ BOOLEAN CreateButtonsForMapBorder( void )
|
||||
*/
|
||||
|
||||
|
||||
// WANNE 2
|
||||
// towns
|
||||
giMapBorderButtonsImage[ MAP_BORDER_TOWN_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,5,-1,14,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_TOWN_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_TOWN_BTN ], 299, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_TOWN_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_TOWN_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 152), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnTownCallback);
|
||||
|
||||
|
||||
// mines
|
||||
giMapBorderButtonsImage[ MAP_BORDER_MINE_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,4,-1,13,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_MINE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MINE_BTN ], 342, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_MINE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MINE_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 109), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnMineCallback);
|
||||
|
||||
// people
|
||||
giMapBorderButtonsImage[ MAP_BORDER_TEAMS_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,3,-1,12,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_TEAMS_BTN ], 385, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_TEAMS_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_TEAMS_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 66), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnTeamCallback);
|
||||
|
||||
// militia
|
||||
giMapBorderButtonsImage[ MAP_BORDER_MILITIA_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,8,-1,17,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MILITIA_BTN ], 428, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_MILITIA_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_MILITIA_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 23), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnMilitiaCallback);
|
||||
|
||||
// airspace
|
||||
giMapBorderButtonsImage[ MAP_BORDER_AIRSPACE_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,2,-1,11,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_AIRSPACE_BTN ], 471, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_AIRSPACE_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_AIRSPACE_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 19), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnAircraftCallback);
|
||||
|
||||
// items
|
||||
giMapBorderButtonsImage[ MAP_BORDER_ITEM_BTN ] = LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,1,-1,10,-1 );
|
||||
giMapBorderButtons[ MAP_BORDER_ITEM_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_ITEM_BTN ], 514, 323,
|
||||
giMapBorderButtons[ MAP_BORDER_ITEM_BTN ] = QuickCreateButton( giMapBorderButtonsImage[ MAP_BORDER_ITEM_BTN ], MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 62), (SCREEN_HEIGHT - 157),
|
||||
BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||
(GUI_CALLBACK)MSYS_NO_CALLBACK, (GUI_CALLBACK)BtnItemCallback);
|
||||
|
||||
@@ -1127,7 +1168,6 @@ BOOLEAN ScrollButtonsDisplayingHelpMessage( void )
|
||||
void DisplayCurrentLevelMarker( void )
|
||||
{
|
||||
// display the current level marker on the map border
|
||||
|
||||
HVOBJECT hHandle;
|
||||
|
||||
/*
|
||||
@@ -1141,6 +1181,10 @@ void DisplayCurrentLevelMarker( void )
|
||||
GetVideoObject(&hHandle, guiLEVELMARKER );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_LEVEL_MARKER_X + 1, MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( INT16 )iCurrentMapSectorZ ), VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
|
||||
// WANNE 2
|
||||
RestoreExternBackgroundRect(MAP_LEVEL_MARKER_X + 1, MAP_LEVEL_MARKER_Y + ( MAP_LEVEL_MARKER_DELTA * ( INT16 )iCurrentMapSectorZ ), 55, 9);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "Types.h"
|
||||
|
||||
#define MAP_BORDER_START_X 261
|
||||
#define MAP_BORDER_START_Y 0
|
||||
//#define MAP_BORDER_START_X 261
|
||||
//#define MAP_BORDER_START_Y 0
|
||||
|
||||
|
||||
|
||||
@@ -41,10 +41,11 @@ enum{
|
||||
*/
|
||||
|
||||
|
||||
#define MAP_LEVEL_MARKER_X 565
|
||||
#define MAP_LEVEL_MARKER_Y 323
|
||||
#define MAP_LEVEL_MARKER_DELTA 8
|
||||
#define MAP_LEVEL_MARKER_WIDTH ( 620 - MAP_LEVEL_MARKER_X )
|
||||
// WANNE 2
|
||||
#define MAP_LEVEL_MARKER_X (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 114)) //MAP_BORDER_X + MAP_BORDER_X_OFFSET + 384 //(SCREEN_WIDTH - 75) //565
|
||||
#define MAP_LEVEL_MARKER_Y (SCREEN_HEIGHT - 157) //(SCREEN_HEIGHT - 157) //323
|
||||
#define MAP_LEVEL_MARKER_DELTA 8
|
||||
#define MAP_LEVEL_MARKER_WIDTH 55 //( (SCREEN_WIDTH - 20) - MAP_LEVEL_MARKER_X )
|
||||
|
||||
|
||||
extern BOOLEAN fShowTownFlag;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#else
|
||||
@@ -38,30 +39,31 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define MAP_BOTTOM_X 0
|
||||
#define MAP_BOTTOM_Y 359
|
||||
// WANNE 2
|
||||
#define MAP_BOTTOM_X 0
|
||||
#define MAP_BOTTOM_Y (SCREEN_HEIGHT - 121) //359
|
||||
|
||||
#define MESSAGE_SCROLL_AREA_START_X 330
|
||||
#define MESSAGE_SCROLL_AREA_END_X 344
|
||||
#define MESSAGE_SCROLL_AREA_WIDTH ( MESSAGE_SCROLL_AREA_END_X - MESSAGE_SCROLL_AREA_START_X + 1 )
|
||||
#define MESSAGE_SCROLL_AREA_START_X 330
|
||||
#define MESSAGE_SCROLL_AREA_END_X 344
|
||||
#define MESSAGE_SCROLL_AREA_WIDTH ( MESSAGE_SCROLL_AREA_END_X - MESSAGE_SCROLL_AREA_START_X + 1 )
|
||||
|
||||
#define MESSAGE_SCROLL_AREA_START_Y 390
|
||||
#define MESSAGE_SCROLL_AREA_END_Y 448
|
||||
#define MESSAGE_SCROLL_AREA_HEIGHT ( MESSAGE_SCROLL_AREA_END_Y - MESSAGE_SCROLL_AREA_START_Y + 1 )
|
||||
#define MESSAGE_SCROLL_AREA_START_Y (SCREEN_HEIGHT - 90) //390
|
||||
#define MESSAGE_SCROLL_AREA_END_Y (SCREEN_HEIGHT - 32) //448
|
||||
#define MESSAGE_SCROLL_AREA_HEIGHT ( MESSAGE_SCROLL_AREA_END_Y - MESSAGE_SCROLL_AREA_START_Y + 1 )
|
||||
|
||||
#define SLIDER_HEIGHT 11
|
||||
#define SLIDER_WIDTH 11
|
||||
#define SLIDER_HEIGHT 11
|
||||
#define SLIDER_WIDTH 11
|
||||
|
||||
#define SLIDER_BAR_RANGE ( MESSAGE_SCROLL_AREA_HEIGHT - SLIDER_HEIGHT )
|
||||
#define SLIDER_BAR_RANGE ( MESSAGE_SCROLL_AREA_HEIGHT - SLIDER_HEIGHT )
|
||||
|
||||
|
||||
|
||||
#define MESSAGE_BTN_SCROLL_TIME 100
|
||||
#define MESSAGE_BTN_SCROLL_TIME 100
|
||||
|
||||
// delay for paused flash
|
||||
#define PAUSE_GAME_TIMER 500
|
||||
#define PAUSE_GAME_TIMER 500
|
||||
|
||||
#define MAP_BOTTOM_FONT_COLOR ( 32 * 4 - 9 )
|
||||
#define MAP_BOTTOM_FONT_COLOR ( 32 * 4 - 9 )
|
||||
|
||||
/*
|
||||
// delay to start auto message scroll
|
||||
@@ -148,7 +150,6 @@ extern BOOLEAN fShowDescriptionFlag;
|
||||
extern MOUSE_REGION gMPanelRegion;
|
||||
|
||||
|
||||
|
||||
// PROTOTYPES
|
||||
|
||||
|
||||
@@ -205,15 +206,15 @@ void HandleLoadOfMapBottomGraphics( void )
|
||||
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile );
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_800x241.sti", VObjectDesc.ImageFile );
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_800x600.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_1024x409.sti", VObjectDesc.ImageFile );
|
||||
FilenameForBPP( "INTERFACE\\map_screen_bottom_1024x768.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
|
||||
if( !AddVideoObject( &VObjectDesc, &guiMAPBOTTOMPANEL ) )
|
||||
@@ -267,7 +268,11 @@ void RenderMapScreenInterfaceBottom( void )
|
||||
HVOBJECT hHandle;
|
||||
CHAR8 bFilename[ 32 ];
|
||||
|
||||
|
||||
// WANNE 2
|
||||
fDisplayOverheadMap = FALSE;
|
||||
|
||||
|
||||
// WANNE 2 <redraw>
|
||||
// render whole panel
|
||||
if( fMapScreenBottomDirty == TRUE )
|
||||
{
|
||||
@@ -293,7 +298,7 @@ void RenderMapScreenInterfaceBottom( void )
|
||||
// dirty buttons
|
||||
MarkButtonsDirty( );
|
||||
|
||||
// WANNE
|
||||
// WANNE 2
|
||||
// invalidate region
|
||||
RestoreExternBackgroundRect( MAP_BOTTOM_X, MAP_BOTTOM_Y, SCREEN_WIDTH, SCREEN_HEIGHT - MAP_BOTTOM_Y );
|
||||
|
||||
@@ -335,20 +340,20 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
||||
{
|
||||
// laptop
|
||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,6,-1,15,-1 );
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ], 456, 410,
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ], (SCREEN_WIDTH - 184), (SCREEN_HEIGHT - 70),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnLaptopCallback);
|
||||
|
||||
// tactical
|
||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,7,-1,16,-1 );
|
||||
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_TACTICAL ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ], 496, 410,
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_TACTICAL ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ], (SCREEN_WIDTH - 144), (SCREEN_HEIGHT - 70),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTacticalCallback);
|
||||
|
||||
// options
|
||||
guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ]= LoadButtonImage( "INTERFACE\\map_border_buttons.sti" ,-1,18,-1,19,-1 );
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_OPTIONS ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ], 458, 372,
|
||||
guiMapBottomExitButtons[ MAP_EXIT_TO_OPTIONS ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ], (SCREEN_WIDTH - 182), (SCREEN_HEIGHT - 108),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnOptionsFromMapScreenCallback);
|
||||
|
||||
@@ -364,12 +369,12 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
||||
|
||||
// time compression buttons
|
||||
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,10,1,-1,3,-1 );
|
||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_MORE ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ], 528, 456,
|
||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_MORE ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ], (SCREEN_WIDTH - 112), (SCREEN_HEIGHT - 24),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2 ,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressMoreMapScreenCallback);
|
||||
|
||||
guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9,0,-1,2,-1 );
|
||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_LESS ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ], 466, 456,
|
||||
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_LESS ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressLessMapScreenCallback);
|
||||
|
||||
@@ -383,12 +388,12 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
|
||||
|
||||
// scroll buttons
|
||||
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,11,4,-1,6,-1 );
|
||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], 331, 371,
|
||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], 331, (SCREEN_HEIGHT - 109),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageUpMapScreenCallback);
|
||||
|
||||
guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,12,5,-1,7,-1 );
|
||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], 331, 452,
|
||||
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], 331, (SCREEN_HEIGHT - 28),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
|
||||
|
||||
@@ -574,7 +579,9 @@ void DrawNameOfLoadedSector( void )
|
||||
GetSectorIDString( sSelMapX, sSelMapY, ( INT8 )( iCurrentMapSectorZ ),sString, TRUE );
|
||||
ReduceStringLength( sString, 80, COMPFONT );
|
||||
|
||||
VarFindFontCenterCoordinates( 548, 426, 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
||||
// WANNE 2
|
||||
//VarFindFontCenterCoordinates( 548, 426, 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
||||
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 92), (SCREEN_HEIGHT - 55), 80, 16, COMPFONT, &sFontX, &sFontY, sString );
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
}
|
||||
|
||||
@@ -917,7 +924,10 @@ void DisplayCompressMode( void )
|
||||
}
|
||||
}
|
||||
|
||||
RestoreExternBackgroundRect( 489, 456, 522 - 489, 467 - 454 );
|
||||
//RestoreExternBackgroundRect( 489, 456, 522 - 489, 467 - 454 );
|
||||
// WANNE 2
|
||||
RestoreExternBackgroundRect( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 63, 13 );
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0,0,SCREEN_WIDTH,SCREEN_HEIGHT, FALSE );
|
||||
SetFont( COMPFONT );
|
||||
|
||||
@@ -942,7 +952,10 @@ void DisplayCompressMode( void )
|
||||
|
||||
SetFontForeground( usColor );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
FindFontCenterCoordinates( 489, 456, 522 - 489, 467 - 454, sString, COMPFONT, &sX, &sY );
|
||||
|
||||
// WANNE 2
|
||||
//FindFontCenterCoordinates( 489, 456, 522 - 489, 467 - 454, sString, COMPFONT, &sX, &sY );
|
||||
FindFontCenterCoordinates( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 33, 13, sString, COMPFONT, &sX, &sY );
|
||||
mprintf( sX, sY, sString );
|
||||
|
||||
|
||||
@@ -952,7 +965,11 @@ void DisplayCompressMode( void )
|
||||
|
||||
void CreateCompressModePause( void )
|
||||
{
|
||||
MSYS_DefineRegion( &gMapPauseRegion, 487, 456, 522, 467, MSYS_PRIORITY_HIGH,
|
||||
/*MSYS_DefineRegion( &gMapPauseRegion, 487, 456, 522, 467, MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );*/
|
||||
|
||||
// WANNE 2
|
||||
MSYS_DefineRegion( &gMapPauseRegion, (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGH,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );
|
||||
|
||||
SetRegionFastHelpText( &gMapPauseRegion, pMapScreenBottomFastHelp[ 7 ] );
|
||||
@@ -1367,17 +1384,21 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
|
||||
|
||||
swprintf( sString, L"%s", pMapScreenBottomText[ 0 ] );
|
||||
|
||||
// WANNE 2
|
||||
// center it
|
||||
VarFindFontCenterCoordinates( 359, 387 - 14, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
//VarFindFontCenterCoordinates( 359, 387 - 14, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
|
||||
swprintf( sString, L"%s", zMarksMapScreenText[ 2 ] );
|
||||
|
||||
// WANNE 2
|
||||
// center it
|
||||
VarFindFontCenterCoordinates( 359, 433 - 14, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
|
||||
//VarFindFontCenterCoordinates( 359, 433 - 14, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
|
||||
@@ -1407,8 +1428,9 @@ void DisplayCurrentBalanceForMapBottom( void )
|
||||
InsertCommasForDollarFigure( sString );
|
||||
InsertDollarSignInToString( sString );
|
||||
|
||||
// WANNE 2
|
||||
// center it
|
||||
VarFindFontCenterCoordinates( 359, 387 + 2, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 91), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
@@ -1436,16 +1458,30 @@ void CreateDestroyMouseRegionMasksForTimeCompressionButtons( void )
|
||||
// check if disabled and not created, create
|
||||
if( ( fDisabled ) && ( fCreated == FALSE ) )
|
||||
{
|
||||
|
||||
// mask over compress more button
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], 528, 456, 528 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], 528, 456, 528 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
//// mask over compress less button
|
||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], 466, 456, 466 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
//// mask over pause game button
|
||||
//MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], 487, 456, 522, 467, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
// WANNE 2
|
||||
// mask over compress more button
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 0 ], (SCREEN_WIDTH - 112), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 112) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
// mask over compress less button
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], 466, 456, 466 + 13, 456 + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 174) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
// mask over pause game button
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], 487, 456, 522, 467, MSYS_PRIORITY_HIGHEST - 1,
|
||||
MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGHEST - 1,
|
||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
|
||||
|
||||
fCreated = TRUE;
|
||||
@@ -1506,7 +1542,8 @@ void DisplayProjectedDailyMineIncome( void )
|
||||
InsertDollarSignInToString( sString );
|
||||
|
||||
// center it
|
||||
VarFindFontCenterCoordinates( 359, 433 + 2, 437 - 359, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
// WANNE 2
|
||||
VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 45), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
|
||||
|
||||
// print it
|
||||
mprintf( sFontX, sFontY, L"%s", sString );
|
||||
@@ -1715,7 +1752,9 @@ void HandleExitsFromMapScreen( void )
|
||||
|
||||
if( gfExtraBuffer )
|
||||
{ //Then initiate the transition animation from the mapscreen to laptop...
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, 640, 480 );
|
||||
|
||||
// WANNE 2
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
gfStartMapScreenToLaptopTransition = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "GameSettings.h"
|
||||
@@ -32,26 +33,30 @@
|
||||
|
||||
extern BOOLEAN SaveWorldItemsToTempItemFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ, UINT32 uiNumberOfItems, WORLDITEM *pData );
|
||||
|
||||
// WANNE 2
|
||||
#define MAP_INV_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
|
||||
//#define MAP_INV_Y_OFFSET (((SCREEN_HEIGHT - 121) -
|
||||
|
||||
// status bar colors
|
||||
#define DESC_STATUS_BAR FROMRGB( 201, 172, 133 )
|
||||
#define DESC_STATUS_BAR_SHADOW FROMRGB( 140, 136, 119 )
|
||||
|
||||
// page display positions
|
||||
#define MAP_INVENTORY_POOL_PAGE_X 506
|
||||
#define MAP_INVENTORY_POOL_PAGE_Y 336
|
||||
#define MAP_INVENTORY_POOL_PAGE_WIDTH 46 //552 - 494
|
||||
#define MAP_INVENTORY_POOL_PAGE_HEIGHT 345 - 332
|
||||
#define MAP_INVENTORY_POOL_PAGE_X (MAP_INV_X_OFFSET + 506)
|
||||
#define MAP_INVENTORY_POOL_PAGE_Y (SCREEN_HEIGHT - 121 - 23) //336
|
||||
#define MAP_INVENTORY_POOL_PAGE_WIDTH 46
|
||||
#define MAP_INVENTORY_POOL_PAGE_HEIGHT 13
|
||||
|
||||
// the number of items
|
||||
#define MAP_INVENTORY_POOL_NUMBER_X 436
|
||||
#define MAP_INVENTORY_POOL_NUMBER_WIDTH 474 - 434
|
||||
#define MAP_INVENTORY_POOL_NUMBER_X (MAP_INV_X_OFFSET + 436)
|
||||
#define MAP_INVENTORY_POOL_NUMBER_WIDTH 40
|
||||
|
||||
// location
|
||||
#define MAP_INVENTORY_POOL_LOC_X 326
|
||||
#define MAP_INVENTORY_POOL_LOC_WIDTH 366 - 326
|
||||
#define MAP_INVENTORY_POOL_LOC_X MAP_INV_X_OFFSET + 326
|
||||
#define MAP_INVENTORY_POOL_LOC_WIDTH 40
|
||||
|
||||
// delay for flash of item
|
||||
#define DELAY_FOR_HIGHLIGHT_ITEM_FLASH 200
|
||||
#define DELAY_FOR_HIGHLIGHT_ITEM_FLASH 200
|
||||
|
||||
// inventory slot font
|
||||
#define MAP_IVEN_FONT SMALLCOMPFONT
|
||||
@@ -73,14 +78,22 @@ extern BOOLEAN SaveWorldItemsToTempItemFile( INT16 sMapX, INT16 sMapY, INT8 bMap
|
||||
#define ITEMDESC_ITEM_STATUS_INV_POOL_OFFSET_Y 22
|
||||
|
||||
// inventory pool slot positions and sizes
|
||||
#define MAP_INVENTORY_POOL_SLOT_START_X 271
|
||||
#define MAP_INVENTORY_POOL_SLOT_START_Y 36
|
||||
#define MAP_INV_SLOT_COLS 9
|
||||
//#define MAP_INVENTORY_POOL_SLOT_START_X 271
|
||||
//#define MAP_INVENTORY_POOL_SLOT_START_Y 36
|
||||
#define MAP_INVEN_SLOT_WIDTH 65
|
||||
#define MAP_INVEN_SPACE_BTWN_SLOTS 72
|
||||
#define MAP_INVEN_SLOT_HEIGHT 32
|
||||
#define MAP_INVEN_SLOT_IMAGE_HEIGHT 24
|
||||
|
||||
// WANNE 2
|
||||
// Number of inventory slots in 1024x768
|
||||
#define MAP_INVENTORY_POOL_MAX_SLOTS 170
|
||||
|
||||
INT32 MAP_INV_SLOT_COLS; // Number of vertical slots
|
||||
INT32 MAP_INVENTORY_POOL_SLOT_COUNT;
|
||||
|
||||
INT32 MAP_INVENTORY_POOL_SLOT_START_X;
|
||||
INT32 MAP_INVENTORY_POOL_SLOT_START_Y;
|
||||
|
||||
// the current highlighted item
|
||||
INT32 iCurrentlyHighLightedItem = -1;
|
||||
@@ -109,9 +122,14 @@ UINT32 uiNumberOfUnSeenItems = 0;
|
||||
|
||||
|
||||
// the inventory slots
|
||||
MOUSE_REGION MapInventoryPoolSlots[ MAP_INVENTORY_POOL_SLOT_COUNT ];
|
||||
// WANNE 2 <new>
|
||||
//MOUSE_REGION MapInventoryPoolSlots[ MAP_INVENTORY_POOL_SLOT_COUNT ];
|
||||
MOUSE_REGION MapInventoryPoolSlots[ MAP_INVENTORY_POOL_MAX_SLOTS ];
|
||||
|
||||
MOUSE_REGION MapInventoryPoolMask;
|
||||
BOOLEAN fMapInventoryItemCompatable[ MAP_INVENTORY_POOL_SLOT_COUNT ];
|
||||
//BOOLEAN fMapInventoryItemCompatable[ MAP_INVENTORY_POOL_SLOT_COUNT ];
|
||||
BOOLEAN fMapInventoryItemCompatable[ MAP_INVENTORY_POOL_MAX_SLOTS ];
|
||||
|
||||
BOOLEAN fChangedInventorySlots = FALSE;
|
||||
|
||||
// the unseen items list...have to save this
|
||||
@@ -201,7 +219,32 @@ BOOLEAN LoadInventoryPoolGraphic( void )
|
||||
|
||||
// load the file
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" );
|
||||
|
||||
// WANNE 2
|
||||
if (iResolution == 0)
|
||||
{
|
||||
MAP_INV_SLOT_COLS = 8;
|
||||
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
|
||||
MAP_INVENTORY_POOL_SLOT_START_X = 269;
|
||||
MAP_INVENTORY_POOL_SLOT_START_Y = 51;
|
||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" );
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
MAP_INV_SLOT_COLS = 11;
|
||||
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
|
||||
MAP_INVENTORY_POOL_SLOT_START_X = 278;
|
||||
MAP_INVENTORY_POOL_SLOT_START_Y = 62;
|
||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_800x600.sti" );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
MAP_INV_SLOT_COLS = 17;
|
||||
MAP_INVENTORY_POOL_SLOT_COUNT = MAP_INVENTORY_POOL_MAX_SLOTS;
|
||||
MAP_INVENTORY_POOL_SLOT_START_X = 282;
|
||||
MAP_INVENTORY_POOL_SLOT_START_Y = 50;
|
||||
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_1024x768.sti" );
|
||||
}
|
||||
|
||||
// add to V-object index
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMapInventoryPoolBackground));
|
||||
@@ -260,6 +303,10 @@ void BlitInventoryPoolGraphic( void )
|
||||
// which buttons will be active and which ones not
|
||||
HandleButtonStatesWhileMapInventoryActive( );
|
||||
|
||||
// WANNE 2
|
||||
// Invalidate
|
||||
RestoreExternBackgroundRect(MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT - 121);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -674,8 +721,13 @@ void CreateMapInventoryPoolSlots( void )
|
||||
INT16 sULX = 0, sULY = 0;
|
||||
INT16 sBRX = 0, sBRY = 0;
|
||||
|
||||
// WANNE 2
|
||||
//MSYS_DefineRegion( &MapInventoryPoolMask,
|
||||
// MAP_INVENTORY_POOL_SLOT_START_X, 0, 640, 360,
|
||||
// MSYS_PRIORITY_HIGH, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapInvenPoolScreenMaskCallback);
|
||||
|
||||
MSYS_DefineRegion( &MapInventoryPoolMask,
|
||||
MAP_INVENTORY_POOL_SLOT_START_X, 0, 640, 360,
|
||||
MAP_INVENTORY_POOL_SLOT_START_X, 0, SCREEN_WIDTH - MAP_INVENTORY_POOL_SLOT_START_X, SCREEN_HEIGHT - 120,
|
||||
MSYS_PRIORITY_HIGH, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MapInvenPoolScreenMaskCallback);
|
||||
|
||||
for( iCounter = 0; iCounter < MAP_INVENTORY_POOL_SLOT_COUNT; iCounter++ )
|
||||
@@ -938,13 +990,13 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
void CreateMapInventoryButtons( void )
|
||||
{
|
||||
guiMapInvenButtonImage[ 0 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" , 10, 1, -1, 3, -1 );
|
||||
guiMapInvenButton[ 0 ] = QuickCreateButton( guiMapInvenButtonImage[ 0 ], 559 , 336,
|
||||
guiMapInvenButton[ 0 ] = QuickCreateButton( guiMapInvenButtonImage[ 0 ], (MAP_INV_X_OFFSET + 559), (SCREEN_HEIGHT - 144),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolNextBtn );
|
||||
|
||||
|
||||
guiMapInvenButtonImage[ 1 ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,9, 0, -1, 2, -1 );
|
||||
guiMapInvenButton[ 1 ] = QuickCreateButton( guiMapInvenButtonImage[ 1 ], 487, 336,
|
||||
guiMapInvenButton[ 1 ] = QuickCreateButton( guiMapInvenButtonImage[ 1 ], (MAP_INV_X_OFFSET + 487), (SCREEN_HEIGHT - 144),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolPrevBtn );
|
||||
|
||||
@@ -1679,7 +1731,7 @@ void DisplayPagesForMapInventoryPool( void )
|
||||
|
||||
mprintf( sX, sY, sString );
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0,0, 640, 480, FALSE );
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
|
||||
}
|
||||
@@ -1752,9 +1804,10 @@ void DrawNumberOfIventoryPoolItems( void )
|
||||
|
||||
void CreateMapInventoryPoolDoneButton( void )
|
||||
{
|
||||
// WANNE 2
|
||||
// create done button
|
||||
guiMapInvenButtonImage[ 2 ]= LoadButtonImage( "INTERFACE\\done_button.sti" , -1, 0, -1, 1, -1 );
|
||||
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], 587 , 333,
|
||||
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], MAP_INV_X_OFFSET + 587 , (SCREEN_HEIGHT - 147),
|
||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolDoneBtn );
|
||||
|
||||
@@ -1831,13 +1884,22 @@ void DrawTextOnMapInventoryBackground( void )
|
||||
// set the buffer
|
||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
////Calculate the height of the string, as it needs to be vertically centered.
|
||||
//usStringHeight = DisplayWrappedString( 268, 342, 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
//DisplayWrappedString( 268, (UINT16)(342 - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
////Calculate the height of the string, as it needs to be vertically centered.
|
||||
//usStringHeight = DisplayWrappedString( 369, 342, 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
//DisplayWrappedString( 369, (UINT16)(342 - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
// WANNE 2
|
||||
//Calculate the height of the string, as it needs to be vertically centered.
|
||||
usStringHeight = DisplayWrappedString( 268, 342, 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
DisplayWrappedString( 268, (UINT16)(342 - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 268, (SCREEN_HEIGHT - 138), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
DisplayWrappedString( MAP_INV_X_OFFSET + 268, (UINT16)((SCREEN_HEIGHT - 138) - (usStringHeight / 2) ), 53, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 0 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
//Calculate the height of the string, as it needs to be vertically centered.
|
||||
usStringHeight = DisplayWrappedString( 369, 342, 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
DisplayWrappedString( 369, (UINT16)(342 - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 369, (SCREEN_HEIGHT - 138), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED | DONT_DISPLAY_TEXT );
|
||||
DisplayWrappedString( MAP_INV_X_OFFSET + 369, (UINT16)((SCREEN_HEIGHT - 138) - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
|
||||
|
||||
DrawTextOnSectorInventory( );
|
||||
|
||||
@@ -1898,7 +1960,9 @@ void DrawTextOnSectorInventory( void )
|
||||
|
||||
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
FindFontCenterCoordinates( MAP_INVENTORY_POOL_SLOT_START_X, MAP_INVENTORY_POOL_SLOT_START_Y - 20, 630 - MAP_INVENTORY_POOL_SLOT_START_X, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||
//FindFontCenterCoordinates( MAP_INV_X_OFFSET + MAP_INVENTORY_POOL_SLOT_START_X, MAP_INVENTORY_POOL_SLOT_START_Y - 20, 630 - MAP_INVENTORY_POOL_SLOT_START_X, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||
|
||||
FindFontCenterCoordinates( 271, 18, SCREEN_WIDTH - 271, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
|
||||
|
||||
SetFont( FONT14ARIAL );
|
||||
SetFontForeground( FONT_WHITE );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifndef _MAP_INTERFACE_MAP_INVEN_H
|
||||
#define _MAP_INTERFACE_MAP_INVEN_H
|
||||
|
||||
@@ -8,7 +9,7 @@
|
||||
#define MAX_DISTANCE_TO_PICKUP_ITEM 5
|
||||
|
||||
// number of inventory slots
|
||||
#define MAP_INVENTORY_POOL_SLOT_COUNT 45
|
||||
//#define MAP_INVENTORY_POOL_SLOT_COUNT 84 //45 //45
|
||||
|
||||
// whether we are showing the inventory pool graphic
|
||||
extern BOOLEAN fShowMapInventoryPool;
|
||||
@@ -52,6 +53,8 @@ extern INT16 sObjectSourceGridNo;
|
||||
extern WORLDITEM *pInventoryPoolList;
|
||||
extern INT32 iCurrentInventoryPoolPage;
|
||||
extern BOOLEAN fMapInventoryItemCompatable[ ];
|
||||
// WANNE 2
|
||||
extern MAP_INVENTORY_POOL_SLOT_COUNT;
|
||||
|
||||
BOOLEAN IsMapScreenWorldItemInvisibleInMapInventory( WORLDITEM *pWorldItem );
|
||||
BOOLEAN IsMapScreenWorldItemVisibleInMapInventory( WORLDITEM *pWorldItem );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "GameSettings.h"
|
||||
@@ -42,7 +43,6 @@
|
||||
#include "GameSettings.h"
|
||||
#endif
|
||||
|
||||
|
||||
// zoom x and y coords for map scrolling
|
||||
INT32 iZoomX = 0;
|
||||
INT32 iZoomY = 0;
|
||||
@@ -74,14 +74,15 @@ INT32 iZoomY = 0;
|
||||
#define VERT_SCROLL 10
|
||||
|
||||
// the pop up for helicopter stuff
|
||||
#define MAP_HELICOPTER_ETA_POPUP_X 400
|
||||
#define MAP_HELICOPTER_ETA_POPUP_Y 250
|
||||
#define MAP_HELICOPTER_UPPER_ETA_POPUP_Y 50
|
||||
#define MAP_HELICOPTER_ETA_POPUP_WIDTH 120
|
||||
#define MAP_HELICOPTER_ETA_POPUP_HEIGHT 68
|
||||
#define MAP_HELICOPTER_ETA_POPUP_X 400
|
||||
#define MAP_HELICOPTER_ETA_POPUP_Y 250
|
||||
#define MAP_HELICOPTER_UPPER_ETA_POPUP_Y 50
|
||||
#define MAP_HELICOPTER_ETA_POPUP_WIDTH 120
|
||||
#define MAP_HELICOPTER_ETA_POPUP_HEIGHT 68
|
||||
|
||||
#define MAP_LEVEL_STRING_X 432
|
||||
#define MAP_LEVEL_STRING_Y 305
|
||||
// WANNE 2
|
||||
#define MAP_LEVEL_STRING_X (SCREEN_WIDTH - 208) //432
|
||||
#define MAP_LEVEL_STRING_Y (SCREEN_HEIGHT - 175) //305
|
||||
|
||||
// font
|
||||
#define MAP_FONT BLOCKFONT2
|
||||
@@ -95,23 +96,25 @@ INT32 iZoomY = 0;
|
||||
|
||||
//Map Location index regions
|
||||
|
||||
// WANNE 2 <change THIS>
|
||||
|
||||
// WANNE 2 (The numbers above the map)
|
||||
// x start of hort index
|
||||
#define MAP_HORT_INDEX_X 292
|
||||
|
||||
#define MAP_HORT_INDEX_X (MAP_BORDER_X + MAP_BORDER_X_OFFSET + 31)//(SCREEN_WIDTH - 348) //292
|
||||
// y position of hort index
|
||||
#define MAP_HORT_INDEX_Y 10
|
||||
|
||||
#define MAP_HORT_INDEX_Y (MAP_BORDER_Y + MAP_BORDER_Y_OFFSET + 8)
|
||||
// height of hort index
|
||||
#define MAP_HORT_HEIGHT GetFontHeight(MAP_FONT)
|
||||
#define MAP_HORT_HEIGHT GetFontHeight(MAP_FONT)
|
||||
|
||||
|
||||
// WANNE 2 (the letters on the left side of the map)
|
||||
// vert index start x
|
||||
#define MAP_VERT_INDEX_X 273
|
||||
|
||||
#define MAP_VERT_INDEX_X (MAP_BORDER_X + MAP_BORDER_X_OFFSET + 13) //(SCREEN_WIDTH - 367) // 273
|
||||
// vert index start y
|
||||
#define MAP_VERT_INDEX_Y 31
|
||||
|
||||
#define MAP_VERT_INDEX_Y (MAP_BORDER_Y + MAP_BORDER_Y_OFFSET + 29)
|
||||
// vert width
|
||||
#define MAP_VERT_WIDTH GetFontHeight(MAP_FONT)
|
||||
#define MAP_VERT_WIDTH GetFontHeight(MAP_FONT)
|
||||
|
||||
|
||||
// "Boxes" Icons
|
||||
#define SMALL_YELLOW_BOX 0
|
||||
@@ -414,6 +417,7 @@ INT16 gpSamSectorX[] = { SAM_1_X, SAM_2_X, SAM_3_X, SAM_4_X };
|
||||
INT16 gpSamSectorY[] = { SAM_1_Y, SAM_2_Y, SAM_3_Y, SAM_4_Y };
|
||||
|
||||
|
||||
// WANNE 2 (reinitialization in "DrawMap()")
|
||||
// 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};
|
||||
|
||||
@@ -680,6 +684,17 @@ UINT32 DrawMap( void )
|
||||
INT16 cnt, cnt2;
|
||||
INT32 iCounter = 0;
|
||||
|
||||
// WANNE 2 <initialization>
|
||||
//MAP_VIEW_START_X = (SCREEN_WIDTH - 370);
|
||||
//MAP_VIEW_START_Y = 10;
|
||||
|
||||
MapScreenRect.iLeft = MAP_VIEW_START_X+MAP_GRID_X - 2;
|
||||
MapScreenRect.iTop = MAP_VIEW_START_Y+MAP_GRID_Y - 1;
|
||||
MapScreenRect.iRight = MAP_VIEW_START_X + MAP_VIEW_WIDTH - 1 + MAP_GRID_X;
|
||||
MapScreenRect.iBottom = MAP_VIEW_START_Y+MAP_VIEW_HEIGHT-10+MAP_GRID_Y;
|
||||
|
||||
//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};
|
||||
|
||||
if( !iCurrentMapSectorZ )
|
||||
{
|
||||
pDestBuf = (UINT16*)LockVideoSurface( guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
@@ -879,7 +894,8 @@ UINT32 DrawMap( void )
|
||||
|
||||
DisplayLevelString( );
|
||||
|
||||
//RestoreClipRegionToFullScreen( );
|
||||
// WANNE 2 <incommented>
|
||||
RestoreClipRegionToFullScreen( );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -3961,7 +3977,10 @@ void ClipBlitsToMapViewRegionForRectangleAndABit( UINT32 uiDestPitchBYTES )
|
||||
void RestoreClipRegionToFullScreenForRectangle( UINT32 uiDestPitchBYTES )
|
||||
{
|
||||
// clip blits to map view region
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
|
||||
//SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
|
||||
|
||||
// WANNE 2
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -4396,8 +4415,8 @@ void DisplayPositionOfHelicopter( void )
|
||||
CHAR16 sString[ 4 ];
|
||||
|
||||
|
||||
AssertMsg( ( sOldMapX >= 0 ) && ( sOldMapX < 640 ), String( "DisplayPositionOfHelicopter: Invalid sOldMapX = %d", sOldMapX ) );
|
||||
AssertMsg( ( sOldMapY >= 0 ) && ( sOldMapY < 480 ), String( "DisplayPositionOfHelicopter: Invalid sOldMapY = %d", sOldMapY ) );
|
||||
AssertMsg( ( sOldMapX >= 0 ) && ( sOldMapX < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid sOldMapX = %d", sOldMapX ) );
|
||||
AssertMsg( ( sOldMapY >= 0 ) && ( sOldMapY < SCREEN_HEIGHT ), String( "DisplayPositionOfHelicopter: Invalid sOldMapY = %d", sOldMapY ) );
|
||||
|
||||
// restore background on map where it is
|
||||
if( sOldMapX != 0 )
|
||||
@@ -4471,10 +4490,11 @@ void DisplayPositionOfHelicopter( void )
|
||||
}
|
||||
*/
|
||||
|
||||
AssertMsg( ( minX >= 0 ) && ( minX < 640 ), String( "DisplayPositionOfHelicopter: Invalid minX = %d", minX ) );
|
||||
AssertMsg( ( maxX >= 0 ) && ( maxX < 640 ), String( "DisplayPositionOfHelicopter: Invalid maxX = %d", maxX ) );
|
||||
AssertMsg( ( minY >= 0 ) && ( minY < 640 ), String( "DisplayPositionOfHelicopter: Invalid minY = %d", minY ) );
|
||||
AssertMsg( ( maxY >= 0 ) && ( maxY < 640 ), String( "DisplayPositionOfHelicopter: Invalid maxY = %d", maxY ) );
|
||||
// WANNE 2
|
||||
AssertMsg( ( minX >= 0 ) && ( minX < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid minX = %d", minX ) );
|
||||
AssertMsg( ( maxX >= 0 ) && ( maxX < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid maxX = %d", maxX ) );
|
||||
AssertMsg( ( minY >= 0 ) && ( minY < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid minY = %d", minY ) );
|
||||
AssertMsg( ( maxY >= 0 ) && ( maxY < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid maxY = %d", maxY ) );
|
||||
|
||||
// IMPORTANT: Since min can easily be larger than max, we gotta cast to as signed value
|
||||
x = ( UINT32 )( minX + flRatio * ( ( INT16 ) maxX - ( INT16 ) minX ) );
|
||||
@@ -4494,10 +4514,11 @@ void DisplayPositionOfHelicopter( void )
|
||||
}
|
||||
|
||||
|
||||
AssertMsg( ( x >= 0 ) && ( x < 640 ), String( "DisplayPositionOfHelicopter: Invalid x = %d. At %d,%d. Next %d,%d. Min/Max X = %d/%d",
|
||||
// WANNE 2
|
||||
AssertMsg( ( x >= 0 ) && ( x < SCREEN_WIDTH ), String( "DisplayPositionOfHelicopter: Invalid x = %d. At %d,%d. Next %d,%d. Min/Max X = %d/%d",
|
||||
x, pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubNextX, pGroup->ubNextY, minX, maxX ) );
|
||||
|
||||
AssertMsg( ( y >= 0 ) && ( y < 480 ), String( "DisplayPositionOfHelicopter: Invalid y = %d. At %d,%d. Next %d,%d. Min/Max Y = %d/%d",
|
||||
AssertMsg( ( y >= 0 ) && ( y < SCREEN_HEIGHT ), String( "DisplayPositionOfHelicopter: Invalid y = %d. At %d,%d. Next %d,%d. Min/Max Y = %d/%d",
|
||||
y, pGroup->ubSectorX, pGroup->ubSectorY, pGroup->ubNextX, pGroup->ubNextY, minY, maxY ) );
|
||||
|
||||
|
||||
@@ -4540,8 +4561,9 @@ void DisplayDestinationOfHelicopter( void )
|
||||
HVOBJECT hHandle;
|
||||
|
||||
|
||||
AssertMsg( ( sOldMapX >= 0 ) && ( sOldMapX < 640 ), String( "DisplayDestinationOfHelicopter: Invalid sOldMapX = %d", sOldMapX ) );
|
||||
AssertMsg( ( sOldMapY >= 0 ) && ( sOldMapY < 480 ), String( "DisplayDestinationOfHelicopter: Invalid sOldMapY = %d", sOldMapY ) );
|
||||
// WANNE 2
|
||||
AssertMsg( ( sOldMapX >= 0 ) && ( sOldMapX < SCREEN_WIDTH ), String( "DisplayDestinationOfHelicopter: Invalid sOldMapX = %d", sOldMapX ) );
|
||||
AssertMsg( ( sOldMapY >= 0 ) && ( sOldMapY < SCREEN_HEIGHT ), String( "DisplayDestinationOfHelicopter: Invalid sOldMapY = %d", sOldMapY ) );
|
||||
|
||||
// restore background on map where it is
|
||||
if( sOldMapX != 0 )
|
||||
@@ -4561,8 +4583,9 @@ void DisplayDestinationOfHelicopter( void )
|
||||
x = MAP_VIEW_START_X + ( MAP_GRID_X * sMapX ) + 1;
|
||||
y = MAP_VIEW_START_Y + ( MAP_GRID_Y * sMapY ) + 3;
|
||||
|
||||
AssertMsg( ( x >= 0 ) && ( x < 640 ), String( "DisplayDestinationOfHelicopter: Invalid x = %d. Dest %d,%d", x, sMapX, sMapY ) );
|
||||
AssertMsg( ( y >= 0 ) && ( y < 480 ), String( "DisplayDestinationOfHelicopter: Invalid y = %d. Dest %d,%d", y, sMapX, sMapY ) );
|
||||
// WANNE 2
|
||||
AssertMsg( ( x >= 0 ) && ( x < SCREEN_WIDTH ), String( "DisplayDestinationOfHelicopter: Invalid x = %d. Dest %d,%d", x, sMapX, sMapY ) );
|
||||
AssertMsg( ( y >= 0 ) && ( y < SCREEN_HEIGHT ), String( "DisplayDestinationOfHelicopter: Invalid y = %d. Dest %d,%d", y, sMapX, sMapY ) );
|
||||
|
||||
// clip blits to mapscreen region
|
||||
ClipBlitsToMapViewRegion( );
|
||||
@@ -5006,6 +5029,7 @@ void DisplayLevelString( void )
|
||||
SetFontBackground( FONT_BLACK );
|
||||
swprintf( sString, L"%s %d", sMapLevelString[ 0 ], iCurrentMapSectorZ );
|
||||
|
||||
// WANNE 2
|
||||
mprintf( MAP_LEVEL_STRING_X, MAP_LEVEL_STRING_Y, sString );
|
||||
|
||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifndef _MAP_SCREEN_INTERFACE_MAP_H
|
||||
#define _MAP_SCREEN_INTERFACE_MAP_H
|
||||
|
||||
@@ -155,12 +156,29 @@ enum {
|
||||
#define SOUTH_ZOOM_BOUND 324
|
||||
#define NORTH_ZOOM_BOUND 36
|
||||
|
||||
// WANNE 2 <change THIS>
|
||||
// WANNE 2 (the starting top/left position of the background image
|
||||
#define MAP_BORDER_X 261
|
||||
#define MAP_BORDER_Y 0
|
||||
|
||||
|
||||
// WANNE 2 <change THIS>
|
||||
// WANNE 2 (the offset of the map border)
|
||||
#define MAP_BORDER_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
|
||||
#define MAP_BORDER_Y_OFFSET (((SCREEN_HEIGHT - 121) - 360) / 2)
|
||||
|
||||
// WANNE 2 <THE MAP IMAGE PCX>
|
||||
// map view region
|
||||
#define MAP_VIEW_START_X 270
|
||||
#define MAP_VIEW_START_Y 10
|
||||
#define MAP_VIEW_START_X (MAP_BORDER_X + MAP_BORDER_X_OFFSET + 9)
|
||||
#define MAP_VIEW_START_Y (MAP_BORDER_Y + MAP_BORDER_Y_OFFSET + 10)
|
||||
#define MAP_VIEW_WIDTH 336
|
||||
#define MAP_VIEW_HEIGHT 298
|
||||
|
||||
//#define MAP_VIEW_START_X 270
|
||||
//#define MAP_VIEW_START_Y 10
|
||||
//#define MAP_VIEW_WIDTH 336
|
||||
//#define MAP_VIEW_HEIGHT 298
|
||||
|
||||
// zoomed in grid sizes
|
||||
#define MAP_GRID_ZOOM_X MAP_GRID_X*2
|
||||
#define MAP_GRID_ZOOM_Y MAP_GRID_Y*2
|
||||
@@ -191,6 +209,9 @@ enum {
|
||||
// wait time until temp path is drawn, from placing cursor on a map grid
|
||||
#define MIN_WAIT_TIME_FOR_TEMP_PATH 200
|
||||
|
||||
//extern INT32 MAP_VIEW_START_X;
|
||||
//extern INT32 MAP_VIEW_START_Y;
|
||||
|
||||
|
||||
// zoom UL coords
|
||||
extern INT32 iZoomX;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#else
|
||||
@@ -40,8 +41,8 @@
|
||||
#endif
|
||||
|
||||
// inventory pool position on screen
|
||||
#define MAP_INVEN_POOL_X 300
|
||||
#define MAP_INVEN_POOL_Y 300
|
||||
#define MAP_INVEN_POOL_X 300
|
||||
#define MAP_INVEN_POOL_Y 300
|
||||
|
||||
// the number of help region messages
|
||||
#define NUMBER_OF_MAPSCREEN_HELP_MESSAGES 5
|
||||
@@ -49,7 +50,8 @@
|
||||
// number of LINKED LISTS for sets of leave items (each slot holds an unlimited # of items)
|
||||
#define NUM_LEAVE_LIST_SLOTS 20
|
||||
|
||||
#define SELECTED_CHAR_ARROW_X 8
|
||||
// WANNE 2 <change 2>
|
||||
#define SELECTED_CHAR_ARROW_X 1 //8
|
||||
|
||||
#define SIZE_OF_UPDATE_BOX 20
|
||||
|
||||
@@ -89,6 +91,8 @@ enum{
|
||||
OTHER_REGION,
|
||||
};
|
||||
|
||||
// WANNE 2
|
||||
UINT16 usVehicleY = 0;
|
||||
|
||||
// waiting list for update box
|
||||
INT32 iUpdateBoxWaitingList[ MAX_CHARACTER_COUNT ];
|
||||
@@ -1141,7 +1145,8 @@ INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, INT16 *zString, UINT32 uiExitScree
|
||||
|
||||
INT32 DoMapMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||
{
|
||||
SGPRect CenteringRect= {0, 0, 640, INV_INTERFACE_START_Y };
|
||||
// WANNE 2
|
||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
|
||||
|
||||
// reset the highlighted line
|
||||
giHighLine = -1;
|
||||
@@ -1272,6 +1277,8 @@ void HandleDisplayOfSelectedMercArrows( void )
|
||||
INT16 sYPosition = 0;
|
||||
HVOBJECT hHandle;
|
||||
UINT8 ubCount = 0;
|
||||
INT16 usVehicleCount = 0;
|
||||
|
||||
// blit an arrow by the name of each merc in a selected list
|
||||
if( bSelectedInfoChar == -1 )
|
||||
{
|
||||
@@ -1294,7 +1301,9 @@ void HandleDisplayOfSelectedMercArrows( void )
|
||||
|
||||
if( bSelectedInfoChar >= FIRST_VEHICLE )
|
||||
{
|
||||
sYPosition += 6;
|
||||
// WANNE 2 <fixed>
|
||||
usVehicleCount = bSelectedInfoChar - FIRST_VEHICLE;
|
||||
sYPosition = usVehicleY+( usVehicleCount * ( Y_SIZE + 2) ) - 1;;
|
||||
}
|
||||
|
||||
|
||||
@@ -1311,9 +1320,12 @@ void HandleDisplayOfSelectedMercArrows( void )
|
||||
if( ( IsEntryInSelectedListSet( ubCount ) == TRUE ) || ( ( bSelectedDestChar != - 1 ) ? ( ( Menptr[ gCharactersList[ ubCount ].usSolID ].ubGroupID != 0 ) ? ( Menptr[ gCharactersList[ bSelectedDestChar ].usSolID ].ubGroupID == Menptr[ gCharactersList[ ubCount ].usSolID ].ubGroupID ) : FALSE ) : FALSE ) )
|
||||
{
|
||||
sYPosition = Y_START+( ubCount * ( Y_SIZE + 2) ) - 1;
|
||||
|
||||
if( ubCount >= FIRST_VEHICLE )
|
||||
{
|
||||
sYPosition += 6;
|
||||
// WANNE 2 <fixed>
|
||||
usVehicleCount = ubCount - FIRST_VEHICLE;
|
||||
sYPosition = usVehicleY+( usVehicleCount * ( Y_SIZE + 2) ) - 1;;
|
||||
}
|
||||
|
||||
GetVideoObject( &hHandle, guiSelectedCharArrow );
|
||||
@@ -4758,17 +4770,12 @@ void DisplaySoldierUpdateBox( )
|
||||
|
||||
iUpdatePanelHeight = ( iNumberHigh + 1 ) * TACT_HEIGHT_OF_UPDATE_PANEL_BLOCKS;
|
||||
|
||||
// get the x,y offsets on the screen of the panel
|
||||
iX = 290 + ( 336 - iUpdatePanelWidth ) / 2;
|
||||
|
||||
// iY = 28 + ( 288 - iUpdatePanelHeight ) / 2;
|
||||
|
||||
// Have the bottom of the box ALWAYS a set distance from the bottom of the map ( so user doesnt have to move mouse far )
|
||||
iY = 280 - iUpdatePanelHeight;
|
||||
// WANNE 2
|
||||
iX = (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2)) - (iUpdatePanelWidth / 2);
|
||||
iY = (MAP_BORDER_Y + ((SCREEN_HEIGHT - 121) / 2)) - (iUpdatePanelHeight / 2);
|
||||
|
||||
GetVideoObject( &hBackGroundHandle, guiUpdatePanelTactical );
|
||||
|
||||
|
||||
//Display the 2 TOP corner pieces
|
||||
BltVideoObject( guiSAVEBUFFER, hBackGroundHandle, 0, iX-4, iY - 4 , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
BltVideoObject( guiSAVEBUFFER, hBackGroundHandle, 2, iX+iUpdatePanelWidth, iY - 4 , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
@@ -4864,6 +4871,7 @@ void DisplaySoldierUpdateBox( )
|
||||
}
|
||||
|
||||
|
||||
// WANNE 2
|
||||
//Display the reason for the update box
|
||||
if( fFourWideMode )
|
||||
{
|
||||
@@ -4887,6 +4895,7 @@ void DisplaySoldierUpdateBox( )
|
||||
}
|
||||
|
||||
|
||||
// WANNE 2
|
||||
void CreateDestroyUpdatePanelButtons(INT32 iX, INT32 iY, BOOLEAN fFourWideMode )
|
||||
{
|
||||
static BOOLEAN fCreated = FALSE;
|
||||
@@ -6435,7 +6444,6 @@ void HandleBlitOfSectorLocatorIcon( INT16 sSectorX, INT16 sSectorY, INT16 sSecto
|
||||
|
||||
// invalidate region on frame buffer
|
||||
InvalidateRegion( sScreenX, sScreenY - 1, sScreenX + MAP_GRID_X , sScreenY + MAP_GRID_Y );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ typedef struct FASTHELPREGION {
|
||||
#define MAP_SCREEN_FONT BLOCKFONT2
|
||||
|
||||
// characterlist regions
|
||||
#define Y_START 146
|
||||
#define Y_START 135 //146
|
||||
#define MAP_START_KEYRING_Y 107
|
||||
#define Y_SIZE GetFontHeight(MAP_SCREEN_FONT)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,606 @@
|
||||
#ifndef MAP_SCREEN_INTERFACE_H
|
||||
#define MAP_SCREEN_INTERFACE_H
|
||||
|
||||
|
||||
#include "Types.h"
|
||||
#include "Soldier Control.h"
|
||||
#include "MessageBoxScreen.h"
|
||||
|
||||
|
||||
|
||||
typedef struct FASTHELPREGION {
|
||||
// the string
|
||||
CHAR16 FastHelpText[ 256 ];
|
||||
|
||||
// the x and y position values
|
||||
INT32 iX;
|
||||
INT32 iY;
|
||||
INT32 iW;
|
||||
|
||||
} FASTHELPREGION;
|
||||
|
||||
|
||||
// String Lengths Defines
|
||||
#define MAX_NAME_LENGTH 10
|
||||
#define MAX_LOCATION_SIZE 8
|
||||
#define MAX_DESTETA_SIZE 8
|
||||
#define MAX_ASSIGN_SIZE 10
|
||||
#define MAX_TIME_REMAINING_SIZE 8
|
||||
|
||||
|
||||
// char breath and life position
|
||||
#define BAR_INFO_X 66
|
||||
#define BAR_INFO_Y 61
|
||||
|
||||
// merc icon position
|
||||
#define CHAR_ICON_CONTRACT_Y 64
|
||||
#define CHAR_ICON_X 187
|
||||
#define CHAR_ICON_WIDTH 10
|
||||
#define CHAR_ICON_HEIGHT 10
|
||||
#define CHAR_ICON_SPACING 13
|
||||
|
||||
// max number of characters and vehicles
|
||||
//Character List Length
|
||||
#define MAX_CHARACTER_COUNT 20
|
||||
#define MAX_VEHICLE_COUNT 20
|
||||
|
||||
// map screen font
|
||||
#define MAP_SCREEN_FONT BLOCKFONT2
|
||||
|
||||
// characterlist regions
|
||||
#define Y_START 135 //146
|
||||
#define MAP_START_KEYRING_Y 107
|
||||
#define Y_SIZE GetFontHeight(MAP_SCREEN_FONT)
|
||||
|
||||
|
||||
// attribute menu defines (must match NUM_TRAINABLE_STATS defines, and pAttributeMenuStrings )
|
||||
enum {
|
||||
ATTRIB_MENU_STR=0,
|
||||
ATTRIB_MENU_DEX,
|
||||
ATTRIB_MENU_AGI,
|
||||
ATTRIB_MENU_HEA,
|
||||
ATTRIB_MENU_MARK,
|
||||
ATTRIB_MENU_MED,
|
||||
ATTRIB_MENU_MECH,
|
||||
ATTRIB_MENU_LEAD,
|
||||
ATTRIB_MENU_EXPLOS,
|
||||
ATTRIB_MENU_CANCEL,
|
||||
MAX_ATTRIBUTE_STRING_COUNT,
|
||||
};
|
||||
|
||||
// the epc assignment menu
|
||||
enum{
|
||||
EPC_MENU_ON_DUTY = 0,
|
||||
EPC_MENU_PATIENT,
|
||||
EPC_MENU_VEHICLE,
|
||||
EPC_MENU_REMOVE,
|
||||
EPC_MENU_CANCEL,
|
||||
MAX_EPC_MENU_STRING_COUNT,
|
||||
};
|
||||
|
||||
// assignment menu defines
|
||||
enum {
|
||||
ASSIGN_MENU_ON_DUTY=0,
|
||||
ASSIGN_MENU_DOCTOR,
|
||||
ASSIGN_MENU_PATIENT,
|
||||
ASSIGN_MENU_VEHICLE,
|
||||
ASSIGN_MENU_REPAIR,
|
||||
ASSIGN_MENU_TRAIN,
|
||||
ASSIGN_MENU_CANCEL,
|
||||
MAX_ASSIGN_STRING_COUNT,
|
||||
};
|
||||
|
||||
|
||||
// training assignment menu defines
|
||||
enum {
|
||||
TRAIN_MENU_SELF,
|
||||
TRAIN_MENU_TOWN,
|
||||
TRAIN_MENU_TEAMMATES,
|
||||
TRAIN_MENU_TRAIN_BY_OTHER,
|
||||
TRAIN_MENU_CANCEL,
|
||||
MAX_TRAIN_STRING_COUNT,
|
||||
};
|
||||
|
||||
|
||||
// the remove merc from team pop up box strings
|
||||
enum{
|
||||
REMOVE_MERC = 0,
|
||||
REMOVE_MERC_CANCEL,
|
||||
MAX_REMOVE_MERC_COUNT,
|
||||
};
|
||||
|
||||
|
||||
// squad menu defines
|
||||
enum{
|
||||
SQUAD_MENU_1,
|
||||
SQUAD_MENU_2,
|
||||
SQUAD_MENU_3,
|
||||
SQUAD_MENU_4,
|
||||
SQUAD_MENU_5,
|
||||
SQUAD_MENU_6,
|
||||
SQUAD_MENU_7,
|
||||
SQUAD_MENU_8,
|
||||
SQUAD_MENU_9,
|
||||
SQUAD_MENU_10,
|
||||
SQUAD_MENU_11,
|
||||
SQUAD_MENU_12,
|
||||
SQUAD_MENU_13,
|
||||
SQUAD_MENU_14,
|
||||
SQUAD_MENU_15,
|
||||
SQUAD_MENU_16,
|
||||
SQUAD_MENU_17,
|
||||
SQUAD_MENU_18,
|
||||
SQUAD_MENU_19,
|
||||
SQUAD_MENU_20,
|
||||
SQUAD_MENU_CANCEL,
|
||||
MAX_SQUAD_MENU_STRING_COUNT,
|
||||
};
|
||||
|
||||
|
||||
// contract menu defines
|
||||
enum{
|
||||
CONTRACT_MENU_CURRENT_FUNDS = 0,
|
||||
CONTRACT_MENU_SPACE,
|
||||
CONTRACT_MENU_DAY,
|
||||
CONTRACT_MENU_WEEK,
|
||||
CONTRACT_MENU_TWO_WEEKS,
|
||||
CONTRACT_MENU_TERMINATE,
|
||||
CONTRACT_MENU_CANCEL,
|
||||
MAX_CONTRACT_MENU_STRING_COUNT,
|
||||
};
|
||||
|
||||
// enums for pre battle interface pop ups
|
||||
enum
|
||||
{
|
||||
ASSIGNMENT_POPUP,
|
||||
DESTINATION_POPUP,
|
||||
CONTRACT_POPUP
|
||||
};
|
||||
|
||||
|
||||
enum{
|
||||
NO_REASON_FOR_UPDATE = 0,
|
||||
CONTRACT_FINISHED_FOR_UPDATE,
|
||||
ASSIGNMENT_FINISHED_FOR_UPDATE,
|
||||
ASSIGNMENT_RETURNING_FOR_UPDATE,
|
||||
ASLEEP_GOING_AUTO_FOR_UPDATE,
|
||||
CONTRACT_EXPIRE_WARNING_REASON,
|
||||
};
|
||||
|
||||
|
||||
enum{
|
||||
START_RED_SECTOR_LOCATOR = 0,
|
||||
STOP_RED_SECTOR_LOCATOR,
|
||||
START_YELLOW_SECTOR_LOCATOR,
|
||||
STOP_YELLOW_SECTOR_LOCATOR,
|
||||
};
|
||||
|
||||
|
||||
// dimensions and offset for merc update box
|
||||
#define UPDATE_MERC_FACE_X_WIDTH 50
|
||||
#define UPDATE_MERC_FACE_X_HEIGHT 50
|
||||
#define UPDATE_MERC_FACE_X_OFFSET 2
|
||||
#define UPDATE_MERC_FACE_Y_OFFSET 2
|
||||
#define WIDTH_OF_UPDATE_PANEL_BLOCKS 50
|
||||
#define HEIGHT_OF_UPDATE_PANEL_BLOCKS 50
|
||||
#define UPDATE_MERC_Y_OFFSET 4
|
||||
#define UPDATE_MERC_X_OFFSET 4
|
||||
|
||||
|
||||
// dimensions and offset for merc update box
|
||||
#define TACT_UPDATE_MERC_FACE_X_WIDTH 70
|
||||
#define TACT_UPDATE_MERC_FACE_X_HEIGHT 49
|
||||
#define TACT_UPDATE_MERC_FACE_X_OFFSET 8
|
||||
#define TACT_UPDATE_MERC_FACE_Y_OFFSET 6
|
||||
#define TACT_WIDTH_OF_UPDATE_PANEL_BLOCKS 70
|
||||
#define TACT_HEIGHT_OF_UPDATE_PANEL_BLOCKS 49
|
||||
#define TACT_UPDATE_MERC_Y_OFFSET 4
|
||||
#define TACT_UPDATE_MERC_X_OFFSET 4
|
||||
|
||||
|
||||
// the first vehicle slot int he list
|
||||
#define FIRST_VEHICLE 18
|
||||
|
||||
typedef struct MERC_LEAVE_ITEM{
|
||||
OBJECTTYPE o;
|
||||
struct MERC_LEAVE_ITEM *pNext;
|
||||
}MERC_LEAVE_ITEM;
|
||||
|
||||
extern BOOLEAN fShowAssignmentMenu;
|
||||
extern BOOLEAN fShowTrainingMenu ;
|
||||
extern BOOLEAN fShowAttributeMenu;
|
||||
extern BOOLEAN fShowSquadMenu ;
|
||||
extern BOOLEAN fShowContractMenu ;
|
||||
extern BOOLEAN fShowRemoveMenu ;
|
||||
|
||||
extern BOOLEAN fFirstTimeInMapScreen;
|
||||
extern BOOLEAN fLockOutMapScreenInterface;
|
||||
|
||||
// The character data structure
|
||||
typedef struct {
|
||||
|
||||
UINT16 usSolID;// soldier ID in MenPtrs
|
||||
BOOLEAN fValid;// is the current soldier a valid soldier
|
||||
|
||||
} MapScreenCharacterSt;
|
||||
|
||||
|
||||
// map screen character structure list, contrains soldier ids into menptr
|
||||
extern MapScreenCharacterSt gCharactersList[ ];
|
||||
|
||||
extern BOOLEAN fShowMapScreenHelpText;
|
||||
|
||||
|
||||
// map inventory pool inited
|
||||
extern BOOLEAN fMapInventoryPoolInited;
|
||||
|
||||
// highlighted lines
|
||||
extern INT32 giHighLine;
|
||||
extern INT32 giAssignHighLine;
|
||||
extern INT32 giDestHighLine;
|
||||
extern INT32 giContractHighLine;
|
||||
extern INT32 giSleepHighLine;
|
||||
|
||||
extern UINT32 guiUpdatePanel;
|
||||
extern UINT32 guiUpdatePanelTactical;
|
||||
extern BOOLEAN fShowUpdateBox;
|
||||
|
||||
extern SGPRect ContractDimensions;
|
||||
extern SGPPoint ContractPosition;
|
||||
extern SGPRect AttributeDimensions;
|
||||
extern SGPPoint AttributePosition;
|
||||
extern SGPRect TrainDimensions;
|
||||
extern SGPPoint TrainPosition;
|
||||
extern SGPRect VehicleDimensions;
|
||||
extern SGPPoint VehiclePosition;
|
||||
extern SGPRect AssignmentDimensions ;
|
||||
extern SGPPoint AssignmentPosition ;
|
||||
extern SGPPoint SquadPosition ;
|
||||
extern SGPRect SquadDimensions ;
|
||||
|
||||
extern SGPPoint RepairPosition;
|
||||
extern SGPRect RepairDimensions;
|
||||
|
||||
extern SGPPoint OrigContractPosition;
|
||||
extern SGPPoint OrigAttributePosition;
|
||||
extern SGPPoint OrigSquadPosition ;
|
||||
extern SGPPoint OrigAssignmentPosition ;
|
||||
extern SGPPoint OrigTrainPosition;
|
||||
extern SGPPoint OrigVehiclePosition;
|
||||
|
||||
// disble team info panel due to showing of battle roster
|
||||
extern BOOLEAN fDisableDueToBattleRoster;
|
||||
|
||||
extern BOOLEAN gfAtLeastOneMercWasHired;
|
||||
|
||||
// curtrent map sector z that is being displayed in the mapscreen
|
||||
extern INT32 iCurrentMapSectorZ;
|
||||
|
||||
// y position of the pop up box
|
||||
extern INT32 giBoxY;
|
||||
|
||||
// pop up box textures
|
||||
extern UINT32 guiPOPUPTEX;
|
||||
extern UINT32 guiPOPUPBORDERS;
|
||||
|
||||
// the level-changing markers on the map border
|
||||
extern UINT32 guiLEVELMARKER;
|
||||
|
||||
// the currently selected character arrow
|
||||
extern UINT32 guiSelectedCharArrow;
|
||||
|
||||
// sam and mine icons
|
||||
extern UINT32 guiSAMICON;
|
||||
|
||||
extern BOOLEAN fShowMapScreenMovementList;
|
||||
|
||||
// do we need to rebuild the mapscreen characterlist?
|
||||
extern BOOLEAN fReBuildCharacterList;
|
||||
|
||||
// restore glow rotation in contract region glow boxes
|
||||
extern BOOLEAN fResetContractGlow;
|
||||
|
||||
// init vehicle and characters list
|
||||
void InitalizeVehicleAndCharacterList( void );
|
||||
|
||||
// set this entry to as selected
|
||||
void SetEntryInSelectedCharacterList( INT8 bEntry );
|
||||
// set this entry to as unselected
|
||||
void ResetEntryForSelectedList( INT8 bEntry );
|
||||
|
||||
// reset selected list
|
||||
void ResetSelectedListForMapScreen( );
|
||||
|
||||
// build a selected list from a to b, inclusive
|
||||
void BuildSelectedListFromAToB( INT8 bA, INT8 bB );
|
||||
|
||||
// isa this entry int he selected character list set?
|
||||
BOOLEAN IsEntryInSelectedListSet( INT8 bEntry );
|
||||
|
||||
// is there more than one person selected?
|
||||
BOOLEAN MultipleCharacterListEntriesSelected( void );
|
||||
|
||||
// toggle this entry on or off
|
||||
void ToggleEntryInSelectedList( INT8 bEntry );
|
||||
|
||||
// reset assignments for mercs on selected list who have this assignment
|
||||
void ResetAssignmentsForMercsTrainingUnpaidSectorsInSelectedList( INT8 bAssignment );
|
||||
|
||||
/*
|
||||
// plot path for selected character list
|
||||
void PlotPathForSelectedCharacterList( INT16 sX, INT16 sY );
|
||||
*/
|
||||
|
||||
void RestoreBackgroundForAssignmentGlowRegionList( void );
|
||||
void RestoreBackgroundForDestinationGlowRegionList( void );
|
||||
void RestoreBackgroundForContractGlowRegionList( void );
|
||||
void RestoreBackgroundForSleepGlowRegionList( void );
|
||||
|
||||
// play click when we are entering a glow region
|
||||
void PlayGlowRegionSound( void );
|
||||
|
||||
// is this character in the action of plotting a path?
|
||||
INT16 CharacterIsGettingPathPlotted( INT16 sCharNumber );
|
||||
|
||||
// disable team info panels
|
||||
void DisableTeamInfoPanels( void );
|
||||
|
||||
// enable team info panels
|
||||
void EnableTeamInfoPanels( void );
|
||||
|
||||
// activate pop up for soldiers in the pre battle interface
|
||||
void ActivateSoldierPopup( SOLDIERTYPE *pSoldier, UINT8 ubPopupType, INT16 xp, INT16 yp );
|
||||
|
||||
// do mapscreen message box
|
||||
INT32 DoMapMessageBox( UINT8 ubStyle, INT16 * zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback );
|
||||
|
||||
// hop up one leve,l int he map screen level interface
|
||||
void GoUpOneLevelInMap( void );
|
||||
|
||||
// go down one level in the mapscreen map interface
|
||||
void GoDownOneLevelInMap( void );
|
||||
|
||||
// jump to this level on the map
|
||||
void JumpToLevel( INT32 iLevel );
|
||||
|
||||
// check to see if we need to update the screen
|
||||
void CheckAndUpdateBasedOnContractTimes( void );
|
||||
|
||||
// check if are just about to display this pop up or stopping display
|
||||
void HandleDisplayOfItemPopUpForSector( INT16 sMapX, INT16 sMapY, INT16 sMapZ );
|
||||
|
||||
// display red arrow by name of selected merc
|
||||
void HandleDisplayOfSelectedMercArrows( void );
|
||||
|
||||
// check which guys can move with this guy
|
||||
void DeselectSelectedListMercsWhoCantMoveWithThisGuy( SOLDIERTYPE *pSoldier );
|
||||
|
||||
// get morale string for this grunt given this morale level
|
||||
void GetMoraleString( SOLDIERTYPE *pSoldier, STR16 sString );
|
||||
|
||||
// handle leaving of equipment in sector
|
||||
void HandleLeavingOfEquipmentInCurrentSector( UINT32 uiMercId );
|
||||
|
||||
// set up a linked list of items being dropped and post an event to later drop them
|
||||
void HandleMercLeavingEquipmentInDrassen( UINT32 uiMercId );
|
||||
void HandleMercLeavingEquipmentInOmerta( UINT32 uiMercId );
|
||||
|
||||
// actually drop the stored list of items
|
||||
void HandleEquipmentLeftInOmerta( UINT32 uiSlotIndex );
|
||||
void HandleEquipmentLeftInDrassen( UINT32 uiSlotIndex );
|
||||
|
||||
// init/shutdown leave item lists
|
||||
void InitLeaveList( void );
|
||||
void ShutDownLeaveList( void );
|
||||
|
||||
// add item to leave equip index
|
||||
BOOLEAN AddItemToLeaveIndex( OBJECTTYPE *o, UINT32 uiIndex );
|
||||
|
||||
// release memory for all items in this slot's leave item list
|
||||
void FreeLeaveListSlot( UINT32 uiSlotIndex );
|
||||
|
||||
// first free slot in equip leave list
|
||||
INT32 FindFreeSlotInLeaveList( void );
|
||||
|
||||
// set up drop list
|
||||
INT32 SetUpDropItemListForMerc( UINT32 uiMercId );
|
||||
// store owner's profile id for the items added to this leave slot index
|
||||
void SetUpMercAboutToLeaveEquipment( UINT32 ubProfileId, UINT32 uiSlotIndex );
|
||||
|
||||
// remove item from leave index
|
||||
//BOOLEAN RemoveItemFromLeaveIndex( MERC_LEAVE_ITEM *pItem, UINT32 uiIndex );
|
||||
|
||||
// handle a group about to arrive in a sector
|
||||
void HandleGroupAboutToArrive( void );
|
||||
|
||||
// up arrow
|
||||
void HandleMapScreenUpArrow( void );
|
||||
void HandleMapScreenDownArrow( void );
|
||||
|
||||
|
||||
// create and destroy the status bars mouse region
|
||||
void CreateMapStatusBarsRegion( void );
|
||||
void RemoveMapStatusBarsRegion( void );
|
||||
void UpdateCharRegionHelpText( void );
|
||||
|
||||
// find this soldier in mapscreen character list and set as contract
|
||||
void FindAndSetThisContractSoldier( SOLDIERTYPE *pSoldier );
|
||||
|
||||
// lose the cursor, re-render
|
||||
void HandleMAPUILoseCursorFromOtherScreen( void );
|
||||
|
||||
void RenderMapRegionBackground( void );
|
||||
|
||||
// update mapscreen assignment positions
|
||||
void UpdateMapScreenAssignmentPositions( void );
|
||||
|
||||
// get the umber of valid mercs in the mapscreen character list
|
||||
INT32 GetNumberOfPeopleInCharacterList( void );
|
||||
|
||||
// the next and previous people in the mapscreen
|
||||
void GoToPrevCharacterInList( void );
|
||||
void GoToNextCharacterInList( void );
|
||||
|
||||
// this does the whole miner giving player info speil
|
||||
void HandleMinerEvent( UINT8 bMinerNumber, INT16 sSectorX, INT16 sSectorY, INT16 sQuoteNumber, BOOLEAN fForceMapscreen );
|
||||
|
||||
// set up the event of animating a mine sector
|
||||
void SetUpAnimationOfMineSectors( INT32 iEvent );
|
||||
|
||||
// display map screen
|
||||
void DisplayMapScreenFastHelpList( void );
|
||||
|
||||
// handle display of fast help
|
||||
void HandleDisplayOfExitToTacticalMessageForFirstEntryToMapScreen( void );
|
||||
|
||||
// is the text up?
|
||||
BOOLEAN IsMapScreenHelpTextUp( void );
|
||||
|
||||
// stop the help text in mapscreen
|
||||
void StopMapScreenHelpText( void );
|
||||
|
||||
// set up the help text
|
||||
void SetUpMapScreenFastHelpText( void );
|
||||
|
||||
void TurnOnSectorLocator( UINT8 ubProfileID );
|
||||
void TurnOffSectorLocator();
|
||||
|
||||
extern INT16 gsSectorLocatorX;
|
||||
extern INT16 gsSectorLocatorY;
|
||||
extern UINT8 gubBlitSectorLocatorCode;
|
||||
|
||||
enum
|
||||
{
|
||||
LOCATOR_COLOR_NONE,
|
||||
LOCATOR_COLOR_RED,
|
||||
LOCATOR_COLOR_YELLOW
|
||||
};
|
||||
|
||||
extern UINT32 guiSectorLocatorGraphicID;
|
||||
void HandleBlitOfSectorLocatorIcon( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, UINT8 ubLocatorID );
|
||||
|
||||
|
||||
// the tactical version
|
||||
|
||||
// handle the actual showingof the list
|
||||
void HandleShowingOfTacticalInterfaceFastHelpText( void );
|
||||
|
||||
// start showing the list
|
||||
void StartShowingInterfaceFastHelpText( void );
|
||||
|
||||
// stop showing the list
|
||||
void StopShowingInterfaceFastHelpText( void );
|
||||
|
||||
// is the list active?
|
||||
BOOLEAN IsTheInterfaceFastHelpTextActive( void );
|
||||
|
||||
//set up the tactical lists
|
||||
BOOLEAN SetUpFastHelpListRegions( INT32 iXPosition[], INT32 iYPosition[], INT32 iWidth[], STR16 sString[], INT32 iSize );
|
||||
|
||||
|
||||
// the alternate mapscreen movement system
|
||||
void InitializeMovingLists( void );
|
||||
|
||||
// reset assignment for mercs trainign militia in this sector
|
||||
void ResetAssignmentOfMercsThatWereTrainingMilitiaInThisSector( INT16 sSectorX, INT16 sSectorY );
|
||||
|
||||
|
||||
// the sector move box
|
||||
void DeselectSquadForMovement( INT32 iSquadNumber );
|
||||
void SelectedSquadForMovement( INT32 iSquadNumber );
|
||||
void DeselectSoldierForMovement( SOLDIERTYPE *pSoldier );
|
||||
void SelectSoldierForMovement( SOLDIERTYPE *pSoldier );
|
||||
void SelectVehicleForMovement( INT32 iVehicleId, BOOLEAN fAndAllOnBoard );
|
||||
void DeselectVehicleForMovement( INT32 iVehicleId );
|
||||
void AddVehicleToMovingLists( INT32 iVehicleId );
|
||||
void AddSquadToMovingLists( INT32 iSquadNumber );
|
||||
void AddSoldierToMovingLists( SOLDIERTYPE *pSoldier );
|
||||
void CreateDestroyMovementBox( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ );
|
||||
void SetUpMovingListsForSector( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ );
|
||||
void ReBuildMoveBox( void );
|
||||
BOOLEAN IsCharacterSelectedForAssignment( INT16 sCharNumber );
|
||||
BOOLEAN IsCharacterSelectedForSleep( INT16 sCharNumber );
|
||||
|
||||
// the update box
|
||||
void CreateDestroyTheUpdateBox( void );
|
||||
void SetSoldierUpdateBoxReason( INT32 iReason );
|
||||
void AddSoldierToUpdateBox( SOLDIERTYPE *pSoldier );
|
||||
void ResetSoldierUpdateBox( void );
|
||||
void DisplaySoldierUpdateBox( );
|
||||
BOOLEAN IsThePopUpBoxEmpty( void );
|
||||
|
||||
|
||||
// unmarking buttons dirty for dialogue
|
||||
void UpdateButtonsDuringCharacterDialogue( void );
|
||||
void UpdateButtonsDuringCharacterDialogueSubTitles( void );
|
||||
void SetUpdateBoxFlag( BOOLEAN fFlag );
|
||||
|
||||
|
||||
|
||||
/// set the town of Tixa as found by the player
|
||||
void SetTixaAsFound( void );
|
||||
|
||||
// set the town of Orta as found by the player
|
||||
void SetOrtaAsFound( void );
|
||||
|
||||
// set this SAM site as being found by the player
|
||||
void SetSAMSiteAsFound( UINT8 uiSamIndex );
|
||||
|
||||
// init time menus
|
||||
void InitTimersForMoveMenuMouseRegions( void );
|
||||
|
||||
// the screen mask
|
||||
void CreateScreenMaskForMoveBox( void );
|
||||
void RemoveScreenMaskForMoveBox( void );
|
||||
|
||||
|
||||
// help text to show user merc has insurance
|
||||
void UpdateHelpTextForMapScreenMercIcons( void );
|
||||
void CreateDestroyInsuranceMouseRegionForMercs( BOOLEAN fCreate );
|
||||
|
||||
|
||||
// stuff to deal with player just starting the game
|
||||
BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void );
|
||||
//void HandlePlayerEnteringMapScreenBeforeGoingToTactical( void );
|
||||
|
||||
// handle sector being taken over uncontested
|
||||
BOOLEAN NotifyPlayerWhenEnemyTakesControlOfImportantSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, BOOLEAN fContested );
|
||||
|
||||
// handle notifying player of invasion by enemy
|
||||
void NotifyPlayerOfInvasionByEnemyForces( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ, MSGBOX_CALLBACK ReturnCallback );
|
||||
|
||||
void ShutDownUserDefineHelpTextRegions( void );
|
||||
|
||||
// shwo the update box
|
||||
void ShowUpdateBox( void );
|
||||
|
||||
// add special events
|
||||
void AddSoldierToWaitingListQueue( SOLDIERTYPE *pSoldier );
|
||||
void AddReasonToWaitingListQueue( INT32 iReason );
|
||||
void AddDisplayBoxToWaitingQueue( void );
|
||||
|
||||
// can this group move it out
|
||||
BOOLEAN CanEntireMovementGroupMercIsInMove( SOLDIERTYPE *pSoldier, INT8 *pbErrorNumber );
|
||||
void ReportMapScreenMovementError( INT8 bErrorNumber );
|
||||
|
||||
void HandleRebuildingOfMapScreenCharacterList( void );
|
||||
|
||||
void RequestToggleTimeCompression( void );
|
||||
void RequestIncreaseInTimeCompression( void );
|
||||
void RequestDecreaseInTimeCompression( void );
|
||||
|
||||
void SelectUnselectedMercsWhoMustMoveWithThisGuy( void );
|
||||
BOOLEAN AnyMercInSameSquadOrVehicleIsSelected( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN LoadLeaveItemList( HWFILE hFile );
|
||||
BOOLEAN SaveLeaveItemList( HWFILE hFile );
|
||||
|
||||
BOOLEAN CheckIfSalaryIncreasedAndSayQuote( SOLDIERTYPE *pSoldier, BOOLEAN fTriggerContractMenu );
|
||||
|
||||
void EndUpdateBox( BOOLEAN fContinueTimeCompression );
|
||||
|
||||
extern BOOLEAN CanCharacterMoveInStrategic( SOLDIERTYPE *pSoldier, INT8 *pbErrorNumber );
|
||||
extern BOOLEAN MapscreenCanPassItemToCharNum( INT32 iNewCharSlot );
|
||||
|
||||
|
||||
#endif
|
||||
@@ -196,8 +196,8 @@ typedef void ( *DROP_DOWN_SELECT_CALLBACK ) (STR16);
|
||||
|
||||
|
||||
|
||||
#define CLOCK_X 554
|
||||
#define CLOCK_Y 459
|
||||
//#define CLOCK_X 554
|
||||
//#define CLOCK_Y 459
|
||||
|
||||
#define QDS_BUTTON_HEIGHT 21
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "GameSettings.h"
|
||||
@@ -693,6 +693,12 @@ void ValidateGroup( GROUP *pGroup )
|
||||
INT32 iMaxEnemyGroupSize = gGameExternalOptions.iMaxEnemyGroupSize;
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic2");
|
||||
|
||||
// WANNE 2
|
||||
if (pGroup == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( !pGroup->ubSectorX || !pGroup->ubSectorY || pGroup->ubSectorX > 16 || pGroup->ubSectorY > 16 )
|
||||
{
|
||||
if( gTacticalStatus.uiFlags & LOADING_SAVED_GAME )
|
||||
|
||||
+363
-95
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines> SCROLL BUTTONS CODE IS OUTCOMMENTED (search for // WANNE 2 <scroll>)
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "HelpScreen.h"
|
||||
@@ -166,54 +167,56 @@
|
||||
#define MAP_WEIGHT_PERCENT_X 196
|
||||
#define MAP_WEIGHT_PERCENT_Y 266
|
||||
|
||||
#define MAP_CAMMO_LABEL_X 178
|
||||
#define MAP_CAMMO_LABEL_Y 283
|
||||
#define MAP_CAMMO_X 176
|
||||
#define MAP_CAMMO_Y 292
|
||||
#define MAP_CAMMO_LABEL_X 178
|
||||
#define MAP_CAMMO_LABEL_Y 283
|
||||
#define MAP_CAMMO_X 176
|
||||
#define MAP_CAMMO_Y 292
|
||||
#define MAP_CAMMO_PERCENT_X 196
|
||||
#define MAP_CAMMO_PERCENT_Y 293
|
||||
|
||||
#define MAP_PERCENT_WIDTH 20
|
||||
#define MAP_PERCENT_WIDTH 20
|
||||
#define MAP_PERCENT_HEIGHT 10
|
||||
|
||||
#define MAP_INV_STATS_TITLE_FONT_COLOR 6
|
||||
#define MAP_INV_STATS_TEXT_FONT_COLOR 5
|
||||
#define MAP_INV_STATS_TITLE_FONT_COLOR 6
|
||||
#define MAP_INV_STATS_TEXT_FONT_COLOR 5
|
||||
|
||||
#define PLAYER_INFO_FACE_START_X 9
|
||||
#define PLAYER_INFO_FACE_START_Y 17
|
||||
#define PLAYER_INFO_FACE_END_X 60
|
||||
#define PLAYER_INFO_FACE_END_Y 76
|
||||
#define PLAYER_INFO_FACE_END_X 60
|
||||
#define PLAYER_INFO_FACE_END_Y 76
|
||||
|
||||
#define INV_BODY_X 71
|
||||
#define INV_BODY_Y 116
|
||||
|
||||
// WANNE 2 <change 2>
|
||||
#define NAME_X 4
|
||||
#define NAME_WIDTH 55 - NAME_X
|
||||
|
||||
#define NAME_X 11
|
||||
#define NAME_WIDTH 62 - NAME_X
|
||||
#define ASSIGN_X 67
|
||||
#define ASSIGN_WIDTH 118 - ASSIGN_X
|
||||
#define SLEEP_X 123
|
||||
#define SLEEP_WIDTH 142 - SLEEP_X
|
||||
#define LOC_X 147
|
||||
#define LOC_WIDTH 179 - LOC_X
|
||||
#define DEST_ETA_X 184
|
||||
#define DEST_ETA_WIDTH 217 - DEST_ETA_X
|
||||
#define TIME_REMAINING_X 222
|
||||
#define TIME_REMAINING_WIDTH 250 - TIME_REMAINING_X
|
||||
#define CLOCK_X_START 463 - 18
|
||||
#define CLOCK_Y_START 298
|
||||
#define DEST_PLOT_X 463
|
||||
#define DEST_PLOT_Y 345
|
||||
#define CLOCK_ETA_X 463 - 15 + 6 + 30
|
||||
#define CLOCK_HOUR_X_START 463 + 25 + 30
|
||||
#define CLOCK_MIN_X_START 463 + 45 + 30
|
||||
#define ASSIGN_X 60
|
||||
#define ASSIGN_WIDTH 111 - ASSIGN_X
|
||||
#define SLEEP_X 116
|
||||
#define SLEEP_WIDTH 135 - SLEEP_X
|
||||
#define LOC_X 140
|
||||
#define LOC_WIDTH 172 - LOC_X
|
||||
#define DEST_ETA_X 177
|
||||
#define DEST_ETA_WIDTH 210 - DEST_ETA_X
|
||||
#define TIME_REMAINING_X 215
|
||||
#define TIME_REMAINING_WIDTH 243 - TIME_REMAINING_X
|
||||
|
||||
// WANNE 2
|
||||
#define CLOCK_Y_START (MAP_BORDER_Y_OFFSET + 298) // 298
|
||||
|
||||
#define DEST_PLOT_X (MAP_BORDER_X_OFFSET + 463) //463
|
||||
#define DEST_PLOT_Y (MAP_BORDER_Y_OFFSET + 345) //345
|
||||
|
||||
// WANNE 2
|
||||
#define CLOCK_ETA_X (MAP_BORDER_X_OFFSET + 484) //463 - 15 + 6 + 30
|
||||
#define CLOCK_HOUR_X_START (MAP_BORDER_X_OFFSET + 518) //463 + 25 + 30
|
||||
#define CLOCK_MIN_X_START (MAP_BORDER_X_OFFSET + 538) //463 + 45 + 30
|
||||
|
||||
// contract
|
||||
#define CONTRACT_X 185
|
||||
#define CONTRACT_Y 50
|
||||
//#define CONTRACT_WIDTH 63
|
||||
//#define CONTRACT_HEIGHT 10
|
||||
|
||||
// trash can
|
||||
#define TRASH_CAN_X 176
|
||||
@@ -318,8 +321,9 @@
|
||||
//#define TM_INV_WIDTH 58
|
||||
//#define TM_INV_HEIGHT 23
|
||||
|
||||
#define CLOCK_X 554
|
||||
#define CLOCK_Y 459
|
||||
// WANNE 2 (the position of the clock in the strategy screen)
|
||||
//#define CLOCK_X (SCREEN_WIDTH - 86) //554
|
||||
//#define CLOCK_Y (SCREEN_HEIGHT - 21) //459
|
||||
|
||||
|
||||
#define RGB_WHITE ( FROMRGB( 255, 255, 255 ) )
|
||||
@@ -430,13 +434,23 @@ RGBCOLOR GlowColorsC[]={
|
||||
*/
|
||||
|
||||
|
||||
//SGPPoint gMapSortButtons[ MAX_SORT_METHODS ]={
|
||||
// {12,125},
|
||||
// {68,125},
|
||||
// {124,125},
|
||||
// {148,125},
|
||||
// {185,125},
|
||||
// {223,125},
|
||||
//};
|
||||
|
||||
// WANNE 2 <change 2>
|
||||
SGPPoint gMapSortButtons[ MAX_SORT_METHODS ]={
|
||||
{12,125},
|
||||
{68,125},
|
||||
{124,125},
|
||||
{148,125},
|
||||
{185,125},
|
||||
{223,125},
|
||||
{5,113},
|
||||
{61,113},
|
||||
{117,113},
|
||||
{141,113},
|
||||
{178,113},
|
||||
{216,113},
|
||||
};
|
||||
|
||||
|
||||
@@ -470,8 +484,39 @@ INV_REGION_DESC gSCamoXY =
|
||||
};
|
||||
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
// buttons images
|
||||
//UINT32 guiMapMercsScrollButtonsImage[ 2 ];
|
||||
//UINT32 guiMapMercsScrollButtons[ 2 ];
|
||||
//
|
||||
//UINT32 guiMapVehicleScrollButtonsImage[ 2 ];
|
||||
//UINT32 guiMapVehicleScrollButtons [ 2 ];
|
||||
|
||||
|
||||
|
||||
extern UINT16 usVehicleY;
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
// button enums
|
||||
//enum{
|
||||
// MAP_SCROLL_MERCS_UP =0,
|
||||
// MAP_SCROLL_MERCS_DOWN,
|
||||
//};
|
||||
//
|
||||
//enum{
|
||||
// MAP_SCROLL_VEHICLE_UP =0,
|
||||
// MAP_SCROLL_VEHICLE_DOWN,
|
||||
//};
|
||||
|
||||
|
||||
// GLOBAL VARIABLES (OURS)
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
//void CreateButtonsForScrolling(void);
|
||||
//void DeleteButtonsForScrolling(void);
|
||||
|
||||
void BtnMessageUpMapScreenCallback( GUI_BUTTON *btn,INT32 reason );
|
||||
BOOLEAN fScrollButtonsInitialized = FALSE;
|
||||
|
||||
BOOLEAN fFlashAssignDone = FALSE;
|
||||
BOOLEAN fInMapMode = FALSE;
|
||||
@@ -1129,7 +1174,6 @@ void ContractBoxGlow( void )
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ContractListRegionBoxGlow( UINT16 usCount )
|
||||
{
|
||||
static INT32 iColorNum =10;
|
||||
@@ -1139,6 +1183,8 @@ void ContractListRegionBoxGlow( UINT16 usCount )
|
||||
UINT8 *pDestBuf;
|
||||
INT16 usY = 0;
|
||||
INT16 sYAdd = 0;
|
||||
INT16 sYStart = 0;
|
||||
INT16 usVehicleCount = 0;
|
||||
|
||||
|
||||
// if not glowing right now, leave
|
||||
@@ -1167,17 +1213,24 @@ void ContractListRegionBoxGlow( UINT16 usCount )
|
||||
iColorNum--;
|
||||
|
||||
|
||||
// WANNE 2
|
||||
if( usCount >= FIRST_VEHICLE )
|
||||
{
|
||||
sYAdd = 6;
|
||||
usVehicleCount = usCount - FIRST_VEHICLE;
|
||||
sYStart = usVehicleY;
|
||||
usY=(Y_OFFSET*usVehicleCount-1)+(sYStart+(usVehicleCount*Y_SIZE));
|
||||
}
|
||||
else
|
||||
{
|
||||
sYAdd = 0;
|
||||
sYStart = Y_START;
|
||||
usY=(Y_OFFSET*usCount-1)+(sYStart+(usCount*Y_SIZE));
|
||||
}
|
||||
|
||||
// y start position of box
|
||||
usY=(Y_OFFSET*usCount-1)+(Y_START+(usCount*Y_SIZE) + sYAdd );
|
||||
//usY=(Y_OFFSET*usCount-1)+(Y_START+(usCount*Y_SIZE) + sYAdd );
|
||||
|
||||
// WANNE 2 <this is not correct!!>
|
||||
//usY=(Y_OFFSET*usCount-1)+(sYStart+(usCount*Y_SIZE));
|
||||
|
||||
// glow contract box
|
||||
usColor=Get16BPPColor( FROMRGB( GlowColorsA[iColorNum].ubRed, GlowColorsA[iColorNum].ubGreen, GlowColorsA[iColorNum].ubBlue ) );
|
||||
@@ -2457,6 +2510,8 @@ void DisplayGroundEta( void )
|
||||
SetFont( ETA_FONT );
|
||||
SetFontForeground( FONT_LTGREEN );
|
||||
SetFontBackground( FONT_BLACK );
|
||||
|
||||
// WANNE 2 <change ETA position>
|
||||
mprintf( CLOCK_ETA_X, CLOCK_Y_START, pEtaString[ 0 ] );
|
||||
|
||||
// if less than one day
|
||||
@@ -2487,6 +2542,7 @@ void HighLightAssignLine()
|
||||
INT16 usCount = 0;
|
||||
UINT16 usX;
|
||||
UINT16 usY;
|
||||
INT16 usVehicleCount = 0;
|
||||
|
||||
|
||||
// is this a valid line?
|
||||
@@ -2520,16 +2576,6 @@ void HighLightAssignLine()
|
||||
else
|
||||
iColorNum--;
|
||||
|
||||
|
||||
//usY=Y_START+(giHighLine*GetFontHeight((MAP_SCREEN_FONT)));
|
||||
usY = ( Y_OFFSET * giAssignHighLine - 1 ) + ( Y_START + ( giAssignHighLine * Y_SIZE ) );
|
||||
|
||||
if( giAssignHighLine >= FIRST_VEHICLE )
|
||||
{
|
||||
usY += 6;
|
||||
}
|
||||
|
||||
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
@@ -2540,9 +2586,12 @@ void HighLightAssignLine()
|
||||
usX=ASSIGN_X;
|
||||
//usY=Y_START+(giHighLine*GetFontHeight((MAP_SCREEN_FONT)));
|
||||
usY=(Y_OFFSET*usCount-1)+(Y_START+(usCount*Y_SIZE));
|
||||
|
||||
// WANNE 2
|
||||
if( usCount >= FIRST_VEHICLE )
|
||||
{
|
||||
usY += 6;
|
||||
usVehicleCount = usCount - FIRST_VEHICLE;
|
||||
usY = (Y_OFFSET*usVehicleCount-1)+(usVehicleY+(usVehicleCount*Y_SIZE));
|
||||
}
|
||||
|
||||
usColor=Get16BPPColor( FROMRGB( GlowColorsA[iColorNum].ubRed, GlowColorsA[iColorNum].ubGreen, GlowColorsA[iColorNum].ubBlue ) );
|
||||
@@ -2578,6 +2627,7 @@ void HighLightDestLine()
|
||||
UINT16 usCount = 0;
|
||||
UINT16 usX;
|
||||
UINT16 usY;
|
||||
UINT16 usVehicleCont = 0;
|
||||
|
||||
|
||||
if( ( giDestHighLine == -1 ) || fShowInventoryFlag )
|
||||
@@ -2619,11 +2669,13 @@ void HighLightDestLine()
|
||||
if( CharacterIsGettingPathPlotted( usCount ) == TRUE )
|
||||
{
|
||||
usX=DEST_ETA_X-4;
|
||||
//usY=Y_START+(giHighLine*GetFontHeight((MAP_SCREEN_FONT)));
|
||||
usY=(Y_OFFSET*usCount-1)+(Y_START+(usCount*Y_SIZE));
|
||||
|
||||
// WANNE 2
|
||||
if( usCount >= FIRST_VEHICLE )
|
||||
{
|
||||
usY += 6;
|
||||
usVehicleCont = usCount - FIRST_VEHICLE;
|
||||
usY=(Y_OFFSET*usVehicleCont-1)+(usVehicleY+(usVehicleCont*Y_SIZE));
|
||||
}
|
||||
|
||||
usColor=Get16BPPColor( FROMRGB( GlowColorsA[iColorNum].ubRed, GlowColorsA[iColorNum].ubGreen, GlowColorsA[iColorNum].ubBlue ) );
|
||||
@@ -2662,6 +2714,7 @@ void HighLightSleepLine()
|
||||
UINT16 usCount = 0;
|
||||
UINT16 usX, usX2;
|
||||
UINT16 usY;
|
||||
UINT16 usVehicleCount = 0;
|
||||
|
||||
|
||||
// is this a valid line?
|
||||
@@ -2706,11 +2759,13 @@ void HighLightSleepLine()
|
||||
usX=SLEEP_X-4;
|
||||
usX2 = SLEEP_X + SLEEP_WIDTH;
|
||||
|
||||
//usY=Y_START+(giHighLine*GetFontHeight((MAP_SCREEN_FONT)));
|
||||
usY=(Y_OFFSET*usCount-1)+(Y_START+(usCount*Y_SIZE));
|
||||
|
||||
// WANNE 2
|
||||
if( usCount >= FIRST_VEHICLE )
|
||||
{
|
||||
usY += 6;
|
||||
usVehicleCount = usCount - FIRST_VEHICLE;
|
||||
usY=(Y_OFFSET*usVehicleCount-1)+(usVehicleY+(usVehicleCount*Y_SIZE));
|
||||
}
|
||||
|
||||
usColor=Get16BPPColor( FROMRGB( GlowColorsA[iColorNum].ubRed, GlowColorsA[iColorNum].ubGreen, GlowColorsA[iColorNum].ubBlue ) );
|
||||
@@ -2917,7 +2972,7 @@ void DisplayCharacterList()
|
||||
}
|
||||
|
||||
SetFontForeground( ubForegroundColor );
|
||||
|
||||
|
||||
DrawName( Menptr[gCharactersList[sCount].usSolID].name, sCount, MAP_SCREEN_FONT);
|
||||
DrawLocation(sCount, sCount, MAP_SCREEN_FONT);
|
||||
DrawDestination(sCount, sCount, MAP_SCREEN_FONT);
|
||||
@@ -3036,7 +3091,15 @@ UINT32 MapScreenHandle(void)
|
||||
return( MAP_SCREEN );
|
||||
}
|
||||
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
/*if (fShowInventoryFlag == TRUE)
|
||||
{
|
||||
DeleteButtonsForScrolling();
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateButtonsForScrolling();
|
||||
}*/
|
||||
|
||||
// if ( (fInMapMode == FALSE ) && ( fMapExitDueToMessageBox == FALSE ) )
|
||||
if ( !fInMapMode )
|
||||
@@ -3073,7 +3136,6 @@ UINT32 MapScreenHandle(void)
|
||||
|
||||
MoveToEndOfMapScreenMessageList( );
|
||||
|
||||
|
||||
// if the current time compression mode is something legal in mapscreen, keep it
|
||||
if ( ( giTimeCompressMode >= TIME_COMPRESS_5MINS ) && ( giTimeCompressMode <= TIME_COMPRESS_60MINS ) )
|
||||
{
|
||||
@@ -3158,8 +3220,20 @@ UINT32 MapScreenHandle(void)
|
||||
/*strcpy(vs_desc.ImageFile, "INTERFACE\\playlist3.pcx");
|
||||
CHECKF(AddVideoSurface( &vs_desc, &guiCHARLIST ));*/
|
||||
|
||||
// WANNE 2
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3.sti", VObjectDesc.ImageFile );
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3_800x600.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3_1024x768.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARLIST));
|
||||
|
||||
//VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
@@ -3261,14 +3335,12 @@ UINT32 MapScreenHandle(void)
|
||||
AddVideoObject( &VObjectDesc, &guiNewMailIcons );
|
||||
}
|
||||
|
||||
|
||||
// create buttons
|
||||
CreateButtonsForMapBorder( );
|
||||
|
||||
// create mouse regions for level markers
|
||||
CreateMouseRegionsForLevelMarkers( );
|
||||
|
||||
|
||||
// change selected sector/level if necessary
|
||||
// NOTE: Must come after border buttons are created, since it may toggle them!
|
||||
if( AnyMercsHired( ) == FALSE )
|
||||
@@ -3378,6 +3450,21 @@ UINT32 MapScreenHandle(void)
|
||||
// create mouse region for pause clock
|
||||
CreateMouseRegionForPauseOfClock( CLOCK_REGION_START_X, CLOCK_REGION_START_Y );
|
||||
|
||||
// WANNE 2
|
||||
|
||||
if (iResolution == 0)
|
||||
{
|
||||
usVehicleY = 319;
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
usVehicleY = 414;
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
usVehicleY = 549;
|
||||
}
|
||||
|
||||
// create mouse regions
|
||||
CreateMouseRegionsForTeamList( );
|
||||
|
||||
@@ -3806,7 +3893,8 @@ UINT32 MapScreenHandle(void)
|
||||
RenderItemDescriptionBox( );
|
||||
|
||||
// render clock
|
||||
RenderClock(CLOCK_X, CLOCK_Y + 1 );
|
||||
// WANNE 2 <renders the clock in the strategy screen>
|
||||
RenderClock(CLOCK_X, CLOCK_Y);
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
if( !gfWorldLoaded )
|
||||
@@ -3816,13 +3904,13 @@ UINT32 MapScreenHandle(void)
|
||||
SetFontForeground( FONT_DKRED );
|
||||
else
|
||||
SetFontForeground( FONT_RED );
|
||||
mprintf( 530, 2, L"TESTVERSION MSG" );
|
||||
mprintf( SCREEN_WIDTH - 110, 2, L"TESTVERSION MSG" );
|
||||
if( GetJA2Clock() % 1000 < 500 )
|
||||
SetFontForeground( FONT_DKYELLOW );
|
||||
else
|
||||
SetFontForeground( FONT_YELLOW );
|
||||
mprintf( 530, 12, L"NO WORLD LOADED" );
|
||||
InvalidateRegion( 530, 2, 640, 23 );
|
||||
mprintf( SCREEN_WIDTH - 110, 12, L"NO WORLD LOADED" );
|
||||
InvalidateRegion( SCREEN_WIDTH - 110, 2, SCREEN_WIDTH, 23 );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4190,18 +4278,23 @@ void SetClockMin(STR16 pStringA, ...)
|
||||
}
|
||||
|
||||
|
||||
// WANNE 2 <change 2>
|
||||
void DrawName(STR16 pName, INT16 sRowIndex, INT32 iFont)
|
||||
{
|
||||
UINT16 usX=0;
|
||||
UINT16 usY=0;
|
||||
|
||||
|
||||
// mercs
|
||||
if( sRowIndex < FIRST_VEHICLE )
|
||||
{
|
||||
FindFontCenterCoordinates((short)NAME_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE)), (short)NAME_WIDTH, (short)Y_SIZE, pName, (long)iFont, &usX, &usY);
|
||||
}
|
||||
// vehicles
|
||||
else
|
||||
{
|
||||
FindFontCenterCoordinates((short)NAME_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)NAME_WIDTH, (short)Y_SIZE, pName, (long)iFont, &usX, &usY);
|
||||
sRowIndex = sRowIndex - FIRST_VEHICLE;
|
||||
//FindFontCenterCoordinates((short)NAME_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)NAME_WIDTH, (short)Y_SIZE, pName, (long)iFont, &usX, &usY);
|
||||
FindFontCenterCoordinates((short)NAME_X + 1, (short)(usVehicleY+(sRowIndex*Y_SIZE)), (short)NAME_WIDTH, (short)Y_SIZE, pName, (long)iFont, &usX, &usY);
|
||||
}
|
||||
|
||||
//RestoreExternBackgroundRect(NAME_X, ((UINT16)(usY+(Y_OFFSET*sRowIndex+1))), NAME_WIDTH, Y_SIZE);
|
||||
@@ -4224,7 +4317,10 @@ void DrawAssignment(INT16 sCharNumber, INT16 sRowIndex, INT32 iFont)
|
||||
}
|
||||
else
|
||||
{
|
||||
FindFontCenterCoordinates((short)ASSIGN_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)ASSIGN_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
// WANNE 2
|
||||
sRowIndex = sRowIndex - FIRST_VEHICLE;
|
||||
//FindFontCenterCoordinates((short)ASSIGN_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)ASSIGN_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
FindFontCenterCoordinates((short)ASSIGN_X + 1, (short)(usVehicleY+(sRowIndex*Y_SIZE)), (short)ASSIGN_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
}
|
||||
|
||||
if( fFlashAssignDone == TRUE )
|
||||
@@ -4255,7 +4351,10 @@ void DrawLocation(INT16 sCharNumber, INT16 sRowIndex, INT32 iFont)
|
||||
}
|
||||
else
|
||||
{
|
||||
FindFontCenterCoordinates((short)LOC_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)LOC_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
// WANNE 2
|
||||
//FindFontCenterCoordinates((short)LOC_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6), (short)LOC_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
sRowIndex = sRowIndex - FIRST_VEHICLE;
|
||||
FindFontCenterCoordinates((short)LOC_X + 1, (short)(usVehicleY+(sRowIndex*Y_SIZE)), (short)LOC_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
}
|
||||
// restore background
|
||||
//RestoreExternBackgroundRect(LOC_X, ((UINT16)(usY+(Y_OFFSET*sRowIndex+1))), LOC_WIDTH, Y_SIZE);
|
||||
@@ -4284,7 +4383,10 @@ void DrawDestination(INT16 sCharNumber, INT16 sRowIndex, INT32 iFont)
|
||||
}
|
||||
else
|
||||
{
|
||||
FindFontCenterCoordinates((short)DEST_ETA_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6 ), (short)DEST_ETA_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
// WANNE 2
|
||||
sRowIndex = sRowIndex - FIRST_VEHICLE;
|
||||
//FindFontCenterCoordinates((short)DEST_ETA_X + 1, (short)(Y_START+(sRowIndex*Y_SIZE) + 6 ), (short)DEST_ETA_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
FindFontCenterCoordinates((short)DEST_ETA_X + 1, (short)(usVehicleY+(sRowIndex*Y_SIZE)), (short)DEST_ETA_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
}
|
||||
|
||||
//RestoreExternBackgroundRect(DEST_ETA_X+1, ((UINT16)(usY+(Y_OFFSET*sRowIndex+1))), DEST_ETA_WIDTH-1, Y_SIZE);
|
||||
@@ -4317,7 +4419,10 @@ void DrawTimeRemaining( INT16 sCharNumber, INT32 iFont, UINT8 ubFontColor )
|
||||
}
|
||||
else
|
||||
{
|
||||
FindFontCenterCoordinates((short)TIME_REMAINING_X + 1, (short)(Y_START+(sCharNumber*Y_SIZE) + 6 ), (short)TIME_REMAINING_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
// WANNE 2
|
||||
sCharNumber = sCharNumber - FIRST_VEHICLE;
|
||||
//FindFontCenterCoordinates((short)TIME_REMAINING_X + 1, (short)(Y_START+(sCharNumber*Y_SIZE) + 6 ), (short)TIME_REMAINING_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
FindFontCenterCoordinates((short)TIME_REMAINING_X + 1, (short)(usVehicleY+(sCharNumber*Y_SIZE)), (short)TIME_REMAINING_WIDTH, (short)Y_SIZE, sString, (long)iFont, &usX, &usY);
|
||||
}
|
||||
|
||||
//RestoreExternBackgroundRect(TIME_REMAINING_X, ((UINT16)(usY+(Y_OFFSET*sCharNumber+1))), TIME_REMAINING_WIDTH, Y_SIZE);
|
||||
@@ -5944,9 +6049,11 @@ void EndMapScreen( BOOLEAN fDuringFade )
|
||||
// build squad list
|
||||
RebuildCurrentSquad( );
|
||||
|
||||
//
|
||||
DeleteMouseRegionsForLevelMarkers( );
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
//DeleteButtonsForScrolling();
|
||||
|
||||
if( fShowMapInventoryPool == FALSE )
|
||||
{
|
||||
// delete buttons
|
||||
@@ -7413,6 +7520,9 @@ void BlitBackgroundToSaveBuffer( void )
|
||||
}
|
||||
else if( gfPreBattleInterfaceActive )
|
||||
{
|
||||
// WANNE 2 <scroll>
|
||||
//DeleteButtonsForScrolling();
|
||||
|
||||
ForceButtonUnDirty( giMapContractButton );
|
||||
ForceButtonUnDirty( giCharInfoButton[ 0 ] );
|
||||
ForceButtonUnDirty( giCharInfoButton[ 1 ] );
|
||||
@@ -7423,12 +7533,15 @@ void BlitBackgroundToSaveBuffer( void )
|
||||
RenderMapScreenInterfaceBottom( );
|
||||
}
|
||||
|
||||
|
||||
// WANNE 2
|
||||
void CreateMouseRegionsForTeamList( void )
|
||||
{
|
||||
// will create mouse regions for assignments, path plotting, character info selection
|
||||
INT16 sCounter = 0;
|
||||
INT16 sYAdd = 0;
|
||||
//INT16 sYAdd = 0;
|
||||
|
||||
INT16 sYStart = 0;
|
||||
INT16 sOffsetCounter = 0;
|
||||
|
||||
// the info region...is the background for the list itself
|
||||
|
||||
@@ -7436,37 +7549,68 @@ void CreateMouseRegionsForTeamList( void )
|
||||
{
|
||||
if( sCounter >= FIRST_VEHICLE )
|
||||
{
|
||||
sYAdd = 6;
|
||||
//sYAdd = 6;
|
||||
sOffsetCounter = sCounter - FIRST_VEHICLE;
|
||||
sYStart = usVehicleY;
|
||||
}
|
||||
else
|
||||
{
|
||||
sYAdd = 0;
|
||||
sOffsetCounter = sCounter;
|
||||
sYStart = Y_START;
|
||||
//sYAdd = 0;
|
||||
}
|
||||
|
||||
// WANNE 2
|
||||
// name region
|
||||
MSYS_DefineRegion( &gTeamListNameRegion[ sCounter ] , NAME_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), NAME_X + NAME_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL,
|
||||
MSYS_DefineRegion( &gTeamListNameRegion[ sCounter ] , NAME_X, ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), NAME_X + NAME_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL,
|
||||
MSYS_NO_CURSOR, TeamListInfoRegionMvtCallBack, TeamListInfoRegionBtnCallBack );
|
||||
|
||||
// assignment region
|
||||
MSYS_DefineRegion( &gTeamListAssignmentRegion[ sCounter ] ,ASSIGN_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), ASSIGN_X + ASSIGN_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_DefineRegion( &gTeamListAssignmentRegion[ sCounter ] ,ASSIGN_X , ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), ASSIGN_X + ASSIGN_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_NO_CURSOR, TeamListAssignmentRegionMvtCallBack, TeamListAssignmentRegionBtnCallBack );
|
||||
|
||||
// location region (same function as name regions, so uses the same callbacks)
|
||||
MSYS_DefineRegion( &gTeamListLocationRegion[ sCounter ] , LOC_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), LOC_X + LOC_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_DefineRegion( &gTeamListLocationRegion[ sCounter ] , LOC_X, ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), LOC_X + LOC_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_NO_CURSOR, TeamListInfoRegionMvtCallBack, TeamListInfoRegionBtnCallBack );
|
||||
|
||||
// destination region
|
||||
MSYS_DefineRegion( &gTeamListDestinationRegion[ sCounter ] ,DEST_ETA_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), DEST_ETA_X + DEST_ETA_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_DefineRegion( &gTeamListDestinationRegion[ sCounter ] ,DEST_ETA_X , ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), DEST_ETA_X + DEST_ETA_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_NO_CURSOR, TeamListDestinationRegionMvtCallBack, TeamListDestinationRegionBtnCallBack );
|
||||
|
||||
// contract region
|
||||
MSYS_DefineRegion( &gTeamListContractRegion[ sCounter ] ,TIME_REMAINING_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), TIME_REMAINING_X + TIME_REMAINING_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_DefineRegion( &gTeamListContractRegion[ sCounter ] ,TIME_REMAINING_X , ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), TIME_REMAINING_X + TIME_REMAINING_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_NO_CURSOR, TeamListContractRegionMvtCallBack, TeamListContractRegionBtnCallBack );
|
||||
|
||||
// contract region
|
||||
MSYS_DefineRegion( &gTeamListSleepRegion[ sCounter ] ,SLEEP_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), SLEEP_X + SLEEP_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_DefineRegion( &gTeamListSleepRegion[ sCounter ] ,SLEEP_X, ( INT16 )( sYStart + ( sOffsetCounter ) * ( Y_SIZE + 2 )), SLEEP_X + SLEEP_WIDTH, ( INT16 )( (sYStart + 10) + ( sOffsetCounter + 1 ) * ( Y_SIZE + 2 )), MSYS_PRIORITY_NORMAL + 1,
|
||||
MSYS_NO_CURSOR, TeamListSleepRegionMvtCallBack, TeamListSleepRegionBtnCallBack );
|
||||
|
||||
|
||||
|
||||
//// name region
|
||||
//MSYS_DefineRegion( &gTeamListNameRegion[ sCounter ] , NAME_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), NAME_X + NAME_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL,
|
||||
// MSYS_NO_CURSOR, TeamListInfoRegionMvtCallBack, TeamListInfoRegionBtnCallBack );
|
||||
|
||||
//// assignment region
|
||||
//MSYS_DefineRegion( &gTeamListAssignmentRegion[ sCounter ] ,ASSIGN_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), ASSIGN_X + ASSIGN_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
// MSYS_NO_CURSOR, TeamListAssignmentRegionMvtCallBack, TeamListAssignmentRegionBtnCallBack );
|
||||
|
||||
//// location region (same function as name regions, so uses the same callbacks)
|
||||
//MSYS_DefineRegion( &gTeamListLocationRegion[ sCounter ] , LOC_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), LOC_X + LOC_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
// MSYS_NO_CURSOR, TeamListInfoRegionMvtCallBack, TeamListInfoRegionBtnCallBack );
|
||||
|
||||
//// destination region
|
||||
//MSYS_DefineRegion( &gTeamListDestinationRegion[ sCounter ] ,DEST_ETA_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd ), DEST_ETA_X + DEST_ETA_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
// MSYS_NO_CURSOR, TeamListDestinationRegionMvtCallBack, TeamListDestinationRegionBtnCallBack );
|
||||
|
||||
//// contract region
|
||||
//MSYS_DefineRegion( &gTeamListContractRegion[ sCounter ] ,TIME_REMAINING_X , ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), TIME_REMAINING_X + TIME_REMAINING_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
// MSYS_NO_CURSOR, TeamListContractRegionMvtCallBack, TeamListContractRegionBtnCallBack );
|
||||
|
||||
//// contract region
|
||||
//MSYS_DefineRegion( &gTeamListSleepRegion[ sCounter ] ,SLEEP_X, ( INT16 )( Y_START + ( sCounter ) * ( Y_SIZE + 2 ) + sYAdd), SLEEP_X + SLEEP_WIDTH, ( INT16 )( 145 + ( sCounter + 1 ) * ( Y_SIZE + 2 ) + sYAdd ), MSYS_PRIORITY_NORMAL + 1,
|
||||
// MSYS_NO_CURSOR, TeamListSleepRegionMvtCallBack, TeamListSleepRegionBtnCallBack );
|
||||
|
||||
|
||||
MSYS_SetRegionUserData(&gTeamListNameRegion[sCounter],0,sCounter);
|
||||
MSYS_SetRegionUserData(&gTeamListAssignmentRegion[sCounter],0,sCounter);
|
||||
@@ -7480,7 +7624,7 @@ void CreateMouseRegionsForTeamList( void )
|
||||
SetRegionFastHelpText( &gTeamListNameRegion[sCounter], pMapScreenMouseRegionHelpText[ 0 ] );
|
||||
SetRegionFastHelpText( &gTeamListAssignmentRegion[sCounter], pMapScreenMouseRegionHelpText[ 1 ] );
|
||||
SetRegionFastHelpText( &gTeamListSleepRegion[sCounter], pMapScreenMouseRegionHelpText[ 5 ] );
|
||||
SetRegionFastHelpText( &gTeamListLocationRegion[sCounter], pMapScreenMouseRegionHelpText[ 0 ] );
|
||||
SetRegionFastHelpText( &gTeamListLocationRegion[sCounter], pMapScreenMouseRegionHelpText[ 4 ] );
|
||||
SetRegionFastHelpText( &gTeamListDestinationRegion[sCounter], pMapScreenMouseRegionHelpText[ 2 ] );
|
||||
SetRegionFastHelpText( &gTeamListContractRegion[sCounter], pMapScreenMouseRegionHelpText[ 3 ] );
|
||||
}
|
||||
@@ -8492,7 +8636,10 @@ void RenderMapRegionBackground( void )
|
||||
|
||||
MapscreenMarkButtonsDirty();
|
||||
|
||||
RestoreExternBackgroundRect( 261, 0, 640 - 261, 359 );
|
||||
// WANNE 2
|
||||
//RestoreExternBackgroundRect( 261, 0, 379, 359 );
|
||||
|
||||
RestoreExternBackgroundRect( 261, 0, SCREEN_WIDTH - 261, SCREEN_HEIGHT - 121 );
|
||||
|
||||
// don't bother if showing sector inventory instead of the map!!!
|
||||
if( !fShowMapInventoryPool )
|
||||
@@ -8562,7 +8709,9 @@ void RenderTeamRegionBackground( void )
|
||||
MarkAllBoxesAsAltered( );
|
||||
|
||||
// restore background for area
|
||||
RestoreExternBackgroundRect( 0, 107, 261 - 0, 359 - 107 );
|
||||
|
||||
// WANNE 2
|
||||
RestoreExternBackgroundRect( 0, 107, 261, SCREEN_HEIGHT - 106 - 121 );
|
||||
|
||||
MapscreenMarkButtonsDirty();
|
||||
|
||||
@@ -10183,8 +10332,20 @@ BOOLEAN HandlePreloadOfMapGraphics( void )
|
||||
/*strcpy(vs_desc.ImageFile, "INTERFACE\\playlist3.pcx");
|
||||
CHECKF(AddVideoSurface( &vs_desc, &guiCHARLIST ));*/
|
||||
|
||||
// WANNE 2
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3.sti", VObjectDesc.ImageFile );
|
||||
if (iResolution == 0)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 1)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3_800x600.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
else if (iResolution == 2)
|
||||
{
|
||||
FilenameForBPP("INTERFACE\\newgoldpiece3_1024x768.sti", VObjectDesc.ImageFile );
|
||||
}
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARLIST));
|
||||
|
||||
//VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
@@ -10494,6 +10655,106 @@ void NextInventoryMapBtnCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
}
|
||||
}
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
//void BtnMercsUpMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
//{
|
||||
// // WANNE 2 -> see Map Screen Interface Bottom Line 766 (BtnMessageUpMapScreenCallback)
|
||||
// int i = 10;
|
||||
//}
|
||||
//
|
||||
//void BtnMercsDownMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
//{
|
||||
// // WANNE 2 -> see Map Screen Interface Bottom Line 766 (BtnMessageUpMapScreenCallback)
|
||||
// int i = 10;
|
||||
//}
|
||||
//
|
||||
//void BtnVehicleUpMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
//{
|
||||
// // WANNE 2 -> see Map Screen Interface Bottom Line 766 (BtnMessageUpMapScreenCallback)
|
||||
// int i = 10;
|
||||
//}
|
||||
//
|
||||
//void BtnVehicleDownMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
|
||||
//{
|
||||
// // WANNE 2 -> see Map Screen Interface Bottom Line 766 (BtnMessageUpMapScreenCallback)
|
||||
// int i = 10;
|
||||
//}
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
//void DeleteButtonsForScrolling(void)
|
||||
//{
|
||||
// if (fScrollButtonsInitialized == TRUE)
|
||||
// {
|
||||
// // mercs scroll buttons
|
||||
// RemoveButton( guiMapMercsScrollButtons[ 0 ]);
|
||||
// RemoveButton( guiMapMercsScrollButtons[ 1 ]);
|
||||
// UnloadButtonImage( guiMapMercsScrollButtonsImage[ 0 ] );
|
||||
// UnloadButtonImage( guiMapMercsScrollButtonsImage[ 1 ] );
|
||||
//
|
||||
// RemoveButton( guiMapVehicleScrollButtons[ 0 ]);
|
||||
// RemoveButton( guiMapVehicleScrollButtons[ 1 ]);
|
||||
// UnloadButtonImage( guiMapVehicleScrollButtonsImage[ 0 ] );
|
||||
// UnloadButtonImage( guiMapVehicleScrollButtonsImage[ 1 ] );
|
||||
//
|
||||
// fScrollButtonsInitialized = FALSE;
|
||||
// }
|
||||
//}
|
||||
|
||||
// WANNE 2 <scroll>
|
||||
// Create the scrolling arrows
|
||||
//void CreateButtonsForScrolling( void )
|
||||
//{
|
||||
// if (fScrollButtonsInitialized == FALSE)
|
||||
// {
|
||||
// INT32 iXPos = 247;
|
||||
// INT32 iMercUpY = -1;
|
||||
// INT32 iVehicleUpY = -1;
|
||||
//
|
||||
// if (iResolution == 0)
|
||||
// {
|
||||
// iMercUpY = 207;
|
||||
// iVehicleUpY = 321;
|
||||
// }
|
||||
// else if (iResolution == 1)
|
||||
// {
|
||||
// iMercUpY = 256;
|
||||
// iVehicleUpY = 429;
|
||||
// }
|
||||
// else if (iResolution == 2)
|
||||
// {
|
||||
// iMercUpY = 328;
|
||||
// iVehicleUpY = 579;
|
||||
// }
|
||||
//
|
||||
// // merc - scroll up
|
||||
// guiMapMercsScrollButtonsImage[ MAP_SCROLL_MERCS_UP ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,11,4,-1,6,-1 );
|
||||
// guiMapMercsScrollButtons[ MAP_SCROLL_MERCS_UP ] = QuickCreateButton( guiMapMercsScrollButtonsImage[ MAP_SCROLL_MERCS_UP ], iXPos, iMercUpY,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMercsUpMapScreenCallback);
|
||||
//
|
||||
// // merc - scroll down
|
||||
// guiMapMercsScrollButtonsImage[ MAP_SCROLL_MERCS_DOWN ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,12,5,-1,7,-1 );
|
||||
// guiMapMercsScrollButtons[ MAP_SCROLL_MERCS_DOWN ] = QuickCreateButton( guiMapMercsScrollButtonsImage[ MAP_SCROLL_MERCS_DOWN ], iXPos, iMercUpY + 17,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMercsDownMapScreenCallback);
|
||||
//
|
||||
// // vehicle - scroll up
|
||||
// guiMapVehicleScrollButtonsImage[ MAP_SCROLL_VEHICLE_UP ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,11,4,-1,6,-1 );
|
||||
// guiMapVehicleScrollButtons[ MAP_SCROLL_VEHICLE_UP ] = QuickCreateButton( guiMapVehicleScrollButtonsImage[ MAP_SCROLL_VEHICLE_UP ], iXPos, iVehicleUpY,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnVehicleUpMapScreenCallback);
|
||||
//
|
||||
// // vehicle - scroll down
|
||||
// guiMapVehicleScrollButtonsImage[ MAP_SCROLL_VEHICLE_DOWN ]= LoadButtonImage( "INTERFACE\\map_screen_bottom_arrows.sti" ,12,5,-1,7,-1 );
|
||||
// guiMapVehicleScrollButtons[ MAP_SCROLL_VEHICLE_DOWN ] = QuickCreateButton( guiMapVehicleScrollButtonsImage[ MAP_SCROLL_VEHICLE_DOWN ], iXPos, iVehicleUpY + 17,
|
||||
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnVehicleDownMapScreenCallback);
|
||||
//
|
||||
// fScrollButtonsInitialized = TRUE;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
void CreateDestroyMapCharacterScrollButtons( void )
|
||||
{
|
||||
static BOOLEAN fCreated = FALSE;
|
||||
@@ -11072,7 +11333,9 @@ void DisplayIconsForMercsAsleep( void )
|
||||
pSoldier = MercPtrs[ gCharactersList[ iCounter ].usSolID ];
|
||||
if( pSoldier->bActive && pSoldier->fMercAsleep && CanChangeSleepStatusForSoldier( pSoldier ) )
|
||||
{
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, 125, ( INT16 )( Y_START+(iCounter * ( Y_SIZE + 2 ) ) ) , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
// WANNE 2
|
||||
//BltVideoObject( guiSAVEBUFFER , hHandle, 0, 125, ( INT16 )( Y_START+(iCounter * ( Y_SIZE + 2 ) ) ) , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
BltVideoObject( guiSAVEBUFFER , hHandle, 0, SLEEP_X + 2, ( INT16 )( Y_START+(iCounter * ( Y_SIZE + 2 ) ) ) , VO_BLT_SRCTRANSPARENCY,NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11088,25 +11351,30 @@ void CheckForAndRenderNewMailOverlay()
|
||||
{
|
||||
if( GetJA2Clock() % 1000 < 667 )
|
||||
{
|
||||
// WANNE 2
|
||||
if( ButtonList[ guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||
{ //button is down, so offset the icon
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 1, 465, 418, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
InvalidateRegion( 465, 418, 480, 428 );
|
||||
//BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 1, 465, 418, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 1, (SCREEN_WIDTH - 175), (SCREEN_HEIGHT - 62), VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
//InvalidateRegion( 465, 418, 480, 428 );
|
||||
InvalidateRegion( (SCREEN_WIDTH - 175), (SCREEN_HEIGHT - 62), (SCREEN_WIDTH - 160), (SCREEN_HEIGHT - 52 ));
|
||||
}
|
||||
// WANNE 2
|
||||
else
|
||||
{ //button is up, so draw the icon normally
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 0, 464, 417, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
{ //button is up, so draw the icon normally
|
||||
//BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 0, 464, 417, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiNewMailIcons, 0, (SCREEN_WIDTH - 176), (SCREEN_HEIGHT - 63), VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
if( !(ButtonList[ guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] ]->uiFlags & BUTTON_ENABLED ) )
|
||||
{
|
||||
UINT32 uiDestPitchBYTES;
|
||||
UINT8 *pDestBuf;
|
||||
SGPRect area = { 463, 417, 477, 425 };
|
||||
SGPRect area = { (SCREEN_WIDTH - 177), (SCREEN_HEIGHT - 63), (SCREEN_WIDTH - 163), (SCREEN_HEIGHT - 55) };
|
||||
|
||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||
Blt16BPPBufferHatchRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &area );
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
}
|
||||
InvalidateRegion( 463, 417, 481, 430 );
|
||||
InvalidateRegion( (SCREEN_WIDTH - 177), (SCREEN_HEIGHT - 63), (SCREEN_WIDTH - 159), (SCREEN_HEIGHT - 50) );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+12
-19
@@ -1,3 +1,4 @@
|
||||
// WANNE 2 <changed some lines>
|
||||
#ifdef PRECOMPILEDHEADERS
|
||||
#include "Strategic All.h"
|
||||
#include "Loading Screen.h"
|
||||
@@ -773,6 +774,7 @@ UINT32 UndergroundTacticalTraversalTime( INT8 bExitDirection )
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
// WANNE 2 <zooming>
|
||||
void BeginLoadScreen( void )
|
||||
{
|
||||
SGPRect SrcRect, DstRect;
|
||||
@@ -788,13 +790,14 @@ void BeginLoadScreen( void )
|
||||
{
|
||||
DstRect.iLeft = 0;
|
||||
DstRect.iTop = 0;
|
||||
DstRect.iRight = 640;
|
||||
DstRect.iBottom = 480;
|
||||
DstRect.iRight = SCREEN_WIDTH;
|
||||
DstRect.iBottom = SCREEN_HEIGHT;
|
||||
uiTimeRange = 2000;
|
||||
iPercentage = 0;
|
||||
iLastShadePercentage = 0;
|
||||
uiStartTime = GetJA2Clock();
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
|
||||
|
||||
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
PlayJA2SampleFromFile( "SOUNDS\\Final Psionic Blast 01 (16-44).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
|
||||
while( iPercentage < 100 )
|
||||
{
|
||||
@@ -811,31 +814,21 @@ void BeginLoadScreen( void )
|
||||
|
||||
if( iPercentage > 50 )
|
||||
{
|
||||
//iFactor = (iPercentage - 50) * 2;
|
||||
//if( iFactor > iLastShadePercentage )
|
||||
// {
|
||||
//Calculate the difference from last shade % to the new one. Ex: Going from
|
||||
//50% shade value to 60% shade value requires applying 20% to the 50% to achieve 60%.
|
||||
//if( iLastShadePercentage )
|
||||
// iReqShadePercentage = 100 - (iFactor * 100 / iLastShadePercentage);
|
||||
//else
|
||||
// iReqShadePercentage = iFactor;
|
||||
//Record the new final shade percentage.
|
||||
//iLastShadePercentage = iFactor;
|
||||
ShadowVideoSurfaceRectUsingLowPercentTable( guiSAVEBUFFER, 0, 0, 640, 480 );
|
||||
// }
|
||||
ShadowVideoSurfaceRectUsingLowPercentTable( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
|
||||
}
|
||||
|
||||
SrcRect.iLeft = 536 * iPercentage / 100;
|
||||
SrcRect.iRight = 640 - iPercentage / 20;
|
||||
SrcRect.iRight = SCREEN_WIDTH - iPercentage / 20;
|
||||
SrcRect.iTop = 367 * iPercentage / 100;
|
||||
SrcRect.iBottom = 480 - 39 * iPercentage / 100;
|
||||
SrcRect.iBottom = SCREEN_HEIGHT - 39 * iPercentage / 100;
|
||||
|
||||
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &SrcRect, &DstRect );
|
||||
InvalidateScreen();
|
||||
RefreshScreen( NULL );
|
||||
}
|
||||
}
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, 640, 480, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||
|
||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||
InvalidateScreen( );
|
||||
RefreshScreen( NULL );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user