Adjust further code formatting

This commit is contained in:
Clang Format
2023-11-19 21:59:57 +01:00
committed by Jan
parent d5f881be04
commit c858695f0c
96 changed files with 4036 additions and 2241 deletions

View File

@ -9,11 +9,12 @@
using namespace IW4;
const char* GameAssetPoolIW4::ASSET_TYPE_NAMES[]{
"physpreset", "physcollmap", "xanim", "xmodelsurfs", "xmodel", "material", "pixelshader", "vertexshader", "vertexdecl", "techniqueset",
"image", "sound", "soundcurve", "loadedsound", "clipmap", "clipmap", "comworld", "gameworldsp", "gameworldmp", "mapents",
"fxworld", "gfxworld", "lightdef", "uimap", "font", "menulist", "menu", "localize", "weapon", "snddriverglobals",
"fx", "impactfx", "aitype", "mptype", "character", "xmodelalias", "rawfile", "stringtable", "leaderboard", "structureddatadef",
"tracer", "vehicle", "addonmapents"};
"physpreset", "physcollmap", "xanim", "xmodelsurfs", "xmodel", "material", "pixelshader", "vertexshader", "vertexdecl", "techniqueset",
"image", "sound", "soundcurve", "loadedsound", "clipmap", "clipmap", "comworld", "gameworldsp", "gameworldmp", "mapents",
"fxworld", "gfxworld", "lightdef", "uimap", "font", "menulist", "menu", "localize", "weapon", "snddriverglobals",
"fx", "impactfx", "aitype", "mptype", "character", "xmodelalias", "rawfile", "stringtable", "leaderboard", "structureddatadef",
"tracer", "vehicle", "addonmapents",
};
/*
Asset Pool Table

View File

@ -37,7 +37,8 @@ namespace IW4
0x89, 0x76, 0x11, 0xFD, 0x1B, 0x83, 0xE4, 0xE8, 0x8E, 0x7E, 0xB4, 0x03, 0xA3, 0x29, 0xDD, 0x4F, 0xAC, 0x99, 0xBE, 0x7C, 0xD3, 0xFD, 0x14,
0x28, 0x1C, 0x59, 0x69, 0xE0, 0x79, 0x5F, 0x4B, 0xDA, 0x6B, 0xAB, 0x48, 0x4E, 0x28, 0x39, 0x84, 0xC6, 0x2B, 0xC6, 0x20, 0x05, 0xDB, 0x05,
0x21, 0xC3, 0xE1, 0xD4, 0x20, 0x28, 0xDD, 0x3A, 0x4D, 0x51, 0xE7, 0x49, 0x8A, 0x49, 0xEF, 0xF5, 0xDA, 0xDA, 0x7D, 0x5D, 0xA8, 0x0B, 0xA1,
0x77, 0xCD, 0x62, 0x7D, 0x9D, 0x40, 0x26, 0x44, 0x4B, 0x3B, 0x0A, 0x89, 0x02, 0x03, 0x01, 0x00, 0x01};
0x77, 0xCD, 0x62, 0x7D, 0x9D, 0x40, 0x26, 0x44, 0x4B, 0x3B, 0x0A, 0x89, 0x02, 0x03, 0x01, 0x00, 0x01,
};
static constexpr size_t AUTHED_CHUNK_SIZE = 0x2000;
static constexpr unsigned AUTHED_CHUNK_COUNT_PER_GROUP = 256;

View File

@ -8,52 +8,54 @@
using namespace IW5;
const char* GameAssetPoolIW5::ASSET_TYPE_NAMES[]{"physpreset",
"physcollmap",
"xanim",
"xmodelsurfs",
"xmodel",
"material",
"pixelshader",
"vertexshader",
"vertexdecl",
"techniqueset",
"image",
"sound",
"soundcurve",
"loadedsound",
"clipmap",
"comworld",
"glassworld",
"pathdata",
"vehicletrack",
"mapents",
"fxworld",
"gfxworld",
"lightdef",
"uimap",
"font",
"menulist",
"menu",
"localize",
"attachment",
"weapon",
"snddriverglobals",
"fx",
"impactfx",
"surfacefx",
"aitype",
"mptype",
"character",
"xmodelalias",
"rawfile",
"scriptfile",
"stringtable",
"leaderboard",
"structureddatadef",
"tracer",
"vehicle",
"addonmapents"};
const char* GameAssetPoolIW5::ASSET_TYPE_NAMES[]{
"physpreset",
"physcollmap",
"xanim",
"xmodelsurfs",
"xmodel",
"material",
"pixelshader",
"vertexshader",
"vertexdecl",
"techniqueset",
"image",
"sound",
"soundcurve",
"loadedsound",
"clipmap",
"comworld",
"glassworld",
"pathdata",
"vehicletrack",
"mapents",
"fxworld",
"gfxworld",
"lightdef",
"uimap",
"font",
"menulist",
"menu",
"localize",
"attachment",
"weapon",
"snddriverglobals",
"fx",
"impactfx",
"surfacefx",
"aitype",
"mptype",
"character",
"xmodelalias",
"rawfile",
"scriptfile",
"stringtable",
"leaderboard",
"structureddatadef",
"tracer",
"vehicle",
"addonmapents",
};
/*
Asset Pool Table

View File

@ -34,7 +34,8 @@ namespace IW5
0x89, 0x76, 0x11, 0xFD, 0x1B, 0x83, 0xE4, 0xE8, 0x8E, 0x7E, 0xB4, 0x03, 0xA3, 0x29, 0xDD, 0x4F, 0xAC, 0x99, 0xBE, 0x7C, 0xD3, 0xFD, 0x14,
0x28, 0x1C, 0x59, 0x69, 0xE0, 0x79, 0x5F, 0x4B, 0xDA, 0x6B, 0xAB, 0x48, 0x4E, 0x28, 0x39, 0x84, 0xC6, 0x2B, 0xC6, 0x20, 0x05, 0xDB, 0x05,
0x21, 0xC3, 0xE1, 0xD4, 0x20, 0x28, 0xDD, 0x3A, 0x4D, 0x51, 0xE7, 0x49, 0x8A, 0x49, 0xEF, 0xF5, 0xDA, 0xDA, 0x7D, 0x5D, 0xA8, 0x0B, 0xA1,
0x77, 0xCD, 0x62, 0x7D, 0x9D, 0x40, 0x26, 0x44, 0x4B, 0x3B, 0x0A, 0x89, 0x02, 0x03, 0x01, 0x00, 0x01};
0x77, 0xCD, 0x62, 0x7D, 0x9D, 0x40, 0x26, 0x44, 0x4B, 0x3B, 0x0A, 0x89, 0x02, 0x03, 0x01, 0x00, 0x01,
};
static constexpr size_t AUTHED_CHUNK_SIZE = 0x2000;
static constexpr unsigned AUTHED_CHUNK_COUNT_PER_GROUP = 256;

View File

@ -15,7 +15,8 @@ const char* GameAssetPoolT5::ASSET_TYPE_NAMES[]{
"menulist", "menu", "localize", "weapon", "weapondef", "weaponvariant", "snddriverglobals",
"fx", "fximpacttable", "aitype", "mptype", "mpbody", "mphead", "character",
"xmodelalias", "rawfile", "stringtable", "packindex", "xglobals", "ddl", "glasses",
"emblemset"};
"emblemset",
};
GameAssetPoolT5::GameAssetPoolT5(Zone* zone, const int priority)
: ZoneAssetPools(zone),

View File

@ -8,66 +8,68 @@
using namespace T6;
const char* GameAssetPoolT6::ASSET_TYPE_NAMES[]{"xmodelpieces",
"physpreset",
"physconstraints",
"destructibledef",
"xanim",
"xmodel",
"material",
"techniqueset",
"image",
"soundbank",
"soundpatch",
"clipmap",
"clipmap",
"comworld",
"gameworldsp",
"gameworldmp",
"mapents",
"gfxworld",
"gfxlightdef",
"uimap",
"font",
"fonticon",
"menulist",
"menu",
"localize",
"weapon",
"weapondef",
"weaponvariant",
"weaponfull",
"attachment",
"attachmentunique",
"camo",
"snddriverglobals",
"fx",
"fximpacttable",
"aitype",
"mptype",
"mpbody",
"mphead",
"character",
"xmodelalias",
"rawfile",
"stringtable",
"leaderboard",
"xglobals",
"ddl",
"glasses",
"emblemset",
"script",
"keyvaluepairs",
"vehicle",
"memoryblock",
"addonmapents",
"tracer",
"skinnedverts",
"qdb",
"slug",
"footsteptable",
"footstepfxtable",
"zbarrier"};
const char* GameAssetPoolT6::ASSET_TYPE_NAMES[]{
"xmodelpieces",
"physpreset",
"physconstraints",
"destructibledef",
"xanim",
"xmodel",
"material",
"techniqueset",
"image",
"soundbank",
"soundpatch",
"clipmap",
"clipmap",
"comworld",
"gameworldsp",
"gameworldmp",
"mapents",
"gfxworld",
"gfxlightdef",
"uimap",
"font",
"fonticon",
"menulist",
"menu",
"localize",
"weapon",
"weapondef",
"weaponvariant",
"weaponfull",
"attachment",
"attachmentunique",
"camo",
"snddriverglobals",
"fx",
"fximpacttable",
"aitype",
"mptype",
"mpbody",
"mphead",
"character",
"xmodelalias",
"rawfile",
"stringtable",
"leaderboard",
"xglobals",
"ddl",
"glasses",
"emblemset",
"script",
"keyvaluepairs",
"vehicle",
"memoryblock",
"addonmapents",
"tracer",
"skinnedverts",
"qdb",
"slug",
"footsteptable",
"footstepfxtable",
"zbarrier",
};
GameAssetPoolT6::GameAssetPoolT6(Zone* zone, const int priority)
: ZoneAssetPools(zone),

View File

@ -34,8 +34,10 @@ namespace T6
static constexpr size_t FILE_SUFFIX_ZERO_ALIGN = 0x40;
static constexpr const char* MAGIC_AUTH_HEADER = "PHEEBs71";
inline static const uint8_t SALSA20_KEY_TREYARCH[]{0x64, 0x1D, 0x8A, 0x2F, 0xE3, 0x1D, 0x3A, 0xA6, 0x36, 0x22, 0xBB, 0xC9, 0xCE, 0x85, 0x87, 0x22,
0x9D, 0x42, 0xB0, 0xF8, 0xED, 0x9B, 0x92, 0x41, 0x30, 0xBF, 0x88, 0xB6, 0x5E, 0xDC, 0x50, 0xBE};
inline static const uint8_t SALSA20_KEY_TREYARCH[]{
0x64, 0x1D, 0x8A, 0x2F, 0xE3, 0x1D, 0x3A, 0xA6, 0x36, 0x22, 0xBB, 0xC9, 0xCE, 0x85, 0x87, 0x22,
0x9D, 0x42, 0xB0, 0xF8, 0xED, 0x9B, 0x92, 0x41, 0x30, 0xBF, 0x88, 0xB6, 0x5E, 0xDC, 0x50, 0xBE,
};
inline static const uint8_t RSA_PUBLIC_KEY_TREYARCH[]{
0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xc7, 0x9d, 0x33, 0xe0, 0x75, 0xaf, 0xef, 0x08, 0x08, 0x2b, 0x89, 0xd9, 0x3b, 0xf3,
@ -49,6 +51,7 @@ namespace T6
0x12, 0x69, 0x1e, 0xdb, 0x2d, 0x3e, 0xbd, 0x48, 0x16, 0xe1, 0x72, 0x37, 0xb8, 0x5f, 0x61, 0xfa, 0x24, 0x16, 0x3a, 0xde, 0xbf, 0x6a, 0x71,
0x62, 0x32, 0xf3, 0xaa, 0x7f, 0x28, 0x3a, 0x0c, 0x27, 0xeb, 0xa9, 0x0a, 0x4c, 0x79, 0x88, 0x84, 0xb3, 0xe2, 0x52, 0xb9, 0x68, 0x1e, 0x82,
0xcf, 0x67, 0x43, 0xf3, 0x68, 0xf7, 0x26, 0x19, 0xaa, 0xdd, 0x3f, 0x1e, 0xc6, 0x46, 0x11, 0x9f, 0x24, 0x23, 0xa7, 0xb0, 0x1b, 0x79, 0xa7,
0x0c, 0x5a, 0xfe, 0x96, 0xf7, 0xe7, 0x88, 0x09, 0xa6, 0x69, 0xe3, 0x8b, 0x02, 0x03, 0x01, 0x00, 0x01};
0x0c, 0x5a, 0xfe, 0x96, 0xf7, 0xe7, 0x88, 0x09, 0xa6, 0x69, 0xe3, 0x8b, 0x02, 0x03, 0x01, 0x00, 0x01,
};
};
} // namespace T6

View File

@ -6,7 +6,11 @@ SequenceZoneDefinitionAssetList::SequenceZoneDefinitionAssetList()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Keyword("assetlist"), create.Char(','), create.Field().Capture(CAPTURE_ASSET_LIST_NAME)});
AddMatchers({
create.Keyword("assetlist"),
create.Char(','),
create.Field().Capture(CAPTURE_ASSET_LIST_NAME),
});
}
void SequenceZoneDefinitionAssetList::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -6,7 +6,11 @@ SequenceZoneDefinitionBuild::SequenceZoneDefinitionBuild()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Keyword("build"), create.Char(','), create.Field().Capture(CAPTURE_BUILD_TARGET_NAME)});
AddMatchers({
create.Keyword("build"),
create.Char(','),
create.Field().Capture(CAPTURE_BUILD_TARGET_NAME),
});
}
void SequenceZoneDefinitionBuild::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -6,10 +6,17 @@ SequenceZoneDefinitionEntry::SequenceZoneDefinitionEntry()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Field().Capture(CAPTURE_TYPE_NAME),
create.Char(','),
create.Optional(create.Char(',').Tag(TAG_REFERENCE)),
create.Or({create.String(), create.Field()}).Capture(CAPTURE_ASSET_NAME)});
AddMatchers({
create.Field().Capture(CAPTURE_TYPE_NAME),
create.Char(','),
create.Optional(create.Char(',').Tag(TAG_REFERENCE)),
create
.Or({
create.String(),
create.Field(),
})
.Capture(CAPTURE_ASSET_NAME),
});
}
void SequenceZoneDefinitionEntry::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -6,7 +6,11 @@ SequenceZoneDefinitionIgnore::SequenceZoneDefinitionIgnore()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Keyword("ignore"), create.Char(','), create.Field().Capture(CAPTURE_IGNORE_NAME)});
AddMatchers({
create.Keyword("ignore"),
create.Char(','),
create.Field().Capture(CAPTURE_IGNORE_NAME),
});
}
void SequenceZoneDefinitionIgnore::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -6,7 +6,11 @@ SequenceZoneDefinitionInclude::SequenceZoneDefinitionInclude()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Keyword("include"), create.Char(','), create.Field().Capture(CAPTURE_INCLUDE_NAME)});
AddMatchers({
create.Keyword("include"),
create.Char(','),
create.Field().Capture(CAPTURE_INCLUDE_NAME),
});
}
void SequenceZoneDefinitionInclude::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -6,7 +6,12 @@ SequenceZoneDefinitionMetaData::SequenceZoneDefinitionMetaData()
{
const ZoneDefinitionMatcherFactory create(this);
AddMatchers({create.Char('>'), create.Field().Capture(CAPTURE_KEY), create.Char(','), create.Field().Capture(CAPTURE_VALUE)});
AddMatchers({
create.Char('>'),
create.Field().Capture(CAPTURE_KEY),
create.Char(','),
create.Field().Capture(CAPTURE_VALUE),
});
}
void SequenceZoneDefinitionMetaData::ProcessMatch(ZoneDefinition* state, SequenceResult<ZoneDefinitionParserValue>& result) const

View File

@ -14,12 +14,14 @@ ZoneDefinitionParser::ZoneDefinitionParser(ZoneDefinitionLexer* lexer)
const std::vector<AbstractParser<ZoneDefinitionParserValue, ZoneDefinition>::sequence_t*>& ZoneDefinitionParser::GetTestsForState()
{
static std::vector<sequence_t*> tests({new SequenceZoneDefinitionMetaData(),
new SequenceZoneDefinitionInclude(),
new SequenceZoneDefinitionIgnore(),
new SequenceZoneDefinitionAssetList(),
new SequenceZoneDefinitionBuild(),
new SequenceZoneDefinitionEntry()});
static std::vector<sequence_t*> tests({
new SequenceZoneDefinitionMetaData(),
new SequenceZoneDefinitionInclude(),
new SequenceZoneDefinitionIgnore(),
new SequenceZoneDefinitionAssetList(),
new SequenceZoneDefinitionBuild(),
new SequenceZoneDefinitionEntry(),
});
return tests;
}