author | rubidium |
Sun, 03 Feb 2008 20:17:54 +0000 | |
branch | noai |
changeset 9724 | b39bc69bb2f2 |
parent 9703 | d2a6acdbd665 |
child 10429 | 1b99254f9607 |
permissions | -rw-r--r-- |
9626 | 1 |
/* $Id$ */ |
2 |
||
3 |
/** @file spriteloader.hpp */ |
|
4 |
||
5 |
#ifndef SPRITELOADER_HPP |
|
6 |
#define SPRITELOADER_HPP |
|
7 |
||
8 |
class SpriteLoader { |
|
9 |
public: |
|
10 |
struct CommonPixel { |
|
11 |
uint8 r; ///< Red-channel |
|
12 |
uint8 g; ///< Green-channel |
|
13 |
uint8 b; ///< Blue-channel |
|
14 |
uint8 a; ///< Alpha-channel |
|
15 |
uint8 m; ///< Remap-channel |
|
16 |
}; |
|
17 |
||
18 |
struct Sprite { |
|
19 |
uint16 height; ///< Height of the sprite |
|
20 |
uint16 width; ///< Width of the sprite |
|
21 |
int16 x_offs; ///< The x-offset of where the sprite will be drawn |
|
22 |
int16 y_offs; ///< The y-offset of where the sprite will be drawn |
|
23 |
SpriteLoader::CommonPixel *data; ///< The sprite itself |
|
24 |
}; |
|
25 |
||
26 |
/** |
|
27 |
* Load a sprite from the disk and return a sprite struct which is the same for all loaders. |
|
28 |
*/ |
|
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9703
diff
changeset
|
29 |
virtual bool LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, uint32 file_pos) = 0; |
9626 | 30 |
|
31 |
virtual ~SpriteLoader() { } |
|
32 |
}; |
|
33 |
||
34 |
#endif /* SPRITELOADER_HPP */ |