rnd-20100216-1-src
[rocksndiamonds.git] / src / game_sp / main_sp.h
1 #ifndef MAIN_SP_H
2 #define MAIN_SP_H
3
4 /* ========================================================================= */
5 /* external functions and definitions imported from main program to game_sp  */
6 /* ========================================================================= */
7
8 #include "../engines.h"
9 #include "../conf_gfx.h"
10
11
12 /* ========================================================================= */
13 /* functions and definitions that are exported from game_sp to main program  */
14 /* ========================================================================= */
15
16 #include "export.h"
17
18
19 /* ========================================================================= */
20 /* internal functions and definitions that are not exported to main program  */
21 /* ========================================================================= */
22
23
24 /* ------------------------------------------------------------------------- */
25 /* constant definitions                                                      */
26 /* ------------------------------------------------------------------------- */
27
28 /* screen sizes and positions for SP engine */
29
30 #define ORIG_TILEX              16
31 #define ORIG_TILEY              16
32
33 #define ZOOM_FACTOR             2
34
35 #define TILEX                   (ORIG_TILEX             * ZOOM_FACTOR)
36 #define TILEY                   (ORIG_TILEY             * ZOOM_FACTOR)
37
38 #define ORIG_SCR_MENUX          20
39 #define ORIG_SCR_MENUY          12
40 #define SCR_MENUX               17
41 #define SCR_MENUY               12
42 #define SCR_FIELDX              17
43 #define SCR_FIELDY              17
44 #define MAX_BUF_XSIZE           (2 + SCR_FIELDX + 2)
45 #define MAX_BUF_YSIZE           (2 + SCR_FIELDY + 2)
46
47 /* often used screen positions */
48 #define SX                      8
49 #define SY                      8
50 #define SXSIZE                  (SCR_FIELDX * TILEX)
51 #define SYSIZE                  (SCR_FIELDY * TILEY)
52
53 #define REAL_SX                 (SX - 2)
54 #define REAL_SY                 (SY - 2)
55 #define FULL_SXSIZE             (2 + SXSIZE + 2)
56 #define FULL_SYSIZE             (2 + SYSIZE + 2)
57
58
59 /* ------------------------------------------------------------------------- */
60 /* data structure definitions                                                */
61 /* ------------------------------------------------------------------------- */
62
63 /* ------------------------------------------------------------------------- */
64 /* exported variables                                                        */
65 /* ------------------------------------------------------------------------- */
66
67 extern struct LevelInfo_SP native_sp_level;
68
69 extern Bitmap *screenBitmap;
70
71 extern Bitmap *sp_objects;
72
73 extern int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
74 extern int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
75 extern int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
76 extern int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
77
78
79 /* ------------------------------------------------------------------------- */
80 /* exported functions                                                        */
81 /* ------------------------------------------------------------------------- */
82
83 #endif  /* MAIN_SP_H */