NewGRF supplied spritelayout. More...
#include <newgrf_commons.h>
Public Member Functions | |
void | Allocate (uint num_sprites) |
Allocate a spritelayout for num_sprites building sprites. | |
void | Clone (const DrawTileSeqStruct *source) |
Clone the building sprites of a spritelayout. | |
void | Clone (const DrawTileSprites *source) |
Clone a spritelayout. |
NewGRF supplied spritelayout.
In contrast to DrawTileSprites this struct is for allocated layouts on the heap. It allocates data and frees them on destruction.
Definition at line 34 of file newgrf_commons.h.
void NewGRFSpriteLayout::Allocate | ( | uint | num_sprites | ) |
Allocate a spritelayout for num_sprites building sprites.
num_sprites | Number of building sprites to allocate memory for. (not counting the terminator) |
Definition at line 460 of file newgrf_commons.cpp.
References DrawTileSeqStruct::MakeTerminator(), and DrawTileSprites::seq.
void NewGRFSpriteLayout::Clone | ( | const DrawTileSprites * | source | ) | [inline] |
Clone a spritelayout.
source | The spritelayout to copy. |
Definition at line 42 of file newgrf_commons.h.
References Clone(), DrawTileSprites::ground, and DrawTileSprites::seq.
void NewGRFSpriteLayout::Clone | ( | const DrawTileSeqStruct * | source | ) |
Clone the building sprites of a spritelayout.
source | The building sprites to copy. |
Definition at line 442 of file newgrf_commons.cpp.
References foreach_draw_tile_seq, MemCpyT(), and DrawTileSprites::seq.
Referenced by Clone().