major cleanup of preprocessor hell
[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 extern int                      TILESIZE_VAR;
31
32 #define TILESIZE                32
33 #define TILEX                   TILESIZE
34 #define TILEY                   TILESIZE
35 #define TILEX_VAR               TILESIZE_VAR
36 #define TILEY_VAR               TILESIZE_VAR
37
38 extern int                      SCR_FIELDX, SCR_FIELDY;
39
40 #define MAX_BUF_XSIZE           (2 + SCR_FIELDX + 2)
41 #define MAX_BUF_YSIZE           (2 + SCR_FIELDY + 2)
42
43 /* often used screen positions */
44
45 extern int                      SX, SY;
46
47 #define SXSIZE                  (SCR_FIELDX * TILEX_VAR)
48 #define SYSIZE                  (SCR_FIELDY * TILEY_VAR)
49 #define FXSIZE                  (MAX_BUF_XSIZE * TILEX_VAR)
50 #define FYSIZE                  (MAX_BUF_YSIZE * TILEY_VAR)
51
52 extern int                      REAL_SX, REAL_SY;
53
54 #define FULL_SXSIZE             (2 + SXSIZE + 2)
55 #define FULL_SYSIZE             (2 + SYSIZE + 2)
56
57
58 /* ------------------------------------------------------------------------- */
59 /* data structure definitions                                                */
60 /* ------------------------------------------------------------------------- */
61
62 /* ------------------------------------------------------------------------- */
63 /* exported variables                                                        */
64 /* ------------------------------------------------------------------------- */
65
66 extern struct LevelInfo_SP native_sp_level;
67
68 extern Bitmap *bitmap_db_field_sp;
69
70 extern int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
71 extern int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
72 extern int GfxGraphic[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
73 extern int GfxFrame[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
74
75
76 /* ------------------------------------------------------------------------- */
77 /* exported functions                                                        */
78 /* ------------------------------------------------------------------------- */
79
80 #endif  /* MAIN_SP_H */