Add cargo mask of town production cargoes

Use for all non-GUI cases (where display sort order is not required)
This commit is contained in:
Jonathan G Rennison
2024-02-19 03:49:35 +00:00
parent 8581808952
commit 19e4895ffd
6 changed files with 36 additions and 22 deletions

View File

@@ -725,7 +725,7 @@ public:
*/
uint GetDesiredInfoHeight(int width) const
{
uint aimed_height = static_cast<uint>(1 + CargoSpec::town_production_cargoes[TPE_PASSENGERS].size() + CargoSpec::town_production_cargoes[TPE_MAIL].size()) * GetCharacterHeight(FS_NORMAL);
uint aimed_height = static_cast<uint>(1 + CountBits(CargoSpec::town_production_cargo_mask[TPE_PASSENGERS] | CargoSpec::town_production_cargo_mask[TPE_MAIL])) * GetCharacterHeight(FS_NORMAL);
bool first = true;
for (int i = TAE_BEGIN; i < TAE_END; i++) {