Added config based directories

This commit is contained in:
Kayne Ruse
2013-11-17 00:11:43 +11:00
parent e176a60d28
commit f5466b9982
17 changed files with 75 additions and 43 deletions
+4 -4
View File
@@ -62,7 +62,7 @@ void ClientApplication::Init() {
if (SDL_Init(SDL_INIT_VIDEO)) {
throw(std::runtime_error("Failed to initialize SDL"));
}
BaseScene::SetScreen(800, 600);
BaseScene::SetScreen(config.Int("screen.w"), config.Int("screen.h"), 0, (config.Bool("screen.f")) ? SDL_HWSURFACE|SDL_DOUBLEBUF : SDL_HWSURFACE);
//initialize SDL_net
if (SDLNet_Init()) {
@@ -126,13 +126,13 @@ void ClientApplication::LoadScene(SceneList sceneIndex) {
//add scene creation calls here
case SceneList::FIRST:
case SceneList::SPLASHSCREEN:
activeScene = new SplashScreen();
activeScene = new SplashScreen(&config);
break;
case SceneList::MAINMENU:
activeScene = new MainMenu();
activeScene = new MainMenu(&config);
break;
case SceneList::OPTIONSMENU:
activeScene = new OptionsMenu();
activeScene = new OptionsMenu(&config);
break;
case SceneList::LOBBYMENU:
activeScene = new LobbyMenu(&config, &network);