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.

12345678910111213141516171819202122
  1. #include "Mod.h"
  2. #include <stdio.h>
  3. namespace Swan {
  4. void Mod::init(const std::string &name) {
  5. name_ = name;
  6. inited_ = true;
  7. fprintf(stderr, "Mod initing: %s\n", name_.c_str());
  8. }
  9. void Mod::registerTile(const std::string &name, const Tile &tile) {
  10. tiles_.push_back(tile);
  11. Tile &t = tiles_.back();
  12. t.name_ = name_ + "::" + name;
  13. fprintf(stderr, "Added tile: %s\n", t.name_.c_str());
  14. }
  15. }