1 /***********************************************************************
2  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 2, or (at your option)
6    any later version.
7 
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12 ***********************************************************************/
13 
14 #ifdef HAVE_CONFIG_H
15 #include <fc_config.h>
16 #endif
17 
18 /* common */
19 #include "game.h"
20 #include "government.h"
21 
22 /* gui main header */
23 #include "gui_stub.h"
24 
25 #include "dialogs.h"
26 
27 /**************************************************************************
28   Popup a dialog to display information about an event that has a
29   specific location.  The user should be given the option to goto that
30   location.
31 **************************************************************************/
popup_notify_goto_dialog(const char * headline,const char * lines,const struct text_tag_list * tags,struct tile * ptile)32 void popup_notify_goto_dialog(const char *headline, const char *lines,
33                               const struct text_tag_list *tags,
34                               struct tile *ptile)
35 {
36   /* PORTME */
37 }
38 
39 /**************************************************************************
40   Popup a dialog to display connection message from server.
41 **************************************************************************/
popup_connect_msg(const char * headline,const char * message)42 void popup_connect_msg(const char *headline, const char *message)
43 {
44   /* PORTME */
45 }
46 
47 /**************************************************************************
48   Popup a generic dialog to display some generic information.
49 **************************************************************************/
popup_notify_dialog(const char * caption,const char * headline,const char * lines)50 void popup_notify_dialog(const char *caption, const char *headline,
51 			 const char *lines)
52 {
53   /* PORTME */
54 }
55 
56 /**************************************************************************
57   Popup the nation selection dialog.
58 **************************************************************************/
popup_races_dialog(struct player * pplayer)59 void popup_races_dialog(struct player *pplayer)
60 {
61   /* PORTME */
62 }
63 
64 /**************************************************************************
65   Close the nation selection dialog.  This should allow the user to
66   (at least) select a unit to activate.
67 **************************************************************************/
popdown_races_dialog(void)68 void popdown_races_dialog(void)
69 {
70   /* PORTME */
71 }
72 
73 /**************************************************************************
74   Popup a dialog window to select units on a particular tile.
75 **************************************************************************/
unit_select_dialog_popup(struct tile * ptile)76 void unit_select_dialog_popup(struct tile *ptile)
77 {
78   /* PORTME */
79 }
80 
81 /**************************************************************************
82   Update the dialog window to select units on a particular tile.
83 **************************************************************************/
unit_select_dialog_update_real(void * unused)84 void unit_select_dialog_update_real(void *unused)
85 {
86   /* PORTME */
87 }
88 
89 /**************************************************************************
90   The server has changed the set of selectable nations.
91 **************************************************************************/
races_update_pickable(bool nationset_change)92 void races_update_pickable(bool nationset_change)
93 {
94   /* PORTME */
95 }
96 
97 /**************************************************************************
98   In the nation selection dialog, make already-taken nations unavailable.
99   This information is contained in the packet_nations_used packet.
100 **************************************************************************/
races_toggles_set_sensitive(void)101 void races_toggles_set_sensitive(void)
102 {
103   /* PORTME */
104 }
105 
106 /**************************************************************************
107   Popup a dialog asking if the player wants to start a revolution.
108 **************************************************************************/
popup_revolution_dialog(void)109 void popup_revolution_dialog(void)
110 {
111   /* PORTME */
112 }
113 
114 /**************************************************************************
115   Popup a dialog that allows the player to select what action a unit
116   should take.
117 **************************************************************************/
popup_action_selection(struct unit * actor_unit,struct city * target_city,struct unit * target_unit,struct tile * target_tile,const struct act_prob * act_probs)118 void popup_action_selection(struct unit *actor_unit,
119                                    struct city *target_city,
120                                    struct unit *target_unit,
121                                    struct tile *target_tile,
122                                    const struct act_prob *act_probs)
123 {
124   /* PORTME */
125 }
126 
127 /**************************************************************************
128   Popup a window asking a diplomatic unit if it wishes to incite the
129   given enemy city.
130 **************************************************************************/
popup_incite_dialog(struct unit * actor,struct city * pcity,int cost)131 void popup_incite_dialog(struct unit *actor, struct city *pcity, int cost)
132 {
133   /* PORTME */
134 }
135 
136 /**************************************************************************
137   Popup a dialog asking a diplomatic unit if it wishes to bribe the
138   given enemy unit.
139 **************************************************************************/
popup_bribe_dialog(struct unit * actor,struct unit * punit,int cost)140 void popup_bribe_dialog(struct unit *actor, struct unit *punit, int cost)
141 {
142   /* PORTME */
143 }
144 
145 /**************************************************************************
146   Popup a dialog asking a diplomatic unit if it wishes to sabotage the
147   given enemy city.
148 **************************************************************************/
popup_sabotage_dialog(struct unit * actor,struct city * pcity)149 void popup_sabotage_dialog(struct unit *actor, struct city *pcity)
150 {
151   /* PORTME */
152 }
153 
154 /**************************************************************************
155   Popup a dialog asking the unit which improvement they would like to
156   pillage.
157 **************************************************************************/
popup_pillage_dialog(struct unit * punit,bv_extras may_pillage)158 void popup_pillage_dialog(struct unit *punit, bv_extras may_pillage)
159 {
160   /* PORTME */
161 }
162 
163 /****************************************************************************
164   Pops up a dialog to confirm disband of the unit(s).
165 ****************************************************************************/
popup_disband_dialog(struct unit_list * punits)166 void popup_disband_dialog(struct unit_list *punits)
167 {
168   /* PORTME */
169 }
170 
171 /**************************************************************************
172   Ruleset (modpack) has suggested loading certain tileset. Confirm from
173   user and load.
174 **************************************************************************/
popup_tileset_suggestion_dialog(void)175 void popup_tileset_suggestion_dialog(void)
176 {
177   /* PORTME */
178 }
179 
180 /****************************************************************
181   Ruleset (modpack) has suggested loading certain soundset. Confirm from
182   user and load.
183 *****************************************************************/
popup_soundset_suggestion_dialog(void)184 void popup_soundset_suggestion_dialog(void)
185 {
186   /* PORTME */
187 }
188 
189 /****************************************************************
190   Ruleset (modpack) has suggested loading certain musicset. Confirm from
191   user and load.
192 *****************************************************************/
popup_musicset_suggestion_dialog(void)193 void popup_musicset_suggestion_dialog(void)
194 {
195   /* PORTME */
196 }
197 
198 /**************************************************************************
199   Tileset (modpack) has suggested loading certain theme. Confirm from
200   user and load.
201 **************************************************************************/
popup_theme_suggestion_dialog(const char * theme_name)202 bool popup_theme_suggestion_dialog(const char *theme_name)
203 {
204   /* PORTME */
205   return FALSE;
206 }
207 
208 /**************************************************************************
209   This function is called when the client disconnects or the game is
210   over.  It should close all dialog windows for that game.
211 **************************************************************************/
popdown_all_game_dialogs(void)212 void popdown_all_game_dialogs(void)
213 {
214   /* PORTME */
215 }
216 
217 /**************************************************************************
218   Returns the id of the actor unit currently handled in action selection
219   dialog when the action selection dialog is open.
220   Returns IDENTITY_NUMBER_ZERO if no action selection dialog is open.
221 **************************************************************************/
action_selection_actor_unit(void)222 int action_selection_actor_unit(void)
223 {
224   /* PORTME */
225   return IDENTITY_NUMBER_ZERO;
226 }
227 
228 /**************************************************************************
229   Returns id of the target city of the actions currently handled in action
230   selection dialog when the action selection dialog is open and it has a
231   city target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog
232   is open or no city target is present in the action selection dialog.
233 **************************************************************************/
action_selection_target_city(void)234 int action_selection_target_city(void)
235 {
236   /* PORTME */
237   return IDENTITY_NUMBER_ZERO;
238 }
239 
240 /**************************************************************************
241   Returns id of the target unit of the actions currently handled in action
242   selection dialog when the action selection dialog is open and it has a
243   unit target. Returns IDENTITY_NUMBER_ZERO if no action selection dialog
244   is open or no unit target is present in the action selection dialog.
245 **************************************************************************/
action_selection_target_unit(void)246 int action_selection_target_unit(void)
247 {
248   /* PORTME */
249   return IDENTITY_NUMBER_ZERO;
250 }
251 
252 /**************************************************************************
253   Updates the action selection dialog with new information.
254 **************************************************************************/
action_selection_refresh(struct unit * actor_unit,struct city * target_city,struct unit * target_unit,struct tile * target_tile,const struct act_prob * act_probs)255 void action_selection_refresh(struct unit *actor_unit,
256                               struct city *target_city,
257                               struct unit *target_unit,
258                               struct tile *target_tile,
259                               const struct act_prob *act_probs)
260 {
261   /* TODO: port me. */
262 }
263 
264 /****************************************************************
265   Closes the action selection dialog
266 ****************************************************************/
action_selection_close(void)267 void action_selection_close(void)
268 {
269   /* PORTME */
270 }
271 
272 /**************************************************************************
273   Let the non shared client code know that the action selection process
274   no longer is in progress for the specified unit.
275 
276   This allows the client to clean up any client specific assumptions.
277 **************************************************************************/
action_selection_no_longer_in_progress_gui_specific(int actor_id)278 void action_selection_no_longer_in_progress_gui_specific(int actor_id)
279 {
280   /* PORTME */
281 }
282 
283 /****************************************************************
284   Player has gained a new tech.
285 *****************************************************************/
show_tech_gained_dialog(Tech_type_id tech)286 void show_tech_gained_dialog(Tech_type_id tech)
287 {
288   /* PORTME */
289 }
290 
291 /****************************************************************
292   Show tileset error dialog.
293 *****************************************************************/
show_tileset_error(const char * msg)294 void show_tileset_error(const char *msg)
295 {
296   /* PORTME */
297 }
298 
299 /****************************************************************
300   Give a warning when user is about to edit scenario with manually
301   set properties.
302 *****************************************************************/
gui_handmade_scenario_warning(void)303 bool gui_handmade_scenario_warning(void)
304 {
305   /* Just tell the client common code to handle this. */
306   return FALSE;
307 }
308 
309 /****************************************************************
310   Unit wants to get into some transport on given tile.
311 *****************************************************************/
gui_request_transport(struct unit * pcargo,struct tile * ptile)312 bool gui_request_transport(struct unit *pcargo, struct tile *ptile)
313 {
314   return FALSE; /* Unit was not handled here. */
315 }
316 
317 /***************************************************************************
318   Popup detailed information about battle or save information for
319   some kind of statistics
320 ***************************************************************************/
gui_popup_combat_info(int attacker_unit_id,int defender_unit_id,int attacker_hp,int defender_hp,bool make_winner_veteran)321 void gui_popup_combat_info(int attacker_unit_id, int defender_unit_id,
322                            int attacker_hp, int defender_hp,
323                            bool make_winner_veteran)
324 {
325 }
326