void Redraw(void) const { for(Colors::const_iterator it = colors.begin(); it != colors.end(); ++it) { const Rect & pos = positions[std::distance(colors.begin(), it)]; AGG::GetICN(ICN::CELLWIN, 43 + Color::GetIndex(*it)).Blit(pos); if(recipients & *it) AGG::GetICN(ICN::CELLWIN, 2).Blit(pos.x + 2, pos.y + 2); } }
SelectRecipientsColors(const Point & pos) : colors(Settings::Get().GetPlayers().GetColors() & ~Settings::Get().GetPlayers().current_color), recipients(0) { positions.reserve(colors.size()); for(Colors::const_iterator it = colors.begin(); it != colors.end(); ++it) { const u8 current = std::distance(colors.begin(), it); const Sprite & sprite = AGG::GetICN(ICN::CELLWIN, 43); positions.push_back(Rect(pos.x + Game::GetStep4Player(current, sprite.w() + 15, colors.size()), pos.y, sprite.w(), sprite.h())); } }
void Kingdoms::Init(void) { const Colors colors(Settings::Get().GetPlayers().GetColors()); clear(); for(Colors::const_iterator it = colors.begin(); it != colors.end(); ++it) GetKingdom(*it).Init(*it); }