- New feature: sector fortification allows to construct structures in sectors in a much easier way than by using amerc to build 'by hand'. Fortification nodes are in a subfolder in Profiles and can easily be altered and exchanged, even in an ongoing game.

Fully savegame compatible.
GameDir >= r2296 is recommended, but not required.
- Cleaned up cover display functions.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8094 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2016-03-06 12:44:57 +00:00
parent 7e7476a4ea
commit 12ae810316
36 changed files with 5175 additions and 3307 deletions
+1 -1
View File
@@ -1117,7 +1117,7 @@ UINT32 ProcessFileIO()
//ATE: Any current mercs are transfered here... //ATE: Any current mercs are transfered here...
//UpdateMercsInSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ ); //UpdateMercsInSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
AddSoldierInitListTeamToWorld( ENEMY_TEAM, TOTAL_SOLDIERS + 1 ); AddSoldierInitListTeamToWorld( ENEMY_TEAM, TOTAL_SOLDIERS + 1 );
AddSoldierInitListTeamToWorld( CREATURE_TEAM, TOTAL_SOLDIERS + 1 ); AddSoldierInitListTeamToWorld( CREATURE_TEAM, TOTAL_SOLDIERS + 1 );
AddSoldierInitListTeamToWorld( MILITIA_TEAM, TOTAL_SOLDIERS + 1 ); AddSoldierInitListTeamToWorld( MILITIA_TEAM, TOTAL_SOLDIERS + 1 );
+8 -8
View File
@@ -15,9 +15,9 @@
#ifdef JA2EDITOR #ifdef JA2EDITOR
#ifdef JA2UB #ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8094 (Development Build)" };
#else #else
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8094 (Development Build)" };
#endif #endif
// ------------------------------ // ------------------------------
@@ -27,11 +27,11 @@
//DEBUG BUILD VERSION //DEBUG BUILD VERSION
#ifdef JA2UB #ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8094 (Development Build)" };
#elif defined (JA113DEMO) #elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8094 (Development Build)" };
#else #else
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8094 (Development Build)" };
#endif #endif
#elif defined CRIPPLED_VERSION #elif defined CRIPPLED_VERSION
@@ -46,11 +46,11 @@
//RELEASE BUILD VERSION //RELEASE BUILD VERSION
#ifdef JA2UB #ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8094 (Development Build)" };
#elif defined (JA113DEMO) #elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8094 (Development Build)" };
#else #else
CHAR16 zVersionLabel[256] = { L"Release v1.13.8084 (Development Build)" }; CHAR16 zVersionLabel[256] = { L"Release v1.13.8094 (Development Build)" };
#endif #endif
#endif #endif
+3 -2
View File
@@ -134,7 +134,8 @@ enum definedDropDowns
DROPDOWNNR_IMPGEAR_MAX = DROPDOWNNR_IMPGEAR_MISC_7, DROPDOWNNR_IMPGEAR_MAX = DROPDOWNNR_IMPGEAR_MISC_7,
DROPDOWNNR_MSGBOX, DROPDOWNNR_MSGBOX_1,
DROPDOWNNR_MSGBOX_2,
}; };
/* /*
@@ -205,7 +206,7 @@ public:
* Set the content of a dropdown. Each entry consists of an INT16 key, by which you can later identify which entry was selected, and a STR16 that will be displayed. * Set the content of a dropdown. Each entry consists of an INT16 key, by which you can later identify which entry was selected, and a STR16 that will be displayed.
* There can be multiple instances of the same key or name. * There can be multiple instances of the same key or name.
*/ */
void SetEntries( std::vector<std::pair<INT16, STR16> >& arEntryVec ) { mEntryVector = arEntryVec; } void SetEntries( std::vector<std::pair<INT16, STR16> >& arEntryVec ) { mEntryVector = arEntryVec; mNumDisplayedEntries = min( DROPDOWN_REGIONS, mEntryVector.size( ) ); }
/* /*
* Set help text decribing what can be selected * Set help text decribing what can be selected
+80 -9
View File
@@ -21,7 +21,8 @@
#include "text.h" #include "text.h"
#include "Text Input.h" #include "Text Input.h"
#include "overhead map.h" #include "overhead map.h"
#include "DropDown.h" #include "DropDown.h" // added by Flugente
#include "Utilities.h" // added by Flugente for FilenameForBPP(...)
#endif #endif
#define MSGBOX_DEFAULT_WIDTH 300 #define MSGBOX_DEFAULT_WIDTH 300
@@ -47,6 +48,9 @@ BOOLEAN gfInMsgBox = FALSE;
extern BOOLEAN fInMapMode; extern BOOLEAN fInMapMode;
extern BOOLEAN gfOverheadMapDirty; extern BOOLEAN gfOverheadMapDirty;
UINT32 guiMessageBoxImage = 0;
UINT16 guiMessageBoxImageIndex = 0;
//OJW - 20090208 //OJW - 20090208
CHAR16 gszMsgBoxInputString[255]; CHAR16 gszMsgBoxInputString[255];
@@ -243,9 +247,12 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
if ( usFlags & MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS ) if ( usFlags & MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS )
heightincrease = 90; heightincrease = 90;
if ( usFlags & MSG_BOX_FLAG_DROPDOWN ) if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
heightincrease = 130; heightincrease = 130;
if ( usFlags & MSG_BOX_FLAG_DROPDOWN )
heightincrease = 130;
UINT16 usMBWidth=MSGBOX_DEFAULT_WIDTH; UINT16 usMBWidth=MSGBOX_DEFAULT_WIDTH;
BOOLEAN bFixedWidth = FALSE; BOOLEAN bFixedWidth = FALSE;
// sevenfm: custom width for 16-medium-button messagebox // sevenfm: custom width for 16-medium-button messagebox
@@ -914,7 +921,8 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN ) if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
{ {
DropDownTemplate<DROPDOWNNR_MSGBOX>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 30) ); DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 35) );
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Create( (INT16)(gMsgBox.sX + 15), (INT16)(gMsgBox.sY + 66) );
} }
#if 0 #if 0
@@ -940,12 +948,58 @@ INT32 DoMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UIN
return( iId ); return( iId );
} }
// once the dropdowns in messagebox are used in more than one occasion, this obviously has to be changed...
// this has to be defined. As the MessageBoxScreenHandle() runs all time, there is nothing to do here though // this has to be defined. As the MessageBoxScreenHandle() runs all time, there is nothing to do here though
template<> void DropDownTemplate<DROPDOWNNR_MSGBOX>::SetRefresh( ) template<> void DropDownTemplate<DROPDOWNNR_MSGBOX_1>::SetRefresh()
{ {
// for now, nothing needed, update happens automatically INT16 box1key = DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).GetSelectedEntryKey( );
std::vector<std::pair<INT16, STR16> > dropdownvector_2 = GetTileSetIndexVector( box1key );
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetEntries( dropdownvector_2 );
if ( !dropdownvector_2.empty( ) )
{
BOOLEAN found = FALSE;
for ( std::vector<std::pair<INT16, STR16> >::iterator it = dropdownvector_2.begin( ); it != dropdownvector_2.end( ); ++it )
{
if ( (*it).first == guiMessageBoxImageIndex )
{
found = TRUE;
break;
}
}
if ( !found )
guiMessageBoxImageIndex = dropdownvector_2[0].first;
}
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetSelectedEntryKey( guiMessageBoxImageIndex );
if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
{
DeleteVideoObjectFromIndex( guiMessageBoxImage );
guiMessageBoxImage = 0;
VOBJECT_DESC VObjectDesc;
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
sprintf( VObjectDesc.ImageFile, "TILESETS\\%d\\%s", giCurrentTilesetID, gStructureConstruct[box1key].szTileSetName );
// even if AddVideoObject fails, continue, as we might 'repair' it while the box is open
if ( !AddVideoObject( &VObjectDesc, &guiMessageBoxImage ) )
{
sprintf( VObjectDesc.ImageFile, "TILESETS\\0\\%s", gStructureConstruct[box1key].szTileSetName );
AddVideoObject( &VObjectDesc, &guiMessageBoxImage );
}
}
} }
template<> void DropDownTemplate<DROPDOWNNR_MSGBOX_2>::SetRefresh()
{
guiMessageBoxImageIndex = DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).GetSelectedEntryKey( );
}
void MsgBoxClickCallback( MOUSE_REGION * pRegion, INT32 iReason ) void MsgBoxClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
{ {
@@ -1190,11 +1244,17 @@ UINT32 ExitMsgBox( INT8 ubExitCode )
} }
} }
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN ) if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
{ {
DropDownTemplate<DROPDOWNNR_MSGBOX>::getInstance( ).Destroy( ); DeleteVideoObjectFromIndex( guiMessageBoxImage );
} }
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
{
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Destroy( );
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Destroy( );
}
// Delete button images // Delete button images
UnloadButtonImage( gMsgBox.iButtonImages ); UnloadButtonImage( gMsgBox.iButtonImages );
@@ -1596,11 +1656,22 @@ UINT32 MessageBoxScreenHandle( )
} }
} }
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN ) if ( gMsgBox.usFlags & MSG_BOX_FLAG_IMAGE )
{ {
DropDownTemplate<DROPDOWNNR_MSGBOX>::getInstance( ).Display( ); HVOBJECT hIconHandle;
GetVideoObject( &hIconHandle, guiMessageBoxImage );
if ( hIconHandle )
BltVideoObject( FRAME_BUFFER, hIconHandle, guiMessageBoxImageIndex, gMsgBox.sX + 70, gMsgBox.sY + 90, VO_BLT_SRCTRANSPARENCY, NULL );
} }
if ( gMsgBox.usFlags & MSG_BOX_FLAG_DROPDOWN )
{
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).Display( );
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).Display( );
}
if ( gMsgBox.bHandled ) if ( gMsgBox.bHandled )
{ {
SetRenderFlags( RENDER_FLAG_FULL ); SetRenderFlags( RENDER_FLAG_FULL );
+1
View File
@@ -24,6 +24,7 @@
#define MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS 0x00008000 // Displays sixteen numbered buttons with definable labels #define MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS 0x00008000 // Displays sixteen numbered buttons with definable labels
#define MSG_BOX_FLAG_DROPDOWN 0x00010000 // Displays an aditional dropdown box #define MSG_BOX_FLAG_DROPDOWN 0x00010000 // Displays an aditional dropdown box
#define MSG_BOX_FLAG_IMAGE 0x00020000 // Displays an image
// message box return codes // message box return codes
#define MSG_BOX_RETURN_OK 1 // ENTER or on OK button #define MSG_BOX_RETURN_OK 1 // ENTER or on OK button
+5 -3
View File
@@ -5051,10 +5051,12 @@ BOOLEAN LoadSavedGame( int ubSavedGameID )
FileClose( hFile ); FileClose( hFile );
return( FALSE ); return( FALSE );
} }
#ifdef JA2BETAVERSION #ifdef JA2BETAVERSION
LoadGameFilePosition( FileGetPos( hFile ), "UnderGround Information" ); LoadGameFilePosition( FileGetPos( hFile ), "UnderGround Information" );
#endif #endif
// Flugente: at this point we need to reevaluate the fortification costs, as the fortification plan may have changed
UpdateFortificationPossibleAmount();
uiRelEndPerc += 1; uiRelEndPerc += 1;
SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Squad Info..." ); SetRelativeStartAndEndPercentage( 0, uiRelStartPerc, uiRelEndPerc, L"Squad Info..." );
+158 -1
View File
@@ -472,6 +472,9 @@ void HandleRadioScanInSector( INT16 sMapX, INT16 sMapY, INT8 bZ );
void HandleDiseaseDiagnosis(); void HandleDiseaseDiagnosis();
void HandleDiseaseSectorTreatment( ); void HandleDiseaseSectorTreatment( );
// Flugente: fortification
void HandleFortification();
// reset scan flags in all sectors // reset scan flags in all sectors
void ClearSectorScanResults(); void ClearSectorScanResults();
@@ -935,6 +938,28 @@ BOOLEAN CanCharacterTreatSectorDisease( SOLDIERTYPE *pSoldier )
return FALSE; return FALSE;
} }
BOOLEAN CanCharacterFortify( SOLDIERTYPE *pSoldier )
{
if ( pSoldier->bSectorZ )
{
UNDERGROUND_SECTORINFO *pSectorInfo;
pSectorInfo = FindUnderGroundSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
if ( pSectorInfo && pSectorInfo->dFortification_MaxPossible > pSectorInfo->dFortification_UnappliedProgress )
return TRUE;
}
else
{
SECTORINFO *pSectorInfo;
pSectorInfo = &SectorInfo[SECTOR( pSoldier->sSectorX, pSoldier->sSectorY )];
if ( pSectorInfo && pSectorInfo->dFortification_MaxPossible > pSectorInfo->dFortification_UnappliedProgress )
return TRUE;
}
return FALSE;
}
BOOLEAN IsAnythingAroundForSoldierToRepair( SOLDIERTYPE * pSoldier ) BOOLEAN IsAnythingAroundForSoldierToRepair( SOLDIERTYPE * pSoldier )
{ {
AssertNotNIL(pSoldier); AssertNotNIL(pSoldier);
@@ -2536,6 +2561,9 @@ void UpdateAssignments()
// Flugente: PMC recruits new personnel // Flugente: PMC recruits new personnel
HourlyUpdatePMC(); HourlyUpdatePMC();
// handle fortification
HandleFortification();
// check to see if anyone is done healing? // check to see if anyone is done healing?
UpdatePatientsWhoAreDoneHealing( ); UpdatePatientsWhoAreDoneHealing( );
@@ -7374,6 +7402,51 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
} }
} }
// Flugente: fortification
void HandleFortification()
{
SOLDIERTYPE* pSoldier = NULL;
UINT16 uiCnt = 0;
for ( uiCnt = 0, pSoldier = MercPtrs[uiCnt]; uiCnt <= gTacticalStatus.Team[gbPlayerNum].bLastID; ++uiCnt, ++pSoldier )
{
if ( pSoldier->bActive && !pSoldier->flags.fMercAsleep && EnoughTimeOnAssignment( pSoldier ) )
{
if ( (pSoldier->bAssignment == FORTIFICATION) && CanCharacterFortify( pSoldier ) )
{
if ( pSoldier->bSectorZ )
{
UNDERGROUND_SECTORINFO *pSectorInfo;
pSectorInfo = FindUnderGroundSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
if ( pSectorInfo )
{
pSectorInfo->dFortification_UnappliedProgress = min( pSectorInfo->dFortification_UnappliedProgress + pSoldier->GetConstructionPoints( ), pSectorInfo->dFortification_MaxPossible );
}
}
else
{
SECTORINFO *pSectorInfo;
pSectorInfo = &SectorInfo[SECTOR( pSoldier->sSectorX, pSoldier->sSectorY )];
if ( pSectorInfo )
{
pSectorInfo->dFortification_UnappliedProgress = min( pSectorInfo->dFortification_UnappliedProgress + pSoldier->GetConstructionPoints( ), pSectorInfo->dFortification_MaxPossible );
}
}
StatChange( pSoldier, STRAMT, 6, TRUE );
// if we cannot fortify any longer, this means we're finished - tell us so
if ( !CanCharacterFortify( pSoldier ) )
AssignmentDone( pSoldier, TRUE, TRUE );
}
}
}
HandleFortificationUpdate( );
}
INT16 GetTownTrainPtsForCharacter( SOLDIERTYPE *pTrainer, UINT16 *pusMaxPts ) INT16 GetTownTrainPtsForCharacter( SOLDIERTYPE *pTrainer, UINT16 *pusMaxPts )
{ {
INT16 sTotalTrainingPts = 0; INT16 sTotalTrainingPts = 0;
@@ -7593,7 +7666,7 @@ void AssignmentDone( SOLDIERTYPE *pSoldier, BOOLEAN fSayQuote, BOOLEAN fMeToo )
if ( fSayQuote ) if ( fSayQuote )
{ {
if (IS_DOCTOR( pSoldier->bAssignment ) || IS_REPAIR( pSoldier->bAssignment ) || if (IS_DOCTOR( pSoldier->bAssignment ) || IS_REPAIR( pSoldier->bAssignment ) ||
IS_PATIENT( pSoldier->bAssignment ) || (pSoldier->bAssignment == ASSIGNMENT_HOSPITAL)) IS_PATIENT( pSoldier->bAssignment ) || pSoldier->bAssignment == ASSIGNMENT_HOSPITAL || pSoldier->bAssignment == FORTIFICATION )
{ {
TacticalCharacterDialogue( pSoldier, QUOTE_ASSIGNMENT_COMPLETE ); TacticalCharacterDialogue( pSoldier, QUOTE_ASSIGNMENT_COMPLETE );
} }
@@ -9057,6 +9130,18 @@ void HandleShadingOfLinesForAssignmentMenus( void )
// shade line // shade line
ShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_SNITCH ); ShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_SNITCH );
} }
// fortify
if ( CanCharacterFortify( pSoldier ) )
{
// unshade patient line
UnShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_FORTIFY );
}
else
{
// shade patient line
ShadeStringInBox( ghAssignmentBox, ASSIGN_MENU_FORTIFY );
}
} }
} }
@@ -12502,6 +12587,42 @@ void AssignmentMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
} }
break; break;
case ASSIGN_MENU_FORTIFY:
if ( CanCharacterFortify(pSoldier) )
{
// stop showing menu
fShowAssignmentMenu = FALSE;
giAssignHighLine = -1;
pSoldier->bOldAssignment = pSoldier->bAssignment;
if ( (pSoldier->bAssignment != FORTIFICATION) )
{
SetTimeOfAssignmentChangeForMerc( pSoldier );
}
// remove from squad
if ( pSoldier->bOldAssignment == VEHICLE )
{
TakeSoldierOutOfVehicle( pSoldier );
}
RemoveCharacterFromSquads( pSoldier );
ChangeSoldiersAssignment( pSoldier, FORTIFICATION );
AssignMercToAMovementGroup( pSoldier );
MakeSoldiersTacticalAnimationReflectAssignment( pSoldier );
// set dirty flag
fTeamPanelDirty = TRUE;
fMapScreenBottomDirty = TRUE;
// set assignment for group
SetAssignmentForList( (INT8)FORTIFICATION, 0 );
}
break;
// HEADROCK HAM 3.6: New assignments for Facility operation. // HEADROCK HAM 3.6: New assignments for Facility operation.
case( ASSIGN_MENU_FACILITY ): case( ASSIGN_MENU_FACILITY ):
if ( BasicCanCharacterFacility( pSoldier ) ) if ( BasicCanCharacterFacility( pSoldier ) )
@@ -15268,6 +15389,30 @@ void SetSoldierAssignment( SOLDIERTYPE *pSoldier, INT8 bAssignment, INT32 iParam
} }
break; break;
case FORTIFICATION:
if ( CanCharacterFortify( pSoldier ) )
{
pSoldier->bOldAssignment = pSoldier->bAssignment;
// remove from squad
RemoveCharacterFromSquads( pSoldier );
// remove from any vehicle
if ( pSoldier->bOldAssignment == VEHICLE )
{
TakeSoldierOutOfVehicle( pSoldier );
}
if ( pSoldier->bAssignment != bAssignment )
{
SetTimeOfAssignmentChangeForMerc( pSoldier );
}
ChangeSoldiersAssignment( pSoldier, bAssignment );
AssignMercToAMovementGroup( pSoldier );
}
break;
case( VEHICLE ): case( VEHICLE ):
if( CanCharacterVehicle( pSoldier ) && IsThisVehicleAccessibleToSoldier( pSoldier, iParam1 ) ) if( CanCharacterVehicle( pSoldier ) && IsThisVehicleAccessibleToSoldier( pSoldier, iParam1 ) )
{ {
@@ -16558,6 +16703,10 @@ void ReEvaluateEveryonesNothingToDo()
fNothingToDo = !CanCharacterTreatSectorDisease( pSoldier ); fNothingToDo = !CanCharacterTreatSectorDisease( pSoldier );
break; break;
case FORTIFICATION:
fNothingToDo = !CanCharacterFortify( pSoldier );
break;
case VEHICLE: case VEHICLE:
default: // squads default: // squads
fNothingToDo = FALSE; fNothingToDo = FALSE;
@@ -16867,6 +17016,14 @@ void SetAssignmentForList( INT8 bAssignment, INT8 bParam )
fItWorked = TRUE; fItWorked = TRUE;
} }
break; break;
case FORTIFICATION:
if ( CanCharacterFortify( pSoldier ) )
{
pSoldier->bOldAssignment = pSoldier->bAssignment;
SetSoldierAssignment( pSoldier, FORTIFICATION, bParam, 0, 0 );
fItWorked = TRUE;
}
break;
case( SQUAD_1 ): case( SQUAD_1 ):
case( SQUAD_2 ): case( SQUAD_2 ):
case( SQUAD_3 ): case( SQUAD_3 ):
+3
View File
@@ -84,6 +84,7 @@ enum
FACILITY_DOCTOR, FACILITY_DOCTOR,
FACILITY_PATIENT, FACILITY_PATIENT,
FACILITY_REPAIR, FACILITY_REPAIR,
FORTIFICATION, // Flugente: sectors can be fortified according to external layout plans
NUM_ASSIGNMENTS, NUM_ASSIGNMENTS,
}; };
@@ -166,6 +167,8 @@ BOOLEAN CanCharacterDiagnoseDisease( SOLDIERTYPE *pSoldier );
// can this character treat diseases of the population (NOT mercs)? // can this character treat diseases of the population (NOT mercs)?
BOOLEAN CanCharacterTreatSectorDisease( SOLDIERTYPE *pSoldier ); BOOLEAN CanCharacterTreatSectorDisease( SOLDIERTYPE *pSoldier );
BOOLEAN CanCharacterFortify( SOLDIERTYPE *pSoldier );
// can this character be assigned as a repairman? // can this character be assigned as a repairman?
BOOLEAN CanCharacterRepair( SOLDIERTYPE *pCharacter ); BOOLEAN CanCharacterRepair( SOLDIERTYPE *pCharacter );
+10 -3
View File
@@ -522,10 +522,13 @@ typedef struct SECTORINFO
UINT16 usInfected; // how many people (civilians + enemy + militia) are infected in this sector? Does NOT count our mercs UINT16 usInfected; // how many people (civilians + enemy + militia) are infected in this sector? Does NOT count our mercs
FLOAT fInfectionSeverity; // mean infection rate of those infected (percentage) FLOAT fInfectionSeverity; // mean infection rate of those infected (percentage)
UINT8 usDiseaseDoctoringDelay; // AI doctoring in this sector is delayed due to player interference UINT8 usDiseaseDoctoringDelay; // AI doctoring in this sector is delayed due to player interference
UINT8 usInfectionFlag; UINT8 usInfectionFlag;
// Flugente: fortification
FLOAT dFortification_MaxPossible; // the amount of fortification that can still be done in this sector, given the current layout plans. Is updated every time we unload a sector
FLOAT dFortification_UnappliedProgress; // progress done via assignment work. As we cannot update unloaded sectors, update happens once sector is loaded
INT8 bPadding[ 12 ]; INT8 bPadding[ 4 ];
}SECTORINFO; }SECTORINFO;
@@ -567,7 +570,11 @@ typedef struct UNDERGROUND_SECTORINFO
UINT8 ubNumTanks; UINT8 ubNumTanks;
UINT8 ubTanksInBattle; UINT8 ubTanksInBattle;
INT8 bPadding[26]; // Flugente: fortification
FLOAT dFortification_MaxPossible; // the amount of fortification that can still be done in this sector, given the current layout plans. Is updated every time we unload a sector
FLOAT dFortification_UnappliedProgress; // progress done via assignment work. As we cannot update unloaded sectors, update happens once sector is loaded
INT8 bPadding[16];
//no padding left! //no padding left!
}UNDERGROUND_SECTORINFO; }UNDERGROUND_SECTORINFO;
+37
View File
@@ -846,6 +846,9 @@ static int l_AddVolunteers( lua_State *L );
static int l_CreateArmedCivilain( lua_State *L ); static int l_CreateArmedCivilain( lua_State *L );
static int l_BuildFortification( lua_State *L );
static int l_RemoveFortification( lua_State *L );
static int l_GetFact( lua_State *L ); static int l_GetFact( lua_State *L );
static int l_SetFact( lua_State *L ); static int l_SetFact( lua_State *L );
@@ -1703,6 +1706,9 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
lua_register( L, "AddVolunteers", l_AddVolunteers ); lua_register( L, "AddVolunteers", l_AddVolunteers );
lua_register(L, "CreateArmedCivilain", l_CreateArmedCivilain ); lua_register(L, "CreateArmedCivilain", l_CreateArmedCivilain );
lua_register( L, "BuildFortification", l_BuildFortification );
lua_register( L, "RemoveFortification", l_RemoveFortification );
lua_register(L, "GetFact", l_GetFact ); lua_register(L, "GetFact", l_GetFact );
lua_register(L, "SetFact", l_SetFact ); lua_register(L, "SetFact", l_SetFact );
@@ -2595,6 +2601,8 @@ BOOLEAN LuaHandleQuestCodeOnSector( INT16 sSectorX, INT16 sSectorY, INT8 bSector
lua_register(_LS.L(), "CheckForKingpinsMoneyMissing", l_FunctionCheckForKingpinsMoneyMissing); lua_register(_LS.L(), "CheckForKingpinsMoneyMissing", l_FunctionCheckForKingpinsMoneyMissing);
lua_register(_LS.L(), "SetProfileStrategicInsertionData", l_ProfilesStrategicInsertionData ); lua_register(_LS.L(), "SetProfileStrategicInsertionData", l_ProfilesStrategicInsertionData );
lua_register(_LS.L(), "CreateArmedCivilain", l_CreateArmedCivilain ); lua_register(_LS.L(), "CreateArmedCivilain", l_CreateArmedCivilain );
lua_register(_LS.L(), "BuildFortification", l_BuildFortification );
lua_register(_LS.L(), "RemoveFortification", l_RemoveFortification );
IniFunction( _LS.L(), TRUE ); IniFunction( _LS.L(), TRUE );
IniGlobalGameSetting( _LS.L() ); IniGlobalGameSetting( _LS.L() );
@@ -13066,6 +13074,35 @@ static int l_CreateArmedCivilain( lua_State *L )
return 0; return 0;
} }
static int l_BuildFortification( lua_State *L )
{
if ( lua_gettop( L ) )
{
INT32 sGridNo = lua_tointeger( L, 1 );
INT8 sLevel = lua_tointeger( L, 2 );
UINT8 usIndex = lua_tointeger( L, 3 );
UINT8 usStructureIndex = lua_tointeger( L, 4 );
BuildFortification( sGridNo, sLevel, usIndex, usStructureIndex );
}
return 0;
}
static int l_RemoveFortification( lua_State *L )
{
if ( lua_gettop( L ) )
{
INT32 sGridNo = lua_tointeger( L, 1 );
INT8 sLevel = lua_tointeger( L, 2 );
UINT8 usStructureIndex = lua_tointeger( L, 3 );
RemoveFortification( sGridNo, sLevel, usStructureIndex );
}
return 0;
}
static int l_GetFact( lua_State *L ) static int l_GetFact( lua_State *L )
{ {
UINT8 val = 0; UINT8 val = 0;
+1
View File
@@ -130,6 +130,7 @@ enum {
ASSIGN_MENU_SNITCH, ASSIGN_MENU_SNITCH,
ASSIGN_MENU_TRAIN, ASSIGN_MENU_TRAIN,
ASSIGN_MENU_MOVE_ITEMS, // added by Flugente ASSIGN_MENU_MOVE_ITEMS, // added by Flugente
ASSIGN_MENU_FORTIFY, // added by Flugente
ASSIGN_MENU_FACILITY, // HEAROCK HAM 3.6: Facility List menu ASSIGN_MENU_FACILITY, // HEAROCK HAM 3.6: Facility List menu
ASSIGN_MENU_CANCEL, ASSIGN_MENU_CANCEL,
MAX_ASSIGN_STRING_COUNT, MAX_ASSIGN_STRING_COUNT,
+2912 -2905
View File
File diff suppressed because it is too large Load Diff
+177 -195
View File
@@ -69,13 +69,9 @@ CoverCell gCoverViewArea[ COVER_X_CELLS ][ COVER_Y_CELLS ][ COVER_Z_CELLS ];
DWORD guiCoverNextUpdateTime = 0; DWORD guiCoverNextUpdateTime = 0;
COVER_DRAW_MODE gubDrawMode = COVER_DRAW_OFF; COVER_DRAW_MODE gubDrawMode = DRAW_MODE_OFF;
MINES_DRAW_MODE gubDrawModeMine = MINES_DRAW_OFF; // Flugente: mines display BOOLEAN gNoRedraw = FALSE;
TRAIT_DRAW_MODE gubDrawModeTrait = TRAIT_DRAW_OFF; // Flugente: mines display
TRACKER_DRAW_MODE gubDrawModeTracker = TRACKER_DRAW_OFF; // Flugente: tracker display
//******* Local Function Prototypes *********************************** //******* Local Function Prototypes ***********************************
@@ -84,8 +80,8 @@ CHAR16* GetTerrainName( const UINT8& ubTerrainType );
// anv: additional tile properties // anv: additional tile properties
CHAR16* GetDetailedTerrainName( ADDITIONAL_TILE_PROPERTIES_VALUES zGivenTileProperties ); CHAR16* GetDetailedTerrainName( ADDITIONAL_TILE_PROPERTIES_VALUES zGivenTileProperties );
void AddCoverObjectToWorld( const INT32& sGridNo, const UINT16& usGraphic, const BOOLEAN& fRoof, BOOLEAN fNightTime ); void AddCoverObjectToWorld( INT32 sGridNo, UINT16 usGraphic, BOOLEAN fRoof, BOOLEAN fNightTime );
void RemoveCoverObjectFromWorld( const INT32 sGridNo, const UINT16& usGraphic, const BOOLEAN& fRoof ); void RemoveCoverObjectFromWorld( INT32 sGridNo, UINT16 usGraphic, BOOLEAN fRoof );
void AddCoverObjectsToViewArea(); void AddCoverObjectsToViewArea();
void RemoveCoverObjectsFromViewArea(); void RemoveCoverObjectsFromViewArea();
@@ -94,6 +90,7 @@ void CalculateCover();
void CalculateMines(); void CalculateMines();
void CalculateTraitRange(); void CalculateTraitRange();
void CalculateTrackerRange(); void CalculateTrackerRange();
void CalculateFortify();
void GetGridNoForViewPort( const INT32& ubX, const INT32& ubY, INT32& sGridNo ); void GetGridNoForViewPort( const INT32& ubX, const INT32& ubY, INT32& sGridNo );
@@ -102,16 +99,7 @@ BOOLEAN GridNoOnScreenAndAround( const INT32& sGridNo, const UINT8& ubRadius=2 )
BOOLEAN IsTheRoofVisible( const INT32& sGridNo ); BOOLEAN IsTheRoofVisible( const INT32& sGridNo );
BOOLEAN HasAdjTile( const INT32& ubX, const INT32& ubY ); BOOLEAN HasAdjTile( const INT32& ubX, const INT32& ubY );
// resets the overlay modes so that everything will be reset at the NEXT display cycle TileDefines GetOverlayIndex( INT8 bOverlayType )
void ResetOverlayModes()
{
gubDrawMode = COVER_DRAW_OFF;
gubDrawModeMine = MINES_DRAW_OFF;
gubDrawModeTrait = TRAIT_DRAW_OFF;
gubDrawModeTracker = TRACKER_DRAW_OFF;
}
TileDefines GetOverlayIndex( const INT8& bOverlayType )
{ {
switch ( bOverlayType ) switch ( bOverlayType )
{ {
@@ -125,6 +113,8 @@ TileDefines GetOverlayIndex( const INT8& bOverlayType )
case MINES_LVL_4: case MINES_LVL_4:
case TRACKS_BLOOD: case TRACKS_BLOOD:
case FORTIFICATIONNODE_REMOVE:
return SPECIALTILE_COVER_1; // red return SPECIALTILE_COVER_1; // red
case MIN_COVER: case MIN_COVER:
@@ -138,6 +128,8 @@ TileDefines GetOverlayIndex( const INT8& bOverlayType )
case TRAIT_2: case TRAIT_2:
case TRACKS_VERYOLD: case TRACKS_VERYOLD:
case FORTIFICATIONNODE_ADJACENTADJUSTMENT:
return SPECIALTILE_COVER_2; // orange return SPECIALTILE_COVER_2; // orange
case MED_COVER: case MED_COVER:
@@ -151,6 +143,8 @@ TileDefines GetOverlayIndex( const INT8& bOverlayType )
case TRAIT_ALL: case TRAIT_ALL:
case TRACKS_OLD: case TRACKS_OLD:
case FORTIFICATIONNODE_NORMAL:
return SPECIALTILE_COVER_3; // yellow return SPECIALTILE_COVER_3; // yellow
case MAX_COVER: case MAX_COVER:
@@ -197,10 +191,10 @@ void SwitchToEnemyView()
void SwitchViewOff() void SwitchViewOff()
{ {
if (gubDrawMode == COVER_DRAW_OFF) if ( gubDrawMode == DRAW_MODE_OFF )
return; return;
gubDrawMode = COVER_DRAW_OFF; gubDrawMode = DRAW_MODE_OFF;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzDisplayCoverText[DC_MSG__COVER_DRAW_OFF]); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, gzDisplayCoverText[DC_MSG__COVER_DRAW_OFF]);
DisplayCover(TRUE); DisplayCover(TRUE);
} }
@@ -314,7 +308,7 @@ CHAR16* GetDetailedTerrainName( ADDITIONAL_TILE_PROPERTIES_VALUES zGivenTileProp
} }
} }
void AddCoverObjectToWorld( const INT32& sGridNo, const UINT16& usGraphic, const BOOLEAN& fRoof, BOOLEAN fNightTime ) void AddCoverObjectToWorld( INT32 sGridNo, UINT16 usGraphic, BOOLEAN fRoof, BOOLEAN fNightTime )
{ {
LEVELNODE *pNode; LEVELNODE *pNode;
@@ -338,7 +332,7 @@ void AddCoverObjectToWorld( const INT32& sGridNo, const UINT16& usGraphic, const
} }
} }
void RemoveCoverObjectFromWorld( const INT32 sGridNo, const UINT16& usGraphic, const BOOLEAN& fRoof ) void RemoveCoverObjectFromWorld( INT32 sGridNo, UINT16 usGraphic, BOOLEAN fRoof )
{ {
if( fRoof ) if( fRoof )
{ {
@@ -380,7 +374,7 @@ BOOLEAN HasAdjTile( const INT32& ubX, const INT32& ubY, const INT32& ubZ )
void AddCoverObjectsToViewArea() void AddCoverObjectsToViewArea()
{ {
if (gsMaxCellY == -1) if ( gsMaxCellY < 0 )
return; return;
register INT32 ubX, ubY, ubZ; register INT32 ubX, ubY, ubZ;
@@ -394,14 +388,9 @@ void AddCoverObjectsToViewArea()
{ {
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType; if ( gCoverViewArea[ubX][ubY][ubZ].bOverlayType != INVALID_COVER && ((gCoverViewArea[ubX][ubY][ubZ].bOverlayType != MAX_COVER && gCoverViewArea[ubX][ubY][ubZ].bOverlayType != NO_SEE) || HasAdjTile( ubX, ubY, ubZ )) )
if ( bOverlayType != INVALID_COVER && ((bOverlayType != MAX_COVER && bOverlayType != NO_SEE) || HasAdjTile( ubX, ubY, ubZ )) )
{ {
INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo; AddCoverObjectToWorld( gCoverViewArea[ubX][ubY][ubZ].sGridNo, GetOverlayIndex( gCoverViewArea[ubX][ubY][ubZ].bOverlayType ), (BOOLEAN)ubZ, fNightTime );
TileDefines tile = GetOverlayIndex( bOverlayType );
AddCoverObjectToWorld( sGridNo, tile, (BOOLEAN)ubZ, fNightTime );
fChanged = TRUE; fChanged = TRUE;
} }
} }
@@ -417,10 +406,15 @@ void AddCoverObjectsToViewArea()
void RemoveCoverObjectsFromViewArea() void RemoveCoverObjectsFromViewArea()
{ {
if (gsMaxCellY == -1) if ( gubDrawMode == DRAW_MODE_OFF && gNoRedraw )
{
return; return;
}
INT16 usTmp;
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_START_Y, &gsMinCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_END_Y, &gsMaxCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
register INT32 ubX, ubY, ubZ; register INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE; BOOLEAN fChanged = FALSE;
@@ -431,12 +425,14 @@ void RemoveCoverObjectsFromViewArea()
{ {
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo;
GetGridNoForViewPort( ubX, ubY, sGridNo );
INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType; INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType;
if ( bOverlayType != INVALID_COVER ) if ( bOverlayType != INVALID_COVER )
{ {
INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo;
TileDefines tile = GetOverlayIndex( bOverlayType ); TileDefines tile = GetOverlayIndex( bOverlayType );
RemoveCoverObjectFromWorld( sGridNo, tile, (BOOLEAN) ubZ ); RemoveCoverObjectFromWorld( sGridNo, tile, (BOOLEAN) ubZ );
bOverlayType = INVALID_COVER; bOverlayType = INVALID_COVER;
@@ -445,12 +441,14 @@ void RemoveCoverObjectsFromViewArea()
} }
} }
} }
// Re-render the scene! // Re-render the scene!
if ( fChanged ) if ( fChanged )
{ {
SetRenderFlags( RENDER_FLAG_FULL ); SetRenderFlags( RENDER_FLAG_FULL );
} }
gNoRedraw = (gubDrawMode == DRAW_MODE_OFF);
} }
// ubRadius in times of y or x cell sizes // ubRadius in times of y or x cell sizes
@@ -485,14 +483,38 @@ void DisplayCover( BOOLEAN forceUpdate )
if ( forceUpdate || ( !gfScrollPending && !gfScrollInertia && GetTickCount() > guiCoverNextUpdateTime ) ) if ( forceUpdate || ( !gfScrollPending && !gfScrollInertia && GetTickCount() > guiCoverNextUpdateTime ) )
{ {
if ( gubDrawMode != COVER_DRAW_OFF ) // remove old cover objects
RemoveCoverObjectsFromViewArea();
switch ( gubDrawMode )
{
case COVER_DRAW_MERC_VIEW:
case COVER_DRAW_ENEMY_VIEW:
CalculateCover(); CalculateCover();
else if ( gubDrawModeMine != MINES_DRAW_OFF ) break;
CalculateMines( );
else if ( gubDrawModeTrait != TRAIT_DRAW_OFF ) case MINES_DRAW_DETECT_ENEMY:
CalculateTraitRange( ); case MINES_DRAW_PLAYERTEAM_NETWORKS:
else //if ( gubDrawModeTracker != TRAIT_DRAW_OFF ) case MINES_DRAW_NETWORKCOLOURING:
CalculateTrackerRange( ); case MINES_DRAW_NET_A:
case MINES_DRAW_NET_B:
case MINES_DRAW_NET_C:
case MINES_DRAW_NET_D:
CalculateMines();
break;
case DRAW_MODE_TRAIT_RANGE:
CalculateTraitRange();
break;
case DRAW_MODE_TRACKER_SMELL:
CalculateTrackerRange();
break;
case DRAW_MODE_FORTIFY:
CalculateFortify( );
break;
}
guiCoverNextUpdateTime = GetTickCount() + gGameExternalOptions.ubCoverDisplayUpdateWait; guiCoverNextUpdateTime = GetTickCount() + gGameExternalOptions.ubCoverDisplayUpdateWait;
} }
@@ -504,26 +526,11 @@ void CalculateCover()
register INT8 ubZ; register INT8 ubZ;
SOLDIERTYPE* pSoldier; SOLDIERTYPE* pSoldier;
RemoveCoverObjectsFromViewArea();
if( gubDrawMode == COVER_DRAW_OFF )
{
return;
}
if( gusSelectedSoldier == NOBODY ) if( gusSelectedSoldier == NOBODY )
{
return; return;
}
GetSoldier( &pSoldier, gusSelectedSoldier ); GetSoldier( &pSoldier, gusSelectedSoldier );
INT16 usTmp;
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_START_Y, &gsMinCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_END_Y, &gsMaxCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX ) for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX )
{ {
for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY ) for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY )
@@ -531,8 +538,6 @@ void CalculateCover()
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo; INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo;
GetGridNoForViewPort( ubX, ubY, sGridNo );
if( !GridNoOnScreenAndAround( sGridNo, 2 ) ) if( !GridNoOnScreenAndAround( sGridNo, 2 ) )
continue; continue;
@@ -879,37 +884,37 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bOverlayType,
///BEGIN key binding functions ///BEGIN key binding functions
void SwitchToTrapNetworkView() void SwitchToTrapNetworkView()
{ {
if (gubDrawModeMine == MINES_DRAW_PLAYERTEAM_NETWORKS) if ( gubDrawMode == MINES_DRAW_PLAYERTEAM_NETWORKS )
return; return;
gubDrawModeMine = MINES_DRAW_PLAYERTEAM_NETWORKS; gubDrawMode = MINES_DRAW_PLAYERTEAM_NETWORKS;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network"); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network");
DisplayCover( TRUE ); DisplayCover( TRUE );
} }
void SwitchToHostileTrapsView() void SwitchToHostileTrapsView()
{ {
if (gubDrawModeMine == MINES_DRAW_DETECT_ENEMY) if ( gubDrawMode == MINES_DRAW_DETECT_ENEMY )
return; return;
gubDrawModeMine = MINES_DRAW_DETECT_ENEMY; gubDrawMode = MINES_DRAW_DETECT_ENEMY;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display nearby traps"); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display nearby traps");
DisplayCover( TRUE ); DisplayCover( TRUE );
} }
void SwitchMineViewOff() void SwitchMineViewOff()
{ {
if (gubDrawModeMine == MINES_DRAW_OFF) if ( gubDrawMode < MINES_DRAW_DETECT_ENEMY || gubDrawMode > MINES_DRAW_NET_D )
return; return;
gubDrawModeMine = MINES_DRAW_OFF; gubDrawMode = DRAW_MODE_OFF;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Turning off trap display"); ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Turning off trap display");
DisplayCover( TRUE ); DisplayCover( TRUE );
} }
void ToggleHostileTrapsView() void ToggleHostileTrapsView()
{ {
if (gubDrawModeMine == MINES_DRAW_DETECT_ENEMY) { if ( gubDrawMode == MINES_DRAW_DETECT_ENEMY ) {
SwitchMineViewOff(); SwitchMineViewOff();
} else { } else {
SwitchToHostileTrapsView(); SwitchToHostileTrapsView();
@@ -918,44 +923,41 @@ void ToggleHostileTrapsView()
void ToggleTrapNetworkView() void ToggleTrapNetworkView()
{ {
SwitchMinesDrawModeForNetworks(); switch ( gubDrawMode )
}
void SwitchMinesDrawModeForNetworks()
{
switch ( gubDrawModeMine )
{ {
case MINES_DRAW_OFF: case MINES_DRAW_DETECT_ENEMY:
case MINES_DRAW_DETECT_ENEMY: gubDrawMode = MINES_DRAW_PLAYERTEAM_NETWORKS;
gubDrawModeMine = MINES_DRAW_PLAYERTEAM_NETWORKS; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network"); break;
break; case MINES_DRAW_PLAYERTEAM_NETWORKS:
case MINES_DRAW_PLAYERTEAM_NETWORKS: gubDrawMode = MINES_DRAW_NETWORKCOLOURING;
gubDrawModeMine = MINES_DRAW_NETWORKCOLOURING; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network colouring" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network colouring"); break;
break; case MINES_DRAW_NETWORKCOLOURING:
case MINES_DRAW_NETWORKCOLOURING: gubDrawMode = MINES_DRAW_NET_A;
gubDrawModeMine = MINES_DRAW_NET_A; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network A" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network A"); break;
break; case MINES_DRAW_NET_A:
case MINES_DRAW_NET_A: gubDrawMode = MINES_DRAW_NET_B;
gubDrawModeMine = MINES_DRAW_NET_B; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network B" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network B"); break;
break; case MINES_DRAW_NET_B:
case MINES_DRAW_NET_B: gubDrawMode = MINES_DRAW_NET_C;
gubDrawModeMine = MINES_DRAW_NET_C; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network C" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network C"); break;
break; case MINES_DRAW_NET_C:
case MINES_DRAW_NET_C: gubDrawMode = MINES_DRAW_NET_D;
gubDrawModeMine = MINES_DRAW_NET_D; ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network D" );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trap network D"); break;
break; case MINES_DRAW_NET_D:
case MINES_DRAW_NET_D: gubDrawMode = DRAW_MODE_OFF;
case MINES_DRAW_MAX: ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Turning off trap display" );
default: break;
gubDrawModeMine = MINES_DRAW_OFF;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Turning off trap display"); default:
break; gubDrawMode = MINES_DRAW_DETECT_ENEMY;
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display enemy traps" );
break;
} }
DisplayCover( TRUE ); DisplayCover( TRUE );
@@ -964,7 +966,7 @@ void SwitchMinesDrawModeForNetworks()
void AddMinesObjectsToViewArea() void AddMinesObjectsToViewArea()
{ {
if (gsMaxCellY == -1) if ( gsMaxCellY < 0 )
return; return;
register INT32 ubX, ubY, ubZ; register INT32 ubX, ubY, ubZ;
@@ -974,7 +976,7 @@ void AddMinesObjectsToViewArea()
BOOLEAN fSearchAdjTile = TRUE; BOOLEAN fSearchAdjTile = TRUE;
// no search for adjacent tiles when looking at a specific network (we have only 4 colours, need them all :-) // no search for adjacent tiles when looking at a specific network (we have only 4 colours, need them all :-)
if ( gubDrawModeMine == MINES_DRAW_NETWORKCOLOURING || gubDrawModeMine == MINES_DRAW_NET_A || gubDrawModeMine == MINES_DRAW_NET_B || gubDrawModeMine == MINES_DRAW_NET_C || gubDrawModeMine == MINES_DRAW_NET_D ) if ( gubDrawMode == MINES_DRAW_NETWORKCOLOURING || gubDrawMode == MINES_DRAW_NET_A || gubDrawMode == MINES_DRAW_NET_B || gubDrawMode == MINES_DRAW_NET_C || gubDrawMode == MINES_DRAW_NET_D )
fSearchAdjTile = FALSE; fSearchAdjTile = FALSE;
for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX ) for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX )
@@ -983,16 +985,11 @@ void AddMinesObjectsToViewArea()
{ {
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType; if ( gCoverViewArea[ubX][ubY][ubZ].bOverlayType != INVALID_COVER && (gCoverViewArea[ubX][ubY][ubZ].bOverlayType != MAX_MINES || (fSearchAdjTile && HasAdjTile( ubX, ubY, ubZ ))) )
if ( bOverlayType != INVALID_COVER && (bOverlayType != MAX_MINES || (fSearchAdjTile && HasAdjTile( ubX, ubY, ubZ ))) )
{ {
INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo; if ( !TileIsOutOfBounds( gCoverViewArea[ubX][ubY][ubZ].sGridNo ) )
if ( !TileIsOutOfBounds( sGridNo ) )
{ {
TileDefines tile = GetOverlayIndex( bOverlayType ); AddCoverObjectToWorld( gCoverViewArea[ubX][ubY][ubZ].sGridNo, GetOverlayIndex( gCoverViewArea[ubX][ubY][ubZ].bOverlayType ), (BOOLEAN)ubZ, fNightTime );
AddCoverObjectToWorld( sGridNo, tile, (BOOLEAN)ubZ, fNightTime );
fChanged = TRUE; fChanged = TRUE;
} }
} }
@@ -1012,41 +1009,23 @@ void CalculateMines()
INT32 ubX, ubY; INT32 ubX, ubY;
INT8 ubZ; INT8 ubZ;
SOLDIERTYPE* pSoldier; SOLDIERTYPE* pSoldier;
RemoveCoverObjectsFromViewArea( );
if( gubDrawModeMine == MINES_DRAW_OFF )
{
return;
}
if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector ) if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector )
return; return;
// if we want to detect hostile mines and we have an metal detector in our hands, allow seeking // if we want to detect hostile mines and we have an metal detector in our hands, allow seeking
BOOLEAN fWithMineDetector = FALSE; BOOLEAN fWithMineDetector = FALSE;
if ( pSoldier && gubDrawModeMine == MINES_DRAW_DETECT_ENEMY ) if ( pSoldier && gubDrawMode == MINES_DRAW_DETECT_ENEMY )
{ {
if ( FindMetalDetectorInHand(pSoldier) != NO_SLOT ) if ( FindMetalDetectorInHand(pSoldier) != NO_SLOT )
fWithMineDetector = TRUE; fWithMineDetector = TRUE;
// if we are looking for mines via mine detector, but don't have one equipped, return, we won't detect anything
// TODO: perhaps even consume batteries one day... else
} return;
// if we are looking for mines via mine detector, but don't have one equipped, return, we won't detect anything
if ( gubDrawModeMine == MINES_DRAW_DETECT_ENEMY && !fWithMineDetector )
{
return;
} }
const INT32& sSelectedSoldierGridNo = MercPtrs[ gusSelectedSoldier ]->sGridNo; const INT32& sSelectedSoldierGridNo = MercPtrs[ gusSelectedSoldier ]->sGridNo;
INT16 usTmp;
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_START_Y, &gsMinCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_END_Y, &gsMaxCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX ) for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX )
{ {
for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY ) for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY )
@@ -1054,8 +1033,6 @@ void CalculateMines()
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo; INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo;
GetGridNoForViewPort( ubX, ubY, sGridNo );
if( !GridNoOnScreenAndAround( sGridNo, 2 ) ) if( !GridNoOnScreenAndAround( sGridNo, 2 ) )
continue; continue;
@@ -1074,7 +1051,7 @@ void CalculateMines()
} }
// if we are looking for hostile mines, but the tile is out of our' detectors range, skip looking for mines // if we are looking for hostile mines, but the tile is out of our' detectors range, skip looking for mines
if ( gubDrawModeMine == MINES_DRAW_DETECT_ENEMY && fWithMineDetector ) if ( gubDrawMode == MINES_DRAW_DETECT_ENEMY && fWithMineDetector )
{ {
if ( PythSpacesAway(sSelectedSoldierGridNo, sGridNo) > 4 ) if ( PythSpacesAway(sSelectedSoldierGridNo, sGridNo) > 4 )
continue; continue;
@@ -1108,7 +1085,7 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bOverlayType,
{ {
// we are looking for hostile mines and have got an detector equipped // we are looking for hostile mines and have got an detector equipped
// some bombs cannot be found via metal detector // some bombs cannot be found via metal detector
if ( gubDrawModeMine == MINES_DRAW_DETECT_ENEMY && fWithMineDetector && !( HasItemFlag(pObj->usItem, NO_METAL_DETECTION) || HasItemFlag((*pObj)[0]->data.misc.usBombItem, NO_METAL_DETECTION) ) ) if ( gubDrawMode == MINES_DRAW_DETECT_ENEMY && fWithMineDetector && !(HasItemFlag( pObj->usItem, NO_METAL_DETECTION ) || HasItemFlag( (*pObj)[0]->data.misc.usBombItem, NO_METAL_DETECTION )) )
{ {
// display all mines // display all mines
bOverlayType = MINE_BOMB; bOverlayType = MINE_BOMB;
@@ -1118,7 +1095,7 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bOverlayType,
// look for mines from our own team // look for mines from our own team
if ( (*pObj)[0]->data.misc.ubBombOwner > 1 ) if ( (*pObj)[0]->data.misc.ubBombOwner > 1 )
{ {
switch ( gubDrawModeMine ) switch ( gubDrawMode )
{ {
case MINES_DRAW_PLAYERTEAM_NETWORKS: case MINES_DRAW_PLAYERTEAM_NETWORKS:
{ {
@@ -1193,7 +1170,7 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bOverlayType,
if ( Item[pObj->usItem].tripwire == 1 ) if ( Item[pObj->usItem].tripwire == 1 )
{ {
UINT32 specificnet = 0; UINT32 specificnet = 0;
switch ( gubDrawModeMine ) switch ( gubDrawMode )
{ {
case MINES_DRAW_NET_A: specificnet = TRIPWIRE_NETWORK_NET_1; break; case MINES_DRAW_NET_A: specificnet = TRIPWIRE_NETWORK_NET_1; break;
case MINES_DRAW_NET_B: specificnet = TRIPWIRE_NETWORK_NET_2; break; case MINES_DRAW_NET_B: specificnet = TRIPWIRE_NETWORK_NET_2; break;
@@ -1222,7 +1199,6 @@ void DetermineMineDisplayInTile( INT32 sGridNo, INT8 bLevel, INT8& bOverlayType,
break; break;
case MINES_DRAW_DETECT_ENEMY: case MINES_DRAW_DETECT_ENEMY:
case MINES_DRAW_MAX:
default: default:
break; break;
} }
@@ -1247,20 +1223,16 @@ INT32 sTraitgridNo = NOWHERE;
void ToggleTraitRangeView(BOOLEAN fOn) void ToggleTraitRangeView(BOOLEAN fOn)
{ {
if ( fOn ) if ( fOn )
{ {
gubDrawModeTrait = TRAIT_DRAW_RANGE; gubDrawMode = DRAW_MODE_TRAIT_RANGE;
gubDrawMode = COVER_DRAW_OFF;
gubDrawModeMine = MINES_DRAW_OFF;
gubDrawModeTracker = TRACKER_DRAW_OFF;
} }
else else
{ {
gubDrawModeTrait = TRAIT_DRAW_OFF; gubDrawMode = DRAW_MODE_OFF;
SetTraitToDisplay( NO_SKILLTRAIT_NT ); SetTraitToDisplay( NO_SKILLTRAIT_NT );
SetGridNoForTraitDisplay( NOWHERE ); SetGridNoForTraitDisplay( NOWHERE );
} }
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Display trait ranges");
DisplayCover( TRUE ); DisplayCover( TRUE );
} }
@@ -1280,12 +1252,7 @@ void CalculateTraitRange()
INT32 ubX, ubY; INT32 ubX, ubY;
INT8 ubZ; INT8 ubZ;
SOLDIERTYPE* pSoldier; SOLDIERTYPE* pSoldier;
RemoveCoverObjectsFromViewArea( );
if ( gubDrawModeTrait == TRAIT_DRAW_OFF )
return;
if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector ) if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector )
return; return;
@@ -1313,12 +1280,6 @@ void CalculateTraitRange()
const INT32& sSelectedSoldierGridNo = MercPtrs[ gusSelectedSoldier ]->sGridNo; const INT32& sSelectedSoldierGridNo = MercPtrs[ gusSelectedSoldier ]->sGridNo;
INT16 usTmp;
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_START_Y, &gsMinCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_END_Y, &gsMaxCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX ) for ( ubX=gsMinCellX; ubX<=gsMaxCellX; ++ubX )
{ {
for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY ) for ( ubY=gsMinCellY; ubY<=gsMaxCellY; ++ubY )
@@ -1327,8 +1288,6 @@ void CalculateTraitRange()
{ {
INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo; INT32& sGridNo = gCoverViewArea[ ubX ][ ubY ][ ubZ ].sGridNo;
GetGridNoForViewPort( ubX, ubY, sGridNo );
if( !GridNoOnScreenAndAround( sGridNo, 2 ) ) if( !GridNoOnScreenAndAround( sGridNo, 2 ) )
continue; continue;
@@ -1366,7 +1325,7 @@ void CalculateTraitRange()
void AddTraitObjectsToViewArea() void AddTraitObjectsToViewArea()
{ {
if (gsMaxCellY == -1) if ( gsMaxCellY < 0 )
return; return;
register INT32 ubX, ubY, ubZ; register INT32 ubX, ubY, ubZ;
@@ -1380,13 +1339,9 @@ void AddTraitObjectsToViewArea()
{ {
for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ=0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType; if ( gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRAIT_1 || gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRAIT_2 )
if ( bOverlayType == TRAIT_1 || bOverlayType == TRAIT_2 )
{ {
INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo; AddCoverObjectToWorld( gCoverViewArea[ubX][ubY][ubZ].sGridNo, GetOverlayIndex( gCoverViewArea[ubX][ubY][ubZ].bOverlayType ), (BOOLEAN)ubZ, fNightTime );
TileDefines tile = GetOverlayIndex( bOverlayType );
AddCoverObjectToWorld( sGridNo, tile, (BOOLEAN)ubZ, fNightTime );
fChanged = TRUE; fChanged = TRUE;
} }
} }
@@ -1450,12 +1405,7 @@ void CalculateTrackerRange( )
INT32 ubX, ubY; INT32 ubX, ubY;
INT8 ubZ; INT8 ubZ;
SOLDIERTYPE* pSoldier; SOLDIERTYPE* pSoldier;
RemoveCoverObjectsFromViewArea( );
if ( gubDrawModeTracker == TRACKER_DRAW_OFF )
return;
if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector ) if ( gusSelectedSoldier == NOBODY || !GetSoldier( &pSoldier, gusSelectedSoldier ) || !pSoldier->bInSector )
return; return;
@@ -1467,13 +1417,7 @@ void CalculateTrackerRange( )
UINT16 range = gSkillTraitValues.usSVTrackerMaxRange * trackerskill; UINT16 range = gSkillTraitValues.usSVTrackerMaxRange * trackerskill;
const INT32& sSelectedSoldierGridNo = MercPtrs[gusSelectedSoldier]->sGridNo; const INT32& sSelectedSoldierGridNo = MercPtrs[gusSelectedSoldier]->sGridNo;
INT16 usTmp;
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_START_Y, &gsMinCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_END_Y, &gsMaxCellX, &usTmp );
GetScreenXYWorldCell( gsVIEWPORT_END_X, gsVIEWPORT_START_Y, &usTmp, &gsMinCellY );
GetScreenXYWorldCell( gsVIEWPORT_START_X, gsVIEWPORT_END_Y, &usTmp, &gsMaxCellY );
for ( ubX = gsMinCellX; ubX <= gsMaxCellX; ++ubX ) for ( ubX = gsMinCellX; ubX <= gsMaxCellX; ++ubX )
{ {
for ( ubY = gsMinCellY; ubY <= gsMaxCellY; ++ubY ) for ( ubY = gsMinCellY; ubY <= gsMaxCellY; ++ubY )
@@ -1482,8 +1426,6 @@ void CalculateTrackerRange( )
{ {
INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo; INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo;
GetGridNoForViewPort( ubX, ubY, sGridNo );
if ( !GridNoOnScreenAndAround( sGridNo, 2 ) ) if ( !GridNoOnScreenAndAround( sGridNo, 2 ) )
continue; continue;
@@ -1537,7 +1479,7 @@ void CalculateTrackerRange( )
void AddTrackerObjectsToViewArea( ) void AddTrackerObjectsToViewArea( )
{ {
if ( gsMaxCellY == -1 ) if ( gsMaxCellY < 0 )
return; return;
register INT32 ubX, ubY, ubZ; register INT32 ubX, ubY, ubZ;
@@ -1551,13 +1493,9 @@ void AddTrackerObjectsToViewArea( )
{ {
for ( ubZ = 0; ubZ<COVER_Z_CELLS; ++ubZ ) for ( ubZ = 0; ubZ<COVER_Z_CELLS; ++ubZ )
{ {
INT8& bOverlayType = gCoverViewArea[ubX][ubY][ubZ].bOverlayType; if ( gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRACKS_VERYOLD || gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRACKS_OLD || gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRACKS_RECENT || gCoverViewArea[ubX][ubY][ubZ].bOverlayType == TRACKS_BLOOD )
if ( bOverlayType == TRACKS_VERYOLD || bOverlayType == TRACKS_OLD || bOverlayType == TRACKS_RECENT || bOverlayType == TRACKS_BLOOD )
{ {
INT32& sGridNo = gCoverViewArea[ubX][ubY][ubZ].sGridNo; AddCoverObjectToWorld( gCoverViewArea[ubX][ubY][ubZ].sGridNo, GetOverlayIndex( gCoverViewArea[ubX][ubY][ubZ].bOverlayType ), (BOOLEAN)ubZ, fNightTime );
TileDefines tile = GetOverlayIndex( bOverlayType );
AddCoverObjectToWorld( sGridNo, tile, (BOOLEAN)ubZ, fNightTime );
fChanged = TRUE; fChanged = TRUE;
} }
} }
@@ -1600,3 +1538,47 @@ BOOLEAN TrackerTileHasAdjTile( const INT32& ubX, const INT32& ubY, const INT32&
return FALSE; return FALSE;
} }
void CalculateFortify( )
{
// simply get all fortified gridnos and colour them
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > vec = GetAllForticationGridNo( );
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > >::iterator itend = vec.end( );
for ( std::vector< std::pair<INT16, std::pair<UINT8, INT8> > >::iterator it = vec.begin( ); it != itend; ++it )
{
INT16 sX, sY;
ConvertGridNoToXY( (*it).first, &sX, &sY );
gCoverViewArea[sX][sY][(*it).second.second].bOverlayType = (*it).second.first;
}
if ( gsMaxCellY < 0 )
return;
register INT32 ubX, ubY, ubZ;
BOOLEAN fChanged = FALSE;
BOOLEAN fNightTime = NightTime( );
for ( ubX = gsMinCellX; ubX <= gsMaxCellX; ++ubX )
{
for ( ubY = gsMinCellY; ubY <= gsMaxCellY; ++ubY )
{
for ( ubZ = 0; ubZ<COVER_Z_CELLS; ++ubZ )
{
if ( gCoverViewArea[ubX][ubY][ubZ].bOverlayType != INVALID_COVER )
{
AddCoverObjectToWorld( gCoverViewArea[ubX][ubY][ubZ].sGridNo, GetOverlayIndex( gCoverViewArea[ubX][ubY][ubZ].bOverlayType ), (BOOLEAN)ubZ, fNightTime );
fChanged = TRUE;
}
}
}
}
// Re-render the scene!
if ( fChanged )
{
SetRenderFlags( RENDER_FLAG_FULL );
}
}
+22 -38
View File
@@ -1,9 +1,6 @@
#ifndef _DISPLAY_COVER__H_ #ifndef _DISPLAY_COVER__H_
#define _DISPLAY_COVER__H_ #define _DISPLAY_COVER__H_
// resets the overlay modes so that everything will be reset at the NEXT display cycle
void ResetOverlayModes();
void DisplayRangeToTarget( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo ); void DisplayRangeToTarget( SOLDIERTYPE *pSoldier, INT32 sTargetGridNo );
void DisplayCover( BOOLEAN forceUpdate = FALSE); void DisplayCover( BOOLEAN forceUpdate = FALSE);
@@ -56,12 +53,32 @@ enum OVERLAY_VALUES
TRACKS_RECENT, TRACKS_RECENT,
TRACKS_BLOOD, TRACKS_BLOOD,
MAX_TRACKS, MAX_TRACKS,
FORTIFICATIONNODE_REMOVE,
FORTIFICATIONNODE_ADJACENTADJUSTMENT,
FORTIFICATIONNODE_NORMAL,
MAX_FORTIFICATION,
}; };
enum COVER_DRAW_MODE { enum COVER_DRAW_MODE {
COVER_DRAW_OFF, DRAW_MODE_OFF,
COVER_DRAW_MERC_VIEW, COVER_DRAW_MERC_VIEW,
COVER_DRAW_ENEMY_VIEW COVER_DRAW_ENEMY_VIEW,
MINES_DRAW_DETECT_ENEMY,
MINES_DRAW_PLAYERTEAM_NETWORKS,
MINES_DRAW_NETWORKCOLOURING,
MINES_DRAW_NET_A,
MINES_DRAW_NET_B,
MINES_DRAW_NET_C,
MINES_DRAW_NET_D,
DRAW_MODE_TRAIT_RANGE,
DRAW_MODE_TRACKER_SMELL,
DRAW_MODE_FORTIFY,
}; };
void ChangeSizeOfDisplayCover( INT32 iNewSize ); void ChangeSizeOfDisplayCover( INT32 iNewSize );
@@ -74,19 +91,6 @@ INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTa
// ----------------------------- Mines display after this ---------------------------------------- // ----------------------------- Mines display after this ----------------------------------------
// added by Flugente: display of mine, bombs and tripwire // added by Flugente: display of mine, bombs and tripwire
// Flugente: mines display - stuff needs to be here
// Sevenfm: moved here from DisplayCover.cpp
enum MINES_DRAW_MODE {
MINES_DRAW_OFF,
MINES_DRAW_DETECT_ENEMY,
MINES_DRAW_PLAYERTEAM_NETWORKS,
MINES_DRAW_NETWORKCOLOURING,
MINES_DRAW_NET_A,
MINES_DRAW_NET_B,
MINES_DRAW_NET_C,
MINES_DRAW_NET_D,
MINES_DRAW_MAX
};
void SwitchToTrapNetworkView(); void SwitchToTrapNetworkView();
void SwitchToHostileTrapsView(); void SwitchToHostileTrapsView();
@@ -95,31 +99,11 @@ void SwitchMineViewOff();
void ToggleTrapNetworkView(); void ToggleTrapNetworkView();
void ToggleHostileTrapsView(); void ToggleHostileTrapsView();
void SwitchMinesDrawModeForNetworks();
// ----------------------------- trait range display after this ---------------------------------------- // ----------------------------- trait range display after this ----------------------------------------
// added by Flugente: display of ranges and areas of effects for traits // added by Flugente: display of ranges and areas of effects for traits
// Flugente: trait draw mode
enum TRAIT_DRAW_MODE {
TRAIT_DRAW_OFF,
TRAIT_DRAW_RANGE,
TRAIT_DRAW_MAX
};
void ToggleTraitRangeView(BOOLEAN fOn = TRUE); void ToggleTraitRangeView(BOOLEAN fOn = TRUE);
void SetTraitToDisplay( UINT32 aTrait ); void SetTraitToDisplay( UINT32 aTrait );
void SetGridNoForTraitDisplay( INT32 sGridNo ); void SetGridNoForTraitDisplay( INT32 sGridNo );
// ----------------------------- tracker display after this ----------------------------------------
// added by Flugente: display of ranges and areas of effects for traits
// Flugente: trait draw mode
enum TRACKER_DRAW_MODE {
TRACKER_DRAW_OFF,
TRACKER_DRAW_SMELL,
TRACKER_DRAW_MAX
};
extern TRACKER_DRAW_MODE gubDrawModeTracker;
#endif #endif
+29
View File
@@ -41,6 +41,7 @@
#include "Campaign Types.h" #include "Campaign Types.h"
#include "Strategic Event Handler.h" #include "Strategic Event Handler.h"
#include "Food.h" // added by Flugente #include "Food.h" // added by Flugente
#include "Queen Command.h" // added by Flugente for FindUnderGroundSector(...)
#endif #endif
#ifdef JA2UB #ifdef JA2UB
@@ -2403,6 +2404,34 @@ void HandleRenderFaceAdjustments( FACETYPE *pFace, BOOLEAN fDisplayBuffer, BOOLE
sPtsAvailable = (sPtsAvailable + 5) / 10; sPtsAvailable = (sPtsAvailable + 5) / 10;
usMaximumPts = (usMaximumPts + 5) / 10; usMaximumPts = (usMaximumPts + 5) / 10;
break; break;
case FORTIFICATION:
sIconIndex_Assignment = 14;
fDoIcon_Assignment = TRUE;
sPtsAvailable = (INT16)(MercPtrs[pFace->ubSoldierID]->GetConstructionPoints( ));
fShowNumber = TRUE;
fShowMaximum = TRUE;
{
if ( MercPtrs[pFace->ubSoldierID]->bSectorZ )
{
UNDERGROUND_SECTORINFO *pSectorInfo;
pSectorInfo = FindUnderGroundSector( MercPtrs[pFace->ubSoldierID]->sSectorX, MercPtrs[pFace->ubSoldierID]->sSectorY, MercPtrs[pFace->ubSoldierID]->bSectorZ );
if ( pSectorInfo )
usMaximumPts = (INT16)(pSectorInfo->dFortification_MaxPossible);
}
else
{
SECTORINFO *pSectorInfo;
pSectorInfo = &SectorInfo[SECTOR( MercPtrs[pFace->ubSoldierID]->sSectorX, MercPtrs[pFace->ubSoldierID]->sSectorY )];
if ( pSectorInfo )
usMaximumPts = (INT16)(pSectorInfo->dFortification_MaxPossible);
}
}
break;
} }
// Check for being serviced... // Check for being serviced...
+1274 -22
View File
File diff suppressed because it is too large Load Diff
+37
View File
@@ -84,7 +84,9 @@ typedef struct {
UINT16 usDeconstructItem; // the item that has to be used to deconstruct the structure UINT16 usDeconstructItem; // the item that has to be used to deconstruct the structure
UINT16 usItemToCreate; // the item that will be created when we deconstruct a structure UINT16 usItemToCreate; // the item that will be created when we deconstruct a structure
UINT8 usCreatedItemStatus; // status of the item to create UINT8 usCreatedItemStatus; // status of the item to create
char szTileSetDisplayName[20]; // name of this structure to the player (tileset names are obscure)
char szTileSetName[20]; // name of the tileset char szTileSetName[20]; // name of the tileset
FLOAT dCreationCost; // assignment cost per structure built
std::vector<UINT8> tilevector; // structures in the tileset that we can deconstruct std::vector<UINT8> tilevector; // structures in the tileset that we can deconstruct
} STRUCTURE_DECONSTRUCT; } STRUCTURE_DECONSTRUCT;
@@ -95,7 +97,10 @@ extern STRUCTURE_DECONSTRUCT gStructureDeconstruct[STRUCTURE_DECONSTRUCT_MAX];
typedef struct { typedef struct {
UINT16 usCreationItem; // the item that will be consumed when creating the structure UINT16 usCreationItem; // the item that will be consumed when creating the structure
UINT8 usItemStatusLoss; // item will lose this number of status points UINT8 usItemStatusLoss; // item will lose this number of status points
char szTileSetDisplayName[20]; // name of this structure to the player (tileset names are obscure)
char szTileSetName[20]; // name of the tileset char szTileSetName[20]; // name of the tileset
FLOAT dCreationCost; // assignment cost per structure built
BOOLEAN fFortifyAdjacentAdjustment; // if true, try to fit adjacent fortifications
std::vector<UINT8> northtilevector; // structures in the tileset we can create while facing north std::vector<UINT8> northtilevector; // structures in the tileset we can create while facing north
std::vector<UINT8> southtilevector; // structures in the tileset we can create while facing south std::vector<UINT8> southtilevector; // structures in the tileset we can create while facing south
std::vector<UINT8> easttilevector; // structures in the tileset we can create while facing east std::vector<UINT8> easttilevector; // structures in the tileset we can create while facing east
@@ -214,6 +219,38 @@ BOOLEAN IsStructureDeconstructItem( UINT16 usItem, INT32 sGridNo, SOLDIERTYPE* p
BOOLEAN BuildFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj ); // build a structure, return true if sucessful BOOLEAN BuildFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj ); // build a structure, return true if sucessful
BOOLEAN RemoveFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj ); // remove a structure, return true if sucessful BOOLEAN RemoveFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj ); // remove a structure, return true if sucessful
// Flugente: functions for fortification
UINT8 CheckBuildFortification( INT32 sGridNo, INT8 sLevel, UINT8 usIndex, UINT32 usStructureconstructindex );
BOOLEAN BuildFortification( INT32 sGridNo, INT8 sLevel, UINT8 usIndex, UINT32 usStructureconstructindex );
BOOLEAN CanRemoveFortification( INT32 sGridNo, INT8 sLevel, UINT32 usStructureconstructindex );
BOOLEAN RemoveFortification( INT32 sGridNo, INT8 sLevel, UINT32 usStructureconstructindex );
void UpdateFortificationPossibleAmount();
void HandleFortificationUpdate();
// get a vector of all tilesets the current sector has
std::vector<std::pair<INT16, STR16> > GetCurrentSectorTileSetVector();
// get a vector of all tilesets that are allowed to be built in this sector (the above filtered by structure construct/deconstruct basically)
std::vector<std::pair<INT16, STR16> > GetCurrentSectorAllowedFortificationTileSetVector( INT32 asTileSetId );
// get all allowed indizes for a specific tileset. 'Allowed' as in: used in our structure construct entries
std::vector<std::pair<INT16, STR16> > GetTileSetIndexVector( INT16 aKey );
std::string GetNameToTileSet( UINT8 aIndex );
INT16 GetStructureConstructIndexToTileset( INT16 aTileset );
INT16 GetStructureDeConstructIndexToTileset( INT16 aTileset );
std::set<UINT8> GetStructureConstructDirectionIndizes( INT16 aEntry, BOOLEAN afNorth, BOOLEAN afEast, BOOLEAN afSouth, BOOLEAN afWest );
void AddFortificationPlanNode( INT32 sGridNo, INT8 sLevel, INT16 sFortificationStructure, UINT8 usFortificationTileLibraryIndex, BOOLEAN fAdd );
void LoadSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
void SaveSectorFortificationPlan( INT16 sSectorX, INT16 sSectorY, INT8 sSectorZ );
std::vector< std::pair<INT16, std::pair<UINT8, INT8> > > GetAllForticationGridNo( );
INT32 GetFirstObjectInSectorPosition( UINT16 ausItem );
extern ITEM_POOL *gpItemPool;//dnl ch26 210909 extern ITEM_POOL *gpItemPool;//dnl ch26 210909
#endif #endif
+1
View File
@@ -196,6 +196,7 @@ enum {
BG_DISLIKEBG, // dislike any other background that has the negative of this value set BG_DISLIKEBG, // dislike any other background that has the negative of this value set
BG_SMOKERTYPE, // 0: doesnt care about smoking 1: will consume cigarettes, dislikes non-smokers 2: will refuse to smoke, dislikes smokers BG_SMOKERTYPE, // 0: doesnt care about smoking 1: will consume cigarettes, dislikes non-smokers 2: will refuse to smoke, dislikes smokers
BG_CROUCHEDDEFENSE, // lowers enemy cth if they fire at us while we are crouched against cover in the direction the shots come from BG_CROUCHEDDEFENSE, // lowers enemy cth if they fire at us while we are crouched against cover in the direction the shots come from
BG_FORTIFY_ASSIGNMENT, // modifies effectivity of 'FORTIFICATION' assignemnt
BG_MAX, BG_MAX,
}; };
+21 -2
View File
@@ -18965,6 +18965,25 @@ BOOLEAN SOLDIERTYPE::IsCrouchedAgainstCoverFromDir( UINT8 aDirection )
} }
// Flugente: fortification
FLOAT SOLDIERTYPE::GetConstructionPoints( )
{
if ( this->stats.bLife < OKLIFE || this->flags.fMercAsleep || this->bCollapsed || (this->usSoldierFlagMask & SOLDIER_POW) )
return 0;
UINT32 val = EffectiveStrength( this, FALSE );
ReducePointsForFatigue( this, &val );
FLOAT dval = val;
dval = dval * (100 + this->GetBackgroundValue( BG_FORTIFY_ASSIGNMENT )) / 100.0f;
dval = (dval * this->stats.bLife / this->stats.bLifeMax);
return dval;
}
INT32 CheckBleeding( SOLDIERTYPE *pSoldier ) INT32 CheckBleeding( SOLDIERTYPE *pSoldier )
{ {
INT8 bBandaged; //,savedOurTurn; INT8 bBandaged; //,savedOurTurn;
@@ -22773,13 +22792,13 @@ void HandleVolunteerRecruitment( SOLDIERTYPE* pRecruiter, SOLDIERTYPE* pTarget )
} }
// several factors determine whether we can successfully recruit this guy // several factors determine whether we can successfully recruit this guy
FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0; FLOAT leadershipfactor = EffectiveLeadership( pRecruiter ) / 100.0f;
// bonus for assertive characters // bonus for assertive characters
if ( DoesMercHavePersonality( pRecruiter, CHAR_TRAIT_ASSERTIVE ) ) if ( DoesMercHavePersonality( pRecruiter, CHAR_TRAIT_ASSERTIVE ) )
leadershipfactor *= 1.05; leadershipfactor *= 1.05;
FLOAT recruitmodifier = (100 + pRecruiter->GetBackgroundValue( BG_PERC_APPROACH_RECRUIT )) / 100.0; FLOAT recruitmodifier = (100 + pRecruiter->GetBackgroundValue( BG_PERC_APPROACH_RECRUIT )) / 100.0f;
FLOAT rating = leadershipfactor * recruitmodifier * gMercProfiles[pRecruiter->ubProfile].usApproachFactor[3]; FLOAT rating = leadershipfactor * recruitmodifier * gMercProfiles[pRecruiter->ubProfile].usApproachFactor[3];
+3
View File
@@ -1914,6 +1914,9 @@ public:
// Flugente: are we crouched against cover from a specific direction? WARNING: This does not suffice to determine our cover! // Flugente: are we crouched against cover from a specific direction? WARNING: This does not suffice to determine our cover!
BOOLEAN IsCrouchedAgainstCoverFromDir( UINT8 aDirection ); BOOLEAN IsCrouchedAgainstCoverFromDir( UINT8 aDirection );
// Flugente: fortification
FLOAT GetConstructionPoints( );
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
}; // SOLDIERTYPE; }; // SOLDIERTYPE;
+146 -48
View File
@@ -121,6 +121,7 @@
#include "DisplayCover.h" // added by Sevenfm #include "DisplayCover.h" // added by Sevenfm
#include "InterfaceItemImages.h" // added by Sevenfm #include "InterfaceItemImages.h" // added by Sevenfm
#include "DynamicDialogueWidget.h" // added by Flugente for DelayBoxDestructionBy(...) #include "DynamicDialogueWidget.h" // added by Flugente for DelayBoxDestructionBy(...)
#include "Utilities.h" // added by Flugente
//forward declarations of common classes to eliminate includes //forward declarations of common classes to eliminate includes
class OBJECTTYPE; class OBJECTTYPE;
@@ -161,7 +162,6 @@ UINT32 guiUITargetSoldierId = NOBODY;
// sevenfm: for cover dialog // sevenfm: for cover dialog
extern COVER_DRAW_MODE gubDrawMode; extern COVER_DRAW_MODE gubDrawMode;
extern MINES_DRAW_MODE gubDrawModeMine;
extern MOUSE_REGION gMPanelRegion; extern MOUSE_REGION gMPanelRegion;
@@ -193,6 +193,12 @@ extern INT32 giSMStealthButton;
SOLDIERTYPE *gpExchangeSoldier1; SOLDIERTYPE *gpExchangeSoldier1;
SOLDIERTYPE *gpExchangeSoldier2; SOLDIERTYPE *gpExchangeSoldier2;
// Flugente: fortification
INT16 gCurrentFortificationStructure = -1;
UINT8 gCurrentFortificationTileLibraryIndex = 0;
extern UINT32 guiMessageBoxImage;
extern UINT16 guiMessageBoxImageIndex;
BOOLEAN ConfirmActionCancel( INT32 usMapPos, INT32 usOldMapPos ); BOOLEAN ConfirmActionCancel( INT32 usMapPos, INT32 usOldMapPos );
@@ -338,6 +344,7 @@ INT32 InvItemType( UINT16 usItem );
void HandleTacticalInventoryMenu( void ); void HandleTacticalInventoryMenu( void );
void HandleTacticalMoveItems( void ); void HandleTacticalMoveItems( void );
void TacticalInventoryMessageBoxCallBack( UINT8 ubExitValue ); void TacticalInventoryMessageBoxCallBack( UINT8 ubExitValue );
void FortificationSettingCallBack( UINT8 ubExitValue );
void HandleTacticalCoverMenu( void ); void HandleTacticalCoverMenu( void );
void TacticalCoverMessageBoxCallBack( UINT8 ubExitValue ); void TacticalCoverMessageBoxCallBack( UINT8 ubExitValue );
void ActivateCheatsMessageBoxCallBack( UINT8 ubExitValue ); void ActivateCheatsMessageBoxCallBack( UINT8 ubExitValue );
@@ -3000,9 +3007,93 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
case 'a': case 'a':
if ( fCtrl ) if ( fCtrl && fAlt )
{ {
// free to use // Flugente: fortification
// set details on how to place fortification nodes
// loop over all structure constructs, and select those entries that are possible in this map
std::vector<std::pair<INT16, STR16> > dropdownvector_1 = GetCurrentSectorAllowedFortificationTileSetVector( giCurrentTilesetID );
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).SetEntries( dropdownvector_1 );
if ( !dropdownvector_1.empty() )
{
BOOLEAN found = FALSE;
for ( std::vector<std::pair<INT16, STR16> >::iterator it = dropdownvector_1.begin( ); it != dropdownvector_1.end(); ++it )
{
if ( (*it).first == gCurrentFortificationStructure )
{
found = TRUE;
break;
}
}
if ( !found )
gCurrentFortificationStructure = dropdownvector_1[0].first;
}
DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).SetSelectedEntryKey( gCurrentFortificationStructure );
std::vector<std::pair<INT16, STR16> > dropdownvector_2 = GetTileSetIndexVector( gCurrentFortificationStructure );
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetEntries( dropdownvector_2 );
if ( !dropdownvector_2.empty( ) )
{
BOOLEAN found = FALSE;
for ( std::vector<std::pair<INT16, STR16> >::iterator it = dropdownvector_2.begin( ); it != dropdownvector_2.end( ); ++it )
{
if ( (*it).first == guiMessageBoxImageIndex )
{
found = TRUE;
break;
}
}
if ( !found )
guiMessageBoxImageIndex = dropdownvector_2[0].first;
}
DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).SetSelectedEntryKey( guiMessageBoxImageIndex );
if ( dropdownvector_1.empty( ) || dropdownvector_2.empty() )
{
CHAR16 text[100];
swprintf( text, szFortificationText[4], giCurrentTilesetID, gTilesets[giCurrentTilesetID].zName );
DoMessageBox( MSG_BOX_BASIC_STYLE, text, GAME_SCREEN, MSG_BOX_FLAG_OK, NULL, NULL );
}
else
{
CHAR16 text[100];
swprintf( text, szFortificationText[5], giCurrentTilesetID, gTilesets[giCurrentTilesetID].zName );
VOBJECT_DESC VObjectDesc;
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
sprintf( VObjectDesc.ImageFile, "TILESETS\\%d\\%s", giCurrentTilesetID, gStructureConstruct[gCurrentFortificationStructure].szTileSetName );
// even if AddVideoObject fails, we still set MSG_BOX_FLAG_IMAGE, as we might 'repair' it while the box is open
if ( !AddVideoObject( &VObjectDesc, &guiMessageBoxImage ) )
{
sprintf( VObjectDesc.ImageFile, "TILESETS\\0\\%s", gStructureConstruct[gCurrentFortificationStructure].szTileSetName );
AddVideoObject( &VObjectDesc, &guiMessageBoxImage );
}
DoMessageBox( MSG_BOX_BASIC_STYLE, text, GAME_SCREEN, (MSG_BOX_FLAG_OK | MSG_BOX_FLAG_DROPDOWN | MSG_BOX_FLAG_IMAGE), FortificationSettingCallBack, NULL );
}
}
else if ( fCtrl )
{
// Flugente: fortification
INT32 sGridNo;
//Get the gridno the cursor is at
GetMouseMapPos( &sGridNo );
// a node to add a structure
AddFortificationPlanNode( sGridNo, gsInterfaceLevel, gCurrentFortificationStructure, gCurrentFortificationTileLibraryIndex, TRUE );
} }
else if ( fAlt ) else if ( fAlt )
{ {
@@ -3047,7 +3138,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
} }
else if( fCtrl ) else if( fCtrl )
{ {
// free to use // Flugente: fortification
INT32 sGridNo;
//Get the gridno the cursor is at
GetMouseMapPos( &sGridNo );
// a node to delete a structure
AddFortificationPlanNode( sGridNo, gsInterfaceLevel, gCurrentFortificationStructure, gCurrentFortificationTileLibraryIndex, FALSE );
} }
else else
{ {
@@ -3066,7 +3164,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
break; break;
case 'c': case 'c':
if( fAlt ) if ( fAlt && fCtrl )
{
if ( CHEATER_CHEAT_LEVEL( ) )
{
ToggleCliffDebug( );
}
}
else if ( fAlt )
{ {
if ( CHEATER_CHEAT_LEVEL( ) ) if ( CHEATER_CHEAT_LEVEL( ) )
{ {
@@ -3075,14 +3180,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
} }
else if( fCtrl ) else if( fCtrl )
{ {
if ( CHEATER_CHEAT_LEVEL( ) ) HandleTacticalCoverMenu();
{
ToggleCliffDebug();
}
else
{
HandleTacticalCoverMenu();
}
} }
else else
{ {
@@ -8093,6 +8191,12 @@ void TacticalInventoryMessageBoxCallBack( UINT8 ubExitValue )
} }
} }
void FortificationSettingCallBack( UINT8 ubExitValue )
{
gCurrentFortificationStructure = (UINT8)(DropDownTemplate<DROPDOWNNR_MSGBOX_1>::getInstance( ).GetSelectedEntryKey( ));
gCurrentFortificationTileLibraryIndex = (UINT8)(DropDownTemplate<DROPDOWNNR_MSGBOX_2>::getInstance( ).GetSelectedEntryKey( ));
}
void HandleTacticalCoverMenu( void ) void HandleTacticalCoverMenu( void )
{ {
for( INT32 cnt = 0; cnt < TACTICAL_COVER_DIALOG_NUM; ++cnt) for( INT32 cnt = 0; cnt < TACTICAL_COVER_DIALOG_NUM; ++cnt)
@@ -8101,17 +8205,21 @@ void HandleTacticalCoverMenu( void )
gzUserDefinedButtonColor[cnt] = 0; gzUserDefinedButtonColor[cnt] = 0;
} }
gzUserDefinedButtonColor[0] = 0; gzUserDefinedButtonColor[0] = 0;
gzUserDefinedButtonColor[1] = FONT_MCOLOR_LTYELLOW; gzUserDefinedButtonColor[1] = (gubDrawMode != COVER_DRAW_ENEMY_VIEW) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;
gzUserDefinedButtonColor[2] = FONT_MCOLOR_LTYELLOW; gzUserDefinedButtonColor[2] = (gubDrawMode != COVER_DRAW_MERC_VIEW) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;
gzUserDefinedButtonColor[3] = 0;
gzUserDefinedButtonColor[4] = gDisplayEnemyRoles ? FONT_MCOLOR_LTGREEN : FONT_LTRED; gzUserDefinedButtonColor[4] = gDisplayEnemyRoles ? FONT_MCOLOR_LTGREEN : FONT_LTRED;
gzUserDefinedButtonColor[6] = (gubDrawModeTracker == TRACKER_DRAW_OFF) ? FONT_LTRED : FONT_MCOLOR_LTGREEN; gzUserDefinedButtonColor[5] = (gubDrawMode != DRAW_MODE_FORTIFY) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;
gzUserDefinedButtonColor[8] = FONT_ORANGE; gzUserDefinedButtonColor[6] = (gubDrawMode != DRAW_MODE_TRACKER_SMELL) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;
gzUserDefinedButtonColor[9] = FONT_ORANGE; gzUserDefinedButtonColor[7] = 0;
gzUserDefinedButtonColor[10] = FONT_ORANGE; gzUserDefinedButtonColor[8] = (gubDrawMode != MINES_DRAW_PLAYERTEAM_NETWORKS) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
gzUserDefinedButtonColor[12] = FONT_MCOLOR_LTGREEN; gzUserDefinedButtonColor[9] = (gubDrawMode != MINES_DRAW_NETWORKCOLOURING) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
gzUserDefinedButtonColor[13] = FONT_MCOLOR_LTGREEN; gzUserDefinedButtonColor[10] = (gubDrawMode != MINES_DRAW_DETECT_ENEMY) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
gzUserDefinedButtonColor[14] = FONT_MCOLOR_LTGREEN; gzUserDefinedButtonColor[11] = 0;
gzUserDefinedButtonColor[15] = FONT_MCOLOR_LTGREEN; gzUserDefinedButtonColor[12] = (gubDrawMode != MINES_DRAW_NET_A) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;
gzUserDefinedButtonColor[13] = (gubDrawMode != MINES_DRAW_NET_B) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
gzUserDefinedButtonColor[14] = (gubDrawMode != MINES_DRAW_NET_C) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
gzUserDefinedButtonColor[15] = (gubDrawMode != MINES_DRAW_NET_D) ? FONT_LTRED : FONT_MCOLOR_LTGREEN;;
DoMessageBox( MSG_BOX_BASIC_STYLE, szTacticalCoverDialogString[0], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS, TacticalCoverMessageBoxCallBack, NULL ); DoMessageBox( MSG_BOX_BASIC_STYLE, szTacticalCoverDialogString[0], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_SIXTEEN_BUTTONS, TacticalCoverMessageBoxCallBack, NULL );
} }
@@ -8121,14 +8229,12 @@ void TacticalCoverMessageBoxCallBack( UINT8 ubExitValue )
switch( ubExitValue ) switch( ubExitValue )
{ {
case 1: case 1:
ResetOverlayModes( ); gubDrawMode = DRAW_MODE_OFF;
break; break;
case 2: case 2:
ResetOverlayModes( );
gubDrawMode = COVER_DRAW_ENEMY_VIEW; gubDrawMode = COVER_DRAW_ENEMY_VIEW;
break; break;
case 3: case 3:
ResetOverlayModes( );
gubDrawMode = COVER_DRAW_MERC_VIEW; gubDrawMode = COVER_DRAW_MERC_VIEW;
break; break;
case 4: case 4:
@@ -8137,49 +8243,41 @@ void TacticalCoverMessageBoxCallBack( UINT8 ubExitValue )
gDisplayEnemyRoles = !gDisplayEnemyRoles; gDisplayEnemyRoles = !gDisplayEnemyRoles;
break; break;
case 6: case 6:
if ( gubDrawMode == DRAW_MODE_FORTIFY )
gubDrawMode = DRAW_MODE_OFF;
else
gubDrawMode = DRAW_MODE_FORTIFY;
break; break;
case 7: case 7:
if ( gubDrawModeTracker == TRACKER_DRAW_SMELL ) if ( gubDrawMode == DRAW_MODE_TRACKER_SMELL )
{ gubDrawMode = DRAW_MODE_OFF;
ResetOverlayModes( );
}
else else
{ gubDrawMode = DRAW_MODE_TRACKER_SMELL;
ResetOverlayModes( );
gubDrawModeTracker = TRACKER_DRAW_SMELL;
}
break; break;
case 8: case 8:
break; break;
case 9: case 9:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_PLAYERTEAM_NETWORKS;
gubDrawModeMine = MINES_DRAW_PLAYERTEAM_NETWORKS;
break; break;
case 10: case 10:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_NETWORKCOLOURING;
gubDrawModeMine = MINES_DRAW_NETWORKCOLOURING;
break; break;
case 11: case 11:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_DETECT_ENEMY;
gubDrawModeMine = MINES_DRAW_DETECT_ENEMY;
break; break;
case 12: case 12:
break; break;
case 13: case 13:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_NET_A;
gubDrawModeMine = MINES_DRAW_NET_A;
break; break;
case 14: case 14:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_NET_B;
gubDrawModeMine = MINES_DRAW_NET_B;
break; break;
case 15: case 15:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_NET_C;
gubDrawModeMine = MINES_DRAW_NET_C;
break; break;
case 16: case 16:
ResetOverlayModes( ); gubDrawMode = MINES_DRAW_NET_D;
gubDrawModeMine = MINES_DRAW_NET_D;
break; break;
} }
+6
View File
@@ -133,6 +133,7 @@ backgroundStartElementHandle(void *userData, const XML_Char *name, const XML_Cha
strcmp(name, "dislikebackground" ) == 0 || strcmp(name, "dislikebackground" ) == 0 ||
strcmp(name, "smoker" ) == 0 || strcmp(name, "smoker" ) == 0 ||
strcmp(name, "croucheddefense" ) == 0 || strcmp(name, "croucheddefense" ) == 0 ||
strcmp(name, "fortify_assignment" ) == 0 ||
strcmp(name, "druguse") == 0 || strcmp(name, "druguse") == 0 ||
strcmp(name, "xenophobic") == 0 || strcmp(name, "xenophobic") == 0 ||
strcmp(name, "corruptionspread") == 0 || strcmp(name, "corruptionspread") == 0 ||
@@ -567,6 +568,11 @@ backgroundEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
pData->curBackground.value[BG_CROUCHEDDEFENSE] = min( 30, max( -30, (INT16)atol( pData->szCharData ) ) ); pData->curBackground.value[BG_CROUCHEDDEFENSE] = min( 30, max( -30, (INT16)atol( pData->szCharData ) ) );
} }
else if ( strcmp( name, "fortify_assignment" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curBackground.value[BG_FORTIFY_ASSIGNMENT] = min( 200, max( -50, (INT16)atol( pData->szCharData ) ) );
}
else if(strcmp(name, "druguse") == 0) else if(strcmp(name, "druguse") == 0)
{ {
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
+31 -6
View File
@@ -51,7 +51,10 @@ structureconstructStartElementHandle(void *userData, const XML_Char *name, const
else if(pData->curElement == ELEMENT && else if(pData->curElement == ELEMENT &&
(strcmp(name, "usCreationItem") == 0 || (strcmp(name, "usCreationItem") == 0 ||
strcmp(name, "usItemStatusLoss") == 0 || strcmp(name, "usItemStatusLoss") == 0 ||
strcmp(name, "szTileSetName") == 0 || strcmp(name, "szTileSetDisplayName") == 0 ||
strcmp(name, "szTileSetName" ) == 0 ||
strcmp(name, "dCreationCost" ) == 0 ||
strcmp(name, "fFortifyAdjacentAdjustment" ) == 0 ||
strcmp(name, "northfacingtile") == 0 || strcmp(name, "northfacingtile") == 0 ||
strcmp(name, "southfacingtile" ) == 0 || strcmp(name, "southfacingtile" ) == 0 ||
strcmp(name, "eastfacingtile" ) == 0 || strcmp(name, "eastfacingtile" ) == 0 ||
@@ -107,7 +110,10 @@ structureconstructEndElementHandle(void *userData, const XML_Char *name)
// for now, copy over the content by hand // for now, copy over the content by hand
pData->curArray[structureconstructcnt].usCreationItem = pData->curFood.usCreationItem; pData->curArray[structureconstructcnt].usCreationItem = pData->curFood.usCreationItem;
pData->curArray[structureconstructcnt].usItemStatusLoss= pData->curFood.usItemStatusLoss; pData->curArray[structureconstructcnt].usItemStatusLoss= pData->curFood.usItemStatusLoss;
strncpy(pData->curArray[structureconstructcnt].szTileSetName, pData->curFood.szTileSetName, 20); strncpy( pData->curArray[structureconstructcnt].szTileSetDisplayName, pData->curFood.szTileSetDisplayName, 20 );
strncpy( pData->curArray[structureconstructcnt].szTileSetName, pData->curFood.szTileSetName, 20 );
pData->curArray[structureconstructcnt].dCreationCost = pData->curFood.dCreationCost;
pData->curArray[structureconstructcnt].fFortifyAdjacentAdjustment = pData->curFood.fFortifyAdjacentAdjustment;
pData->curArray[structureconstructcnt].northtilevector = staticnorthtilevector; pData->curArray[structureconstructcnt].northtilevector = staticnorthtilevector;
pData->curArray[structureconstructcnt].southtilevector = staticsouthtilevector; pData->curArray[structureconstructcnt].southtilevector = staticsouthtilevector;
pData->curArray[structureconstructcnt].easttilevector = staticeasttilevector; pData->curArray[structureconstructcnt].easttilevector = staticeasttilevector;
@@ -136,11 +142,27 @@ structureconstructEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
pData->curFood.usItemStatusLoss = (UINT8) atol(pData->szCharData); pData->curFood.usItemStatusLoss = (UINT8) atol(pData->szCharData);
} }
else if(strcmp(name, "szTileSetName") == 0) else if(strcmp(name, "szTileSetDisplayName") == 0)
{ {
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
strncpy(pData->curFood.szTileSetName, pData->szCharData, 20); strncpy( pData->curFood.szTileSetDisplayName, pData->szCharData, 20 );
}
else if ( strcmp( name, "szTileSetName" ) == 0 )
{
pData->curElement = ELEMENT;
strncpy( pData->curFood.szTileSetName, pData->szCharData, 20 );
}
else if ( strcmp( name, "dCreationCost" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curFood.dCreationCost = (FLOAT)atof( pData->szCharData );
}
else if ( strcmp( name, "fFortifyAdjacentAdjustment" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curFood.fFortifyAdjacentAdjustment = (BOOLEAN)atol( pData->szCharData );
} }
else if(strcmp(name, "northfacingtile") == 0) else if(strcmp(name, "northfacingtile") == 0)
{ {
@@ -251,8 +273,11 @@ BOOLEAN WriteStructureConstructStats()
FilePrintf(hFile,"\t\t<usCreationItem>%d</usCreationItem>\r\n", gStructureConstruct[cnt].usCreationItem ); FilePrintf(hFile,"\t\t<usCreationItem>%d</usCreationItem>\r\n", gStructureConstruct[cnt].usCreationItem );
FilePrintf(hFile,"\t\t<usItemStatusLoss>%d</usItemStatusLoss>\r\n", gStructureConstruct[cnt].usItemStatusLoss ); FilePrintf(hFile,"\t\t<usItemStatusLoss>%d</usItemStatusLoss>\r\n", gStructureConstruct[cnt].usItemStatusLoss );
FilePrintf(hFile,"\t\t<szTileSetName>%s</szTileSetName>\r\n", gStructureConstruct[cnt].szTileSetName ); FilePrintf(hFile,"\t\t<szTileSetDisplayName>%s</szTileSetDisplayName>\r\n", gStructureConstruct[cnt].szTileSetDisplayName );
FilePrintf(hFile,"\t\t<szTileSetName>%s</szTileSetName>\r\n", gStructureConstruct[cnt].szTileSetName );
FilePrintf(hFile,"\t\t<dCreationCost>%d</dCreationCost>\r\n", gStructureConstruct[cnt].dCreationCost );
FilePrintf(hFile,"\t\t<fFortifyAdjacentAdjustment>%d</fFortifyAdjacentAdjustment>\r\n", gStructureConstruct[cnt].fFortifyAdjacentAdjustment );
FilePrintf(hFile,"\t</STRUCTURE>\r\n"); FilePrintf(hFile,"\t</STRUCTURE>\r\n");
} }
FilePrintf(hFile,"</STRUCTURESLIST>\r\n"); FilePrintf(hFile,"</STRUCTURESLIST>\r\n");
+22 -6
View File
@@ -52,8 +52,10 @@ structuredeconstructStartElementHandle(void *userData, const XML_Char *name, con
(strcmp(name, "usDeconstructItem") == 0 || (strcmp(name, "usDeconstructItem") == 0 ||
strcmp( name, "usItemToCreate" ) == 0 || strcmp( name, "usItemToCreate" ) == 0 ||
strcmp( name, "usCreatedItemStatus" ) == 0 || strcmp( name, "usCreatedItemStatus" ) == 0 ||
strcmp(name, "szTileSetName") == 0 || strcmp( name, "szTileSetDisplayName" ) == 0 ||
strcmp(name, "allowedtile") == 0 )) strcmp( name, "szTileSetName") == 0 ||
strcmp( name, "dCreationCost" ) == 0 ||
strcmp( name, "allowedtile") == 0 ))
{ {
pData->curElement = ELEMENT_PROPERTY; pData->curElement = ELEMENT_PROPERTY;
@@ -105,9 +107,11 @@ structuredeconstructEndElementHandle(void *userData, const XML_Char *name)
pData->curArray[structuredeconstructcnt].usDeconstructItem = pData->curFood.usDeconstructItem; pData->curArray[structuredeconstructcnt].usDeconstructItem = pData->curFood.usDeconstructItem;
pData->curArray[structuredeconstructcnt].usItemToCreate= pData->curFood.usItemToCreate; pData->curArray[structuredeconstructcnt].usItemToCreate= pData->curFood.usItemToCreate;
pData->curArray[structuredeconstructcnt].usCreatedItemStatus = pData->curFood.usCreatedItemStatus; pData->curArray[structuredeconstructcnt].usCreatedItemStatus = pData->curFood.usCreatedItemStatus;
strncpy(pData->curArray[structuredeconstructcnt].szTileSetName, pData->curFood.szTileSetName, 20); strncpy( pData->curArray[structuredeconstructcnt].szTileSetDisplayName, pData->curFood.szTileSetDisplayName, 20 );
strncpy( pData->curArray[structuredeconstructcnt].szTileSetName, pData->curFood.szTileSetName, 20 );
pData->curArray[structuredeconstructcnt].dCreationCost = pData->curFood.dCreationCost;
pData->curArray[structuredeconstructcnt].tilevector = statictilevector; pData->curArray[structuredeconstructcnt].tilevector = statictilevector;
statictilevector.clear(); statictilevector.clear();
} }
@@ -128,11 +132,22 @@ structuredeconstructEndElementHandle(void *userData, const XML_Char *name)
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
pData->curFood.usCreatedItemStatus = (UINT8)atol( pData->szCharData ); pData->curFood.usCreatedItemStatus = (UINT8)atol( pData->szCharData );
} }
else if(strcmp(name, "szTileSetName") == 0) else if(strcmp(name, "szTileSetDisplayName") == 0)
{ {
pData->curElement = ELEMENT; pData->curElement = ELEMENT;
strncpy(pData->curFood.szTileSetName, pData->szCharData, 20); strncpy( pData->curFood.szTileSetDisplayName, pData->szCharData, 20 );
}
else if ( strcmp( name, "szTileSetName" ) == 0 )
{
pData->curElement = ELEMENT;
strncpy( pData->curFood.szTileSetName, pData->szCharData, 20 );
}
else if ( strcmp( name, "dCreationCost" ) == 0 )
{
pData->curElement = ELEMENT;
pData->curFood.dCreationCost = (FLOAT)atof( pData->szCharData );
} }
else if(strcmp(name, "allowedtile") == 0) else if(strcmp(name, "allowedtile") == 0)
{ {
@@ -234,6 +249,7 @@ BOOLEAN WriteStructureDeconstructStats()
FilePrintf(hFile,"\t\t<usDeconstructItem>%d</usDeconstructItem>\r\n", gStructureDeconstruct[cnt].usDeconstructItem ); FilePrintf(hFile,"\t\t<usDeconstructItem>%d</usDeconstructItem>\r\n", gStructureDeconstruct[cnt].usDeconstructItem );
FilePrintf(hFile,"\t\t<usItemToCreate>%d</usItemToCreate>\r\n", gStructureDeconstruct[cnt].usItemToCreate ); FilePrintf(hFile,"\t\t<usItemToCreate>%d</usItemToCreate>\r\n", gStructureDeconstruct[cnt].usItemToCreate );
FilePrintf(hFile,"\t\t<usCreatedItemStatus>%d</usCreatedItemStatus>\r\n", gStructureDeconstruct[cnt].usCreatedItemStatus ); FilePrintf(hFile,"\t\t<usCreatedItemStatus>%d</usCreatedItemStatus>\r\n", gStructureDeconstruct[cnt].usCreatedItemStatus );
FilePrintf(hFile,"\t\t<szTileSetDisplayName>%s</szTileSetDisplayName>\r\n", gStructureDeconstruct[cnt].szTileSetDisplayName );
FilePrintf(hFile,"\t\t<szTileSetName>%s</szTileSetName>\r\n", gStructureDeconstruct[cnt].szTileSetName ); FilePrintf(hFile,"\t\t<szTileSetName>%s</szTileSetName>\r\n", gStructureDeconstruct[cnt].szTileSetName );
FilePrintf(hFile,"\t</STRUCTURE>\r\n"); FilePrintf(hFile,"\t</STRUCTURE>\r\n");
+8 -5
View File
@@ -5851,7 +5851,7 @@ gridnoarmourvector GetArmourSharedRoofNetwork( gridnoarmourvector& arNetwork )
// handle destroying if a single roof tile // handle destroying if a single roof tile
void RoofDestruction( INT32 sGridNo ) void RoofDestruction( INT32 sGridNo, BOOLEAN fWithExplosion )
{ {
SOLDIERTYPE* pSoldier = NULL; SOLDIERTYPE* pSoldier = NULL;
@@ -5953,11 +5953,14 @@ void RoofDestruction( INT32 sGridNo )
ApplyMapChangesToMapTempFile( TRUE ); ApplyMapChangesToMapTempFile( TRUE );
// play an animation of falling roof tiles // play an animation of falling roof tiles
// if we merely collected the tiles that collapse and then call them all together, it would be possible to have animations for multi-tile collapses if ( fWithExplosion )
static UINT16 usRoofCollapseExplosionIndex = 1727;
if ( HasItemFlag( usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) || GetFirstItemWithFlag( &usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) )
{ {
InternalIgniteExplosion( NOBODY, CenterX( sGridNo ), CenterY( sGridNo ), 0, sGridNo, usRoofCollapseExplosionIndex, FALSE, 0 ); // if we merely collected the tiles that collapse and then call them all together, it would be possible to have animations for multi-tile collapses
static UINT16 usRoofCollapseExplosionIndex = 1727;
if ( HasItemFlag( usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) || GetFirstItemWithFlag( &usRoofCollapseExplosionIndex, ROOF_COLLAPSE_ITEM ) )
{
InternalIgniteExplosion( NOBODY, CenterX( sGridNo ), CenterY( sGridNo ), 0, sGridNo, usRoofCollapseExplosionIndex, FALSE, 0 );
}
} }
RemoveAllRoofsOfTypeRangeAdjustSaveFile( sGridNo, FIRSTTEXTURE, WIREFRAMES ); RemoveAllRoofsOfTypeRangeAdjustSaveFile( sGridNo, FIRSTTEXTURE, WIREFRAMES );
+1
View File
@@ -177,6 +177,7 @@ BOOLEAN FindBinderAttachment (OBJECTTYPE * pObj);
BOOLEAN CheckExplosiveTypeAsDetonator(UINT16 ubType); BOOLEAN CheckExplosiveTypeAsDetonator(UINT16 ubType);
// Flugente: destroy rooftops // Flugente: destroy rooftops
void RoofDestruction( INT32 sGridNo, BOOLEAN fWithExplosion = TRUE );
void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage ); void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage );
#endif #endif
+15 -21
View File
@@ -842,18 +842,15 @@ void DeallocateTileDatabase( )
BOOLEAN GetLandHeadType( INT32 iMapIndex, UINT32 *puiType ) BOOLEAN GetLandHeadType( INT32 iMapIndex, UINT32 *puiType )
{ {
UINT16 usIndex; Assert( puiType != NULL );
Assert( puiType != NULL ); CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL );
CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL ); UINT16 usIndex = gpWorldLevelData[iMapIndex].pLandHead->usIndex;
usIndex = gpWorldLevelData[ iMapIndex ].pLandHead->usIndex; GetTileType( usIndex, puiType );
GetTileType( usIndex, puiType );
return( TRUE );
return( TRUE );
} }
BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN fDelete ) BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN fDelete )
@@ -869,21 +866,19 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
if ( AnyHeigherLand( iMapIndex, uiNewType, &ubLastHighLevel ) ) if ( AnyHeigherLand( iMapIndex, uiNewType, &ubLastHighLevel ) )
{ {
// Check if type exists and get it's index if so // Check if type exists and get it's index if so
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) ) if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
{ {
// Replace with new index // Replace with new index
return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) ); return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) );
} }
else else
{ {
return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) ); return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) );
} }
} }
else else
{ {
// Check if type exists and get it's index if so // Check if type exists and get it's index if so
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) ) if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
{ {
@@ -896,7 +891,6 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
return( AddLandToHead( iMapIndex, usIndex ) ); return( AddLandToHead( iMapIndex, usIndex ) );
} }
} }
} }
+3
View File
@@ -2931,6 +2931,9 @@ extern STR16 szMilitiaStrategicMovementText[];
// Flugente: enemy heli/SAM // Flugente: enemy heli/SAM
extern STR16 szEnemyHeliText[]; extern STR16 szEnemyHeliText[];
// Flugente: fortification
extern STR16 szFortificationText[];
#define TACTICAL_INVENTORY_DIALOG_NUM 16 #define TACTICAL_INVENTORY_DIALOG_NUM 16
#define TACTICAL_COVER_DIALOG_NUM 16 #define TACTICAL_COVER_DIALOG_NUM 16
+20 -4
View File
@@ -2463,6 +2463,7 @@ STR16 pAssignmentStrings[] =
L"医生",// administering medical aid L"医生",// administering medical aid
L"病人", // getting medical aid L"病人", // getting medical aid
L"修理", // repairing L"修理", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2564,6 +2565,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"医生", L"医生",
L"病人", L"病人",
L"修理", L"修理",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2624,6 +2626,7 @@ STR16 pLongAssignmentStrings[] =
L"医生", L"医生",
L"病人", L"病人",
L"修理", L"修理",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2744,6 +2747,7 @@ STR16 pAssignMenuStrings[] =
L"告发", // anv: snitch actions L"告发", // anv: snitch actions
L"训练", L"训练",
L"搬运物品", // get items L"搬运物品", // get items
L"Fortify", // fortify sector // TODO.Translate
L"设施", // the merc is using/staffing a facility //ham3.6 L"设施", // the merc is using/staffing a facility //ham3.6
L"取消", L"取消",
}; };
@@ -8916,6 +8920,7 @@ STR16 szBackgroundText_Value[]=
L"吸烟者", //L"Smoker", L"吸烟者", //L"Smoker",
L"非吸烟者", //L"Nonsmoker", L"非吸烟者", //L"Nonsmoker",
L" %s%d%% 如果敌人 CTH 蹲在厚覆盖他们的方向\n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% 如果敌人 CTH 蹲在厚覆盖他们的方向\n", //L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = STR16 szBackgroundTitleText[] =
@@ -9786,7 +9791,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"角色", //L"Roles", L"角色", //L"Roles",
L"", L"Fortification", // TODO.Translate
L"跟踪者",// L"Tracker", L"跟踪者",// L"Tracker",
L"", L"",
@@ -9809,9 +9814,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"显示佣兵视野", L"显示佣兵视野",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"显示绊线网络", L"显示绊线网络",
@@ -10862,6 +10867,17 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
// WANNE: Some Chinese specific strings that needs to be in unicode! // WANNE: Some Chinese specific strings that needs to be in unicode!
STR16 ChineseSpecString1 = L"%"; //defined in _ChineseText.cpp as this file is already unicode STR16 ChineseSpecString1 = L"%"; //defined in _ChineseText.cpp as this file is already unicode
STR16 ChineseSpecString2 = L"*%3d%%%"; //defined in _ChineseText.cpp as this file is already unicode STR16 ChineseSpecString2 = L"*%3d%%%"; //defined in _ChineseText.cpp as this file is already unicode
+20 -4
View File
@@ -2461,6 +2461,7 @@ STR16 pAssignmentStrings[] =
L"Dokter", // administering medical aid L"Dokter", // administering medical aid
L"Patiënt", // getting medical aid L"Patiënt", // getting medical aid
L"Repareer", // repairing L"Repareer", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2562,6 +2563,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Dokter", // administering medical aid L"Dokter", // administering medical aid
L"Patiënt", // getting medical aid L"Patiënt", // getting medical aid
L"Repareer", // repairing L"Repareer", // repairing
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2622,6 +2624,7 @@ STR16 pLongAssignmentStrings[] =
L"Dokter", // administering medical aid L"Dokter", // administering medical aid
L"Patiënt", // getting medical aid L"Patiënt", // getting medical aid
L"Repareer", // repairing L"Repareer", // repairing
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2742,6 +2745,7 @@ STR16 pAssignMenuStrings[] =
L"Snitch", // TODO.Translate // anv: snitch actions L"Snitch", // TODO.Translate // anv: snitch actions
L"Train", // the merc is training L"Train", // the merc is training
L"Get Item", // get items // TODO.Translate L"Get Item", // get items // TODO.Translate
L"Fortify", // fortify sector // TODO.Translate
L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate
L"Stop", // cancel this menu L"Stop", // cancel this menu
}; };
@@ -8930,6 +8934,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = // TODO.Translate STR16 szBackgroundTitleText[] = // TODO.Translate
@@ -9799,7 +9804,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", // TODO.Translate L"Roles", // TODO.Translate
L"", L"Fortification", // TODO.Translate
L"Tracker", L"Tracker",
L"", L"",
@@ -9822,9 +9827,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Showing merc view", L"Showing merc view",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Display trap network", L"Display trap network",
@@ -10876,4 +10881,15 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //DUTCH #endif //DUTCH
+20 -4
View File
@@ -2462,6 +2462,7 @@ STR16 pAssignmentStrings[] =
L"Doctor", // administering medical aid L"Doctor", // administering medical aid
L"Patient", // getting medical aid L"Patient", // getting medical aid
L"Repair", // repairing L"Repair", // repairing
L"Fortify", // build structures according to external layout
}; };
@@ -2563,6 +2564,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Doctor", L"Doctor",
L"Patient", L"Patient",
L"Repair", L"Repair",
L"Fortify sector", // build structures according to external layout
}; };
@@ -2623,6 +2625,7 @@ STR16 pLongAssignmentStrings[] =
L"Doctor", L"Doctor",
L"Patient", L"Patient",
L"Repair", L"Repair",
L"Fortify sector", // build structures according to external layout
}; };
@@ -2743,6 +2746,7 @@ STR16 pAssignMenuStrings[] =
L"Snitch", // anv: snitch actions L"Snitch", // anv: snitch actions
L"Train", // the merc is training L"Train", // the merc is training
L"Get Item", // move items L"Get Item", // move items
L"Fortify", // fortify sector
L"Facility", // the merc is using/staffing a facility L"Facility", // the merc is using/staffing a facility
L"Cancel", // cancel this menu L"Cancel", // cancel this menu
}; };
@@ -8914,6 +8918,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = STR16 szBackgroundTitleText[] =
@@ -9837,7 +9842,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", L"Roles",
L"", L"Fortification",
L"Tracker", L"Tracker",
L"", L"",
@@ -9860,9 +9865,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Showing merc view", L"Showing merc view",
L"", L"",
L"", L"Display enemy role symbols",
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Display trap network", L"Display trap network",
@@ -10914,4 +10919,15 @@ STR16 szEnemyHeliText[] =
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //ENGLISH #endif //ENGLISH
+20 -4
View File
@@ -2470,6 +2470,7 @@ STR16 pAssignmentStrings[] =
L"Docteur", // administering medical aid L"Docteur", // administering medical aid
L"Patient(e)", // getting medical aid L"Patient(e)", // getting medical aid
L"Réparat.", // repairing L"Réparat.", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2571,6 +2572,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Docteur", L"Docteur",
L"Patient", L"Patient",
L"Réparation", L"Réparation",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2631,6 +2633,7 @@ STR16 pLongAssignmentStrings[] =
L"Docteur", L"Docteur",
L"Patient", L"Patient",
L"Réparation", L"Réparation",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2751,6 +2754,7 @@ STR16 pAssignMenuStrings[] =
L"Infiltré", // anv: snitch actions L"Infiltré", // anv: snitch actions
L"Formation", // the merc is training L"Formation", // the merc is training
L"Dépl obj.", // move items L"Dépl obj.", // move items
L"Fortify", // fortify sector // TODO.Translate
L"Affectat.", // the merc is using/staffing a facility L"Affectat.", // the merc is using/staffing a facility
L"Annuler", // cancel this menu L"Annuler", // cancel this menu
}; };
@@ -8915,6 +8919,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = STR16 szBackgroundTitleText[] =
@@ -9784,7 +9789,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", // TODO.Translate L"Roles", // TODO.Translate
L"", L"Fortification", // TODO.Translate
L"Tracker", L"Tracker",
L"", L"",
@@ -9807,9 +9812,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Afficher la vue du mercenaire", L"Afficher la vue du mercenaire",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Afficher réseau (piège)", L"Afficher réseau (piège)",
@@ -10861,4 +10866,15 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //FRENCH #endif //FRENCH
+20 -4
View File
@@ -2475,6 +2475,7 @@ STR16 pAssignmentStrings[] =
L"Doktor", // administering medical aid L"Doktor", // administering medical aid
L"Patient", // getting medical aid L"Patient", // getting medical aid
L"Repar.", // repairing L"Repar.", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
STR16 pMilitiaString[] = STR16 pMilitiaString[] =
@@ -2572,6 +2573,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Doktor", L"Doktor",
L"Patient", L"Patient",
L"Reparieren", L"Reparieren",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
// refer to above for comments // refer to above for comments
@@ -2630,6 +2632,7 @@ STR16 pLongAssignmentStrings[] =
L"Doktor", L"Doktor",
L"Patient", L"Patient",
L"Reparieren", L"Reparieren",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
// the contract options // the contract options
@@ -2746,6 +2749,7 @@ STR16 pAssignMenuStrings[] =
L"Snitch", // TODO.Translate // anv: snitch actions L"Snitch", // TODO.Translate // anv: snitch actions
L"Training", // the merc is training L"Training", // the merc is training
L"Umzug", // move items L"Umzug", // move items
L"Fortify", // fortify sector // TODO.Translate
L"Betrieb", // the merc is using/staffing a facility L"Betrieb", // the merc is using/staffing a facility
L"Abbrechen", // cancel this menu L"Abbrechen", // cancel this menu
}; };
@@ -8746,6 +8750,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = // TODO.Translate STR16 szBackgroundTitleText[] = // TODO.Translate
@@ -9615,7 +9620,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", // TODO.Translate L"Roles", // TODO.Translate
L"", L"Fortification", // TODO.Translate
L"Tracker", L"Tracker",
L"", L"",
@@ -9638,9 +9643,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Showing merc view", L"Showing merc view",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Display trap network", L"Display trap network",
@@ -10692,4 +10697,15 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //GERMAN #endif //GERMAN
+20 -4
View File
@@ -2456,6 +2456,7 @@ STR16 pAssignmentStrings[] =
L"Dottore", // administering medical aid L"Dottore", // administering medical aid
L"Paziente", // getting medical aid L"Paziente", // getting medical aid
L"Riparare", // repairing L"Riparare", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2557,6 +2558,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Dottore", L"Dottore",
L"Paziente", L"Paziente",
L"Riparare", L"Riparare",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2617,6 +2619,7 @@ STR16 pLongAssignmentStrings[] =
L"Dottore", L"Dottore",
L"Paziente", L"Paziente",
L"Ripara", L"Ripara",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2737,6 +2740,7 @@ STR16 pAssignMenuStrings[] =
L"Snitch", // TODO.Translate // anv: snitch actions L"Snitch", // TODO.Translate // anv: snitch actions
L"Si esercita", // the merc is training L"Si esercita", // the merc is training
L"Get Item", // get items // TODO.Translate L"Get Item", // get items // TODO.Translate
L"Fortify", // fortify sector // TODO.Translate
L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate
L"Annulla", // cancel this menu L"Annulla", // cancel this menu
}; };
@@ -8924,6 +8928,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = // TODO.Translate STR16 szBackgroundTitleText[] = // TODO.Translate
@@ -9793,7 +9798,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", // TODO.Translate L"Roles", // TODO.Translate
L"", L"Fortification", // TODO.Translate
L"Tracker", L"Tracker",
L"", L"",
@@ -9816,9 +9821,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Showing merc view", L"Showing merc view",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Display trap network", L"Display trap network",
@@ -10870,4 +10875,15 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //ITALIAN #endif //ITALIAN
+20 -4
View File
@@ -2468,6 +2468,7 @@ STR16 pAssignmentStrings[] =
L"Lekarz", // administering medical aid L"Lekarz", // administering medical aid
L"Pacjent", // getting medical aid L"Pacjent", // getting medical aid
L"Naprawa", // repairing L"Naprawa", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2569,6 +2570,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Lekarz", L"Lekarz",
L"Pacjent", L"Pacjent",
L"Naprawa", L"Naprawa",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2629,6 +2631,7 @@ STR16 pLongAssignmentStrings[] =
L"Lekarz", L"Lekarz",
L"Pacjent", L"Pacjent",
L"Naprawa", L"Naprawa",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2749,6 +2752,7 @@ STR16 pAssignMenuStrings[] =
L"Kapuś", // anv: snitch actions L"Kapuś", // anv: snitch actions
L"Szkolenie", // the merc is training L"Szkolenie", // the merc is training
L"Get Item", // get items // TODO.Translate L"Get Item", // get items // TODO.Translate
L"Fortify", // fortify sector // TODO.Translate
L"Facility", // the merc is using/staffing a facility // TODO.Translate L"Facility", // the merc is using/staffing a facility // TODO.Translate
L"Anuluj", // cancel this menu L"Anuluj", // cancel this menu
}; };
@@ -8937,6 +8941,7 @@ STR16 szBackgroundText_Value[]=
L"Smoker", L"Smoker",
L"Nonsmoker", L"Nonsmoker",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = // TODO.Translate STR16 szBackgroundTitleText[] = // TODO.Translate
@@ -9806,7 +9811,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Roles", // TODO.Translate L"Roles", // TODO.Translate
L"", L"Fortification", // TODO.Translate
L"Tracker", L"Tracker",
L"", L"",
@@ -9829,9 +9834,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Showing merc view", L"Showing merc view",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Display trap network", L"Display trap network",
@@ -10883,4 +10888,15 @@ STR16 szEnemyHeliText[] = // TODO.Translate
L"SAM in %s fires at enemy helicopter in %s.", L"SAM in %s fires at enemy helicopter in %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //POLISH #endif //POLISH
+20 -4
View File
@@ -2462,6 +2462,7 @@ STR16 pAssignmentStrings[] =
L"Медик", // administering medical aid L"Медик", // administering medical aid
L"Пациент", // getting medical aid L"Пациент", // getting medical aid
L"Ремонт", // repairing L"Ремонт", // repairing
L"Fortify", // build structures according to external layout // TODO.Translate
}; };
@@ -2563,6 +2564,7 @@ STR16 pPersonnelAssignmentStrings[] =
L"Медик", L"Медик",
L"Пациент", L"Пациент",
L"Ремонт", L"Ремонт",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2623,6 +2625,7 @@ STR16 pLongAssignmentStrings[] =
L"Медик", L"Медик",
L"Пациент", L"Пациент",
L"Ремонтирует", L"Ремонтирует",
L"Fortify sector", // build structures according to external layout // TODO.Translate
}; };
@@ -2743,6 +2746,7 @@ STR16 pAssignMenuStrings[] =
L"Осведомитель", // anv: snitch actions L"Осведомитель", // anv: snitch actions
L"Обучение", // the merc is training L"Обучение", // the merc is training
L"Носильщик", // move items L"Носильщик", // move items
L"Fortify", // fortify sector // TODO.Translate
L"Занятия", // the merc is using/staffing a facility L"Занятия", // the merc is using/staffing a facility
L"Отмена", // cancel this menu L"Отмена", // cancel this menu
}; };
@@ -8914,6 +8918,7 @@ STR16 szBackgroundText_Value[]=
L"Курит", L"Курит",
L"Не курит", L"Не курит",
L" %s%d%% enemy CTH if crouched against thick cover in their direction\n", L" %s%d%% enemy CTH if crouched against thick cover in their direction\n",
L" %s%d%% building speed\n",
}; };
STR16 szBackgroundTitleText[] = STR16 szBackgroundTitleText[] =
@@ -9837,7 +9842,7 @@ STR16 szTacticalCoverDialogString[]=
L"", L"",
L"Задачи", L"Задачи",
L"", L"Fortification", // TODO.Translate
L"Слежение", L"Слежение",
L"", L"",
@@ -9860,9 +9865,9 @@ STR16 szTacticalCoverDialogPrintString[]=
L"Показывать что видит боец", L"Показывать что видит боец",
L"", L"",
L"", L"Display enemy role symbols", // TODO.Translate
L"", L"Display planned fortifications",
L"", L"Display enemy tracks",
L"", L"",
L"Показать сеть ловушек", L"Показать сеть ловушек",
@@ -10914,4 +10919,15 @@ STR16 szEnemyHeliText[] =
L"База ПВО в %s обстреляла вражеский вертолёт в %s.", L"База ПВО в %s обстреляла вражеский вертолёт в %s.",
}; };
STR16 szFortificationText[] =
{
L"No valid structure selected, nothing added to build plan.",
L"No gridno found to create items in %s - created items are lost.",
L"Structures could not be built in %s - people are in the way.",
L"Structures could not be built in %s - the following items are required:",
L"No fitting fortifications found for tileset %d: %s",
L"Tileset %d: %s",
};
#endif //RUSSIAN #endif //RUSSIAN