Пример #1
0
trecruit::trecruit(game_display& gui, std::vector<team>& teams, unit_map& units, hero_map& heros, artifical& city, int cost_exponent, bool rpg_mode)
    : gui_(gui)
    , teams_(teams)
    , units_(units)
    , heros_(heros)
    , current_team_(teams_[city.side() - 1])
    , city_(city)
    , cost_exponent_(cost_exponent)
    , fresh_heros_()
    , unit_types_()
    , type_index_(0)
    , checked_heros_()
    , hero_table_(NULL)
    , rpg_mode_(rpg_mode)
{
}
Пример #2
0
tinterior::tinterior(game_display& gui, std::vector<team>& teams, unit_map& units, hero_map& heros, artifical& city, bool browse)
	: gui_(gui)
	, teams_(teams)
	, units_(units)
	, heros_(heros)
	, city_(city)
	, current_team_(teams_[city.side() - 1])
	, browse_(browse)
	, fresh_heros_()
	, type_index_(0)
	, checked_hero_(-1)
	, appoint_(NULL)
	, hero_table_(NULL)
	, market_map_()
	, technology_map_()
{
	departments_.push_back(department(department::commercial, _("Commercial"), "interior/commercial.png", "interior/commercial-unit.png"));
	hero& h1 = city_.master();
	hero& h2 = *city_.mayor();
	departments_.back().exploiture_ = calculate_exploiture(h1, h2, department::commercial);

	departments_.push_back(department(department::technology, _("Technology"), "interior/technology.png", "interior/technology-unit.png"));
	departments_.back().exploiture_ = calculate_exploiture(h1, h2, department::technology);
}