*** MERGED source code from development trunk revision 4890 up to latest current revision 5105 ***

Development Trunk (now obsolete): https://ja2svn.dyndns.org/source/ja2/branches/Wanne/JA2%201.13%20MP
A detailed list of all the features (changes) is visible in the history log of the development trunk:

INFO: There will be no further development in the development source trunk, so is obsolete from now on!

This commit contains the following features (bugfixes are not listed):

- New Feature: Show merc ranks in Strategy Screen before merc name
o Toggle on/off in the ingame options screen
o For each experience level (0-10) there are defined rank names in the language specific text files
o Additional language text that is not translated yet is marked with // TODO.Translate

- New Feature: Faster Bobby Ray Shipments
o This feature is selectable in the ja2_options.ini
o When activated Bobby Ray shipments will be really fast
-> Overnight Express: 5 - 7 hours
-> Air Service: 10, 12 or 14 hours
-> Standard Service: 15, 18 or 21 hours
o In a multiplayer game, this feature is disabled (because shipment arrive immediately in the destination sector)

- New Feature: AP cost for manipulating the merc inventory
o This feature is selectable in the start new game screen
o For example, putting a weapon from hand in the backpack costs APs
o The AP costs are defined in the APBPConstants.ini
o In a multiplayer game, this feature is disabled

- New Feature: Added possibility to set individual Gear Kit names
o Set individual names in the optional new tag <mGearKitName> inside the <GEARKIT> root element (File: TableData\MercStartingGear.xml)

- New Feature: Externalized the maximum purchase amount (JA2 vanilla: 10) for Bobby Rays purchases per shipment
o Define the max. amount in the ja2_options.ini: BOBBY_RAY_MAX_PURCHASE_AMOUNT, Range: 10 - 100)
o Nice scrolling bars to scroll through all the purchases

- New Feature: Now it is possible to walk on "water" tiles or handle those tiles like "normal" tiles 
o (instead of showing the swimming animation and counting the APs for swimming), when the soldier is located on the second level (level > 0)

- New Feature: Externalized AIM Veterans laptop site
o Add maximum of 4 pages
o Add  new AIM to veterans page, and remove AIM from veterans page.
o New XML file: OldAIMArchive.xml (language specific XML files: *.OldAIMArchive.xml)

- New Feature: Added possibility to choose from 254 IMP faces
o Modified IMPPortraits.xml
o Added new GameDir folder "IMPFaces" which contains the IMP face portraits
o Moved IMP faces in the new "IMPFaces" folder

- New Feature: ARSP - All Resolution Support Project
o See here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298698&page=1
o Support any kind of screen resolution. This works by choosing the matching full supported resolution (640x480, 800x600, 1024x768) and then centering the graphics
o See ja2.ini for defining the screen resolution

- New Feature: AI Turn Speed Up (FF-MOD)
o see here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=298699#Post298699
o When this feature is activated it allows fast enemy turns
o New entry in ja2.ini to enable this feature: HIGHSPEED_TIMER = TRUE
o Turn on/off auto fast turns in ingame options
o New ja2_options.ini settings for fine tuning: [Clock Settings] ini block

- New Feature: "Lock" / "Release" mouse cursor in tactical windowed mode, so the mouse can stay within window boundary
o This is very helpful for doing scrolling with the mouse (by moving the mouse to the window edge) in windowed mode
o You can toggle on/off the feature by pressing CTRL + Z. It is also possible to press CTRL + Y. So the user can decide which fits better :)
o Whenever you toggle on/off a screen message appears on the tactical log to notify the player

- New Feature: Weapon overheating
o Basically, every shot fired from a gun increases its temperature. On higher temperatures, the gun jams more frequently
o On/off toggle in the ingame options
o Graphical thermometer indication on the weapon picture
o New ja2_options.ini section with a few options, Section: [Tactical Weapon Overheating Settings]
o XML changes (New Tags)
--> AmmoTypes.xml: <temperatureModificator>
--> Items.xml: <barrel>, <usOverheatingCooldownFactor>
--> Weapons.xml: <usOverheatingJamThreshold>, <usOverheatingDamageThreshold>, <usOverheatingSingleShotTemperature>
o Added a few barells to Items.xml (end of the file)
o more infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=301059&page=1

- New Feature: Resting weapons on a surfaces
o You can now rest your weapon on crates, low walls, rocks, debris, open windows etc. while you are crouched. Resting will give yu the superior gun handling modifiers from PRONE position.
o A little 'A' on your gun indicates if you are resting it or not.
o Both settings can be turned on and off in Ja2_Options.ini under 'Tactical Gameplay Settings'

- New Feature: Externalized option on whether mercs can exit sector using grid exit in turn based mode
o new ja2_options.ini property: GRID_EXIT_IN_TURNBASED
o This ini setting does not affect leaving sectors on map edges

- Rework/Update: Ammo boxes and Ammo crates
o Ammo crate items added for remaining calibers.  Tweaked prices to correspond to magazines, tweaked capacities and weights to be reasonable (~800 or less).
o Shift-R reload now looks at both boxes and crates in sector items and merc's inventory to reload, and tops off magazines in inventory as well.  Only possible outside of combat.
o Ctrl-Shift-A still creates crates as per usual, with some fixes to ensure all ammo is caught on the first press.
o Shift-A now creates ammo boxes in the same loop.  They mostly behave like crates, but fit in mercs inventories.
o Ammo boxes are available to purchase at BR and tony, sam, etc.  Individual magazines/drums/etc are no longer available.
o Removed ammo crate xml tag.  Added ubMagType tag to Magazines array.  This allows us to differentiate between magazines, bullets, boxes and crates.
o Changed ammo filtering in BR's to display boxes appropriately.  Added back the "Mag:" display (changed text to "Size:")
o Added ja2set.dat.xml file (WF map version in WF maps folder) to be used instead of ja2set.dat file (ja2.ini setting added) For now, if you want to play vanilla instead, just change the setting in the ini (see comments in file).
o Added P4-P9Items image files (up to 5k images each) and tileslots.  1.13 core items will continue to use Guns and P1-P3Items for the foreseeable future.  P4-P9 can be used by customizers/modders to avoid conflicts with Guns/P1-P3 items.  TODO: Need to discuss a strategy for this in the forums.
o Added in Ambient/0.bad and 32.bad to avoid an exception in the code.
o Updated the XML Editor
o Standardized the text on all the ammo items.

