Reformat the code, using:

find -type f |  # list all regular files
  grep -E '\.(h|cpp|mm)$' |  # filter for source files
  grep -v '/mt_' |  # filter out generated files
  grep -v '/vendor/' | # and vendored GL
  grep -v '/test/image_loader_test.cpp' |  # and this file (has giant literals arrays)
  xargs -n 1 -P $(nproc) clang-format -i  # reformat everything

Co-authored-by: numzero <numzer0@yandex.ru>
This commit is contained in:
Desour
2024-03-20 19:35:52 +01:00
parent eb4dec46c2
commit 2bf1d12353
292 changed files with 37376 additions and 42421 deletions

View File

@ -6,7 +6,6 @@
// File format designed by Mark Sibly for the Blitz3D engine and has been
// declared public domain
#pragma once
#include "IMeshLoader.h"
@ -25,35 +24,33 @@ namespace scene
class CB3DMeshFileLoader : public IMeshLoader
{
public:
//! Constructor
CB3DMeshFileLoader(scene::ISceneManager* smgr);
CB3DMeshFileLoader(scene::ISceneManager *smgr);
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".bsp")
bool isALoadableFileExtension(const io::path& filename) const override;
bool isALoadableFileExtension(const io::path &filename) const override;
//! creates/loads an animated mesh from the file.
//! \return Pointer to the created mesh. Returns 0 if loading failed.
//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
//! See IReferenceCounted::drop() for more information.
IAnimatedMesh* createMesh(io::IReadFile* file) override;
IAnimatedMesh *createMesh(io::IReadFile *file) override;
private:
bool load();
bool readChunkNODE(CSkinnedMesh::SJoint* InJoint);
bool readChunkMESH(CSkinnedMesh::SJoint* InJoint);
bool readChunkVRTS(CSkinnedMesh::SJoint* InJoint);
bool readChunkNODE(CSkinnedMesh::SJoint *InJoint);
bool readChunkMESH(CSkinnedMesh::SJoint *InJoint);
bool readChunkVRTS(CSkinnedMesh::SJoint *InJoint);
bool readChunkTRIS(scene::SSkinMeshBuffer *MeshBuffer, u32 MeshBufferID, s32 Vertices_Start);
bool readChunkBONE(CSkinnedMesh::SJoint* InJoint);
bool readChunkKEYS(CSkinnedMesh::SJoint* InJoint);
bool readChunkBONE(CSkinnedMesh::SJoint *InJoint);
bool readChunkKEYS(CSkinnedMesh::SJoint *InJoint);
bool readChunkANIM();
bool readChunkTEXS();
bool readChunkBRUS();
std::string readString();
void readFloats(f32* vec, u32 count);
void readFloats(f32 *vec, u32 count);
core::array<SB3dChunk> B3dStack;
@ -66,11 +63,11 @@ private:
core::array<video::S3DVertex2TCoords> BaseVertices;
CSkinnedMesh* AnimatedMesh;
io::IReadFile* B3DFile;
CSkinnedMesh *AnimatedMesh;
io::IReadFile *B3DFile;
//B3Ds have Vertex ID's local within the mesh I don't want this
// Variable needs to be class member due to recursion in calls
// B3Ds have Vertex ID's local within the mesh I don't want this
// Variable needs to be class member due to recursion in calls
u32 VerticesStart;
bool NormalsInFile;
@ -78,6 +75,5 @@ private:
bool ShowWarning;
};
} // end namespace scene
} // end namespace irr