OpenTTD Source
20241121-master-g67a0fccfad
|
Interface for something that can allocate memory for a sprite. More...
#include <spriteloader.hpp>
Public Member Functions | |
template<typename T > | |
T * | Allocate (size_t size) |
Allocate memory for a sprite. More... | |
Protected Member Functions | |
virtual void * | AllocatePtr (size_t size)=0 |
Allocate memory for a sprite. More... | |
Interface for something that can allocate memory for a sprite.
Definition at line 88 of file spriteloader.hpp.
|
inline |
Allocate memory for a sprite.
T | Type to return memory as. |
size | Size of memory to allocate in bytes. |
Definition at line 99 of file spriteloader.hpp.
Referenced by Blitter_32bppSimple::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), OpenGLBackend::Encode(), and ReadRecolourSprite().
|
protectedpure virtual |
Allocate memory for a sprite.
size | Size of memory to allocate. |
Implemented in CacheSpriteAllocator, UniquePtrSpriteAllocator, and SimpleSpriteAllocator.