|
OpenTTD Source 20251116-master-g21329071df
|
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 104 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 115 of file spriteloader.hpp.
References AllocatePtr().
Referenced by Blitter_32bppSimple::Encode(), Blitter_8bppOptimized::Encode(), Blitter_8bppSimple::Encode(), Blitter_Null::Encode(), ReadRecolourSprite(), and ReadSprite().
|
protectedpure virtual |
Allocate memory for a sprite.
| size | Size of memory to allocate. |
Implemented in UniquePtrSpriteAllocator, and OpenGLSpriteAllocator.
Referenced by Allocate().