Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Core/Libraries/Source/WWVegas/WW3D2/aabtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,6 @@ bool AABTreeClass::Intersect_OBBox_Recursive(AABTreeClass::CullNodeStruct * node
return res;
}

#ifdef RTS_DEBUG
#pragma optimize("", off) // We get an odd error when using optimized in the debug.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decoupled RTS_DEBUG from optimization already anyway, so this must go. This is called when hovering units, sometimes. I do not know what the error would have been. We do not care.

// All optimized seems to work. jba.
#endif
/***********************************************************************************************
* AABTreeClass::Cast_Ray_To_Polys -- cast the ray to polys in the given node *
* *
Expand Down Expand Up @@ -787,10 +783,6 @@ bool AABTreeClass::Cast_Ray_To_Polys(CullNodeStruct * node,RayCollisionTestClass
}
return false;
}
#ifdef RTS_DEBUG
#pragma optimize("", on)
#endif


/***********************************************************************************************
* AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_To_Polys -- cast ray to polys in the node *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
#include "assetmgr.h"
#include "WW3D2/dx8wrapper.h"

//#pragma optimize("", off)

//#define ALLOW_WATER_TRACK_EDIT

//number of vertex pages allocated - allows double buffering of vertex updates.
Expand Down
8 changes: 1 addition & 7 deletions Generals/Code/Tools/WorldBuilder/src/DrawObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,12 +1622,6 @@ void DrawObject::setRampFeedbackParms(const Coord3D *start, const Coord3D *end,
}


// This routine fails to draw poly triggers in some cases when optimized.
// So just shut it off for now. The failure case was new doc, add a poly trigger.
// Adding any other object fixed the problem. jba

#pragma optimize("", off)

/** Render draws into the current 3d context. */
void DrawObject::Render(RenderInfoClass & rinfo)
{
Expand Down Expand Up @@ -1933,7 +1927,7 @@ void DrawObject::Render(RenderInfoClass & rinfo)
}

}
#pragma optimize("", on)


void BuildRectFromSegmentAndWidth(const Coord3D* start, const Coord3D* end, Real width,
Coord3D* outBL, Coord3D* outTL, Coord3D* outBR, Coord3D* outTR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
#include "assetmgr.h"
#include "WW3D2/dx8wrapper.h"

//#pragma optimize("", off)

//#define ALLOW_WATER_TRACK_EDIT

//number of vertex pages allocated - allows double buffering of vertex updates.
Expand Down
3 changes: 0 additions & 3 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/render2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
#include "wwmemlog.h"
#include "assetmgr.h"

//#pragma optimize("", off)
//#pragma MESSAGE("************************************** WARNING, optimization disabled for debugging purposes")

RectClass Render2DClass::ScreenResolution( 0,0,0,0 );


Expand Down
3 changes: 0 additions & 3 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
#include "texturethumbnail.h"
#include "wwprofile.h"

//#pragma optimize("", off)
//#pragma MESSAGE("************************************** WARNING, optimization disabled for debugging purposes")

const unsigned DEFAULT_INACTIVATION_TIME=20000;

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
#include "bitmaphandler.h"
#include "wwprofile.h"

//#pragma optimize("", off)
//#pragma MESSAGE("************************************** WARNING, optimization disabled for debugging purposes")

bool TextureLoader::TextureLoadSuspended;
int TextureLoader::TextureInactiveOverrideTime = 0;

Expand Down Expand Up @@ -1331,7 +1328,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1331 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+t+e

'>=': signed/unsigned mismatch

Check warning on line 1331 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+t+e

'>=': signed/unsigned mismatch

Check warning on line 1331 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+t+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down Expand Up @@ -1368,7 +1365,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1368 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+t+e

'>=': signed/unsigned mismatch

Check warning on line 1368 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+t+e

'>=': signed/unsigned mismatch

Check warning on line 1368 in GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+t+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down
8 changes: 1 addition & 7 deletions GeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,12 +2056,6 @@ void DrawObject::setRampFeedbackParms(const Coord3D *start, const Coord3D *end,
}


// This routine fails to draw poly triggers in some cases when optimized.
// So just shut it off for now. The failure case was new doc, add a poly trigger.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with VS2022 Release build and was unable to reproduce it.

// Adding any other object fixed the problem. jba

#pragma optimize("", off)

bool _skip_drawobject_render = false;

/** Render draws into the current 3d context. */
Expand Down Expand Up @@ -2457,7 +2451,7 @@ if (pMapObj->isSelected()) {
m_lineRenderer->Reset();
}
}
#pragma optimize("", on)


void BuildRectFromSegmentAndWidth(const Coord3D* start, const Coord3D* end, Real width,
Coord3D* outBL, Coord3D* outTL, Coord3D* outBR, Coord3D* outTR)
Expand Down
Loading