Begin prying map_labels.cpp loose from the replay maChinery.

This commit is contained in:
Eric S. Raymond 2007-06-28 12:24:38 +00:00
parent 2846d69bd3
commit 00c2437836
4 changed files with 5 additions and 11 deletions

View File

@ -242,7 +242,7 @@ const terrain_label* new_label)
}
void map_labels::clear(const std::string& team_name, replay* replay)
void map_labels::clear(const std::string& team_name)
{
team_label_map::iterator i = labels_.find(team_name);
if (i != labels_.end())
@ -255,12 +255,6 @@ void map_labels::clear(const std::string& team_name, replay* replay)
{
clear_map(i->second);
}
if (replay)
{
replay->clear_labels(team_name);
}
}
void map_labels::clear_map(const label_map& m)

View File

@ -23,7 +23,6 @@ class config;
#include <string>
class display;
class team;
class terrain_label;
class replay;
class game_state;
@ -55,7 +54,7 @@ public:
void add_label(const gamemap::location&,
const terrain_label*);
void clear(const std::string&, replay*);
void clear(const std::string&);
void scroll(double xmove, double ymove);

View File

@ -1408,7 +1408,8 @@ namespace events{
if (gui_->team_valid()
&& !is_observer())
{
gui_->labels().clear(gui_->current_team_name(),&recorder);
gui_->labels().clear(gui_->current_team_name());
recorder.clear_labels(gui_->current_team_name());
}
}

View File

@ -703,7 +703,7 @@ bool do_replay(game_display& disp, const gamemap& map, const game_data& gameinfo
} else if((child = cfg->child("clear_labels")) != NULL) {
disp.labels().clear(std::string((*child)["team_name"]),0);
disp.labels().clear(std::string((*child)["team_name"]));
}
else if((child = cfg->child("rename")) != NULL) {