Author: euschn
Date: Mon Jun 22 16:48:47 2009
New Revision: 36353
URL: http://svn.gna.org/viewcvs/wesnoth?rev=36353&view=rev
Log:
removed gamestatus parameter from wml_animation(), do_replay() and
do_replay_handle()
Modified:
trunk/src/game_events.cpp
trunk/src/playsingle_controller.cpp
trunk/src/playturn.cpp
trunk/src/replay.cpp
trunk/src/replay.hpp
trunk/src/replay_controller.cpp
trunk/src/unit_display.cpp
trunk/src/unit_display.hpp
Modified: trunk/src/game_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Mon Jun 22 16:48:47 2009
@@ -1481,7 +1481,7 @@
const int side =
lexical_cast_default<int>(side_str.base_str(), -1);
do_replay_handle(*rsrc.screen, *rsrc.game_map,
*rsrc.units, *rsrc.teams,
- side , *rsrc.status_ptr,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"random_number");
+ side ,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"random_number");
const config* const action =
get_replay_source().get_next_action();
if(action == NULL ||
action->get_children("random_number").empty()) {
replay::throw_error("random_number
expected but none found\n");
@@ -2843,7 +2843,7 @@
WML_HANDLER_FUNCTION(animate_unit, event_info, cfg)
{
const game_events::resources_t &rsrc = *game_events::resources;
- unit_display::wml_animation(cfg, *rsrc.units, *rsrc.game_map,
*rsrc.status_ptr, rsrc.teams, rsrc.controller->get_tod_manager(),
event_info.loc1);
+ unit_display::wml_animation(cfg, *rsrc.units, *rsrc.game_map,
rsrc.teams, rsrc.controller->get_tod_manager(), event_info.loc1);
}
WML_HANDLER_FUNCTION(label, /*event_info*/, cfg)
@@ -3294,7 +3294,7 @@
if(!options.empty()) {
do_replay_handle(*rsrc.screen, *rsrc.game_map,
*rsrc.units, *rsrc.teams,
- side , *rsrc.status_ptr,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"choose");
+ side ,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"choose");
const config* action =
get_replay_source().get_next_action();
if (!action || !*(action =
&action->child("choose"))) {
replay::throw_error("choice expected
but none found\n");
@@ -3304,7 +3304,7 @@
}
if(has_text_input) {
do_replay_handle(*rsrc.screen, *rsrc.game_map,
*rsrc.units, *rsrc.teams,
- side , *rsrc.status_ptr,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"input");
+ side ,
rsrc.controller->get_tod_manager(), *rsrc.state_of_game, *rsrc.controller,
"input");
const config* action =
get_replay_source().get_next_action();
if (!action || !*(action =
&action->child("input"))) {
replay::throw_error("input expected but
none found\n");
Modified: trunk/src/playsingle_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Mon Jun 22 16:48:47 2009
@@ -562,7 +562,7 @@
LOG_NG << "doing replay " << player_number_ << "\n";
try {
replaying_ = ::do_replay(*gui_, map_, units_,
teams_,
- player_number_, status_,
tod_manager_, gamestate_, *this);
+ player_number_, tod_manager_,
gamestate_, *this);
} 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=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/playturn.cpp (original)
+++ trunk/src/playturn.cpp Mon Jun 22 16:48:47 2009
@@ -126,7 +126,7 @@
try{
turn_end = do_replay(gui_, map_, units_, teams_,
- team_num_, status_,
tod_manager_, state_of_game_, controller_, &replay_obj);
+ team_num_, tod_manager_,
state_of_game_, controller_, &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=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/replay.cpp (original)
+++ trunk/src/replay.cpp Mon Jun 22 16:48:47 2009
@@ -738,7 +738,7 @@
bool do_replay(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num,
- const gamestatus& state, const tod_manager& tod_mng, game_state&
state_of_game, play_controller& controller, replay* obj)
+ const tod_manager& tod_mng, game_state& state_of_game, play_controller&
controller, replay* obj)
{
log_scope("do replay");
@@ -753,13 +753,13 @@
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(disp, map, units, teams, team_num, state,
tod_mng, state_of_game, controller,
+ return do_replay_handle(disp, map, units, teams, team_num, tod_mng,
state_of_game, controller,
std::string(""));
}
bool do_replay_handle(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>&
teams, int team_num,
- const gamestatus& state, const
tod_manager& tod_mng, game_state& state_of_game, play_controller& controller,
+ const tod_manager& tod_mng,
game_state& state_of_game, play_controller& controller,
const std::string& do_untill)
{
//a list of units that have promoted from the last attack
Modified: trunk/src/replay.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay.hpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/replay.hpp (original)
+++ trunk/src/replay.hpp Mon Jun 22 16:48:47 2009
@@ -156,11 +156,11 @@
//returns true if it got to the end of the turn without data running out
bool do_replay(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>& teams, int team_num,
- const gamestatus& state, const tod_manager& tod_mng, game_state&
state_of_game, play_controller& controller, replay* obj=NULL);
+ const tod_manager& tod_mng, game_state& state_of_game, play_controller&
controller, replay* obj=NULL);
bool do_replay_handle(game_display& disp, const gamemap& map,
unit_map& units, std::vector<team>&
teams, int team_num,
- const gamestatus& state, const tod_manager& tod_mng, game_state&
state_of_game, play_controller& controller,
+ const tod_manager& tod_mng, game_state& state_of_game,
play_controller& controller,
const std::string& do_untill);
//an object which can be made to undo a recorded move
Modified: trunk/src/replay_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/replay_controller.cpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/replay_controller.cpp (original)
+++ trunk/src/replay_controller.cpp Mon Jun 22 16:48:47 2009
@@ -339,7 +339,7 @@
DBG_REPLAY << "doing replay " << player_number_
<< "\n";
try {
::do_replay(*gui_, map_, units_, teams_,
- player_number_,
status_, tod_manager_, gamestate_, *this);
+ player_number_,
tod_manager_, gamestate_, *this);
} catch(replay::error&) {
if(!continue_replay()) {
throw;
Modified: trunk/src/unit_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_display.cpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/unit_display.cpp (original)
+++ trunk/src/unit_display.cpp Mon Jun 22 16:48:47 2009
@@ -399,19 +399,19 @@
}
-void wml_animation_internal(unit_animator & animator,const vconfig &cfg, const
gamemap& map, const gamestatus& game_status, const std::vector<team>* teams,
const tod_manager& tod_mng, unit_map & units,const map_location&
default_location = map_location::null_location);
-void wml_animation(const vconfig &cfg,unit_map & units, const gamemap& map,
const gamestatus& game_status, const std::vector<team>* teams, const
tod_manager& tod_mng, const map_location& default_location)
+void wml_animation_internal(unit_animator & animator,const vconfig &cfg, const
gamemap& map, const std::vector<team>* teams, const tod_manager& tod_mng,
unit_map & units,const map_location& default_location =
map_location::null_location);
+void wml_animation(const vconfig &cfg,unit_map & units, const gamemap& map,
const std::vector<team>* teams, const tod_manager& tod_mng, const map_location&
default_location)
{
game_display* disp = game_display::get_singleton();
if(!disp || disp->video().update_locked() || disp->video().faked())
return;
unit_animator animator;
- wml_animation_internal(animator,cfg,map,game_status, teams, tod_mng,
units,default_location);
+ wml_animation_internal(animator, cfg, map, teams, tod_mng, units,
default_location);
animator.start_animations();
animator.wait_for_end();
animator.set_all_standing();
}
-void wml_animation_internal(unit_animator & animator,const vconfig &cfg, const
gamemap& map, const gamestatus& game_status, const std::vector<team>* teams,
const tod_manager& tod_mng,unit_map & units,const map_location&
default_location)
+void wml_animation_internal(unit_animator & animator,const vconfig &cfg, const
gamemap& map, const std::vector<team>* teams, const tod_manager&
tod_mng,unit_map & units,const map_location& default_location)
{
unit_map::iterator u = units.find(default_location);
@@ -488,7 +488,7 @@
const vconfig::child_list sub_anims = cfg.get_children("animate");
vconfig::child_list::const_iterator anim_itor;
for(anim_itor = sub_anims.begin(); anim_itor !=
sub_anims.end();anim_itor++) {
-
wml_animation_internal(animator,*anim_itor,map,game_status,teams,tod_mng,units);
+
wml_animation_internal(animator,*anim_itor,map,teams,tod_mng,units);
}
}
Modified: trunk/src/unit_display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_display.hpp?rev=36353&r1=36352&r2=36353&view=diff
==============================================================================
--- trunk/src/unit_display.hpp (original)
+++ trunk/src/unit_display.hpp Mon Jun 22 16:48:47 2009
@@ -78,7 +78,7 @@
* this is used for the animate_unit action, but can easily be generalized if
other wml-decribed animations are needed
*
*/
-void wml_animation(const vconfig &cfg,unit_map & units, const gamemap& map,
const gamestatus& game_status, const std::vector<team>* teams, const
tod_manager& tod_mng, const map_location& default_location =
map_location::null_location);
+void wml_animation(const vconfig &cfg,unit_map & units, const gamemap& map,
const std::vector<team>* teams, const tod_manager& tod_mng, const map_location&
default_location = map_location::null_location);
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits