mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Update to Master
This commit is contained in:
@@ -60,4 +60,4 @@ void AutoResolveMilitiaDropAndPromote();
|
||||
|
||||
BOOLEAN IndividualMilitiaInUse_AutoResolve( UINT32 aMilitiaId );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -6,4 +6,4 @@ extern void InitNewCampaign();
|
||||
extern void BuildUndergroundSectorInfoList();
|
||||
extern void TrashUndergroundSectorInfo();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -80,4 +80,4 @@ INT32 GetTotalFacilityHourlyCosts( BOOLEAN fPositive );
|
||||
|
||||
void InitFacilities();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,4 +18,4 @@ void InitBloodCatSectors();
|
||||
void InitVIPSectors();
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -333,4 +333,4 @@ extern void SetNumberOfJa25BloodCatsInSector( INT32 iSectorID, INT8 bNumBloodCat
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -96,6 +96,7 @@ extern "C" {
|
||||
#include "Merc Contract.h"
|
||||
#include "message.h"
|
||||
#include "Town Militia.h"
|
||||
#include <language.hpp>
|
||||
|
||||
extern UINT8 gubWaitingForAllMercsToExitCode;
|
||||
|
||||
@@ -12802,26 +12803,7 @@ static int l_GetUsedLanguage( lua_State *L )
|
||||
{
|
||||
if ( lua_gettop( L ) )
|
||||
{
|
||||
INT32 val = 0;
|
||||
|
||||
#if defined(ENGLISH)
|
||||
val = 0;
|
||||
#elif defined(GERMAN)
|
||||
val = 1;
|
||||
#elif defined(RUSSIAN)
|
||||
val = 2;
|
||||
#elif defined(DUTCH)
|
||||
val = 3;
|
||||
#elif defined(POLISH)
|
||||
val = 4;
|
||||
#elif defined(FRENCH)
|
||||
val = 5;
|
||||
#elif defined(ITALIAN)
|
||||
val = 6;
|
||||
#elif defined(CHINESE)
|
||||
val = 7;
|
||||
#endif
|
||||
|
||||
INT32 val = static_cast<INT32>(g_lang);
|
||||
lua_pushinteger( L, val );
|
||||
}
|
||||
|
||||
|
||||
@@ -742,4 +742,4 @@ void IniGlobalGameSetting(lua_State *L)
|
||||
lua_pushinteger(L, MORRIS_INSTRUCTION_NOTE);
|
||||
lua_setglobal(L, "UB_itemMORRIS_INSTRUCTION_NOTE");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1278,8 +1278,7 @@ void LandHelicopter( void )
|
||||
else
|
||||
{
|
||||
#ifdef JA2UB
|
||||
Assert( 0 );
|
||||
//No meanwhiles
|
||||
//No meanwhiles in UB
|
||||
#else
|
||||
// play meanwhile scene if it hasn't been used yet
|
||||
HandleKillChopperMeanwhileScene();
|
||||
|
||||
@@ -310,4 +310,4 @@ BOOLEAN SoldierAboardAirborneHeli( SOLDIERTYPE *pSoldier );
|
||||
UINT8 MoveAllInHelicopterToFootMovementGroup( INT8 bNewSquad = 0 );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -107,4 +107,4 @@ void InitMapBorderButtonCoordinates();
|
||||
void DisableMapBorderButtons(void);
|
||||
void EnableMapBorderButtons(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
#include "Ja25 Strategic Ai.h"
|
||||
#include "MapScreen Quotes.h"
|
||||
#include "SaveLoadGame.h"
|
||||
#include "strategicmap.h"
|
||||
#endif
|
||||
|
||||
#include "connect.h"
|
||||
|
||||
#include <language.hpp>
|
||||
|
||||
struct UILayout_BottomButtons
|
||||
{
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
#include "types.h"
|
||||
#include "Soldier Control.h"
|
||||
|
||||
|
||||
#ifdef CHINESE //zwwoooooo: Chinese fonts relatively high , so to reduce the number of rows
|
||||
#define MAX_MESSAGES_ON_MAP_BOTTOM 6
|
||||
#else
|
||||
#define MAX_MESSAGES_ON_MAP_BOTTOM 9
|
||||
#endif
|
||||
#ifdef JA2UB
|
||||
extern INT8 gbExitingMapScreenToWhere;
|
||||
#endif
|
||||
@@ -76,4 +70,4 @@ void MoveToEndOfMapScreenMessageList( void );
|
||||
// HEADROCK HAM 3.6: Reset coordinates for slider bar and message window
|
||||
void InitMapScreenInterfaceBottomCoords( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "MilitiaSquads.h"
|
||||
|
||||
#include "LaptopSave.h"
|
||||
#include <language.hpp>
|
||||
|
||||
// added by Flugente
|
||||
extern CHAR16 gzSectorNames[256][4][MAX_SECTOR_NAME_LENGTH];
|
||||
@@ -1199,11 +1200,11 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Map Screen1");
|
||||
// don't show loyalty string until loyalty tracking for that town has been started
|
||||
if( gTownLoyalty[ bTown ].fStarted && gfTownUsesLoyalty[ bTown ])
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( sStringA, L"%d%£¥%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
||||
#else
|
||||
} else {
|
||||
swprintf( sStringA, L"%d%%%% %s", gTownLoyalty[ bTown ].ubRating, gsLoyalString[ 0 ]);
|
||||
#endif
|
||||
}
|
||||
|
||||
// if loyalty is too low to train militia, and militia training is allowed here
|
||||
if ( ( gTownLoyalty[ bTown ].ubRating < iMinLoyaltyToTrain ) && MilitiaTrainingAllowedInTown( bTown ) )
|
||||
@@ -4873,11 +4874,11 @@ void BlitMineText( INT16 sMapX, INT16 sMapY )
|
||||
// if potential is not nil, show percentage of the two
|
||||
if (GetMaxPeriodicRemovalFromMine(ubMineIndex) > 0)
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if ( g_lang == i18n::Lang::zh ) {
|
||||
swprintf( wSubString, L" (%d%£¥%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||
#else
|
||||
} else {
|
||||
swprintf( wSubString, L" (%d%%%%)", (PredictDailyIncomeFromAMine(ubMineIndex, TRUE) * 100 ) / GetMaxDailyRemovalFromMine(ubMineIndex) );
|
||||
#endif
|
||||
}
|
||||
|
||||
wcscat( wString, wSubString );
|
||||
}
|
||||
@@ -5282,12 +5283,12 @@ BOOLEAN LoadMilitiaPopUpBox( void )
|
||||
// load the militia pop up box
|
||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||
|
||||
if (iResolution >= _640x480 && iResolution < _800x600)
|
||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||
else if (iResolution < _1024x768)
|
||||
if ( isWidescreenUI() || iResolution >= _1024x768)
|
||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||
else if (iResolution >= _800x600)
|
||||
FilenameForBPP("INTERFACE\\Militia_800x600.sti", VObjectDesc.ImageFile);
|
||||
else
|
||||
FilenameForBPP("INTERFACE\\Militia_1024x768.sti", VObjectDesc.ImageFile);
|
||||
FilenameForBPP("INTERFACE\\Militia.sti", VObjectDesc.ImageFile);
|
||||
|
||||
CHECKF(AddVideoObject(&VObjectDesc, &guiMilitia));
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ void DisplayTownInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ );
|
||||
void CreateDestroyTownInfoBox( void );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -864,7 +864,7 @@ void EndMeanwhile( )
|
||||
{
|
||||
// We leave this sector open for our POWs to escape!
|
||||
// Set music mode to enemy present!
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
SetMusicMode( MUSIC_TACTICAL_ENEMYPRESENT );
|
||||
|
||||
|
||||
@@ -342,8 +342,8 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
||||
// Ja25: no loyalty
|
||||
#else
|
||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||
UpdateAirspaceControl( );
|
||||
#endif
|
||||
UpdateAirspaceControl( );
|
||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
||||
{
|
||||
|
||||
@@ -30,4 +30,4 @@ void MakePlayerPerceptionOfSectorControlCorrect( INT16 sMapX, INT16 sMapY, INT8
|
||||
|
||||
void ReplaceSoldierProfileInPlayerGroup( UINT8 ubGroupID, UINT8 ubOldProfile, UINT8 ubNewProfile );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1070,8 +1070,8 @@ void InitPreBattleInterface( GROUP *pBattleGroup, BOOLEAN fPersistantPBI )
|
||||
//Disable the options button when the auto resolve screen comes up
|
||||
EnableDisAbleMapScreenOptionsButton( FALSE );
|
||||
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gubPBSectorX, gubPBSectorY ) ].SoundTacticalTensor[gubPBSectorZ];
|
||||
if ( MusicSoundValues[ SECTOR( gubPBSectorX, gubPBSectorY ) ].SoundTacticalTensor[gubPBSectorZ] != -1 )
|
||||
|
||||
@@ -3072,7 +3072,7 @@ BOOLEAN CheckPendingNonPlayerTeam( UINT8 usTeam )
|
||||
void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||
{
|
||||
//if the current sector is the first part of the town
|
||||
if( gWorldSectorX == 10 && gWorldSectorY == 9 && gbWorldSectorZ == 0 )
|
||||
if( gWorldSectorX == BETTY_BLOODCAT_SECTOR_X && gWorldSectorY == BETTY_BLOODCAT_SECTOR_Y && gbWorldSectorZ == BETTY_BLOODCAT_SECTOR_Z )
|
||||
{
|
||||
//if ALL the bloodcats are killed
|
||||
if( pSector->bBloodCats == 0 )
|
||||
|
||||
@@ -13,4 +13,4 @@ void NpcRecordLoggingInit( UINT8 ubNpcID, UINT8 ubMercID, UINT8 ubQuoteNum, UINT
|
||||
void NpcRecordLogging( UINT8 ubApproach, STR pStringA, ...);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+55
-18
@@ -1609,6 +1609,11 @@ void InitStrategicAI()
|
||||
case 1:
|
||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||
{
|
||||
// (0,0) coordinates signify a not used cache sector
|
||||
if ( gModSettings.ubWeaponCache1X == 0 || gModSettings.ubWeaponCache1Y == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||
@@ -1627,6 +1632,10 @@ void InitStrategicAI()
|
||||
case 2:
|
||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||
{
|
||||
if ( gModSettings.ubWeaponCache2X == 0 || gModSettings.ubWeaponCache2Y == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||
@@ -1645,6 +1654,10 @@ void InitStrategicAI()
|
||||
case 3:
|
||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||
{
|
||||
if ( gModSettings.ubWeaponCache3X == 0 || gModSettings.ubWeaponCache3Y == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||
@@ -1663,6 +1676,10 @@ void InitStrategicAI()
|
||||
case 4:
|
||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||
{
|
||||
if ( gModSettings.ubWeaponCache4X == 0 || gModSettings.ubWeaponCache4Y == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||
@@ -1681,6 +1698,10 @@ void InitStrategicAI()
|
||||
case 5:
|
||||
if( ubPicked[0] != ubSector && ubPicked[1] != ubSector )
|
||||
{
|
||||
if ( gModSettings.ubWeaponCache5X == 0 || gModSettings.ubWeaponCache5Y == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||
@@ -1705,25 +1726,40 @@ void InitStrategicAI()
|
||||
}
|
||||
else
|
||||
{
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||
if ( gModSettings.ubWeaponCache1X != 0 && gModSettings.ubWeaponCache1Y != 0 )
|
||||
{
|
||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y )]; //SEC_E11
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops1 * 2);
|
||||
}
|
||||
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y ) ]; //SEC_H5
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||
if ( gModSettings.ubWeaponCache2X != 0 && gModSettings.ubWeaponCache2Y != 0 )
|
||||
{
|
||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache2X, gModSettings.ubWeaponCache2Y )]; //SEC_H5
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops2 * 2);
|
||||
}
|
||||
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y ) ]; //SEC_H10
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||
if ( gModSettings.ubWeaponCache3X != 0 && gModSettings.ubWeaponCache3Y != 0 )
|
||||
{
|
||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache3X, gModSettings.ubWeaponCache3Y )]; //SEC_H10
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops3 * 2);
|
||||
}
|
||||
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y ) ]; //SEC_J12
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||
if ( gModSettings.ubWeaponCache4X != 0 && gModSettings.ubWeaponCache4Y != 0 )
|
||||
{
|
||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache4X, gModSettings.ubWeaponCache4Y )]; //SEC_J12
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops4 * 2);
|
||||
}
|
||||
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y ) ]; //SEC_M9
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||
if ( gModSettings.ubWeaponCache5X != 0 && gModSettings.ubWeaponCache5Y != 0 )
|
||||
{
|
||||
pSector = &SectorInfo[SECTOR( gModSettings.ubWeaponCache5X, gModSettings.ubWeaponCache5Y )]; //SEC_M9
|
||||
pSector->uiFlags |= SF_USE_ALTERNATE_MAP;
|
||||
pSector->ubNumTroops = (UINT8)(6 + zDiffSetting[gGameOptions.ubDifficultyLevel].iWeaponCacheTroops5 * 2);
|
||||
}
|
||||
|
||||
/*
|
||||
pSector = &SectorInfo[ SECTOR( gModSettings.ubWeaponCache1X, gModSettings.ubWeaponCache1Y ) ]; //SEC_E11
|
||||
@@ -7113,15 +7149,16 @@ void InitializeGroup( const GROUP_TYPE groupType, const UINT16 groupSize, UINT16
|
||||
tankCount++;
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsJeeps && ASDSoldierUpgradeToJeep( ) )
|
||||
{
|
||||
troopCount--;
|
||||
jeepCount++;
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
||||
if ( troopCount > 0 && gGameExternalOptions.fASDAssignsRobots && ASDSoldierUpgradeToRobot() )
|
||||
{
|
||||
const int numRobots = 1 + Random(difficultyMod);
|
||||
// Limit amount of robots, if randomized difficulty bonus would cause us to go over the troopCount amount
|
||||
const int numRobots = min( (1 + Random(difficultyMod)), troopCount);
|
||||
troopCount -= numRobots;
|
||||
robotCount += numRobots;
|
||||
}
|
||||
|
||||
@@ -27,4 +27,4 @@ void MakeCivGroupHostileOnNextSectorEntrance( UINT8 ubCivGroup );
|
||||
|
||||
void RemoveAssassin( UINT8 ubProfile );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -218,4 +218,4 @@ BOOLEAN AreThereMinersInsideThisMine( UINT8 ubMineIndex );
|
||||
// use this to determine whether or not the player has spoken to a head miner
|
||||
BOOLEAN SpokenToHeadMiner( UINT8 ubMineIndex );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1085,7 +1085,7 @@ void PrepareForPreBattleInterface( GROUP *pPlayerDialogGroup, GROUP *pInitiating
|
||||
}
|
||||
|
||||
//Set music
|
||||
UseCreatureMusic(HostileZombiesPresent());
|
||||
CheckForZombieMusic();
|
||||
|
||||
#ifdef NEWMUSIC
|
||||
GlobalSoundID = MusicSoundValues[ SECTOR( gWorldSectorX, gWorldSectorY ) ].SoundTacticalTensor[gbWorldSectorZ];
|
||||
@@ -2639,6 +2639,7 @@ BOOLEAN PossibleToCoordinateSimultaneousGroupArrivals( GROUP *pFirstGroup )
|
||||
{
|
||||
if ( pGroup != pFirstGroup && (pGroup->usGroupTeam == OUR_TEAM || pGroup->usGroupTeam == MILITIA_TEAM) && pGroup->fBetweenSectors &&
|
||||
pGroup->ubNextX == pFirstGroup->ubSectorX && pGroup->ubNextY == pFirstGroup->ubSectorY &&
|
||||
pFirstGroup->ubSectorZ == pGroup->ubSectorZ &&
|
||||
!(pGroup->uiFlags & GROUPFLAG_SIMULTANEOUSARRIVAL_CHECKED) &&
|
||||
!IsGroupTheHelicopterGroup( pGroup ) )
|
||||
{
|
||||
|
||||
@@ -2221,4 +2221,4 @@ PathStPtr GetLastNodeOfPath(PathStPtr pNode)
|
||||
}
|
||||
|
||||
return pNode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,4 +167,4 @@ UINT8 RankIndexToSoldierClass( UINT8 ubRankIndex );
|
||||
|
||||
void UpdateLastDayOfPlayerActivity( UINT16 usDay );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "Luaglobal.h"
|
||||
#include "LuaInitNPCs.h"
|
||||
#include "Interface.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#include "GameInitOptionsScreen.h"
|
||||
extern WorldItems gAllWorldItems;
|
||||
@@ -1630,12 +1631,12 @@ void AdjustLoyaltyForCivsEatenByMonsters( INT16 sSectorX, INT16 sSectorY, UINT8
|
||||
swprintf( str, gpStrategicString[STR_PB_BANDIT_KILLCIVS_IN_SECTOR], ubHowMany, pSectorString );
|
||||
else
|
||||
{
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
//diffrent order of words in Chinese
|
||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], pSectorString, ubHowMany );
|
||||
#else
|
||||
} else {
|
||||
swprintf( str, gpStrategicString[STR_DIALOG_CREATURES_KILL_CIVILIANS], ubHowMany, pSectorString );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
DoScreenIndependantMessageBox( str, MSG_BOX_FLAG_OK, MapScreenDefaultOkBoxCallback );
|
||||
|
||||
@@ -224,4 +224,4 @@ void MaximizeLoyaltyForDeidrannaKilled( void );
|
||||
// HEADROCK HAM 3.6: Loyalty hit for owing too much money on facility work
|
||||
void HandleFacilityDebtLoyaltyHit( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -8,4 +8,4 @@ void HandleStrategicTurn( );
|
||||
void SyncStrategicTurnTimes( );
|
||||
void HandleStrategicTurnImplicationsOfExitingCombatMode( void );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -79,6 +79,7 @@ BOOLEAN LuaUnderground::InitializeSectorList()
|
||||
.TableOpen()
|
||||
.TParam("difficultyLevel", int(gGameOptions.ubDifficultyLevel))
|
||||
.TParam("gameStyle", int(gGameOptions.ubGameStyle))
|
||||
.TParam("maxTacticalEnemies", int(gGameExternalOptions.ubGameMaximumNumberOfEnemies))
|
||||
.TableClose();
|
||||
|
||||
SGP_THROW_IFFALSE(initsectorlist_func.Call(1), "call to lua function BuildUndergroundSectorList failed");
|
||||
|
||||
@@ -648,4 +648,4 @@ BOOLEAN ReadInCreaturePlacements(STR fileName)
|
||||
XML_ParserFree(parser);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,4 +160,4 @@ BOOLEAN ReadInSquadNamesStats(STR fileName)
|
||||
BOOLEAN WriteSquadNamesStats()
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
+12
-24
@@ -11,10 +11,8 @@
|
||||
#include "font.h"
|
||||
#include "screenids.h"
|
||||
#include "screens.h"
|
||||
#include "gameloop.h"
|
||||
#include "overhead.h"
|
||||
#include "sysutil.h"
|
||||
#include "input.h"
|
||||
#include "Event Pump.h"
|
||||
#include "Font Control.h"
|
||||
#include "Timer Control.h"
|
||||
@@ -44,18 +42,15 @@
|
||||
#include "PopUpBox.h"
|
||||
#include "Game Clock.h"
|
||||
#include "items.h"
|
||||
#include "vobject.h"
|
||||
#include "Cursor Control.h"
|
||||
#include "text.h"
|
||||
#include "strategic.h"
|
||||
#include "strategicmap.h"
|
||||
#include "interface.h"
|
||||
#include "strategic pathing.h"
|
||||
#include "Map Screen Interface Bottom.h"
|
||||
#include "Map Screen Interface Border.h"
|
||||
#include "Map Screen Interface Map.h"
|
||||
#include "Map Screen Interface.h"
|
||||
#include "Strategic Pathing.h"
|
||||
#include "Assignments.h"
|
||||
#include "points.h"
|
||||
#include "Squads.h"
|
||||
@@ -114,7 +109,7 @@
|
||||
|
||||
#include "connect.h" //hayden
|
||||
#include "InterfaceItemImages.h"
|
||||
#include "vobject.h"
|
||||
#include <language.hpp>
|
||||
|
||||
#ifdef JA2UB
|
||||
#include "laptop.h"
|
||||
@@ -4795,9 +4790,6 @@ UINT32 MapScreenHandle(void)
|
||||
|
||||
InitPreviousPaths();
|
||||
|
||||
// HEADROCK HAM 3.6: Init coordinates for new variable-sized message window
|
||||
InitMapScreenInterfaceBottomCoords();
|
||||
|
||||
// if arrival sector is invalid, reset to A9
|
||||
if ( ( gsMercArriveSectorX < 1 ) || ( gsMercArriveSectorY < 1 ) ||
|
||||
( gsMercArriveSectorX > 16 ) || ( gsMercArriveSectorY > 16 ) )
|
||||
@@ -9065,12 +9057,8 @@ void RenderMapHighlight( INT16 sMapX, INT16 sMapY, UINT16 usLineColor, BOOLEAN f
|
||||
// clip to view region
|
||||
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + UI_MAP.GridSize.iX, sScreenY + UI_MAP.GridSize.iY - 1, usLineColor, pDestBuf );
|
||||
InvalidateRegion( sScreenX, sScreenY - 2, sScreenX + UI_MAP.GridSize.iX + 1 + 1, sScreenY + UI_MAP.GridSize.iY + 1 - 1 );
|
||||
}
|
||||
RectangleDraw( TRUE, sScreenX, sScreenY - 1, sScreenX + UI_MAP.GridSize.iX, sScreenY + UI_MAP.GridSize.iY - 1, usLineColor, pDestBuf );
|
||||
InvalidateRegion( sScreenX, sScreenY - 2, sScreenX + UI_MAP.GridSize.iX + 1 + 1, sScreenY + UI_MAP.GridSize.iY + 1 - 1 );
|
||||
|
||||
RestoreClipRegionToFullScreenForRectangle( uiDestPitchBYTES );
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
@@ -9673,27 +9661,27 @@ void BltCharInvPanel()
|
||||
// print armor/weight/camo labels
|
||||
mprintf(UI_CHARINV.Text.ArmorLabel.iX, UI_CHARINV.Text.ArmorLabel.iY, pInvPanelTitleStrings[ 0 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
mprintf(UI_CHARINV.Text.ArmorPercent.iX, UI_CHARINV.Text.ArmorPercent.iY, L"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
mprintf(UI_CHARINV.Text.WeightLabel.iX, UI_CHARINV.Text.WeightLabel.iY, pInvPanelTitleStrings[ 1 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
mprintf(UI_CHARINV.Text.WeightPercent.iX, UI_CHARINV.Text.WeightPercent.iY, L"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
mprintf(UI_CHARINV.Text.CamoLabel.iX, UI_CHARINV.Text.CamoLabel.iY, pInvPanelTitleStrings[ 2 ] );
|
||||
|
||||
#ifdef CHINESE
|
||||
if( g_lang == i18n::Lang::zh ) {
|
||||
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, ChineseSpecString1 );
|
||||
#else
|
||||
} else {
|
||||
mprintf(UI_CHARINV.Text.CamoPercent.iX, UI_CHARINV.Text.CamoPercent.iY, L"%%" );
|
||||
#endif
|
||||
}
|
||||
|
||||
const auto width = UI_CHARINV.Text.PercentWidth;
|
||||
const auto height = UI_CHARINV.Text.PercentHeight;
|
||||
|
||||
@@ -33,4 +33,4 @@ void HandleSpreadOfTownsOpinionForCurrentMercs( void );
|
||||
void HandleSpreadOfTownOpinionForMercForSoldier( SOLDIERTYPE *pSoldier );
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -65,4 +65,4 @@ void HandleSoldierDeadComments( SOLDIERTYPE *pSoldier );
|
||||
|
||||
BOOLEAN HandleStrategicDeath( SOLDIERTYPE *pSoldier );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+12
-13
@@ -6671,18 +6671,16 @@ BOOLEAN CheckAndHandleUnloadingOfCurrentWorld( )
|
||||
|
||||
if ( guiCurrentScreen == AUTORESOLVE_SCREEN )
|
||||
{
|
||||
if ( gWorldSectorX == sBattleSectorX && gWorldSectorY == sBattleSectorY && gbWorldSectorZ == sBattleSectorZ )
|
||||
{ //Yes, this is and looks like a hack. The conditions of this if statement doesn't work inside
|
||||
//TrashWorld() or more specifically, TacticalRemoveSoldier() from within TrashWorld(). Because
|
||||
//we are in the autoresolve screen, soldiers are internally created different (from pointers instead of
|
||||
//the MercPtrs[]). It keys on the fact that we are in the autoresolve screen. So, by switching the
|
||||
//screen, it'll delete the soldiers in the loaded world properly, then later on, once autoresolve is
|
||||
//complete, it'll delete the autoresolve soldiers properly. As you can now see, the above if conditions
|
||||
//don't change throughout this whole process which makes it necessary to do it this way.
|
||||
guiCurrentScreen = MAP_SCREEN;
|
||||
TrashWorld( );
|
||||
guiCurrentScreen = AUTORESOLVE_SCREEN;
|
||||
}
|
||||
//Yes, this is and looks like a hack. The conditions of this if statement doesn't work inside
|
||||
//TrashWorld() or more specifically, TacticalRemoveSoldier() from within TrashWorld(). Because
|
||||
//we are in the autoresolve screen, soldiers are internally created different (from pointers instead of
|
||||
//the MercPtrs[]). It keys on the fact that we are in the autoresolve screen. So, by switching the
|
||||
//screen, it'll delete the soldiers in the loaded world properly, then later on, once autoresolve is
|
||||
//complete, it'll delete the autoresolve soldiers properly. As you can now see, the above if conditions
|
||||
//don't change throughout this whole process which makes it necessary to do it this way.
|
||||
guiCurrentScreen = MAP_SCREEN;
|
||||
TrashWorld( );
|
||||
guiCurrentScreen = AUTORESOLVE_SCREEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7786,6 +7784,7 @@ void HandleMovingEnemiesCloseToEntranceInSecondTunnelMap( )
|
||||
|
||||
void HandlePowerGenFanSoundModification( )
|
||||
{
|
||||
extern UINT32 POWERGENSECTOREXITGRID_SRC_GRIDNO;
|
||||
SetTileAnimCounter( TILE_ANIM__FAST_SPEED );
|
||||
|
||||
switch ( gJa25SaveStruct.ubStateOfFanInPowerGenSector )
|
||||
@@ -7794,7 +7793,7 @@ void HandlePowerGenFanSoundModification( )
|
||||
HandleAddingPowerGenFanSound( );
|
||||
|
||||
//MAKE SURE the fan does not have an exit grid
|
||||
RemoveExitGridFromWorld( PGF__FAN_EXIT_GRID_GRIDNO );
|
||||
RemoveExitGridFromWorld( POWERGENSECTOREXITGRID_SRC_GRIDNO );
|
||||
break;
|
||||
|
||||
case PGF__STOPPED:
|
||||
|
||||
Reference in New Issue
Block a user