Skip to content

Commit

Permalink
[MP+SP] Remove trailing spaces
Browse files Browse the repository at this point in the history
Commands to reproduce:

fs=$(find code codemp shared -name "*.h" -or -name "*.c" -or -name "*.cpp" -or -name "*.txt" | xargs -0)
for i in $fs; do mv "$i" /tmp/a.txt;sed -e 's/[ \t]*$//' /tmp/a.txt>"$i";done
  • Loading branch information
madebr committed Oct 6, 2015
1 parent be2b871 commit f1214e4
Show file tree
Hide file tree
Showing 356 changed files with 7,541 additions and 7,541 deletions.
18 changes: 9 additions & 9 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#============================================================================
# Copyright (C) 2013 - 2015, OpenJK contributors
#
#
# This file is part of the OpenJK source code.
#
#
# OpenJK is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#============================================================================
Expand Down Expand Up @@ -42,7 +42,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
${SPEngineIncludeDirectories}
${SharedDir}
${SPDir})

# Dependencies
# OpenAL (is optionally included for Windows)
if(MSVC AND NOT WIN64)
Expand All @@ -59,7 +59,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
set(SPEngineIncludeDirectories ${SPEngineIncludeDirectories} ${OPENAL_INCLUDE_DIR})
set(SPEngineLibraries ${SPEngineLibraries} ${OPENAL_LIBRARY})
endif(UseInternalOpenAL)

set(SPEngineEAXFiles
"${SPDir}/client/eax/eax.h"
"${SPDir}/client/eax/EaxMan.h"
Expand Down Expand Up @@ -87,7 +87,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
${OpenJKLibDir}/SDL2/lib/x64${MSVC_SUFFIX}/SDL2.lib
)
endif()

set(SPEngineIncludeDirectories
${SPEngineIncludeDirectories}
${OpenJKLibDir}/SDL2/include
Expand All @@ -97,7 +97,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
set(SPEngineIncludeDirectories ${SPEngineIncludeDirectories} ${SDL2_INCLUDE_DIR})
set(SPEngineLibraries ${SPEngineLibraries} ${SDL2_LIBRARY})
endif()

# Source Files

# Client files
Expand Down Expand Up @@ -292,7 +292,7 @@ if(BuildSPEngine OR BuildJK2SPEngine)
# Ghoul2 files
set(SPEngineGhoul2Files
"${SPDir}/ghoul2/G2.h"
"${SPDir}/ghoul2/ghoul2_gore.h"
"${SPDir}/ghoul2/ghoul2_gore.h"
)
source_group("ghoul2" FILES ${SPEngineGhoul2Files})
set(SPEngineFiles ${SPEngineFiles} ${SPEngineGhoul2Files})
Expand Down
10 changes: 5 additions & 5 deletions code/Ragl/graph_region.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class graph_region : public ratl::ratl_base
////////////////////////////////////////////////////////////////////////////////////
// Capacity Enum
////////////////////////////////////////////////////////////////////////////////////
enum
enum
{
NULL_REGION = -1,
NULL_EDGE = -1,
Expand All @@ -77,7 +77,7 @@ class graph_region : public ratl::ratl_base
// Some Public Type Defines
////////////////////////////////////////////////////////////////////////////////////
typedef ragl::graph_vs<TNODE, MAXNODES, TEDGE, MAXEDGES, NUM_EDGES_PER_NODE> TGraph;
typedef ratl::vector_vs<int, MAXNODES> TRegions;
typedef ratl::vector_vs<int, MAXNODES> TRegions;
typedef ratl::vector_vs<short, MAXREGIONS> TRegionEdge; // List Of All Edges Which Connect RegionA<->RegionB
typedef ratl::pool_vs<TRegionEdge, MAXREGIONEDGES> TEdges; // Pool Of All RegionEdges
typedef ratl::grid2_vs<short, MAXREGIONS, MAXREGIONS> TLinks; // Graph Of Links From Region To Region, Each Points To A RegionEdge
Expand Down Expand Up @@ -139,7 +139,7 @@ class graph_region : public ratl::ratl_base

////////////////////////////////////////////////////////////////////////////////////
// Call this function to find out if it is at all possible to get from nodeA to
// nodeB. If there is no possible connection, or there is one, but the connection
// nodeB. If there is no possible connection, or there is one, but the connection
// is not valid at the current time, this routine will return false. Use it as
// a quick cull routine before a search.
//
Expand Down Expand Up @@ -278,7 +278,7 @@ class graph_region : public ratl::ratl_base
}
}


