Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-stub/mapview.c Source File

Freeciv-3.1

Loading...
Searching...
No Matches
mapview.c
Go to the documentation of this file.
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/* utility */
19#include "fcintl.h"
20#include "support.h"
21
22/* common */
23#include "calendar.h"
24#include "game.h"
25
26/* gui main header */
27#include "gui_stub.h"
28
29/* client */
30#include "client_main.h"
31#include "climisc.h"
32#include "control.h"
33#include "mapctrl_common.h"
34
35#include "mapview.h"
36
37/************************************************************************/
42 void update_info_label(void)
43{
44 /* PORTME */
45 char buffer[512];
46
47 fc_snprintf(buffer, sizeof(buffer),
48 _("Population: %s\n"
49 "Year: %s\n"
50 "Gold %d\n"
51 "Tax: %d Lux: %d Sci: %d"),
52 population_to_text(civ_population(client_player())),
53 calendar_text(),
54 client.conn.playing->economic.gold,
55 client.conn.playing->economic.tax,
56 client.conn.playing->economic.luxury,
57 client.conn.playing->economic.science);
58
59 /* ... */
60}
61
62/************************************************************************/
74 void update_unit_info_label(struct unit_list *punitlist)
75{
76 /* PORTME */
77}
78
79/************************************************************************/
83 void update_mouse_cursor(enum cursor_type new_cursor_type)
84{
85 /* PORTME */
86}
87
88/************************************************************************/
92 void gui_update_timeout_label(void)
93{
94 /* PORTME */
95
96 /* set some widget based on get_timeout_label_text() */
97}
98
99/************************************************************************/
105 void update_turn_done_button(bool do_restore)
106{
107 static bool flip = FALSE;
108
109 if (!get_turn_done_button_state()) {
110 return;
111 }
112
113 if ((do_restore && flip) || !do_restore) {
114 /* ... */
115
116 flip = !flip;
117 }
118 /* PORTME */
119}
120
121/************************************************************************/
126 void set_indicator_icons(struct sprite *bulb, struct sprite *sol,
127 struct sprite *flake, struct sprite *gov)
128{
129 /* PORTME */
130}
131
132/************************************************************************/
135 struct canvas *get_overview_window(void)
136{
137 /* PORTME */
138 return NULL;
139}
140
141/************************************************************************/
145 void dirty_rect(int canvas_x, int canvas_y,
146 int pixel_width, int pixel_height)
147{
148 /* PORTME */
149}
150
151/************************************************************************/
154 void dirty_all(void)
155{
156 /* PORTME */
157}
158
159/************************************************************************/
164 void flush_dirty(void)
165{
166 /* PORTME */
167}
168
169/************************************************************************/
174 void gui_flush(void)
175{
176 /* PORTME */
177}
178
179/************************************************************************/
183 void update_map_canvas_scrollbars(void)
184{
185 /* PORTME */
186}
187
188/************************************************************************/
191 void update_map_canvas_scrollbars_size(void)
192{
193 /* PORTME */
194}
195
196/************************************************************************/
199 void update_city_descriptions(void)
200{
201 update_map_canvas_visible();
202}
203
204/************************************************************************/
207 void put_cross_overlay_tile(struct tile *ptile)
208{
209 /* PORTME */
210}
211
212/************************************************************************/
215 void draw_selection_rectangle(int canvas_x, int canvas_y, int w, int h)
216{
217 /* PORTME */
218}
219
220/**********************************************************************/
223 void gui_map_canvas_size_refresh(void)
224{
225 /* Needed only with full screen zoom mode.
226 * Not needed, nor implemented, in this client. */
227 fc_assert(FALSE);
228}
229
230/************************************************************************/
233 void tileset_changed(void)
234{
235 /* PORTME */
236 /* Here you should do any necessary redraws (for instance, the city
237 * dialogs usually need to be resized). */
238}
239
240/************************************************************************/
244 void get_overview_area_dimensions(int *width, int *height)
245{
246 /* PORTME */
247 *width = 0;
248 *height = 0;
249}
250
251/************************************************************************/
257 void overview_size_changed(void)
258{
259 /* PORTME */
260}
261
262/************************************************************************/
265 void update_overview_scroll_window_pos(int x, int y)
266{
267 /* TODO: PORTME. */
268}
269
270/************************************************************************/
273 void gui_start_turn(void)
274{
275 /* PORTME */
276}
calendar_text
const char * calendar_text(void)
Definition calendar.c:141
calendar.h
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
canvas_y
struct canvas int int canvas_y
Definition canvas_g.h:43
canvas_x
struct canvas int canvas_x
Definition canvas_g.h:43
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
client
struct civclient client
Definition client_main.c:149
client_main.h
client_player
#define client_player()
Definition client_main.h:106
climisc.h
control.h
get_turn_done_button_state
bool get_turn_done_button_state()
Definition mapctrl_common.c:519
fcintl.h
_
#define _(String)
Definition fcintl.h:67
population_to_text
const char * population_to_text(int thousand_citizen)
Definition game.c:714
civ_population
int civ_population(const struct player *pplayer)
Definition game.c:69
game.h
flush_dirty
void flush_dirty(void)
Definition mapview.c:450
update_info_label
void update_info_label(void)
Definition mapview.c:121
update_turn_done_button
void update_turn_done_button(bool do_restore)
Definition mapview.c:75
dirty_all
void dirty_all(void)
Definition mapview.c:438
tileset_changed
void tileset_changed(void)
Definition mapview.c:764
put_cross_overlay_tile
void put_cross_overlay_tile(struct tile *ptile)
Definition mapview.c:622
draw_selection_rectangle
void draw_selection_rectangle(int canvas_x, int canvas_y, int w, int h)
Definition mapview.c:728
update_map_canvas_scrollbars_size
void update_map_canvas_scrollbars_size(void)
Definition mapview.c:675
get_overview_area_dimensions
void get_overview_area_dimensions(int *width, int *height)
Definition mapview.c:300
update_unit_info_label
void update_unit_info_label(struct unit_list *punits)
Definition mapview.c:258
update_overview_scroll_window_pos
void update_overview_scroll_window_pos(int x, int y)
Definition mapview.c:636
update_city_descriptions
void update_city_descriptions(void)
Definition mapview.c:470
gui_flush
void gui_flush(void)
Definition mapview.c:462
update_map_canvas_scrollbars
void update_map_canvas_scrollbars(void)
Definition mapview.c:660
overview_size_changed
void overview_size_changed(void)
Definition mapview.c:309
get_overview_window
struct canvas * get_overview_window(void)
Definition mapview.c:320
update_mouse_cursor
void update_mouse_cursor(enum cursor_type new_cursor_type)
Definition mapview.c:240
set_indicator_icons
void set_indicator_icons(struct sprite *bulb, struct sprite *sol, struct sprite *flake, struct sprite *gov)
Definition mapview.c:285
gui_map_canvas_size_refresh
void gui_map_canvas_size_refresh(void)
Definition mapview.c:223
gui_update_timeout_label
void gui_update_timeout_label(void)
Definition mapview.c:92
gui_start_turn
void gui_start_turn(void)
Definition mapview.c:273
mapview.h
gui_stub.h
fc_assert
#define fc_assert(condition)
Definition log.h:176
mapctrl_common.h
update_map_canvas_visible
void update_map_canvas_visible(void)
Definition mapview_common.c:1843
dirty_rect
dirty_rect
Definition mapview_g.h:47
pixel_width
int int int pixel_width
Definition mapview_g.h:48
canvas
Definition canvas.h:21
civclient::conn
struct connection conn
Definition client_main.h:96
connection::playing
struct player * playing
Definition connection.h:156
player_economic::luxury
int luxury
Definition player.h:73
player_economic::science
int science
Definition player.h:72
player_economic::tax
int tax
Definition player.h:71
player_economic::gold
int gold
Definition player.h:70
player::economic
struct player_economic economic
Definition player.h:284
sprite
Definition sprite.h:22
tile
Definition tile.h:49
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:969
support.h
FALSE
#define FALSE
Definition support.h:47
cursor_type
cursor_type
Definition tilespec.h:285