27#ifdef SDL2_PLAIN_INCLUDE
81#define local_show(id) \
82 clear_wflag(get_widget_pointer_from_id(begin_order_widget_list, id, SCAN_FORWARD), \
85#define local_hide(id) \
86 set_wflag(get_widget_pointer_from_id(begin_order_widget_list, id, SCAN_FORWARD), \
105 switch (order_widget->
id) {
190 if (extra_type_list_size(
extras) > 0) {
410 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"No Orders"),
419 buf->
key = SDLK_SPACE;
426 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Wait"),
"W");
447 buf->
mod = KMOD_SHIFT;
453 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Do..."),
"D");
465 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Disband Unit"),
"Shift+D");
473 buf->
mod = KMOD_SHIFT;
478 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Upgrade Unit"),
"Shift+U");
486 buf->
mod = KMOD_SHIFT;
491 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Convert Unit"),
"Shift+O");
499 buf->
mod = KMOD_SHIFT;
505 _(
"Return to Nearest City"),
"Shift+G");
513 buf->
mod = KMOD_SHIFT;
518 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Go to City"),
"T");
530 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Airlift to City"),
"T");
542 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Go to Tile"),
"G");
554 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Patrol"),
"Q");
567 _(
"Connect With Irrigation"),
"Ctrl+I");
575 buf->
mod = KMOD_CTRL;
584 _(
"Connect With %s (%s)"),
594 buf->
mod = KMOD_CTRL;
603 _(
"Connect With %s (%s)"),
613 buf->
mod = KMOD_CTRL;
619 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Auto Explore"),
"X");
631 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Auto Settler"),
"A");
645 _(
"Unsentry All On Tile"),
"Shift+S");
653 buf->
mod = KMOD_SHIFT;
659 _(
"Unload All From Transporter"),
"Shift+T");
666 buf->
mod = KMOD_SHIFT;
672 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Load Unit"),
"L");
684 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Unload Unit"),
"U");
709 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Pillage"),
"Shift+P");
717 buf->
mod = KMOD_SHIFT;
722 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Sentry Unit"),
"S");
784 buf->
mod = KMOD_SHIFT;
790 fc_snprintf(cbuf,
sizeof(cbuf),
"%s (%s)",
_(
"Fortify Unit"),
"F");
811 buf->
mod = KMOD_SHIFT;
869 buf->
mod = KMOD_SHIFT;
885 buf->
mod = KMOD_SHIFT;
1017 static Uint16 counter = 0;
1018 struct unit_list *punits = NULL;
1020 static char cbuf[128];
1082 punit = unit_list_get(punits, 0);
1085 struct city *homecity;
1105 if (pcity != NULL) {
1134 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Build %s (%s) %d %s"),
1137 PL_(
"turn",
"turns", time));
1161 _(
"%s With %s ( %d one time bonus + %d trade ) (R)"),
1167 revenue = (revenue + 2) / 3;
1169 _(
"%s Of %s ( %d one time bonus ) (R)"),
1187 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Build %s (%s) %d %s"),
1189 PL_(
"turn",
"turns", time));
1204 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Build %s (%s) %d %s"),
1206 PL_(
"turn",
"turns", time));
1218 fc_snprintf(cbuf,
sizeof(cbuf),
"%s %s (%s) %d %s",
1221 "Shift+I", time,
PL_(
"turn",
"turns", time));
1231 fc_snprintf(cbuf,
sizeof(cbuf),
"%s %s (%s) %d %s",
1234 "Shift+M", time,
PL_(
"turn",
"turns", time));
1244 fc_snprintf(cbuf,
sizeof(cbuf),
"%s %s (%s) %d %s",
1247 "O", time,
PL_(
"turn",
"turns", time));
1255 if (pbase != NULL) {
1260 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Build %s (%s) %d %s"),
1262 PL_(
"turn",
"turns", time));
1276 if (pbase != NULL) {
1281 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Build %s (%s) %d %s"),
1283 PL_(
"turn",
"turns", time));
1297 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Clean %s (%s) %d %s"),
1299 PL_(
"turn",
"turns", time));
1319 fc_snprintf(cbuf,
sizeof(cbuf),
_(
"Clean %s (%s) %d %s"),
1321 PL_(
"turn",
"turns", time));
1384 bool conn_possible =
FALSE;
1385 struct extra_type_list *
extras;
1389 if (extra_type_list_size(
extras) > 0) {
1392 tgt = extra_type_list_get(
extras, 0);
1396 if (conn_possible) {
1405 bool road_conn_possible;
1407 if (proad != NULL) {
1414 road_conn_possible =
FALSE;
1417 if (road_conn_possible) {
1426 bool road_conn_possible;
1428 if (proad != NULL) {
1435 road_conn_possible =
FALSE;
1438 if (road_conn_possible) {
1457 if (pcity && pcity->
airlift) {
const char * action_id_name_translation(action_id act_id)
struct extra_type * base_extra_get(const struct base_type *pbase)
struct base_type * get_base_by_gui_type(enum base_gui_type type, const struct unit *punit, const struct tile *ptile)
const char * city_name_get(const struct city *pcity)
enum client_states client_state(void)
bool can_client_issue_orders(void)
int turns_to_activity_done(const struct tile *ptile, Activity_type_id act, const struct extra_type *tgt, const struct unit *pmodunit)
bool can_units_do_connect(struct unit_list *punits, enum unit_activity activity, struct extra_type *tgt)
void key_unit_sentry(void)
void key_unit_pollution(void)
void request_unit_return(struct unit *punit)
void key_unit_build_city(void)
void key_unit_auto_explore(void)
void key_unit_connect(enum unit_activity activity, struct extra_type *tgt)
void request_unit_load(struct unit *pcargo, struct unit *ptrans, struct tile *ptile)
void request_unit_goto(enum unit_orders last_order, action_id act_id, int sub_tgt_id)
void key_unit_paradrop(void)
struct unit_list * get_units_in_focus(void)
void request_unit_autosettlers(const struct unit *punit)
bool can_unit_do_connect(struct unit *punit, enum unit_activity activity, struct extra_type *tgt)
void key_unit_build_wonder(void)
void key_unit_plant(void)
void key_unit_fortress(void)
void key_unit_pillage(void)
void request_unit_unload(struct unit *pcargo)
void key_unit_irrigate(void)
void key_unit_unload_all(void)
void key_unit_homecity(void)
void key_unit_patrol(void)
void key_unit_wakeup_others(void)
void key_unit_trade_route(void)
struct unit * head_of_units_in_focus(void)
void key_unit_action_select_tgt(void)
void key_unit_fallout(void)
void key_unit_transform(void)
void key_unit_airbase(void)
void key_unit_convert(void)
void key_unit_fortify(void)
void key_unit_cultivate(void)
#define can_unit_do_activity_targeted_client(_punit_, _act_, _tgt_)
#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)
struct city * game_city_by_number(int id)
void popup_goto_dialog(void)
void popup_unit_disband_dlg(struct unit *punit, bool city)
void popup_unit_upgrade_dlg(struct unit *punit, bool city)
void popup_airlift_dialog(void)
int main_window_width(void)
struct sdl2_data main_data
#define CF_MAP_UNIT_W_CREATED
#define CF_ORDERS_WIDGETS_CREATED
struct widget * selected_widget
#define CF_GAME_JUST_STARTED
#define PRESSED_EVENT(event)
struct widget * get_minimap_window_widget(void)
struct widget * get_unit_info_window_widget(void)
void hide_unitinfo_window_buttons(void)
void disable_minimap_window_buttons(void)
void show_minimap_window_buttons(void)
void hide_minimap_window_buttons(void)
void show_unitinfo_window_buttons(void)
void disable_unitinfo_window_buttons(void)
@ ID_UNIT_ORDER_AUTO_SETTLER
@ ID_UNIT_ORDER_BUILD_WONDER
@ ID_UNIT_ORDER_BUILD_CITY
@ ID_UNIT_ORDER_DIPLOMAT_DLG
@ ID_UNIT_ORDER_CONNECT_ROAD
@ ID_UNIT_ORDER_AUTO_EXPLORE
@ ID_UNIT_ORDER_WAKEUP_OTHERS
@ ID_UNIT_ORDER_UNLOAD_TRANSPORTER
@ ID_UNIT_ORDER_GOTO_CITY
@ ID_UNIT_ORDER_POLLUTION
@ ID_UNIT_ORDER_TRANSFORM
@ ID_UNIT_ORDER_CONNECT_IRRIGATE
@ ID_UNIT_ORDER_CULTIVATE
@ ID_UNIT_ORDER_TRADE_ROUTE
@ ID_UNIT_ORDER_CONNECT_RAILROAD
utf8_str * copy_chars_to_utf8_str(utf8_str *pstr, const char *pchars)
#define create_utf8_from_char_fonto(string_in, fonto)
enum client_pages get_client_page(void)
struct extra_type * road_extra_get(const struct road_type *proad)
enum road_compat road_compat_special(const struct road_type *proad)
struct road_type * road_by_gui_type(enum road_gui_type gui_type)
static struct compatibility compat[]
struct terrain * cultivate_result
struct terrain * plant_result
struct terrain * transform_result
struct unit::@80::@82 client
struct goods_type * carrying
enum server_side_agent ssa_controller
int fc_snprintf(char *str, size_t n, const char *format,...)
const char * terrain_name_translation(const struct terrain *pterrain)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
bool can_cities_trade(const struct city *pc1, const struct city *pc2)
int trade_base_between_cities(const struct city *pc1, const struct city *pc2)
int get_caravan_enter_city_trade_bonus(const struct city *pc1, const struct city *pc2, struct goods_type *pgood, const bool establish_trade)
bool can_establish_trade_route(const struct city *pc1, const struct city *pc2)
bool unit_can_add_or_build_city(const struct civ_map *nmap, const struct unit *punit)
bool can_unit_change_homecity(const struct civ_map *nmap, const struct unit *punit)
bool is_unit_activity_on_tile(enum unit_activity activity, const struct tile *ptile)
bool can_unit_do_autosettlers(const struct unit *punit)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
bool unit_can_help_build_wonder_here(const struct civ_map *nmap, const struct unit *punit)
bool unit_can_convert(const struct civ_map *nmap, const struct unit *punit)
bool units_can_unload(const struct unit_list *punits)
bool units_can_load(const struct unit_list *punits)
#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)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)