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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user