SP: cleaned up a useless function argument

Seems the only purpose of this argument was to be passed around and never do anything.
This commit is contained in:
Charles Dang 2017-03-19 22:15:56 +11:00
parent b1b378c090
commit 7f820c1d58
3 changed files with 11 additions and 11 deletions

View File

@ -27,7 +27,7 @@ static lg::log_domain log_engine("engine");
namespace sp {
bool enter_create_mode(CVideo& video, const config& game_config, saved_game& state, jump_to_campaign_info jump_to_campaign, bool local_players_only)
bool enter_create_mode(CVideo& video, const config& game_config, saved_game& state, jump_to_campaign_info jump_to_campaign)
{
bool configure_canceled = false;
@ -93,7 +93,7 @@ bool enter_create_mode(CVideo& video, const config& game_config, saved_game& sta
}
// Canceled difficulty dialog, relaunch the campaign selection dialog
return enter_create_mode(video, game_config, state, jump_to_campaign, local_players_only);
return enter_create_mode(video, game_config, state, jump_to_campaign);
}
create_eng.prepare_for_era_and_mods();
@ -110,14 +110,14 @@ bool enter_create_mode(CVideo& video, const config& game_config, saved_game& sta
return false;
}
configure_canceled = !enter_configure_mode(video, game_config_manager::get()->game_config(), state, create_eng, local_players_only);
configure_canceled = !enter_configure_mode(video, game_config_manager::get()->game_config(), state, create_eng);
} while (configure_canceled);
return true;
}
bool enter_configure_mode(CVideo& video, const config& game_config, saved_game& state, ng::create_engine& create_eng, bool local_players_only)
bool enter_configure_mode(CVideo& video, const config& game_config, saved_game& state, ng::create_engine& create_eng)
{
// We create the config engine here in order to ensure values like use_map_settings are set correctly
// TODO: should this be passed to this function instead of created here?
@ -133,12 +133,12 @@ bool enter_configure_mode(CVideo& video, const config& game_config, saved_game&
create_eng.get_parameters();
create_eng.prepare_for_new_level();
enter_connect_mode(video, game_config, state, local_players_only);
enter_connect_mode(video, game_config, state);
return true;
}
bool enter_connect_mode(CVideo& /*video*/, const config& /*game_config*/, saved_game& state, bool /*local_players_only*/)
bool enter_connect_mode(CVideo& /*video*/, const config& /*game_config*/, saved_game& state)
{
ng::connect_engine connect_eng(state, true, nullptr);
@ -152,7 +152,7 @@ bool enter_connect_mode(CVideo& /*video*/, const config& /*game_config*/, saved_
if(dlg.get_retval() != gui2::window::OK) {
// TODO: enable the workflow loops from GUI1
//return enter_create_mode(video, game_config, state, jump_to_campaign_info(false, -1, "", ""), local_players_only);
//return enter_create_mode(video, game_config, state, jump_to_campaign_info(false, -1, "", ""));
return false;
}

View File

@ -23,13 +23,13 @@
namespace sp {
bool enter_create_mode(CVideo& video, const config& game_config,
saved_game& state, jump_to_campaign_info jump_to, bool local_players_only = true);
saved_game& state, jump_to_campaign_info jump_to);
bool enter_configure_mode(CVideo& video, const config& game_config,
saved_game& state, ng::create_engine& create_eng, bool local_players_only = true);
saved_game& state, ng::create_engine& create_eng);
bool enter_connect_mode(CVideo& video, const config& game_config,
saved_game& state, bool local_players_only = true);
saved_game& state);
} // end namespace sp

View File

@ -717,7 +717,7 @@ bool game_launcher::new_campaign()
play_replay_ = false;
return sp::enter_create_mode(video(), game_config_manager::get()->game_config(),
state_, jump_to_campaign_, true);
state_, jump_to_campaign_);
}
std::string game_launcher::jump_to_campaign_id() const