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.

Mod.h 549B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string>
  4. #include <vector>
  5. #include <memory>
  6. #include "Tile.h"
  7. #include "WorldGen.h"
  8. namespace Swan {
  9. class Mod {
  10. public:
  11. using ModID = uint32_t;
  12. std::string name_;
  13. std::string path_;
  14. std::vector<std::shared_ptr<Tile>> tiles_;
  15. std::vector<std::shared_ptr<WorldGen::Factory>> worldgens_;
  16. bool inited_ = false;
  17. void init(const std::string &name);
  18. void registerTile(const std::string &name, const std::string &asset, const Tile::Opts &opts);
  19. void registerWorldGen(WorldGen::Factory *gen);
  20. };
  21. }