mail[Wesnoth-commits] r37031 - in /trunk/src: playsingle_controller.cpp playturn.cpp replay.cpp replay.hpp replay_controller.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 19, 2009 - 09:48:
Author: silene
Date: Sun Jul 19 09:48:53 2009
New Revision: 37031

URL: http://svn.gna.org/viewcvs/wesnoth?rev=37031&view=rev
Log:
Removed redundant and useless parameters from do_replay.

Modified:
    trunk/src/playsingle_controller.cpp
    trunk/src/playturn.cpp
    trunk/src/replay.cpp
    trunk/src/replay.hpp
    trunk/src/replay_controller.cpp

Modified: trunk/src/playsingle_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=37031&r1=37030&r2=37031&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Sun Jul 19 09:48:53 2009
@@ -525,8 +525,7 @@
                if (replaying_) {
                        LOG_NG << "doing replay " << player_number_ << "\n";
                        try {
-                               replaying_ = ::do_replay(*gui_, units_, 
teams_,
-                                               player_number_, gamestate_, 
*this);
+                               replaying_ = ::do_replay(player_number_);
                        } catch(replay::error&) {
                                
gui2::show_transient_message(gui_->video(),"",_("The file you have tried to 
load is corrupt"));
 

Modified: trunk/src/playturn.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playturn.cpp?rev=37031&r1=37030&r2=37031&view=diff
==============================================================================
--- trunk/src/playturn.cpp (original)
+++ trunk/src/playturn.cpp Sun Jul 19 09:48:53 2009
@@ -120,8 +120,7 @@
                        replay_obj.start_replay();
 
                        try{
-                               turn_end = do_replay(*resources::screen, 
*resources::units, *resources::teams,
-                                               team_num_, 
*resources::state_of_game, *resources::controller, &replay_obj);
+                               turn_end = do_replay(team_num_, &replay_obj);
                        }
                        catch (replay::error& e){
                                //notify remote hosts of out of sync error

Modified: trunk/src/replay.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.cpp?rev=37031&r1=37030&r2=37031&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Sun Jul 19 09:48:53 2009
@@ -708,9 +708,7 @@
        }
 }
 
-bool do_replay(game_display& disp,
-       unit_map& units, std::vector<team>& teams, int team_num,
-       game_state& state_of_game, play_controller& controller, replay* obj)
+bool do_replay(int side_num, replay *obj)
 {
        log_scope("do replay");
 
@@ -719,13 +717,13 @@
 //     replay& replayer = (obj != NULL) ? *obj : recorder;
 
        if (!get_replay_source().is_skipping()){
-               disp.recalculate_minimap();
+               resources::screen->recalculate_minimap();
        }
 
        const rand_rng::set_random_generator 
generator_setter(&get_replay_source());
 
-       update_locker 
lock_update(disp.video(),get_replay_source().is_skipping());
-       return do_replay_handle(team_num, "");
+       update_locker 
lock_update(resources::screen->video(),get_replay_source().is_skipping());
+       return do_replay_handle(side_num, "");
 }
 
 bool do_replay_handle(int side_num, const std::string &do_untill)

Modified: trunk/src/replay.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.hpp?rev=37031&r1=37030&r2=37031&view=diff
==============================================================================
--- trunk/src/replay.hpp (original)
+++ trunk/src/replay.hpp Sun Jul 19 09:48:53 2009
@@ -145,9 +145,7 @@
 
 //replays up to one turn from the recorder object
 //returns true if it got to the end of the turn without data running out
-bool do_replay(game_display& disp,
-       unit_map& units, std::vector<team>& teams, int team_num,
-       game_state& state_of_game, play_controller& controller, replay* 
obj=NULL);
+bool do_replay(int side_num, replay *obj = NULL);
 
 bool do_replay_handle(int side_num, const std::string &do_untill);
 

Modified: trunk/src/replay_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay_controller.cpp?rev=37031&r1=37030&r2=37031&view=diff
==============================================================================
--- trunk/src/replay_controller.cpp (original)
+++ trunk/src/replay_controller.cpp Sun Jul 19 09:48:53 2009
@@ -334,8 +334,7 @@
 
                                DBG_REPLAY << "doing replay " << 
player_number_ << "\n";
                                try {
-                                       ::do_replay(*gui_, units_, teams_,
-                                                       player_number_, 
gamestate_, *this);
+                                       ::do_replay(player_number_);
                                } catch(replay::error&) {
                                        if(!continue_replay()) {
                                                throw;




Related Messages


Powered by MHonArc, Updated Sun Jul 19 10:00:58 2009