Codechange: Use EnumBitSet for TownFlags. (#14651)

This commit is contained in:
Peter Nelson
2025-09-22 20:04:55 +01:00
committed by dP
parent 148940cca6
commit 8dd7c6dba4
5 changed files with 31 additions and 35 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ static uint16_t TownHistoryHelper(const Town *t, CargoLabel label, uint period,
case 0x82: return ClampTo<uint16_t>(this->t->cache.population);
case 0x83: return GB(ClampTo<uint16_t>(this->t->cache.population), 8, 8);
case 0x8A: return this->t->grow_counter / Ticks::TOWN_GROWTH_TICKS;
case 0x92: return this->t->flags; // In original game, 0x92 and 0x93 are really one word. Since flags is a byte, this is to adjust
case 0x92: return this->t->flags.base(); // In original game, 0x92 and 0x93 are one word.
case 0x93: return 0;
case 0x94: return ClampTo<uint16_t>(this->t->cache.squared_town_zone_radius[to_underlying(HouseZone::TownEdge)]);
case 0x95: return GB(ClampTo<uint16_t>(this->t->cache.squared_town_zone_radius[to_underlying(HouseZone::TownEdge)]), 8, 8);