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:
lalien
2006-04-19 17:10:53 +00:00
parent e54aeb96aa
commit 89b4d71bf3
71 changed files with 11332 additions and 731 deletions
+19 -3
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "JA2 All.h"
#include "Credits.h"
@@ -128,7 +129,7 @@ enum
#define CRDT_SPACE_BN_SECTIONS 50
#define CRDT_SPACE_BN_NODES 12
#define CRDT_START_POS_Y 479
#define CRDT_START_POS_Y (SCREEN_HEIGHT - 1) //479
#define CRDT_EYE_WIDTH 30
#define CRDT_EYE_HEIGHT 12
@@ -456,7 +457,20 @@ BOOLEAN EnterCreditsScreen()
*/
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
FilenameForBPP("INTERFACE\\Credits.sti", VObjectDesc.ImageFile);
if (iResolution == 0)
{
FilenameForBPP("INTERFACE\\Credits.sti", VObjectDesc.ImageFile);
}
else if (iResolution == 1)
{
FilenameForBPP("INTERFACE\\Credits_800x600.sti", VObjectDesc.ImageFile);
}
else if (iResolution == 2)
{
FilenameForBPP("INTERFACE\\Credits_1024x768.sti", VObjectDesc.ImageFile);
}
CHECKF(AddVideoObject(&VObjectDesc, &guiCreditBackGroundImage ));
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
@@ -1032,7 +1046,9 @@ BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent )
//if the surface is at the bottom of the screen
if( pCurrent->sOldPosY + pCurrent->sHeightOfString > CRDT_START_POS_Y )
{
INT16 sHeight = 480 - pCurrent->sOldPosY;
// WANNE 2
INT16 sHeight = SCREEN_HEIGHT - pCurrent->sOldPosY;
//INT16 sHeight = 480 - pCurrent->sOldPosY;
RestoreExternBackgroundRect( pCurrent->sOldPosX, pCurrent->sOldPosY, CRDT_WIDTH_OF_TEXT_AREA, sHeight );
}
else if( pCurrent->sOldPosY > CRDT_LINE_NODE_DISAPPEARS_AT )
+5
View File
@@ -327,6 +327,11 @@ void LoadGameExternalOptions()
gGameExternalOptions.iCustomPersonality = iniReader.ReadInteger("Options","CUSTOM_PERSONALITY",6);
gGameExternalOptions.iCustomAttitude = iniReader.ReadInteger("Options","CUSTOM_ATTITUDE",0);
gGameExternalOptions.iEasyAPBonus = iniReader.ReadInteger("Options","NOVICE_AP_BONUS",0);
gGameExternalOptions.iExperiencedAPBonus = iniReader.ReadInteger("Options","EXPERIENCED_AP_BONUS",0);
gGameExternalOptions.iExpertAPBonus = iniReader.ReadInteger("Options","EXPERT_AP_BONUS",0);
gGameExternalOptions.iInsaneAPBonus = iniReader.ReadInteger("Options","INSANE_AP_BONUS",0);
}
+5
View File
@@ -172,6 +172,11 @@ typedef struct
INT8 iCustomPersonality;
INT8 iCustomAttitude;
INT8 iEasyAPBonus;
INT8 iExperiencedAPBonus;
INT8 iExpertAPBonus;
INT8 iInsaneAPBonus;
} GAME_EXTERNAL_OPTIONS;
+4 -11
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "JA2 All.h"
#include "HelpScreen.h"
@@ -727,17 +728,9 @@ void RenderHelpScreen()
{
gfHaveRenderedFirstFrameToSaveBuffer = TRUE;
// WANNE: an exception occurs, when i try to open the help screen in laptop mode, so i put a try-catch block
// around this. I will fix that later.
__try
{
//blit everything to the save buffer ( cause the save buffer can bleed through )
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, (UINT16)(gHelpScreen.usScreenLocX+gHelpScreen.usScreenWidth), (UINT16)(gHelpScreen.usScreenLocY+gHelpScreen.usScreenHeight) );
}
__except(filter(GetExceptionCode(), GetExceptionInformation()))
{
}
//blit everything to the save buffer ( cause the save buffer can bleed through )
BlitBufferToBuffer(guiRENDERBUFFER, guiSAVEBUFFER, gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, (UINT16)(gHelpScreen.usScreenWidth), (UINT16)(gHelpScreen.usScreenHeight) );
UnmarkButtonsDirty( );
}
+7
View File
@@ -53,6 +53,7 @@
#include "Init.h"
#include "jascreens.h"
#include "XML.h"
#include "SaveLoadGame.h"
#endif
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
@@ -360,6 +361,12 @@ UINT32 InitializeJA2(void)
DetermineRGBDistributionSettings();
// Snap: Init save game directory
if ( !InitSaveDir() )
{
return( ERROR_SCREEN );
}
#ifdef JA2BETAVERSION
#ifdef JA2EDITOR
+5 -5
View File
@@ -33,14 +33,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utils", "Utils\Utils.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ja2", "JA2.vcproj", "{0795F6E2-EE5C-48C5-AB6B-11E64B7533D4}"
ProjectSection(ProjectDependencies) = postProject
{5C428253-7443-4C4B-A5F2-E079DA2E6933} = {5C428253-7443-4C4B-A5F2-E079DA2E6933}
{FEE1FCB1-6A45-4247-A440-3561F33B16A3} = {FEE1FCB1-6A45-4247-A440-3561F33B16A3}
{CB33540F-3AFF-4985-86FE-5E899B570133} = {CB33540F-3AFF-4985-86FE-5E899B570133}
{5C428253-7443-4C4B-A5F2-E079DA2E6933} = {5C428253-7443-4C4B-A5F2-E079DA2E6933}
{94DA4574-7108-4CDA-B43F-DA83B1C3EDF6} = {94DA4574-7108-4CDA-B43F-DA83B1C3EDF6}
{6B1D57C9-A579-452E-8642-6ECF3E9FD399} = {6B1D57C9-A579-452E-8642-6ECF3E9FD399}
{F80B55A6-E228-4EB6-B915-4815E01CEA76} = {F80B55A6-E228-4EB6-B915-4815E01CEA76}
{4D15E8C7-9458-403C-A34B-15DF2CAF3277} = {4D15E8C7-9458-403C-A34B-15DF2CAF3277}
{262D8F88-8266-4B16-999E-B5C0B12EFF01} = {262D8F88-8266-4B16-999E-B5C0B12EFF01}
{F80B55A6-E228-4EB6-B915-4815E01CEA76} = {F80B55A6-E228-4EB6-B915-4815E01CEA76}
{FEE1FCB1-6A45-4247-A440-3561F33B16A3} = {FEE1FCB1-6A45-4247-A440-3561F33B16A3}
{4D15E8C7-9458-403C-A34B-15DF2CAF3277} = {4D15E8C7-9458-403C-A34B-15DF2CAF3277}
{6B1D57C9-A579-452E-8642-6ECF3E9FD399} = {6B1D57C9-A579-452E-8642-6ECF3E9FD399}
EndProjectSection
EndProject
Global
BIN
View File
Binary file not shown.
+123 -109
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Laptop All.h"
#include "HelpScreen.h"
@@ -1783,6 +1784,7 @@ void HandleLapTopHandles()
extern BOOLEAN gfPrintFrameBuffer;
// WANNE 2 <change laptop zooming>
UINT32 LaptopScreenHandle()
{
//User just changed modes. This is determined by the button callbacks
@@ -1803,13 +1805,16 @@ UINT32 LaptopScreenHandle()
}
if( gfStartMapScreenToLaptopTransition )
{ //Everything is set up to start the transition animation.
SGPRect SrcRect1, SrcRect2, DstRect;
INT32 iPercentage, iScalePercentage, iFactor;
UINT32 uiStartTime, uiTimeRange, uiCurrTime;
INT32 iX, iY, iWidth, iHeight;
{
// WANNE 2: I disabled the animation of the laptop, because the screen redrawing does not work correct!
INT32 iRealPercentage;
//Everything is set up to start the transition animation.
//SGPRect SrcRect2, DstRect;
//INT32 iPercentage, iScalePercentage, iFactor;
//UINT32 uiStartTime, uiTimeRange, uiCurrTime;
//INT32 iX, iY, iWidth, iHeight;
//INT32 iRealPercentage;
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
//Step 1: Build the laptop image into the save buffer.
@@ -1824,62 +1829,64 @@ UINT32 LaptopScreenHandle()
PrintNumberOnTeam( );
ShowLights();
//Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
// Start transitioning the screen.
DstRect.iLeft = iScreenWidthOffset; //0
DstRect.iTop = iScreenHeightOffset; //0
DstRect.iRight = iScreenWidthOffset + 640; //640
DstRect.iBottom = iScreenHeightOffset + 480; //480
uiTimeRange = 1000;
iPercentage = iRealPercentage = 0;
uiStartTime = GetJA2Clock();
//// WANNE 2 <change>
////Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
//// Start transitioning the screen.
//DstRect.iLeft = iScreenWidthOffset; //0
//DstRect.iTop = iScreenHeightOffset; //0
//DstRect.iRight = iScreenWidthOffset + 640; //640
//DstRect.iBottom = iScreenHeightOffset + 480; //480
//uiTimeRange = 1000;
//iPercentage = iRealPercentage = 0;
//uiStartTime = GetJA2Clock();
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
640, 480 );
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
// 640, 480 );
//BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
while( iRealPercentage < 100 )
{
uiCurrTime = GetJA2Clock();
iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
iPercentage = min( iPercentage, 100 );
//PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
//
//// WANNE 2 with laptop zooming
//while( iRealPercentage < 100 )
//{
// uiCurrTime = GetJA2Clock();
// iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
// iPercentage = min( iPercentage, 100 );
iRealPercentage = iPercentage;
// iRealPercentage = iPercentage;
//Factor the percentage so that it is modified by a gravity falling acceleration effect.
iFactor = (iPercentage - 50) * 2;
if( iPercentage < 50 )
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
else
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
// //Factor the percentage so that it is modified by a gravity falling acceleration effect.
// iFactor = (iPercentage - 50) * 2;
// if( iPercentage < 50 )
// iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
// else
// iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
//Mapscreen source rect
SrcRect1.iLeft = iScreenWidthOffset + 464 * iPercentage / 100;
SrcRect1.iRight = iScreenWidthOffset + 640 - 163 * iPercentage / 100;
SrcRect1.iTop = iScreenHeightOffset + 417 * iPercentage / 100;
SrcRect1.iBottom = iScreenHeightOffset + 480 - 55 * iPercentage / 100;
//Laptop source rect
if( iPercentage < 99 )
iScalePercentage = 10000 / (100-iPercentage);
else
iScalePercentage = 5333;
iWidth = 12 * iScalePercentage / 100;
iHeight = 9 * iScalePercentage / 100;
// //Laptop source rect
// if( iPercentage < 99 )
// iScalePercentage = 10000 / (100-iPercentage);
// else
// iScalePercentage = 5333;
// iWidth = 12 * iScalePercentage / 100;
// iHeight = 9 * iScalePercentage / 100;
iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
// iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
// iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
SrcRect2.iLeft = iX - iWidth / 2;
SrcRect2.iRight = SrcRect2.iLeft + iWidth;
SrcRect2.iTop = iY - iHeight / 2;
SrcRect2.iBottom = SrcRect2.iTop + iHeight;
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, iScreenWidthOffset, iScreenHeightOffset, &DstRect, &SrcRect2 );
// SrcRect2.iLeft = iX - iWidth / 2;
// SrcRect2.iRight = SrcRect2.iLeft + iWidth;
// SrcRect2.iTop = iY - iHeight / 2;
// SrcRect2.iBottom = SrcRect2.iTop + iHeight;
//
// BltStretchVideoSurface(FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &DstRect, &SrcRect2 );
// //WANNE 2
// InvalidateScreen();
//
// //WANNE 2
// RefreshScreen( NULL );
//}
InvalidateScreen();
RefreshScreen( NULL );
}
fReDrawScreenFlag = TRUE;
}
@@ -1941,12 +1948,14 @@ UINT32 LaptopScreenHandle()
}
}
}
if( fPausedReDrawScreenFlag )
{
fReDrawScreenFlag = TRUE;
fPausedReDrawScreenFlag = FALSE;
}
// WANNE 2 <redraw>
if( fReDrawScreenFlag )
{
RenderLapTopImage();
@@ -2075,6 +2084,7 @@ UINT32 LaptopScreenHandle()
// render frame rate
DisplayFrameRate( );
// WANNE 2 <redraw>
// invalidate screen if redrawn
if( fReDrawScreenFlag == TRUE )
{
@@ -2430,11 +2440,13 @@ BOOLEAN LeaveLapTopScreen( void )
if( !gfDontStartTransitionFromLaptop )
{
SGPRect SrcRect1, SrcRect2, DstRect;
INT32 iPercentage, iScalePercentage, iFactor;
UINT32 uiStartTime, uiTimeRange, uiCurrTime;
INT32 iX, iY, iWidth, iHeight;
INT32 iRealPercentage;
// WANNE 2: I disabled the laptop animation, because the screen redrawing does not work correctly!
//SGPRect SrcRect1, SrcRect2, DstRect;
//INT32 iPercentage, iScalePercentage, iFactor;
//UINT32 uiStartTime, uiTimeRange, uiCurrTime;
//INT32 iX, iY, iWidth, iHeight;
//INT32 iRealPercentage;
gfDontStartTransitionFromLaptop = TRUE;
SetCurrentCursorFromDatabase( VIDEO_NO_CURSOR );
@@ -2449,65 +2461,67 @@ BOOLEAN LeaveLapTopScreen( void )
PrintNumberOnTeam( );
ShowLights();
//Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
// Start transitioning the screen.
DstRect.iLeft = iScreenWidthOffset + 0; // 0
DstRect.iTop = iScreenHeightOffset + 0; // 0
DstRect.iRight = iScreenWidthOffset + 640; // 640
DstRect.iBottom = iScreenHeightOffset + 480; // 480
uiTimeRange = 1000;
iPercentage = iRealPercentage = 100;
uiStartTime = GetJA2Clock();
////Step 2: The mapscreen image is in the EXTRABUFFER, and laptop is in the SAVEBUFFER
//// Start transitioning the screen.
//DstRect.iLeft = iScreenWidthOffset + 0; // 0
//DstRect.iTop = iScreenHeightOffset + 0; // 0
//DstRect.iRight = iScreenWidthOffset + 640; // 640
//DstRect.iBottom = iScreenHeightOffset + 480; // 480
//uiTimeRange = 1000;
//iPercentage = iRealPercentage = 100;
//uiStartTime = GetJA2Clock();
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
640, 480 );
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, iScreenWidthOffset, iScreenHeightOffset,
// 640, 480 );
PlayJA2SampleFromFile( "SOUNDS\\Laptop power down (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
while( iRealPercentage > 0 )
{
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
//PlayJA2SampleFromFile( "SOUNDS\\Laptop power down (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
uiCurrTime = GetJA2Clock();
iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
iPercentage = min( iPercentage, 100 );
iPercentage = 100 - iPercentage;
//// WANNE 2
//while( iRealPercentage > 0 )
//{
// BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, iScreenWidthOffset, iScreenHeightOffset, 640, 480 );
iRealPercentage = iPercentage;
// uiCurrTime = GetJA2Clock();
// iPercentage = (uiCurrTime-uiStartTime) * 100 / uiTimeRange;
// iPercentage = min( iPercentage, 100 );
// iPercentage = 100 - iPercentage;
//Factor the percentage so that it is modified by a gravity falling acceleration effect.
iFactor = (iPercentage - 50) * 2;
if( iPercentage < 50 )
iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
else
iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
// iRealPercentage = iPercentage;
//Mapscreen source rect
SrcRect1.iLeft = iScreenWidthOffset + 464 * iPercentage / 100;
SrcRect1.iRight = iScreenWidthOffset + 640 - 163 * iPercentage / 100;
SrcRect1.iTop = iScreenHeightOffset + 417 * iPercentage / 100;
SrcRect1.iBottom = iScreenHeightOffset + 480 - 55 * iPercentage / 100;
//Laptop source rect
if( iPercentage < 99 )
iScalePercentage = 10000 / (100-iPercentage);
else
iScalePercentage = 5333;
iWidth = 12 * iScalePercentage / 100;
iHeight = 9 * iScalePercentage / 100;
iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
// //Factor the percentage so that it is modified by a gravity falling acceleration effect.
// iFactor = (iPercentage - 50) * 2;
// if( iPercentage < 50 )
// iPercentage = (UINT32)(iPercentage + iPercentage * iFactor * 0.01 + 0.5);
// else
// iPercentage = (UINT32)(iPercentage + (100-iPercentage) * iFactor * 0.01 + 0.5);
SrcRect2.iLeft = iX - iWidth / 2;
SrcRect2.iRight = SrcRect2.iLeft + iWidth;
SrcRect2.iTop = iY - iHeight / 2;
SrcRect2.iBottom = SrcRect2.iTop + iHeight;
// //Mapscreen source rect
// SrcRect1.iLeft = iScreenWidthOffset + 464 * iPercentage / 100;
// SrcRect1.iRight = iScreenWidthOffset + 640 - 163 * iPercentage / 100;
// SrcRect1.iTop = iScreenHeightOffset + 417 * iPercentage / 100;
// SrcRect1.iBottom = iScreenHeightOffset + 480 - 55 * iPercentage / 100;
// //Laptop source rect
// if( iPercentage < 99 )
// iScalePercentage = 10000 / (100-iPercentage);
// else
// iScalePercentage = 5333;
// iWidth = 12 * iScalePercentage / 100;
// iHeight = 9 * iScalePercentage / 100;
// iX = iScreenWidthOffset + 472 - (472-320) * iScalePercentage / 5333;
// iY = iScreenHeightOffset + 424 - (424-240) * iScalePercentage / 5333;
BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, iScreenWidthOffset, iScreenHeightOffset, &DstRect, &SrcRect2 );
// SrcRect2.iLeft = iX - iWidth / 2;
// SrcRect2.iRight = SrcRect2.iLeft + iWidth;
// SrcRect2.iTop = iY - iHeight / 2;
// SrcRect2.iBottom = SrcRect2.iTop + iHeight;
InvalidateScreen();
//gfPrintFrameBuffer = TRUE;
RefreshScreen( NULL );
}
}
// BltStretchVideoSurface( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 0, &DstRect, &SrcRect2 );
// InvalidateScreen();
// //gfPrintFrameBuffer = TRUE;
// RefreshScreen( NULL );
//}
}
}
return( TRUE );
+3 -1
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Laptop All.h"
#else
@@ -515,7 +516,8 @@ UINT32 CalculateHowMuchPlayerOwesSpeck()
UINT16 usMercID;
for(i=0; i<10; i++)
// WANNE 2
for(i=0; i<14; i++)
{
//if it larry Roach burn advance. ( cause larry is in twice, a sober larry and a stoned larry )
if( i == MERC_LARRY_ROACHBURN )
+1
View File
@@ -275,6 +275,7 @@ UINT32 OptionsScreenHandle()
HandleOptionsScreen();
// WANNE 2 <redraw>
if( gfRedrawOptionsScreen )
{
RenderOptionsScreen();
+4
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "JA2 All.h"
#else
@@ -14,6 +15,9 @@ int SCREEN_HEIGHT;
int iScreenWidthOffset;
int iScreenHeightOffset;
// WANNE 2
BOOLEAN fDisplayOverheadMap;
Screens GameScreens[MAX_SCREENS] =
{
{ EditScreenInit, EditScreenHandle, EditScreenShutdown },
+62 -32
View File
@@ -101,7 +101,6 @@
#include "Enemy Soldier Save.h"
#include "BobbyRMailOrder.h"
#include "Mercs.h"
#include "INIReader.h"
/////////////////////////////////////////////////////
//
@@ -379,6 +378,8 @@ UINT32 guiSaveGameVersion=0;
//CHAR8 gsSaveGameNameWithPath[ 512 ];
CHAR8 gSaveDir[ MAX_PATH ]; // Snap: Initilized by InitSaveDir
UINT8 gubSaveGameLoc=0;
UINT32 guiScreenToGotoAfterLoadingSavedGame = 0;
@@ -459,14 +460,43 @@ void HandleOldBobbyRMailOrders();
/////////////////////////////////////////////////////
// Snap: Initializes gSaveDir global, creating the save directory if necessary
// The save directory now resides in the data directory (default or custom)
BOOLEAN InitSaveDir()
{
// Look for a custom data dir first
std::string dataDir = gCustomDataCat.GetRootDir();
if( dataDir.empty() || FileGetAttributes( (STR) dataDir.c_str() ) == 0xFFFFFFFF ) {
dataDir = gDefaultDataCat.GetRootDir();
}
// The locale-specific save dir location is of the form L"..\\SavedGames"
// This has not changed; instead, we strip the ".." at the beginning
sprintf( (char *) gSaveDir, "%s%S", dataDir.c_str(), pMessageStrings[ MSG_SAVEDIRECTORY ] + 2 );
// This was moved here from SaveGame
//Check to see if the save directory exists
if( FileGetAttributes( (STR) gSaveDir ) == 0xFFFFFFFF )
{
//ok the direcotry doesnt exist, create it
if( !MakeFileManDirectory( (CHAR8 *)gSaveDir ) )
{
return FALSE;
}
}
return TRUE;
}
BOOLEAN SaveGame( UINT8 ubSaveGameID, STR16 pGameDesc )
{
UINT32 uiNumBytesWritten=0;
HWFILE hFile=0;
SAVED_GAME_HEADER SaveGameHeader;
CHAR8 zSaveGameName[ 512 ];
CHAR8 zSaveGameName[ MAX_PATH ];
UINT32 uiSizeOfGeneralInfo = sizeof( GENERAL_SAVE_INFO );
UINT8 saveDir[100];
//UINT8 saveDir[100];
BOOLEAN fPausedStateBeforeSaving = gfGamePaused;
BOOLEAN fLockPauseStateBeforeSaving = gfLockPauseState;
INT32 iSaveLoadGameMessageBoxID = -1;
@@ -474,10 +504,12 @@ BOOLEAN SaveGame( UINT8 ubSaveGameID, STR16 pGameDesc )
BOOLEAN fWePausedIt = FALSE;
sprintf( (char *) saveDir, "%S", pMessageStrings[ MSG_SAVEDIRECTORY ] );
//sprintf( (char *) saveDir, "%S", pMessageStrings[ MSG_SAVEDIRECTORY ] );
#ifdef JA2BETAVERSION
#ifndef CRIPPLED_VERSION
//AssertMsg( uiSizeOfGeneralInfo == 1024, String( "Saved General info is NOT 1024, it is %d. DF 1.", uiSizeOfGeneralInfo ) );
//AssertMsg( sizeof( LaptopSaveInfoStruct ) == 7440, String( "LaptopSaveStruct is NOT 7440, it is %d. DF 1.", sizeof( LaptopSaveInfoStruct ) ) );
#endif
#endif
@@ -579,14 +611,14 @@ BOOLEAN SaveGame( UINT8 ubSaveGameID, STR16 pGameDesc )
wcscpy( pGameDesc, pMessageStrings[ MSG_NODESC ] );
//Check to see if the save directory exists
if( FileGetAttributes( (STR) saveDir ) == 0xFFFFFFFF )
/*if( FileGetAttributes( (STR) saveDir ) == 0xFFFFFFFF )
{
//ok the direcotry doesnt exist, create it
if( !MakeFileManDirectory( (CHAR8 *)saveDir ) )
{
goto FAILED_TO_SAVE;
}
}
}*/
//Create the name of the file
CreateSavedGameFileNameFromNumber( ubSaveGameID, zSaveGameName );
@@ -1351,7 +1383,7 @@ BOOLEAN LoadSavedGame( UINT8 ubSavedGameID )
INT16 sLoadSectorX;
INT16 sLoadSectorY;
INT8 bLoadSectorZ;
CHAR8 zSaveGameName[ 512 ];
CHAR8 zSaveGameName[ MAX_PATH ];
UINT32 uiSizeOfGeneralInfo = sizeof( GENERAL_SAVE_INFO );
UINT32 uiRelStartPerc;
@@ -4034,19 +4066,19 @@ void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName )
{
//if we are loading a game, and the user hasnt saved any consecutinve saves, load the defualt save
if( guiCurrentQuickSaveNumber == 0 )
sprintf( pzNewFileName , "%S\\%S.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], pMessageStrings[ MSG_QUICKSAVE_NAME ], pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( pzNewFileName , "%s\\%S.%S", gSaveDir, pMessageStrings[ MSG_QUICKSAVE_NAME ], pMessageStrings[ MSG_SAVEEXTENSION ] );
else
sprintf( pzNewFileName , "%S\\%S%02d.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], pMessageStrings[ MSG_QUICKSAVE_NAME ], guiCurrentQuickSaveNumber, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( pzNewFileName , "%s\\%S%02d.%S", gSaveDir, pMessageStrings[ MSG_QUICKSAVE_NAME ], guiCurrentQuickSaveNumber, pMessageStrings[ MSG_SAVEEXTENSION ] );
}
else
#endif
sprintf( pzNewFileName , "%S\\%S.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], pMessageStrings[ MSG_QUICKSAVE_NAME ], pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( pzNewFileName , "%s\\%S.%S", gSaveDir, pMessageStrings[ MSG_QUICKSAVE_NAME ], pMessageStrings[ MSG_SAVEEXTENSION ] );
}
//#ifdef JA2BETAVERSION
else if( ubSaveGameID == SAVE__END_TURN_NUM )
{
//The name of the file
sprintf( pzNewFileName , "%S\\Auto%02d.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], guiLastSaveGameNum, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( pzNewFileName , "%s\\Auto%02d.%S", gSaveDir, guiLastSaveGameNum, pMessageStrings[ MSG_SAVEEXTENSION ] );
//increment end turn number
guiLastSaveGameNum++;
@@ -4060,7 +4092,7 @@ void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName )
//#endif
else
sprintf( pzNewFileName , "%S\\%S%02d.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], pMessageStrings[ MSG_SAVE_NAME ], ubSaveGameID, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( pzNewFileName , "%s\\%S%02d.%S", gSaveDir, pMessageStrings[ MSG_SAVE_NAME ], ubSaveGameID, pMessageStrings[ MSG_SAVEEXTENSION ] );
}
@@ -4196,9 +4228,9 @@ BOOLEAN LoadMercPathToSoldierStruct( HWFILE hFile, UINT8 ubID )
#ifdef JA2BETAVERSION
void InitSaveGameFilePosition()
{
CHAR8 zFileName[128];
CHAR8 zFileName[ MAX_PATH ];
sprintf( zFileName, "%S\\SaveGameFilePos%2d.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gubSaveGameLoc );
sprintf( zFileName, "%s\\SaveGameFilePos%2d.txt", gSaveDir, gubSaveGameLoc );
FileDelete( zFileName );
}
@@ -4209,9 +4241,9 @@ void SaveGameFilePosition( INT32 iPos, STR pMsg )
CHAR8 zTempString[512];
UINT32 uiNumBytesWritten;
UINT32 uiStrLen=0;
CHAR8 zFileName[128];
CHAR8 zFileName[MAX_PATH];
sprintf( zFileName, "%S\\SaveGameFilePos%2d.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gubSaveGameLoc );
sprintf( zFileName, "%s\\SaveGameFilePos%2d.txt", gSaveDir, gubSaveGameLoc );
// create the save game file
hFile = FileOpen( zFileName, FILE_ACCESS_WRITE | FILE_OPEN_ALWAYS, FALSE );
@@ -4240,9 +4272,9 @@ void SaveGameFilePosition( INT32 iPos, STR pMsg )
void InitLoadGameFilePosition()
{
CHAR8 zFileName[128];
CHAR8 zFileName[MAX_PATH];
sprintf( zFileName, "%S\\LoadGameFilePos%2d.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gubSaveGameLoc );
sprintf( zFileName, "%s\\LoadGameFilePos%2d.txt", gSaveDir, gubSaveGameLoc );
FileDelete( zFileName );
}
@@ -4253,9 +4285,9 @@ void LoadGameFilePosition( INT32 iPos, STR pMsg )
UINT32 uiNumBytesWritten;
UINT32 uiStrLen=0;
CHAR8 zFileName[128];
CHAR8 zFileName[MAX_PATH];
sprintf( zFileName, "%S\\LoadGameFilePos%2d.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gubSaveGameLoc );
sprintf( zFileName, "%s\\LoadGameFilePos%2d.txt", gSaveDir, gubSaveGameLoc );
// create the save game file
hFile = FileOpen( zFileName, FILE_ACCESS_WRITE | FILE_OPEN_ALWAYS, FALSE );
@@ -4862,7 +4894,7 @@ BOOLEAN DoesUserHaveEnoughHardDriveSpace()
void InitShutDownMapTempFileTest( BOOLEAN fInit, STR pNameOfFile, UINT8 ubSaveGameID )
{
CHAR8 zFileName[128];
CHAR8 zFileName[MAX_PATH];
HWFILE hFile;
CHAR8 zTempString[512];
UINT32 uiStrLen;
@@ -4871,7 +4903,7 @@ void InitShutDownMapTempFileTest( BOOLEAN fInit, STR pNameOfFile, UINT8 ubSaveGa
//strcpy( gzNameOfMapTempFile, pNameOfFile);
sprintf( gzNameOfMapTempFile, "%s%d", pNameOfFile, ubSaveGameID );
sprintf( zFileName, "%S\\%s.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gzNameOfMapTempFile );
sprintf( zFileName, "%s\\%s.txt", gSaveDir, gzNameOfMapTempFile );
if( fInit )
{
@@ -4917,11 +4949,11 @@ void WriteTempFileNameToFile( STR pFileName, UINT32 uiSizeOfFile, HFILE hSaveFil
UINT32 uiNumBytesWritten;
UINT32 uiStrLen=0;
CHAR8 zFileName[128];
CHAR8 zFileName[MAX_PATH];
guiSizeOfTempFiles += uiSizeOfFile;
sprintf( zFileName, "%S\\%s.txt", pMessageStrings[ MSG_SAVEDIRECTORY ], gzNameOfMapTempFile );
sprintf( zFileName, "%s\\%s.txt", gSaveDir, gzNameOfMapTempFile );
// create the save game file
hFile = FileOpen( zFileName, FILE_ACCESS_WRITE | FILE_OPEN_ALWAYS, FALSE );
@@ -5054,9 +5086,7 @@ void TruncateStrategicGroupSizes()
SECTORINFO *pSector;
INT32 i;
//Kaiden: Loading INI file to read Values...
CIniReader iniReader("..\\Ja2_Options.ini");
INT32 iMaxEnemyGroupSize = iniReader.ReadInteger("Options","MAX_STRATEGIC_TEAM_SIZE",20);
INT32 iMaxEnemyGroupSize = gGameExternalOptions.iMaxEnemyGroupSize;
for( i = SEC_A1; i < SEC_P16; i++ )
@@ -5242,8 +5272,8 @@ void UpdateMercMercContractInfo()
INT8 GetNumberForAutoSave( BOOLEAN fLatestAutoSave )
{
CHAR zFileName1[256];
CHAR zFileName2[256];
CHAR zFileName1[MAX_PATH];
CHAR zFileName2[MAX_PATH];
HWFILE hFile;
BOOLEAN fFile1Exist, fFile2Exist;
SGP_FILETIME CreationTime1, LastAccessedTime1, LastWriteTime1;
@@ -5254,8 +5284,8 @@ INT8 GetNumberForAutoSave( BOOLEAN fLatestAutoSave )
//The name of the file
sprintf( zFileName1, "%S\\Auto%02d.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], 0, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( zFileName2, "%S\\Auto%02d.%S", pMessageStrings[ MSG_SAVEDIRECTORY ], 1, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( zFileName1, "%s\\Auto%02d.%S", gSaveDir, 0, pMessageStrings[ MSG_SAVEEXTENSION ] );
sprintf( zFileName2, "%s\\Auto%02d.%S", gSaveDir, 1, pMessageStrings[ MSG_SAVEEXTENSION ] );
if( FileExists( zFileName1 ) )
{
@@ -5424,4 +5454,4 @@ UINT32 CalcJA2EncryptionSet( SAVED_GAME_HEADER * pSaveGameHeader )
}
return( uiEncryptionSet );
}
}
+1 -2
View File
@@ -54,14 +54,13 @@ typedef struct
} SAVED_GAME_HEADER;
extern UINT32 guiScreenToGotoAfterLoadingSavedGame;
extern UINT32 guiSaveGameVersion;
void CreateSavedGameFileNameFromNumber( UINT8 ubSaveGameID, STR pzNewFileName );
BOOLEAN InitSaveDir();
BOOLEAN SaveGame( UINT8 ubSaveGameID, STR16 pGameDesc );
BOOLEAN LoadSavedGame( UINT8 ubSavedGameID );
@@ -1658,6 +1658,7 @@ INT32 CreateIconButton(INT16 Icon,INT16 IconIndex,INT16 GenImg,INT16 xloc,INT16
b->BackRect = -1;
#endif
// WANNE 2
// Add button to the button list
#ifdef BUTTONSYSTEM_DEBUGGING
AssertFailIfIdenticalButtonAttributesFound( b );
@@ -4160,6 +4161,7 @@ void BtnGenericMouseMoveButtonCallback(GUI_BUTTON *btn,INT32 reason)
PlayButtonSound( btn->IDNum, BUTTON_SOUND_CLICKED_OFF );
}
}
#ifdef JA2
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
#endif
@@ -4171,6 +4173,7 @@ void BtnGenericMouseMoveButtonCallback(GUI_BUTTON *btn,INT32 reason)
{
PlayButtonSound( btn->IDNum, BUTTON_SOUND_CLICKED_ON );
}
#ifdef JA2
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
#endif
+1
View File
@@ -772,6 +772,7 @@ BOOLEAN CanBlitToMouseBuffer(void)
void InvalidateRegion(INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom)
{
// WANNE 2
if (gfForceFullScreenRefresh == TRUE)
{
//
+40 -25
View File
@@ -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
View File
@@ -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 ) );
+9 -6
View File
@@ -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
+61 -17
View File
@@ -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;
}
+7 -6
View File
@@ -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;
+79 -40
View File
@@ -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 );
+56 -32
View File
@@ -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 );
+23 -2
View File
@@ -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;
+23 -15
View File
@@ -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 );
}
+1 -1
View File
@@ -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
+606
View File
@@ -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
+2 -2
View File
@@ -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
+7 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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 );
+5 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -430,10 +431,11 @@ void AutoBandage( BOOLEAN fStart )
giBoxId = PrepareMercPopupBox( -1, DIALOG_MERC_POPUP_BACKGROUND, DIALOG_MERC_POPUP_BORDER, sAutoBandageString, 200, 40, 10, 30, &gusTextBoxWidth, &gusTextBoxHeight );
}
// WANNE 2
aRect.iTop = 0;
aRect.iLeft = 0;
aRect.iBottom = INV_INTERFACE_START_Y;
aRect.iRight = 640;
aRect.iRight = SCREEN_WIDTH;
// Determine position ( centered in rect )
gsX = (INT16)( ( ( ( aRect.iRight - aRect.iLeft ) - gusTextBoxWidth ) / 2 ) + aRect.iLeft );
@@ -725,8 +727,9 @@ void DisplayAutoBandageUpdatePanel( void )
iTotalPixelsWide = TACT_UPDATE_MERC_FACE_X_WIDTH * iNumberDoctorsWide;
// WANNE 2
// now get the x and y position for the box
sXPosition = ( 640 - iTotalPixelsWide ) / 2;
sXPosition = ( SCREEN_WIDTH - iTotalPixelsWide ) / 2;
sYPosition = ( INV_INTERFACE_START_Y - iTotalPixelsHigh ) / 2;
+7 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -60,8 +61,12 @@ UINT8 CalcImportantSectorControl( void );
// give pSoldier usNumChances to improve ubStat. If it's from training, it doesn't count towards experience level gain
void StatChange(SOLDIERTYPE *pSoldier, UINT8 ubStat, UINT16 usNumChances, UINT8 ubReason)
{
Assert(pSoldier != NULL);
Assert(pSoldier->bActive);
// WANNE 2
if (pSoldier == NULL || pSoldier->bActive == FALSE)
return; // THIS SHOULD NEVER HAPPEN
//Assert(pSoldier != NULL);
//Assert(pSoldier->bActive);
// ignore non-player soldiers
if (!PTR_OURTEAM)
+5 -4
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#endif
@@ -380,9 +381,9 @@ void BeginCivQuote( SOLDIERTYPE *pCiv, UINT8 ubCivQuoteID, UINT8 ubEntryID, INT1
}
// CHECK FOR LEFT/RIGHT
if ( ( sX + gusCivQuoteBoxWidth ) > 640 )
if ( ( sX + gusCivQuoteBoxWidth ) > SCREEN_WIDTH )
{
sX = 640 - gusCivQuoteBoxWidth;
sX = SCREEN_WIDTH - gusCivQuoteBoxWidth;
}
// Now check for top
@@ -392,9 +393,9 @@ void BeginCivQuote( SOLDIERTYPE *pCiv, UINT8 ubCivQuoteID, UINT8 ubEntryID, INT1
}
// Check for bottom
if ( ( sY + gusCivQuoteBoxHeight ) > 340 )
if ( ( sY + gusCivQuoteBoxHeight ) > (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT))
{
sY = 340 - gusCivQuoteBoxHeight;
sY = (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) - gusCivQuoteBoxHeight;
}
}
+9
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#include "PreBattle Interface.h"
@@ -1977,6 +1978,8 @@ void ExecuteTacticalTextBox( INT16 sLeftPosition, STR16 pString )
VIDEO_OVERLAY_DESC VideoOverlayDesc;
// check if mouse region created, if so, do not recreate
// WANNE 2
if( fTextBoxMouseRegionCreated == TRUE )
{
return;
@@ -2003,6 +2006,12 @@ void ExecuteTacticalTextBox( INT16 sLeftPosition, STR16 pString )
gsTopPosition = 20;
// WANNE 2
//if( fTextBoxMouseRegionCreated == TRUE )
//{
// return;
//}
//Define main region
MSYS_DefineRegion( &gTextBoxMouseRegion, VideoOverlayDesc.sLeft, VideoOverlayDesc.sTop, VideoOverlayDesc.sRight, VideoOverlayDesc.sBottom, MSYS_PRIORITY_HIGHEST,
CURSOR_NORMAL, MSYS_NO_CALLBACK, TextOverlayClickCallback );
+2 -2
View File
@@ -434,7 +434,7 @@ INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTa
}
usRange = (UINT16)GetRangeInCellCoordsFromGridNoDiff( pOpponent->sGridNo, sTargetGridNo );
usSightLimit = DistanceVisible( pOpponent, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel );
usSightLimit = DistanceVisible( pOpponent, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel, pSoldier );
if( usRange > ( usSightLimit * CELL_X_SIZE ) )
{
@@ -933,7 +933,7 @@ INT8 CalcIfSoldierCanSeeGridNo( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, BOOL
}
usSightLimit = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, fRoof );
usSightLimit = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, fRoof, pSoldier );
//
// Prone
+2 -2
View File
@@ -163,7 +163,7 @@ void HandleDeidrannaDeath( SOLDIERTYPE *pKillerSoldier, INT16 sGridNo, INT8 bLev
if ( QuoteExp_WitnessDeidrannaDeath[ pTeamSoldier->ubProfile ] )
{
// Can we see location?
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pTeamSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pTeamSoldier, sGridNo, bLevel, 3, (UINT8) sDistVisible, TRUE ) )
{
@@ -454,7 +454,7 @@ void HandleQueenBitchDeath( SOLDIERTYPE *pKillerSoldier, INT16 sGridNo, INT8 bLe
if ( QuoteExp_WitnessQueenBugDeath[ pTeamSoldier->ubProfile ] )
{
// Can we see location?
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pTeamSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pTeamSoldier, sGridNo, bLevel, 3, (UINT8) sDistVisible, TRUE ) )
{
+7 -2
View File
@@ -452,7 +452,12 @@ INT32 HandleItem( SOLDIERTYPE *pSoldier, UINT16 usGridNo, INT8 bLevel, UINT16 us
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("HandleItem: auto fire - setting dice sides, marksmanship = %d",pSoldier->bMarksmanship));
//UINT32 diceSides = RAND_MAX;
//Madd: tried to make this more marksmanship dependent than agility, a level 10 auto-weapons specialist with 100 in all stats was wasting wayyy too many APs on this fucker
UINT32 diceSides = RAND_MAX / ( max(1,pSoldier->bMarksmanship) / 10) ;
//UINT32 diceSides = RAND_MAX / ( max(1,pSoldier->bMarksmanship) / 10) ;
//Kaiden: Had to change the minimum value to 10 instead of 1,
//Rounding down resulted in division by zero and caused a crash.
UINT32 diceSides = RAND_MAX / ( max(10,pSoldier->bMarksmanship) / 10) ;
DOUBLE avgAPadded = max(((400.0f-2.0f*pSoldier->bAgility))*(63.0f-5.0f*(pSoldier->bExpLevel+2.0f*NUM_SKILL_TRAITS( pSoldier, AUTO_WEAPS )))/2700.0f,1); //Important! don't make this zero, the formulae don't like it.
UINT32 chanceToMisfire = (UINT32)(((DOUBLE)diceSides*(2.0f*avgAPadded+1.0f-sqrt(4.0f*avgAPadded+1.0f)))/(2.0f*avgAPadded)); //derive the chace to misfire from the desired average AP overspent, derived suing
UINT32 chanceToMisfireDry = (UINT32)(((DOUBLE)diceSides*(avgAPadded+1.0f-sqrt(2.0f*avgAPadded+1.0f)))/(avgAPadded)); //chance to misfire if weapon is dry. Designed to waste avgAPadded/2 APs
@@ -4973,7 +4978,7 @@ void TestPotentialOwner( SOLDIERTYPE * pSoldier )
{
if ( pSoldier->bActive && pSoldier->bInSector && pSoldier->bLife >= OKLIFE )
{
if ( SoldierToSoldierLineOfSightTest( pSoldier, gpTempSoldier, (UINT8) DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, 0, gpTempSoldier->sGridNo, gpTempSoldier->bLevel ), TRUE ) )
if ( SoldierToSoldierLineOfSightTest( pSoldier, gpTempSoldier, (UINT8) DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, 0, gpTempSoldier->sGridNo, gpTempSoldier->bLevel, gpTempSoldier ), TRUE ) )
{
MakeNPCGrumpyForMinorOffense( pSoldier, gpTempSoldier );
}
+3 -3
View File
@@ -4669,7 +4669,7 @@ UINT32 UIHandleTOnTerrain( UI_EVENT *pUIEvent )
//ATE: Check if we have good LOS
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sTargetGridNo, pSoldier->bLevel, pSoldier );
if ( uiRange <= NPC_TALK_RADIUS )
@@ -5484,7 +5484,7 @@ BOOLEAN HandleTalkInit( )
{
//ATE: Check if we have good LOS
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pTSoldier->sGridNo, pTSoldier->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pTSoldier->sGridNo, pTSoldier->bLevel, pTSoldier );
// Check LOS!
if ( !SoldierTo3DLocationLineOfSightTest( pSoldier, pTSoldier->sGridNo, pTSoldier->bLevel, 3, (UINT8) sDistVisible, TRUE ) )
@@ -6150,7 +6150,7 @@ BOOLEAN ValidQuickExchangePosition( )
if ( PythSpacesAway( pSoldier->sGridNo, pOverSoldier->sGridNo ) == 1 )
{
// Check if we have LOS to them....
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pOverSoldier->sGridNo, pOverSoldier->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pOverSoldier->sGridNo, pOverSoldier->bLevel, pOverSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pSoldier, pOverSoldier->sGridNo, pOverSoldier->bLevel, (UINT8)3, (UINT8) sDistVisible, TRUE ) )
{
+40 -43
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#include "language defines.h"
@@ -1062,37 +1063,6 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
{
// CHECK FOR COMPATIBILITY WITH MAGAZINES
/* OLD VERSION OF GUN/AMMO MATCH HIGHLIGHTING
UINT32 uiDestPitchBYTES;
UINT8 *pDestBuf;
UINT16 usLineColor;
if ( ( Item [ pSoldier->inv[ HANDPOS ].usItem ].usItemClass & IC_GUN ) && ( Item[ pObject->usItem ].usItemClass & IC_AMMO ) )
{
// CHECK
if (Weapon[pSoldier->inv[ HANDPOS ].usItem].ubCalibre == Magazine[Item[pObject->usItem].ubClassIndex].ubCalibre )
{
// IT's an OK calibre ammo, do something!
// Render Item with specific color
//fOutline = TRUE;
//sOutlineColor = Get16BPPColor( FROMRGB( 96, 104, 128 ) );
//sOutlineColor = Get16BPPColor( FROMRGB( 20, 20, 120 ) );
// Draw rectangle!
pDestBuf = LockVideoSurface( guiSAVEBUFFER, &uiDestPitchBYTES );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
//usLineColor = Get16BPPColor( FROMRGB( 255, 255, 0 ) );
usLineColor = Get16BPPColor( FROMRGB( 230, 215, 196 ) );
RectangleDraw( TRUE, (sX+1), (sY+1), (sX + gSMInvData[ sPocket ].sWidth - 2 ),( sY + gSMInvData[ sPocket ].sHeight - 2 ), usLineColor, pDestBuf );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, 640, 480 );
UnLockVideoSurface( guiSAVEBUFFER );
}
}
*/
if ( gbCompatibleAmmo[ sPocket ] )
{
fOutline = TRUE;
@@ -4913,7 +4883,7 @@ BOOLEAN HandleItemPointerClick( UINT16 usMapPos )
return( FALSE );
}
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel, gpItemPointerSoldier );
// Check LOS....
if ( !SoldierTo3DLocationLineOfSightTest( pSoldier, gpItemPointerSoldier->sGridNo, gpItemPointerSoldier->bLevel, 3, (UINT8) sDistVisible, TRUE ) )
@@ -7221,15 +7191,34 @@ void GetHelpTextForItem( INT16 * pzStr, OBJECTTYPE *pObject, SOLDIERTYPE *pSoldi
}
else if ( usItem != NOTHING )
{
if ( !gGameOptions.fGunNut && Item[ usItem ].usItemClass == IC_GUN && !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle )
// Retrieve the status of the items
// Find the minimum status value - not just the first one
INT16 sValue = pObject->bStatus[ 0 ];
INT16 i;
for(i = 1; i < pObject->ubNumberOfObjects; i++)
{
swprintf( (wchar_t *)pStr, L"%s (%s)", ItemNames[ usItem ], AmmoCaliber[ Weapon[ usItem ].ubCalibre ] );
}
else
{
swprintf( (wchar_t *)pStr, L"%s", ItemNames[ usItem ] );
if(pObject->bStatus[ i ] < sValue)
{
sValue = pObject->bStatus[ i ];
}
}
// The first tool tip is for rocket rifles
if ( !gGameOptions.fGunNut && Item[ usItem ].usItemClass == IC_GUN && !Item[usItem].rocketlauncher && !Item[usItem].rocketrifle )
{
swprintf( (wchar_t *)pStr, L"%s (%s) [%d%%]", ItemNames[ usItem ], AmmoCaliber[ Weapon[ usItem ].ubCalibre ], sValue );
}
// The next is for ammunition which gets the measurement 'rnds'
else if (Item[ usItem ].usItemClass == IC_AMMO)
{
swprintf( (wchar_t *)pStr, L"%s [%d rnds]", ItemNames[ usItem ], sValue );
}
// The final, and typical case, is that of an item with a percent status
else
{
swprintf( (wchar_t *)pStr, L"%s [%d%%]", ItemNames[ usItem ], sValue );
}
if ( ( Item[pObject->usItem].fingerprintid ) && pObject->ubImprintID < NO_PROFILE )
{
INT16 pStr2[20];
@@ -7531,9 +7520,10 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
}
// CHECK FOR LEFT/RIGHT
if ( ( sX + gItemPickupMenu.sWidth ) > 640 )
// WANNE 2
if ( ( sX + gItemPickupMenu.sWidth ) > SCREEN_WIDTH )
{
sX = 640 - gItemPickupMenu.sWidth - ITEMPICK_START_X_OFFSET;
sX = SCREEN_WIDTH - gItemPickupMenu.sWidth - ITEMPICK_START_X_OFFSET;
}
else
{
@@ -7552,9 +7542,10 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
}
// Check for bottom
if ( ( sY + gItemPickupMenu.sHeight ) > 340 )
// WANNE 2
if ( ( sY + gItemPickupMenu.sHeight ) > (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) )
{
sY = 340 - gItemPickupMenu.sHeight;
sY = (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) - gItemPickupMenu.sHeight;
}
}
@@ -7580,8 +7571,14 @@ BOOLEAN InitializeStealItemPickupMenu( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOppo
// Build a mouse region here that is over any others.....
MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( 532 ), (INT16)( 367 ), (INT16)( 640 ),(INT16)( 480 ), MSYS_PRIORITY_HIGHEST,
/*MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( 532 ), (INT16)( 367 ), (INT16)( 640 ),(INT16)( 480 ), MSYS_PRIORITY_HIGHEST,
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK ); */
// WANNE 2
// Build a mouse region here that is over any others.....
MSYS_DefineRegion( &(gItemPickupMenu.BackRegion ), (INT16)( iScreenWidthOffset + 532 ), (INT16)( iScreenHeightOffset + 367 ), (INT16)( SCREEN_WIDTH ),(INT16)( SCREEN_HEIGHT ), MSYS_PRIORITY_HIGHEST,
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
// Add region
MSYS_AddRegion( &(gItemPickupMenu.BackRegion ) );
+26 -18
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -312,7 +313,7 @@ int INTERFACE_CLOCK_X;
int INTERFACE_CLOCK_Y;
int LOCATION_NAME_X;
int LOCATION_NAME_Y;
typedef enum
{
@@ -561,7 +562,7 @@ void CheckForDisabledForGiveItem( )
{
sDist = PythSpacesAway( gpSMCurrentMerc->sGridNo, pSoldier->sGridNo );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->bLevel, gpSMCurrentMerc );
// Check LOS....
if ( SoldierTo3DLocationLineOfSightTest( pSoldier, gpSMCurrentMerc->sGridNo, gpSMCurrentMerc->bLevel, 3, (UINT8) sDistVisible, TRUE ) )
@@ -596,7 +597,7 @@ void CheckForDisabledForGiveItem( )
sDist = PythSpacesAway( MercPtrs[ ubSrcSoldier ]->sGridNo, sDestGridNo );
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( MercPtrs[ ubSrcSoldier ], DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sDestGridNo, bDestLevel );
sDistVisible = DistanceVisible( MercPtrs[ ubSrcSoldier ], DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sDestGridNo, bDestLevel, MercPtrs[ ubSrcSoldier ] );
// Check LOS....
if ( SoldierTo3DLocationLineOfSightTest( MercPtrs[ ubSrcSoldier ], sDestGridNo, bDestLevel, 3, (UINT8) sDistVisible, TRUE ) )
@@ -1316,9 +1317,11 @@ BOOLEAN InitializeSMPanelCoords( )
SM_LOOKB_Y = ( 108 + INV_INTERFACE_START_Y );
SM_STEALTHMODE_X = ( 187 + INTERFACE_START_X );
SM_STEALTHMODE_Y = ( 73 + INV_INTERFACE_START_Y );
SM_DONE_X = ( 543 + INTERFACE_START_X );
// WANNE 2
SM_DONE_X = (SCREEN_WIDTH - 97);//( 543 + INTERFACE_START_X );
SM_DONE_Y = ( 4 + INV_INTERFACE_START_Y );
SM_MAPSCREEN_X = ( 589 + INTERFACE_START_X );
SM_MAPSCREEN_X = (SCREEN_WIDTH - 51);//( 589 + INTERFACE_START_X );
SM_MAPSCREEN_Y = ( 4 + INV_INTERFACE_START_Y );
SM_POSITIONB_X = ( 106 + INTERFACE_START_X );
@@ -1382,9 +1385,9 @@ BOOLEAN InitializeSMPanelCoords( )
STATS_TEXT_FONT_COLOR = 5;
// ow and te clock and location i will put it here
INTERFACE_CLOCK_X = ( 554 + INTERFACE_START_X );
INTERFACE_CLOCK_X = (SCREEN_WIDTH - 86); //( 554 + INTERFACE_START_X );
INTERFACE_CLOCK_Y = ( 119 + INV_INTERFACE_START_Y );
LOCATION_NAME_X = ( 548 + INTERFACE_START_X );
LOCATION_NAME_X = (SCREEN_WIDTH - 92); //( 548 + INTERFACE_START_X );
LOCATION_NAME_Y = ( 65 + INTERFACE_START_Y );
// so we got everything "dynamic" now we just return TRUE
@@ -3486,6 +3489,7 @@ void BtnPositionShowCallback(GUI_BUTTON *btn,INT32 reason)
}
// WANNE 2
BOOLEAN InitializeTEAMPanelCoords( )
{
@@ -3494,11 +3498,12 @@ BOOLEAN InitializeTEAMPanelCoords( )
TM_APPANEL_HEIGHT = 56;
TM_APPANEL_WIDTH = 16;
TM_ENDTURN_X = ( 507 + INTERFACE_START_X );
// WANNE 2
TM_ENDTURN_X = (SCREEN_WIDTH - 133); //( 507 + INTERFACE_START_X );
TM_ENDTURN_Y = ( 9 + INTERFACE_START_Y );
TM_ROSTERMODE_X = ( 507 + INTERFACE_START_X );
TM_ROSTERMODE_X = (SCREEN_WIDTH - 133); //( 507 + INTERFACE_START_X );
TM_ROSTERMODE_Y = ( 45 + INTERFACE_START_Y );
TM_DISK_X = ( 507 + INTERFACE_START_X );
TM_DISK_X = (SCREEN_WIDTH - 133); //( 507 + INTERFACE_START_X );
TM_DISK_Y = ( 81 + INTERFACE_START_Y );
TM_NAME_WIDTH = 60;
@@ -3606,6 +3611,9 @@ BOOLEAN InitializeTEAMPanel( )
UINT32 cnt, posIndex;
static BOOLEAN fFirstTime = TRUE;
// WANNE 2
fDisplayOverheadMap = TRUE;
/* OK i need to initialize coords here
* Isnt it cool
* any questions? joker
@@ -3716,6 +3724,7 @@ BOOLEAN InitializeTEAMPanel( )
// Add user data
MSYS_SetRegionUserData( &gTEAM_SecondHandInv[ cnt ], 0, cnt );
}
@@ -3784,6 +3793,7 @@ void RenderTEAMPanel( BOOLEAN fDirty )
SOLDIERTYPE *pSoldier;
static INT16 pStr[ 200 ], pMoraleStr[ 20 ];
// WANNE 2 <new>
if ( fDirty == DIRTYLEVEL2 )
{
MarkAButtonDirty( iTEAMPanelButtons[ TEAM_DONE_BUTTON ] );
@@ -3792,12 +3802,10 @@ void RenderTEAMPanel( BOOLEAN fDirty )
// Blit video surface
//if(gbPixelDepth==16)
//{
BltVideoObjectFromIndex( guiSAVEBUFFER, guiTEAMPanel, 0, INTERFACE_START_X, INTERFACE_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
//}
RestoreExternBackgroundRect( INTERFACE_START_X, INTERFACE_START_Y, SCREEN_WIDTH - INTERFACE_START_X , INTERFACE_HEIGHT );
BltVideoObjectFromIndex( guiSAVEBUFFER, guiTEAMPanel, 0, INTERFACE_START_X, INTERFACE_START_Y, VO_BLT_SRCTRANSPARENCY, NULL );
RestoreExternBackgroundRect( INTERFACE_START_X, INTERFACE_START_Y, SCREEN_WIDTH - INTERFACE_START_X , INTERFACE_HEIGHT );
// WANNE 2 <new> <begin>
// LOOP THROUGH ALL MERCS ON TEAM PANEL
for ( cnt = 0, posIndex = 0; cnt < NUM_TEAM_SLOTS; cnt++, posIndex+= 2 )
{
@@ -4039,10 +4047,10 @@ void RenderTEAMPanel( BOOLEAN fDirty )
}
}
}
UpdateTEAMPanel( );
if( fRenderRadarScreen == TRUE )
{
// Render clock
+4 -4
View File
@@ -253,7 +253,7 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
{
case SOLDIER_CLASS_NONE:
// ammo is here only so that civilians with pre-assigned ammo will get some clips for it!
bAmmoClips = (INT8)(1 + Random( 2 ));
bAmmoClips = (INT8)(2 + Random( 2 ));
// civilians get nothing, anyone who should get something should be preassigned by Linda
break;
@@ -274,7 +274,7 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
if( Random( 2 ) )
bKnifeClass = bRating;
bAmmoClips = (INT8)(2 + Random( 2 ));
bAmmoClips = (INT8)(3 + Random( 2 ));
if( bRating >= GOOD_ADMINISTRATOR_EQUIPMENT_RATING )
{
@@ -316,7 +316,7 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
bAttachClass = bRating;
}
bAmmoClips = (INT8)(2 + Random( 2 ));
bAmmoClips = (INT8)(3 + Random( 2 ));
if( bRating >= AVERAGE_ARMY_EQUIPMENT_RATING )
{
@@ -429,7 +429,7 @@ void GenerateRandomEquipment( SOLDIERCREATE_STRUCT *pp, INT8 bSoldierClass, INT8
}
bAmmoClips = (INT8)(3 + Random( 2 ));
bGrenades = (INT8)(1 + Random( 3 ));
bGrenades = (INT8)(3 + Random( 3 ));
if( ( bRating >= AVERAGE_ELITE_EQUIPMENT_RATING ) && ( Random( 100 ) < 75 ) )
{
+3 -3
View File
@@ -1309,7 +1309,7 @@ BOOLEAN AllMercsLookForDoor( INT16 sGridNo, BOOLEAN fUpdateValue )
if ( pSoldier->bLife >= OKLIFE && pSoldier->sGridNo != NOWHERE && pSoldier->bActive && pSoldier->bInSector )
{
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0 );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0, pSoldier );
if (PythSpacesAway( pSoldier->sGridNo, sGridNo ) <= sDistVisible )
{
@@ -1330,7 +1330,7 @@ BOOLEAN AllMercsLookForDoor( INT16 sGridNo, BOOLEAN fUpdateValue )
for ( cnt2 = 0; cnt2 < 8; cnt2++ )
{
usNewGridNo = NewGridNo( sGridNo, DirectionInc( bDirs[ cnt2 ] ) );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, usNewGridNo, 0 );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, usNewGridNo, 0, pSoldier );
if (PythSpacesAway( pSoldier->sGridNo, usNewGridNo ) <= sDistVisible )
{
@@ -1378,7 +1378,7 @@ BOOLEAN MercLooksForDoors( SOLDIERTYPE *pSoldier, BOOLEAN fUpdateValue )
sGridNo = pDoorStatus->sGridNo;
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0 );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0, pSoldier );
if ( PythSpacesAway( pSoldier->sGridNo, sGridNo ) <= sDistVisible )
{
+2
View File
@@ -7123,6 +7123,8 @@ BOOLEAN ProcessImplicationsOfPCAttack( SOLDIERTYPE * pSoldier, SOLDIERTYPE ** pp
if ( pTarget->ubProfile == NO_PROFILE || !(gMercProfiles[ pTarget->ubProfile ].ubMiscFlags3 & PROFILE_MISC_FLAG3_TOWN_DOESNT_CARE_ABOUT_DEATH) )
{
//Kaiden: Added to keep Militia from going Hostile if you attack a Crow or Cow with an explosive.
if ( (pTarget->ubBodyType != CROW) && (pTarget->ubBodyType != COW) )
// militia, if any, turn hostile
MilitiaChangesSides();
}
+2 -2
View File
@@ -1210,7 +1210,7 @@ void AllMercsOnTeamLookForCorpse( ROTTING_CORPSE *pCorpse, INT8 bTeam )
if ( pSoldier->bLife >= OKLIFE && pSoldier->sGridNo != NOWHERE && pSoldier->bActive && pSoldier->bInSector )
{
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, pCorpse->def.bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, pCorpse->def.bLevel, pSoldier );
if (PythSpacesAway( pSoldier->sGridNo, sGridNo ) <= sDistVisible )
{
@@ -1274,7 +1274,7 @@ void MercLooksForCorpses( SOLDIERTYPE *pSoldier )
sGridNo = pCorpse->def.sGridNo;
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, pCorpse->def.bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, pCorpse->def.bLevel, pSoldier );
if (PythSpacesAway( pSoldier->sGridNo, sGridNo ) <= sDistVisible )
{
+119 -97
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -79,6 +80,13 @@ SKIRGBCOLOR SkiGlowColorsA[]={
//
///////////////////////////////////////////
// WANNE 2
#define SKI_INTERFACE_WIDTH 536
#define SKI_INTERFACE_HEIGHT 340
#define SCREEN_X_OFFSET (((SCREEN_WIDTH - SKI_INTERFACE_WIDTH) / 2))
#define SCREEN_Y_OFFSET ((((SCREEN_HEIGHT - INV_INTERFACE_HEIGHT) - (SKI_INTERFACE_HEIGHT)) / 2))
#define SKI_BUTTON_FONT MILITARYFONT1//FONT14ARIAL
#define SKI_BUTTON_COLOR 73
@@ -96,50 +104,50 @@ SKIRGBCOLOR SkiGlowColorsA[]={
#define SKIT_NUMBER_FONT BLOCKFONT2
#define SKI_MAIN_BACKGROUND_X 0
#define SKI_MAIN_BACKGROUND_Y 0
#define SKI_MAIN_BACKGROUND_X SCREEN_X_OFFSET
#define SKI_MAIN_BACKGROUND_Y SCREEN_Y_OFFSET
#define SKI_FACE_X 13
#define SKI_FACE_Y 13
#define SKI_FACE_X (SCREEN_X_OFFSET + 13)
#define SKI_FACE_Y (SCREEN_Y_OFFSET + 13)
#define SKI_FACE_WIDTH 90
#define SKI_FACE_HEIGHT 100
#define SKI_PAGE_UP_ARROWS_X 121
#define SKI_PAGE_UP_ARROWS_Y 35
#define SKI_PAGE_UP_ARROWS_X (SCREEN_X_OFFSET + 121)
#define SKI_PAGE_UP_ARROWS_Y (SCREEN_Y_OFFSET + 35)
#define SKI_PAGE_DOWN_ARROWS_X SKI_PAGE_UP_ARROWS_X
#define SKI_PAGE_DOWN_ARROWS_Y 102
#define SKI_PAGE_DOWN_ARROWS_Y (SCREEN_Y_OFFSET + 102)
//Evaluate:
//#define SKI_EVALUATE_BUTTON_X 15
//#define SKI_EVALUATE_BUTTON_Y 233
#define SKI_TRANSACTION_BUTTON_X 147//214
#define SKI_TRANSACTION_BUTTON_Y 233//SKI_EVALUATE_BUTTON_Y
#define SKI_TRANSACTION_BUTTON_X (SCREEN_X_OFFSET + 147)//214
#define SKI_TRANSACTION_BUTTON_Y (SCREEN_Y_OFFSET +233)//SKI_EVALUATE_BUTTON_Y
#define SKI_DONE_BUTTON_X 292//414
#define SKI_DONE_BUTTON_Y 233//SKI_EVALUATE_BUTTON_Y
#define SKI_DONE_BUTTON_X (SCREEN_X_OFFSET + 292)//414
#define SKI_DONE_BUTTON_Y (SCREEN_Y_OFFSET + 233)//SKI_EVALUATE_BUTTON_Y
#define SKI_MAIN_TITLE_X 112
#define SKI_MAIN_TITLE_Y 12
#define SKI_MAIN_TITLE_X (SCREEN_X_OFFSET + 112)
#define SKI_MAIN_TITLE_Y (SCREEN_Y_OFFSET + 12)
#define SKI_MAIN_TITLE_WIDTH 420
#define SKI_TOTAL_COST_X 9
#define SKI_TOTAL_COST_Y 162//159
#define SKI_TOTAL_COST_X (SCREEN_X_OFFSET + 9)
#define SKI_TOTAL_COST_Y (SCREEN_Y_OFFSET + 162)//159
#define SKI_TOTAL_COST_WIDTH 73
#define SKI_TOTAL_VALUE_X SKI_TOTAL_COST_X
#define SKI_TOTAL_VALUE_Y 291//268
#define SKI_TOTAL_VALUE_Y (SCREEN_Y_OFFSET + 291)//268
#define SKI_TOTAL_VALUE_WIDTH SKI_TOTAL_COST_WIDTH
#define SKI_PLAYERS_CURRENT_BALANCE_X SKI_TOTAL_COST_X
#define SKI_PLAYERS_CURRENT_BALANCE_Y 235
#define SKI_PLAYERS_CURRENT_BALANCE_WIDTH SKI_TOTAL_COST_WIDTH
#define SKI_PLAYERS_CURRENT_BALANCE_OFFSET_TO_VALUE 265
#define SKI_PLAYERS_CURRENT_BALANCE_X SKI_TOTAL_COST_X
#define SKI_PLAYERS_CURRENT_BALANCE_Y (SCREEN_Y_OFFSET + 235)
#define SKI_PLAYERS_CURRENT_BALANCE_WIDTH SKI_TOTAL_COST_WIDTH
#define SKI_PLAYERS_CURRENT_BALANCE_OFFSET_TO_VALUE SCREEN_Y_OFFSET + 265
#define SKI_PAGE_X 112
#define SKI_PAGE_Y 70
#define SKI_PAGE_X (SCREEN_X_OFFSET + 112)
#define SKI_PAGE_Y (SCREEN_Y_OFFSET + 70)
#define SKI_PAGE_WIDTH 45
#define SKI_PAGE_HEIGHT 27
@@ -166,49 +174,48 @@ SKIRGBCOLOR SkiGlowColorsA[]={
#define SKI_GLOW_DELAY 70
//Start Locations for the inventory boxes
#define SKI_ARMS_DEALERS_INV_START_X 165
#define SKI_ARMS_DEALERS_INV_START_Y 30
#define SKI_ARMS_DEALERS_INV_START_X (SCREEN_X_OFFSET + 165)
#define SKI_ARMS_DEALERS_INV_START_Y (SCREEN_Y_OFFSET + 30)
#define SKI_ARMS_DEALERS_TRADING_INV_X 91
#define SKI_ARMS_DEALERS_TRADING_INV_Y 151
#define SKI_ARMS_DEALERS_TRADING_INV_X (SCREEN_X_OFFSET + 91)
#define SKI_ARMS_DEALERS_TRADING_INV_Y (SCREEN_Y_OFFSET + 151)
#define SKI_ARMS_DEALERS_TRADING_INV_WIDTH 436
#define SKI_ARMS_DEALERS_TRADING_INV_HEIGHT 67
#define SKI_PLAYERS_TRADING_INV_X 91
#define SKI_PLAYERS_TRADING_INV_Y 266
#define SKI_PLAYERS_TRADING_INV_X (SCREEN_X_OFFSET + 91)
#define SKI_PLAYERS_TRADING_INV_Y (SCREEN_Y_OFFSET + 266)
#define SKI_PLAYERS_TRADING_INV_HEIGHT 70
#define SKI_PLAYERS_TRADING_INV_WIDTH 440
#define SKI_ARMS_DEALER_TOTAL_COST_X 16
#define SKI_ARMS_DEALER_TOTAL_COST_Y 194//191
#define SKI_ARMS_DEALER_TOTAL_COST_X (SCREEN_X_OFFSET + 16)
#define SKI_ARMS_DEALER_TOTAL_COST_Y (SCREEN_Y_OFFSET + 194)//191
#define SKI_ARMS_DEALER_TOTAL_COST_WIDTH 59
#define SKI_ARMS_DEALER_TOTAL_COST_HEIGHT 20
#define SKI_PLAYERS_TOTAL_VALUE_X 16
#define SKI_PLAYERS_TOTAL_VALUE_Y 310//308
#define SKI_PLAYERS_TOTAL_VALUE_X (SCREEN_X_OFFSET + 16)
#define SKI_PLAYERS_TOTAL_VALUE_Y (SCREEN_Y_OFFSET + 310)//308
#define SKI_PLAYERS_TOTAL_VALUE_WIDTH 59
#define SKI_PLAYERS_TOTAL_VALUE_HEIGHT 20
#define SKI_TACTICAL_BACKGROUND_START_X 536
#define SKI_TACTICAL_BACKGROUND_START_X (SCREEN_X_OFFSET + SKI_INTERFACE_WIDTH)
#define SKI_TACTICAL_BACKGROUND_START_Y 0
#define SKI_DROP_ITEM_TO_GROUND_START_X SKI_TACTICAL_BACKGROUND_START_X
#define SKI_DROP_ITEM_TO_GROUND_START_Y 262
#define SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y 262
#define SKI_DROP_ITEM_TO_GROUND_START_Y (SCREEN_Y_OFFSET + 262)
#define SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y (SCREEN_Y_OFFSET + 262)
#define SKI_TACTICAL_BACKGROUND_START_WIDTH 640 - SKI_TACTICAL_BACKGROUND_START_X
#define SKI_TACTICAL_BACKGROUND_START_HEIGHT 340
#define SKI_TACTICAL_BACKGROUND_START_WIDTH (SCREEN_WIDTH - SKI_TACTICAL_BACKGROUND_START_X)
#define SKI_ITEM_MOVEMENT_AREA_X 85
#define SKI_ITEM_MOVEMENT_AREA_Y 263
#define SKI_ITEM_MOVEMENT_AREA_WIDTH (640 - SKI_ITEM_MOVEMENT_AREA_X)
//#define SKI_ITEM_MOVEMENT_AREA_WIDTH 448
#define SKI_ITEM_MOVEMENT_AREA_HEIGHT 215//72
#define SKI_TACTICAL_BACKGROUND_START_HEIGHT (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT)
#define SKI_DEALER_OFFER_AREA_Y 148
//#define SKI_DEALER_OFFER_AREA_Y 148
#define SKI_ITEM_MOVEMENT_AREA_X (SCREEN_X_OFFSET + 85)
#define SKI_ITEM_MOVEMENT_AREA_Y (SCREEN_Y_OFFSET + 263)
#define SKI_ITEM_MOVEMENT_AREA_WIDTH (SCREEN_WIDTH - SKI_ITEM_MOVEMENT_AREA_X)
#define SKI_ITEM_MOVEMENT_AREA_HEIGHT (SCREEN_Y_OFFSET + 215)//72
#define SKI_DEALER_OFFER_AREA_Y (SCREEN_Y_OFFSET + 148)
#define SKI_ITEM_NUMBER_TEXT_OFFSET_X 50
#define SKI_ITEM_NUMBER_TEXT_OFFSET_Y 15
@@ -216,7 +223,7 @@ SKIRGBCOLOR SkiGlowColorsA[]={
#define SKI_SUBTITLE_TEXT_SIZE 512
#define SKI_POSITION_SUBTITLES_Y 140//100
#define SKI_POSITION_SUBTITLES_Y (SCREEN_Y_OFFSET + INV_INTERFACE_HEIGHT)//100
#define SKI_SMALL_FACE_WIDTH 16
#define SKI_SMALL_FACE_HEIGHT 14
@@ -227,8 +234,8 @@ SKIRGBCOLOR SkiGlowColorsA[]={
#define SKI_ATTACHMENT_SYMBOL_Y_OFFSET 14
#define SKI_ATM_PANEL_X 87
#define SKI_ATM_PANEL_Y 342
#define SKI_ATM_PANEL_X (SCREEN_X_OFFSET + 87)
#define SKI_ATM_PANEL_Y (SCREEN_Y_OFFSET + SKI_INTERFACE_HEIGHT)
#define SKI_ATM_PANEL_WIDTH 127
#define SKI_ATM_PANEL_HEIGHT 135
@@ -236,7 +243,7 @@ SKIRGBCOLOR SkiGlowColorsA[]={
#define SKI_ATM_BUTTON_Y SKI_ATM_PANEL_Y + 64
#define SKI_ATM_BUTTON_HEIGHT 15
#define SKI_ATM_NUM_BUTTON_WIDTH 15
#define SKI_ATM_SIDE_MENU_PANEL_START_X 48
#define SKI_ATM_SIDE_MENU_PANEL_START_X (SCREEN_X_OFFSET + 48)
#define SKI_TRANSFER_STRING_X SKI_ATM_PANEL_X + 22
#define SKI_TRANSFER_STRING_Y SKI_ATM_PANEL_Y + 50
@@ -705,7 +712,8 @@ UINT32 ShopKeeperScreenHandle()
}
gubSkiDirtyLevel = SKI_DIRTY_LEVEL2;
gfRenderScreenOnNextLoop = TRUE;
InvalidateRegion( 0, 0, 640, 480 );
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
}
if( gfRenderScreenOnNextLoop )
@@ -810,7 +818,6 @@ BOOLEAN EnterShopKeeperInterface()
// make sure current merc is close enough and eligible to talk to the shopkeeper.
AssertMsg( CanMercInteractWithSelectedShopkeeper( MercPtrs[ gusSelectedSoldier ] ), "Selected merc can't interact with shopkeeper. Send save AM-1");
// Create a video surface to blt corner of the tactical screen that still shines through
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
vs_desc.usWidth = SKI_TACTICAL_BACKGROUND_START_WIDTH;
@@ -829,6 +836,9 @@ BOOLEAN EnterShopKeeperInterface()
//Clear out all the save background rects
EmptyBackgroundRects( );
// WANNE 2
ShadowVideoSurfaceRect( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - INV_INTERFACE_HEIGHT );
if( gfExitSKIDueToMessageBox )
{
gubSkiDirtyLevel = SKI_DIRTY_LEVEL2;
@@ -973,7 +983,7 @@ ATM:
//Blanket the entire screen
MSYS_DefineRegion( &gSKI_EntireScreenMouseRegions, 0, 0, 639, 339, MSYS_PRIORITY_HIGH-2,
MSYS_DefineRegion( &gSKI_EntireScreenMouseRegions, 0, 0, (SCREEN_WIDTH - 1), (SCREEN_HEIGHT - INV_INTERFACE_HEIGHT), MSYS_PRIORITY_HIGH-2,
CURSOR_NORMAL, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK);
MSYS_AddRegion( &gSKI_EntireScreenMouseRegions );
@@ -1025,6 +1035,8 @@ ATM:
//Setup the currently selected arms dealer
InitializeShopKeeper( TRUE );
//Set the flag indicating that we are in the shop keeper interface
guiTacticalInterfaceFlags |= INTERFACE_SHOPKEEP_INTERFACE;
@@ -1107,7 +1119,7 @@ ATM:
//Region to allow the user to drop items to the ground
MSYS_DefineRegion( &gArmsDealersDropItemToGroundMouseRegions, SKI_DROP_ITEM_TO_GROUND_START_X, SKI_DROP_ITEM_TO_GROUND_START_Y, 639, 339, MSYS_PRIORITY_HIGH,
MSYS_DefineRegion( &gArmsDealersDropItemToGroundMouseRegions, SKI_DROP_ITEM_TO_GROUND_START_X, SKI_DROP_ITEM_TO_GROUND_START_Y, SCREEN_WIDTH - 1, SCREEN_HEIGHT - INV_INTERFACE_HEIGHT, MSYS_PRIORITY_HIGH,
CURSOR_NORMAL, SelectArmsDealersDropItemToGroundMovementRegionCallBack, SelectArmsDealersDropItemToGroundRegionCallBack );
// CURSOR_NORMAL, MSYS_NO_CALLBACK, SelectArmsDealersDropItemToGroundRegionCallBack );
MSYS_AddRegion( &gArmsDealersDropItemToGroundMouseRegions );
@@ -1439,7 +1451,7 @@ BOOLEAN RenderShopKeeperInterface()
SrcRect.iRight = SKI_TACTICAL_BACKGROUND_START_X + SKI_TACTICAL_BACKGROUND_START_WIDTH;
SrcRect.iBottom = SKI_TACTICAL_BACKGROUND_START_Y + SKI_TACTICAL_BACKGROUND_START_HEIGHT;
BltVSurfaceUsingDD( hDestVSurface, hSrcVSurface, VO_BLT_SRCTRANSPARENCY, 0, 0, (RECT*)&SrcRect );
BltVSurfaceUsingDD( hDestVSurface, hSrcVSurface, VO_BLT_SRCTRANSPARENCY, SKI_TACTICAL_BACKGROUND_START_X, SKI_TACTICAL_BACKGROUND_START_Y, (RECT*)&SrcRect );
gfRenderScreenOnNextLoop = FALSE;
}
@@ -1466,7 +1478,7 @@ BOOLEAN RenderShopKeeperInterface()
//Restore the tactical background that is visble behind the SKI panel
RestoreTacticalBackGround();
InvalidateRegion( 0, 0, 640, 480 );
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
return( TRUE );
}
@@ -1476,23 +1488,21 @@ void RestoreTacticalBackGround()
HVSURFACE hDestVSurface, hSrcVSurface;
SGPRect SrcRect;
//Restore the background before blitting the text back on
// RestoreExternBackgroundRect( SKI_TACTICAL_BACKGROUND_START_X, SKI_TACTICAL_BACKGROUND_START_Y, SKI_TACTICAL_BACKGROUND_START_WIDTH, SKI_TACTICAL_BACKGROUND_START_HEIGHT );
// BlitBufferToBuffer( guiCornerWhereTacticalIsStillSeenImage, guiRENDERBUFFER, SKI_TACTICAL_BACKGROUND_START_X, SKI_TACTICAL_BACKGROUND_START_Y, SKI_TACTICAL_BACKGROUND_START_WIDTH, SKI_TACTICAL_BACKGROUND_START_HEIGHT );
GetVideoSurface( &hDestVSurface, guiRENDERBUFFER );
GetVideoSurface( &hSrcVSurface, guiCornerWhereTacticalIsStillSeenImage );
SrcRect.iLeft = 0;
SrcRect.iTop = 0;
SrcRect.iRight = SKI_TACTICAL_BACKGROUND_START_WIDTH;
SrcRect.iBottom = SKI_TACTICAL_BACKGROUND_START_HEIGHT;
// WANNE 2
// Top
SrcRect.iLeft = SKI_TACTICAL_BACKGROUND_START_X; //0;
SrcRect.iTop = SKI_TACTICAL_BACKGROUND_START_Y; //0;
SrcRect.iRight = SKI_TACTICAL_BACKGROUND_START_WIDTH; //SKI_TACTICAL_BACKGROUND_START_WIDTH;
SrcRect.iBottom = SKI_TACTICAL_BACKGROUND_START_HEIGHT; //SKI_TACTICAL_BACKGROUND_START_HEIGHT;
BltVSurfaceUsingDD( hDestVSurface, hSrcVSurface, VO_BLT_SRCTRANSPARENCY, SKI_TACTICAL_BACKGROUND_START_X, SKI_TACTICAL_BACKGROUND_START_Y, (RECT*)&SrcRect );
InvalidateRegion( 0, 0, 640, 480 );
// WANNE 2
//InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
}
@@ -1571,7 +1581,7 @@ void GetShopKeeperInterfaceUserInput()
gubSkiDirtyLevel = SKI_DIRTY_LEVEL2;
break;
case 'i':
InvalidateRegion( 0, 0, 640, 480 );
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
break;
case 'd':
@@ -1599,7 +1609,7 @@ void DisplayAllDealersCash()
for( bArmsDealer=0; bArmsDealer<NUM_ARMS_DEALERS; bArmsDealer++ )
{
//Display the shopkeeper's name
DrawTextToScreen( gMercProfiles[ ArmsDealerInfo[ bArmsDealer ].ubShopKeeperID ].zNickname, 540, usPosY, 0, FONT10ARIAL, SKI_TITLE_COLOR, FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED );
DrawTextToScreen( gMercProfiles[ ArmsDealerInfo[ bArmsDealer ].ubShopKeeperID ].zNickname, SCREEN_X_OFFSET + 540, SCREEN_Y_OFFSET + usPosY, 0, FONT10ARIAL, SKI_TITLE_COLOR, FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED );
//Display the arms dealer cash on hand
swprintf( zTemp, L"%d", gArmsDealerStatus[ bArmsDealer ].uiArmsDealersCash );
@@ -1607,7 +1617,7 @@ void DisplayAllDealersCash()
InsertCommasForDollarFigure( zTemp );
InsertDollarSignInToString( zTemp );
ubForeColor = ( UINT8 ) ( ( bArmsDealer == gbSelectedArmsDealerID ) ? SKI_BUTTON_COLOR : SKI_TITLE_COLOR );
DrawTextToScreen( zTemp, 590, usPosY, 0, FONT10ARIAL, ubForeColor, FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED );
DrawTextToScreen( zTemp, SCREEN_X_OFFSET + 590, SCREEN_Y_OFFSET + usPosY, 0, FONT10ARIAL, ubForeColor, FONT_MCOLOR_BLACK, TRUE, LEFT_JUSTIFIED );
usPosY += 17;
}
}
@@ -2541,7 +2551,6 @@ void DisplayArmsDealerCurrentInventoryPage( )
}
}
if( gubSkiDirtyLevel == SKI_DIRTY_LEVEL2 )
{
//This handles the remaining (empty) slots, resetting Fast Help text, and hatching out disabled ones
@@ -4721,13 +4730,17 @@ void InitShopKeeperSubTitledText( STR16 pString )
UINT16 usActualHeight=0;
SET_USE_WINFONTS( TRUE );
SET_WINFONT( giSubTitleWinFont );
SET_WINFONT( giSubTitleWinFont );
giPopUpBoxId = PrepareMercPopupBox( giPopUpBoxId, BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsShopKeeperTalkingText, 300, 0, 0, 0, &usActualWidth, &usActualHeight);
SET_USE_WINFONTS( FALSE );
SET_USE_WINFONTS( FALSE );
// gusPositionOfSubTitlesX = ( 640 - usActualWidth ) / 2 ;
//position it to start under the guys face
gusPositionOfSubTitlesX = 13;
gusPositionOfSubTitlesX = 13 + SCREEN_X_OFFSET;
RenderMercPopUpBoxFromIndex( giPopUpBoxId, gusPositionOfSubTitlesX, SKI_POSITION_SUBTITLES_Y, FRAME_BUFFER);
@@ -6075,7 +6088,7 @@ void EvaluateItemAddedToPlayersOfferArea( INT8 bSlotID, BOOLEAN fFirstOne )
BOOLEAN DoSkiMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT8 ubFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect pCenteringRect= {0, 0, 639, 339 };
SGPRect pCenteringRect= {0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - INV_INTERFACE_HEIGHT };
// reset exit mode
gfExitSKIDueToMessageBox = TRUE;
@@ -6312,23 +6325,24 @@ void InitShopKeeperItemDescBox( OBJECTTYPE *pObject, UINT8 ubPocket, UINT8 ubFro
sPosY = SKI_ARMS_DEALERS_INV_START_Y + ( ( SKI_INV_OFFSET_Y * ubSelectedInvSlot / SKI_NUM_ARMS_DEALERS_INV_COLS ) + 1 ) - ( 128 / 2 ) + SKI_INV_SLOT_HEIGHT / 2;
// WANNE 2
//if the start position + the height of the box is off the screen, reposition
if( sPosY < 0 )
sPosY = 0;
if( sPosY < (0 + SCREEN_Y_OFFSET) )
sPosY = 0 + SCREEN_Y_OFFSET;
//if the start position + the width of the box is off the screen, reposition
if( ( sPosX + 358 ) > 640 )
sPosX = sPosX - ( ( sPosX + 358 ) - 640 ) - 5;
if( ( sPosX + 358 ) > SCREEN_WIDTH )
sPosX = sPosX - ( ( sPosX + 358 ) - SCREEN_WIDTH ) - 5;
//if it is starting to far to the left
else if( sPosX < 0 )
sPosX = 0;
else if( sPosX < (0 + SCREEN_X_OFFSET) )
sPosX = 0 + SCREEN_X_OFFSET;
//if the box will appear over the mercs face, move the box over so it doesn't obstruct the face
if( sPosY < SKI_FACE_Y + SKI_FACE_HEIGHT + 20 )
if( sPosX < 160 )
sPosX = 160;
if( sPosX < (SCREEN_X_OFFSET + 160) )
sPosX = SCREEN_X_OFFSET + 160;
}
break;
@@ -6340,22 +6354,22 @@ void InitShopKeeperItemDescBox( OBJECTTYPE *pObject, UINT8 ubPocket, UINT8 ubFro
sPosY = SKI_ARMS_DEALERS_TRADING_INV_Y + ( ( SKI_INV_OFFSET_Y * ubPocket / ( SKI_NUM_TRADING_INV_SLOTS/2) ) + 1 ) - ( 128 / 2 ) + SKI_INV_SLOT_HEIGHT / 2;
//if the start position + the height of the box is off the screen, reposition
if( sPosY < 0 )
sPosY = 0;
if( sPosY < (SCREEN_Y_OFFSET + 0) )
sPosY = 0 + SCREEN_Y_OFFSET;
//if the start position + the width of the box is off the screen, reposition
if( ( sPosX + 358 ) > 640 )
sPosX = sPosX - ( ( sPosX + 358 ) - 640 ) - 5;
if( ( sPosX + 358 ) > SCREEN_WIDTH )
sPosX = sPosX - ( ( sPosX + 358 ) - SCREEN_WIDTH ) - 5;
//if it is starting to far to the left
else if( sPosX < 0 )
sPosX = 10;
else if( sPosX < (0 + SCREEN_X_OFFSET) )
sPosX = 10 + SCREEN_X_OFFSET;
//if the box will appear over the mercs face, move the box over so it doesn't obstruct the face
if( sPosY < SKI_FACE_Y + SKI_FACE_HEIGHT + 20 )
if( sPosX < 160 )
sPosY = 140;
if( sPosX < (160 + SCREEN_X_OFFSET) )
sPosY = SCREEN_Y_OFFSET + INV_INTERFACE_HEIGHT;
}
break;
@@ -6377,17 +6391,20 @@ void StartSKIDescriptionBox( void )
{
INT32 iCnt;
//shadow the entire screen
// ShadowVideoSurfaceRect( FRAME_BUFFER, 0, 0, 640, 480 );
//if the current merc is too far away, dont shade the SM panel because it is already shaded
// WANNE 2: Do not shade the background
if( gfSMDisableForItems )
DrawHatchOnInventory( FRAME_BUFFER, 0, 0, 640, 338 );
DrawHatchOnInventory( FRAME_BUFFER, SCREEN_X_OFFSET, SCREEN_Y_OFFSET, SKI_INTERFACE_WIDTH, SKI_INTERFACE_HEIGHT );
else
DrawHatchOnInventory( FRAME_BUFFER, 0, 0, 640, 480 );
{
DrawHatchOnInventory( FRAME_BUFFER, SCREEN_X_OFFSET, SCREEN_Y_OFFSET, SKI_INTERFACE_WIDTH, SKI_INTERFACE_HEIGHT );
}
InvalidateRegion( 0, 0, 640, 480 );
InvalidateRegion( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
// disable almost everything!
@@ -7044,7 +7061,7 @@ BOOLEAN CanMercInteractWithSelectedShopkeeper( SOLDIERTYPE *pSoldier )
bDestLevel = pShopkeeper->bLevel;
// is he close enough to see that gridno if he turns his head?
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sDestGridNo, bDestLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sDestGridNo, bDestLevel, pSoldier );
// If he has LOS...
if ( SoldierTo3DLocationLineOfSightTest( pSoldier, sDestGridNo, bDestLevel, 3, (UINT8) sDistVisible, TRUE ) )
@@ -7462,6 +7479,8 @@ void DelayRepairsInProgressBy( UINT32 uiMinutesDelayed )
//Mouse Call back for the Arms delaers face
void SelectArmsDealersDropItemToGroundRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
{
// WANNE 2: not needed to drop the item to the ground -> on the right side of the shopkeeper screen!
/*
if (iReason & MSYS_CALLBACK_REASON_INIT)
{
}
@@ -7482,6 +7501,7 @@ void SelectArmsDealersDropItemToGroundRegionCallBack(MOUSE_REGION * pRegion, INT
//if we don't have an item, pick one up
if( gMoveingItem.sItemIndex != 0 )
{
//add the item to the ground
ShopkeeperAddItemToPool( pDropSoldier->sGridNo, &gMoveingItem.ItemObject, VISIBLE, pDropSoldier->bLevel, 0, 0 );
@@ -7492,6 +7512,7 @@ void SelectArmsDealersDropItemToGroundRegionCallBack(MOUSE_REGION * pRegion, INT
gubSkiDirtyLevel = SKI_DIRTY_LEVEL2;
}
}
*/
}
void SelectArmsDealersDropItemToGroundMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
@@ -7533,10 +7554,11 @@ void DisplayTheSkiDropItemToGroundString()
UINT16 usHeight;
//get the height of the displayed text
usHeight = DisplayWrappedString( SKI_DROP_ITEM_TO_GROUND_START_X, SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y, (UINT16)(640-SKI_DROP_ITEM_TO_GROUND_START_X), 2, SKI_LABEL_FONT, SKI_TITLE_COLOR, SKI_Text[ SKI_TEXT_DROP_ITEM_TO_GROUND ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT );
usHeight = DisplayWrappedString( SKI_DROP_ITEM_TO_GROUND_START_X, SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y, (UINT16)(SCREEN_WIDTH-SKI_DROP_ITEM_TO_GROUND_START_X), 2, SKI_LABEL_FONT, SKI_TITLE_COLOR, SKI_Text[ SKI_TEXT_DROP_ITEM_TO_GROUND ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT );
// WANNE 2 - not needed to show the string
//display the 'drop item to ground' text
DisplayWrappedString( SKI_DROP_ITEM_TO_GROUND_START_X, (UINT16)(SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y-usHeight), (UINT16)(640-SKI_DROP_ITEM_TO_GROUND_START_X), 2, SKI_LABEL_FONT, SKI_TITLE_COLOR, SKI_Text[ SKI_TEXT_DROP_ITEM_TO_GROUND ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | INVALIDATE_TEXT );
//DisplayWrappedString( SKI_DROP_ITEM_TO_GROUND_START_X, (UINT16)(SKI_DROP_ITEM_TO_GROUND_TEXT_START_Y-usHeight), (UINT16)(SCREEN_WIDTH-SKI_DROP_ITEM_TO_GROUND_START_X), 2, SKI_LABEL_FONT, SKI_TITLE_COLOR, SKI_Text[ SKI_TEXT_DROP_ITEM_TO_GROUND ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | INVALIDATE_TEXT );
}
+12 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
@@ -23,8 +24,17 @@ INT8 EffectiveStrength( SOLDIERTYPE * pSoldier )
// 1/2 full strength
// plus 1/2 strength scaled according to how hurt we are
bBandaged = pSoldier->bLifeMax - pSoldier->bLife - pSoldier->bBleeding;
iEffStrength = pSoldier->bStrength / 2;
iEffStrength += (pSoldier->bStrength / 2) * (pSoldier->bLife + bBandaged / 2) / (pSoldier->bLifeMax);
// WANNE 2
if (pSoldier->bStrength > 0)
{
iEffStrength = pSoldier->bStrength / 2;
iEffStrength += (pSoldier->bStrength / 2) * (pSoldier->bLife + bBandaged / 2) / (pSoldier->bLifeMax);
}
else
{
iEffStrength = 0;
}
// ATE: Make sure at least 2...
iEffStrength = __max( iEffStrength, 2 );
+4 -4
View File
@@ -2909,7 +2909,7 @@ void SayBuddyWitnessedQuoteFromKill( SOLDIERTYPE *pKillerSoldier, INT16 sGridNo,
// TO LOS check to killed
// Can we see location of killer?
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pKillerSoldier->sGridNo, pKillerSoldier->bLevel );
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pKillerSoldier->sGridNo, pKillerSoldier->bLevel, pKillerSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pTeamSoldier, pKillerSoldier->sGridNo, pKillerSoldier->bLevel, (UINT8)3, (UINT8) sDistVisible, TRUE ) == 0 )
{
continue;
@@ -2917,7 +2917,7 @@ void SayBuddyWitnessedQuoteFromKill( SOLDIERTYPE *pKillerSoldier, INT16 sGridNo,
// Can we see location of killed?
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pTeamSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pTeamSoldier, sGridNo, bLevel, (UINT8)3, (UINT8) sDistVisible, TRUE ) == 0 )
{
continue;
@@ -2976,7 +2976,7 @@ void HandleKilledQuote( SOLDIERTYPE *pKilledSoldier, SOLDIERTYPE *pKillerSoldier
gfLastMercTalkedAboutKillingID = pKilledSoldier->ubID;
// Can we see location?
sDistVisible = DistanceVisible( pKillerSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pKillerSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pKillerSoldier );
fCanWeSeeLocation = ( SoldierTo3DLocationLineOfSightTest( pKillerSoldier, sGridNo, bLevel, (UINT8)3, (UINT8) sDistVisible, TRUE ) != 0 );
@@ -3039,7 +3039,7 @@ void HandleKilledQuote( SOLDIERTYPE *pKilledSoldier, SOLDIERTYPE *pKillerSoldier
if ( OK_INSECTOR_MERC( pTeamSoldier ) && !( pTeamSoldier->uiStatusFlags & SOLDIER_GASSED ) && !AM_AN_EPC( pTeamSoldier ) )
{
// Can we see location?
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pTeamSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pTeamSoldier );
if ( SoldierTo3DLocationLineOfSightTest( pTeamSoldier, sGridNo, bLevel, 3, (UINT8) sDistVisible, TRUE ) )
{
+137 -4
View File
@@ -574,8 +574,41 @@ INT8 CalcActionPoints(SOLDIERTYPE *pSold)
}
//Madd
if ( pSold->bTeam != CIV_TEAM && pSold->bTeam != gbPlayerNum && gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
ubPoints += 5; // everything and everyone moves a little faster against you on insane...
// if ( pSold->bTeam != CIV_TEAM && pSold->bTeam != gbPlayerNum && gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
// ubPoints += 5; // everything and everyone moves a little faster against you on insane...
//Kaiden: Took your idea a step further adding the bonus for each difficulty level
// and then externalized it. AND added it to the Dont max out points section below.
if ( pSold->bTeam != CIV_TEAM && pSold->bTeam != gbPlayerNum)
{
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
ubPoints += gGameExternalOptions.iEasyAPBonus;
break;
case DIF_LEVEL_MEDIUM:
ubPoints += gGameExternalOptions.iExperiencedAPBonus;
break;
case DIF_LEVEL_HARD:
ubPoints += gGameExternalOptions.iExpertAPBonus;
break;
case DIF_LEVEL_INSANE:
ubPoints += gGameExternalOptions.iInsaneAPBonus;
break;
default:
ubPoints +=0;
}
}
// if we are in boxing mode, adjust APs... THIS MUST BE LAST!
if ( gTacticalStatus.bBoxingState == BOXING || gTacticalStatus.bBoxingState == PRE_BOXING )
@@ -608,8 +641,43 @@ void CalcNewActionPoints( SOLDIERTYPE *pSoldier )
// Don't max out if we are drugged....
if ( !GetDrugEffect( pSoldier, DRUG_TYPE_ADRENALINE ) )
{
{ //Kaiden: If Enemy, they can max out, but their Max is NOW = MAX + diffAPBonus
// No sense in giving them a bonus if some of the points are wasted because we
// Didn't raise their cap by the same amount.
if ( pSoldier->bTeam != CIV_TEAM && pSoldier->bTeam != gbPlayerNum)
{
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, (gubMaxActionPoints[ pSoldier->ubBodyType ] + gGameExternalOptions.iEasyAPBonus));
break;
case DIF_LEVEL_MEDIUM:
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, (gubMaxActionPoints[ pSoldier->ubBodyType ] + gGameExternalOptions.iExperiencedAPBonus));
break;
case DIF_LEVEL_HARD:
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, (gubMaxActionPoints[ pSoldier->ubBodyType ] + gGameExternalOptions.iExpertAPBonus));
break;
case DIF_LEVEL_INSANE:
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, (gubMaxActionPoints[ pSoldier->ubBodyType ] + gGameExternalOptions.iInsaneAPBonus));
break;
default:
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, gubMaxActionPoints[ pSoldier->ubBodyType ] );
}
}
else
{ //Kaiden: Players just max out normally unless drugged
pSoldier->bActionPoints = __min( pSoldier->bActionPoints, gubMaxActionPoints[ pSoldier->ubBodyType ] );
}
}
pSoldier->bInitialActionPoints = pSoldier->bActionPoints;
@@ -2665,7 +2733,7 @@ void SetSoldierGridNo( SOLDIERTYPE *pSoldier, INT16 sNewGridNo, BOOLEAN fForceRe
// if we SEE this particular oppponent, and he DOESN'T see us... and he COULD see us...
if ( (pSoldier->bOppList[ cnt ] == SEEN_CURRENTLY) &&
pEnemy->bOppList[ pSoldier->ubID ] != SEEN_CURRENTLY &&
PythSpacesAway( pSoldier->sGridNo, pEnemy->sGridNo ) < DistanceVisible( pEnemy, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel ) )
PythSpacesAway( pSoldier->sGridNo, pEnemy->sGridNo ) < DistanceVisible( pEnemy, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel, pSoldier ) )
{
// AGILITY (5): Soldier snuck 1 square past unaware enemy
StatChange( pSoldier, AGILAMT, 5, FALSE );
@@ -6120,11 +6188,22 @@ void MoveMercFacingDirection( SOLDIERTYPE *pSoldier, BOOLEAN fReverse, FLOAT dMo
void BeginSoldierClimbUpRoof( SOLDIERTYPE *pSoldier )
{
INT8 bNewDirection;
UINT8 ubWhoIsThere;
if ( FindHeigherLevel( pSoldier, pSoldier->sGridNo, pSoldier->bDirection, &bNewDirection ) && ( pSoldier->bLevel == 0 ) )
{
if ( EnoughPoints( pSoldier, GetAPsToClimbRoof( pSoldier, FALSE ), 0, TRUE ) )
{
//Kaiden: Helps if we look where we are going before we try to climb on top of someone
ubWhoIsThere = WhoIsThere2( NewGridNo( (UINT16)pSoldier->sGridNo, (UINT16)DirectionInc(bNewDirection ) ), 1 );
if ( ubWhoIsThere != NOBODY && ubWhoIsThere != pSoldier->ubID )
{
return;
}
else
{
if (pSoldier->bTeam == gbPlayerNum)
{
// OK, SET INTERFACE FIRST
@@ -6141,6 +6220,8 @@ void BeginSoldierClimbUpRoof( SOLDIERTYPE *pSoldier )
InternalGivingSoldierCancelServices( pSoldier, FALSE );
}
}
}
}
@@ -7329,17 +7410,31 @@ BOOLEAN CheckSoldierHitRoof( SOLDIERTYPE *pSoldier )
void BeginSoldierClimbDownRoof( SOLDIERTYPE *pSoldier )
{
INT8 bNewDirection;
UINT8 ubWhoIsThere;
if ( FindLowerLevel( pSoldier, pSoldier->sGridNo, pSoldier->bDirection, &bNewDirection ) && ( pSoldier->bLevel > 0 ) )
{
if ( EnoughPoints( pSoldier, GetAPsToClimbRoof( pSoldier, TRUE ), 0, TRUE ) )
{
//Kaiden: Helps if we look where we are going before we try to climb on top of someone
ubWhoIsThere = WhoIsThere2( NewGridNo( (UINT16)pSoldier->sGridNo, (UINT16)DirectionInc(bNewDirection ) ), 0 );
if ( ubWhoIsThere != NOBODY && ubWhoIsThere != pSoldier->ubID )
{
return;
}
else
{
if (pSoldier->bTeam == gbPlayerNum)
{
// OK, SET INTERFACE FIRST
SetUIBusy( pSoldier->ubID );
}
pSoldier->sTempNewGridNo = NewGridNo( (UINT16)pSoldier->sGridNo, (UINT16)DirectionInc(bNewDirection ) );
bNewDirection = gTwoCDirection[ bNewDirection ];
@@ -7352,8 +7447,46 @@ void BeginSoldierClimbDownRoof( SOLDIERTYPE *pSoldier )
}
}
}
}
/*
void BeginSoldierClimbDownRoof( SOLDIERTYPE *pSoldier )
{
INT8 bNewDirection;
UINT8 ubWhoIsThere;
if ( FindLowerLevel( pSoldier, pSoldier->sGridNo, pSoldier->bDirection, &bNewDirection ) && ( pSoldier->bLevel > 0 ) )
{
if ( EnoughPoints( pSoldier, GetAPsToClimbRoof( pSoldier, TRUE ), 0, TRUE ) )
{
if (pSoldier->bTeam == gbPlayerNum)
{
// OK, SET INTERFACE FIRST
SetUIBusy( pSoldier->ubID );
}
pSoldier->sTempNewGridNo = NewGridNo( (UINT16)pSoldier->sGridNo, (UINT16)DirectionInc(bNewDirection ) );
bNewDirection = gTwoCDirection[ bNewDirection ];
pSoldier->ubPendingDirection = bNewDirection;
EVENT_InitNewSoldierAnim( pSoldier, CLIMBDOWNROOF, 0 , FALSE );
InternalReceivingSoldierCancelServices( pSoldier, FALSE );
InternalGivingSoldierCancelServices( pSoldier, FALSE );
}
}
}
*/
void MoveMerc( SOLDIERTYPE *pSoldier, FLOAT dMovementChange, FLOAT dAngle, BOOLEAN fCheckRange )
{
+2 -2
View File
@@ -53,7 +53,7 @@ enum NPCIDs
PERKO,
QUEEN,
AUNTIE,
ENRICO,
GABBY, //ENRICO,
CARMEN,
JOE,
STEVE,
@@ -83,7 +83,7 @@ enum NPCIDs
FATIMA, // 101
WARDEN,
GORDON,
GABBY,
ENRICO, //GABBY,
ERNEST,
FRED,
MADAME,
+5 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#include "Language Defines.h"
@@ -2683,8 +2684,10 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
break;
case INSERT:
GoIntoOverheadMap();
// WANNE 2: commented this out, because the interface panel is not correctly redrawn!
// I do not know the bug ;(
//GoIntoOverheadMap();
break;
case END:
+1 -1
View File
@@ -3372,7 +3372,7 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, UINT16 sGridNo, UINT8 ubAimTime
iChance -= iPenalty;
}
sDistVis = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0 );
sDistVis = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, 0, pSoldier );
// give some leeway to allow people to spot for each other...
// use distance limitation for LOS routine of 2 x maximum distance EVER visible, so that we get accurate
+30 -20
View File
@@ -785,7 +785,6 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
pSoldier->bNewOppCnt = 0;
pSoldier->bNeedToLook = FALSE;
// Temporary for opplist synching - disable random order radioing
#ifndef RECORDOPPLIST
// if this soldier's NOT on our team (MAY be under our control, though!)
@@ -840,6 +839,7 @@ void HandleSight(SOLDIERTYPE *pSoldier, UINT8 ubSightFlags)
// CJC August 13 2002: at the end of handling sight, reset sight flags to allow interrupts in case an audio cue should
// cause someone to see an enemy
gubSightFlags |= SIGHT_INTERRUPT;
}
@@ -997,7 +997,7 @@ INT16 MaxDistanceVisible( void )
return( STRAIGHT * 2 );
}
INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, INT16 sSubjectGridNo, INT8 bLevel )
INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, INT16 sSubjectGridNo, INT8 bLevel, SOLDIERTYPE *pOther )
{
INT16 sDistVisible;
INT8 bLightLevel;
@@ -1028,6 +1028,7 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
//bSubjectDir = atan8(pSoldier->sX,pSoldier->sY,pOpponent->sX,pOpponent->sY);
}
if ( !TANK( pSoldier ) && ( bFacingDir == DIRECTION_IRRELEVANT || (pSoldier->uiStatusFlags & SOLDIER_ROBOT) || (pSubject && pSubject->fMuzzleFlash) ) )
{
sDistVisible = MaxDistanceVisible();
@@ -1074,8 +1075,26 @@ INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
// now reduce based on light level; SHADE_MIN is the define for the
// highest number the light can be
bLightLevel = LightTrueLevel(sSubjectGridNo, bLevel);
// If we're about to ask for a light level for a location outside of our
// valid map references then use the ambient light level instead.
if(0 > sSubjectGridNo || sSubjectGridNo > WORLD_MAX)
{
if(pSoldier != pOther)
{
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("113/UC Warning! Tried to detect the light level when character %ls[%d] at gridno %d tries to look for character %ls[%d] who outside of the valid map (gridno %d). Assigning default %d",
pSoldier->name, pSoldier->ubID, pSoldier->sGridNo, pOther->name, pOther->ubID, pOther->sGridNo, ubAmbientLightLevel));
}
else
{
DebugMsg(TOPIC_JA2, DBG_LEVEL_3, String("113/UC Warning! Tried to detect the light level when character %ls[%d] looks at a location outside of the valid map (gridno %d). Assigning default %d",
pSoldier->name, pSoldier->ubID, pSoldier->sGridNo, ubAmbientLightLevel));
}
}
else
{
bLightLevel = LightTrueLevel(sSubjectGridNo, bLevel);
}
// Snap: I think this was intended to give maximum visibility to targets with muzzle flash...
// Corrected accordingly:
@@ -1150,7 +1169,7 @@ void EndMuzzleFlash( SOLDIERTYPE * pSoldier )
{
if ( pOtherSoldier->sGridNo != NOWHERE )
{
if ( PythSpacesAway( pOtherSoldier->sGridNo, pSoldier->sGridNo ) > DistanceVisible( pOtherSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel ) )
if ( PythSpacesAway( pOtherSoldier->sGridNo, pSoldier->sGridNo ) > DistanceVisible( pOtherSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pSoldier->sGridNo, pSoldier->bLevel, pSoldier ) )
{
// if this guy can no longer see us, change to seen this turn
HandleManNoLongerSeen( pOtherSoldier, pSoldier, &(pOtherSoldier->bOppList[ pSoldier->ubID ]), &(gbPublicOpplist[ pOtherSoldier->bTeam ][ pSoldier->ubID ] ) );
@@ -1401,7 +1420,6 @@ void ManLooksForOtherTeams(SOLDIERTYPE *pSoldier)
UINT32 uiLoop;
SOLDIERTYPE *pOpponent;
#ifdef TESTOPPLIST
DebugMsg( TOPIC_JA2OPPLIST, DBG_LEVEL_3,
String("MANLOOKSFOROTHERTEAMS ID %d(%S) team %d side %d",pSoldier->ubID,pSoldier->name,pSoldier->bTeam,pSoldier->bSide));
@@ -1439,6 +1457,7 @@ void ManLooksForOtherTeams(SOLDIERTYPE *pSoldier)
}
}
}
}
void HandleManNoLongerSeen( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOpponent, INT8 * pPersOL, INT8 * pbPublOL )
@@ -1531,7 +1550,6 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
INT16 sDistVisible,sDistAway;
INT8 *pPersOL,*pbPublOL;
/*
if (ptr->guynum >= NOBODY)
{
@@ -1575,8 +1593,6 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
return(FALSE);
}
// if we're somehow looking for a guy who is inactive, at base, or already dead
if (!pOpponent->bActive || !pOpponent->bInSector || pOpponent->bLife <= 0 || pOpponent->sGridNo == NOWHERE )
{
@@ -1680,15 +1696,13 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
pPersOL = &(pSoldier->bOppList[pOpponent->ubID]);
pbPublOL = &(gbPublicOpplist[pSoldier->bTeam][pOpponent->ubID]);
// if soldier is known about (SEEN or HEARD within last few turns)
if (*pPersOL || *pbPublOL)
{
bAware = TRUE;
// then we look for him full viewing distance in EVERY direction
sDistVisible = DistanceVisible(pSoldier, DIRECTION_IRRELEVANT, 0, pOpponent->sGridNo, pOpponent->bLevel );
sDistVisible = DistanceVisible(pSoldier, DIRECTION_IRRELEVANT, 0, pOpponent->sGridNo, pOpponent->bLevel, pOpponent );
//if (pSoldier->ubID == 0)
//sprintf(gDebugStr,"ALREADY KNOW: ME %d him %d val %d",pSoldier->ubID,pOpponent->ubID,pSoldier->bOppList[pOpponent->ubID]);
}
@@ -1699,8 +1713,7 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
// BIG NOTE: must use desdir instead of direction, since in a projected
// situation, the direction may still be changing if it's one of the first
// few animation steps when this guy's turn to do his stepped look comes up
sDistVisible = DistanceVisible(pSoldier,pSoldier->bDesiredDirection,bDir, pOpponent->sGridNo, pOpponent->bLevel );
sDistVisible = DistanceVisible(pSoldier,pSoldier->bDesiredDirection,bDir, pOpponent->sGridNo, pOpponent->bLevel, pOpponent );
//if (pSoldier->ubID == 0)
//sprintf(gDebugStr,"dist visible %d: my dir %d to him %d",sDistVisible,pSoldier->bDesiredDirection,bDir);
}
@@ -1712,7 +1725,6 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
DebugMsg( TOPIC_JA2OPPLIST, DBG_LEVEL_3, String( "MANLOOKSFORMAN: ID %d(%S) to ID %d: sDistAway %d sDistVisible %d",pSoldier->ubID,pSoldier->name,pOpponent->ubID,sDistAway,sDistVisible) );
#endif
// if we see close enough to see the soldier
if (sDistAway <= sDistVisible)
{
@@ -1779,8 +1791,6 @@ INT16 ManLooksForMan(SOLDIERTYPE *pSoldier, SOLDIERTYPE *pOpponent, UINT8 ubCall
}
return(bSuccess);
}
@@ -5520,7 +5530,7 @@ void HearNoise(SOLDIERTYPE *pSoldier, UINT8 ubNoiseMaker, UINT16 sGridNo, INT8 b
}
}
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sGridNo, bLevel, pSoldier );
if ( fMuzzleFlash )
{
@@ -6370,7 +6380,7 @@ void NoticeUnseenAttacker( SOLDIERTYPE * pAttacker, SOLDIERTYPE * pDefender, INT
}
}
ubTileSightLimit = (UINT8) DistanceVisible( pDefender, DIRECTION_IRRELEVANT, 0, pAttacker->sGridNo, pAttacker->bLevel );
ubTileSightLimit = (UINT8) DistanceVisible( pDefender, DIRECTION_IRRELEVANT, 0, pAttacker->sGridNo, pAttacker->bLevel, pAttacker );
if (SoldierToSoldierLineOfSightTest( pDefender, pAttacker, ubTileSightLimit, TRUE ) != 0)
{
fSeesAttacker = TRUE;
@@ -6489,7 +6499,7 @@ void CheckForAlertWhenEnemyDies( SOLDIERTYPE * pDyingSoldier )
// distance we "see" then depends on the direction he is located from us
bDir = atan8(pSoldier->sX,pSoldier->sY,pDyingSoldier->sX,pDyingSoldier->sY);
sDistVisible = DistanceVisible( pSoldier, pSoldier->bDesiredDirection, bDir, pDyingSoldier->sGridNo, pDyingSoldier->bLevel );
sDistVisible = DistanceVisible( pSoldier, pSoldier->bDesiredDirection, bDir, pDyingSoldier->sGridNo, pDyingSoldier->bLevel, pDyingSoldier );
sDistAway = PythSpacesAway( pSoldier->sGridNo, pDyingSoldier->sGridNo );
// if we see close enough to see the soldier
@@ -6630,7 +6640,7 @@ INT8 GetHighestVisibleWatchedLoc( UINT8 ubID )
{
if ( gsWatchedLoc[ ubID ][ bLoop ] != NOWHERE && gubWatchedLocPoints[ ubID ][ bLoop ] > bHighestPoints )
{
sDistVisible = DistanceVisible( MercPtrs[ ubID ], DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ] );
sDistVisible = DistanceVisible( MercPtrs[ ubID ], DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], MercPtrs[ubID] );
// look at standing height
if ( SoldierTo3DLocationLineOfSightTest( MercPtrs[ ubID ], gsWatchedLoc[ ubID ][ bLoop ], gbWatchedLocLevel[ ubID ][ bLoop ], 3, (UINT8) sDistVisible, TRUE ) )
{
+1 -1
View File
@@ -100,7 +100,7 @@ void AddOneOpponent(SOLDIERTYPE *pSoldier);
void RemoveOneOpponent(SOLDIERTYPE *pSoldier);
void UpdatePersonal(SOLDIERTYPE *pSoldier, UINT8 ubID, INT8 bNewOpplist, INT16 sGridno, INT8 bLevel);
INT16 MaxDistanceVisible( void );
INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, INT16 sSubjectGridNo, INT8 bLevel );
INT16 DistanceVisible( SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir, INT16 sSubjectGridNo, INT8 bLevel, SOLDIERTYPE *pOther );
void ResetLastKnownLocs(SOLDIERTYPE *ptr);
void RecalculateOppCntsDueToNoLongerNeutral( SOLDIERTYPE * pSoldier );
+1 -1
View File
@@ -2739,7 +2739,7 @@ void ManChecksOnFriends(SOLDIERTYPE *pSoldier)
if (pFriend->ubID == pSoldier->ubID)
continue; // next merc
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pFriend->sGridNo, pFriend->bLevel );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, pFriend->sGridNo, pFriend->bLevel, pFriend );
// if we can see far enough to see this friend
if (PythSpacesAway(pSoldier->sGridNo,pFriend->sGridNo) <= sDistVisible)
{
+1 -1
View File
@@ -846,7 +846,7 @@ INT8 CreatureDecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK)
// if soldier is not already facing in that direction,
// and the opponent is close enough that he could possibly be seen
// note, have to change this to use the level returned from ClosestKnownOpponent
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sClosestOpponent, 0 );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sClosestOpponent, 0, pSoldier );
if ((pSoldier->bDirection != ubOpponentDir) && (PythSpacesAway(pSoldier->sGridNo,sClosestOpponent) <= sDistVisible))
{
+1 -1
View File
@@ -3042,7 +3042,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: radio red alert?");
// if soldier is not already facing in that direction,
// and the opponent is close enough that he could possibly be seen
// note, have to change this to use the level returned from ClosestKnownOpponent
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sClosestOpponent, 0 );
sDistVisible = DistanceVisible( pSoldier, DIRECTION_IRRELEVANT, DIRECTION_IRRELEVANT, sClosestOpponent, 0, pSoldier );
if ((pSoldier->bDirection != ubOpponentDir) && (PythSpacesAway(pSoldier->sGridNo,sClosestOpponent) <= sDistVisible))
{
+19 -7
View File
@@ -36,7 +36,9 @@ BUILDING * CreateNewBuilding( UINT8 * pubBuilding )
BUILDING * GenerateBuilding( INT16 sDesiredSpot )
{
UINT32 uiLoop;
UINT32 uiLoop2;
INT16 sTempGridNo, sNextTempGridNo, sVeryTemporaryGridNo;
INT16 sStartGridNo, sCurrGridNo, sPrevGridNo = NOWHERE, sRightGridNo;
INT8 bDirection, bTempDirection;
@@ -106,9 +108,9 @@ BUILDING * GenerateBuilding( INT16 sDesiredSpot )
gpWorldLevelData[ sStartGridNo ].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED;
while( 1 )
uiLoop2 = 0;
while(uiLoop2 < WORLD_MAX)
{
// if point to (2 clockwise) is not part of building and is not visited,
// or is starting point, turn!
sRightGridNo = NewGridNo( sCurrGridNo, DirectionInc( gTwoCDirection[ bDirection ] ) );
@@ -202,8 +204,6 @@ BUILDING * GenerateBuilding( INT16 sDesiredSpot )
{
gpWorldLevelData[ sCurrGridNo ].ubExtFlags[0] |= MAPELEMENT_EXT_ROOFCODE_VISITED;
//DebugMsg( TOPIC_JA2AI , DBG_LEVEL_3 , String("Building info set at %d to %d", sCurrGridNo, ubBuildingID ));
gubBuildingInfo[ sCurrGridNo ] = ubBuildingID;
// consider this location as possible climb gridno
@@ -323,8 +323,22 @@ BUILDING * GenerateBuilding( INT16 sDesiredSpot )
}
}
uiLoop2++;
}
// If we've run out of loop before we've run out of building, then there is
// something that has gone pear shaped
if(uiLoop2 >= WORLD_MAX)
{
UINT8 x = 0;
UINT8 y = 0;
while((sDesiredSpot - ((y + 1) * 160)) >= 0)
{
y++;
}
x = sDesiredSpot - (y * 160);
DebugMsg (TOPIC_JA2,DBG_LEVEL_2,String( "113/UC Warning! Building Walk Algorithm has covered the entire map! Building %d located at [%d,%d] must be bogus.", ubBuildingID, x, y ));
}
// at end could prune # of locations if there are too many
@@ -338,7 +352,6 @@ BUILDING * GenerateBuilding( INT16 sDesiredSpot )
RefreshScreen( NULL );
#endif
*/
return( pBuilding );
}
@@ -415,7 +428,6 @@ void GenerateBuildings( void )
// search through world
// for each location in a room try to find building info
for ( uiLoop = 0; uiLoop < WORLD_MAX; uiLoop++ )
{
if ( (gubWorldRoomInfo[ uiLoop ] != NO_ROOM) && (gubBuildingInfo[ uiLoop ] == NO_BUILDING) && (FindStructure( (INT16) uiLoop, STRUCTURE_NORMAL_ROOF ) != NULL) )
+10 -5
View File
@@ -246,11 +246,15 @@ void RadarRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason )
{
if ( !InOverheadMap( ) )
{
GoIntoOverheadMap( );
// WANNE 2 <wenn wir im strategy screen sind, darf keine overhead map angezeigt werden!!>
if (fDisplayOverheadMap == TRUE)
GoIntoOverheadMap( );
}
else
{
KillOverheadMap();
// WANNE 2 <wenn wir im strategy screen sind, darf keine overhead map angezeigt werden!!>
if (fDisplayOverheadMap == TRUE)
KillOverheadMap();
}
}
}
@@ -644,9 +648,10 @@ BOOLEAN CreateDestroyMouseRegionsForSquadList( void )
CHECKF(AddVideoObject(&VObjectDesc, &uiHandle));
GetVideoObject(&hHandle, uiHandle);
BltVideoObject( guiSAVEBUFFER , hHandle, 0,(INTERFACE_WIDTH - 102 - 1), 0 + gsVIEWPORT_END_Y, VO_BLT_SRCTRANSPARENCY,NULL );
RestoreExternBackgroundRect( (INTERFACE_WIDTH - 102), gsVIEWPORT_END_Y, (SCREEN_WIDTH - 538 ),( INT16 ) ( SCREEN_HEIGHT - gsVIEWPORT_END_Y ) );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,(SCREEN_WIDTH - 102 - 1), gsVIEWPORT_END_Y, VO_BLT_SRCTRANSPARENCY,NULL );
RestoreExternBackgroundRect ((SCREEN_WIDTH - 102 - 1), gsVIEWPORT_END_Y, 102,( INT16 ) ( SCREEN_HEIGHT - gsVIEWPORT_END_Y ) );
for( sCounter = 0; sCounter < NUMBER_OF_SQUADS; sCounter++ )
{
+4 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifndef __RADAR_SCREEN_H
#define __RADAR_SCREEN_H
@@ -9,13 +10,14 @@ void RadarRegionButtonCallback( MOUSE_REGION * pRegion, INT32 iReason );
BOOLEAN LoadRadarScreenBitmap( CHAR8 * aFilename );
// WANNE 2
// RADAR WINDOW DEFINES
#define RADAR_WINDOW_X 543
#define RADAR_WINDOW_X (SCREEN_WIDTH - 97) //543
#define RADAR_WINDOW_TM_Y INTERFACE_START_Y + 13
#define RADAR_WINDOW_SM_Y INV_INTERFACE_START_Y + 13
#define RADAR_WINDOW_WIDTH 88
#define RADAR_WINDOW_HEIGHT 44
#define RADAR_WINDOW_STRAT_Y 373
#define RADAR_WINDOW_STRAT_Y (SCREEN_HEIGHT - 107) //373
BOOLEAN InitRadarScreen( );
void RenderRadarScreen( );
+4 -1
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "TileEngine All.h"
#include "PreBattle Interface.h"
@@ -563,7 +564,9 @@ void RenderTacticalPlacementGUI()
{
gTPClipRect.iLeft = iOffsetHorizontal;
gTPClipRect.iTop = iOffsetVertical;
gTPClipRect.iRight = iOffsetHorizontal + 640;
// WANNE 2
//gTPClipRect.iRight = iOffsetHorizontal + 640;
gTPClipRect.iRight = iOffsetHorizontal + 635;
gTPClipRect.iBottom = iOffsetVertical + 320;
switch( gMercPlacement[ gbCursorMercID ].ubStrategicInsertionCode )
{
+5 -2
View File
@@ -402,7 +402,7 @@ void HandleOverheadMap( )
InitNewOverheadDB( gubSmTileNum );
gfSmTileLoaded = TRUE;
}
// restore background rects
RestoreBackgroundRects( );
@@ -544,12 +544,15 @@ BOOLEAN InOverheadMap( )
}
void GoIntoOverheadMap( )
{
{
VOBJECT_DESC VObjectDesc;
HVOBJECT hVObject;
gfInOverheadMap = TRUE;
// WANNE 2 NEW
//RestoreExternBackgroundRect( INTERFACE_START_X, INTERFACE_START_Y, SCREEN_WIDTH, INTERFACE_HEIGHT );
// Overview map should be centered in the middle of the tactical screen.
iOffsetHorizontal = (SCREEN_WIDTH / 2) - (640 / 2); // Horizontal start postion of the overview map
iOffsetVertical = (SCREEN_HEIGHT - 160) / 2 - 160; // Vertical start position of the overview map
+6 -2
View File
@@ -1667,6 +1667,7 @@ FLOAT CalculateObjectTrajectory( INT16 sTargetZ, OBJECTTYPE *pItem, vector_3 *vP
REAL_OBJECT *pObject;
FLOAT dDiffX, dDiffY;
INT16 sGridNo;
//int cnt=0;
if ( psFinalGridNo )
{
@@ -1692,10 +1693,13 @@ FLOAT CalculateObjectTrajectory( INT16 sTargetZ, OBJECTTYPE *pItem, vector_3 *vP
pObject->fTestPositionNotSet = TRUE;
pObject->fVisible = FALSE;
// WANNE 2
// Alrighty, move this beast until it dies....
while( pObject->fAlive )
while( pObject->fAlive)
{
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CalculateObjectTrajectory: calling simulateobject - this object never fucking dies!!!!");
//cnt = cnt + 1;
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"CalculateObjectTrajectory: calling SIMULATEobject - this object never fucking dies!!!!");
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3, String( "Counter: %d", cnt));
SimulateObject( pObject, (float)DELTA_T );
}
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
@@ -1314,8 +1315,8 @@ BOOLEAN DrawBox(UINT32 uiCounter)
}
// make sure it will fit on screen!
Assert( usTopX + usWidth <= 639 );
Assert( usTopY + usHeight <= 479 );
Assert( usTopX + usWidth <= SCREEN_WIDTH );
Assert( usTopY + usHeight <= SCREEN_HEIGHT );
// subtract 4 because the 2 2-pixel corners are handled separately
uiNumTilesWide=((usWidth-4)/BORDER_WIDTH);
+4 -1
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
@@ -1904,7 +1905,7 @@ STR16 pMapErrorString[] =
L"needs an escort to move. Place her on a squad with one.", // for a female
L"Merc hasn't yet arrived in Arulco!",
L"Looks like there's some contract negotiations to settle first.",
L"",
L"Cannot give a movement order. Air raid is going on.", // WANNE 2
//11-15
L"Movement orders? There's a battle going on!",
L"You have been ambushed by bloodcats in sector %s!",
@@ -3300,6 +3301,8 @@ STR16 zMarksMapScreenText[] =
L"%s is full of militia.",
L"Merc has a finite contract.",
L"Merc's contract is not insured",
// WANNE 2
L"Map Overview", // 24
};
+4 -1
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
@@ -1830,7 +1831,7 @@ STR16 pMapErrorString[] =
L"braucht eine Eskorte. Plazieren Sie sie in einem Trupp mit Eskorte.", // for a female
L"Söldner ist noch nicht in Arulco!",
L"Erst mal Vertrag aushandeln!",
L"",
L"Marschbefehl ist nicht möglich. Luftangriffe finden statt.", // WANNE 2
//11-15
L"Marschbefehl? Hier tobt ein Kampf!",
L"Sie sind von Bloodcats umstellt in Sektor %s!",
@@ -3108,6 +3109,8 @@ STR16 zMarksMapScreenText[] =
L"%s ist voller Milizen.",
L"Söldner hat begrenzten Vertrag.",
L"Vertrag des Söldners ist nicht versichert",
// WANNE 2
L"Kartenübersicht", // 24
};
STR16 pLandMarkInSectorString[] =
+9 -4
View File
@@ -1,4 +1,4 @@
// WANNE <08.12.2005>
// WANNE 2 <changed some lines>
#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#include "Game Clock.h"
@@ -1086,8 +1086,10 @@ void DisplayStringsInMapScreenMessageList( void )
UINT16 usSpacing;
// WANNE <change this???>
SetFontDestBuffer( FRAME_BUFFER, 17, 360 + 6, 407, 360 + 101, FALSE );
// WANNE 2
//SetFontDestBuffer( FRAME_BUFFER, 17, 360 + 6, 407, 360 + 101, FALSE );
SetFontDestBuffer( FRAME_BUFFER, 17, (SCREEN_HEIGHT - 114), 407, (SCREEN_HEIGHT - 114) + 101, FALSE );
SetFont( MAP_SCREEN_MESSAGE_FONT ); // no longer supports variable fonts
SetFontBackground( FONT_BLACK );
@@ -1095,7 +1097,10 @@ void DisplayStringsInMapScreenMessageList( void )
ubCurrentStringIndex = gubCurrentMapMessageString;
sY = 377;
// WANNE 2
//sY = 377;
sY = (SCREEN_HEIGHT - 103);
usSpacing = GetFontHeight( MAP_SCREEN_MESSAGE_FONT );
for ( ubLinesPrinted = 0; ubLinesPrinted < MAX_MESSAGES_ON_MAP_BOTTOM; ubLinesPrinted++ )
+4
View File
@@ -1,3 +1,4 @@
// WANNE 2 <changed some lines>
#ifndef __LOCAL_DEFINES_
#define __LOCAL_DEFINES_
@@ -28,6 +29,9 @@ extern int iResolution; // Resolution id from the ini file
extern int iScreenWidthOffset;
extern int iScreenHeightOffset;
// WANNE 2
extern BOOLEAN fDisplayOverheadMap;
#define PIXEL_DEPTH 16
//