mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
Codechange: Call BSWAP32() in the default_grf_overrides initializer.
This causes the BSWAP32 calls to happen only on first initialisation (BSWAP32 is not constexpr), instead of every time GRFs are reloaded.
This commit is contained in:
parent
b090c8e9bd
commit
e22eb89b92
@ -10076,12 +10076,12 @@ void LoadNewGRF(uint load_index, uint num_baseset)
|
||||
|
||||
if (stage == GLS_RESERVE) {
|
||||
static const std::pair<uint32_t, uint32_t> default_grf_overrides[] = {
|
||||
{ 0x44442202, 0x44440111 }, // UKRS addons modifies UKRS
|
||||
{ 0x6D620402, 0x6D620401 }, // DBSetXL ECS extension modifies DBSetXL
|
||||
{ 0x4D656f20, 0x4D656F17 }, // LV4cut modifies LV4
|
||||
{ BSWAP32(0x44442202), BSWAP32(0x44440111) }, // UKRS addons modifies UKRS
|
||||
{ BSWAP32(0x6D620402), BSWAP32(0x6D620401) }, // DBSetXL ECS extension modifies DBSetXL
|
||||
{ BSWAP32(0x4D656f20), BSWAP32(0x4D656F17) }, // LV4cut modifies LV4
|
||||
};
|
||||
for (const auto &grf_override : default_grf_overrides) {
|
||||
SetNewGRFOverride(BSWAP32(grf_override.first), BSWAP32(grf_override.second));
|
||||
SetNewGRFOverride(grf_override.first, grf_override.second);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user