summaryrefslogtreecommitdiff
path: root/src/subgame.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-11 20:45:14 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-11 20:45:14 +0200
commitd1d83d7e7f5e2e7cbef5272eda9c580129e301a3 (patch)
tree2fc04eeae8cac55e6d17cccceecb9450fddd4f12 /src/subgame.h
parentbcaab74f1f4cb8c9fcd65cc8cb8bd290834bf72f (diff)
downloadminetest-d1d83d7e7f5e2e7cbef5272eda9c580129e301a3.tar.gz
minetest-d1d83d7e7f5e2e7cbef5272eda9c580129e301a3.tar.bz2
minetest-d1d83d7e7f5e2e7cbef5272eda9c580129e301a3.zip
World selection box in main menu (and random fixing)
Diffstat (limited to 'src/subgame.h')
-rw-r--r--src/subgame.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/subgame.h b/src/subgame.h
index ba2f235ed..1daeb8b15 100644
--- a/src/subgame.h
+++ b/src/subgame.h
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <string>
#include <set>
+#include <vector>
struct SubgameSpec
{
@@ -47,7 +48,32 @@ SubgameSpec findSubgame(const std::string &id);
std::set<std::string> getAvailableGameIds();
-std::string getWorldGameId(const std::string &world_path);
+std::string getWorldGameId(const std::string &world_path,
+ bool can_be_legacy=false);
+
+struct WorldSpec
+{
+ std::string path;
+ std::string name;
+ std::string gameid;
+
+ WorldSpec(
+ const std::string &path_="",
+ const std::string &name_="",
+ const std::string &gameid_=""
+ ):
+ path(path_),
+ name(name_),
+ gameid(gameid_)
+ {}
+
+ bool isValid() const
+ {
+ return (name != "" && path != "" && gameid != "");
+ }
+};
+
+std::vector<WorldSpec> getAvailableWorlds();
#endif