- New Multiplayer Feature: Sharing same FOV (field of view) in a coop/team-dm (for friendly teams) game
o You will also see enemies, that your teammate sees

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5108 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-03-23 18:46:54 +00:00
parent ab80b4e191
commit 7ca53fadc7
177 changed files with 9625 additions and 3428 deletions
+1 -1
View File
@@ -932,7 +932,7 @@ void HandleViewerInput()
{
SECTORINFO *pSector;
InputAtom Event;
while( DequeueEvent( &Event ) )
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP) )
{
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
{
+3 -3
View File
@@ -9587,7 +9587,7 @@ void CreateContractBox( SOLDIERTYPE *pCharacter )
CHAR16 sString[ 50 ];
CHAR16 sDollarString[ 50 ];
ContractPosition.iX = OrigContractPosition.iX;
ContractPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigContractPosition.iX;
if( giBoxY != 0 )
{
@@ -9847,7 +9847,7 @@ void CreateAssignmentsBox( void )
// will create attribute pop up menu for mapscreen assignments
AssignmentPosition.iX = OrigAssignmentPosition.iX;
AssignmentPosition.iX = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + OrigAssignmentPosition.iX;
if( giBoxY != 0 )
{
@@ -15536,7 +15536,7 @@ void ResetAllExpensiveFacilityAssignments()
BOOLEAN IsOutstandingFacilityDebtWithErrorReport()
{
CHAR16 sString[256];
SGPRect pCenteringRect= {0, 0, 640, INV_INTERFACE_START_Y };
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
if (giTotalOwedForFacilityOperationsToday && // Owe money
gfOutstandingFacilityDebt ) // Owed money tonight as well
+31 -8
View File
@@ -529,13 +529,13 @@ void DoTransitionFromPreBattleInterfaceToAutoResolve()
iPercentage = 0;
uiStartTime = GetJA2Clock();
sStartLeft = 59;
sStartLeft = 59 + xResOffset;
sStartTop = 69;
sEndLeft = SrcRect.iLeft + gpAR->sWidth / 2;
sEndTop = SrcRect.iTop + gpAR->sHeight / 2;
//save the prebattle/mapscreen interface background
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
BlitBufferToBuffer( FRAME_BUFFER, guiEXTRABUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
//render the autoresolve panel
RenderAutoResolve();
@@ -670,7 +670,7 @@ UINT32 AutoResolveScreenHandle()
SGPRect ClipRect;
gpAR->fEnteringAutoResolve = FALSE;
//Take the framebuffer, shade it, and save it to the SAVEBUFFER.
ClipRect.iLeft = 0;
ClipRect.iLeft = 0 + xResOffset;
ClipRect.iTop = 0;
/*ClipRect.iRight = 640;
ClipRect.iBottom = 480;*/
@@ -681,7 +681,7 @@ UINT32 AutoResolveScreenHandle()
Blt16BPPBufferShadowRect( (UINT16*)pDestBuf, uiDestPitchBYTES, &ClipRect );
UnLockVideoSurface( FRAME_BUFFER );
//BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, 640, 480 );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
KillPreBattleInterface();
CalculateAutoResolveInfo();
CalculateSoldierCells( FALSE );
@@ -1369,7 +1369,7 @@ void ExpandWindow()
//The new rect now determines the state of the current rectangle.
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0 + xResOffset, 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
@@ -2214,7 +2214,7 @@ void CreateAutoResolveInterface()
UINT8 cnt;
//Setup new autoresolve blanket interface.
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-1, 0,
MSYS_DefineRegion( &gpAR->AutoResolveRegion, 0 + xResOffset, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGH-1, 0,
MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
gpAR->fRenderAutoResolve = TRUE;
gpAR->fExitAutoResolve = FALSE;
@@ -2286,7 +2286,28 @@ void CreateAutoResolveInterface()
VOBJECT_DESC VObjectDesc;
//Load the face
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
/*
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
*/
if ( ( gpMercs[ i ].pSoldier->ubProfile >= 0 ) && ( gpMercs[ i ].pSoldier->ubProfile < 100 ) && ( gProfilesIMP[ gpMercs[ i ].pSoldier->ubProfile ].ProfilId == gpMercs[ i ].pSoldier->ubProfile ) )
{
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
}
else if ( ( gpMercs[ i ].pSoldier->ubProfile > 99 ) && ( gProfilesIMP[ gpMercs[ i ].pSoldier->ubProfile ].ProfilId == gpMercs[ i ].pSoldier->ubProfile ) )
{
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
}
else if ( ( gpMercs[ i ].pSoldier->ubProfile >= 0 ) && ( gpMercs[ i ].pSoldier->ubProfile < 100 ) )
{
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
}
else
{
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex );
}
if( !AddVideoObject( &VObjectDesc, &gpMercs[ i ].uiVObjectID ) )
{
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\speck.sti" );
@@ -2295,6 +2316,8 @@ void CreateAutoResolveInterface()
AssertMsg( 0, String("Failed to load %Faces\\65Face\\%02d.sti or it's placeholder, speck.sti", gMercProfiles[ gpMercs[ i ].pSoldier->ubProfile ].ubFaceIndex) );
}
}
if( GetVideoObject( &hVObject, gpMercs[ i ].uiVObjectID ) )
{
hVObject->pShades[ 0 ] = Create16BPPPaletteShaded( hVObject->pPaletteEntry, 255, 255, 255, FALSE );
@@ -2433,7 +2456,7 @@ 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, SCREEN_WIDTH, SCREEN_HEIGHT );
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 0 + xResOffset, 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.
@@ -3334,7 +3357,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Autoresolve3");
InputAtom InputEvent;
BOOLEAN fResetAutoResolve = FALSE;
while( DequeueEvent( &InputEvent ) )
while( DequeueSpecificEvent(&InputEvent, KEY_DOWN|KEY_UP|KEY_REPEAT) )
{
if( InputEvent.usEvent == KEY_DOWN || InputEvent.usEvent == KEY_REPEAT )
{
+7 -6
View File
@@ -5,14 +5,15 @@
// where the time string itself is rendered
#define CLOCK_X (SCREEN_WIDTH - 86) //554
#define CLOCK_Y (SCREEN_HEIGHT - 21) //459
#define CLOCK_X (SCREEN_WIDTH - xResSize)/2 + (xResSize - 86)
#define CLOCK_REGION_START_X (CLOCK_X + 2)
#define CLOCK_REGION_WIDTH ((xResSize - 20) - CLOCK_REGION_START_X)
#define CLOCK_Y (SCREEN_HEIGHT - 21)
// the mouse region around the clock (bigger)
#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 CLOCK_REGION_START_Y (SCREEN_HEIGHT - 24)
#define CLOCK_REGION_HEIGHT ((SCREEN_HEIGHT - 12) - CLOCK_REGION_START_Y)
#define NUM_SEC_IN_DAY 86400
#define NUM_SEC_IN_HOUR 3600
+21 -21
View File
@@ -3285,23 +3285,23 @@ int i;
static int l_ExecuteTacticalTextBox(lua_State *L)
{
INT16 sLeftPosition = 110;
UINT32 idText = 0;
UINT8 n = lua_gettop(L);
wchar_t sText[400];
UINT32 uiStartLoc=0;
CHAR16 zString[512];
int i;
INT16 sLeftPosition = 110;
UINT32 idText = 0;
UINT8 n = lua_gettop(L);
//wchar_t sText[400];
UINT32 uiStartLoc=0;
CHAR16 zString[512];
int i;
//#define LANGMESSAGEFILE "BinaryData\\TacticalMessages.EDT"
//#define EDT_SIZE 400 * 2
//#define LANGMESSAGEFILE "BinaryData\\TacticalMessages.EDT"
//#define EDT_SIZE 400 * 2
for (i= 1; i<=n; i++ )
{
if (i == 1 ) sLeftPosition = lua_tointeger(L,i);
if (i == 2 ) idText = lua_tointeger(L,i);
}
{
if (i == 1 ) sLeftPosition = lua_tointeger(L,i);
if (i == 2 ) idText = lua_tointeger(L,i);
}
/*
if ( FileExists(LANGMESSAGEFILE) )
{
@@ -3315,14 +3315,14 @@ int i;
swprintf( zString, L"Empty Text" );
}
*/
if ( idText >= 0 && idText <= 1000 )
{
swprintf( zString, XMLTacticalMessages[idText] );
if ( idText >= 0 && idText <= 1000 )
{
swprintf( zString, XMLTacticalMessages[idText] );
if ( sLeftPosition <= 0 ) sLeftPosition = 110;
ExecuteTacticalTextBox( sLeftPosition, zString );
}
if ( sLeftPosition <= 0 ) sLeftPosition = 110;
ExecuteTacticalTextBox( sLeftPosition, zString );
}
return 0;
}
+53 -45
View File
@@ -157,15 +157,15 @@ BOOLEAN LoadMapBorderGraphics( void )
// will load map border
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
FilenameForBPP( "INTERFACE\\MBS.sti", VObjectDesc.ImageFile );
FilenameForBPP( "INTERFACE\\MBS.sti", VObjectDesc.ImageFile );
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
FilenameForBPP( "INTERFACE\\MBS_800x600.sti", VObjectDesc.ImageFile );
}
else if (iResolution == 2)
else
{
FilenameForBPP( "INTERFACE\\MBS_1024x768.sti", VObjectDesc.ImageFile );
}
@@ -220,21 +220,21 @@ void RenderMapBorder( void )
// get and blt border
GetVideoObject(&hHandle, guiMapBorder );
// HEADROCK HAM 4: Load different map border depending on whether we want to display the mobile militia button or not.
if (gGameExternalOptions.gfAllowMilitiaGroups)
{
BltVideoObject( guiSAVEBUFFER , hHandle, 1, MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 1, xResOffset + MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
}
else
{
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0, xResOffset + MAP_BORDER_X, MAP_BORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL );
}
RestoreExternBackgroundRect( MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT );
RestoreExternBackgroundRect( xResOffset + MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset, SCREEN_HEIGHT );
// show the level marker
DisplayCurrentLevelMarker( );
return;
}
@@ -297,27 +297,35 @@ void RenderMapBorderEtaPopUp( void )
UINT16 offsetY = 0;
UINT16 offsetBorderY = 0;
if (iResolution == 0)
UINT16 xVal = 215;
UINT16 yVal = 291;
// TODO.RW.ARSP: Check
if (iResolution >= _640x480 && iResolution < _800x600)
{
offsetX = 215;
offsetY = 291;
offsetBorderY = offsetY + 19;
offsetX = xVal + xResOffset;
offsetY = yVal + yResOffset;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
offsetX = 215 + 80;
offsetY = 291 + 120;
offsetBorderY = offsetY + 19;
offsetX = xVal + 80; // + xResOffset;
offsetY = yVal + 120; // + yResOffset;
}
else if (iResolution == 2)
else
{
offsetX = 215 + 180;
offsetY = 291 + 285;
offsetBorderY = offsetY + 19;
offsetX = xVal + 180;// + xResOffset;
offsetY = yVal + 285;// + yResOffset;
}
// TODO.RW: Adjust for 1024x768
BltVideoObject( FRAME_BUFFER , hHandle, iResolution, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
offsetBorderY = offsetY + 19;
if (iResolution >= _640x480 && iResolution < _800x600)
BltVideoObject( FRAME_BUFFER , hHandle, 0, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
else if (iResolution < _1024x768)
BltVideoObject( FRAME_BUFFER , hHandle, 1, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
else
BltVideoObject( FRAME_BUFFER , hHandle, 2, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, VO_BLT_SRCTRANSPARENCY,NULL );
InvalidateRegion( MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX, MAP_BORDER_Y_OFFSET + offsetY, MAP_BORDER_X + MAP_BORDER_X_OFFSET + offsetX + 100 , MAP_BORDER_Y_OFFSET + offsetBorderY);
return;
@@ -1940,36 +1948,36 @@ void InitMapBorderButtonCoordinates()
{
UINT32 buttonOffset = 155; // 160
MAP_BORDER_TOWN_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 152);
MAP_BORDER_TOWN_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_MINE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 109);
MAP_BORDER_MINE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_TEAMS_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 66);
MAP_BORDER_TEAMS_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_AIRSPACE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 20);
MAP_BORDER_AIRSPACE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_ITEM_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 63);
MAP_BORDER_ITEM_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_MILITIA_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 - 23);
MAP_BORDER_MILITIA_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_MOBILE_BTN_X = 0;
MAP_BORDER_MOBILE_BTN_Y = 0;
MAP_BORDER_TOWN_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 152;
MAP_BORDER_TOWN_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_MINE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 109;
MAP_BORDER_MINE_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_TEAMS_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 66;
MAP_BORDER_TEAMS_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_AIRSPACE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 20;
MAP_BORDER_AIRSPACE_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_ITEM_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 63;
MAP_BORDER_ITEM_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_MILITIA_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) - 23;
MAP_BORDER_MILITIA_BTN_Y = (yResSize - buttonOffset);
MAP_BORDER_MOBILE_BTN_X = xResSize;
MAP_BORDER_MOBILE_BTN_Y = 0;
MAP_LEVEL_MARKER_X = (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 114));
MAP_LEVEL_MARKER_Y = (SCREEN_HEIGHT - buttonOffset); //(SCREEN_HEIGHT - 157) //323
MAP_LEVEL_MARKER_DELTA = 8;
MAP_LEVEL_MARKER_WIDTH = 55; //( (SCREEN_WIDTH - 20) - MAP_LEVEL_MARKER_X )
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 114;
MAP_LEVEL_MARKER_Y = (yResSize - buttonOffset);
MAP_LEVEL_MARKER_DELTA = 8;
MAP_LEVEL_MARKER_WIDTH = 55;
if (gGameExternalOptions.gfAllowMilitiaGroups)
{
// Mobile button appears next to Militia button.
MAP_BORDER_MOBILE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 16);
MAP_BORDER_MOBILE_BTN_Y = (SCREEN_HEIGHT - buttonOffset);
MAP_BORDER_MOBILE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 16;
MAP_BORDER_MOBILE_BTN_Y = (yResSize - buttonOffset);
// Airspace, Items, ZLevel buttons all moved to the right (+22px, +22px, +10px).
MAP_BORDER_AIRSPACE_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 42);
MAP_BORDER_ITEM_BTN_X = MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 85);
MAP_BORDER_AIRSPACE_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 42;
MAP_BORDER_ITEM_BTN_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 85;
MAP_LEVEL_MARKER_X = (MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X) / 2 + 124));
MAP_LEVEL_MARKER_X = xResOffset + MAP_BORDER_X + ((SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset) / 2) + 124;
}
}
+38 -79
View File
@@ -239,15 +239,15 @@ void HandleLoadOfMapBottomGraphics( void )
// will create buttons for interface bottom
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
FilenameForBPP( "INTERFACE\\map_screen_bottom.sti", VObjectDesc.ImageFile );
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
FilenameForBPP( "INTERFACE\\map_screen_bottom_800x600.sti", VObjectDesc.ImageFile );
}
else if (iResolution == 2)
else
{
FilenameForBPP( "INTERFACE\\map_screen_bottom_1024x768.sti", VObjectDesc.ImageFile );
}
@@ -315,8 +315,9 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
{
// get and blt panel
GetVideoObject(&hHandle, guiMAPBOTTOMPANEL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0, MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0, xResOffset + MAP_BOTTOM_X, MAP_BOTTOM_Y, VO_BLT_SRCTRANSPARENCY,NULL );
// WANNE - MP: Radarmap image should be displayed on every sector in multiplayer game
if( GetSectorFlagStatus( sSelMapX, sSelMapY, ( UINT8 )iCurrentMapSectorZ, SF_ALREADY_VISITED ) == TRUE
|| is_networked)
@@ -337,8 +338,8 @@ void RenderMapScreenInterfaceBottom( BOOLEAN fForceMapscreenFullRender )
// dirty buttons
MarkButtonsDirty( );
// invalidate region
RestoreExternBackgroundRect( MAP_BOTTOM_X, MAP_BOTTOM_Y, SCREEN_WIDTH - MAP_BOTTOM_X, SCREEN_HEIGHT - MAP_BOTTOM_Y );
// TODO.RW.ARSP: Check: Is the height 121 OK?
RestoreExternBackgroundRect( xResOffset + MAP_BOTTOM_X, MAP_BOTTOM_Y, SCREEN_WIDTH - MAP_BOTTOM_X - 2 * xResOffset, 121 );
// re render radar map
RenderRadarScreen( );
@@ -387,20 +388,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 ], (SCREEN_WIDTH - 184), (SCREEN_HEIGHT - 70),
guiMapBottomExitButtons[ MAP_EXIT_TO_LAPTOP ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_LAPTOP ], xResOffset + (xResSize - 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 ], (SCREEN_WIDTH - 144), (SCREEN_HEIGHT - 70),
guiMapBottomExitButtons[ MAP_EXIT_TO_TACTICAL ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_TACTICAL ], xResOffset + (xResSize - 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 ], (SCREEN_WIDTH - 182), (SCREEN_HEIGHT - 108),
guiMapBottomExitButtons[ MAP_EXIT_TO_OPTIONS ] = QuickCreateButton( guiMapBottomExitButtonsImage[ MAP_EXIT_TO_OPTIONS ], xResOffset + (xResSize - 182), (SCREEN_HEIGHT - 108),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnOptionsFromMapScreenCallback);
@@ -416,12 +417,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 ], (SCREEN_WIDTH - 112), (SCREEN_HEIGHT - 24),
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_MORE ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_MORE ], xResOffset + (xResSize - 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 ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24),
guiMapBottomTimeButtons[ MAP_TIME_COMPRESS_LESS ] = QuickCreateButton( guiMapBottomTimeButtonsImage[ MAP_TIME_COMPRESS_LESS ], xResOffset + (xResSize - 174), (SCREEN_HEIGHT - 24),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 2,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnTimeCompressLessMapScreenCallback);
@@ -436,21 +437,12 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
// scroll buttons
// CHRISL: Changed coordinates to dynamically place scroll buttons from the right edge of screen.
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 ], (SCREEN_WIDTH - 533), (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 ], (SCREEN_WIDTH - 533), (SCREEN_HEIGHT - 28),
// BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
// (GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
// CHRISL: Use these if we want buttons based on left edge of screen
// HEADROCK HAM 3.6: Message window is now as wide as possible.
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], (SCREEN_WIDTH - 306), (SCREEN_HEIGHT - 109),
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_UP ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_UP ], xResOffset + (xResSize - 306), (SCREEN_HEIGHT - 109),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageUpMapScreenCallback);
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], (SCREEN_WIDTH - 306), (SCREEN_HEIGHT - 28),
guiMapMessageScrollButtons[ MAP_SCROLL_MESSAGE_DOWN ] = QuickCreateButton( guiMapMessageScrollButtonsImage[ MAP_SCROLL_MESSAGE_DOWN ], xResOffset + (xResSize - 306), (SCREEN_HEIGHT - 28),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnMessageDownMapScreenCallback);
@@ -459,8 +451,6 @@ BOOLEAN CreateButtonsForMapScreenInterfaceBottom( void )
SetButtonCursor(guiMapMessageScrollButtons[ 0 ], MSYS_NO_CURSOR );
SetButtonCursor(guiMapMessageScrollButtons[ 1 ], MSYS_NO_CURSOR );
return( TRUE );
}
@@ -636,8 +626,8 @@ void DrawNameOfLoadedSector( void )
GetSectorIDString( sSelMapX, sSelMapY, ( INT8 )( iCurrentMapSectorZ ),sString, TRUE );
ReduceStringLength( sString, 80, COMPFONT );
//VarFindFontCenterCoordinates( 548, 426, 80, 16, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 92), (SCREEN_HEIGHT - 55), 80, 16, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 92), (SCREEN_HEIGHT - 55), 80, 16, COMPFONT, &sFontX, &sFontY, sString );
mprintf( sFontX, sFontY, L"%s", sString );
}
@@ -980,10 +970,9 @@ void DisplayCompressMode( void )
}
}
//RestoreExternBackgroundRect( 489, 456, 522 - 489, 467 - 454 );
RestoreExternBackgroundRect( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 63, 13 );
SetFontDestBuffer( FRAME_BUFFER, 0,0,SCREEN_WIDTH,SCREEN_HEIGHT, FALSE );
// ABCDEFG
RestoreExternBackgroundRect( xResOffset + (xResSize - 151), (SCREEN_HEIGHT - 24), 63, 13 );
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
SetFont( COMPFONT );
if( GetJA2Clock() - guiCompressionStringBaseTime >= PAUSE_GAME_TIMER )
@@ -1008,21 +997,17 @@ void DisplayCompressMode( void )
SetFontForeground( usColor );
SetFontBackground( FONT_BLACK );
//FindFontCenterCoordinates( 489, 456, 522 - 489, 467 - 454, sString, COMPFONT, &sX, &sY );
FindFontCenterCoordinates( (SCREEN_WIDTH - 151), (SCREEN_HEIGHT - 24), 33, 13, sString, COMPFONT, &sX, &sY );
FindFontCenterCoordinates( xResOffset + (xResSize - 151), (SCREEN_HEIGHT - 24), 33, 13, sString, COMPFONT, &sX, &sY );
mprintf( sX, sY, sString );
return;
}
void CreateCompressModePause( void )
{
/*MSYS_DefineRegion( &gMapPauseRegion, 487, 456, 522, 467, MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );*/
MSYS_DefineRegion( &gMapPauseRegion, (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGH,
MSYS_DefineRegion( &gMapPauseRegion, xResOffset + (xResSize - 153), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGH,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressModeClickCallback );
SetRegionFastHelpText( &gMapPauseRegion, pMapScreenBottomFastHelp[ 7 ] );
@@ -1462,11 +1447,11 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
// center it
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
//VarFindFontCenterCoordinates( (1024 - 637), (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// CHRISL: Use this if we want to display from the left edge
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 107), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 111), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 111), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
@@ -1475,11 +1460,11 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
// center it
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
//VarFindFontCenterCoordinates( (1024 - 637), (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// CHRISL: Use this if we want to display from the left edge
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 61), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 74), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 74), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
@@ -1488,13 +1473,14 @@ void DisplayCurrentBalanceTitleForMapBottom( void )
// HEADROCK HAM 3.6: Projected expenses for today, with facilities (and in the future, merc contracts) taken into
// account.
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 37), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 37), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
// ste the font buffer
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
return;
}
@@ -1515,17 +1501,10 @@ void DisplayCurrentBalanceForMapBottom( void )
swprintf( sString, L"%d", LaptopSaveInfo.iCurrentBalance );
// insert
InsertCommasForDollarFigure( sString );
InsertDollarSignInToString( sString );
// center it
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 91), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// CHRISL: Use this if we want to display from the left edge
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 91), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 95), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 95), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
@@ -1553,29 +1532,16 @@ 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_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 );
// 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_DefineRegion( &gTimeCompressionMask[ 0 ], xResOffset + (xResSize - 112), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 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 ], (SCREEN_WIDTH - 174), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 174) + 13, (SCREEN_HEIGHT - 24) + 14, MSYS_PRIORITY_HIGHEST - 1,
MSYS_DefineRegion( &gTimeCompressionMask[ 1 ], xResOffset + (xResSize - 174), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 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 ], (SCREEN_WIDTH - 153), (SCREEN_HEIGHT - 24), (SCREEN_WIDTH - 118), (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGHEST - 1,
MSYS_DefineRegion( &gTimeCompressionMask[ 2 ], xResOffset + (xResSize - 153), (SCREEN_HEIGHT - 24), xResOffset + (xResSize - 153) - 118, (SCREEN_HEIGHT - 13), MSYS_PRIORITY_HIGHEST - 1,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, CompressMaskClickCallback );
fCreated = TRUE;
@@ -1635,14 +1601,8 @@ void DisplayProjectedDailyMineIncome( void )
InsertCommasForDollarFigure( sString );
InsertDollarSignInToString( sString );
// center it
// CHRISL: Replaced X coordinate with dynamic coordinate set from right edge of screen
//VarFindFontCenterCoordinates( (SCREEN_WIDTH - 637), (SCREEN_HEIGHT - 45), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// CHRISL: Use this if we want to display from the left edge
//VarFindFontCenterCoordinates( 359, (SCREEN_HEIGHT - 45), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// HEADROCK HAM 3.6: The balance/income box has been moved to the right side, near the laptop button.
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 58), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 58), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
@@ -1692,8 +1652,7 @@ void DisplayProjectedDailyExpenses( void )
InsertCommasForDollarFigure( sString );
InsertDollarSignInToString( sString );
// center it
VarFindFontCenterCoordinates( (SCREEN_WIDTH - 278), (SCREEN_HEIGHT - 21), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
VarFindFontCenterCoordinates( xResOffset + (xResSize - 278), (SCREEN_HEIGHT - 21), 78, 10, COMPFONT, &sFontX, &sFontY, sString );
// print it
mprintf( sFontX, sFontY, L"%s", sString );
@@ -2080,7 +2039,7 @@ void ChangeCurrentMapscreenMessageIndex( UINT8 ubNewMessageIndex )
void InitMapScreenInterfaceBottomCoords( void )
{
// HEADROCK HAM 3.6: Message window is now as wide as possible.
MESSAGE_SCROLL_AREA_START_X = SCREEN_WIDTH - 307;
MESSAGE_SCROLL_AREA_END_X = SCREEN_WIDTH - 293;
MESSAGE_SCROLL_AREA_START_X = xResOffset + xResSize - 307;
MESSAGE_SCROLL_AREA_END_X = xResOffset + xResSize - 293;
}
@@ -53,32 +53,32 @@ INT32 iCurrentInventoryPoolPageQ[INVPOOLLISTNUM]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
INT32 iLastInventoryPoolPageQ[INVPOOLLISTNUM]={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
extern BOOLEAN SaveWorldItemsToTempItemFile( INT16 sMapX, INT16 sMapY, INT8 bMapZ, UINT32 uiNumberOfItems, WORLDITEM* pData );
#define MAP_INV_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
//#define MAP_INV_Y_OFFSET (((SCREEN_HEIGHT - 121) -
#define MAP_INV_X_OFFSET (((SCREEN_WIDTH - 261) - 380) / 2)
// 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 (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
#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 (MAP_INV_X_OFFSET + 436)
#define MAP_INVENTORY_POOL_NUMBER_WIDTH 40
#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 MAP_INV_X_OFFSET + 326
#define MAP_INVENTORY_POOL_LOC_WIDTH 40
#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
#define MAP_IVEN_FONT SMALLCOMPFONT
// the position of the background graphic
#define INVEN_POOL_X 261
@@ -236,27 +236,27 @@ BOOLEAN LoadInventoryPoolGraphic( void )
// load the file
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
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;
MAP_INVENTORY_POOL_SLOT_START_Y = 51;
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory.sti" );
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
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;
MAP_INVENTORY_POOL_SLOT_START_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 278;
MAP_INVENTORY_POOL_SLOT_START_Y = 62;
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_800x600.sti" );
}
else if (iResolution == 2)
else
{
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_X = (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 282;
MAP_INVENTORY_POOL_SLOT_START_Y = 50;
sprintf( VObjectDesc.ImageFile, "INTERFACE\\sector_inventory_1024x768.sti" );
}
@@ -289,7 +289,7 @@ void BlitInventoryPoolGraphic( void )
// blit inventory pool graphic to the screen
GetVideoObject(&hHandle, guiMapInventoryPoolBackground);
BltVideoObject( guiSAVEBUFFER , hHandle, 0,INVEN_POOL_X, INVEN_POOL_Y , VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,(SCREEN_WIDTH - INTERFACE_WIDTH)/2 + INVEN_POOL_X, INVEN_POOL_Y , VO_BLT_SRCTRANSPARENCY,NULL );
// resize list
ResizeInventoryList( );
@@ -319,7 +319,7 @@ void BlitInventoryPoolGraphic( void )
HandleButtonStatesWhileMapInventoryActive( );
// Invalidate
RestoreExternBackgroundRect(MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X, SCREEN_HEIGHT - 121);
RestoreExternBackgroundRect(xResOffset + MAP_BORDER_X, MAP_BORDER_Y, SCREEN_WIDTH - MAP_BORDER_X - 2 * xResOffset, SCREEN_HEIGHT - 121 - 2 * yResOffset);
return;
}
@@ -891,7 +891,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
}
else if(fValidPointer)
{
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, (SCREEN_WIDTH - INTERFACE_WIDTH)/2, -10, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
fTeamPanelDirty=TRUE;
fInterfacePanelDirty = DIRTYLEVEL2;
}
@@ -1108,15 +1108,15 @@ 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 ], (MAP_INV_X_OFFSET + 559), (SCREEN_HEIGHT - 144),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolNextBtn );
guiMapInvenButton[ 0 ] = QuickCreateButton( guiMapInvenButtonImage[ 0 ], (MAP_INV_X_OFFSET + 559), (SCREEN_HEIGHT - 144 - 2 * yResOffset),
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 ], (MAP_INV_X_OFFSET + 487), (SCREEN_HEIGHT - 144),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolPrevBtn );
guiMapInvenButton[ 1 ] = QuickCreateButton( guiMapInvenButtonImage[ 1 ], (MAP_INV_X_OFFSET + 487), (SCREEN_HEIGHT - 144 - 2 * yResOffset),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolPrevBtn );
// set up fast help text
SetButtonFastHelpText( guiMapInvenButton[ 0 ], pMapScreenInvenButtonHelpText[ 0 ] );
@@ -1745,13 +1745,11 @@ void DisplayPagesForMapInventoryPool( void )
swprintf( sString, L"%d / %d", iCurrentInventoryPoolPage + 1, iLastInventoryPoolPage + 1 );
// grab centered coords
FindFontCenterCoordinates(MAP_INVENTORY_POOL_PAGE_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_PAGE_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
FindFontCenterCoordinates(MAP_INVENTORY_POOL_PAGE_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_PAGE_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
mprintf( sX, sY, sString );
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
}
INT32 GetTotalNumberOfItemsInSectorStash( void )
@@ -1809,13 +1807,12 @@ void DrawNumberOfIventoryPoolItems( void )
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
// grab centered coords
FindFontCenterCoordinates(MAP_INVENTORY_POOL_NUMBER_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_NUMBER_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
FindFontCenterCoordinates(MAP_INVENTORY_POOL_NUMBER_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_NUMBER_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
mprintf( sX, sY, sString );
SetFontDestBuffer( FRAME_BUFFER, 0,0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
return;
}
@@ -1824,9 +1821,10 @@ void CreateMapInventoryPoolDoneButton( void )
{
// create done button
guiMapInvenButtonImage[ 2 ]= LoadButtonImage( "INTERFACE\\done_button.sti" , -1, 0, -1, 1, -1 );
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], MAP_INV_X_OFFSET + 587 , (SCREEN_HEIGHT - 147),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolDoneBtn );
guiMapInvenButton[ 2 ] = QuickCreateButton( guiMapInvenButtonImage[ 2 ], MAP_INV_X_OFFSET + 587 , (yResSize - 147),
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
(GUI_CALLBACK)BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)MapInventoryPoolDoneBtn );
// set up fast help text
SetButtonFastHelpText( guiMapInvenButton[ 2 ], pMapScreenInvenButtonHelpText[ 2 ] );
@@ -1852,7 +1850,6 @@ void DisplayCurrentSector( void )
CHAR16 sString[ 32 ];
INT16 sX, sY;
swprintf( sString, L"%s%s%s", pMapVertIndex[ sSelMapY ], pMapHortIndex[ sSelMapX ], pMapDepthIndex[ iCurrentMapSectorZ ] );
// set font stuff
@@ -1864,7 +1861,7 @@ void DisplayCurrentSector( void )
SetFontDestBuffer( guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
// grab centered coords
FindFontCenterCoordinates(MAP_INVENTORY_POOL_LOC_X, MAP_INVENTORY_POOL_PAGE_Y ,MAP_INVENTORY_POOL_LOC_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
FindFontCenterCoordinates(MAP_INVENTORY_POOL_LOC_X, MAP_INVENTORY_POOL_PAGE_Y - 2 * yResOffset, MAP_INVENTORY_POOL_LOC_WIDTH ,MAP_INVENTORY_POOL_PAGE_HEIGHT ,sString , MAP_SCREEN_FONT, &sX, &sY);
mprintf( sX, sY, sString );
@@ -1912,7 +1909,6 @@ void ResizeInventoryList( void )
void DrawTextOnMapInventoryBackground( void )
{
// CHAR16 sString[ 64 ];
UINT16 usStringHeight;
SetFont( MAP_IVEN_FONT );
@@ -1922,21 +1918,13 @@ 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 );
//Calculate the height of the string, as it needs to be vertically centered.
usStringHeight = DisplayWrappedString(MAP_INV_X_OFFSET + 268, (SCREEN_HEIGHT - 138 - 2 * yResOffset), 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 - 2 * yResOffset) - (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( 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( 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 );
usStringHeight = DisplayWrappedString( MAP_INV_X_OFFSET + 369, (SCREEN_HEIGHT - 138 - 2 * yResOffset), 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 - 2 * yResOffset) - (usStringHeight / 2) ), 65, 1, MAP_IVEN_FONT, FONT_BEIGE, pMapInventoryStrings[ 1 ], FONT_BLACK, FALSE, RIGHT_JUSTIFIED );
DrawTextOnSectorInventory( );
@@ -1999,10 +1987,7 @@ void DrawTextOnSectorInventory( void )
swprintf(sString, L"Inventory Pool %c", gInventoryPoolIndex);
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 );
FindFontCenterCoordinates( (SCREEN_WIDTH - INTERFACE_WIDTH)/2 + 271, 18, xResSize - 271, GetFontHeight( FONT14ARIAL ), sString, FONT14ARIAL, &sX, &sY );
SetFont( FONT14ARIAL );
SetFontForeground( FONT_WHITE );
@@ -2011,7 +1996,6 @@ void DrawTextOnSectorInventory( void )
mprintf( sX, sY, sString );
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
}
@@ -2375,22 +2359,14 @@ BOOLEAN LoadInventoryPoolQ (UINT8 ubSaveGameID)
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
{
switch(iResolution)
{
case 0:
if (iResolution >= _640x480 && iResolution < _800x600)
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
break;
case 1:
else if (iResolution < _1024x768)
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
break;
case 2:
MAP_INVENTORY_POOL_SLOT_COUNT = 170;//MAP_INVENTORY_POOL_MAX_SLOTS;
break;
default:
Assert(0);
break;
}
else
MAP_INVENTORY_POOL_SLOT_COUNT = 170;
}
ret = FALSE;
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
strcat(tmpbuf, ".IPQ");
@@ -2454,21 +2430,14 @@ BOOLEAN SaveInventoryPoolQ(UINT8 ubSaveGameID)
if(MAP_INVENTORY_POOL_SLOT_COUNT <= 0)
{
switch(iResolution)
{
case 0:
if (iResolution >= _640x480 && iResolution < _800x600)
MAP_INVENTORY_POOL_SLOT_COUNT = 40;
break;
case 1:
else if (iResolution < _1024x768)
MAP_INVENTORY_POOL_SLOT_COUNT = 77;
case 2:
MAP_INVENTORY_POOL_SLOT_COUNT = 170;//MAP_INVENTORY_POOL_MAX_SLOTS;
break;
default:
Assert(0);
break;
}
else
MAP_INVENTORY_POOL_SLOT_COUNT = 170;
}
ret = FALSE;
CreateSavedGameFileNameFromNumber(ubSaveGameID, tmpbuf);
strcat(tmpbuf, ".IPQ");
+66 -76
View File
@@ -632,23 +632,6 @@ void DrawIconL(INT32 MAP_GRID_X2, INT32 MAP_GRID_Y2, INT32 i, INT32 Sector_X , I
sX = (UINT16) (MAP_VIEW_START_X + MAP_GRID_X + (MAP_GRID_X2 * MAP_GRID_X) / 10);
sY = (UINT16) (MAP_VIEW_START_Y + MAP_GRID_Y + ((MAP_GRID_Y2 * MAP_GRID_Y) / 10) + 1);
/*
if (iResolution == 0)
{
sY += MAP_GRID_Y2;
sX += MAP_GRID_X2;
}
else if (iResolution == 1)
{
sY += + 5 + MAP_GRID_Y2;
sX += - MAP_GRID_X2 + 3;
}
else if (iResolution == 2)
{
sY += + 10 + MAP_GRID_Y2;
sX += - MAP_GRID_X2 + 10;
}
*/
ubVidObjIndex = 1;
}
@@ -1414,17 +1397,17 @@ void ShowUncertainNumberEnemiesInSector( INT16 sSectorX, INT16 sSectorY )
UINT8 iconOffsetX = 0;
UINT8 iconOffsetY = 0;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
iconOffsetX = 2;
iconOffsetY = 1;
iconOffsetY = 9;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
iconOffsetX = 8;
iconOffsetY = 12;
}
else if (iResolution == 2)
else
{
iconOffsetX = 12;
iconOffsetY = 13;
@@ -2043,21 +2026,23 @@ BOOLEAN ShadeMapElemZoomIn(INT16 sMapX, INT16 sMapY, INT32 iColor )
void InitializeMilitiaPopup(void)
{
// WANNE.MAP.TODO:
if (iResolution == 0)
UINT16 xVal = 400;
UINT16 yVal = 125;
if (iResolution >= _640x480 && iResolution < _800x600)
{
MAP_MILITIA_BOX_POS_X = 400;
MAP_MILITIA_BOX_POS_Y = 125;
MAP_MILITIA_BOX_POS_X = xVal;
MAP_MILITIA_BOX_POS_Y = yVal;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
MAP_MILITIA_BOX_POS_X = 400 + 77;
MAP_MILITIA_BOX_POS_Y = 125 + 116;
MAP_MILITIA_BOX_POS_X = xVal + 77;
MAP_MILITIA_BOX_POS_Y = yVal + 116;
}
else if (iResolution == 2)
else
{
MAP_MILITIA_BOX_POS_X = 400 + 190;
MAP_MILITIA_BOX_POS_Y = 125 + 285;
MAP_MILITIA_BOX_POS_X = xVal + 190;
MAP_MILITIA_BOX_POS_Y = yVal + 285;
}
}
@@ -2072,14 +2057,14 @@ BOOLEAN InitializePalettesForMap( void )
// load image
vs_desc.fCreateFlags = VSURFACE_CREATE_FROMFILE | VSURFACE_SYSTEM_MEM_USAGE;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map.pcx");
else if (iResolution == 1)
else if (iResolution < _1024x768)
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_800x600.pcx");
else if (iResolution == 2)
else
strcpy(vs_desc.ImageFile, "INTERFACE\\b_map_1024x768.pcx");
CHECKF(AddVideoSurface(&vs_desc, &uiTempMap));
CHECKF(AddVideoSurface(&vs_desc, &uiTempMap));
// get video surface
CHECKF( GetVideoSurface( &hSrcVSurface, uiTempMap) );
@@ -4485,17 +4470,17 @@ void ShowPeopleInMotion( INT16 sX, INT16 sY )
UINT8 iconOffsetX = 0;
UINT8 iconOffsetY = 0;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
iconOffsetX = 2;
iconOffsetY = 1;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
iconOffsetX = 3;
iconOffsetY = 2;
}
else if (iResolution == 2)
else
{
iconOffsetX = 4;
iconOffsetY = 3;
@@ -4755,9 +4740,17 @@ void DisplayDistancesForHelicopter( void )
sOldYPosition = sYPosition;
// blit in background
UINT8 imageIndex = 0;
GetVideoObject( &hHandle, guiMapBorderHeliSectors );
BltVideoObject( FRAME_BUFFER, hHandle, iResolution, MAP_HELICOPTER_ETA_POPUP_X, sYPosition, VO_BLT_SRCTRANSPARENCY, NULL );
if (iResolution >= _640x480 && iResolution < _800x600)
imageIndex = 0;
else if (iResolution < _1024x768)
imageIndex = 1;
else
imageIndex = 2;
BltVideoObject( FRAME_BUFFER, hHandle, imageIndex, MAP_HELICOPTER_ETA_POPUP_X, sYPosition, VO_BLT_SRCTRANSPARENCY, NULL );
// sTotalCanTravel = ( INT16 )GetTotalDistanceHelicopterCanTravel( );
sDistanceToGo = ( INT16 )DistanceOfIntendedHelicopterPath( );
@@ -4944,7 +4937,7 @@ void DisplayPositionOfHelicopter( void )
GetVideoObject( &hHandle, guiHelicopterIcon );
if (iResolution > 0)
if (iResolution >= _800x600)
{
x = x + (MAP_GRID_X / 2) - 10;
y = y + 1 + (MAP_GRID_Y / 2) - 10;
@@ -5014,7 +5007,7 @@ void DisplayDestinationOfHelicopter( void )
GetVideoObject( &hHandle, guiHelicopterIcon );
BltVideoObject( FRAME_BUFFER, hHandle, HELI_SHADOW_ICON, x, y, VO_BLT_SRCTRANSPARENCY, NULL );
if (iResolution > 0)
if (iResolution >= _800x600)
{
x = x + (MAP_GRID_X / 2) - 10;
y = y + 1 + (MAP_GRID_Y / 2) - 10;
@@ -5456,9 +5449,7 @@ void DisplayLevelString( void )
return;
}
// otherwise we will have to display the string with the level number
SetFontDestBuffer( guiSAVEBUFFER, MAP_VIEW_START_X, MAP_VIEW_START_Y, MAP_VIEW_START_X+MAP_VIEW_WIDTH+MAP_GRID_X, MAP_VIEW_START_Y+MAP_VIEW_HEIGHT+7, FALSE );
SetFontDestBuffer( guiSAVEBUFFER, xResOffset + MAP_VIEW_START_X, MAP_VIEW_START_Y, xResOffset + MAP_VIEW_START_X+MAP_VIEW_WIDTH+MAP_GRID_X, MAP_VIEW_START_Y+MAP_VIEW_HEIGHT+7, FALSE );
SetFont( MAP_FONT );
SetFontForeground( MAP_INDEX_COLOR );
@@ -5596,11 +5587,11 @@ BOOLEAN LoadMilitiaPopUpBox( void )
// load the militia pop up box
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
else if (iResolution == 1)
else if (iResolution < _1024x768)
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
else if (iResolution == 2)
else
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
@@ -5994,11 +5985,11 @@ void CreateDestroyMilitiaSectorButtons( void )
sY += ( iCounter * ( MILITIA_BTN_HEIGHT ) + 2 );
// set the button image
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia.sti", -1,3,-1,4,-1 );
else if (iResolution == 1)
else if (iResolution < _1024x768)
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti", -1,3,-1,4,-1 );
else if (iResolution == 2)
else
giMapMilitiaButtonImage[ iCounter ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti", -1,3,-1,4,-1 );
// set the button value
@@ -6462,17 +6453,17 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Map Screen4");
void CreateMilitiaPanelBottomButton( void )
{
// set the button image
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia.sti" ,-1,1,-1,2,-1 );
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_800x600.sti" ,-1,1,-1,2,-1 );
}
else if (iResolution == 2)
else
{
giMapMilitiaButtonImage[ 3 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
giMapMilitiaButtonImage[ 4 ]= LoadButtonImage( "INTERFACE\\militia_1024x768.sti" ,-1,1,-1,2,-1 );
@@ -6874,24 +6865,30 @@ void HandleLowerLevelMapBlit( void )
return;
}
if (iResolution == 0)
UINT8 xVal = 21;
UINT8 yVal = 17;
UINT8 imageIndex = 0;
if (iResolution >= _640x480 && iResolution < _800x600)
{
offsetX = 21;
offsetY = 17;
offsetX = xVal;
offsetY = yVal;
imageIndex = 0;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
offsetX = 21 + 8;
offsetY = 17 + 7;
offsetX = xVal + 8;
offsetY = yVal + 7;
imageIndex = 1;
}
else if (iResolution == 2)
else
{
offsetX = 21 + 21;
offsetY = 17 + 17;
offsetX = xVal + 21;
offsetY = yVal + 17;
imageIndex = 2;
}
// handle the blt of the sublevel
BltVideoObject( guiSAVEBUFFER, hHandle, iResolution, MAP_VIEW_START_X + offsetX, MAP_VIEW_START_Y + offsetY, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hHandle, imageIndex, MAP_VIEW_START_X + offsetX, MAP_VIEW_START_Y + offsetY, VO_BLT_SRCTRANSPARENCY, NULL );
// handle shading of sublevels
ShadeSubLevelsNotVisited( );
@@ -7480,30 +7477,23 @@ void DrawMapBoxIcon( HVOBJECT hIconHandle, UINT16 usVOIndex, INT16 sMapX, INT16
INT32 iX, iY;
UINT8 iconOffsetX = 0;
UINT8 iconOffsetY = 0;
UINT8 iconOffsetX = 2;
UINT8 iconOffsetY = 1;
UINT8 iconSize = 0;
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
iconOffsetX = 2;
iconOffsetY = 1;
iconSize = 3;
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
iconOffsetX = 2;
iconOffsetY = 1;
iconSize = 4;
}
else if (iResolution == 2)
else
{
iconOffsetX = 2;
iconOffsetY = 1;
iconSize = 6;
}
// don't show any more icons than will fit into one sector, to keep them from spilling into sector(s) beneath
if ( ubIconPosition >= ( MERC_ICONS_PER_LINE * ROWS_PER_SECTOR ) )
{
@@ -7625,7 +7615,7 @@ void DrawBullseye()
// draw the bullseye in that sector
GetVideoObject( &hHandle, guiBULLSEYE);
if (iResolution > 0)
if (iResolution >= _800x600)
{
sX = sX + MAP_GRID_X / 2 - 10;
sY = sY + 1 + MAP_GRID_Y / 2 - 10;
+40 -233
View File
@@ -76,8 +76,6 @@ extern UINT8 maxNumberOfMercVisibleInStrategyList = 0; // WANNE: Max merc displa
// number of LINKED LISTS for sets of leave items (each slot holds an unlimited # of items)
#define NUM_LEAVE_LIST_SLOTS CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS
#define SELECTED_CHAR_ARROW_X 1 //8
#define SIZE_OF_UPDATE_BOX 20
// as deep as the map goes
@@ -849,7 +847,7 @@ INT16 GetRefreshHeightForMercList( void )
INT16 yHeight = ( INT16 )( ( ( giMAXIMUM_NUMBER_OF_PLAYER_SLOTS + 1 ) * ( Y_SIZE + 2 ) ) + 1 );
// WANNE: Get maximum refresh height depending on the resolution!
if (iResolution == 0)
if (iResolution >= _640x480 && iResolution < _800x600)
{
if (!is_networked)
{
@@ -861,9 +859,8 @@ INT16 GetRefreshHeightForMercList( void )
if (yHeight > 131)
yHeight = 131;
}
}
else if (iResolution == 1)
else if (iResolution < _1024x768)
{
if (!is_networked)
{
@@ -876,7 +873,7 @@ INT16 GetRefreshHeightForMercList( void )
yHeight = 249;
}
}
else if (iResolution == 2)
else
{
if (!is_networked)
{
@@ -927,7 +924,7 @@ void RestoreBackgroundForAssignmentGlowRegionList( void )
INT16 yHeight = GetRefreshHeightForMercList();
// restore background
RestoreExternBackgroundRect( 66, Y_START - 1, 118 + 1 - 67, yHeight );
RestoreExternBackgroundRect( 66 + xResOffset, Y_START - 1, 118 + 1 - 67, yHeight );
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
fTeamPanelDirty = TRUE;
@@ -957,7 +954,7 @@ void RestoreBackgroundForDestinationGlowRegionList( void )
INT16 yHeight = GetRefreshHeightForMercList();
// restore background
RestoreExternBackgroundRect( 182, Y_START - 1, 217 + 1 - 182, yHeight );
RestoreExternBackgroundRect( 182 + xResOffset, Y_START - 1, 217 + 1 - 182, yHeight );
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
fTeamPanelDirty = TRUE;
@@ -987,7 +984,7 @@ void RestoreBackgroundForContractGlowRegionList( void )
INT16 yHeight = GetRefreshHeightForMercList();
// restore background
RestoreExternBackgroundRect( 222, Y_START - 1, 250 + 1 - 222, yHeight ) ;
RestoreExternBackgroundRect( 222 + xResOffset, Y_START - 1, 250 + 1 - 222, yHeight ) ;
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
fTeamPanelDirty = TRUE;
@@ -1021,7 +1018,7 @@ void RestoreBackgroundForSleepGlowRegionList( void )
INT16 yHeight = GetRefreshHeightForMercList();
// restore background
RestoreExternBackgroundRect( 123, Y_START - 1, 142 + 1 - 123, yHeight ) ;
RestoreExternBackgroundRect( 123 + xResOffset, Y_START - 1, 142 + 1 - 123, yHeight ) ;
// ARM: not good enough! must reblit the whole panel to erase glow chunk restored by help text disappearing!!!
fTeamPanelDirty = TRUE;
@@ -1279,7 +1276,7 @@ INT32 DoMapMessageBoxWithRect( UINT8 ubStyle, const STR16 zString, UINT32 uiExit
INT32 DoMapMessageBox( UINT8 ubStyle, STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
{
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH, INV_INTERFACE_START_Y };
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
// reset the highlighted line
giHighLine = -1;
@@ -1411,6 +1408,8 @@ void HandleDisplayOfSelectedMercArrows( void )
HVOBJECT hHandle;
UINT8 ubCount = 0;
UINT16 selectedCharArrowX = xResOffset + 1;
// blit an arrow by the name of each merc in a selected list
if( bSelectedInfoChar == -1 )
{
@@ -1438,7 +1437,7 @@ void HandleDisplayOfSelectedMercArrows( void )
sYPosition = Y_START+( ( bSelectedInfoChar - FIRSTmercTOdisplay ) * ( Y_SIZE + 2 ) ) - 1;
GetVideoObject( &hHandle, guiSelectedCharArrow );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,selectedCharArrowX, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
// now run through the selected list of guys, an arrow for each
@@ -1454,7 +1453,7 @@ void HandleDisplayOfSelectedMercArrows( void )
sYPosition = Y_START+( ubCount * ( Y_SIZE + 2) ) - 1;
GetVideoObject( &hHandle, guiSelectedCharArrow );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,SELECTED_CHAR_ARROW_X, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
BltVideoObject( guiSAVEBUFFER , hHandle, 0,selectedCharArrowX, sYPosition , VO_BLT_SRCTRANSPARENCY,NULL );
}
}
}
@@ -1915,177 +1914,17 @@ void SetUpMercAboutToLeaveEquipment( UINT32 ubProfileId, UINT32 uiSlotIndex )
}
/*
BOOLEAN RemoveItemFromLeaveIndex( MERC_LEAVE_ITEM *pItem, UINT32 uiSlotIndex )
{
MERC_LEAVE_ITEM *pCurrentItem = NULL;
Assert( uiSlotIndex < NUM_LEAVE_LIST_SLOTS );
if( pItem == NULL )
{
return( FALSE );
}
// item is head of list?
//ARM: THIS DOESN'T MAKE SENSE, pCurrentItem is always NULL at this stage!
if( pItem == pCurrentItem )
{
gpLeaveListHead[ uiSlotIndex ] = pCurrentItem->pNext;
MemFree( pItem );
pItem = NULL;
return( TRUE );
}
// in the body
while( ( pCurrentItem->pNext != pItem ) && ( pCurrentItem->pNext != NULL ) )
{
pCurrentItem = pCurrentItem->pNext;
}
// item not found
if( pCurrentItem->pNext == NULL )
{
return( FALSE );
}
// set to next after next
pCurrentItem->pNext = pCurrentItem->pNext->pNext;
// free space and null ptr
MemFree( pItem );
pItem = NULL;
return( TRUE );
}
*/
void HandleGroupAboutToArrive( void )
{
// reblit map to change the color of the "people in motion" marker
fMapPanelDirty = TRUE;
// ARM - commented out - don't see why this is needed
// fTeamPanelDirty = TRUE;
// fCharacterInfoPanelDirty = TRUE;
return;
}
/*
void HandleMapScreenUpArrow( void )
{
INT32 iValue = 0;
INT32 iHighLine = 0;
// check state and update
if( fShowAssignmentMenu == TRUE )
{
if( GetBoxShadeFlag( ghAssignmentBox, iValue ) == FALSE )
{
if( iHighLine == 0)
{
iHighLine = ( INT32 )GetNumberOfLinesOfTextInBox( ghAssignmentBox );
}
else
{
iHighLine++;
}
}
}
else
{
if( ( giHighLine == 0 ) || ( giHighLine == -1 ) )
{
giHighLine = GetNumberOfCharactersOnPlayersTeam( ) - 1;
fTeamPanelDirty = TRUE;
}
else
{
giHighLine--;
fTeamPanelDirty = TRUE;
}
}
}
void HandleMapScreenDownArrow( void )
{
INT32 iValue = 0;
INT32 iHighLine = 0;
// check state and update
if( fShowContractMenu == TRUE )
{
if( iHighLine == ( INT32 )GetNumberOfLinesOfTextInBox( ghContractBox ) - 1 )
{
iHighLine = 0;
}
else
{
iHighLine++;
}
HighLightBoxLine( ghContractBox, iHighLine );
}
else if( fShowAssignmentMenu == TRUE )
{
if( GetBoxShadeFlag( ghAssignmentBox, iValue ) == FALSE )
{
if( iHighLine == ( INT32 )GetNumberOfLinesOfTextInBox( ghAssignmentBox ) - 1 )
{
iHighLine = 0;
}
else
{
iHighLine--;
}
}
}
else
{
if( ( giHighLine == GetNumberOfCharactersOnPlayersTeam( ) - 1 ) || ( giHighLine == -1 ) )
{
giHighLine = 0;
fTeamPanelDirty = TRUE;
}
else
{
giHighLine++;
fTeamPanelDirty = TRUE;
}
}
}
INT32 GetNumberOfCharactersOnPlayersTeam( void )
{
INT32 iNumberOfPeople = 0, iCounter = 0;
for(iCounter = 0; iCounter < CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
{
if( gCharactersList[ iCounter ].fValid == TRUE )
{
iNumberOfPeople++;
}
}
return( iNumberOfPeople );
}
*/
void CreateMapStatusBarsRegion( void )
{
// create the status region over the bSelectedCharacter info region, to get quick rundown of merc's status
MSYS_DefineRegion( &gMapStatusBarsRegion, BAR_INFO_X - 3, BAR_INFO_Y - 42,(INT16)( BAR_INFO_X + 17), (INT16)(BAR_INFO_Y ), MSYS_PRIORITY_HIGH + 5,
MSYS_DefineRegion( &gMapStatusBarsRegion, BAR_INFO_X + xResOffset - 3, BAR_INFO_Y - 42,(INT16)( BAR_INFO_X + xResOffset + 17), (INT16)(BAR_INFO_Y ), MSYS_PRIORITY_HIGH + 5,
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
return;
@@ -2094,7 +1933,6 @@ void CreateMapStatusBarsRegion( void )
void RemoveMapStatusBarsRegion( void )
{
// remove the bSelectedInfoCharacter helath, breath and morale bars info region
MSYS_RemoveRegion( &gMapStatusBarsRegion );
@@ -2107,7 +1945,6 @@ void UpdateCharRegionHelpText( void )
CHAR16 pMoraleStr[ 128 ];
SOLDIERTYPE *pSoldier = NULL;
if( ( bSelectedInfoChar != -1 ) && ( gCharactersList[ bSelectedInfoChar ].fValid == TRUE ) )
{
// valid soldier selected
@@ -4965,7 +4802,28 @@ void AddSoldierToUpdateBox( SOLDIERTYPE *pSoldier )
{
// add to box
pUpdateSoldierBox[ iCounter ] = pSoldier;
if ( ( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
{
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%02d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
}
else if ( ( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex > 99 ) && ( gProfilesIMP[ pSoldier->ubProfile ].ProfilId == pSoldier->ubProfile ) )
{
sprintf( VObjectDesc.ImageFile, "IMPFaces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
}
else if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%02d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
}
else if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex > 99 )
{
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
}
/*
if( gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex < 100 )
{
// grab filename of face
@@ -4976,7 +4834,7 @@ void AddSoldierToUpdateBox( SOLDIERTYPE *pSoldier )
// grab filename of face
sprintf( VObjectDesc.ImageFile, "Faces\\65Face\\%03d.sti", gMercProfiles[ pSoldier->ubProfile ].ubFaceIndex );
}
*/
// load the face
AddVideoObject( &VObjectDesc, (UINT32 *)&giUpdateSoldierFaces[ iCounter ] );
@@ -5672,14 +5530,14 @@ void CreateDestroyInsuranceMouseRegionForMercs( BOOLEAN fCreate )
if( ( fCreated == FALSE ) && ( fCreate == TRUE ) )
{
MSYS_DefineRegion( &gContractIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y, CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_HEIGHT,
MSYS_DefineRegion( &gContractIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y, CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_HEIGHT,
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
MSYS_DefineRegion( &gInsuranceIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING, CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING + CHAR_ICON_HEIGHT,
MSYS_DefineRegion( &gInsuranceIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING, CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + CHAR_ICON_SPACING + CHAR_ICON_HEIGHT,
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
MSYS_DefineRegion( &gDepositIconRegion, CHAR_ICON_X, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ), CHAR_ICON_X + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ) + CHAR_ICON_HEIGHT,
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
MSYS_DefineRegion( &gDepositIconRegion, CHAR_ICON_X + xResOffset, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ), CHAR_ICON_X + xResOffset + CHAR_ICON_WIDTH, CHAR_ICON_CONTRACT_Y + ( 2 * CHAR_ICON_SPACING ) + CHAR_ICON_HEIGHT,
MSYS_PRIORITY_HIGH - 1, MSYS_NO_CURSOR, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
fCreated = TRUE;
}
@@ -5692,57 +5550,6 @@ void CreateDestroyInsuranceMouseRegionForMercs( BOOLEAN fCreate )
}
}
/*
void HandlePlayerEnteringMapScreenBeforeGoingToTactical( void )
{
CHAR16 sString[ 256 ];
if( !( AnyMercsHired( ) ) )
{
// no mercs hired inform player they must hire mercs
swprintf( sString, pMapScreenJustStartedHelpText[ 0 ] );
DoMapMessageBox( MSG_BOX_BASIC_STYLE, sString, MAP_SCREEN, MSG_BOX_FLAG_OK, DoneHandlePlayerFirstEntryToMapScreen );
}
else
{
// player has mercs hired, tell them to time compress to get things underway
swprintf( sString, pMapScreenJustStartedHelpText[ 1 ] );
fShowMapScreenHelpText = TRUE;
}
// now inform the player
if( fShowMapScreenHelpText )
{
fShowMapScreenHelpText = FALSE;
SetUpShutDownMapScreenHelpTextScreenMask( );
fShowMapScreenHelpText = TRUE;
}
return;
}
void DoneHandlePlayerFirstEntryToMapScreen( UINT8 bExitValue )
{
static BOOLEAN fFirstTime = TRUE;
if( bExitValue == MSG_BOX_RETURN_OK )
{
if( fFirstTime == TRUE )
{
fFirstTime = FALSE;
fShowMapScreenHelpText = TRUE;
}
}
}
*/
BOOLEAN HandleTimeCompressWithTeamJackedInAndGearedToGo( void )
{
// check a team is ready to go
+1 -1
View File
@@ -1103,7 +1103,7 @@ void NotifyPlayerOfMercDepartureAndPromptEquipmentPlacement( SOLDIERTYPE *pSoldi
CHAR16 zShortTownIDString[ 50 ];
// use YES/NO Pop up box, settup for particular screen
SGPRect pCenteringRect= {0, 0, 640, 480};
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT};
//GetSectorIDString( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ, zTownIDString, TRUE );
+53 -40
View File
@@ -80,6 +80,8 @@ BOOLEAN gfEnterAutoResolveMode = FALSE;
BOOLEAN gfEnteringMapScreenToEnterPreBattleInterface = FALSE;
BOOLEAN gfIgnoreAllInput = TRUE;
BOOLEAN gfZoomDone = FALSE;
enum //GraphicIDs for the panel
{
MAINPANEL,
@@ -441,7 +443,7 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
}
//Define the blanket region to cover all of the other regions used underneath the panel.
MSYS_DefineRegion( &PBInterfaceBlanket, 0, 0, 261, 359, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
MSYS_DefineRegion( &PBInterfaceBlanket, 0 + xResOffset, 0, 261 + xResOffset, 359, MSYS_PRIORITY_HIGHEST - 5, 0, 0, 0 );
//Create the panel
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
@@ -455,9 +457,9 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
AssertMsg( 0, "Failed to load interface\\PreBattleButton.sti" );
iPBButtonImage[1] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButtonImage[2] = UseLoadedButtonImage( iPBButtonImage[ 0 ], -1, 0, -1, 1, -1 );
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
iPBButton[0] = QuickCreateButton( iPBButtonImage[0], 27 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, AutoResolveBattleCallback );
iPBButton[1] = QuickCreateButton( iPBButtonImage[1], 98 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, GoToSectorCallback );
iPBButton[2] = QuickCreateButton( iPBButtonImage[2], 169 + xResOffset, 54, BUTTON_NO_TOGGLE, MSYS_PRIORITY_HIGHEST - 2, DEFAULT_MOVE_CALLBACK, RetreatMercsCallback );
SpecifyGeneralButtonTextAttributes( iPBButton[0], gpStrategicString[ STR_PB_AUTORESOLVE_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
SpecifyGeneralButtonTextAttributes( iPBButton[1], gpStrategicString[ STR_PB_GOTOSECTOR_BTN ], BLOCKFONT, FONT_BEIGE, 141 );
@@ -874,6 +876,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
void DoTransitionFromMapscreenToPreBattleInterface()
{
gfZoomDone = FALSE;
SGPRect DstRect, PBIRect;
UINT32 uiStartTime, uiCurrTime;
INT32 iPercentage, iFactor;
@@ -887,9 +891,9 @@ void DoTransitionFromMapscreenToPreBattleInterface()
PauseTime( FALSE );
PBIRect.iLeft = 0;
PBIRect.iLeft = 0 + xResOffset;
PBIRect.iTop = 0;
PBIRect.iRight = 261;
PBIRect.iRight = 261 + xResOffset;
PBIRect.iBottom = 359;
iWidth = 261;
iHeight = 359;
@@ -901,7 +905,7 @@ void DoTransitionFromMapscreenToPreBattleInterface()
GetScreenXYFromMapXY( gubPBSectorX, gubPBSectorY, &sStartLeft, &sStartTop );
sStartLeft += MAP_GRID_X / 2;
sStartTop += MAP_GRID_Y / 2;
sEndLeft = 131;
sEndLeft = 131 + xResOffset;
sEndTop = 180;
//save the mapscreen buffer
@@ -924,13 +928,13 @@ void DoTransitionFromMapscreenToPreBattleInterface()
gfEnterAutoResolveMode = TRUE;
}
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27, 54, 209, 32 );
BlitBufferToBuffer( guiSAVEBUFFER, FRAME_BUFFER, 27 + xResOffset, 54, 209, 32 );
RenderButtons();
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27, 54, 209, 32 );
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 27 + xResOffset, 54, 209, 32 );
gfRenderPBInterface = TRUE;
//hide the prebattle interface
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0, 0, 261, 359 );
BlitBufferToBuffer( guiEXTRABUFFER, FRAME_BUFFER, 0 + xResOffset, 0, 261 + xResOffset, 359 );
PlayJA2SampleFromFile( "SOUNDS\\Laptop power up (8-11).wav", RATE_11025, HIGHVOLUME, 1, MIDDLEPAN );
InvalidateScreen();
RefreshScreen( NULL );
@@ -970,6 +974,8 @@ void DoTransitionFromMapscreenToPreBattleInterface()
(UINT16)(DstRect.iRight-DstRect.iLeft+1), (UINT16)(DstRect.iBottom-DstRect.iTop+1) );
}
BlitBufferToBuffer( FRAME_BUFFER, guiSAVEBUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT );
gfZoomDone = TRUE;
}
void KillPreBattleInterface()
@@ -1011,7 +1017,7 @@ void KillPreBattleInterface()
//Enable the options button when the auto resolve screen comes up
EnableDisAbleMapScreenOptionsButton( TRUE );
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261, 359, 0 );
ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, 359, 0 );
EnableTeamInfoPanels();
if( ButtonList[ giMapContractButton ] )
@@ -1084,8 +1090,8 @@ void RenderPBHeader( INT32 *piX, INT32 *piWidth)
}
width = StringPixLength( str, FONT10ARIALBOLD );
x = 130 - width / 2;
mprintf( x, 4, str );
InvalidateRegion( 0, 0, 231, 12 );
mprintf( x + xResOffset, 4, str );
InvalidateRegion( 0, 0, 231 + xResOffset, 12 );
*piX = x;
*piWidth = width;
}
@@ -1102,6 +1108,9 @@ void RenderPreBattleInterface()
UINT8 ubJunk;
//PLAYERGROUP *pPlayer;
// Make the background black!
//ColorFillVideoSurfaceArea( guiSAVEBUFFER, 0, 0, 261 + xResOffset, SCREEN_HEIGHT - 120, 0 );
//This code determines if the cursor is inside the rectangle consisting of the
//retreat button. If it is inside, then we set up the variables so that the retreat
//arrows get drawn in the mapscreen.
@@ -1141,22 +1150,22 @@ void RenderPreBattleInterface()
gfRenderPBInterface = FALSE;
GetVideoObject( &hVObject, uiInterfaceImages );
//main panel
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, MAINPANEL, xResOffset, 0, VO_BLT_SRCTRANSPARENCY, NULL );
//main title
RenderPBHeader( &x, &width );
//now draw the title bars up to the text.
for( i = x - 12; i > 20; i -= 10 )
{
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i, 6, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6, VO_BLT_SRCTRANSPARENCY, NULL );
}
for( i = x + width + 2; i < 231; i += 10 )
{
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i, 6, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, TITLE_BAR_PIECE, i + xResOffset, 6, VO_BLT_SRCTRANSPARENCY, NULL );
}
y = BOTTOM_Y - ACTUAL_HEIGHT - ROW_HEIGHT * max( guiNumUninvolved, 1 );
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8, y, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, UNINVOLVED_HEADER, 8 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
SetFont( BLOCKFONT );
SetFontForeground( FONT_BEIGE );
@@ -1167,7 +1176,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 65 - width , 17, str );
mprintf( 65 - width + xResOffset , 17, str );
SetFont( BLOCKFONT );
if( gubEnemyEncounterCode != CREATURE_ATTACK_CODE )
@@ -1188,7 +1197,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 54 - width , 38, str );
mprintf( 54 + xResOffset - width , 38, str );
SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MERCS ] );
@@ -1198,7 +1207,7 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 139 - width , 38, str );
mprintf( 139 + xResOffset - width , 38, str );
SetFont( BLOCKFONT );
swprintf( str, gpStrategicString[ STR_PB_MILITIA ] );
@@ -1208,20 +1217,20 @@ void RenderPreBattleInterface()
SetFont( BLOCKFONTNARROW );
width = StringPixLength( str, BLOCKFONTNARROW );
}
mprintf( 224 - width , 38, str );
mprintf( 224 + xResOffset - width , 38, str );
//Draw the bottom columns
for( i = 0; i < (INT32)max( guiNumUninvolved, 1 ); i++ )
{
y = BOTTOM_Y - ROW_HEIGHT * (i+1) + 1;
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161, y, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, BOTTOM_COLUMN, 161 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
}
// WDS - make number of mercenaries, etc. be configurable
for( i = 0; i < (INT32)(/*21*/3+gGameExternalOptions.ubGameMaximumNumberOfPlayerMercs - max( guiNumUninvolved, 1 )); i++ )
{
y = TOP_Y + ROW_HEIGHT * i;
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186, y, VO_BLT_SRCTRANSPARENCY, NULL );
BltVideoObject( guiSAVEBUFFER, hVObject, TOP_COLUMN, 186 + xResOffset, y, VO_BLT_SRCTRANSPARENCY, NULL );
}
//location
@@ -1230,7 +1239,7 @@ void RenderPreBattleInterface()
SetFontShadow( FONT_NEARBLACK );
GetSectorIDString( gubPBSectorX, gubPBSectorY, gubPBSectorZ, pSectorName, TRUE );
mprintf( 70, 17, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName );
mprintf( 70 + xResOffset, 17, L"%s %s", gpStrategicString[ STR_PB_SECTOR ], pSectorName );
//enemy
SetFont( FONT14ARIAL );
@@ -1252,15 +1261,15 @@ void RenderPreBattleInterface()
}
x = 57 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
y = 36;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//player
swprintf( str, L"%d", guiNumInvolved );
x = 142 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//militia
swprintf( str, L"%d", CountAllMilitiaInSector( gubPBSectorX, gubPBSectorY ) );
x = 227 + (27 - StringPixLength( str, FONT14ARIAL )) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
SetFontShadow( FONT_NEARBLACK );
SetFont( BLOCKFONT2 );
@@ -1283,25 +1292,25 @@ void RenderPreBattleInterface()
//NAME
wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x , y, str );
mprintf( x + xResOffset , y, str );
//ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//COND
GetSoldierConditionInfo( MercPtrs[ i ], str, &ubHPPercent, &ubBPPercent );
x = 129 + (58-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//HP
swprintf( str, L"%d%%", ubHPPercent );
x = 189 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
wcscat( str, L"%" );
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//BP
swprintf( str, L"%d%%", ubBPPercent );
x = 217 + (25-StringPixLength( str, BLOCKFONT2)) / 2;
wcscat( str, L"%" );
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
line++;
y += ROW_HEIGHT;
@@ -1317,10 +1326,10 @@ void RenderPreBattleInterface()
wcscpy( str, gpStrategicString[ STR_PB_NONE ] );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
y = BOTTOM_Y - ROW_HEIGHT + 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
}
else
{
{
pGroup = gpGroupList;
y = BOTTOM_Y - ROW_HEIGHT * guiNumUninvolved + 2;
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
@@ -1337,26 +1346,26 @@ void RenderPreBattleInterface()
//NAME
wcscpy( str, MercPtrs[ i ]->name );
x = 17 + (52-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x , y, str );
mprintf( x + xResOffset, y, str );
//ASSIGN
GetMapscreenMercAssignmentString( MercPtrs[ i ], str );
x = 72 + (54-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//LOC
GetMapscreenMercLocationString( MercPtrs[ i ], str );
x = 128 + (33-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
//DEST
GetMapscreenMercDestinationString( MercPtrs[ i ], str );
if( wcslen( str ) > 0 )
{
x = 164 + (41-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
}
//DEP
GetMapscreenMercDepartureString( MercPtrs[ i ], str, &ubJunk );
x = 208 + (34-StringPixLength( str, BLOCKFONT2)) / 2;
mprintf( x, y, str );
mprintf( x + xResOffset, y, str );
line++;
y += ROW_HEIGHT;
}
@@ -1366,7 +1375,11 @@ void RenderPreBattleInterface()
// mark any and ALL pop up boxes as altered
MarkAllBoxesAsAltered( );
RestoreExternBackgroundRect( 0, 0, 261, 359 );
if( !guiNumUninvolved || gfZoomDone == FALSE )
RestoreExternBackgroundRect( 0 + xResOffset, 0, 261 + xResOffset, 359 );
else
RestoreExternBackgroundRect( 0 + xResOffset, 0, 261 + xResOffset, y );
// restore font destinanation buffer to the frame buffer
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
+1 -1
View File
@@ -100,7 +100,7 @@ extern void Ensure_RepairedGarrisonGroup( GARRISON_GROUP **ppGarrison, INT32 *pG
void ValidateEnemiesHaveWeapons()
{
#ifdef JA2BETAVERSION
SGPRect CenteringRect= {0, 0, 639, 479 };
SGPRect CenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, SCREEN_HEIGHT };
INT32 i, iErrorDialog;
SOLDIERTYPE *pSoldier;
INT32 iNumInvalid = 0;
+1 -1
View File
@@ -1311,7 +1311,7 @@ void GetUserInput()
GetCursorPos(&MousePos);
ScreenToClient(ghWindow, &MousePos); // In window coords!
while( DequeueEvent( &Event ) )
while( DequeueSpecificEvent(&Event, KEY_DOWN|KEY_UP|KEY_REPEAT) )
{
if( !HandleTextInput( &Event ) && Event.usEvent == KEY_DOWN )
{
+1 -1
View File
@@ -1515,7 +1515,7 @@ void InitStrategicAI()
//final thing to do is choose 1 cache map out of 5 possible maps. Simply select the sector randomly,
//set up the flags to use the alternate map, then place 8-12 regular troops there (no ai though).
//changing MAX_STRATEGIC_TEAM_SIZE may require changes to to the defending force here.
if ( !gGameOptions.fEnableAllWeaponCaches ) // SANDRO - weapon caches settings changed
if ( !gGameExternalOptions.fEnableAllWeaponCaches ) // SANDRO - weapon caches settings changed
{
// added a chance to have more than one weapon caches in game
INT8 ubPicked[2] = { 0,0 };
+12 -6
View File
@@ -1030,26 +1030,32 @@ void IssueHeadMinerQuote( INT8 bMineIndex, UINT8 ubQuoteType )
switch ( bMineIndex )
{
case MINE_GRUMM:
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
break;
case MINE_CAMBRIA:
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
break;
case MINE_ALMA:
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
break;
case MINE_DRASSEN:
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = 135;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = 135;
break;
case MINE_CHITZENA:
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = 117;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = 117;
break;
// there's no head miner in San Mona, this is an error!
case MINE_SAN_MONA:
default:
//Assert( FALSE );
sXPos = DEFAULT_EXTERN_PANEL_X_POS, sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
sXPos = DEFAULT_EXTERN_PANEL_X_POS;
sYPos = DEFAULT_EXTERN_PANEL_Y_POS;
break;
}
+6
View File
@@ -1650,6 +1650,12 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
return;
}
// group arrival already processed?
if ( !pGroup->fBetweenSectors && pGroup->ubNextX == 0 && pGroup->ubNextY == 0 )
{
return;
}
if( pGroup->fPlayer )
{
//Set the fact we have visited the sector
+10 -10
View File
@@ -198,24 +198,24 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditorD|Win32'">
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MapEditor|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Relese_WithDebugInfo|Win32'">
<IntDir>..\build\VS2010\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>..\lib\VS2010\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\build\VS2010\$(JA2Config)\$(ProjectName)_$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)\lib\VS2010\$(JA2Config)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
+1 -1
View File
@@ -663,7 +663,7 @@ void HandleInterfaceMessageForCostOfTrainingMilitia( SOLDIERTYPE *pSoldier )
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Militia2");
CHAR16 sString[ 128 ];
SGPRect pCenteringRect= {0, 0, 640, INV_INTERFACE_START_Y };
SGPRect pCenteringRect= {0 + xResOffset, 0, SCREEN_WIDTH - xResOffset, INV_INTERFACE_START_Y };
INT32 iNumberOfSectors = 0;
pMilitiaTrainerSoldier = pSoldier;
+324 -370
View File
File diff suppressed because it is too large Load Diff