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.

assets.h 332B

1234567891011121314151617181920
  1. #include <memory>
  2. #include <unordered_map>
  3. #include <string>
  4. #include "util.h"
  5. namespace Swan {
  6. struct ImageAsset {
  7. int width;
  8. int frameHeight;
  9. int frameCount;
  10. std::unique_ptr<unsigned char[]> data;
  11. };
  12. Result<ImageAsset> loadImageAsset(
  13. const std::unordered_map<std::string, std::string> modPaths,
  14. std::string path);
  15. }