Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

49 rindas
1.1 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. //
  11. // The TileSet class
  12. // -----------------
  13. // A TileSet is a collection of tiles stored in a texture. Texture uploading
  14. // and freeing is done in the render tick method. When the refcount drops to
  15. // zero, the texture is freed.
  16. //
  17. #if !defined __DH_TILESET_H__
  18. #define __DH_TILESET_H__
  19. #include <stdint.h>
  20. #include "entity.h"
  21. class TileSetData;
  22. class TileSet : public Entity
  23. {
  24. public:
  25. TileSet(char const *path, int w, int h, float dilate);
  26. virtual ~TileSet();
  27. protected:
  28. /* Inherited from Entity */
  29. virtual char const *GetName();
  30. virtual void TickDraw(float deltams);
  31. public:
  32. /* New methods */
  33. void BlitTile(uint32_t id, int x, int y, int z, int o);
  34. private:
  35. TileSetData *data;
  36. };
  37. #endif // __DH_TILESET_H__