rnd-20100417-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_TILESIZE           16
31
32 #define ZOOM_FACTOR             2
33
34 #define TILESIZE                (ORIG_TILESIZE * ZOOM_FACTOR)
35 #define TILEX                   TILESIZE
36 #define TILEY                   TILESIZE
37
38 #define ORIG_SCR_MENUX          20
39 #define ORIG_SCR_MENUY          12
40 #define SCR_MENUX               17
41 #define SCR_MENUY               12
42 #if 1
43 extern int                      SCR_FIELDX, SCR_FIELDY;
44 #else
45 #define SCR_FIELDX              17
46 #define SCR_FIELDY              17
47 #endif
48 #define MAX_BUF_XSIZE           (2 + SCR_FIELDX + 2)
49 #define MAX_BUF_YSIZE           (2 + SCR_FIELDY + 2)
50
51 /* often used screen positions */
52 #if 1
53 extern int                      SX, SY;
54 #else
55 #define SX                      8
56 #define SY                      8
57 #endif
58 #define SXSIZE                  (SCR_FIELDX * TILEX)
59 #define SYSIZE                  (SCR_FIELDY * TILEY)
60 #define FXSIZE                  (MAX_BUF_XSIZE * TILEX)
61 #define FYSIZE                  (MAX_BUF_YSIZE * TILEY)
62
63 #if 1
64 extern int                      REAL_SX, REAL_SY;
65 #else
66 #define REAL_SX                 (SX - 2)
67 #define REAL_SY                 (SY - 2)
68 #endif
69 #define FULL_SXSIZE             (2 + SXSIZE + 2)
70 #define FULL_SYSIZE             (2 + SYSIZE + 2)
71
72
73 /* ------------------------------------------------------------------------- */
74 /* data structure definitions                                                */
75 /* ------------------------------------------------------------------------- */
76
77 /* ------------------------------------------------------------------------- */
78 /* exported variables                                                        */
79 /* ------------------------------------------------------------------------- */
80
81 extern struct LevelInfo_SP native_sp_level;
82
83 extern Bitmap *bitmap_db_field_sp;
84
85 extern int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
86 extern int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
87 extern int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
88 extern int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
89
90
91 /* ------------------------------------------------------------------------- */
92 /* exported functions                                                        */
93 /* ------------------------------------------------------------------------- */
94
95 #endif  /* MAIN_SP_H */