- Removed the "ENABLE_DISPLAY_EXPLOSIVES" define

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5513 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-08-24 07:59:13 +00:00
parent 9fc9f09472
commit 061ea16cea
6 changed files with 527 additions and 556 deletions
-2
View File
@@ -751,8 +751,6 @@ BOOLEAN CreateDestroyMainMenuButtons( BOOLEAN fCreate )
void RenderMainMenu() void RenderMainMenu()
{ {
HVSURFACE hVSurface; HVSURFACE hVSurface;
HVSURFACE hVSaveSurface;
//HVOBJECT hPixHandle;
UINT32 iCounter2; UINT32 iCounter2;
//Get and display the background image //Get and display the background image
+9 -16
View File
@@ -49,7 +49,6 @@ enum COVER_VALUES
MAX_COVER=3 MAX_COVER=3
}; };
#ifdef ENABLE_DISPLAY_EXPLOSIVES
// Flugente: mines display - stuff needs to be here // Flugente: mines display - stuff needs to be here
enum MINES_VALUES enum MINES_VALUES
{ {
@@ -67,7 +66,7 @@ enum COVER_VALUES
MINES_LVL_4, MINES_LVL_4,
MAX_MINES MAX_MINES
}; };
#endif
struct CoverCell struct CoverCell
{ {
@@ -75,13 +74,10 @@ struct CoverCell
INT8 bCover; INT8 bCover;
BOOLEAN fInverseColor; BOOLEAN fInverseColor;
#ifdef ENABLE_DISPLAY_EXPLOSIVES
INT8 bMines; INT8 bMines;
CoverCell() : sGridNo(NOWHERE), bCover(INVALID_COVER), fInverseColor(FALSE), bMines(MINES_ALL) {} CoverCell() : sGridNo(NOWHERE), bCover(INVALID_COVER), fInverseColor(FALSE), bMines(MINES_ALL) {}
#else
CoverCell() : sGridNo(NOWHERE), bCover(INVALID_COVER), fInverseColor(FALSE) {}
#endif
}; };
enum COVER_DRAW_MODE { enum COVER_DRAW_MODE {
@@ -101,7 +97,7 @@ const UINT8 animArr[3] = {
#define COVER_Y_CELLS WORLD_ROWS_MAX #define COVER_Y_CELLS WORLD_ROWS_MAX
#define COVER_Z_CELLS 2 // roof or no roof #define COVER_Z_CELLS 2 // roof or no roof
#ifdef ENABLE_DISPLAY_EXPLOSIVES
// Flugente: mines display - stuff needs to be here // Flugente: mines display - stuff needs to be here
enum MINES_DRAW_MODE { enum MINES_DRAW_MODE {
MINES_DRAW_OFF, MINES_DRAW_OFF,
@@ -114,7 +110,7 @@ const UINT8 animArr[3] = {
MINES_DRAW_NET_D, MINES_DRAW_NET_D,
MINES_DRAW_MAX MINES_DRAW_MAX
}; };
#endif
//****** Local Variables ********************************************* //****** Local Variables *********************************************
@@ -126,9 +122,8 @@ DWORD guiCoverNextUpdateTime = 0;
COVER_DRAW_MODE gubDrawMode = COVER_DRAW_OFF; COVER_DRAW_MODE gubDrawMode = COVER_DRAW_OFF;
#ifdef ENABLE_DISPLAY_EXPLOSIVES
MINES_DRAW_MODE gubDrawModeMine = MINES_DRAW_OFF; // Flugente: mines display MINES_DRAW_MODE gubDrawModeMine = MINES_DRAW_OFF; // Flugente: mines display
#endif
//******* Local Function Prototypes *********************************** //******* Local Function Prototypes ***********************************
@@ -142,9 +137,8 @@ void RemoveCoverObjectFromWorld( const INT32 sGridNo, const UINT16& usGraphic, c
void AddCoverObjectsToViewArea(); void AddCoverObjectsToViewArea();
void RemoveCoverObjectsFromViewArea(); void RemoveCoverObjectsFromViewArea();
#ifdef ENABLE_DISPLAY_EXPLOSIVES
void RemoveMinesObjectsFromViewArea(); // added by Flugente, has to be declared here void RemoveMinesObjectsFromViewArea(); // added by Flugente, has to be declared here
#endif
void CalculateCover(); void CalculateCover();
void CalculateCoverForSoldier( SOLDIERTYPE* pForSoldier, const INT32& sTargetGridNo, const BOOLEAN& fRoof, INT8& bCover ); void CalculateCoverForSoldier( SOLDIERTYPE* pForSoldier, const INT32& sTargetGridNo, const BOOLEAN& fRoof, INT8& bCover );
@@ -460,11 +454,10 @@ void CalculateCover()
return; return;
} }
#ifdef ENABLE_DISPLAY_EXPLOSIVES
// at we're here, we want to display cover, so remove the mines display // at we're here, we want to display cover, so remove the mines display
if ( gubDrawModeMine != MINES_DRAW_OFF ) if ( gubDrawModeMine != MINES_DRAW_OFF )
RemoveMinesObjectsFromViewArea(); RemoveMinesObjectsFromViewArea();
#endif
GetSoldier( &pSoldier, gusSelectedSoldier ); GetSoldier( &pSoldier, gusSelectedSoldier );
@@ -689,7 +682,7 @@ BOOLEAN IsTheRoofVisible( const INT32& sGridNo )
return( FALSE ); return( FALSE );
} }
#ifdef ENABLE_DISPLAY_EXPLOSIVES
// ----------------------------- Mines display after this ---------------------------------------- // ----------------------------- Mines display after this ----------------------------------------
// added by Flugente // added by Flugente
@@ -1256,4 +1249,4 @@ BOOLEAN IsTheRoofVisible( const INT32& sGridNo )
} }
} }
} }
#endif
+2 -2
View File
@@ -36,7 +36,7 @@ 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
#ifdef ENABLE_DISPLAY_EXPLOSIVES
// ----------------------------- 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
void DisplayMines(const BOOLEAN& forceUpdate = FALSE); void DisplayMines(const BOOLEAN& forceUpdate = FALSE);
@@ -49,6 +49,6 @@ INT8 CalcCoverForGridNoBasedOnTeamKnownEnemies( SOLDIERTYPE *pSoldier, INT16 sTa
void ToggleHostileTrapsView(); void ToggleHostileTrapsView();
void SwitchMinesDrawModeForNetworks(); void SwitchMinesDrawModeForNetworks();
#endif
#endif #endif
-2
View File
@@ -656,9 +656,7 @@ UINT32 HandleTacticalUI( void )
DisplayCover(); DisplayCover();
#ifdef ENABLE_DISPLAY_EXPLOSIVES
DisplayMines(); // added by Flugente DisplayMines(); // added by Flugente
#endif
if ( HandleItemPickupMenu( ) ) if ( HandleItemPickupMenu( ) )
{ {
+1 -1
View File
@@ -4137,7 +4137,7 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
UINT8 ubLoop=0; UINT8 ubLoop=0;
UINT8 ubShots=0; UINT8 ubShots=0;
UINT8 ubImpact=0; UINT8 ubImpact=0;
INT8 bCTGT; INT8 bCTGT = 0;
UINT8 ubSpreadIndex = 0; UINT8 ubSpreadIndex = 0;
UINT16 usBulletFlags = 0; UINT16 usBulletFlags = 0;
int n=0; int n=0;
+6 -24
View File
@@ -1405,56 +1405,43 @@ 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;
@@ -2980,14 +2967,12 @@ 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 )
@@ -4379,14 +4364,11 @@ 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':