cosmetic: tidy up punctuation in controller ctor initializer lists
Moves the : and , to lead the lines rather than end them. This makes the initializer lists a bit more readable, as it lines up these punctuations and separates them from the initializer expressions. It seems to be mordante's style in most of the GUI2 code to do it this way. It also has the advantage that each line is paired with its matching punctuation mark, so if you need to add or rearrange things, you never need to edit a line solely to move a comma around, reducing the noise in the diffs.
This commit is contained in:
parent
d356e8d53f
commit
7aea1c732a
4 changed files with 66 additions and 66 deletions
|
@ -109,44 +109,44 @@ static void clear_resources()
|
|||
|
||||
play_controller::play_controller(const config& level, saved_game& state_of_game,
|
||||
const int ticks, const config& game_config, const tdata_cache & tdata,
|
||||
CVideo& video, bool skip_replay) :
|
||||
controller_base(game_config, video),
|
||||
observer(),
|
||||
savegame_config(),
|
||||
gamestate_(level, tdata),
|
||||
level_(level),
|
||||
saved_game_(state_of_game),
|
||||
prefs_disp_manager_(),
|
||||
tooltips_manager_(),
|
||||
whiteboard_manager_(),
|
||||
plugins_context_(),
|
||||
labels_manager_(),
|
||||
help_manager_(&game_config),
|
||||
mouse_handler_(NULL, *this),
|
||||
menu_handler_(NULL, *this, level, game_config),
|
||||
hotkey_handler_(new hotkey_handler(*this, saved_game_)),
|
||||
soundsources_manager_(),
|
||||
persist_(),
|
||||
gui_(),
|
||||
xp_mod_(new unit_experience_accelerator(level["experience_modifier"].to_int(100))),
|
||||
statistics_context_(new statistics::scenario_context(level["name"])),
|
||||
undo_stack_(new actions::undo_list(level.child("undo_stack"))),
|
||||
loading_game_(level["playing_team"].empty() == false),
|
||||
player_number_(1),
|
||||
first_player_(level["playing_team"].to_int() + 1),
|
||||
start_turn_(gamestate_.tod_manager_.turn()), // gamestate_.tod_manager_ constructed above
|
||||
skip_replay_(skip_replay),
|
||||
linger_(false),
|
||||
it_is_a_new_turn_(true),
|
||||
init_side_done_(level["init_side_done"].to_bool(true)),
|
||||
ticks_(ticks),
|
||||
victory_when_enemies_defeated_(true),
|
||||
remove_from_carryover_on_defeat_(true),
|
||||
end_level_data_(),
|
||||
victory_music_(),
|
||||
defeat_music_(),
|
||||
scope_(),
|
||||
server_request_number_(0)
|
||||
CVideo& video, bool skip_replay)
|
||||
: controller_base(game_config, video)
|
||||
, observer()
|
||||
, savegame_config()
|
||||
, gamestate_(level, tdata)
|
||||
, level_(level)
|
||||
, saved_game_(state_of_game)
|
||||
, prefs_disp_manager_()
|
||||
, tooltips_manager_()
|
||||
, whiteboard_manager_()
|
||||
, plugins_context_()
|
||||
, labels_manager_()
|
||||
, help_manager_(&game_config)
|
||||
, mouse_handler_(NULL, *this)
|
||||
, menu_handler_(NULL, *this, level, game_config)
|
||||
, hotkey_handler_(new hotkey_handler(*this, saved_game_))
|
||||
, soundsources_manager_()
|
||||
, persist_()
|
||||
, gui_()
|
||||
, xp_mod_(new unit_experience_accelerator(level["experience_modifier"].to_int(100)))
|
||||
, statistics_context_(new statistics::scenario_context(level["name"]))
|
||||
, undo_stack_(new actions::undo_list(level.child("undo_stack")))
|
||||
, loading_game_(level["playing_team"].empty() == false)
|
||||
, player_number_(1)
|
||||
, first_player_(level["playing_team"].to_int() + 1)
|
||||
, start_turn_(gamestate_.tod_manager_.turn()) // gamestate_.tod_manager_ constructed above
|
||||
, skip_replay_(skip_replay)
|
||||
, linger_(false)
|
||||
, it_is_a_new_turn_(true)
|
||||
, init_side_done_(level["init_side_done"].to_bool(true))
|
||||
, ticks_(ticks)
|
||||
, victory_when_enemies_defeated_(true)
|
||||
, remove_from_carryover_on_defeat_(true)
|
||||
, end_level_data_()
|
||||
, victory_music_()
|
||||
, defeat_music_()
|
||||
, scope_()
|
||||
, server_request_number_(0)
|
||||
{
|
||||
resources::controller = this;
|
||||
resources::gameboard = &gamestate_.board_;
|
||||
|
|
|
@ -42,12 +42,12 @@ unsigned int playmp_controller::replay_last_turn_ = 0;
|
|||
playmp_controller::playmp_controller(const config& level,
|
||||
saved_game& state_of_game, const int ticks, const config& game_config,
|
||||
const tdata_cache & tdata, CVideo& video,
|
||||
bool skip_replay, bool blindfold_replay_, bool is_host) :
|
||||
playsingle_controller(level, state_of_game, ticks,
|
||||
game_config, tdata, video, skip_replay || blindfold_replay_), //this || means that if blindfold is enabled, quick replays will be on.
|
||||
beep_warning_time_(0),
|
||||
network_processing_stopped_(false),
|
||||
blindfold_(*gui_,blindfold_replay_)
|
||||
bool skip_replay, bool blindfold_replay_, bool is_host)
|
||||
: playsingle_controller(level, state_of_game, ticks,
|
||||
game_config, tdata, video, skip_replay || blindfold_replay_) //this || means that if blindfold is enabled, quick replays will be on.
|
||||
, beep_warning_time_(0)
|
||||
, network_processing_stopped_(false)
|
||||
, blindfold_(*gui_,blindfold_replay_)
|
||||
{
|
||||
hotkey_handler_.reset(new hotkey_handler(*this, saved_game_)); //upgrade hotkey handler to the mp (network enabled) version
|
||||
|
||||
|
|
|
@ -71,19 +71,19 @@ static lg::log_domain log_enginerefac("enginerefac");
|
|||
playsingle_controller::playsingle_controller(const config& level,
|
||||
saved_game& state_of_game, const int ticks,
|
||||
const config& game_config, const tdata_cache & tdata,
|
||||
CVideo& video, bool skip_replay) :
|
||||
play_controller(level, state_of_game, ticks, game_config, tdata, video, skip_replay),
|
||||
cursor_setter(cursor::NORMAL),
|
||||
textbox_info_(),
|
||||
replay_sender_(recorder),
|
||||
network_reader_(),
|
||||
turn_data_(replay_sender_, network_reader_),
|
||||
end_turn_(false),
|
||||
player_type_changed_(false),
|
||||
replaying_(false),
|
||||
skip_next_turn_(false),
|
||||
do_autosaves_(false),
|
||||
level_result_(NONE)
|
||||
CVideo& video, bool skip_replay)
|
||||
: play_controller(level, state_of_game, ticks, game_config, tdata, video, skip_replay)
|
||||
, cursor_setter(cursor::NORMAL)
|
||||
, textbox_info_()
|
||||
, replay_sender_(recorder)
|
||||
, network_reader_()
|
||||
, turn_data_(replay_sender_, network_reader_)
|
||||
, end_turn_(false)
|
||||
, player_type_changed_(false)
|
||||
, replaying_(false)
|
||||
, skip_next_turn_(false)
|
||||
, do_autosaves_(false)
|
||||
, level_result_(NONE)
|
||||
{
|
||||
hotkey_handler_.reset(new hotkey_handler(*this, saved_game_)); //upgrade hotkey handler to the sp (whiteboard enabled) version
|
||||
|
||||
|
|
|
@ -117,15 +117,15 @@ possible_end_play_signal replay_controller::try_run_to_completion() {
|
|||
replay_controller::replay_controller(const config& level,
|
||||
saved_game& state_of_game, const int ticks,
|
||||
const config& game_config,
|
||||
const tdata_cache & tdata, CVideo& video) :
|
||||
play_controller(level, state_of_game, ticks, game_config, tdata, video, false),
|
||||
saved_game_start_(saved_game_),
|
||||
gameboard_start_(gamestate_.board_),
|
||||
tod_manager_start_(level),
|
||||
current_turn_(1),
|
||||
is_playing_(false),
|
||||
show_everything_(false),
|
||||
show_team_(state_of_game.classification().campaign_type == game_classification::MULTIPLAYER ? 0 : 1)
|
||||
const tdata_cache & tdata, CVideo& video)
|
||||
: play_controller(level, state_of_game, ticks, game_config, tdata, video, false)
|
||||
, saved_game_start_(saved_game_)
|
||||
, gameboard_start_(gamestate_.board_)
|
||||
, tod_manager_start_(level)
|
||||
, current_turn_(1)
|
||||
, is_playing_(false)
|
||||
, show_everything_(false)
|
||||
, show_team_(state_of_game.classification().campaign_type == game_classification::MULTIPLAYER ? 0 : 1)
|
||||
{
|
||||
hotkey_handler_.reset(new hotkey_handler(*this, saved_game_)); //upgrade hotkey handler to the replay controller version
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue