Skip to content

Commit

Permalink
Revert "Attempt to get rid of the overload loag_game() function. Brea…
Browse files Browse the repository at this point in the history
…ks in-game loading dialog"

This reverts commit 494a345.
  • Loading branch information
Vultraz committed Dec 11, 2014
1 parent ce49a57 commit 8576e88
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/play_controller.cpp
Expand Up @@ -319,9 +319,7 @@ void play_controller::save_map(){

void play_controller::load_game(){
savegame::loadgame load(*gui_, game_config_, saved_game_);
load.load_game(game::load_game_exception::game, game::load_game_exception::show_replay, game::load_game_exception::cancel_orders, game::load_game_exception::select_difficulty, game::load_game_exception::difficulty);

throw game::load_game_exception(filename_, show_replay_, cancel_orders_, select_difficulty_, difficulty_);
load.load_game();
}

void play_controller::preferences(){
Expand Down
7 changes: 4 additions & 3 deletions src/savegame.cpp
Expand Up @@ -166,8 +166,9 @@ void loadgame::show_difficulty_dialog()
difficulty_ = difficulties[difficulty_dlg.selected_index()];
}

/* Called only by play_controller to handle in-game attempts to load. Instead of returning true,
throws a "load_game_exception" to signal a resulting load game request.

// Called only by play_controller to handle in-game attempts to load. Instead of returning true,
// throws a "load_game_exception" to signal a resulting load game request.
bool loadgame::load_game()
{
show_dialog(false, false);
Expand Down Expand Up @@ -198,7 +199,7 @@ bool loadgame::load_game()
}

throw game::load_game_exception(filename_, show_replay_, cancel_orders_, select_difficulty_, difficulty_);
} */
}

bool loadgame::load_game(
const std::string& filename
Expand Down
2 changes: 2 additions & 0 deletions src/savegame.hpp
Expand Up @@ -41,6 +41,8 @@ class loadgame
loadgame(display& gui, const config& game_config, saved_game& gamestate);
virtual ~loadgame() {}

/** Load a game without providing any information. */
bool load_game();
/** Load a game with pre-setting information for the load-game dialog.
A value of false will cause the save to not load. */
bool load_game(
Expand Down

0 comments on commit 8576e88

Please sign in to comment.