[General] Use preincrement
This commit is contained in:
parent
cdf759736f
commit
7c728b4658
@ -6,7 +6,7 @@ namespace Assets
|
|||||||
{
|
{
|
||||||
Game::MenuList *asset = header.menuList;
|
Game::MenuList *asset = header.menuList;
|
||||||
|
|
||||||
for (int i = 0; i < asset->menuCount; i++)
|
for (int i = 0; i < asset->menuCount; ++i)
|
||||||
{
|
{
|
||||||
if (asset->menus[i])
|
if (asset->menus[i])
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ namespace Assets
|
|||||||
Game::menuDef_t **destMenus = buffer->dest<Game::menuDef_t*>();
|
Game::menuDef_t **destMenus = buffer->dest<Game::menuDef_t*>();
|
||||||
buffer->saveArray(asset->menus, asset->menuCount);
|
buffer->saveArray(asset->menus, asset->menuCount);
|
||||||
|
|
||||||
for (int i = 0; i < asset->menuCount; i++)
|
for (int i = 0; i < asset->menuCount; ++i)
|
||||||
{
|
{
|
||||||
destMenus[i] = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_MENU, asset->menus[i]).menu;
|
destMenus[i] = builder->saveSubAsset(Game::XAssetType::ASSET_TYPE_MENU, asset->menus[i]).menu;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace Assets
|
|||||||
buffer->align(Utils::Stream::ALIGN_4);
|
buffer->align(Utils::Stream::ALIGN_4);
|
||||||
|
|
||||||
// not sure if this is neede but both brushside and brushedge need it and it can't hurt
|
// not sure if this is neede but both brushside and brushedge need it and it can't hurt
|
||||||
for (int i = 0; i < asset->numCPlanes; i++)
|
for (int i = 0; i < asset->numCPlanes; ++i)
|
||||||
{
|
{
|
||||||
builder->storePointer(&asset->cPlanes[i]);
|
builder->storePointer(&asset->cPlanes[i]);
|
||||||
buffer->save(&asset->cPlanes[i]);
|
buffer->save(&asset->cPlanes[i]);
|
||||||
|
@ -12,7 +12,7 @@ namespace Assets
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mark items
|
// mark items
|
||||||
for (int i = 0; i < asset->itemCount; i++)
|
for (int i = 0; i < asset->itemCount; ++i)
|
||||||
{
|
{
|
||||||
if (asset->items[i]->window.background)
|
if (asset->items[i]->window.background)
|
||||||
{
|
{
|
||||||
@ -49,7 +49,7 @@ namespace Assets
|
|||||||
Game::Statement_s **destStatement = buffer->dest<Game::Statement_s*>();
|
Game::Statement_s **destStatement = buffer->dest<Game::Statement_s*>();
|
||||||
buffer->saveArray(asset->uifunctions.functions, asset->uifunctions.totalFunctions);
|
buffer->saveArray(asset->uifunctions.functions, asset->uifunctions.totalFunctions);
|
||||||
|
|
||||||
for (int i = 0; i < asset->uifunctions.totalFunctions; i++)
|
for (int i = 0; i < asset->uifunctions.totalFunctions; ++i)
|
||||||
{
|
{
|
||||||
if (asset->uifunctions.functions[i])
|
if (asset->uifunctions.functions[i])
|
||||||
{
|
{
|
||||||
@ -70,7 +70,7 @@ namespace Assets
|
|||||||
Game::StaticDvar **destStaticDvars = buffer->dest<Game::StaticDvar*>();
|
Game::StaticDvar **destStaticDvars = buffer->dest<Game::StaticDvar*>();
|
||||||
buffer->saveArray(asset->staticDvarList.staticDvars, asset->staticDvarList.numStaticDvars);
|
buffer->saveArray(asset->staticDvarList.staticDvars, asset->staticDvarList.numStaticDvars);
|
||||||
|
|
||||||
for (int i = 0; i < asset->staticDvarList.numStaticDvars; i++)
|
for (int i = 0; i < asset->staticDvarList.numStaticDvars; ++i)
|
||||||
{
|
{
|
||||||
if (asset->staticDvarList.staticDvars[i])
|
if (asset->staticDvarList.staticDvars[i])
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ namespace Assets
|
|||||||
const char **destuiStrings = buffer->dest<const char*>();
|
const char **destuiStrings = buffer->dest<const char*>();
|
||||||
buffer->saveArray(asset->uiStrings.strings, asset->uiStrings.totalStrings);
|
buffer->saveArray(asset->uiStrings.strings, asset->uiStrings.totalStrings);
|
||||||
|
|
||||||
for (int i = 0; i < asset->uiStrings.totalStrings; i++)
|
for (int i = 0; i < asset->uiStrings.totalStrings; ++i)
|
||||||
{
|
{
|
||||||
if (asset->uiStrings.strings[i])
|
if (asset->uiStrings.strings[i])
|
||||||
{
|
{
|
||||||
@ -128,7 +128,7 @@ namespace Assets
|
|||||||
buffer->save(asset->entries, sizeof(Game::expressionEntry), asset->numEntries);
|
buffer->save(asset->entries, sizeof(Game::expressionEntry), asset->numEntries);
|
||||||
|
|
||||||
// Loop through entries
|
// Loop through entries
|
||||||
for (int i = 0; i < asset->numEntries; i++)
|
for (int i = 0; i < asset->numEntries; ++i)
|
||||||
{
|
{
|
||||||
if (asset->entries[i].type)
|
if (asset->entries[i].type)
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@ namespace Assets
|
|||||||
buffer->save(asset->eventHandlers, sizeof(Game::MenuEventHandler*), asset->eventHandlerCount);
|
buffer->save(asset->eventHandlers, sizeof(Game::MenuEventHandler*), asset->eventHandlerCount);
|
||||||
|
|
||||||
// Loop through eventHandlers
|
// Loop through eventHandlers
|
||||||
for (int i = 0; i < asset->eventHandlerCount; i++)
|
for (int i = 0; i < asset->eventHandlerCount; ++i)
|
||||||
{
|
{
|
||||||
if (asset->eventHandlers[i])
|
if (asset->eventHandlers[i])
|
||||||
{
|
{
|
||||||
@ -392,7 +392,7 @@ namespace Assets
|
|||||||
Game::multiDef_s* destdef = buffer->dest<Game::multiDef_s>();
|
Game::multiDef_s* destdef = buffer->dest<Game::multiDef_s>();
|
||||||
buffer->save(asset->multiDef);
|
buffer->save(asset->multiDef);
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < 32; ++i)
|
||||||
{
|
{
|
||||||
if (asset->multiDef->dvarList[i])
|
if (asset->multiDef->dvarList[i])
|
||||||
{
|
{
|
||||||
@ -401,7 +401,7 @@ namespace Assets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < 32; ++i)
|
||||||
{
|
{
|
||||||
if (asset->multiDef->dvarStr[i])
|
if (asset->multiDef->dvarStr[i])
|
||||||
{
|
{
|
||||||
@ -504,7 +504,7 @@ namespace Assets
|
|||||||
Game::ItemFloatExpression* destExp = buffer->dest<Game::ItemFloatExpression>();
|
Game::ItemFloatExpression* destExp = buffer->dest<Game::ItemFloatExpression>();
|
||||||
buffer->saveArray(asset->floatExpressions, asset->floatExpressionCount);
|
buffer->saveArray(asset->floatExpressions, asset->floatExpressionCount);
|
||||||
|
|
||||||
for (int i = 0; i < asset->floatExpressionCount; i++)
|
for (int i = 0; i < asset->floatExpressionCount; ++i)
|
||||||
{
|
{
|
||||||
buffer->align(Utils::Stream::ALIGN_4);
|
buffer->align(Utils::Stream::ALIGN_4);
|
||||||
this->save_Statement_s(asset->floatExpressions[i].expression, builder);
|
this->save_Statement_s(asset->floatExpressions[i].expression, builder);
|
||||||
@ -594,7 +594,7 @@ namespace Assets
|
|||||||
buffer->align(Utils::Stream::ALIGN_4);
|
buffer->align(Utils::Stream::ALIGN_4);
|
||||||
buffer->saveArray(asset->items, asset->itemCount);
|
buffer->saveArray(asset->items, asset->itemCount);
|
||||||
|
|
||||||
for (int i = 0; i < asset->itemCount; i++)
|
for (int i = 0; i < asset->itemCount; ++i)
|
||||||
{
|
{
|
||||||
if (asset->items[i])
|
if (asset->items[i])
|
||||||
{
|
{
|
||||||
|
@ -144,7 +144,7 @@ namespace Components
|
|||||||
{
|
{
|
||||||
std::string list = Utils::String::VA("%c", 20);
|
std::string list = Utils::String::VA("%c", 20);
|
||||||
|
|
||||||
for (int i = 0; i < 18; i++)
|
for (int i = 0; i < 18; ++i)
|
||||||
{
|
{
|
||||||
if (Game::svs_clients[i].state >= 3)
|
if (Game::svs_clients[i].state >= 3)
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ namespace Components
|
|||||||
// check if we're connected to a server...
|
// check if we're connected to a server...
|
||||||
if (*reinterpret_cast<std::uint32_t*>(0xB2C540) >= 7)
|
if (*reinterpret_cast<std::uint32_t*>(0xB2C540) >= 7)
|
||||||
{
|
{
|
||||||
for (unsigned char i = 0; i < 7; i++)
|
for (unsigned char i = 0; i < 7; ++i)
|
||||||
{
|
{
|
||||||
Game::Com_Printf(0, "Sending stat packet %i to server.\n", i);
|
Game::Com_Printf(0, "Sending stat packet %i to server.\n", i);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace Utils
|
|||||||
|
|
||||||
if (Cache::ValidUrl.empty())
|
if (Cache::ValidUrl.empty())
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ARRAYSIZE(Cache::Urls); i++)
|
for (int i = 0; i < ARRAYSIZE(Cache::Urls); ++i)
|
||||||
{
|
{
|
||||||
std::string result = Utils::WebIO(useragent, Cache::GetUrl(Cache::Urls[i], path)).setTimeout(timeout)->get();
|
std::string result = Utils::WebIO(useragent, Cache::GetUrl(Cache::Urls[i], path)).setTimeout(timeout)->get();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user