Skip to content

Commit 34ab0fb

Browse files
committed
Reformat with new clang-format config
1 parent 1f4f6ee commit 34ab0fb

File tree

2,369 files changed

+16091
-15993
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,369 files changed

+16091
-15993
lines changed

src/Common/LevelGameDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum EWayType
2020
};
2121

2222
enum ERPpointType
23-
{ // [0..255]
23+
{ // [0..255]
2424
rptActorSpawn = 0,
2525
rptArtefactSpawn,
2626
rptItemSpawn,

src/Common/LevelStructure.hpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44

55
enum fsL_Chunks
66
{
7-
fsL_HEADER = 1, //*
8-
fsL_SHADERS = 2, //*
9-
fsL_VISUALS = 3, //*
10-
fsL_PORTALS = 4, //* - Portal polygons
11-
fsL_LIGHT_DYNAMIC = 6, //*
12-
fsL_GLOWS = 7, //* - All glows inside level
13-
fsL_SECTORS = 8, //* - All sectors on level
14-
fsL_VB = 9, //* - Static geometry
15-
fsL_IB = 10, //*
16-
fsL_SWIS = 11, //* - collapse info, usually for trees
7+
fsL_HEADER = 1, //*
8+
fsL_SHADERS = 2, //*
9+
fsL_VISUALS = 3, //*
10+
fsL_PORTALS = 4, //* - Portal polygons
11+
fsL_LIGHT_DYNAMIC = 6, //*
12+
fsL_GLOWS = 7, //* - All glows inside level
13+
fsL_SECTORS = 8, //* - All sectors on level
14+
fsL_VB = 9, //* - Static geometry
15+
fsL_IB = 10, //*
16+
fsL_SWIS = 11, //* - collapse info, usually for trees
1717
fsL_forcedword = 0xFFFFFFFF
1818
};
1919

2020
enum fsESectorChunks
2121
{
22-
fsP_Portals = 1, // - portal polygons
23-
fsP_Root = 2, // - geometry root
22+
fsP_Portals = 1, // - portal polygons
23+
fsP_Root = 2, // - geometry root
2424
fsP_forcedword = u32(-1)
2525
};
2626

2727
enum fsSLS_Chunks
2828
{
29-
fsSLS_Description = 1, // Name of level
29+
fsSLS_Description = 1, // Name of level
3030
fsSLS_ServerState = 2,
3131
fsSLS_forcedword = u32(-1)
3232
};
@@ -247,7 +247,7 @@ struct NodeCompressed6
247247
friend class CLevelGraph;
248248
friend struct CNodeCompressed;
249249
friend class CNodeRenumberer;
250-
}; // 2+5+2+11 = 20b
250+
}; // 2+5+2+11 = 20b
251251
#endif
252252

253253
struct SNodePositionOld
@@ -264,8 +264,8 @@ typedef SNodePositionOld NodePosition;
264264

265265
const char LEVEL_GRAPH_NAME[] = "level.ai";
266266

267-
const u32 XRCL_CURRENT_VERSION = 18; // input
268-
const u32 XRCL_PRODUCTION_VERSION = 14; // output
267+
const u32 XRCL_CURRENT_VERSION = 18; // input
268+
const u32 XRCL_PRODUCTION_VERSION = 14; // output
269269
const u32 CFORM_CURRENT_VERSION = 4;
270270
const u32 MAX_NODE_BIT_COUNT = 23;
271271
const u32 XRAI_CURRENT_VERSION = 10;

