You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 line
839 B

  1. //
  2. // Deus Hax (working title)
  3. // Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
  4. //
  5. //
  6. // The TileSet class
  7. // -----------------
  8. // A TileSet is a collection of tiles stored in a texture. Texture uploading
  9. // and freeing is done in the render tick method. When the refcount drops to
  10. // zero, the texture is freed.
  11. //
  12. #if !defined __DH_TILESET_H__
  13. #define __DH_TILESET_H__
  14. #include <stdint.h>
  15. #include "entity.h"
  16. class TileSetData;
  17. class TileSet : public Entity
  18. {
  19. public:
  20. TileSet(char const *path);
  21. virtual ~TileSet();
  22. protected:
  23. /* Inherited from Entity */
  24. virtual Group GetGroup();
  25. virtual void TickRender(float delta_time);
  26. public:
  27. /* New methods */
  28. char const *GetName();
  29. void BlitTile(uint32_t id, int x, int y, int z, int o);
  30. private:
  31. TileSetData *data;
  32. };
  33. #endif // __DH_TILESET_H__