A 2D tile-based sandbox game.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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, "Mod %s added tile %s.\n", name_.c_str(), t.name_.c_str());
  14. }
  15. }