SpriteLoaderGrf Class Reference

Sprite loader for graphics coming from a (New)GRF. More...

#include <grf.hpp>

Inheritance diagram for SpriteLoaderGrf:
SpriteLoader

Public Member Functions

bool LoadSprite (SpriteLoader::Sprite *sprite, uint8 file_slot, size_t file_pos, SpriteType sprite_type)
 Load a sprite from the disk and return a sprite struct which is the same for all loaders.

Detailed Description

Sprite loader for graphics coming from a (New)GRF.

Definition at line 18 of file grf.hpp.


Member Function Documentation

bool SpriteLoaderGrf::LoadSprite ( SpriteLoader::Sprite sprite,
uint8  file_slot,
size_t  file_pos,
SpriteType  sprite_type 
) [virtual]

Load a sprite from the disk and return a sprite struct which is the same for all loaders.

Parameters:
sprite The sprite to fill with data.
file_slot The file "descriptor" of the file we read from.
file_pos The position within the file the image begins.
sprite_type The type of sprite we're trying to load.
Returns:
true iff loading went okay.

Implements SpriteLoader.

Definition at line 44 of file grf.cpp.

References _palette_remap_grf, SpriteLoader::CommonPixel::a, AllocaM, SpriteLoader::Sprite::AllocateData(), SpriteLoader::Sprite::data, DEBUG, FioGetFilename(), SpriteLoader::Sprite::height, SpriteLoader::CommonPixel::m, min(), ST_FONT, ST_NORMAL, WarnCorruptSprite(), SpriteLoader::Sprite::width, SpriteLoader::Sprite::x_offs, and SpriteLoader::Sprite::y_offs.

Referenced by ReadSprite().


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

Generated on Fri Jun 3 05:20:30 2011 for OpenTTD by  doxygen 1.6.1