mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Address review feedback
This commit is contained in:
committed by
Asdow
parent
8b1c4effa0
commit
d4abc82488
@@ -1808,11 +1808,6 @@ void SummaryToggleProgressCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
|
||||
#include "Tile Surface.h"
|
||||
|
||||
void PerformTest()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN HandleSummaryInput( InputAtom *pEvent )
|
||||
{
|
||||
if( !gfSummaryWindowActive )
|
||||
@@ -1838,17 +1833,6 @@ BOOLEAN HandleSummaryInput( InputAtom *pEvent )
|
||||
else if( gfWorldLoaded )
|
||||
DestroySummaryWindow();
|
||||
break;
|
||||
case F6:
|
||||
PerformTest();
|
||||
break;
|
||||
case F7:
|
||||
for( x = 0; x < 10; x++ )
|
||||
PerformTest();
|
||||
break;
|
||||
case F8:
|
||||
for( x = 0; x < 100; x++ )
|
||||
PerformTest();
|
||||
break;
|
||||
case 'y':case 'Y':
|
||||
if( gusNumEntriesWithOutdatedOrNoSummaryInfo && !gfOutdatedDenied )
|
||||
{
|
||||
|
||||
@@ -505,8 +505,6 @@ BOOLEAN EditModeShutdown( void )
|
||||
|
||||
RemoveLightPositionHandles( );
|
||||
|
||||
MapOptimize();
|
||||
|
||||
RemoveCursors();
|
||||
|
||||
fHelpScreen = FALSE;
|
||||
@@ -3341,24 +3339,6 @@ BOOLEAN CheckForSlantRoofs( void )
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
// MapOptimize
|
||||
//
|
||||
// Runs through all map locations, and if it's outside the visible world, then we remove
|
||||
// EVERYTHING from it since it will never be seen!
|
||||
//
|
||||
// If it can be seen, then we remove all extraneous land tiles. We find the tile that has the first
|
||||
// FULL TILE indicator, and delete anything that may come after it (it'll never be seen anyway)
|
||||
//
|
||||
// Doing the above has shown to free up about 1.1 Megs on the default map. Deletion of non-viewable
|
||||
// land pieces alone gained us about 600 K of memory.
|
||||
//
|
||||
void MapOptimize(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
// CheckForFences
|
||||
//
|
||||
|
||||
@@ -57,8 +57,6 @@ void HideEditorToolbar( INT32 iOldTaskMode );
|
||||
|
||||
void ProcessSelectionArea();
|
||||
|
||||
void MapOptimize(void);
|
||||
|
||||
extern UINT16 GenericButtonFillColors[40];
|
||||
|
||||
//These go together. The taskbar has a specific color scheme.
|
||||
|
||||
@@ -1609,9 +1609,6 @@ BOOLEAN IsCursorRestricted( void )
|
||||
|
||||
void SimulateMouseMovement( UINT32 uiNewXPos, UINT32 uiNewYPos )
|
||||
{
|
||||
// 0verhaul:
|
||||
// The above is a bad hack. Especially in windowed mode. We don't want coords relative to the entire screen in that case.
|
||||
// So instead, get screen coords and then use the setcursorpos call.
|
||||
POINT newmouse;
|
||||
newmouse.x = uiNewXPos;
|
||||
newmouse.y = uiNewYPos;
|
||||
|
||||
@@ -2204,8 +2204,6 @@ void CreateAutoResolveInterface()
|
||||
ubRegMilitia += bonusRegularMilitia;
|
||||
ubGreenMilitia += bonusGreenMilitia;
|
||||
|
||||
// This block should be unnecessary. If the counts do not line up, there is a bug.
|
||||
|
||||
cnt = 0;
|
||||
// Add the militia in this sector
|
||||
ARCreateMilitiaSquad( &cnt, ubEliteMilitia, ubRegMilitia, ubGreenMilitia, gpAR->ubSectorX, gpAR->ubSectorY);
|
||||
|
||||
@@ -101,7 +101,6 @@ BOOLEAN ExecuteStrategicEvent( STRATEGICEVENT *pEvent )
|
||||
{
|
||||
|
||||
BOOLEAN bMercDayOne = FALSE;
|
||||
// BF : file access is bad, especially if a function is called so often.
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"ExecuteStrategicEvent");
|
||||
|
||||
if( gGameExternalOptions.gfEnableEmergencyButton_SkipStrategicEvents && _KeyDown( NUM_LOCK ) )
|
||||
|
||||
@@ -6021,6 +6021,9 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
|
||||
FLOAT newguntemperature = max(0.0f, guntemperature - tickspassed * cooldownfactor ); // ... calculate new temperature ...
|
||||
|
||||
#if JA2TESTVERSION
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", guntemperature, newguntemperature);
|
||||
#endif
|
||||
|
||||
(*itemStack)[i]->data.bTemperature = newguntemperature; // ... set new temperature
|
||||
|
||||
@@ -6038,6 +6041,9 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
|
||||
(*iter)[i]->data.bTemperature = newtemperature; // ... set new temperature
|
||||
|
||||
#if JA2TESTVERSION
|
||||
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"World: Item temperature lowered from %4.2f to %4.2f", temperature, newtemperature);
|
||||
#endif
|
||||
|
||||
// we assume that there can exist only 1 underbarrel weapon per gun
|
||||
break;
|
||||
|
||||
@@ -12590,7 +12590,6 @@ UINT16 PickARandomLaunchable(UINT16 itemIndex)
|
||||
UINT16 usRandom = 0;
|
||||
UINT16 lowestCoolness = LowestLaunchableCoolness(itemIndex);
|
||||
|
||||
// Flugente: the above code is highly dubious.. why do we loop over all items 2 times, and why that obscure usRandom--; business? This can cause an underflow!
|
||||
BOOLEAN isnight = NightTime();
|
||||
UINT16 maxcoolness = max( HighestPlayerProgressPercentage() / 10, lowestCoolness );
|
||||
|
||||
|
||||
@@ -5296,6 +5296,8 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
dDeltaX = dEndX - dStartX;
|
||||
dDeltaY = dEndY - dStartY;
|
||||
dDeltaZ = dEndZ - dStartZ;
|
||||
/* see previous commit for historically interesting comment on the reason Distance2D instead
|
||||
of Distance3D is used here */
|
||||
d2DDistance = Distance2D( dDeltaX, dDeltaY );
|
||||
iDistance = (INT32) d2DDistance;
|
||||
|
||||
|
||||
@@ -800,7 +800,6 @@ int AStarPathfinder::GetPath(SOLDIERTYPE *s ,
|
||||
if (gfDisplayCoverValues && gfDrawPathPoints)
|
||||
{
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
// The RenderCoverDebugInfo call is now made by RenderWorld. So don't try to call it here
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3919,8 +3919,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
|
||||
if ( !this->flags.fDontChargeAPsForStanceChange )
|
||||
{
|
||||
// CHRISL
|
||||
// SANDRO - APBPConstants[AP_CROUCH] changed to GetAPsCrouch()
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
{
|
||||
if ( usNewState == KNEEL_UP || usNewState == BIGMERC_CROUCH_TRANS_OUTOF )
|
||||
@@ -3950,32 +3948,25 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
// ATE: If we are NOT waiting for prone down...
|
||||
if ( this->flags.bTurningFromPronePosition < TURNING_FROM_PRONE_START_UP_FROM_MOVE && !this->flags.fDontChargeAPsForStanceChange )
|
||||
{
|
||||
// silversurfer: of course we deduct points for stance changes!
|
||||
// ATE: Don't do this if we are still 'moving'....
|
||||
// SANDRO - APBPConstants[AP_PRONE] changed to GetAPsProne()
|
||||
//if ( this->sGridNo == this->pathing.sFinalDestination || this->pathing.usPathIndex == 0 )
|
||||
//{
|
||||
// CHRISL
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
{
|
||||
if ( usNewState == PRONE_UP )
|
||||
{
|
||||
if ( usNewState == PRONE_UP )
|
||||
{
|
||||
sAPCost = GetAPsProne( this, TRUE * 2 );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, TRUE );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 1;
|
||||
}
|
||||
sAPCost = GetAPsProne( this, TRUE * 2 );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, FALSE );
|
||||
sBPCost = APBPConstants[BP_PRONE];
|
||||
sAPCost = GetAPsProne( this, TRUE );
|
||||
sBPCost = APBPConstants[BP_PRONE] + 1;
|
||||
}
|
||||
DeductPoints( this, sAPCost, sBPCost );
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
sAPCost = GetAPsProne( this, FALSE );
|
||||
sBPCost = APBPConstants[BP_PRONE];
|
||||
}
|
||||
DeductPoints( this, sAPCost, sBPCost );
|
||||
}
|
||||
this->flags.fDontChargeAPsForStanceChange = FALSE;
|
||||
break;
|
||||
@@ -4311,8 +4302,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InitNewSoldierAnim( UINT16 usNewState, UINT16 usStart
|
||||
// Reset some animation values
|
||||
this->flags.fForceShade = FALSE;
|
||||
|
||||
// CHECK IF WE ARE AT AN IDLE ACTION
|
||||
|
||||
// ATE; For some animations that could use some variations, do so....
|
||||
if ( usNewState == CHARIOTS_OF_FIRE || usNewState == BODYEXPLODING )
|
||||
{
|
||||
@@ -7114,7 +7103,6 @@ BOOLEAN SOLDIERTYPE::EVENT_InternalGetNewSoldierPath( INT32 sDestGridNo, UINT16
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
// we can use the soldier's level here because we don't have pathing across levels right now...
|
||||
{
|
||||
iDest = FindBestPath( this, sDestGridNo, this->pathing.bLevel, usMovementAnim, COPYROUTE, fFlags );
|
||||
fContinue = (iDest != 0);
|
||||
|
||||
@@ -355,9 +355,6 @@ INT8 TileIsClear( SOLDIERTYPE *pSoldier, INT8 bDirection, INT32 sGridNo, INT8 b
|
||||
pSoldier->flags.fBlockedByAnotherMerc = FALSE;
|
||||
return( MOVE_TILE_STATIONARY_BLOCKED );
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Unset flag for blocked by soldier...
|
||||
|
||||
@@ -1383,9 +1383,6 @@ INT16 DistanceVisible(SOLDIERTYPE *pSoldier, INT8 bFacingDir, INT8 bSubjectDir,
|
||||
// let tanks see and be seen further (at night)
|
||||
if ( (ARMED_VEHICLE( pSoldier ) && sDistVisible > 0) || (pSubject && ARMED_VEHICLE( pSubject )) )
|
||||
{
|
||||
// 0verhaul: This bit of code 1) seems to have no real reason to exist (MaxDistVisible just calls this function anyway),
|
||||
// and 2) causes infinite recursion because MaxDistVisible just calls this function, which comes right back here. Just
|
||||
// add 5 to sDistVisible and go on.
|
||||
sDistVisible = sDistVisible + 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1595,14 +1595,6 @@ void RenderTiles(UINT32 uiFlags, INT32 iStartPointX_M, INT32 iStartPointY_M, INT
|
||||
fRenderTile = TRUE;
|
||||
}
|
||||
|
||||
// If we are on the struct layer, check for if it's hidden!
|
||||
if (uiRowFlags & (TILES_STATIC_STRUCTURES | TILES_DYNAMIC_STRUCTURES | TILES_STATIC_SHADOWS | TILES_DYNAMIC_SHADOWS))
|
||||
{
|
||||
if (fUseTileElem)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (fRenderTile)
|
||||
{
|
||||
// Set flag to set layer as used
|
||||
|
||||
@@ -1978,8 +1978,3 @@ HVOBJECT GetCursorFileVideoObject( UINT32 uiCursorFile )
|
||||
{
|
||||
return( CursorFileDatabase[ uiCursorFile ].hVObject );
|
||||
}
|
||||
|
||||
|
||||
void SyncPairedCursorFrames( UINT32 uiSrcIndex, UINT32 uiDestIndex )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -311,8 +311,6 @@ void HandleAnimatedCursors( );
|
||||
void DrawMouseActionPoints( );
|
||||
void UpdateAnimatedCursorFrames( UINT32 uiCursorIndex );
|
||||
|
||||
void SyncPairedCursorFrames( UINT32 uiSrcCursor, UINT32 uiDestCursor );
|
||||
|
||||
void SetCursorSpecialFrame( UINT32 uiCursor, UINT8 ubFrame );
|
||||
|
||||
void SetCursorFlags( UINT32 uiCursor, UINT8 ubFlags );
|
||||
|
||||
Reference in New Issue
Block a user