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.cc 505B

1234567891011121314151617181920212223242526
  1. #include "Mod.h"
  2. #include <stdio.h>
  3. #include <algorithm>
  4. #include "util.h"
  5. #include "log.h"
  6. namespace Swan {
  7. void Mod::registerTile(Tile::Builder tile) {
  8. tiles_.push_back(tile);
  9. info << " Adding tile: " << name_ << "::" << tile.name;
  10. }
  11. void Mod::registerItem(Item::Builder item) {
  12. items_.push_back(item);
  13. info << " Adding item: " << name_ << "::" << item.name;
  14. }
  15. void Mod::registerSprite(std::string path) {
  16. sprites_.push_back(path);
  17. info << "Adding sprite: " << name_ << "::" << path;
  18. }
  19. }