remove a useless argument in play_replay
video is ignored, it is always obtained from display
This commit is contained in:
parent
eecf19b0c1
commit
2b388ab5b2
3 changed files with 5 additions and 7 deletions
|
@ -127,7 +127,7 @@ static void show_carryover_message(saved_game& gamestate, playsingle_controller&
|
|||
}
|
||||
|
||||
LEVEL_RESULT play_replay(display& disp, saved_game& gamestate, const config& game_config,
|
||||
CVideo& video, bool is_unit_test)
|
||||
bool is_unit_test)
|
||||
{
|
||||
recorder = replay(gamestate.replay_data);
|
||||
// 'starting_pos' will contain the position we start the game from.
|
||||
|
@ -141,7 +141,7 @@ LEVEL_RESULT play_replay(display& disp, saved_game& gamestate, const config& gam
|
|||
//if (gamestate.abbrev.empty())
|
||||
// gamestate.abbrev = (*scenario)["abbrev"];
|
||||
|
||||
LEVEL_RESULT res = play_replay_level(game_config, video, gamestate, is_unit_test);
|
||||
LEVEL_RESULT res = play_replay_level(game_config, disp.video(), gamestate, is_unit_test);
|
||||
|
||||
recorder.clear();
|
||||
gamestate.replay_data.clear();
|
||||
|
|
|
@ -24,7 +24,6 @@ class display;
|
|||
class game_display;
|
||||
class saved_game;
|
||||
class config;
|
||||
class CVideo;
|
||||
|
||||
enum io_type_t {
|
||||
IO_SERVER,
|
||||
|
@ -40,7 +39,7 @@ LEVEL_RESULT play_game(game_display& disp, saved_game& state,
|
|||
bool is_unit_test = false);
|
||||
|
||||
LEVEL_RESULT play_replay(display& disp, saved_game& state,
|
||||
const config& game_config, CVideo& video,
|
||||
const config& game_config,
|
||||
bool is_unit_test = false);
|
||||
|
||||
#endif // PLAYCAMPAIGN_H_INCLUDED
|
||||
|
|
|
@ -533,7 +533,7 @@ int game_launcher::unit_test()
|
|||
|
||||
try {
|
||||
//LEVEL_RESULT res = play_game(disp(), state_, resources::config_manager->game_config(), IO_SERVER, false,false,false,true);
|
||||
LEVEL_RESULT res = ::play_replay(disp(), state_, resources::config_manager->game_config(), video_, true);
|
||||
LEVEL_RESULT res = ::play_replay(disp(), state_, resources::config_manager->game_config(), true);
|
||||
if (!(res == VICTORY || res == NONE)) {
|
||||
std::cerr << "Observed failure on replay" << std::endl;
|
||||
return 4;
|
||||
|
@ -1003,8 +1003,7 @@ void game_launcher::launch_game(RELOAD_GAME_DATA reload)
|
|||
void game_launcher::play_replay()
|
||||
{
|
||||
try {
|
||||
::play_replay(disp(),state_,resources::config_manager->game_config(),
|
||||
video_);
|
||||
::play_replay(disp(),state_,resources::config_manager->game_config());
|
||||
|
||||
clear_loaded_game();
|
||||
} catch (game::load_game_exception &) {
|
||||
|
|
Loading…
Add table
Reference in a new issue