Reformat code with clang format

This commit is contained in:
Clang Format
2023-11-19 15:28:38 +01:00
committed by Jan
parent 22e17272fd
commit 6b4f5d94a8
1099 changed files with 16763 additions and 18076 deletions

View File

@ -22,17 +22,17 @@ int Common::StringTable_HashString(const char* str)
PackedTexCoords Common::Vec2PackTexCoords(const vec2_t* in)
{
return PackedTexCoords{ Pack32::Vec2PackTexCoords(reinterpret_cast<const float*>(in)) };
return PackedTexCoords{Pack32::Vec2PackTexCoords(reinterpret_cast<const float*>(in))};
}
PackedUnitVec Common::Vec3PackUnitVec(const vec3_t* in)
{
return PackedUnitVec{ Pack32::Vec3PackUnitVec(reinterpret_cast<const float*>(in)) };
return PackedUnitVec{Pack32::Vec3PackUnitVec(reinterpret_cast<const float*>(in))};
}
GfxColor Common::Vec4PackGfxColor(const vec4_t* in)
{
return GfxColor{ Pack32::Vec4PackGfxColor(reinterpret_cast<const float*>(in)) };
return GfxColor{Pack32::Vec4PackGfxColor(reinterpret_cast<const float*>(in))};
}
void Common::Vec2UnpackTexCoords(const PackedTexCoords& in, vec2_t* out)

View File

@ -16,4 +16,4 @@ namespace IW5
static void Vec3UnpackUnitVec(const PackedUnitVec& in, vec3_t* out);
static void Vec4UnpackGfxColor(const GfxColor& in, vec4_t* out);
};
}
} // namespace IW5

View File

@ -1,9 +1,9 @@
#include "GameIW5.h"
#include <algorithm>
#include "IW5.h"
#include <algorithm>
using namespace IW5;
GameIW5 g_GameIW5;

View File

@ -14,4 +14,4 @@ public:
std::vector<GameLanguagePrefix> GetLanguagePrefixes() override;
};
extern GameIW5 g_GameIW5;
extern GameIW5 g_GameIW5;

View File

@ -1,10 +1,14 @@
#pragma once
//#include <d3d11.h>
// clang-format off: Order of includes matters here
// #include <d3d9.h>
#include "Image/Texture.h"
#include "IW5_Assets.h"
// clang-format on
namespace IW5
{
struct DB_AuthHash
@ -26,11 +30,11 @@ namespace IW5
struct DB_AuthHeader
{
char magic[8]; // + 0
unsigned int reserved; // + 8
DB_AuthHash subheaderHash; // + 12
DB_AuthSignature signedSubheaderHash; // + 44
DB_AuthSubHeader subheader; // + 300
char magic[8]; // + 0
unsigned int reserved; // + 8
DB_AuthHash subheaderHash; // + 12
DB_AuthSignature signedSubheaderHash; // + 44
DB_AuthSubHeader subheader; // + 300
};
struct ScriptStringList
@ -79,4 +83,4 @@ namespace IW5
CSPFT_NUM_BASE_FIELD_TYPES,
};
}
} // namespace IW5

View File

@ -536,7 +536,7 @@ namespace IW5
uint16_t baseTriIndex;
uint16_t baseVertIndex;
float quantizeScale;
r_index16_t(*triIndices)[3];
r_index16_t (*triIndices)[3];
XSurfaceVertexInfo vertInfo;
GfxVertexUnion0 verts0;
unsigned int vertListCount;
@ -606,8 +606,8 @@ namespace IW5
unsigned int noScalePartBits[6];
ScriptString* boneNames;
unsigned char* parentList;
short(*quats)[4];
float(*trans)[3];
short (*quats)[4];
float (*trans)[3];
unsigned char* partClassification;
DObjAnimMat* baseMat;
Material** materialHandles;
@ -802,13 +802,13 @@ namespace IW5
char source;
char dest;
};
struct MaterialVertexStreamRouting
{
MaterialStreamRouting data[13];
void* decl[16];
};
struct MaterialVertexDeclaration
{
const char* name;
@ -843,7 +843,7 @@ namespace IW5
union MaterialArgumentDef
{
const float(*literalConst)[4];
const float (*literalConst)[4];
MaterialArgumentCodeConst codeConst;
unsigned int codeSampler;
unsigned int nameHash;
@ -1507,6 +1507,7 @@ namespace IW5
pathnode_t* pParent;
float fCost;
float fHeuristic;
union
{
float nodeCost;
@ -1659,6 +1660,7 @@ namespace IW5
FxSpatialFrame frame;
float radius;
};
unsigned int nextFree;
};
@ -1817,7 +1819,7 @@ namespace IW5
bool isAncestor;
unsigned char recursionDepth;
unsigned char hullPointCount;
float(*hullPoints)[2];
float (*hullPoints)[2];
GfxPortal* queuedParent;
};
@ -2173,7 +2175,7 @@ namespace IW5
unsigned int sortKeyEffectAuto;
unsigned int sortKeyDistortion;
GfxWorldDpvsPlanes dpvsPlanes;
int/*GfxCellTreeCount*/* aabbTreeCounts;
int /*GfxCellTreeCount*/* aabbTreeCounts;
GfxCellTree128* aabbTrees;
GfxCell* cells;
GfxWorldDraw draw;
@ -2569,8 +2571,8 @@ namespace IW5
WINDOW_FLAG_POPUP = 0x1000000,
WINDOW_FLAG_LEGACY_SPLIT_SCREEN_SCALE = 0x4000000,
WINDOW_FLAG_HIDDEN_DURING_FLASH_BANG = 0x10000000, // confirmed
WINDOW_FLAG_HIDDEN_DURING_SCOPE = 0x20000000, // confirmed
WINDOW_FLAG_HIDDEN_DURING_UI = 0x40000000, // confirmed
WINDOW_FLAG_HIDDEN_DURING_SCOPE = 0x20000000, // confirmed
WINDOW_FLAG_HIDDEN_DURING_UI = 0x40000000, // confirmed
WINDOW_FLAG_TEXT_ONLY_FOCUS = 0x80000000,
};