src/Common/NvMender2003/NVMeshMender.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void MeshMender::UpdateIndices(const size_t oldIndex, const size_t newIndex, Tri
194194
void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
195195
xr_vector<unsigned int>& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
196196
{
197-
NeighborGroupList neighborGroups; // a fresh group for each pass
197+
NeighborGroupList neighborGroups; // a fresh group for each pass
198198

199199
// reset each triangle to prepare for smoothing group building
200200
for (u32 i = 0; i < possibleNeighbors.size(); ++i)
@@ -223,7 +223,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
223223
D3DXVECTOR3 gnorm(0.0f, 0.0f, 0.0f);
224224

225225
assert(curGroup.size() != 0 && "should not be a zero group here.");
226-
for (size_t t = 0; t < curGroup.size(); ++t) // for each triangle in the group,
226+
for (size_t t = 0; t < curGroup.size(); ++t) // for each triangle in the group,
227227
{
228228
TriID tID = curGroup[t];
229229
gnorm += m_Triangles[tID].normal;
@@ -240,10 +240,10 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
240240
TriangleList& curGroup = neighborGroups[i];
241241
xr_set<size_t> thisGroupIndices;
242242

243-
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
243+
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
244244
{
245245
TriID tID = curGroup[t];
246-
for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri
246+
for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri
247247
{
248248
// if it is at the positions in question
249249
if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) {
@@ -281,7 +281,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
281281
void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
282282
xr_vector<unsigned int>& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
283283
{
284-
NeighborGroupList neighborGroups; // a fresh group for each pass
284+
NeighborGroupList neighborGroups; // a fresh group for each pass
285285

286286
// reset each triangle to prepare for smoothing group building
287287
for (u32 i = 0; i < possibleNeighbors.size(); ++i)
@@ -306,7 +306,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
306306
for (u32 i = 0; i < neighborGroups.size(); ++i)
307307
{
308308
D3DXVECTOR3 gtang(0, 0, 0);
309-
for (unsigned int t = 0; t < neighborGroups[i].size(); ++t) // for each triangle in the group,
309+
for (unsigned int t = 0; t < neighborGroups[i].size(); ++t) // for each triangle in the group,
310310
{
311311
TriID tID = neighborGroups[i][t];
312312
gtang += m_Triangles[tID].tangent;
@@ -323,10 +323,10 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
323323
TriangleList& curGroup = neighborGroups[i];
324324
xr_set<size_t> thisGroupIndices;
325325

326-
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
326+
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
327327
{
328328
TriID tID = curGroup[t];
329-
for (size_t indx = 0; indx < 3; indx++) // for each vert in that tri
329+
for (size_t indx = 0; indx < 3; indx++) // for each vert in that tri
330330
{
331331
// if it is at the positions in question
332332
if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) {
@@ -364,7 +364,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
364364
void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
365365
xr_vector<unsigned int>& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
366366
{
367-
NeighborGroupList neighborGroups; // a fresh group for each pass
367+
NeighborGroupList neighborGroups; // a fresh group for each pass
368368

369369
// reset each triangle to prepare for smoothing group building
370370
for (u32 i = 0; i < possibleNeighbors.size(); ++i)
@@ -389,7 +389,7 @@ void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector<Ver
389389
for (u32 i = 0; i < neighborGroups.size(); ++i)
390390
{
391391
D3DXVECTOR3 gbinormal(0, 0, 0);
392-
for (unsigned int t = 0; t < neighborGroups[i].size(); ++t) // for each triangle in the group,
392+
for (unsigned int t = 0; t < neighborGroups[i].size(); ++t) // for each triangle in the group,
393393
{
394394
TriID tID = neighborGroups[i][t];
395395
gbinormal += m_Triangles[tID].binormal;
@@ -406,10 +406,10 @@ void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector<Ver
406406
TriangleList& curGroup = neighborGroups[i];
407407
xr_set<size_t> thisGroupIndices;
408408

409-
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
409+
for (size_t t = 0; t < curGroup.size(); ++t) // for each tri
410410
{
411411
TriID tID = curGroup[t];
412-
for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri
412+
for (size_t indx = 0; indx < 3; ++indx) // for each vert in that tri
413413
{
414414
// if it is at the positions in question
415415
if (theVerts[m_Triangles[tID].indices[indx]].pos == workingPosition) {
@@ -482,9 +482,9 @@ bool MeshMender::Mend(xr_vector<Vertex>& theVerts, xr_vector<unsigned int>& theI
482482
return true;
483483
}
484484

485-
void MeshMender::BuildGroups(Triangle* tri, // the tri of interest
486-
TriangleList& possibleNeighbors, // all tris arround a vertex
487-
NeighborGroupList& neighborGroups, // the neighbor groups to be updated
485+
void MeshMender::BuildGroups(Triangle* tri, // the tri of interest
486+
TriangleList& possibleNeighbors, // all tris arround a vertex
487+
NeighborGroupList& neighborGroups, // the neighbor groups to be updated
488488
xr_vector<Vertex>& theVerts, CanSmoothChecker* smoothChecker, const float& minCreaseAngle)
489489
{
490490
if ((!tri) || (tri->handled)) return;
@@ -535,7 +535,7 @@ void MeshMender::FindNeighbors(Triangle* tri, TriangleList& possibleNeighbors, T
535535
{
536536
TriID tID = possibleNeighbors[n];
537537
Triangle* possible = &(m_Triangles[tID]);
538-
if (possible != tri) // check for myself
538+
if (possible != tri) // check for myself
539539
{
540540
if (SharesEdge(tri, possible, theVerts)) {
541541
theNeighbors.push_back(possible);
@@ -661,7 +661,7 @@ void MeshMender::SetUpData(xr_vector<Vertex>& theVerts, const xr_vector<unsigned
661661
// set up bin, norm, and tan
662662
SetUpFaceVectors(t, theVerts, computeNormals);
663663

664-
t.myID = m_Triangles.size(); // set id, to my index into m_Triangles
664+
t.myID = m_Triangles.size(); // set id, to my index into m_Triangles
665665
m_Triangles.push_back(t);
666666
}
667667

@@ -751,7 +751,7 @@ void MeshMender::OrthogonalizeTangentsAndBinormals(xr_vector<Vertex>& theVerts)
751751
float lenTan = D3DXVec3Length(&(theVerts[i].tangent));
752752
float lenBin = D3DXVec3Length(&(theVerts[i].binormal));
753753

754-
if ((lenTan <= 0.001f) || (lenBin <= 0.001f)) // should be approx 1.0f
754+
if ((lenTan <= 0.001f) || (lenBin <= 0.001f)) // should be approx 1.0f
755755
{
756756
// the tangent space is ill defined at this vertex
757757
// so we can generate a valid one based on the normal vector,

src/Common/NvMender2003/NVMeshMender.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ class MeshMender
187187
// respectExistingSplits - DONT_RESPECT_SPLITS means that neighboring triangles for smoothing will be determined
188188
// based on position and not on indices.
189189
// RESPECT_SPLITS means that neighboring triangles will be determined based on the indices of
190-
//the
190+
// the
191191
// triangle and not the positions of the vertices.
192192
// you can usually get better smoothing by not respecting existing splits
193193
// only respect them if you know they should be respected.
@@ -247,7 +247,7 @@ class MeshMender
247247
NeighborhoodID group;
248248
void Reset();
249249

250-
TriID myID; // a global id used to keep track of tris'
250+
TriID myID; // a global id used to keep track of tris'
251251
};
252252

253253
xr_vector<Triangle> m_Triangles;
@@ -270,9 +270,9 @@ class MeshMender
270270

271271
// function responsible for growing the neighbor hood groups
272272
// arround a vertex
273-
void BuildGroups(Triangle* tri, // the tri of interest
274-
TriangleList& possibleNeighbors, // all tris arround a vertex
275-
NeighborGroupList& neighborGroups, // the neighbor groups to be updated
273+
void BuildGroups(Triangle* tri, // the tri of interest
274+
TriangleList& possibleNeighbors, // all tris arround a vertex
275+
NeighborGroupList& neighborGroups, // the neighbor groups to be updated
276276
xr_vector<Vertex>& theVerts, CanSmoothChecker* smoothChecker, const float& minCreaseAngle);
277277

278278
// given 2 triangles, fill the two neighbor pointers with either

src/Common/NvMender2003/mender_input_output.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ static void fill_mender_input(const xr_vector<type_vertex>& vertices, const xr_v
3636
}
3737

3838
template <typename type_vertex, typename type_face>
39-
static void retrive_data_from_mender_otput(xr_vector<type_vertex>& vertices, // in-out
39+
static void retrive_data_from_mender_otput(xr_vector<type_vertex>& vertices, // in-out
4040
xr_vector<type_face>& faces, const xr_vector<MeshMender::Vertex>& theVerts,
4141
const xr_vector<unsigned int>& theIndices, const xr_vector<unsigned int>& mappingNewToOldVert)
4242
{
4343
xr_vector<type_vertex> old_vertices;
4444
{
4545
old_vertices.clear();
46-
old_vertices = vertices; // save old vertices to retrive through mappingNewToOldVert data that missing in
47-
// MeshMender::Vertex
46+
old_vertices = vertices; // save old vertices to retrive through mappingNewToOldVert data that missing in
47+
// MeshMender::Vertex
4848
// retriving data
4949
const u32 face_count = faces.size();
5050
for (u32 i = 0; i < face_count; ++i)

src/Common/face_smoth_flags.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ IC bool do_connect_faces_by_faces_edge_flags(
5252
if (start_edge_back != test_edge_back) return false;
5353

5454
bool start_edge_smooth =
55-
is_soft_edge(start_face_flags, start_common_edge_idx); //!( start.sm_group & (1<<start_common_face) );
55+
is_soft_edge(start_face_flags, start_common_edge_idx); //!( start.sm_group & (1<<start_common_face) );
5656
bool test_edge_smooth =
57-
is_soft_edge(test_face_flags, test_common_edge_idx); //!( test.sm_group & (1<<test_common_face) );
57+
is_soft_edge(test_face_flags, test_common_edge_idx); //!( test.sm_group & (1<<test_common_face) );
5858
return start_edge_smooth && test_edge_smooth;
5959
}
6060

src/Common/object_type_traits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,4 @@ struct is_stl_container
249249
// };
250250
// };
251251
};
252-
#endif // object_type_traits_h_included
252+
#endif // object_type_traits_h_included

src/Include/editor/engine.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ class engine
6969

7070
virtual char const* weather_current_time() const = 0;
7171
virtual void weather_current_time(char const*) = 0;
72-
}; // class engine
72+
}; // class engine
7373

74-
} // namespace editor
74+
} // namespace editor
7575

76-
#endif // ifndef EDITOR_ENGINE_HPP_INCLUDED
76+
#endif // ifndef EDITOR_ENGINE_HPP_INCLUDED

src/Include/editor/ide.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class ide
3939
virtual void weather_editor_setup(weathers_getter_type const& weathers_getter,
4040
weathers_size_getter_type const& weathers_size_getter, frames_getter_type const& frames_getter,
4141
frames_size_getter_type const& frames_size_getter) = 0;
42-
}; // class ide
42+
}; // class ide
4343

44-
} // namespace editor
44+
} // namespace editor
4545

46-
#endif // ifndef EDITOR_IDE_HPP_INCLUDED
46+
#endif // ifndef EDITOR_IDE_HPP_INCLUDED

src/Include/editor/interfaces.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ class engine;
1717
typedef void(__cdecl* initialize_function_ptr)(ide*&, engine*);
1818
typedef void(__cdecl* finalize_function_ptr)(ide*&);
1919

20-
} // namespace editor
20+
} // namespace editor
2121

22-
#endif // ifndef EDITOR_INTERFACES_HPP_INCLUDED
22+
#endif // ifndef EDITOR_INTERFACES_HPP_INCLUDED

0 commit comments

Comments
 (0)