removed player_info

This commit is contained in:
Eugen Jiresch 2009-07-21 11:15:26 +00:00
parent 9d992a5b27
commit 079ac55ada
2 changed files with 0 additions and 48 deletions

View file

@ -136,14 +136,6 @@ config game_classification::to_config() const
return cfg;
}
player_info::player_info() :
name(),
gold(-1) ,
gold_add(false),
available_units(),
can_recruit()
{}
#ifdef __UNUSED__
std::string generate_game_uuid()
{
@ -158,7 +150,6 @@ std::string generate_game_uuid()
#endif
game_state::game_state() :
players(),
scoped_variables(),
wml_menu_items(),
replay_data(),
@ -192,7 +183,6 @@ void write_players(game_state& gamestate, config& cfg)
}
game_state::game_state(const config& cfg, bool show_replay) :
players(),
scoped_variables(),
wml_menu_items(),
replay_data(),
@ -480,7 +470,6 @@ static void clear_wmi(std::map<std::string, wml_menu_item*>& gs_wmi) {
game_state::game_state(const game_state& state) :
/* default construct everything to silence compiler warnings. */
variable_set(),
players(),
scoped_variables(),
wml_menu_items(),
replay_data(),
@ -503,7 +492,6 @@ game_state& game_state::operator=(const game_state& state)
}
rng_ = state.rng_;
players = state.players;
scoped_variables = state.scoped_variables;
classification_ = game_classification(state.classification());
@ -745,17 +733,6 @@ void game_state::set_menu_items(const config::const_child_itors &menu_items)
}
}
void player_info::debug(){
LOG_NG << "Debugging player\n";
LOG_NG << "\tName: " << name << "\n";
LOG_NG << "\tGold: " << gold << "\n";
LOG_NG << "\tAvailable units:\n";
for (std::vector<unit>::const_iterator u = available_units.begin(); u != available_units.end(); u++){
LOG_NG << "\t\t" + u->name() + "\n";
}
LOG_NG << "\tEnd available units\n";
}
wml_menu_item::wml_menu_item(const std::string& id, const config* cfg) :
name(),
image(),

View file

@ -69,24 +69,6 @@ struct wml_menu_item
config command;
};
/** Information on a particular player of the game. */
struct player_info
{
player_info();
std::string name; /**< Stores the current_player name */
int gold; /**< Amount of gold the player has saved */
bool gold_add; /**<
* Amount of gold is added to the
* starting gold, if not it uses the
* highest of the two.
*/
std::vector<unit> available_units; /**< Units the player may recall */
std::set<std::string> can_recruit; /**< Units the player has the ability to recruit */
void debug();
};
class game_state : public variable_set
{
public:
@ -97,13 +79,6 @@ public:
~game_state();
game_state& operator=(const game_state& state);
/**
* Information about campaign players who carry resources from previous
* levels, indexed by a string identifier (which is the leader name by
* default, but can be set with the "id" attribute of the "side" tag).
*/
std::map<std::string, player_info> players;
std::vector<scoped_wml_variable*> scoped_variables;
std::map<std::string, wml_menu_item*> wml_menu_items;