Add: Mock sprite cache intialization.
This fills up the sprite cache with SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT zero-size sprites, to allow GetSpriteSize() calls to continue from unit-tests.
This commit is contained in:

committed by
Peter Nelson

parent
05436d9c2f
commit
1c94fb0389
@@ -102,7 +102,6 @@ static uint _allocated_sprite_cache_size = 0;
|
||||
static int _compact_cache_counter;
|
||||
|
||||
static void CompactSpriteCache();
|
||||
static void *AllocSprite(size_t mem_req);
|
||||
|
||||
/**
|
||||
* Skip the given amount of sprite graphics data.
|
||||
@@ -831,7 +830,7 @@ static void DeleteEntryFromSpriteCache()
|
||||
DeleteEntryFromSpriteCache(best);
|
||||
}
|
||||
|
||||
static void *AllocSprite(size_t mem_req)
|
||||
void *AllocSprite(size_t mem_req)
|
||||
{
|
||||
mem_req += sizeof(MemBlock);
|
||||
|
||||
|
Reference in New Issue
Block a user