Space Viking's many mercs changes plus numerous generic bug fixes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2498 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
SpaceViking
2009-01-15 01:26:13 +00:00
parent f64f58fbf8
commit f26095d86f
138 changed files with 3493 additions and 3265 deletions
@@ -26,6 +26,8 @@
#include "HelpScreen.h"
#include "Map Screen Helicopter.h"
#include "Tactical Save.h"
#include "GameSettings.h"
#include "debug.h"
#endif
@@ -94,6 +96,12 @@ void MinWidthOfTownMineInfoBox( void );
void DisplayTownInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
{
// will display town info for a particular town
AssertGE( sMapX, MINIMUM_VALID_X_COORDINATE);
AssertLE( sMapX, MAXIMUM_VALID_X_COORDINATE );
AssertGE( sMapY, MINIMUM_VALID_Y_COORDINATE);
AssertLE( sMapY, MAXIMUM_VALID_Y_COORDINATE );
AssertGE( bMapZ, bMapZ );
AssertLE( bMapZ, bMapZ );
// set current sector
if( ( bCurrentTownMineSectorX != sMapX ) || ( bCurrentTownMineSectorY != sMapY ) || ( bCurrentTownMineSectorZ != bMapZ ) )
@@ -646,6 +654,8 @@ void AddCommonInfoToBox(void)
// how many are there, really?
ubNumEnemies = NumEnemiesInSector( bCurrentTownMineSectorX, bCurrentTownMineSectorY );
AssertGE(gGameExternalOptions.ubGameMaximumNumberOfEnemies, NumFreeEnemySlots());
unsigned numEnemiesOnMap = gGameExternalOptions.ubGameMaximumNumberOfEnemies - NumFreeEnemySlots();
switch ( WhatPlayerKnowsAboutEnemiesInSector( bCurrentTownMineSectorX, bCurrentTownMineSectorY ) )
{
@@ -670,7 +680,10 @@ void AddCommonInfoToBox(void)
case KNOWS_HOW_MANY:
// show exactly how many
swprintf( wString, L"%d", ubNumEnemies );
if (numEnemiesOnMap != ubNumEnemies)
swprintf( wString, L"%d (%d)", numEnemiesOnMap, ubNumEnemies );
else
swprintf( wString, L"%d", ubNumEnemies );
break;
}