forked from aburch/simutrans
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimgraph0.cc
333 lines (259 loc) · 5.5 KB
/
simgraph0.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
/*
* Copyright (c) 2001 Hansjörg Malthaner
*
* This file is part of the Simugraph engine and may not be used
* in other projects without written permission of the author.
*
* Usage for Iso-Angband is granted.
*/
#include "simconst.h"
#include "simsys.h"
#include "simdebug.h"
#include "besch/bild_besch.h"
#ifdef _MSC_VER
# include <io.h>
# include <direct.h>
# define W_OK 2
#else
# include <sys/stat.h>
# include <fcntl.h>
# include <unistd.h>
#endif
#include "simgraph.h"
typedef uint16 PIXVAL;
int large_font_height = 10;
KOORD_VAL tile_raster_width = 16; // zoomed
KOORD_VAL base_tile_raster_width = 16; // original
KOORD_VAL display_set_base_raster_width(KOORD_VAL)
{
return 0;
}
void set_zoom_factor(int)
{
}
int zoom_factor_up()
{
return false;
}
int zoom_factor_down()
{
return false;
}
static inline void mark_tile_dirty(const int, const int)
{
}
static inline void mark_tiles_dirty(const int, const int, const int)
{
}
static inline int is_tile_dirty(const int, const int)
{
return false;
}
void mark_rect_dirty_wc(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL)
{
}
int display_set_unicode(int)
{
return false;
}
bool display_load_font(const char*)
{
return true;
}
sint16 display_get_width(void)
{
return 0;
}
sint16 display_get_height(void)
{
return 0;
}
sint16 display_set_height(KOORD_VAL)
{
return 0;
}
int display_get_light(void)
{
return 0;
}
void display_set_light(int)
{
}
void display_day_night_shift(int)
{
}
void display_set_player_color_scheme(const int, const COLOR_VAL, const COLOR_VAL)
{
}
void register_image(struct bild_t* bild)
{
bild->bild_nr = 1;
}
void display_get_image_offset(unsigned, KOORD_VAL *, KOORD_VAL *, KOORD_VAL *, KOORD_VAL *)
{
}
void display_get_base_image_offset(unsigned, KOORD_VAL *, KOORD_VAL *, KOORD_VAL *, KOORD_VAL *)
{
}
void display_set_base_image_offset(unsigned, KOORD_VAL, KOORD_VAL)
{
}
int get_maus_x(void)
{
return sys_event.mx;
}
int get_maus_y(void)
{
return sys_event.my;
}
struct clip_dimension display_get_clip_wh(void)
{
struct clip_dimension clip_rect;
return clip_rect;
}
void display_set_clip_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL)
{
}
void display_scroll_band(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL)
{
}
static inline void pixcopy(PIXVAL *, const PIXVAL *, const unsigned int)
{
}
static inline void colorpixcopy(PIXVAL *, const PIXVAL *, const PIXVAL * const)
{
}
void display_img_aux(const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const int, const int)
{
}
void display_color_img(const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const int, const int)
{
}
void display_base_img(const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const int, const int)
{
}
void display_rezoomed_img_blend(const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, const int)
{
}
void display_base_img_blend(const unsigned, KOORD_VAL, KOORD_VAL, const signed char, const PLAYER_COLOR_VAL, const int, const int)
{
}
void display_mark_img_dirty(unsigned, KOORD_VAL, KOORD_VAL)
{
}
void display_fillbox_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, int)
{
}
void display_fillbox_wh_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, int)
{
}
void display_vline_wh(const KOORD_VAL, KOORD_VAL, KOORD_VAL, const PLAYER_COLOR_VAL, int)
{
}
void display_vline_wh_clip(const KOORD_VAL, KOORD_VAL, KOORD_VAL, const PLAYER_COLOR_VAL, int)
{
}
void display_array_wh(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, const COLOR_VAL *)
{
}
size_t get_next_char(const char*, size_t pos)
{
return pos + 1;
}
long get_prev_char(const char*, long pos)
{
if (pos <= 0) {
return 0;
}
return pos - 1;
}
KOORD_VAL display_get_char_width(utf16)
{
return 0;
}
unsigned short get_next_char_with_metrics(const char* &, unsigned char &, unsigned char &)
{
return 0;
}
unsigned short get_prev_char_with_metrics(const char* &, const char *const, unsigned char &, unsigned char &)
{
return 0;
}
int display_calc_proportional_string_len_width(const char*, size_t)
{
return 0;
}
int display_text_proportional_len_clip(KOORD_VAL, KOORD_VAL, const char*, int, const PLAYER_COLOR_VAL, long)
{
return 0;
}
void display_ddd_box(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL)
{
}
void display_ddd_box_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL)
{
}
void display_ddd_proportional(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int)
{
}
void display_ddd_proportional_clip(KOORD_VAL, KOORD_VAL, KOORD_VAL, KOORD_VAL, PLAYER_COLOR_VAL, PLAYER_COLOR_VAL, const char *, int)
{
}
void display_multiline_text(KOORD_VAL, KOORD_VAL, const char *, PLAYER_COLOR_VAL)
{
}
void display_flush_buffer(void)
{
}
void display_move_pointer(KOORD_VAL, KOORD_VAL)
{
}
void display_show_pointer(int)
{
}
void display_set_pointer(int)
{
}
void display_show_load_pointer(int)
{
}
int simgraph_init(KOORD_VAL, KOORD_VAL, int)
{
return TRUE;
}
int is_display_init(void)
{
return false;
}
void display_free_all_images_above( unsigned)
{
}
int simgraph_exit()
{
return dr_os_close();
}
void simgraph_resize(KOORD_VAL, KOORD_VAL)
{
}
void display_snapshot()
{
}
void display_direct_line(const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const KOORD_VAL, const PLAYER_COLOR_VAL)
{
}
void display_set_progress_text(const char *)
{
}
void display_progress(int, int)
{
}
void add_poly_clip(int, int, int, int, int)
{
}
void clear_all_poly_clip()
{
}
void activate_ribi_clip(int)
{
}