mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Made the "Display - mines/bombs/tripwires" feature optional, so we can decide if we like to build an executable with/without the feature
o See: builddefines.h: #define ENABLE_DISPLAY_EXPLOSIVES o Note: This feature is NOT the strategy performance killer git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5359 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+534
-515
File diff suppressed because it is too large
Load Diff
+11
-9
@@ -36,17 +36,19 @@ void ChangeSizeOfLOS( INT32 iNewSize );
|
|||||||
INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, INT8 bStance );
|
INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTargetGridNo, INT8 bStance );
|
||||||
//ddd for optimize oppponent turn
|
//ddd for optimize oppponent turn
|
||||||
|
|
||||||
// ----------------------------- Mines display after this ----------------------------------------
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
// added by Flugente: display of mine, bombs and tripwire
|
// ----------------------------- Mines display after this ----------------------------------------
|
||||||
void DisplayMines(const BOOLEAN& forceUpdate = FALSE);
|
// added by Flugente: display of mine, bombs and tripwire
|
||||||
|
void DisplayMines(const BOOLEAN& forceUpdate = FALSE);
|
||||||
|
|
||||||
void SwitchToTrapNetworkView();
|
void SwitchToTrapNetworkView();
|
||||||
void SwitchToHostileTrapsView();
|
void SwitchToHostileTrapsView();
|
||||||
void SwitchMineViewOff();
|
void SwitchMineViewOff();
|
||||||
|
|
||||||
void ToggleTrapNetworkView();
|
void ToggleTrapNetworkView();
|
||||||
void ToggleHostileTrapsView();
|
void ToggleHostileTrapsView();
|
||||||
|
|
||||||
void SwitchMinesDrawModeForNetworks();
|
void SwitchMinesDrawModeForNetworks();
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -655,7 +655,10 @@ UINT32 HandleTacticalUI( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
DisplayCover();
|
DisplayCover();
|
||||||
|
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
DisplayMines(); // added by Flugente
|
DisplayMines(); // added by Flugente
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( HandleItemPickupMenu( ) )
|
if ( HandleItemPickupMenu( ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1405,40 +1405,56 @@ void GetPolledKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
|
|
||||||
if( _KeyDown( DEL ) && !fDeleteDown)
|
if( _KeyDown( DEL ) && !fDeleteDown)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if ( _KeyDown( ALT ) )
|
if ( _KeyDown( ALT ) )
|
||||||
SwitchToHostileTrapsView(); // added by Flugente
|
SwitchToHostileTrapsView(); // added by Flugente
|
||||||
else
|
else
|
||||||
SwitchToEnemyView();
|
SwitchToEnemyView();
|
||||||
|
#else
|
||||||
|
SwitchToEnemyView();
|
||||||
|
#endif
|
||||||
|
|
||||||
fDeleteDown = TRUE;
|
fDeleteDown = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !_KeyDown( DEL ) && fDeleteDown )
|
if( !_KeyDown( DEL ) && fDeleteDown )
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if ( _KeyDown( ALT ) )
|
if ( _KeyDown( ALT ) )
|
||||||
SwitchMineViewOff(); // added by Flugente
|
SwitchMineViewOff(); // added by Flugente
|
||||||
else
|
else
|
||||||
SwitchViewOff();
|
SwitchViewOff();
|
||||||
|
#else
|
||||||
|
SwitchViewOff();
|
||||||
|
#endif
|
||||||
|
|
||||||
fDeleteDown = FALSE;
|
fDeleteDown = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( _KeyDown( END ) && !fEndDown)
|
if( _KeyDown( END ) && !fEndDown)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if ( _KeyDown( ALT ) )
|
if ( _KeyDown( ALT ) )
|
||||||
SwitchToTrapNetworkView(); // added by Flugente
|
SwitchToTrapNetworkView(); // added by Flugente
|
||||||
else
|
else
|
||||||
SwitchToMercView();
|
SwitchToMercView();
|
||||||
|
#else
|
||||||
|
SwitchToMercView();
|
||||||
|
#endif
|
||||||
|
|
||||||
fEndDown = TRUE;
|
fEndDown = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !_KeyDown( END ) && fEndDown )
|
if( !_KeyDown( END ) && fEndDown )
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if ( _KeyDown( ALT ) )
|
if ( _KeyDown( ALT ) )
|
||||||
SwitchMineViewOff(); // added by Flugente
|
SwitchMineViewOff(); // added by Flugente
|
||||||
else
|
else
|
||||||
SwitchViewOff();
|
SwitchViewOff();
|
||||||
|
#else
|
||||||
|
SwitchViewOff();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
fEndDown = FALSE;
|
fEndDown = FALSE;
|
||||||
@@ -2964,10 +2980,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if ( fAlt )
|
if ( fAlt )
|
||||||
ToggleHostileTrapsView(); // added by Flugente
|
ToggleHostileTrapsView(); // added by Flugente
|
||||||
else
|
else
|
||||||
ToggleEnemyView();
|
ToggleEnemyView();
|
||||||
|
#else
|
||||||
|
ToggleEnemyView();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
if( gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT )
|
if( gTacticalStatus.uiFlags & TURNBASED && gTacticalStatus.uiFlags & INCOMBAT )
|
||||||
@@ -4358,10 +4378,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'V':
|
case 'V':
|
||||||
|
#ifdef ENABLE_DISPLAY_EXPLOSIVES
|
||||||
if( fAlt )
|
if( fAlt )
|
||||||
ToggleTrapNetworkView(); // added by Flugente
|
ToggleTrapNetworkView(); // added by Flugente
|
||||||
else
|
else
|
||||||
ToggleMercView();
|
ToggleMercView();
|
||||||
|
#else
|
||||||
|
ToggleMercView();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'w':
|
case 'w':
|
||||||
|
|||||||
+8
-3
@@ -3,10 +3,17 @@
|
|||||||
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
|
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
|
// WANNE: Enable this define to show explosives display (Feature was added in Revision: 5210)
|
||||||
|
#define ENABLE_DISPLAY_EXPLOSIVES
|
||||||
|
// -----------------------------
|
||||||
|
// *****************************
|
||||||
|
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
// WANNE: Enable this define, to build an executable where you can enable/disable zombies in tactical (ingame option screen).
|
// WANNE: Enable this define, to build an executable where you can enable/disable zombies in tactical (ingame option screen).
|
||||||
// It seems, that executables compiled with this zombie option turned on, causes slowdown in tactical.
|
// It seems (and is confirmed), that executables compiled with this zombie option turned on, causes slowdown in tactical.
|
||||||
//#define ENABLE_ZOMBIES
|
//#define ENABLE_ZOMBIES
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
@@ -14,8 +21,6 @@
|
|||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
// WANNE: Enable this define, to build the gameloop with the highspeed timer. To use the highspeed timer, you also have to set the HIGHSPEED_TIMER = TRUE in ja2.ini
|
// WANNE: Enable this define, to build the gameloop with the highspeed timer. To use the highspeed timer, you also have to set the HIGHSPEED_TIMER = TRUE in ja2.ini
|
||||||
// CAUTION: A lot of games reported, when the exe is compiled with the highspeed timer on, the game runs very slowly in strategy map screen when doing repair, ..
|
|
||||||
// This is the reason, why I made a compilation define, where we can turn on/off the highspeed timer.
|
|
||||||
#define USE_HIGHSPEED_GAMELOOP_TIMER
|
#define USE_HIGHSPEED_GAMELOOP_TIMER
|
||||||
// -----------------------------
|
// -----------------------------
|
||||||
// *****************************
|
// *****************************
|
||||||
|
|||||||
Reference in New Issue
Block a user