1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Refactor rct_palette to GamePalette

This commit is contained in:
Ted John
2020-05-27 20:12:01 +01:00
parent 10209690c2
commit 46bb30f8a1
18 changed files with 100 additions and 120 deletions

View File

@@ -200,10 +200,10 @@ namespace Imaging
}
for (size_t i = 0; i < PNG_MAX_PALETTE_LENGTH; i++)
{
const auto entry = &image.Palette->entries[i];
png_palette[i].blue = entry->blue;
png_palette[i].green = entry->green;
png_palette[i].red = entry->red;
const auto& entry = (*image.Palette)[static_cast<uint16_t>(i)];
png_palette[i].blue = entry.Blue;
png_palette[i].green = entry.Green;
png_palette[i].red = entry.Red;
}
png_set_PLTE(png_ptr, info_ptr, png_palette, PNG_MAX_PALETTE_LENGTH);
}