source: trunk/src/tileset.h @ 104

Last change on this file since 104 was 104, checked in by sam, 11 years ago

Do not tick destroyed objects.

  • Property svn:keywords set to Id
File size: 781 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 "asset.h"
20
21class TileSetData;
22
23class TileSet : public Asset
24{
25public:
26    TileSet(char const *path);
27    virtual ~TileSet();
28
29    /* Inherited from Asset */
30    virtual void TickRender(float delta_time);
31
32    /* New implementations */
33    char const *GetName();
34
35    void BlitTile(uint32_t id, int x, int y);
36
37private:
38    TileSetData *data;
39};
40
41#endif // __DH_TILESET_H__
42
Note: See TracBrowser for help on using the repository browser.