diff --git a/contrib/bobtoolz/DBrush.h b/contrib/bobtoolz/DBrush.h index 47084d96..06e17505 100644 --- a/contrib/bobtoolz/DBrush.h +++ b/contrib/bobtoolz/DBrush.h @@ -93,6 +93,7 @@ public: int FindPointsForPlane( DPlane* plane, DPoint** pnts, int maxpnts ); DBrush(); + DBrush( DBrush&& ) noexcept = delete; virtual ~DBrush(); bool operator==( const DBrush* other ) const; diff --git a/contrib/bobtoolz/DPlane.cpp b/contrib/bobtoolz/DPlane.cpp index 45d8a78e..0fc537ab 100644 --- a/contrib/bobtoolz/DPlane.cpp +++ b/contrib/bobtoolz/DPlane.cpp @@ -142,7 +142,7 @@ bool DPlane::operator !=( DPlane& other ){ return true; } -DWinding DPlane::BaseWindingForPlane(){ +DWinding DPlane::BaseWindingForPlane() const { int i, x; vec_t max, v; vec3_t org, vright, vup; diff --git a/contrib/bobtoolz/DPlane.h b/contrib/bobtoolz/DPlane.h index 80792dc7..124ecf85 100644 --- a/contrib/bobtoolz/DPlane.h +++ b/contrib/bobtoolz/DPlane.h @@ -36,7 +36,7 @@ class DPlane public: DPlane( const vec3_t va, const vec3_t vb, const vec3_t vc, const char* textureName, bool bDetail ); void ScaleTexture(); - DWinding BaseWindingForPlane(); + DWinding BaseWindingForPlane() const ; void Rebuild(); diff --git a/contrib/bobtoolz/DWinding.cpp b/contrib/bobtoolz/DWinding.cpp index b4db7b42..c19addc6 100644 --- a/contrib/bobtoolz/DWinding.cpp +++ b/contrib/bobtoolz/DWinding.cpp @@ -262,7 +262,7 @@ DWinding* DWinding::ReverseWinding(){ return c; } -bool DWinding::ChopWindingInPlace( DPlane* chopPlane, vec_t epsilon ){ +bool DWinding::ChopWindingInPlace( const DPlane* chopPlane, vec_t epsilon ){ vec_t dists[MAX_POINTS_ON_WINDING + 4]; int sides[MAX_POINTS_ON_WINDING + 4]; int counts[3] = {0}; diff --git a/contrib/bobtoolz/DWinding.h b/contrib/bobtoolz/DWinding.h index fca9f590..9e210515 100644 --- a/contrib/bobtoolz/DWinding.h +++ b/contrib/bobtoolz/DWinding.h @@ -38,7 +38,7 @@ public: void AllocWinding( int points ); bool ChopWinding( DPlane* chopPlane ); - bool ChopWindingInPlace( DPlane* chopPlane, vec_t ON_EPSILON ); + bool ChopWindingInPlace( const DPlane* chopPlane, vec_t ON_EPSILON ); void ClipWindingEpsilon( DPlane* chopPlane, vec_t epsilon, DWinding** front, DWinding** back ); void CheckWinding(); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index d8131ec3..152df4f0 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -305,7 +305,7 @@ bool DoDoorsBox( DoorRS* rs ){ rs->nOrientation = radioNS->isChecked() ? DIRECTION_NS - : DIRECTION_EW; + : DIRECTION_EW; return true; } return false; diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index a29347c2..008e4ec3 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -348,7 +348,6 @@ void DoBuildStairs(){ } void DoBuildDoors(){ - UndoableCommand undo( "bobToolz.buildDoors" ); // ensure we have something selected if ( GlobalSelectionSystem().countSelected() != 1 ) { //DoMessageBox( "Invalid number of brushes selected, choose 1 only", "Error", EMessageBoxType::Error ); @@ -360,11 +359,12 @@ void DoBuildDoors(){ { const char *tex = GetCurrentTexture(); strcpy( rs.mainTexture, tex + ( string_equal_prefix_nocase( tex, "textures/" ) - ? strlen( "textures/" ) - : 0 ) ); + ? strlen( "textures/" ) + : 0 ) ); } if ( DoDoorsBox( &rs ) ) { + UndoableCommand undo( "bobToolz.buildDoors" ); vec3_t vMin, vMax; { diff --git a/docs/Complete_list_of_command_line_parameters.htm b/docs/Complete_list_of_command_line_parameters.htm index b5c72807..c29aea55 100644 --- a/docs/Complete_list_of_command_line_parameters.htm +++ b/docs/Complete_list_of_command_line_parameters.htm @@ -207,7 +207,7 @@ td.formatted_questions ol { margin-top: 0px; margin-bottom: 0px; }
  • -bouncescale F: Scaling factor for radiosity
  • -bounce N: Maximal number of bounces for radiosity
  • -brightness F: Scaling factor for resulting lightmaps brightness
  • -
  • -cheapgrid: Use -cheap style lighting for radiosity
  • +
  • -cheapgrid: Use -cheap style lighting for light grid
  • -cheap: Abort vertex light calculations when white is reached
  • -compensate F: Lightmap compensate (darkening factor applied after everything else)
  • -contrast F: -255 .. 255 lighting contrast, default = 0
  • diff --git a/tools/quake3/common/polylib.cpp b/tools/quake3/common/polylib.cpp index 5fa19385..98e19800 100644 --- a/tools/quake3/common/polylib.cpp +++ b/tools/quake3/common/polylib.cpp @@ -317,10 +317,9 @@ std::pair ClipWindingEpsilonStrict( const winding_t& in float dists[MAX_POINTS_ON_WINDING + 4]; EPlaneSide sides[MAX_POINTS_ON_WINDING + 4]; int counts[3] = { 0 }; - size_t i, j; // determine sides for each point - for ( i = 0; i < in.size(); i++ ) + for ( size_t i = 0; i < in.size(); i++ ) { dists[i] = plane3_distance_to_point( plane, in[i] ); @@ -336,8 +335,8 @@ std::pair ClipWindingEpsilonStrict( const winding_t& in } counts[sides[i]]++; } - sides[i] = sides[0]; - dists[i] = dists[0]; + sides[in.size()] = sides[0]; + dists[in.size()] = dists[0]; if ( !counts[eSideFront] && !counts[eSideBack] ) { return {}; @@ -355,7 +354,7 @@ std::pair ClipWindingEpsilonStrict( const winding_t& in winding_t front = AllocWinding( maxpts ); winding_t back = AllocWinding( maxpts ); - for ( i = 0; i < in.size(); i++ ) + for ( size_t i = 0; i < in.size(); i++ ) { const Vector3& p1 = in[i]; @@ -380,7 +379,7 @@ std::pair ClipWindingEpsilonStrict( const winding_t& in const Vector3& p2 = in[winding_next( in, i )]; const double dot = dists[i] / ( dists[i] - dists[i + 1] ); Vector3 mid; - for ( j = 0; j < 3; j++ ) + for ( size_t j = 0; j < 3; j++ ) { // avoid round off error when possible if ( plane.normal()[j] == 1 ) { mid[j] = plane.dist(); @@ -427,7 +426,6 @@ std::pair ClipWindingEpsilon( const winding_t& in, cons */ void ChopWindingInPlaceAccu( winding_accu_t& inout, const Plane3& plane, float crudeEpsilon ){ size_t counts[3] = { 0 }; - size_t i, j; double dists[MAX_POINTS_ON_WINDING + 1]; EPlaneSide sides[MAX_POINTS_ON_WINDING + 1]; @@ -466,7 +464,7 @@ void ChopWindingInPlaceAccu( winding_accu_t& inout, const Plane3& plane, float c static const double smallestEpsilonAllowed = ( (double) VEC_SMALLEST_EPSILON_AROUND_ONE ) * 0.5; const double fineEpsilon = std::max( smallestEpsilonAllowed, (double) crudeEpsilon ); - for ( i = 0; i < inout.size(); i++ ) + for ( size_t i = 0; i < inout.size(); i++ ) { dists[i] = plane3_distance_to_point( plane, inout[i] ); if ( dists[i] > fineEpsilon ) { @@ -480,8 +478,8 @@ void ChopWindingInPlaceAccu( winding_accu_t& inout, const Plane3& plane, float c } counts[sides[i]]++; } - sides[i] = sides[0]; - dists[i] = dists[0]; + sides[inout.size()] = sides[0]; + dists[inout.size()] = dists[0]; // I'm wondering if whatever code that handles duplicate planes is robust enough // that we never get a case where two nearly equal planes result in 2 NULL windings @@ -500,7 +498,7 @@ void ChopWindingInPlaceAccu( winding_accu_t& inout, const Plane3& plane, float c winding_accu_t f; f.reserve( counts[eSideFront] + 2 ); - for ( i = 0; i < inout.size(); i++ ) + for ( size_t i = 0; i < inout.size(); i++ ) { const DoubleVector3& p1 = inout[i]; @@ -524,7 +522,7 @@ void ChopWindingInPlaceAccu( winding_accu_t& inout, const Plane3& plane, float c // w is in the range (0,1). const double w = dists[i] / ( dists[i] - dists[i + 1] ); DoubleVector3 mid; - for ( j = 0; j < 3; j++ ) + for ( size_t j = 0; j < 3; j++ ) { // Avoid round-off error when possible. Check axis-aligned normal. if ( plane.normal()[j] == 1 ) { @@ -556,10 +554,9 @@ void ChopWindingInPlace( winding_t& inout, const Plane3f& plane, float epsilon ) float dists[MAX_POINTS_ON_WINDING + 4]; EPlaneSide sides[MAX_POINTS_ON_WINDING + 4]; int counts[3] = { 0 }; - size_t i, j; // determine sides for each point - for ( i = 0; i < in.size(); i++ ) + for ( size_t i = 0; i < in.size(); i++ ) { dists[i] = plane3_distance_to_point( plane, in[i] ); if ( dists[i] > epsilon ) { @@ -574,8 +571,8 @@ void ChopWindingInPlace( winding_t& inout, const Plane3f& plane, float epsilon ) } counts[sides[i]]++; } - sides[i] = sides[0]; - dists[i] = dists[0]; + sides[in.size()] = sides[0]; + dists[in.size()] = dists[0]; if ( !counts[eSideFront] ) { inout.clear(); @@ -588,7 +585,7 @@ void ChopWindingInPlace( winding_t& inout, const Plane3f& plane, float epsilon ) winding_t f = AllocWinding( in.size() + 4 ); // cant use counts[0]+2 because of fp grouping errors - for ( i = 0; i < in.size(); i++ ) + for ( size_t i = 0; i < in.size(); i++ ) { const Vector3& p1 = in[i]; @@ -610,7 +607,7 @@ void ChopWindingInPlace( winding_t& inout, const Plane3f& plane, float epsilon ) const double dot = dists[i] / ( dists[i] - dists[i + 1] ); Vector3 mid; - for ( j = 0; j < 3; j++ ) + for ( size_t j = 0; j < 3; j++ ) { // avoid round off error when possible if ( plane.normal()[j] == 1 ) { mid[j] = plane.dist(); diff --git a/tools/quake3/q3map2/help.cpp b/tools/quake3/q3map2/help.cpp index dac14308..b86592b9 100644 --- a/tools/quake3/q3map2/help.cpp +++ b/tools/quake3/q3map2/help.cpp @@ -172,7 +172,7 @@ static void HelpLight() { "-bouncescale ", "Scaling factor for radiosity" }, { "-bounce ", "Maximal number of bounces for radiosity" }, { "-brightness ", "Scaling factor for resulting lightmaps brightness" }, - { "-cheapgrid", "Use `-cheap` style lighting for radiosity" }, + { "-cheapgrid", "Use `-cheap` style lighting for light grid" }, { "-cheap", "Abort vertex light calculations when white is reached" }, { "-compensate ", "Lightmap compensate (darkening factor applied after everything else)" }, { "-contrast ", "-255 .. 255 lighting contrast, default = 0" }, diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 531578b5..856a1188 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -509,7 +509,7 @@ struct shaderInfo_t float subdivisions; /* from a "tesssize xxx" */ float backsplashFraction; /* floating point value, usually 0.05 */ - float backsplashDistance; /* default 16 */ + float backsplashDistance; /* default 23 */ float lightSubdivide; /* default 999 */ float lightFilterRadius; /* ydnar: lightmap filtering/blurring radius for lights created by this shader (default: 0) */