1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Banner Refactor from NSF (#14788)

* Banner refactor

* Fix mistake in fix_duplicated_banners

* Reduce limit back

* Fix export

* Free banner on delete

* Increment network version

* Fix potential banner pointer crashes

Co-authored-by: Ted John <ted@brambles.org>
This commit is contained in:
Duncan
2021-07-27 10:25:58 +01:00
committed by GitHub
parent 399bd15d5e
commit e9eb1b8304
29 changed files with 415 additions and 305 deletions

View File

@@ -1259,15 +1259,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons
int32_t staffCount = GetEntityListCount(EntityType::Staff);
int32_t bannerCount = 0;
for (BannerIndex i = 0; i < MAX_BANNERS; ++i)
{
auto banner = GetBanner(i);
if (!banner->IsNull())
{
bannerCount++;
}
}
auto bannerCount = GetNumBanners();
console.WriteFormatLine("Sprites: %d/%d", spriteCount, MAX_ENTITIES);
console.WriteFormatLine("Map Elements: %zu/%d", tileElementCount, MAX_TILE_ELEMENTS);