SpriteLoader Class Reference

Interface for the loader of our sprites. More...

#include <spriteloader.hpp>

Inheritance diagram for SpriteLoader:
SpriteLoaderGrf SpriteLoaderPNG

Data Structures

struct  CommonPixel
 Definition of a common pixel in OpenTTD's realm. More...
struct  Sprite
 Structure for passing information from the sprite loader to the blitter. More...

Public Member Functions

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

Detailed Description

Interface for the loader of our sprites.

Definition at line 19 of file spriteloader.hpp.


Member Function Documentation

virtual bool SpriteLoader::LoadSprite ( SpriteLoader::Sprite sprite,
uint8  file_slot,
size_t  file_pos,
SpriteType  sprite_type 
) [pure 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.

Implemented in SpriteLoaderGrf, and SpriteLoaderPNG.


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

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