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.

Asset.h 347B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <SFML/Graphics/Image.hpp>
  3. #include <SFML/Graphics/Texture.hpp>
  4. namespace Swan {
  5. class Asset {
  6. public:
  7. Asset(std::string path): path_(path) {}
  8. bool load(const std::string &pfx);
  9. std::string name_;
  10. std::string path_;
  11. sf::Image image_;
  12. sf::Texture tex_;
  13. static Asset INVALID_ASSET;
  14. static void initGlobal();
  15. };
  16. }