// Add This Edge To The Other Region Links
//-----------------------------------------
else if (!ReservedRegionLink)
Expand Down Expand Up @@ -360,7 +360,7 @@ class graph_region : public ratl::ratl_base
for (int j=0; j<mEdges[CurRegionEdge].size(); j++)
{
if (user.is_valid(
mGraph.get_edge(mEdges[CurRegionEdge][j]),
mGraph.get_edge(mEdges[CurRegionEdge][j]),
(NextRegion==TargetRegion)?(-1):(0)
)
)
Expand Down
66 changes: 33 additions & 33 deletions code/Ragl/graph_triangulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class graph_triangulate : public ratl::ratl_base
////////////////////////////////////////////////////////////////////////////////////
// Capacity Enum
////////////////////////////////////////////////////////////////////////////////////
enum
enum
{
CAPACITY = MAXNODES,
MAXFACES = MAXEDGES*2,
Expand Down Expand Up @@ -170,10 +170,10 @@ class graph_triangulate : public ratl::ratl_base
//
// This is a "quick and dirty" triangulation technique. It does not give you a very
// nice looking or terribly useful mesh, but it is a good place to start. Once
// you have an insertion hull triangulation, you can call delauny_edge_flip() to
// you have an insertion hull triangulation, you can call delauny_edge_flip() to
// clean it up some.
//
// This algorithm's complexity isbounded in the worst case where all the points in
// This algorithm's complexity isbounded in the worst case where all the points in
// the mesh are on the "hull", in which case it is O(n^2). However the number of
// points on the hull for most common point clouds is more likely to be log n.
//
Expand Down Expand Up @@ -290,7 +290,7 @@ class graph_triangulate : public ratl::ratl_base
{
mLinks.get(mGraph.node_index(EdgeAt.mA), mGraph.node_index(EdgeAt.mB)) = 0;
mLinks.get(mGraph.node_index(EdgeAt.mB), mGraph.node_index(EdgeAt.mA)) = 0;

CullEdges.push_back(it.index());
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ class graph_triangulate : public ratl::ratl_base
{
mLinks.get(mGraph.node_index((*it).mA), mGraph.node_index((*it).mB)) = 0;
mLinks.get(mGraph.node_index((*it).mB), mGraph.node_index((*it).mA)) = 0;

CullEdges.push_back(it.index());
}
}
Expand Down Expand Up @@ -357,13 +357,13 @@ class graph_triangulate : public ratl::ratl_base
typedef typename ratl::list_vs<int, MAXNODES>::iterator THullIter;
typedef typename ratl::grid2_vs<int, MAXNODES, MAXNODES> TLinks;


////////////////////////////////////////////////////////////////////////////////////
// The Local Edge Class
//
// RIGHT
// B<-<-<-<-<-<-A
// LEFT
// RIGHT
// B<-<-<-<-<-<-A
// LEFT
//
////////////////////////////////////////////////////////////////////////////////////
class edge
Expand Down Expand Up @@ -414,14 +414,14 @@ class graph_triangulate : public ratl::ratl_base

////////////////////////////////////////////////////////////////////////////////////
// The Local Face Class
//
//
// _ C
// /| \
// LEFT/ \RIGHT
// / \
// B-<-<-<-<-A
// BOTTOM
//
// / \
// B-<-<-<-<-A
// BOTTOM
//
////////////////////////////////////////////////////////////////////////////////////
class face
{
Expand Down Expand Up @@ -533,7 +533,7 @@ class graph_triangulate : public ratl::ratl_base
mSortNode.mNodePointer = &(*i);
mSortNodes.push_back(mSortNode);
}
mSortNodes.sort();
mSortNodes.sort();

}

Expand All @@ -551,7 +551,7 @@ class graph_triangulate : public ratl::ratl_base
if (nEdge==0)
{
nEdge= mEdges.alloc();

mHull.insert_after(mHullIter, nEdge);
assert(mHullIter!=mHull.end());

Expand Down Expand Up @@ -635,9 +635,9 @@ class graph_triangulate : public ratl::ratl_base
// DEBUG ASSERTS
//====================================================================================
// IF YOU HIT THESE ASSERTS, CHANCES ARE THAT YOU ARE TRYING TO TRIANGULATE OVER A SET
// WITH MORE THAN 2 COLINEAR POINTS ON THE SAME FACE. INSERT HULL WILL FAIL IN THIS
// WITH MORE THAN 2 COLINEAR POINTS ON THE SAME FACE. INSERT HULL WILL FAIL IN THIS
// FACE. INSERT HULL WILL FAIL IN THIS SITUATION

assert(mGraph.get_node(C).LRTest(mGraph.get_node(A), mGraph.get_node(B))==Side_Right);
assert(mGraph.get_node(A).LRTest(mGraph.get_node(B), mGraph.get_node(C))==Side_Right);
assert(mGraph.get_node(B).LRTest(mGraph.get_node(C), mGraph.get_node(A))==Side_Right);
Expand Down Expand Up @@ -707,8 +707,8 @@ class graph_triangulate : public ratl::ratl_base

////////////////////////////////////////////////////////////////////////////////////
// Edge Flip Function
//
// This function scans the edge list for any edge that is "bad" (defined as not
//
// This function scans the edge list for any edge that is "bad" (defined as not
// fitting within the circumscribed circle of either adjoining face). When it
// encounters one, it "flips" the edge in question and fixes up the adjoining faces
// which were altered.
Expand All @@ -720,23 +720,23 @@ class graph_triangulate : public ratl::ratl_base
//
// BEFORE AFTER
//
// (PtR) (PtA)
// / \ / | \
// / \ / | \
// / (FaceR) \ / V \
// / \ / | \
// (PtB)-<---------<-(PtA) (PtR) | (PtL)
// \ / \ | /
// \ (FaceL) / \ V /
// \ / \ | /
// \ / \ | /
// (PtL) (PtB)
// (PtR) (PtA)
// / \ / | \
// / \ / | \
// / (FaceR) \ / V \
// / \ / | \
// (PtB)-<---------<-(PtA) (PtR) | (PtL)
// \ / \ | /
// \ (FaceL) / \ V /
// \ / \ | /
// \ / \ | /
// (PtL) (PtB)
//
////////////////////////////////////////////////////////////////////////////////////
int flip()
{
int Flipped = 0;

int EdgeHandle;
int PtR, PtL, PtA, PtB;
int EdgeRL, EdgeRR, EdgeLL, EdgeLR;
Expand Down Expand Up @@ -769,7 +769,7 @@ class graph_triangulate : public ratl::ratl_base
// Is This Edge Invalid For Delaunay?
//-------------------------------------
if (!mGraph.get_node(PtB).InCircle(mGraph.get_node(PtR), mGraph.get_node(PtL), mGraph.get_node(PtA)) &&
!mGraph.get_node(PtA).InCircle(mGraph.get_node(PtR), mGraph.get_node(PtB), mGraph.get_node(PtL))
!mGraph.get_node(PtA).InCircle(mGraph.get_node(PtR), mGraph.get_node(PtB), mGraph.get_node(PtL))
)
{
// Change The Link: Remove The Old, Add The New
Expand Down
Loading

0 comments on commit f1214e4

Please sign in to comment.