1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

Codechange: Replace AllocatorProc with SpriteAllocator class.

This allows for state to be passed to or maintained by the allocator.
This commit is contained in:
2024-05-12 11:23:22 +01:00
committed by Peter Nelson
parent de16655f76
commit 7b717fcccb
26 changed files with 93 additions and 54 deletions

View File

@@ -17,7 +17,8 @@
static bool MockLoadNextSprite(int load_index)
{
static Sprite *sprite = (Sprite *)AllocSprite(sizeof(*sprite));
SimpleSpriteAllocator allocator;
static Sprite *sprite = allocator.Allocate<Sprite>(sizeof(*sprite));
bool is_mapgen = IsMapgenSpriteID(load_index);