A 2D tile-based sandbox game.
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.

Tile.h 399B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string>
  4. #include <memory>
  5. #include <SFML/Graphics/Image.hpp>
  6. namespace Swan {
  7. struct Tile {
  8. public:
  9. using ID = uint16_t;
  10. std::unique_ptr<sf::Image> image;
  11. bool is_solid = true;
  12. std::string dropped_item = "";
  13. std::string name = "";
  14. static Tile INVALID_TILE;
  15. static ID INVALID_ID;
  16. static Tile *createInvalid();
  17. static void initGlobal();
  18. };
  19. }