aboutsummaryrefslogtreecommitdiff
path: root/src/subgame.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2013-02-15 21:13:53 +0200
committerPerttu Ahola <celeron55@gmail.com>2013-05-02 19:43:47 +0300
commit084be3599a5ef0acba7c341bfd14a4e9801423a2 (patch)
tree319535075c0eafd482abd32f5418502aefc17ea9 /src/subgame.cpp
parentb28734c82cdb88228a12a3cac90f51ab9384b653 (diff)
downloadminetest-084be3599a5ef0acba7c341bfd14a4e9801423a2.tar.gz
minetest-084be3599a5ef0acba7c341bfd14a4e9801423a2.tar.bz2
minetest-084be3599a5ef0acba7c341bfd14a4e9801423a2.zip
Get menu background image from selected game
Diffstat (limited to 'src/subgame.cpp')
-rw-r--r--src/subgame.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/subgame.cpp b/src/subgame.cpp
index 19ad4e636..a17b16234 100644
--- a/src/subgame.cpp
+++ b/src/subgame.cpp
@@ -22,6 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "filesys.h"
#include "settings.h"
#include "log.h"
+#ifndef SERVER
+#include "tile.h" // getImagePath
+#endif
#include "util/string.h"
bool getGameMinetestConfig(const std::string &game_path, Settings &conf)
@@ -94,7 +97,16 @@ SubgameSpec findSubgame(const std::string &id)
std::string game_name = getGameName(game_path);
if(game_name == "")
game_name = id;
- return SubgameSpec(id, game_path, gamemod_path, mods_paths, game_name);
+ std::string menubackground_path;
+ std::string menuoverlay_path;
+ std::string menuicon_path;
+#ifndef SERVER
+ menubackground_path = getImagePath(game_path + DIR_DELIM + "menu/background.png");
+ menuoverlay_path = getImagePath(game_path + DIR_DELIM + "menu/overlay.png");
+ menuicon_path = getImagePath(game_path + DIR_DELIM + "menu/icon.png");
+#endif
+ return SubgameSpec(id, game_path, gamemod_path, mods_paths, game_name,
+ menubackground_path, menuoverlay_path, menuicon_path);
}
SubgameSpec findWorldSubgame(const std::string &world_path)