1 /* ---------------------------------------------------------------------- *
2 * pixmap.h
3 * This file is part of lincity.
4 * Lincity is copyright (c) I J Peters 1995-1997, (c) Greg Sharp 1997-2001.
5 * ---------------------------------------------------------------------- */
6 #ifndef __pixmap_h__
7 #define __pixmap_h__
8
9 /* ---------------------------------------------------------------------- *
10 * Public Global Variables
11 * ---------------------------------------------------------------------- */
12 extern char* pixmap;
13 extern int pixmap_height;
14 extern int pixmap_width;
15
16 /* ---------------------------------------------------------------------- *
17 * Public Fn Prototypes
18 * ---------------------------------------------------------------------- */
19 void initialize_pixmap (void);
20 void resize_pixmap (int new_width, int new_height);
21 int pixmap_getpixel (int x, int y);
22 int pixmap_index (int x, int y);
23 int pixmap_getpixel (int x, int y);
24 void pixmap_setpixel (int x, int y, int col);
25 void pixmap_hline (int x1, int y1, int x2, int col);
26 void pixmap_vline (int x1, int y1, int y2, int col);
27 void pixmap_fillbox (int x, int y, int w, int h, int col);
28 void pixmap_putbox (char* src, int src_x, int src_y, int src_w,
29 int dst_x, int dst_y, int w, int h);
30 void free_pixmap (void);
31
32 /* ---------------------------------------------------------------------- *
33 * Public Inline Functions
34 * ---------------------------------------------------------------------- */
35 #if defined (WIN32)
36 inline int
pixmap_index(int x,int y)37 pixmap_index (int x, int y) {
38 return y*pixmap_width + x;
39 }
40 #endif
41
42 #endif /* __pixmap_h__ */
43