OpenTTD Source 20241224-master-gf74b0cf984
|
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. | |
Protected Member Functions | |
virtual void * | AllocatePtr (size_t size)=0 |
Allocate memory for a sprite. | |
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.
References AllocatePtr().
Referenced by Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), OpenGLBackend::Encode(), ReadRecolourSprite(), and ReadSprite().
|
protectedpure virtual |
Allocate memory for a sprite.
size | Size of memory to allocate. |
Implemented in SimpleSpriteAllocator, UniquePtrSpriteAllocator, and CacheSpriteAllocator.
Referenced by Allocate().