mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 20:16:04 +00:00
Begin prying map_labels.cpp loose from the replay maChinery.
This commit is contained in:
parent
2846d69bd3
commit
00c2437836
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user