Show image limit in show_limits console command (#9935)

This commit is contained in:
Ted John 2019-08-26 12:28:37 +01:00 committed by GitHub
parent e19b3f5680
commit 9be0130f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 0 deletions

View File

@ -310,6 +310,8 @@ bool is_csg_loaded();
uint32_t gfx_object_allocate_images(const rct_g1_element* images, uint32_t count);
void gfx_object_free_images(uint32_t baseImageId, uint32_t count);
void gfx_object_check_all_images_freed();
size_t ImageListGetUsedCount();
size_t ImageListGetMaximum();
void FASTCALL gfx_bmp_sprite_to_buffer(
const uint8_t* palette_pointer, uint8_t* source_pointer, uint8_t* dest_pointer, const rct_g1_element* source_image,
rct_drawpixelinfo* dest_dpi, int32_t height, int32_t width, int32_t image_type);

View File

@ -241,3 +241,13 @@ void gfx_object_check_all_images_freed()
#endif
}
}
size_t ImageListGetUsedCount()
{
return _allocatedImageCount;
}
size_t ImageListGetMaximum()
{
return MAX_IMAGES;
}

View File

@ -1253,6 +1253,7 @@ static int32_t cc_show_limits(InteractiveConsole& console, [[maybe_unused]] cons
console.WriteFormatLine("Banners: %d/%zu", bannerCount, MAX_BANNERS);
console.WriteFormatLine("Rides: %d/%d", rideCount, MAX_RIDES);
console.WriteFormatLine("Staff: %d/%d", staffCount, STAFF_MAX_COUNT);
console.WriteFormatLine("Images: %zu/%zu", ImageListGetUsedCount(), ImageListGetMaximum());
return 0;
}