added GDash source files prepared for game engine integration into R'n'D
[rocksndiamonds.git] / src / game_bd / bd_graphics.h
1 /*
2  * Copyright (c) 2007, 2008, 2009, Czirkos Zoltan <cirix@fw.hu>
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16
17 #ifndef BD_GRAPHICS_H
18 #define BD_GRAPHICS_H
19
20 #include <SDL.h>
21
22 #include "bd_cave.h"
23 #include "bd_gameplay.h"
24
25
26 extern Bitmap *gd_screen_bitmap;
27
28 extern const Uint8 *gd_keystate;
29
30 typedef guint32 GdColor;
31
32 void set_cell_size(int s);
33 void set_play_area(int w, int h);
34
35 int get_play_area_w(void);
36 int get_play_area_h(void);
37
38 void gd_init_keystate(void);
39
40 int gd_drawcave(Bitmap *dest, GdGame *gameplay, boolean);
41 boolean gd_scroll(GdGame *gameplay, boolean exact_scroll, boolean immediate);
42 void gd_scroll_to_origin(void);
43 int get_scroll_x(void);
44 int get_scroll_y(void);
45
46 #endif  // BD_GRAPHICS_H