Introduce SPR_DEFAULT_PALETTE

This commit is contained in:
Aaron van Geffen 2024-04-19 17:47:22 +02:00 committed by GitHub
parent 447805c8f4
commit 82c434358a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -781,13 +781,12 @@ void LoadPalette()
return;
}
uint32_t palette = SPR_DEFAULT_PALETTE;
auto water_type = OpenRCT2::ObjectManager::GetObjectEntry<WaterObjectEntry>(0);
uint32_t palette = 0x5FC;
if (water_type != nullptr)
{
Guard::Assert(water_type->image_id != 0xFFFFFFFF, "Failed to load water palette");
Guard::Assert(water_type->image_id != ImageIndexUndefined, "Failed to load water palette");
palette = water_type->image_id;
}

View File

@ -19,6 +19,8 @@ enum
// Used for on-demand drawing of dynamic memory
SPR_TEMP = 0x7FFFE,
SPR_DEFAULT_PALETTE = 1532,
SPR_SCROLLING_TEXT_LEGACY_START = 1542,
SPR_SCROLLING_TEXT_LEGACY_END = SPR_SCROLLING_TEXT_LEGACY_START + OpenRCT2::MaxScrollingTextLegacyEntries,
SPR_SCROLLING_TEXT_DEFAULT = 1574,