rnd-20000720-1-src
[rocksndiamonds.git] / src / main.h
index add49d76a76f13b59fcfa5d6cd06bb7b401aee4b..adf82efa6c4c0789728569f4fbf7abcd85b9ab04 100644 (file)
 #define XK_MISCELLANY
 #define XK_LATIN1
 
+/*
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <X11/Xos.h>
 #include <X11/Intrinsic.h>
 #include <X11/keysymdef.h>
+*/
 
 #ifdef   XPM_INCLUDE_FILE
 #define  USE_XPM_LIBRARY
@@ -47,6 +49,8 @@
 typedef unsigned char boolean;
 typedef unsigned char byte;
 
+#include "system.h"
+
 #ifndef FALSE
 #define FALSE          0
 #define TRUE           (!FALSE)
@@ -54,6 +58,7 @@ typedef unsigned char byte;
 
 #define WIN_XSIZE      672
 #define WIN_YSIZE      560
+#define WIN_SDL_DEPTH  16      /* !!! change this !!! */
 #ifndef MSDOS
 #define WIN_XPOS       0
 #define WIN_YPOS       0
@@ -200,7 +205,7 @@ typedef unsigned char byte;
 #define PLAYER_PROTECTED(x,y)  (SHIELD_ON(PLAYERINFO(x, y)) ||         \
                                 PROTECTED_FIELD(x, y))
 
-/* Pixmaps with graphic file */
+/* Bitmaps with graphic file */
 #define PIX_BACK               0
 #define PIX_DOOR               1
 #define PIX_HEROES             2
@@ -211,13 +216,13 @@ typedef unsigned char byte;
 #define        PIX_BIGFONT             7
 #define PIX_SMALLFONT          8
 #define PIX_MEDIUMFONT         9
-/* Pixmaps without graphic file */
+/* Bitmaps without graphic file */
 #define PIX_DB_BACK            10
 #define PIX_DB_DOOR            11
 #define PIX_DB_FIELD           12
 
 #define NUM_PICTURES           10
-#define NUM_PIXMAPS            13
+#define NUM_BITMAPS            13
 
 /* boundaries of arrays etc. */
 #define MAX_PLAYER_NAME_LEN    10
@@ -461,16 +466,17 @@ struct GlobalInfo
 extern Display        *display;
 extern Visual         *visual;
 extern int             screen;
-extern Window                  window;
+extern DrawWindow      window;
 extern GC              gc, clip_gc[], tile_clip_gc;
-extern Pixmap          pix[];
+extern Bitmap          pix[];
+extern Bitmap          pix_masked[], tile_masked[];
 extern Pixmap          clipmask[], tile_clipmask[];
 
 #ifdef USE_XPM_LIBRARY
 extern XpmAttributes   xpm_att[];
 #endif
 
-extern Drawable        drawto, drawto_field, backbuffer, fieldbuffer;
+extern DrawBuffer      drawto, drawto_field, backbuffer, fieldbuffer;
 extern Colormap                cmap;
 
 extern int             sound_pipe[2];
@@ -1662,7 +1668,7 @@ extern char               *element_info[];
 #define TAPES_DIRECTORY                "tapes"
 #define SCORES_DIRECTORY       "scores"
 
-#define PROGRAM_VERSION_STRING "1.4.0"
+#define PROGRAM_VERSION_STRING "1.4.0 SDL"
 #define PROGRAM_TITLE_STRING   "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING  "Holger Schemel"
 #define WINDOW_TITLE_STRING    PROGRAM_TITLE_STRING " " PROGRAM_VERSION_STRING
@@ -1710,7 +1716,7 @@ extern char               *element_info[];
                                 REDRAW_MICROLEVEL)
 #define REDRAWTILES_THRESHOLD  (SCR_FIELDX * SCR_FIELDY / 2)
 
-/* areas in pixmap PIX_DOOR */
+/* areas in bitmap PIX_DOOR */
 /* meaning in PIX_DB_DOOR: (3 PAGEs)
    PAGEX1: 1. buffer for DOOR_1
    PAGEX2: 2. buffer for DOOR_1