1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Remove snake_case from second chunk of Drawing (#19166)

This commit is contained in:
Duncan
2023-01-16 18:52:17 +00:00
committed by GitHub
parent 8a8d3105f3
commit 7f5934cc95
109 changed files with 502 additions and 504 deletions

View File

@@ -47,7 +47,7 @@ struct ImageTable::RequiredImage
RequiredImage(const rct_g1_element& orig)
{
auto length = g1_calculate_data_size(&orig);
auto length = G1CalculateDataSize(&orig);
g1 = orig;
g1.offset = new uint8_t[length];
std::memcpy(g1.offset, orig.offset, length);
@@ -59,7 +59,7 @@ struct ImageTable::RequiredImage
auto orig = getter(idx);
if (orig != nullptr)
{
auto length = g1_calculate_data_size(orig);
auto length = G1CalculateDataSize(orig);
g1 = *orig;
g1.offset = new uint8_t[length];
std::memcpy(g1.offset, orig->offset, length);
@@ -94,13 +94,13 @@ std::vector<std::unique_ptr<ImageTable::RequiredImage>> ImageTable::ParseImages(
auto range = ParseRange(s.substr(4));
if (!range.empty())
{
if (is_csg_loaded())
if (IsCsgLoaded())
{
for (auto i : range)
{
result.push_back(std::make_unique<RequiredImage>(
static_cast<uint32_t>(SPR_CSG_BEGIN + i),
[](uint32_t idx) -> const rct_g1_element* { return gfx_get_g1_element(idx); }));
[](uint32_t idx) -> const rct_g1_element* { return GfxGetG1Element(idx); }));
}
}
else
@@ -123,7 +123,7 @@ std::vector<std::unique_ptr<ImageTable::RequiredImage>> ImageTable::ParseImages(
for (auto i : range)
{
result.push_back(std::make_unique<RequiredImage>(
static_cast<uint32_t>(i), [](uint32_t idx) -> const rct_g1_element* { return gfx_get_g1_element(idx); }));
static_cast<uint32_t>(i), [](uint32_t idx) -> const rct_g1_element* { return GfxGetG1Element(idx); }));
}
}
}
@@ -542,7 +542,7 @@ bool ImageTable::ReadJson(IReadObjectContext* context, json_t& root)
// First gather all the required images from inspecting the JSON
std::vector<std::unique_ptr<RequiredImage>> allImages;
auto jsonImages = root["images"];
if (!is_csg_loaded() && root.contains("noCsgImages"))
if (!IsCsgLoaded() && root.contains("noCsgImages"))
{
jsonImages = root["noCsgImages"];
usesFallbackSprites = true;
@@ -611,7 +611,7 @@ bool ImageTable::ReadJson(IReadObjectContext* context, json_t& root)
void ImageTable::AddImage(const rct_g1_element* g1)
{
rct_g1_element newg1 = *g1;
auto length = g1_calculate_data_size(g1);
auto length = G1CalculateDataSize(g1);
if (length == 0)
{
newg1.offset = nullptr;