mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
Reformat code with clang format
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
#include "CommonT6.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#include "Utils/Pack.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
int Common::Com_HashKey(const char* str, const int maxLen)
|
||||
@ -30,7 +30,7 @@ int Common::Com_HashString(const char* str)
|
||||
|
||||
auto result = 0x1505;
|
||||
auto offset = 0;
|
||||
while(str[offset])
|
||||
while (str[offset])
|
||||
{
|
||||
const auto c = tolower(str[offset++]);
|
||||
result = c + 33 * result;
|
||||
@ -46,7 +46,7 @@ int Common::Com_HashString(const char* str, const int len)
|
||||
|
||||
int result = 0x1505;
|
||||
int offset = 0;
|
||||
while(str[offset])
|
||||
while (str[offset])
|
||||
{
|
||||
if (len > 0 && offset >= len)
|
||||
break;
|
||||
@ -70,17 +70,17 @@ uint32_t Common::R_HashString(const char* str, uint32_t hash)
|
||||
|
||||
PackedTexCoords Common::Vec2PackTexCoords(const vec2_t* in)
|
||||
{
|
||||
return PackedTexCoords{ Pack32::Vec2PackTexCoords(in->v) };
|
||||
return PackedTexCoords{Pack32::Vec2PackTexCoords(in->v)};
|
||||
}
|
||||
|
||||
PackedUnitVec Common::Vec3PackUnitVec(const vec3_t* in)
|
||||
{
|
||||
return PackedUnitVec{ Pack32::Vec3PackUnitVec(in->v) };
|
||||
return PackedUnitVec{Pack32::Vec3PackUnitVec(in->v)};
|
||||
}
|
||||
|
||||
GfxColor Common::Vec4PackGfxColor(const vec4_t* in)
|
||||
{
|
||||
return GfxColor{ Pack32::Vec4PackGfxColor(in->v) };
|
||||
return GfxColor{Pack32::Vec4PackGfxColor(in->v)};
|
||||
}
|
||||
|
||||
void Common::Vec2UnpackTexCoords(const PackedTexCoords& in, vec2_t* out)
|
||||
@ -96,4 +96,4 @@ void Common::Vec3UnpackUnitVec(const PackedUnitVec& in, vec3_t* out)
|
||||
void Common::Vec4UnpackGfxColor(const GfxColor& in, vec4_t* out)
|
||||
{
|
||||
Pack32::Vec4UnpackGfxColor(in.packed, out->v);
|
||||
}
|
||||
}
|
||||
|
@ -19,4 +19,4 @@ namespace T6
|
||||
static void Vec3UnpackUnitVec(const PackedUnitVec& in, vec3_t* out);
|
||||
static void Vec4UnpackGfxColor(const GfxColor& in, vec4_t* out);
|
||||
};
|
||||
}
|
||||
} // namespace T6
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "GameT6.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "T6.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
GameT6 g_GameT6;
|
||||
|
@ -14,4 +14,4 @@ public:
|
||||
std::vector<GameLanguagePrefix> GetLanguagePrefixes() override;
|
||||
};
|
||||
|
||||
extern GameT6 g_GameT6;
|
||||
extern GameT6 g_GameT6;
|
||||
|
@ -1,10 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
//#include <d3d11.h>
|
||||
// clang-format off: Order of includes matters here
|
||||
|
||||
// #include <d3d11.h>
|
||||
#include "Image/Texture.h"
|
||||
|
||||
#include "T6_Assets.h"
|
||||
|
||||
// clang-format on
|
||||
|
||||
namespace T6
|
||||
{
|
||||
struct ScriptStringList
|
||||
@ -149,4 +153,4 @@ namespace T6
|
||||
AUFT_NUM_FIELD_TYPES,
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace T6
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user