Advertisement
Guest User

Untitled

a guest
Oct 28th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. int minhtree = 0;
  2. int maxhtree = 0;
  3.  
  4. std::string getGameName(const std::string &game_path)
  5. {
  6. std::string conf_path = game_path + DIR_DELIM + "game.conf";
  7. Settings conf;
  8. bool succeeded = conf.readConfigFile(conf_path.c_str());
  9. if(!succeeded)
  10. return "";
  11. if(!conf.exists("name"))
  12. return "";
  13. /*
  14. Get Tree size
  15. */
  16. if(!conf.exists("treehmin"))
  17. minhtree = 4;
  18. else
  19. minhtree = atoi(conf.get("treehmin").c_str());
  20.  
  21. if(!conf.exists("treehmax"))
  22. maxhtree = 5;
  23. else
  24. maxhtree = atoi(conf.get("treehmax").c_str());;
  25.  
  26. return conf.get("name");
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement