NewGRFSpriteLayout Struct Reference

NewGRF supplied spritelayout. More...

#include <newgrf_commons.h>

Inheritance diagram for NewGRFSpriteLayout:
ZeroedMemoryAllocator DrawTileSprites

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.

Detailed Description

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.


Member Function Documentation

void NewGRFSpriteLayout::Allocate ( uint  num_sprites  ) 

Allocate a spritelayout for num_sprites building sprites.

Parameters:
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.

Parameters:
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.

Parameters:
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().


The documentation for this struct was generated from the following files:

Generated on Fri May 27 04:20:56 2011 for OpenTTD by  doxygen 1.6.1