19#include <QApplication>
21#include <QElapsedTimer>
28#include <QRadioButton>
30#include <QTableWidget>
59extern QString
split_text(QString text,
bool cut);
62 struct city *pcity,
bool ext);
104 QHBoxLayout *hbox_top;
105 QHBoxLayout *hbox_upkeep;
111 QSizePolicy size_fixed_policy(QSizePolicy::Maximum, QSizePolicy::Maximum,
112 QSizePolicy::Slider);
115 QVBoxLayout *vbox_main;
122 setSizePolicy(size_fixed_policy);
124 fm =
new QFontMetrics(f);
125 isize = fm->height() * 2 / 3;
126 vbox_main =
new QVBoxLayout();
127 hbox =
new QHBoxLayout();
128 vbox =
new QVBoxLayout();
129 hbox_top =
new QHBoxLayout();
136 vbox_main->addLayout(hbox_top);
140 hbox->addLayout(vbox);
141 vbox_main->addLayout(hbox);
142 hbox_upkeep =
new QHBoxLayout;
144 lab =
new QLabel(
"");
146 "citybar.shields",
"",
"",
false);
147 img = spr->
pm->toImage();
149 cropped_img =
img.copy(crop);
150 pix = QPixmap::fromImage(cropped_img);
151 lab->setPixmap(pix.scaledToHeight(isize));
152 hbox_upkeep->addWidget(lab);
153 spacer =
new QSpacerItem(0, isize, QSizePolicy::Expanding,
154 QSizePolicy::Minimum);
155 hbox_upkeep->addSpacerItem(spacer);
158 lab =
new QLabel(
"");
159 lab->setPixmap(spr->
pm->scaledToHeight(isize));
160 hbox_upkeep->addWidget(lab);
161 spacer =
new QSpacerItem(0, isize, QSizePolicy::Expanding,
162 QSizePolicy::Minimum);
163 hbox_upkeep->addSpacerItem(spacer);
165 lab =
new QLabel(
"");
167 "citybar.food",
"",
"",
false);
168 img = spr->
pm->toImage();
170 cropped_img =
img.copy(crop);
171 pix = QPixmap::fromImage(cropped_img);
172 lab->setPixmap(pix.scaledToHeight(isize));
173 hbox_upkeep->addWidget(lab);
174 vbox_main->addLayout(hbox_upkeep);
175 setLayout(vbox_main);
215 "Treasury contains %d gold.",
219 PL_(
"Upgrade as many %s to %s as possible "
220 "for %d gold each?\n%s",
221 "Upgrade as many %s to %s as possible "
222 "for %d gold each?\n%s", price),
227 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
228 ask->setDefaultButton(QMessageBox::Cancel);
229 ask->setAttribute(Qt::WA_DeleteOnClose);
230 connect(ask, &hud_message_box::accepted, [=]() {
260 p.setPen(QColor(palette().
color(QPalette::Highlight)));
294 if (
event->angleDelta().y() < 0) {
332 setParent(
gui()->mapview_wdg);
334 cw->setFixedSize(12, 12);
391 QSizePolicy size_fixed_policy(QSizePolicy::Maximum,
392 QSizePolicy::Maximum,
393 QSizePolicy::Slider);
395 scroll =
new QScrollArea(
this);
396 setSizePolicy(size_fixed_policy);
397 scroll->setWidgetResizable(
true);
398 scroll->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
401 scroll->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
402 scroll->setProperty(
"city_scroll",
true);
429 struct urd_info *info;
430 struct urd_info *unit_array = (
struct urd_info *)
fc_calloc(
sizeof(
struct urd_info),
utype_count());
431 struct urd_info unit_totals;
436 memset(&unit_totals,
'\0',
sizeof(unit_totals));
445 for (output = 0; output <
O_LAST; output++) {
449 info->active_count++;
452 if (VUT_UTYPE == pcity->production.kind) {
454 info = unit_array +
utype_index(pcity->production.value.utype);
458 num_units =
MAX(num_units, 1);
459 info->building_count += num_units;
466 info = unit_array + utype_id;
469 if (0 == info->active_count && 0 == info->building_count) {
489 setUpdatesEnabled(
false);
492 for (j = 0; j < i; j++) {
494 layout->addWidget(ui, 0, Qt::AlignVCenter);
495 total_len = total_len + ui->sizeHint().width() + 18;
498 total_len = total_len + contentsMargins().left()
499 + contentsMargins().right();
503 setUpdatesEnabled(
true);
504 setFixedWidth(qMin(total_len,
gui()->mapview_wdg->width()));
506 setFixedHeight(ui->height() + 60);
521 setUpdatesEnabled(
false);
522 setMouseTracking(
false);
524 for (j = 0; j < i; j++) {
534 setMouseTracking(
true);
535 setUpdatesEnabled(
true);
554 setMouseTracking(
true);
591 if (
req ==
nullptr) {
600 int startx, starty, nwidth, nheight;
615 rttp->
rect = QRect(startx + (nwidth - text_w) / 2, starty + 4,
619 icon_startx = startx + 5;
629 rttp->
rect = QRect(icon_startx, starty + text_h + 4
630 + (nheight - text_h - 4 - sheight) / 2,
634 icon_startx += swidth + 2;
640 if (VUT_ADVANCE == preq->source.kind
646 rttp->
rect = QRect(icon_startx, starty + text_h + 4
647 + (nheight - text_h - 4 - sheight) / 2,
649 rttp->
timpr = pimprove;
651 icon_startx += swidth + 2;
660 if (VUT_ADVANCE == preq->source.kind
665 rttp->
rect = QRect(icon_startx, starty + text_h + 4
666 + (nheight - text_h - 4 - sheight) / 2,
670 icon_startx += swidth + 2;
716 QPoint
pos =
event->pos();
723 case TECH_PREREQS_KNOWN:
732 }
else if (
event->button() == Qt::RightButton) {
733 for (i = 0; i <
tt_help.count(); i++) {
740 }
else if (rttp->
timpr !=
nullptr) {
744 }
else if (rttp->
tunit !=
nullptr) {
747 }
else if (rttp->
tgov !=
nullptr) {
771 for (i = 0; i <
tt_help.count(); i++) {
777 tt_text = QString(buffer);
778 def_str =
"<p style='white-space:pre'><b>"
782 }
else if (rttp->
timpr !=
nullptr) {
787 }
else if (rttp->
tunit !=
nullptr) {
792 }
else if (rttp->
tgov !=
nullptr) {
795 tt_text = QString(buffer);
797 def_str =
"<p style='white-space:pre'><b>"
804 tt_text = def_str + tt_text.toHtmlEscaped();
861 QSizePolicy size_expanding_policy(QSizePolicy::Expanding,
862 QSizePolicy::Expanding);
863 QSizePolicy size_fixed_policy(QSizePolicy::Minimum, QSizePolicy::Minimum);
872 scroll =
new QScrollArea();
882 progress->setSizePolicy(size_fixed_policy);
890 scroll->setAutoFillBackground(
true);
891 scroll->setPalette(QPalette(QColor(215,215,215)));
893 scroll->setSizePolicy(size_expanding_policy);
899 QObject::connect(
goal_combo, SIGNAL(currentIndexChanged(
int)),
920 gui()->remove_repo_dlg(
"SCI");
930 gui()->gimme_place(
this,
"SCI");
932 gui()->game_tab_widget->setCurrentIndex(
index);
995 str = QString::fromUtf8(text);
1001 if (done <= total) {
1043 for (
int i = 0; i <
curr_list->count(); i++) {
1048 ic = QIcon(*sp->
pm);
1054 for (
int i = 0; i <
goal_list->count(); i++) {
1059 ic = QIcon(*sp->
pm);
1088 for (
int i = 0; i <
goal_combo->count(); i++) {
1167 str = QString(
Q_(
"?tech:None"));
1171 str =
str +
"\n (" + QString::number(percent) +
"%)";
1182 gui()->sw_science->keep_blinking =
true;
1183 gui()->sw_science->set_custom_labels(
str);
1184 gui()->sw_science->sblink();
1186 gui()->sw_science->keep_blinking =
false;
1187 gui()->sw_science->set_custom_labels(
str);
1188 gui()->sw_science->update_final_pixmap();
1190 gui()->update_sidebar_tooltips();
1192 if (
gui()->is_repo_dlg_open(
"SCI")) {
1193 i =
gui()->gimme_index_of(
"SCI");
1195 w =
gui()->game_tab_widget->widget(i);
1206 QHeaderView *header;
1207 QGridLayout *eco_layout =
new QGridLayout;
1215 slist <<
_(
"Type") <<
Q_(
"?Building or Unit type:Name") <<
_(
"Redundant")
1216 <<
_(
"Count") <<
_(
"Cost") <<
_(
"U Total");
1218 eco_widget->setHorizontalHeaderLabels(slist);
1219 eco_widget->setProperty(
"showGrid",
"false");
1220 eco_widget->setProperty(
"selectionBehavior",
"SelectRows");
1221 eco_widget->setEditTriggers(QAbstractItemView::NoEditTriggers);
1222 eco_widget->horizontalHeader()->resizeSections(QHeaderView::Stretch);
1223 eco_widget->verticalHeader()->setVisible(
false);
1224 eco_widget->setSelectionMode(QAbstractItemView::SingleSelection);
1227 header->setSectionResizeMode(1, QHeaderView::Stretch);
1228 header->setStretchLastSection(
true);
1235 eco_layout->addWidget(
eco_widget, 1, 0, 5, 5);
1239 eco_layout->addWidget(
eco_label, 6, 0, 1, 5);
1245 SIGNAL(selectionChanged(
const QItemSelection &,
1246 const QItemSelection &)),
1248 const QItemSelection &)));
1249 setLayout(eco_layout);
1257 gui()->remove_repo_dlg(
"ECO");
1266 gui()->gimme_place(
this,
"ECO");
1268 gui()->game_tab_widget->setCurrentIndex(
index);
1278 int entries_used, building_total, unit_total, tax, i, j;
1280 QTableWidgetItem *
item;
1281 QFont f = QApplication::font();
1284 h = fm.height() + 6;
1292 &building_total, &tax);
1303 pix_scaled = pix->scaledToHeight(h);
1310 for (j = 0; j < 6; j++) {
1311 item =
new QTableWidgetItem;
1314 item->setData(Qt::DecorationRole, pix_scaled);
1315 item->setData(Qt::UserRole,
id);
1318 item->setTextAlignment(Qt::AlignLeft);
1325 item->setData(Qt::DisplayRole, pentry->
count);
1328 item->setData(Qt::DisplayRole, pentry->
cost);
1334 item->setTextAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
1341 struct unit_entry *pentry = unit_entries + i;
1353 for (j = 0; j < 6; j++) {
1354 item =
new QTableWidgetItem;
1355 item->setTextAlignment(Qt::AlignHCenter);
1359 pix_scaled = pix->scaledToHeight(h);
1360 item->setData(Qt::DecorationRole, pix_scaled);
1362 item->setData(Qt::UserRole,
id);
1365 item->setTextAlignment(Qt::AlignLeft);
1369 item->setData(Qt::DisplayRole, 0);
1372 item->setData(Qt::DisplayRole, pentry->
count);
1375 item->setData(Qt::DisplayRole, pentry->
cost);
1381 item->setTextAlignment(Qt::AlignVCenter | Qt::AlignHCenter);
1386 fc_snprintf(buf,
sizeof(buf),
_(
"Income: %d Total Costs: %d"),
1387 tax, building_total + unit_total);
1395 const QItemSelection & ds)
1397 QTableWidgetItem *itm;
1410 curr_row = sl.indexes().at(0).row();
1413 qvar = itm->data(Qt::UserRole);
1416 switch (selected.
kind) {
1417 case VUT_IMPROVEMENT:
1424 i = itm->text().toInt();
1452 _(
"Do you really wish to disband every %s (%d total)?"),
1456 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
1457 ask->setDefaultButton(QMessageBox::Cancel);
1458 ask->setAttribute(Qt::WA_DeleteOnClose);
1459 connect(ask, &hud_message_box::accepted, [=]() {
1470 result->setStandardButtons(QMessageBox::Ok);
1471 result->setAttribute(Qt::WA_DeleteOnClose);
1492 _(
"Do you really wish to sell "
1493 "every %s (%d total)?"),
1497 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
1498 ask->setDefaultButton(QMessageBox::Cancel);
1499 ask->setAttribute(Qt::WA_DeleteOnClose);
1500 connect(ask, &hud_message_box::accepted, [=]() {
1513 result->setStandardButtons(QMessageBox::Ok);
1514 result->setAttribute(Qt::WA_DeleteOnClose);
1536 _(
"Do you really wish to sell "
1537 "every redundant %s (%d total)?"),
1541 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
1542 ask->setDefaultButton(QMessageBox::Cancel);
1543 ask->setAttribute(Qt::WA_DeleteOnClose);
1544 connect(ask, &hud_message_box::accepted, [=]() {
1557 result->setStandardButtons(QMessageBox::Ok);
1558 result->setAttribute(Qt::WA_DeleteOnClose);
1568 QGridLayout *end_layout =
new QGridLayout;
1575 slist <<
_(
"Player") <<
_(
"Nation") <<
_(
"Score");
1576 for (i = 0 ; i < col_num - 3; i++) {
1580 end_widget->setHorizontalHeaderLabels(slist);
1581 end_widget->setProperty(
"showGrid",
"false");
1582 end_widget->setProperty(
"selectionBehavior",
"SelectRows");
1583 end_widget->setEditTriggers(QAbstractItemView::NoEditTriggers);
1584 end_widget->verticalHeader()->setVisible(
false);
1585 end_widget->setSelectionMode(QAbstractItemView::SingleSelection);
1586 end_widget->horizontalHeader()->setSectionResizeMode(
1587 QHeaderView::ResizeToContents);
1588 end_layout->addWidget(
end_widget, 1, 0, 5, 5);
1589 setLayout(end_layout);
1598 gui()->remove_repo_dlg(
"END");
1606 gui()->gimme_place(
this,
"END");
1608 gui()->game_tab_widget->setCurrentIndex(
index);
1616 QTableWidgetItem *
item;
1622 for (i = 0; i < col_num; i++) {
1623 item =
new QTableWidgetItem;
1631 item->setData(Qt::DecorationRole, *pix);
1635 item->setText(QString::number(packet->
score));
1636 item->setTextAlignment(Qt::AlignHCenter);
1640 item->setTextAlignment(Qt::AlignHCenter);
1662 if (!
gui()->is_repo_dlg_open(
"SCI")) {
1666 i =
gui()->gimme_index_of(
"SCI");
1667 w =
gui()->game_tab_widget->widget(i);
1669 if (
gui()->game_tab_widget->currentIndex() == i) {
1672 gui()->game_tab_widget->setCurrentWidget(sci_rep);
1686 if (
gui()->is_repo_dlg_open(
"ECO")) {
1687 i =
gui()->gimme_index_of(
"ECO");
1688 if (
gui()->game_tab_widget->currentIndex() == i) {
1689 w =
gui()->game_tab_widget->widget(i);
1694 gui()->update_sidebar_tooltips();
1706 if (!
gui()->is_repo_dlg_open(
"ECO")) {
1711 i =
gui()->gimme_index_of(
"ECO");
1713 w =
gui()->game_tab_widget->widget(i);
1714 if (w->isVisible()) {
1715 gui()->game_tab_widget->setCurrentIndex(0);
1720 gui()->game_tab_widget->setCurrentWidget(eco_rep);
1739 gui()->game_tab_widget->setCurrentIndex(0);
1759 if (
gui()->is_repo_dlg_open(
"END")) {
1760 i =
gui()->gimme_index_of(
"END");
1762 delete gui()->game_tab_widget->widget(i);
1772 if (
gui()->is_repo_dlg_open(
"END")) {
1773 i =
gui()->gimme_index_of(
"END");
1774 gui()->game_tab_widget->setCurrentIndex(i);
1787 if (
gui()->is_repo_dlg_open(
"END")) {
1788 i =
gui()->gimme_index_of(
"END");
1790 w =
gui()->game_tab_widget->widget(i);
1805 if (
gui()->is_repo_dlg_open(
"SCI")) {
1806 i =
gui()->gimme_index_of(
"SCI");
1807 if (
gui()->game_tab_widget->currentIndex() == i) {
1808 w =
gui()->game_tab_widget->widget(i);
1824 if (
gui()->is_repo_dlg_open(
"ECO")) {
1825 i =
gui()->gimme_index_of(
"ECO");
1827 w =
gui()->game_tab_widget->widget(i);
1829 eco_rep->deleteLater();
1842 if (
gui()->is_repo_dlg_open(
"SCI")) {
1843 i =
gui()->gimme_index_of(
"SCI");
1845 w =
gui()->game_tab_widget->widget(i);
1847 sci_rep->deleteLater();
1866 &&
gui()->game_tab_widget->currentIndex() == 0) {
QRect zealous_crop_rect(QImage &p)
struct canvas * qtg_canvas_create(int width, int height)
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
bool city_production_build_units(const struct city *pcity, bool add_production, int *num_units)
#define city_list_iterate(citylist, pcity)
#define city_list_iterate_end
QString split_text(QString text, bool cut)
QString get_tooltip_improvement(const impr_type *building, struct city *pcity, bool ext)
QString cut_helptext(QString text)
QString get_tooltip_unit(const struct unit_type *utype, bool ext)
QPushButton * sell_button
void selection_changed(const QItemSelection &sl, const QItemSelection &ds)
QPushButton * sell_redun_button
QPushButton * disband_button
QTableWidget * eco_widget
static fc_font * instance()
QFont * get_font(QString name)
int set_text_title(QString s1, QString s2, bool return_exec=false)
void set_pixmap(struct universal *target)
void mousePressEvent(QMouseEvent *event)
void create_tooltip_help()
QList< req_tooltip_help * > tt_help
research_diagram(QWidget *parent=0)
void mouseMoveEvent(QMouseEvent *event)
void paintEvent(QPaintEvent *event)
static units_reports * m_instance
void paintEvent(QPaintEvent *event)
void add_item(unittype_item *item)
static units_reports * instance()
virtual void update_menu()
void update_units(bool show=false)
QList< unittype_item * > unittype_list
QHBoxLayout * scroll_layout
void leaveEvent(QEvent *event)
unittype_item(QWidget *parent, unit_type *ut)
QLabel label_info_inbuild
void enterEvent(QEnterEvent *event)
QPushButton upgrade_button
void paintEvent(QPaintEvent *event)
void wheelEvent(QWheelEvent *event)
bool client_is_global_observer(void)
bool client_is_observer(void)
bool can_client_issue_orders(void)
bool client_has_player(void)
cid cid_encode_building(const struct impr_type *pimprove)
struct universal cid_decode(cid id)
cid cid_encode_unit(const struct unit_type *punittype)
void unit_focus_set_and_select(struct unit *punit)
#define can_unit_do_activity_client(_punit_, _act_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
#define PL_(String1, String2, n)
const char * government_name_translation(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
void get_text_size(int *width, int *height, enum client_font font, const char *text)
void canvas_free(struct canvas *store)
void popup_help_dialog_typed(const char *item, enum help_page_type htype)
void get_sprite_dimensions(struct sprite *sprite, int *width, int *height)
#define mevent_gpos(__ev__)
bool comp_less_than(const qlist_item &q1, const qlist_item &q2)
void helptext_government(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct government *gov)
void helptext_advance(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, int i)
char * helptext_building(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct impr_type *pimprove)
char * helptext_unit(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct unit_type *utype)
const struct impr_type * valid_improvement(const struct impr_type *pimprove)
struct impr_type * improvement_by_number(const Impr_type_id id)
bool can_sell_building(const struct impr_type *pimprove)
Impr_type_id improvement_number(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define log_error(message,...)
#define fc_calloc(n, esz)
const char *const default_font
struct nation_type * nation_of_player(const struct player *pplayer)
struct client_options gui_options
int dsend_packet_player_tech_goal(struct connection *pc, int tech)
int dsend_packet_player_research(struct connection *pc, int tech)
int dsend_packet_unit_type_upgrade(struct connection *pc, Unit_type_id type)
const char * science_dialog_text(void)
struct player * player_by_number(const int player_id)
const char * player_name(const struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
void science_report_dialog_popup(bool raise)
QString get_tooltip_improvement(impr_type *building, struct city *pcity, bool ext)
void endgame_report_dialog_start(const struct packet_endgame_report *packet)
QString split_text(QString text, bool cut)
void real_units_report_dialog_update(void *unused)
void real_economy_report_dialog_update(void *unused)
bool comp_less_than(const qlist_item &q1, const qlist_item &q2)
void popdown_economy_report()
void economy_report_dialog_popup(bool raise)
void popdown_science_report()
void units_report_dialog_popup(bool raise)
void popdown_endgame_report()
void science_report_dialog_redraw(void)
void popdown_units_report()
void toggle_units_report(bool x)
void popup_endgame_report()
QString cut_helptext(QString text)
QString get_tooltip_unit(struct unit_type *unit, bool ext)
void real_science_report_dialog_update(void *unused)
void get_economy_report_units_data(struct unit_entry *entries, int *num_entries_used, int *total_cost)
void get_economy_report_data(struct improvement_entry *entries, int *num_entries_used, int *total_cost, int *total_income)
void sell_all_improvements(const struct impr_type *pimprove, bool redundant_only, char *message, size_t message_sz)
void disband_all_units(const struct unit_type *punittype, bool in_cities_only, char *message, size_t message_sz)
endgame_report_dialog_player
void draw_reqtree(struct reqtree *tree, struct canvas *pcanvas, int canvas_x, int canvas_y, int tt_x, int tt_y, int w, int h)
void get_reqtree_dimensions(struct reqtree *reqtree, int *width, int *height)
Tech_type_id get_tech_on_reqtree(struct reqtree *tree, int x, int y)
void destroy_reqtree(struct reqtree *tree)
struct reqtree * create_reqtree(struct player *pplayer, bool show_all)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
bool research_invention_reachable(const struct research *presearch, const Tech_type_id tech)
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
struct packet_ruleset_control control
QTableWidget * end_widget
endgame_report(const struct packet_endgame_report *packet)
void update_report(const struct packet_endgame_player *packet)
char category_name[32][MAX_LEN_NAME]
struct tree_node ** nodes
struct tree_node *** layers
struct research::@75::@77 client
struct research::research_invention inventions[A_ARRAY_SIZE]
GtkProgressBar * progress_bar
QList< qlist_item > * curr_list
research_diagram * res_diag
QList< qlist_item > * goal_list
void current_tech_changed(int index)
void goal_tech_changed(int index)
QComboBox * researching_combo
struct tree_node ** provide
struct tree_node ** require
enum unit_activity activity
const struct unit_type * utype
int fc_snprintf(char *str, size_t n, const char *format,...)
struct advance * advance_by_number(const Tech_type_id atype)
bool is_future_tech(Tech_type_id tech)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_index_iterate_end
#define advance_index_iterate(_start, _index)
const char * get_science_target_text(double *percent)
const char * get_science_goal_text(Tech_type_id goal)
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
struct sprite * get_building_sprite(const struct tileset *t, const struct impr_type *pimprove)
struct tileset * get_tileset(void)
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum direction8 facing)
struct sprite * tiles_lookup_sprite_tag_alt(struct tileset *t, enum log_level level, const char *tag, const char *alt, const char *what, const char *name, bool scale)
struct sprite * get_tax_sprite(const struct tileset *t, Output_type_id otype)
struct sprite * get_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)
const struct unit_type * utype
const struct impr_type * building
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
Unit_type_id utype_count(void)
struct unit_type * utype_by_number(const Unit_type_id id)
Unit_type_id utype_number(const struct unit_type *punittype)
Unit_type_id utype_index(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
int unit_upgrade_price(const struct player *pplayer, const struct unit_type *from, const struct unit_type *to)
#define unit_type_iterate(_p)
#define unit_type_iterate_end