1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Correct formatting in files from network to paint

This commit is contained in:
Hielke Morsink
2018-07-07 14:40:56 +02:00
parent 472320d8f3
commit fdc6e52da1
19 changed files with 270 additions and 128 deletions

View File

@@ -58,13 +58,18 @@ void WaterObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t hei
void WaterObject::ReadJson([[maybe_unused]] IReadObjectContext* context, const json_t* root)
{
auto properties = json_object_get(root, "properties");
_legacyType.flags = ObjectJsonHelpers::GetFlags<uint16_t>(properties, { { "allowDucks", WATER_FLAGS_ALLOW_DUCKS } });
_legacyType.flags = ObjectJsonHelpers::GetFlags<uint16_t>(
properties,
{
{ "allowDucks", WATER_FLAGS_ALLOW_DUCKS },
});
ObjectJsonHelpers::LoadStrings(root, GetStringTable());
// Images which are actually palette data
static const char* paletteNames[]
= { "general", "waves-0", "waves-1", "waves-2", "sparkles-0", "sparkles-1", "sparkles-2" };
static const char* paletteNames[] = {
"general", "waves-0", "waves-1", "waves-2", "sparkles-0", "sparkles-1", "sparkles-2",
};
for (auto paletteName : paletteNames)
{
auto jPalettes = json_object_get(properties, "palettes");