diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-01-16 16:43:31 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-02-22 22:16:07 +0100 |
commit | 6776229047c0f5aac540fc9c367e4abbf5302322 (patch) | |
tree | 7fbb643e28155e37d784770894f419383a6bc8e9 /src/spritecache.cpp | |
parent | 70aa3b401145ec6bb98073a2758206cf63e15da1 (diff) | |
download | openttd-6776229047c0f5aac540fc9c367e4abbf5302322.tar.xz |
Codechange: Make the simple Malloc sprite allocator globally usable.
Diffstat (limited to 'src/spritecache.cpp')
-rw-r--r-- | src/spritecache.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp index f86be1b97..9e23d7d2a 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -809,6 +809,14 @@ static void *AllocSprite(size_t mem_req) } /** + * Sprite allocator simply using malloc. + */ +void *SimpleSpriteAlloc(size_t size) +{ + return MallocT<byte>(size); +} + +/** * Handles the case when a sprite of different type is requested than is present in the SpriteCache. * For ST_FONT sprites, it is normal. In other cases, default sprite is loaded instead. * @param sprite ID of loaded sprite |