Last change
on this file since 218 was
218,
checked in by sam, 12 years ago
|
The Tile size can now be specified upon TileSet load. Add a sample
with the Monsterz tiles.
|
-
Property svn:keywords set to
Id
|
File size:
821 bytes
|
Line | |
---|
1 | // |
---|
2 | // Deus Hax (working title) |
---|
3 | // Copyright (c) 2010 Sam Hocevar <sam@hocevar.net> |
---|
4 | // |
---|
5 | |
---|
6 | // |
---|
7 | // The TileSet class |
---|
8 | // ----------------- |
---|
9 | // A TileSet is a collection of tiles stored in a texture. Texture uploading |
---|
10 | // and freeing is done in the render tick method. When the refcount drops to |
---|
11 | // zero, the texture is freed. |
---|
12 | // |
---|
13 | |
---|
14 | #if !defined __DH_TILESET_H__ |
---|
15 | #define __DH_TILESET_H__ |
---|
16 | |
---|
17 | #include <stdint.h> |
---|
18 | |
---|
19 | #include "entity.h" |
---|
20 | |
---|
21 | class TileSetData; |
---|
22 | |
---|
23 | class TileSet : public Entity |
---|
24 | { |
---|
25 | public: |
---|
26 | TileSet(char const *path, int size); |
---|
27 | virtual ~TileSet(); |
---|
28 | |
---|
29 | protected: |
---|
30 | /* Inherited from Entity */ |
---|
31 | virtual char const *GetName(); |
---|
32 | virtual void TickDraw(float deltams); |
---|
33 | |
---|
34 | public: |
---|
35 | /* New methods */ |
---|
36 | void BlitTile(uint32_t id, int x, int y, int z, int o); |
---|
37 | |
---|
38 | private: |
---|
39 | TileSetData *data; |
---|
40 | }; |
---|
41 | |
---|
42 | #endif // __DH_TILESET_H__ |
---|
43 | |
---|
Note: See
TracBrowser
for help on using the repository browser.