Merge branch 'master' into loading-screens-multi-res

This commit is contained in:
Andrzej Fałkowski
2023-08-31 23:29:21 +02:00
18 changed files with 389 additions and 181 deletions
+5 -3
View File
@@ -15,6 +15,8 @@
#include "CharProfile.h" #include "CharProfile.h"
#include "soldier profile type.h" #include "soldier profile type.h"
#include "IMP Compile Character.h" #include "IMP Compile Character.h"
#include "IMP Disability Trait.h"
#include "IMP Character Trait.h"
#include "GameSettings.h" #include "GameSettings.h"
#include "Interface.h" #include "Interface.h"
@@ -671,7 +673,7 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
return FALSE; return FALSE;
} }
switch ( iPersonality ) switch ( iChosenDisabilityTrait() )
{ {
case HEAT_INTOLERANT: case HEAT_INTOLERANT:
if ( zBackground[ ubNumber ].value[BG_DESERT] > 0 ) if ( zBackground[ ubNumber ].value[BG_DESERT] > 0 )
@@ -707,7 +709,7 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
break; break;
} }
switch ( iAttitude ) switch ( iChosenCharacterTrait() )
{ {
case CHAR_TRAIT_SOCIABLE: case CHAR_TRAIT_SOCIABLE:
if ( zBackground[ ubNumber ].uiFlags & BACKGROUND_XENOPHOBIC ) if ( zBackground[ ubNumber ].uiFlags & BACKGROUND_XENOPHOBIC )
@@ -807,4 +809,4 @@ void BtnIMPBackgroundPreviousCallback(GUI_BUTTON *btn,INT32 reason)
usBackground = 0; usBackground = 0;
} }
} }
} }
+3
View File
@@ -855,6 +855,9 @@ void RenderMainMenu()
DrawTextToScreen( L"BLOCKFONTNARROW: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 445, 640, BLOCKFONTNARROW, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"BLOCKFONTNARROW: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 445, 640, BLOCKFONTNARROW, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( L"FONT14HUMANIST: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 465, 640, FONT14HUMANIST, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED ); DrawTextToScreen( L"FONT14HUMANIST: ÄÀÁÂÇËÈÉÊÏÖÒÓÔÜÙÚÛäàáâçëèéêïöòóôüùúûÌÎìî"/*gzCopyrightText[ 0 ]*/, 0, 465, 640, FONT14HUMANIST, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
#else #else
CHAR16 text[128];
swprintf(text, L"%s: %s %S %s", pMessageStrings[ MSG_VERSION ], zProductLabel, czVersionString, zBuildInformation );
DrawTextToScreen( text, 10, 10, SCREEN_WIDTH, TINYFONT1, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
DrawTextToScreen( gzCopyrightText[ 0 ], 0, SCREEN_HEIGHT - 20, SCREEN_WIDTH, FONT10ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED ); DrawTextToScreen( gzCopyrightText[ 0 ], 0, SCREEN_HEIGHT - 20, SCREEN_WIDTH, FONT10ARIAL, FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
#endif #endif
+2 -2
View File
@@ -681,7 +681,7 @@ UINT32 AutoResolveScreenHandle()
SGPRect ClipRect; SGPRect ClipRect;
gpAR->fEnteringAutoResolve = FALSE; gpAR->fEnteringAutoResolve = FALSE;
//Take the framebuffer, shade it, and save it to the SAVEBUFFER. //Take the framebuffer, shade it, and save it to the SAVEBUFFER.
ClipRect.iLeft = 0 + xResOffset; ClipRect.iLeft = 0;
ClipRect.iTop = 0; ClipRect.iTop = 0;
/*ClipRect.iRight = 640; /*ClipRect.iRight = 640;
ClipRect.iBottom = 480;*/ ClipRect.iBottom = 480;*/
@@ -692,7 +692,7 @@ UINT32 AutoResolveScreenHandle()
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect ); Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
UnLockVideoSurface( FRAME_BUFFER ); UnLockVideoSurface( FRAME_BUFFER );
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 ); //BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
KillPreBattleInterface(); KillPreBattleInterface();
CalculateAutoResolveInfo(); CalculateAutoResolveInfo();
CalculateSoldierCells( FALSE ); CalculateSoldierCells( FALSE );
+1 -1
View File
@@ -1936,7 +1936,7 @@ BOOLEAN AllowedToExitFromMapscreenTo( INT8 bExitToWhere )
} }
// battle about to occur? // battle about to occur?
if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) ) if( ( fDisableDueToBattleRoster ) || ( fDisableMapInterfaceDueToBattle ) || ( gfPreBattleInterfaceActive ))
{ {
return( FALSE ); return( FALSE );
} }
+34 -8
View File
@@ -4582,6 +4582,28 @@ void HandleSettingTheSelectedListOfMercs( void )
INT8 pbErrorNumber = -1; INT8 pbErrorNumber = -1;
pSoldier = MercPtrs[gCharactersList[GetSelectedDestChar()].usSolID]; pSoldier = MercPtrs[gCharactersList[GetSelectedDestChar()].usSolID];
INT8 bSquadValue = pSoldier->bAssignment; INT8 bSquadValue = pSoldier->bAssignment;
if (bSquadValue == VEHICLE)
{
for (INT8 bCounter = 0; bCounter < NUMBER_OF_SQUADS; ++bCounter)
{
if (Squad[bCounter][0] != NULL && IsVehicle(Squad[bCounter][0]) &&
Squad[bCounter][0]->bVehicleID == pSoldier->iVehicleId)
{
bSquadValue = bCounter;
break;
}
}
}
if (bSquadValue >= NUMBER_OF_SQUADS)
{
if (pbErrorNumber != -1)
{
ReportMapScreenMovementError(pbErrorNumber);
}
SetSelectedDestChar(-1);
giDestHighLine = -1;
return;
}
// find number of characters in particular squad. // find number of characters in particular squad.
for (INT8 bCounter = 0; bCounter < NUMBER_OF_SOLDIERS_PER_SQUAD; ++bCounter) for (INT8 bCounter = 0; bCounter < NUMBER_OF_SOLDIERS_PER_SQUAD; ++bCounter)
@@ -4693,17 +4715,21 @@ INT8 FindSquadThatSoldierCanJoin( SOLDIERTYPE *pSoldier )
// run through the list of squads // run through the list of squads
for( bCounter = 0; bCounter < NUMBER_OF_SQUADS; bCounter++ ) for( bCounter = 0; bCounter < NUMBER_OF_SQUADS; bCounter++ )
{ {
// is this squad in this sector // anv: don't automatically put people in vehicle squads
if( IsThisSquadInThisSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, bCounter ) ) if (Squad[bCounter][0] == NULL || !IsVehicle(Squad[bCounter][0]))
{ {
// does it have room? // is this squad in this sector
if( IsThisSquadFull( bCounter ) == FALSE ) if (IsThisSquadInThisSector(pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, bCounter))
{ {
// is it doing the same thing as the soldier is (staying or going) ? // does it have room?
if( IsSquadSelectedForMovement( bCounter ) == IsSoldierSelectedForMovement( pSoldier ) ) if (IsThisSquadFull(bCounter) == FALSE)
{ {
// go ourselves a match, then // is it doing the same thing as the soldier is (staying or going) ?
return( bCounter ); if (IsSquadSelectedForMovement(bCounter) == IsSoldierSelectedForMovement(pSoldier))
{
// go ourselves a match, then
return(bCounter);
}
} }
} }
} }
+197 -127
View File
@@ -48,6 +48,7 @@
#include "militiasquads.h" // added by Flugente #include "militiasquads.h" // added by Flugente
#include "SkillCheck.h" // added by Flugente #include "SkillCheck.h" // added by Flugente
#include "Strategic Transport Groups.h" #include "Strategic Transport Groups.h"
#include "Utilities.h"
#ifdef JA2UB #ifdef JA2UB
#include "ub_config.h" #include "ub_config.h"
@@ -99,13 +100,23 @@ enum //GraphicIDs for the panel
#define ROW_HEIGHT 10 #define ROW_HEIGHT 10
//The start of the black space //The start of the black space
#define TOP_Y 113 #define TOP_Y 113
#define TOP_Y_TEXT_BUFFER 1
//The end of the black space //The end of the black space
//#define BOTTOM_Y (349+(OUR_TEAM_SIZE_NO_VEHICLE-18)*ROW_HEIGHT) #define BOTTOM_HEIGHT 8
#define BOTTOM_Y 349
//The internal height of the uninvolved panel //The internal height of the uninvolved panel
#define INTERNAL_HEIGHT 27 #define UNINVOLVED_RELEVANT_HEIGHT 28
//The actual height of the uninvolved panel #define UNINVOLVED_OFFSET_HEIGHT 7
#define ACTUAL_HEIGHT 24
#define PREBATTLE_INTERFACE_WIDTH 261
INT32 iPrebattleInterfaceHeight = 360;
UINT16 xOffset;
UINT16 yOffset;
UINT16 blanketStartX;
UINT16 blanketStartY;
INT16 bListOffset = 0;
UINT16 ubDesiredListHeight = 0;
UINT16 ubAllowedListHeight = 0;
BOOLEAN gfDisplayPotentialRetreatPaths = FALSE; BOOLEAN gfDisplayPotentialRetreatPaths = FALSE;
UINT16 gusRetreatButtonLeft, gusRetreatButtonTop, gusRetreatButtonRight, gusRetreatButtonBottom; UINT16 gusRetreatButtonLeft, gusRetreatButtonTop, gusRetreatButtonRight, gusRetreatButtonBottom;
@@ -300,6 +311,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
gAmbushRadiusModifier = 0.0f; gAmbushRadiusModifier = 0.0f;
bListOffset = 0;
// ARM: Feb01/98 - Cancel out of mapscreen movement plotting if PBI subscreen is coming up // ARM: Feb01/98 - Cancel out of mapscreen movement plotting if PBI subscreen is coming up
if ( ( GetSelectedDestChar() != -1) || fPlotForHelicopter || fPlotForMilitia ) if ( ( GetSelectedDestChar() != -1) || fPlotForHelicopter || fPlotForMilitia )
{ {
@@ -481,32 +494,69 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
fMapScreenBottomDirty = TRUE; fMapScreenBottomDirty = TRUE;
ChangeSelectedMapSector( gubPBSectorX, gubPBSectorY, gubPBSectorZ ); ChangeSelectedMapSector( gubPBSectorX, gubPBSectorY, gubPBSectorZ );
// Headrock: Added FALSE argument, We might need TRUE but not sure. Will need to initiate battle :)
RenderMapScreenInterfaceBottom( FALSE );
if( !fShowTeamFlag ) if( !fShowTeamFlag )
{ {
ToggleShowTeamsMode(); ToggleShowTeamsMode();
} }
//Define the blanket region to cover all of the other regions used underneath the panel.
MSYS_DefineRegion( &PBInterfaceBlanket, 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
//Create the panel //Create the panel
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE; VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
GetMLGFilename( VObjectDesc.ImageFile, MLG_PREBATTLEPANEL );
// anv: prebattle interface per vertical resolution
if (isWidescreenUI())
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_1280x720);
iPrebattleInterfaceHeight = 600;
xOffset = xResOffset + 15;
yOffset = 0;
blanketStartX = 0;
blanketStartY = 0;
}
else if (iResolution >= _640x480 && iResolution < _800x600)
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL);
iPrebattleInterfaceHeight = 360;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
else if (iResolution < _1024x768)
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_800x600);
iPrebattleInterfaceHeight = 478;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
else
{
GetMLGFilename(VObjectDesc.ImageFile, MLG_PREBATTLEPANEL_1024x768);
iPrebattleInterfaceHeight = 647;
xOffset = xResOffset;
yOffset = yResOffset;
blanketStartX = yOffset;
blanketStartY = yOffset;
}
ubAllowedListHeight = iPrebattleInterfaceHeight - TOP_Y - BOTTOM_HEIGHT;
if( !AddVideoObject( &VObjectDesc, &uiInterfaceImages ) ) if( !AddVideoObject( &VObjectDesc, &uiInterfaceImages ) )
AssertMsg( 0, "Failed to load interface\\PreBattlePanel.sti" ); AssertMsg( 0, "Failed to load interface\\PreBattlePanel.sti" );
//Define the blanket region to cover all of the other regions used underneath the panel.
MSYS_DefineRegion( &PBInterfaceBlanket, blanketStartX, blanketStartY, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset, MSYS_PRIORITY_HIGHEST, 0, 0, 0 );
//Create the 3 buttons //Create the 3 buttons
iPBButtonImage[0] = LoadButtonImage( "INTERFACE\\PreBattleButton.sti", -1, 0, -1, 1, -1 ); iPBButtonImage[0] = LoadButtonImage( "INTERFACE\\PreBattleButton.sti", -1, 0, -1, 1, -1 );
if( iPBButtonImage[ 0 ] == -1 ) if( iPBButtonImage[ 0 ] == -1 )
AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" ); AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" );
iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 ); iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 ); iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback ); iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback ); iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xResOffset, 54 + yResOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback ); iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xOffset, 54 + yOffset, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 ); SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 ); SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
@@ -1050,7 +1100,7 @@ void DoTransitionFromMapscreenToPreBattleInterface()
INT32 iPercentage, iFactor; INT32 iPercentage, iFactor;
UINT32 uiTimeRange; UINT32 uiTimeRange;
INT16 sStartLeft, sEndLeft, sStartTop, sEndTop; INT16 sStartLeft, sEndLeft, sStartTop, sEndTop;
INT32 iLeft, iTop, iWidth, iHeight; INT32 iLeft, iTop, iWidth;
BOOLEAN fEnterAutoResolveMode = FALSE; BOOLEAN fEnterAutoResolveMode = FALSE;
if( !gfExtraBuffer ) if( !gfExtraBuffer )
@@ -1058,12 +1108,11 @@ void DoTransitionFromMapscreenToPreBattleInterface()
PauseTime( FALSE ); PauseTime( FALSE );
PBIRect.iLeft = 0 + xResOffset; PBIRect.iLeft = 0 + xOffset;
PBIRect.iTop = 0 + yResOffset; PBIRect.iTop = 0 + yOffset;
PBIRect.iRight = 261 + xResOffset; PBIRect.iRight = PREBATTLE_INTERFACE_WIDTH + xOffset;
PBIRect.iBottom = 359 + yResOffset; PBIRect.iBottom = iPrebattleInterfaceHeight + yOffset;
iWidth = 261; iWidth = PREBATTLE_INTERFACE_WIDTH;
iHeight = 359;
uiTimeRange = 1000; uiTimeRange = 1000;
iPercentage = 0; iPercentage = 0;
@@ -1072,8 +1121,8 @@ void DoTransitionFromMapscreenToPreBattleInterface()
GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop ); GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop );
sStartLeft += UI_MAP.GridSize.iX / 2; sStartLeft += UI_MAP.GridSize.iX / 2;
sStartTop += UI_MAP.GridSize.iY / 2; sStartTop += UI_MAP.GridSize.iY / 2;
sEndLeft = 131 + xResOffset; sEndLeft = PBIRect.iLeft;
sEndTop = 180 + yResOffset; sEndTop = PBIRect.iTop;
//save the mapscreen buffer //save the mapscreen buffer
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
@@ -1095,17 +1144,23 @@ void DoTransitionFromMapscreenToPreBattleInterface()
gfEnterAutoResolveMode = TRUE; gfEnterAutoResolveMode = TRUE;
} }
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xResOffset, 54 + yResOffset, 209, 32 ); BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xOffset, 54 + yOffset, 209, 32 );
RenderButtons(); RenderButtons();
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xResOffset, 54 + yResOffset, 209, 32 ); BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xOffset, 54 + yOffset, 209, 32 );
gfRenderPBInterface = TRUE; gfRenderPBInterface = TRUE;
//hide the prebattle interface //hide the prebattle interface
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset ); BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xOffset, 0 + yOffset, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset );
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN ); PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
InvalidateScreen(); InvalidateScreen();
RefreshScreen( NULL ); RefreshScreen( NULL );
SGPRect PrevRect;
PrevRect.iLeft = sStartLeft;
PrevRect.iRight = sStartLeft + 1;
PrevRect.iTop = sStartTop;
PrevRect.iBottom = sStartTop + 1;
while( iPercentage < 100 ) while( iPercentage < 100 )
{ {
uiCurrTime = GetJA2Clock(); uiCurrTime = GetJA2Clock();
@@ -1117,19 +1172,12 @@ void DoTransitionFromMapscreenToPreBattleInterface()
if( iPercentage < 50 ) if( iPercentage < 50 )
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5); iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
else else
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.05); iPercentage = (UINT32)(iPercentage + (100 - iPercentage) * iFactor * 0.01 + 0.05);
//Calculate the center point. DstRect.iLeft = sStartLeft + (sEndLeft - sStartLeft) * iPercentage / 100;
iLeft = sStartLeft - (sStartLeft-sEndLeft+1) * iPercentage / 100;
if( sStartTop > sEndTop )
iTop = sStartTop - (sStartTop-sEndTop+1) * iPercentage / 100;
else
iTop = sStartTop + (sEndTop-sStartTop+1) * iPercentage / 100;
DstRect.iLeft = iLeft - iWidth * iPercentage / 200;
DstRect.iRight = DstRect.iLeft + max( iWidth * iPercentage / 100, 1 ); DstRect.iRight = DstRect.iLeft + max( iWidth * iPercentage / 100, 1 );
DstRect.iTop = iTop - iHeight * iPercentage / 200; DstRect.iTop = sStartTop + (sEndTop - sStartTop) * iPercentage / 100;
DstRect.iBottom = DstRect.iTop + max( iHeight * iPercentage / 100, 1 ); DstRect.iBottom = DstRect.iTop + max(iPrebattleInterfaceHeight * iPercentage / 100, 1);
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &PBIRect, &DstRect ); BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &PBIRect, &DstRect );
@@ -1137,14 +1185,35 @@ void DoTransitionFromMapscreenToPreBattleInterface()
RefreshScreen( NULL ); RefreshScreen( NULL );
//Restore the previous rect. //Restore the previous rect.
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, (UINT16)DstRect.iLeft, (UINT16)DstRect.iTop, BlitBufferToBuffer(guiEXTRABUFFER, FRAME_BUFFER, (UINT16)PrevRect.iLeft, (UINT16)PrevRect.iTop,
(UINT16)(DstRect.iRight-DstRect.iLeft+1), (UINT16)(DstRect.iBottom-DstRect.iTop+1) ); (UINT16)PrevRect.iRight, (UINT16)PrevRect.iBottom);
PrevRect.iLeft = DstRect.iLeft;
PrevRect.iRight = DstRect.iRight;
PrevRect.iTop = DstRect.iTop;
PrevRect.iBottom = DstRect.iBottom;
} }
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT ); BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
gfZoomDone = TRUE; gfZoomDone = TRUE;
} }
void ScrollPreBattleInterface( BOOLEAN fUp )
{
if ( ubDesiredListHeight <= ubAllowedListHeight )
return;
if ( fUp )
{
bListOffset = max( 0, bListOffset - ubAllowedListHeight );
}
else
{
bListOffset = min( bListOffset + ubAllowedListHeight, ubDesiredListHeight - ubAllowedListHeight );
}
gfRenderPBInterface = TRUE;
}
void KillPreBattleInterface() void KillPreBattleInterface()
{ {
if( !gfPreBattleInterfaceActive ) if( !gfPreBattleInterfaceActive )
@@ -1184,7 +1253,7 @@ void KillPreBattleInterface()
//Enable the options button when the auto resolve screen comes up //Enable the options button when the auto resolve screen comes up
EnableDisAbleMapScreenOptionsButton( TRUE ); EnableDisAbleMapScreenOptionsButton( TRUE );
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, 359 + yResOffset, 0 ); ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, PREBATTLE_INTERFACE_WIDTH + xOffset, iPrebattleInterfaceHeight + yOffset, 0 );
EnableTeamInfoPanels(); EnableTeamInfoPanels();
if( ButtonList[ giMapContractButton ] ) if( ButtonList[ giMapContractButton ] )
@@ -1277,8 +1346,8 @@ void RenderPBHeader( INT32 *piX, INT32 *piWidth)
} }
width = StringPixLength( str, FONT10ARIALBOLD ); width = StringPixLength( str, FONT10ARIALBOLD );
x = 130 - width / 2; x = 130 - width / 2;
mprintf( x + xResOffset, 4 + yResOffset, str ); mprintf( x + xOffset, 4 + yOffset, str );
InvalidateRegion( 0, 0, 231 + xResOffset, 12 + yResOffset ); InvalidateRegion( 0, 0, 231 + xOffset, 12 + yOffset );
*piX = x; *piX = x;
*piWidth = width; *piWidth = width;
} }
@@ -1293,10 +1362,15 @@ void RenderPreBattleInterface()
UINT8 ubHPPercent, ubBPPercent; UINT8 ubHPPercent, ubBPPercent;
BOOLEAN fMouseInRetreatButtonArea; BOOLEAN fMouseInRetreatButtonArea;
UINT8 ubJunk; UINT8 ubJunk;
SGPRect ClipRect;
UINT16 ubDesiredParticipantsListHeight = 0;
UINT16 ubDesiredUninvolvedListHeight = 0;
UINT16 ubUninvolvedStartY = 0;
//PLAYERGROUP *pPlayer; //PLAYERGROUP *pPlayer;
// Make the background black! // Make the background black!
//ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, SCREEN_HEIGHT - 120, 0 ); //ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xOffset, SCREEN_HEIGHT - 120, 0 );
//This code determines if the cursor is inside the rectangle consisting of the //This code determines if the cursor is inside the rectangle consisting of the
//retreat button. If it is inside, then we set up the variables so that the retreat //retreat button. If it is inside, then we set up the variables so that the retreat
@@ -1337,33 +1411,21 @@ void RenderPreBattleInterface()
gfRenderPBInterface = FALSE; gfRenderPBInterface = FALSE;
GetVideoObject( &hVObject, uiInterfaceImages ); GetVideoObject( &hVObject, uiInterfaceImages );
//main panel //main panel
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xResOffset, yResOffset, VO_BLT_SRCTRANSPARENCY, NULL ); BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xOffset, yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
//main title //main title
RenderPBHeader( &x, &width ); RenderPBHeader( &x, &width );
//now draw the title bars up to the text. //now draw the title bars up to the text.
for( i = x - 12; i > 20; i -= 10 ) for( i = x - 12; i > 20; i -= 10 )
{ {
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6 + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL ); BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xOffset, 6 + yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
} }
for( i = x + width + 2; i < 231; i += 10 ) for( i = x + width + 2; i < 231; i += 10 )
{ {
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6 + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL ); BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xOffset, 6 + yOffset, VO_BLT_SRCTRANSPARENCY, NULL );
} }
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL); // header
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 10, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 20, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, BOTTOM_Y + yResOffset + 30, VO_BLT_SRCTRANSPARENCY, NULL);
//Draw the bottom edges
for (i = 0; i < max(guiNumUninvolved, 1); i++)
{
y = BOTTOM_Y + ROW_HEIGHT * (i + 1) + 30;
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_LINE, 0 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
}
BltVideoObject(guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xResOffset, BOTTOM_Y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_END, 0 + xResOffset, BOTTOM_Y + yResOffset + 35 + ROW_HEIGHT * max(guiNumUninvolved, 1), VO_BLT_SRCTRANSPARENCY, NULL);
SetFont( BLOCKFONT ); SetFont( BLOCKFONT );
SetFontForeground( FONT_BEIGE ); SetFontForeground( FONT_BEIGE );
swprintf( str, gpStrategicString[ STR_PB_LOCATION ] ); swprintf( str, gpStrategicString[ STR_PB_LOCATION ] );
@@ -1373,7 +1435,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW ); SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW ); width = StringPixLength( str, BLOCKFONTNARROW );
} }
mprintf( 65 - width + xResOffset , 17 + yResOffset, str ); mprintf( 65 - width + xOffset , 17 + yOffset, str );
SetFont( BLOCKFONT ); SetFont( BLOCKFONT );
if( GetEnemyEncounterCode() == CREATURE_ATTACK_CODE ) if( GetEnemyEncounterCode() == CREATURE_ATTACK_CODE )
@@ -1405,7 +1467,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW ); SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW ); width = StringPixLength( str, BLOCKFONTNARROW );
} }
mprintf( 54 + xResOffset - width , 38 + yResOffset, str ); mprintf( 54 + xOffset - width , 38 + yOffset, str );
SetFont( BLOCKFONT ); SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MERCS ] ); swprintf( str, gpStrategicString[ STR_PB_MERCS ] );
@@ -1415,7 +1477,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW ); SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW ); width = StringPixLength( str, BLOCKFONTNARROW );
} }
mprintf( 139 + xResOffset - width , 38 + yResOffset, str ); mprintf( 139 + xOffset - width , 38 + yOffset, str );
SetFont( BLOCKFONT ); SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MILITIA ] ); swprintf( str, gpStrategicString[ STR_PB_MILITIA ] );
@@ -1425,29 +1487,53 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW ); SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW ); width = StringPixLength( str, BLOCKFONTNARROW );
} }
mprintf( 224 + xResOffset - width , 38 + yResOffset, str ); mprintf( 224 + xOffset - width , 38 + yOffset, str );
//Draw the bottom columns ubDesiredParticipantsListHeight = guiNumInvolved * ROW_HEIGHT;
for( i = 0; i < (INT32)max( guiNumUninvolved, 1 ); i++ ) ubDesiredUninvolvedListHeight = UNINVOLVED_RELEVANT_HEIGHT + max(guiNumUninvolved, 1) * ROW_HEIGHT;
ubDesiredListHeight = ubDesiredParticipantsListHeight + ubDesiredUninvolvedListHeight;
if (ubDesiredListHeight >= ubAllowedListHeight)
{ {
y = BOTTOM_Y + ROW_HEIGHT * (i+1) + 1 + ACTUAL_HEIGHT; ubUninvolvedStartY = ubDesiredParticipantsListHeight;
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL ); }
else
{
ubUninvolvedStartY = ubAllowedListHeight - ubDesiredUninvolvedListHeight;
} }
// WDS - make number of mercenaries, etc. be configurable ClipRect.iLeft = xOffset;
for( i = 0; i < (INT32)(25/*3+ OUR_TEAM_SIZE_NO_VEHICLE - max( guiNumUninvolved, 1 )*/); i++ ) ClipRect.iTop = yOffset + TOP_Y;
ClipRect.iRight = xOffset + PREBATTLE_INTERFACE_WIDTH;
ClipRect.iBottom = yOffset + TOP_Y + ubAllowedListHeight;// + TOP_Y_BUFFER;
SetClippingRect(&ClipRect);
// Draw the top columns
// Draw from the top to uninvolved header
for ( y = TOP_Y - bListOffset; y < TOP_Y - bListOffset + ubUninvolvedStartY; y += ROW_HEIGHT )
{ {
y = TOP_Y + ROW_HEIGHT * i; BltVideoObject(guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xOffset, y + yOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL);
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xResOffset, y + yResOffset, VO_BLT_SRCTRANSPARENCY, NULL );
} }
// Draw extra empty participants rows to close off bottom of the content area
for ( y = TOP_Y - bListOffset + ubUninvolvedStartY + ROW_HEIGHT; y < TOP_Y - bListOffset + ubUninvolvedStartY + ubDesiredUninvolvedListHeight; y += ROW_HEIGHT )
{
BltVideoObject(guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xOffset, y + yOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL);
}
// Draw uninvolved header
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xOffset, yOffset + TOP_Y + ubUninvolvedStartY - UNINVOLVED_OFFSET_HEIGHT - bListOffset, VO_BLT_CLIP | VO_BLT_SRCTRANSPARENCY, NULL );
RestoreClipRegionToFullScreen();
//location //location
SetFont( FONT10ARIAL ); SetFont( FONT10ARIAL );
SetFontForeground( FONT_YELLOW ); SetFontForeground( FONT_YELLOW );
SetFontShadow( FONT_NEARBLACK ); SetFontShadow( FONT_NEARBLACK );
GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE ); GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE );
mprintf( 70 + xResOffset, 17 + yResOffset, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName ); mprintf( 70 + xOffset, 17 + yOffset, L"%s %s", gpStrategicString[STR_PB_SECTOR], pSectorName );
//enemy //enemy
SetFont( FONT14ARIAL ); SetFont( FONT14ARIAL );
@@ -1472,58 +1558,55 @@ void RenderPreBattleInterface()
} }
x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2; x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
y = 36; y = 36;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//player //player
swprintf( str, L"%d", guiNumInvolved ); swprintf( str, L"%d", guiNumInvolved );
x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2; x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//militia //militia
swprintf( str, L"%d", NumNonPlayerTeamMembersInSector( gubPBSectorX, gubPBSectorY, MILITIA_TEAM ) ); swprintf( str, L"%d", NumNonPlayerTeamMembersInSector( gubPBSectorX, gubPBSectorY, MILITIA_TEAM ) );
x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2; x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
SetFontShadow( FONT_NEARBLACK ); SetFontShadow( FONT_NEARBLACK );
SetFont( BLOCKFONT2 ); SetFont( BLOCKFONT2 );
SetFontForeground( FONT_YELLOW ); SetFontForeground( FONT_YELLOW );
SetFontDestBuffer( guiSAVEBUFFER, xOffset, yOffset + TOP_Y,
xOffset + PREBATTLE_INTERFACE_WIDTH, yOffset + TOP_Y + ubAllowedListHeight, FALSE );
//print out the participants of the battle. //print out the participants of the battle.
// | NAME | ASSIGN | COND | HP | BP | // | NAME | ASSIGN | COND | HP | BP |
line = 0; line = 0;
y = TOP_Y + 1; y = TOP_Y + TOP_Y_TEXT_BUFFER - bListOffset;
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ ) for( i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++)
{ {
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) ) if( MercPtrs[i]->bActive && MercPtrs[i]->stats.bLife && !(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
{ {
if ( PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) ) if( PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) )
{ //involved {
if( line == giHilitedInvolved )
SetFontForeground( FONT_WHITE );
else
SetFontForeground( FONT_YELLOW );
//NAME //NAME
wcscpy( str, MercPtrs[ i ]->name ); wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2; x = 17 + (52 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset , y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//ASSIGN //ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str ); GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2; x = 72 + (54 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//COND //COND
GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent ); GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent );
x = 129 + (58-StringPixLength( str, BLOCKFONT2)) / 2; x = 129 + (58 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//HP //HP
swprintf( str, L"%d%%", ubHPPercent ); swprintf( str, L"%d%%", ubHPPercent );
x = 189 + (25-StringPixLength( str, BLOCKFONT2)) / 2; x = 189 + (25 - StringPixLength(str, BLOCKFONT2)) / 2;
wcscat( str, sSpecialCharacters[0] ); wcscat( str, sSpecialCharacters[0] );
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//BP //BP
swprintf( str, L"%d%%", ubBPPercent ); swprintf( str, L"%d%%", ubBPPercent );
x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2; x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
wcscat( str, sSpecialCharacters[0] ); wcscat( str, sSpecialCharacters[0] );
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
line++;
y += ROW_HEIGHT; y += ROW_HEIGHT;
} }
} }
@@ -1533,51 +1616,44 @@ void RenderPreBattleInterface()
// | NAME | ASSIGN | LOC | DEST | DEP | // | NAME | ASSIGN | LOC | DEST | DEP |
if( !guiNumUninvolved ) if( !guiNumUninvolved )
{ {
SetFontForeground( FONT_YELLOW );
wcscpy( str, gpStrategicString[ STR_PB_NONE ] ); wcscpy( str, gpStrategicString[ STR_PB_NONE ] );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2; x = 17 + (52 - StringPixLength( str, BLOCKFONT2)) / 2;
y = BOTTOM_Y + ROW_HEIGHT + 2 + ACTUAL_HEIGHT; mprintf( x + xOffset, yOffset + TOP_Y + TOP_Y_TEXT_BUFFER + ubUninvolvedStartY + UNINVOLVED_RELEVANT_HEIGHT - bListOffset, str );
mprintf( x + xResOffset, y + yResOffset, str );
} }
else else
{ {
pGroup = gpGroupList; pGroup = gpGroupList;
y = BOTTOM_Y + ROW_HEIGHT + 2 + ACTUAL_HEIGHT; y = TOP_Y + TOP_Y_TEXT_BUFFER + ubUninvolvedStartY + UNINVOLVED_RELEVANT_HEIGHT - bListOffset;
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ ) for( i = gTacticalStatus.Team[OUR_TEAM].bFirstID; i <= gTacticalStatus.Team[OUR_TEAM].bLastID; i++ )
{ {
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) ) if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && !(MercPtrs[ i ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
{ {
if ( !PlayerMercInvolvedInThisCombat( MercPtrs[ i ] ) ) if( !PlayerMercInvolvedInThisCombat(MercPtrs[ i ]) )
{ {
// uninvolved
if( line == giHilitedUninvolved )
SetFontForeground( FONT_WHITE );
else
SetFontForeground( FONT_YELLOW );
//NAME //NAME
wcscpy( str, MercPtrs[ i ]->name ); wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2; x = 17 + (52 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//ASSIGN //ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str ); GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2; x = 72 + (54 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//LOC //LOC
GetMapscreenMercLocationString( MercPtrs[ i ], str ); GetMapscreenMercLocationString( MercPtrs[ i ], str );
x = 128 + (33-StringPixLength( str, BLOCKFONT2)) / 2; x = 128 + (33 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
//DEST //DEST
GetMapscreenMercDestinationString( MercPtrs[ i ], str ); GetMapscreenMercDestinationString( MercPtrs[ i ], str );
if( wcslen( str ) > 0 ) if (wcslen(str) > 0)
{ {
x = 164 + (41-StringPixLength( str, BLOCKFONT2)) / 2; x = 164 + (41 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf( x + xOffset, y + yOffset, str );
} }
//DEP //DEP
GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk ); GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk );
x = 208 + (34-StringPixLength( str, BLOCKFONT2)) / 2; x = 208 + (34 - StringPixLength(str, BLOCKFONT2)) / 2;
mprintf( x + xResOffset, y + yResOffset, str ); mprintf(x + xOffset, y + yOffset, str);
line++;
y += ROW_HEIGHT; y += ROW_HEIGHT;
} }
} }
@@ -1587,12 +1663,7 @@ void RenderPreBattleInterface()
// mark any and ALL pop up boxes as altered // mark any and ALL pop up boxes as altered
MarkAllBoxesAsAltered( ); MarkAllBoxesAsAltered( );
if(!gfZoomDone) RestoreExternBackgroundRect( 0 + xOffset, 0 + yOffset, PREBATTLE_INTERFACE_WIDTH, iPrebattleInterfaceHeight );
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 359 + yResOffset );
else if(!guiNumUninvolved)
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, 389 + yResOffset );
else
RestoreExternBackgroundRect( 0 + xResOffset, 0 + yResOffset, 261 + xResOffset, y + yResOffset );
// restore font destinanation buffer to the frame buffer // restore font destinanation buffer to the frame buffer
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE ); SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
@@ -1602,7 +1673,7 @@ void RenderPreBattleInterface()
RenderPBHeader( &x, &width ); //the text is important enough to blink. RenderPBHeader( &x, &width ); //the text is important enough to blink.
} }
//InvalidateRegion( 0, 0, 261, 359 ); InvalidateRegion( 0, 0, PREBATTLE_INTERFACE_WIDTH, iPrebattleInterfaceHeight );
if( gfEnterAutoResolveMode ) if( gfEnterAutoResolveMode )
{ {
gfEnterAutoResolveMode = FALSE; gfEnterAutoResolveMode = FALSE;
@@ -1611,7 +1682,6 @@ void RenderPreBattleInterface()
} }
gfIgnoreAllInput = FALSE; gfIgnoreAllInput = FALSE;
} }
void AutoResolveBattleCallback( GUI_BUTTON *btn, INT32 reason ) void AutoResolveBattleCallback( GUI_BUTTON *btn, INT32 reason )
+1
View File
@@ -7,6 +7,7 @@
void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI ); void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI );
void KillPreBattleInterface(); void KillPreBattleInterface();
void RenderPreBattleInterface(); void RenderPreBattleInterface();
void ScrollPreBattleInterface( BOOLEAN fUp );
extern BOOLEAN gfPreBattleInterfaceActive; extern BOOLEAN gfPreBattleInterfaceActive;
extern BOOLEAN gfDisplayPotentialRetreatPaths; extern BOOLEAN gfDisplayPotentialRetreatPaths;
+22 -22
View File
@@ -1951,33 +1951,33 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
SectorInfo[SECTOR( pGroup->ubSectorX, pGroup->ubSectorY )].bLastKnownEnemies = NumNonPlayerTeamMembersInSector( pGroup->ubSectorX, pGroup->ubSectorY, ENEMY_TEAM ); SectorInfo[SECTOR( pGroup->ubSectorX, pGroup->ubSectorY )].bLastKnownEnemies = NumNonPlayerTeamMembersInSector( pGroup->ubSectorX, pGroup->ubSectorY, ENEMY_TEAM );
} }
// award life 'experience' for travelling, based on travel time! // Flugente: do not award experience gain if we never left
if ( !pGroup->fVehicle ) if (!fNeverLeft)
{ {
// Flugente: do not award experience gain if we never left // award life 'experience' for travelling, based on travel time!
if ( !fNeverLeft ) if (!pGroup->fVehicle)
{ {
// gotta be walking to get tougher // gotta be walking to get tougher
AwardExperienceForTravelling( pGroup ); AwardExperienceForTravelling(pGroup);
} }
} else if (!IsGroupTheHelicopterGroup(pGroup))
else if( !IsGroupTheHelicopterGroup( pGroup ) )
{
SOLDIERTYPE *pSoldier;
INT32 iVehicleID;
iVehicleID = GivenMvtGroupIdFindVehicleId( pGroup->ubGroupID );
AssertMsg( iVehicleID != -1, "GroupArrival for vehicle group. Invalid iVehicleID. " );
pSoldier = GetSoldierStructureForVehicle( iVehicleID );
AssertMsg( pSoldier, "GroupArrival for vehicle group. Invalid soldier pointer." );
SpendVehicleFuel( pSoldier, (INT16)(pGroup->uiTraverseTime*6) );
if( !VehicleFuelRemaining( pSoldier ) )
{ {
ReportVehicleOutOfGas( iVehicleID, pGroup->ubSectorX, pGroup->ubSectorY ); SOLDIERTYPE* pSoldier;
//Nuke the group's path, so they don't continue moving. INT32 iVehicleID;
ClearMercPathsAndWaypointsForAllInGroup( pGroup ); iVehicleID = GivenMvtGroupIdFindVehicleId(pGroup->ubGroupID);
AssertMsg(iVehicleID != -1, "GroupArrival for vehicle group. Invalid iVehicleID. ");
pSoldier = GetSoldierStructureForVehicle(iVehicleID);
AssertMsg(pSoldier, "GroupArrival for vehicle group. Invalid soldier pointer.");
SpendVehicleFuel(pSoldier, (INT16)(pGroup->uiTraverseTime * 6));
if (!VehicleFuelRemaining(pSoldier))
{
ReportVehicleOutOfGas(iVehicleID, pGroup->ubSectorX, pGroup->ubSectorY);
//Nuke the group's path, so they don't continue moving.
ClearMercPathsAndWaypointsForAllInGroup(pGroup);
}
} }
} }
} }
+28 -10
View File
@@ -5708,7 +5708,7 @@ UINT32 MapScreenHandle(void)
HandleCharBarRender( ); HandleCharBarRender( );
} }
if( (fShowInventoryFlag && !isWidescreenUI()) || fDisableDueToBattleRoster ) if( ( fShowInventoryFlag || fDisableDueToBattleRoster ) && !isWidescreenUI() )
{ {
for( iCounter = 0; iCounter < MAX_SORT_METHODS; iCounter++ ) for( iCounter = 0; iCounter < MAX_SORT_METHODS; iCounter++ )
{ {
@@ -5824,9 +5824,6 @@ UINT32 MapScreenHandle(void)
HandleContractRenewalSequence( ); HandleContractRenewalSequence( );
// handle dialog
HandleDialogue( );
// handle display of inventory pop up // handle display of inventory pop up
// HEADROCK HAM 3.5: Externalize! // HEADROCK HAM 3.5: Externalize!
HandleDisplayOfItemPopUpForSector( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ ); HandleDisplayOfItemPopUpForSector( gGameExternalOptions.ubDefaultArrivalSectorX, gGameExternalOptions.ubDefaultArrivalSectorY, startingZ );
@@ -6065,6 +6062,8 @@ UINT32 MapScreenHandle(void)
//InvalidateRegion( 0,0, 640, 480); //InvalidateRegion( 0,0, 640, 480);
EndFrameBufferRender( ); EndFrameBufferRender( );
// handle dialog
HandleDialogue();
// if not going anywhere else // if not going anywhere else
if ( guiPendingScreen == NO_PENDING_SCREEN ) if ( guiPendingScreen == NO_PENDING_SCREEN )
@@ -7225,14 +7224,29 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
break; break;
case PGUP: case PGUP:
// WANNE: Jump to first merc in list if (gfPreBattleInterfaceActive)
fResetMapCoords = TRUE; {
GoToFirstCharacterInList( ); ScrollPreBattleInterface(TRUE);
}
else
{
// WANNE: Jump to first merc in list
fResetMapCoords = TRUE;
GoToFirstCharacterInList();
}
break; break;
case PGDN: case PGDN:
// WANNE: Jump to last merc in list if (gfPreBattleInterfaceActive)
fResetMapCoords = TRUE; {
GoToLastCharacterInList( ); ScrollPreBattleInterface(FALSE);
}
else
{
// WANNE: Jump to last merc in list
fResetMapCoords = TRUE;
GoToLastCharacterInList();
}
break; break;
case SHIFT_PGUP: case SHIFT_PGUP:
@@ -10927,6 +10941,10 @@ void BlitBackgroundToSaveBuffer( void )
ForceButtonUnDirty( giMapContractButton ); ForceButtonUnDirty( giMapContractButton );
ForceButtonUnDirty( giCharInfoButton[ 0 ] ); ForceButtonUnDirty( giCharInfoButton[ 0 ] );
ForceButtonUnDirty( giCharInfoButton[ 1 ] ); ForceButtonUnDirty( giCharInfoButton[ 1 ] );
if (isWidescreenUI())
{
ForceButtonUnDirty(giMapInvDoneButton);
}
RenderPreBattleInterface(); RenderPreBattleInterface();
} }
+2 -2
View File
@@ -1467,8 +1467,8 @@ void GetXYForRightIconPlacement_FaceGera( FACETYPE *pFace, UINT16 ubIndex, INT16
usHeight = pTrav->usHeight; usHeight = pTrav->usHeight;
usWidth = pTrav->usWidth; usWidth = pTrav->usWidth;
sX = sFaceX + ( usWidth * bNumIcons ) + 1; sX = sFaceX + ( usWidth * bNumIcons );
sY = sFaceY + pFace->usFaceHeight - usHeight - 1; sY = sFaceY + pFace->usFaceHeight - usHeight;
*psX = sX; *psX = sX;
*psY = sY; *psY = sY;
+9 -1
View File
@@ -279,7 +279,8 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{ {
pTargetSoldier = MercPtrs[ usSoldierIndex ]; pTargetSoldier = MercPtrs[ usSoldierIndex ];
if ( fFromUI ) // anv: don't try to heal interactive spots
if (fFromUI && Item[usHandItem].usItemClass != IC_MEDKIT)
{ {
INT32 sInteractiveGridNo; INT32 sInteractiveGridNo;
@@ -325,6 +326,13 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT16 usHa
{ {
if (pTargetSoldier->bTeam == gbPlayerNum || pTargetSoldier->aiData.bNeutral) if (pTargetSoldier->bTeam == gbPlayerNum || pTargetSoldier->aiData.bNeutral)
{ {
// anv: don't try to attack yourself, it will only cause deadlock
if (pSoldier == pTargetSoldier)
{
TacticalCharacterDialogue(pSoldier, QUOTE_REFUSING_ORDER);
return(ITEM_HANDLE_REFUSAL);
}
// nice mercs won't shoot other nice guys or neutral civilians // nice mercs won't shoot other nice guys or neutral civilians
if ((gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) && if ((gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) &&
((pTargetSoldier->ubProfile == NO_PROFILE && pTargetSoldier->aiData.bNeutral && pTargetSoldier->ubBodyType != CROW) || ((pTargetSoldier->ubProfile == NO_PROFILE && pTargetSoldier->aiData.bNeutral && pTargetSoldier->ubBodyType != CROW) ||
+20
View File
@@ -10700,6 +10700,22 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
return(ubCombinedLoss); return(ubCombinedLoss);
} }
void SOLDIERTYPE::SoldierTakeDelayedDamage(INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathLoss, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage)
{
delayedDamageFunction = [this, bHeight, sLifeDeduct, sBreathLoss, ubReason, ubAttacker, sSourceGrid, sSubsequent, fShowDamage]()
{
this->SoldierTakeDamage(bHeight, sLifeDeduct, sBreathLoss, ubReason, ubAttacker, sSourceGrid, sSubsequent, fShowDamage);
};
}
void SOLDIERTYPE::ResolveDelayedDamage()
{
if (delayedDamageFunction)
{
delayedDamageFunction();
delayedDamageFunction = nullptr;
}
}
extern BOOLEAN IsMercSayingDialogue( UINT8 ubProfileID ); extern BOOLEAN IsMercSayingDialogue( UINT8 ubProfileID );
@@ -11499,6 +11515,8 @@ void SOLDIERTYPE::MoveMerc( FLOAT dMovementChange, FLOAT dAngle, BOOLEAN fCheckR
// OK, set new position // OK, set new position
this->EVENT_InternalSetSoldierPosition( dXPos, dYPos, FALSE, FALSE, FALSE ); this->EVENT_InternalSetSoldierPosition( dXPos, dYPos, FALSE, FALSE, FALSE );
this->ResolveDelayedDamage();
// Flugente: drag people // Flugente: drag people
if ( currentlydragging ) if ( currentlydragging )
{ {
@@ -26234,4 +26252,6 @@ void SOLDIERTYPE::InitializeExtraData(void)
this->ubQuickItemSlot = 0; this->ubQuickItemSlot = 0;
this->usGrenadeItem = 0; this->usGrenadeItem = 0;
this->delayedDamageFunction = nullptr;
} }
+8
View File
@@ -20,6 +20,7 @@
#include <iterator> #include <iterator>
#include "GameSettings.h" // added by Flugente #include "GameSettings.h" // added by Flugente
#include "Disease.h" // added by Flugente #include "Disease.h" // added by Flugente
#include <functional>
#define PTR_CIVILIAN (pSoldier->bTeam == CIV_TEAM) #define PTR_CIVILIAN (pSoldier->bTeam == CIV_TEAM)
#define PTR_CROUCHED (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_CROUCH) #define PTR_CROUCHED (gAnimControl[ pSoldier->usAnimState ].ubHeight == ANIM_CROUCH)
@@ -1656,6 +1657,10 @@ public:
UINT8 ubQuickItemSlot; UINT8 ubQuickItemSlot;
UINT16 usGrenadeItem; UINT16 usGrenadeItem;
// anv: resolve damage with delay, e.g. damage applied mid movement that would cause issues with world data if applied immediately
std::function<void()> delayedDamageFunction;
public: public:
// CREATION FUNCTIONS // CREATION FUNCTIONS
BOOLEAN DeleteSoldier( void ); BOOLEAN DeleteSoldier( void );
@@ -1719,6 +1724,9 @@ public:
void ReviveSoldier( void ); void ReviveSoldier( void );
UINT8 SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathDeduct, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage ); UINT8 SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathDeduct, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage );
// anv: resolve damage with delay, e.g. damage applied mid movement that would cause issues with world data if applied immediately
void SoldierTakeDelayedDamage(INT8 bHeight, INT16 sLifeDeduct, INT16 sBreathDeduct, UINT8 ubReason, UINT8 ubAttacker, INT32 sSourceGrid, INT16 sSubsequent, BOOLEAN fShowDamage);
void ResolveDelayedDamage();
// Palette functions for soldiers // Palette functions for soldiers
BOOLEAN CreateSoldierPalettes( void ); BOOLEAN CreateSoldierPalettes( void );
+14 -1
View File
@@ -1700,7 +1700,20 @@ void CheckSquadMovementGroups( void )
for (INT8 iSoldier = 0; iSoldier < NUMBER_OF_SOLDIERS_PER_SQUAD; iSoldier++) { for (INT8 iSoldier = 0; iSoldier < NUMBER_OF_SOLDIERS_PER_SQUAD; iSoldier++) {
if (Squad[iSquad][iSoldier] != NULL) if (Squad[iSquad][iSoldier] != NULL)
{ {
Squad[iSquad][iSoldier]->ubGroupID = pGroup->ubGroupID; if (IsVehicle(Squad[iSquad][iSoldier]))
{
INT32 iCounter = 0;
for (iCounter = 0; iCounter < ubNumberOfVehicles; iCounter++)
{
if (pVehicleList[iCounter].ubProfileID == Squad[iSquad][iSoldier]->ubProfile)
break;
}
Squad[iSquad][iSoldier]->ubGroupID = pVehicleList[iCounter].ubMovementGroup;
}
else
{
Squad[iSquad][iSoldier]->ubGroupID = pGroup->ubGroupID;
}
} }
} }
} }
+2 -2
View File
@@ -157,8 +157,8 @@ typedef PARSE_STAGE;
#define ALTSECTORSFILENAME "Map\\AltSectors.xml" #define ALTSECTORSFILENAME "Map\\AltSectors.xml"
#define SAMSITESFILENAME "Map\\SamSites.xml" #define SAMSITESFILENAME "Map\\SamSites.xml"
#define HELISITESFILENAME "Map\\HeliSites.xml" #define HELISITESFILENAME "Map\\HeliSites.xml"
#define EXTRAITEMSFILENAME "Map\\A9_0_ExtraItems" // ".xml" will be added @runtime #define EXTRAITEMSFILENAME "Map\\ExtraItems\\A9_0_ExtraItems" // ".xml" will be added @runtime
#define EXTRAITEMSFILENAME2 "Map\\A11_0_ExtraItems" // ".xml" will be added @runtime #define EXTRAITEMSFILENAME2 "Map\\ExtraItems\\A11_0_ExtraItems" // ".xml" will be added @runtime
#define SHIPPINGDESTINATIONSFILENAME "Map\\ShippingDestinations.xml" #define SHIPPINGDESTINATIONSFILENAME "Map\\ShippingDestinations.xml"
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml" #define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
#define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml" #define DELIVERYMETHODSFILENAME "Map\\DeliveryMethods.xml"
+2 -2
View File
@@ -1914,10 +1914,10 @@ INT8 DamageStructure( STRUCTURE * pStructure, UINT8 ubDamage, UINT8 ubReason, IN
//Since the structure is being damaged, set the map element that a structure is damaged //Since the structure is being damaged, set the map element that a structure is damaged
gpWorldLevelData[ tmpgridno ].uiFlags |= MAPELEMENT_STRUCTURE_DAMAGED; gpWorldLevelData[ tmpgridno ].uiFlags |= MAPELEMENT_STRUCTURE_DAMAGED;
// handle structure revenge - damage to vehicle // handle structure revenge - damage to vehicle - to be resolved after movement
if ( ubOwner != NOBODY && MercPtrs[ubOwner] && !ARMED_VEHICLE( MercPtrs[ubOwner] ) ) if ( ubOwner != NOBODY && MercPtrs[ubOwner] && !ARMED_VEHICLE( MercPtrs[ubOwner] ) )
{ {
MercPtrs[ ubOwner ]->SoldierTakeDamage( 0, Random(max(0,(ubBaseArmour-10)/5))+max(0,(ubBaseArmour-10)/5), 0, TAKE_DAMAGE_STRUCTURE_EXPLOSION, NOBODY, MercPtrs[ ubOwner ]->sGridNo, 0, TRUE ); MercPtrs[ubOwner]->SoldierTakeDelayedDamage(0, Random(max(0,(ubBaseArmour-10)/5)) + max(0,(ubBaseArmour-10)/5), 0, TAKE_DAMAGE_STRUCTURE_EXPLOSION, NOBODY, MercPtrs[ ubOwner ]->sGridNo, 0, TRUE);
} }
// recompile = TRUE means that we destroyed something // recompile = TRUE means that we destroyed something
+36
View File
@@ -76,6 +76,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL: case MLG_PREBATTLEPANEL:
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" ); sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
return TRUE; return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
return TRUE;
case MLG_SMALLTITLE: case MLG_SMALLTITLE:
sprintf( filename, "LAPTOP\\SmallTitle.sti" ); sprintf( filename, "LAPTOP\\SmallTitle.sti" );
return TRUE; return TRUE;
@@ -203,6 +212,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL: case MLG_PREBATTLEPANEL:
sprintf( filename, "GERMAN\\PreBattlePanel_german.sti" ); sprintf( filename, "GERMAN\\PreBattlePanel_german.sti" );
return TRUE; return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "GERMAN\\PreBattlePanel_800x600_german.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "GERMAN\\PreBattlePanel_1024x768_german.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "GERMAN\\PreBattlePanel_1280x720_german.sti");
return TRUE;
case MLG_SMALLTITLE: case MLG_SMALLTITLE:
sprintf( filename, "GERMAN\\SmallTitle_german.sti" ); sprintf( filename, "GERMAN\\SmallTitle_german.sti" );
return TRUE; return TRUE;
@@ -368,6 +386,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL: case MLG_PREBATTLEPANEL:
sprintf( filename, "%s\\PreBattlePanel_%s.sti", zLanguage, zLanguage ); sprintf( filename, "%s\\PreBattlePanel_%s.sti", zLanguage, zLanguage );
break; break;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "%s\\PreBattlePanel_800x600_%s.sti", zLanguage, zLanguage);
break;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "%s\\PreBattlePanel_1024x768_%s.sti", zLanguage, zLanguage);
break;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "%s\\PreBattlePanel_1280x720_%s.sti", zLanguage, zLanguage);
break;
case MLG_SMALLTITLE: case MLG_SMALLTITLE:
sprintf( filename, "%s\\SmallTitle_%s.sti", zLanguage, zLanguage ); sprintf( filename, "%s\\SmallTitle_%s.sti", zLanguage, zLanguage );
break; break;
@@ -492,6 +519,15 @@ BOOLEAN GetMLGFilename( SGPFILENAME filename, UINT16 usMLGGraphicID )
case MLG_PREBATTLEPANEL: case MLG_PREBATTLEPANEL:
sprintf( filename, "INTERFACE\\PreBattlePanel.sti" ); sprintf( filename, "INTERFACE\\PreBattlePanel.sti" );
return TRUE; return TRUE;
case MLG_PREBATTLEPANEL_800x600:
sprintf(filename, "INTERFACE\\PreBattlePanel_800x600.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1024x768:
sprintf(filename, "INTERFACE\\PreBattlePanel_1024x768.sti");
return TRUE;
case MLG_PREBATTLEPANEL_1280x720:
sprintf(filename, "INTERFACE\\PreBattlePanel_1280x720.sti");
return TRUE;
case MLG_SMALLTITLE: case MLG_SMALLTITLE:
sprintf( filename, "LAPTOP\\SmallTitle.sti" ); sprintf( filename, "LAPTOP\\SmallTitle.sti" );
return TRUE; return TRUE;
+3
View File
@@ -26,6 +26,9 @@ enum
MLG_OPTIONHEADER, //OptionScreenAddOns MLG_OPTIONHEADER, //OptionScreenAddOns
MLG_ORDERGRID, MLG_ORDERGRID,
MLG_PREBATTLEPANEL, MLG_PREBATTLEPANEL,
MLG_PREBATTLEPANEL_800x600,
MLG_PREBATTLEPANEL_1024x768,
MLG_PREBATTLEPANEL_1280x720,
MLG_SECTORINVENTORY, MLG_SECTORINVENTORY,
MLG_SMALLFLORISTSYMBOL, //SmallSymbol MLG_SMALLFLORISTSYMBOL, //SmallSymbol
MLG_SMALLTITLE, MLG_SMALLTITLE,