diff --git a/Editor/Sector Summary.cpp b/Editor/Sector Summary.cpp index 47317b3f..3af4b992 100644 --- a/Editor/Sector Summary.cpp +++ b/Editor/Sector Summary.cpp @@ -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 ) { diff --git a/Editor/editscreen.cpp b/Editor/editscreen.cpp index a36d3d2e..a62be1e5 100644 --- a/Editor/editscreen.cpp +++ b/Editor/editscreen.cpp @@ -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 // diff --git a/Editor/editscreen.h b/Editor/editscreen.h index 78e0d025..1f3c591a 100644 --- a/Editor/editscreen.h +++ b/Editor/editscreen.h @@ -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. diff --git a/Standard Gaming Platform/input.cpp b/Standard Gaming Platform/input.cpp index 912b27fc..d3f51474 100644 --- a/Standard Gaming Platform/input.cpp +++ b/Standard Gaming Platform/input.cpp @@ -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; diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 08a98364..c602e12c 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -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); diff --git a/Strategic/Game Event Hook.cpp b/Strategic/Game Event Hook.cpp index 284a05d9..6c2ea428 100644 --- a/Strategic/Game Event Hook.cpp +++ b/Strategic/Game Event Hook.cpp @@ -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 ) ) diff --git a/Strategic/Map Screen Interface Map Inventory.cpp b/Strategic/Map Screen Interface Map Inventory.cpp index 2d3334b6..d0350d68 100644 --- a/Strategic/Map Screen Interface Map Inventory.cpp +++ b/Strategic/Map Screen Interface Map Inventory.cpp @@ -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; diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 358fb0a3..55a457fe 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -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 ); diff --git a/Tactical/LOS.cpp b/Tactical/LOS.cpp index 0b97beff..276aaf69 100644 --- a/Tactical/LOS.cpp +++ b/Tactical/LOS.cpp @@ -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; diff --git a/Tactical/PATHAI.cpp b/Tactical/PATHAI.cpp index bdbfb146..cd113927 100644 --- a/Tactical/PATHAI.cpp +++ b/Tactical/PATHAI.cpp @@ -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 diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index e9e5cbf9..cdc5ec71 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -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); diff --git a/Tactical/Soldier Tile.cpp b/Tactical/Soldier Tile.cpp index 063b2df3..b43c0e47 100644 --- a/Tactical/Soldier Tile.cpp +++ b/Tactical/Soldier Tile.cpp @@ -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... diff --git a/Tactical/opplist.cpp b/Tactical/opplist.cpp index 098eb7f6..274413f9 100644 --- a/Tactical/opplist.cpp +++ b/Tactical/opplist.cpp @@ -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; } diff --git a/TileEngine/renderworld.cpp b/TileEngine/renderworld.cpp index 08eef0b7..13c86f78 100644 --- a/TileEngine/renderworld.cpp +++ b/TileEngine/renderworld.cpp @@ -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 diff --git a/Utils/Cursors.cpp b/Utils/Cursors.cpp index ebe95b50..2338d366 100644 --- a/Utils/Cursors.cpp +++ b/Utils/Cursors.cpp @@ -1978,8 +1978,3 @@ HVOBJECT GetCursorFileVideoObject( UINT32 uiCursorFile ) { return( CursorFileDatabase[ uiCursorFile ].hVObject ); } - - -void SyncPairedCursorFrames( UINT32 uiSrcIndex, UINT32 uiDestIndex ) -{ -} diff --git a/Utils/Cursors.h b/Utils/Cursors.h index 988da59c..0a763a15 100644 --- a/Utils/Cursors.h +++ b/Utils/Cursors.h @@ -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 );