rnd-20001201-1-src
[rocksndiamonds.git] / src / main.h
index d38f529c1f764b28ba987bdd4687308aa82f9c1b..c53408b2bebfa103bed1c7581fa3d6f4c00f2b89 100644 (file)
 #define DEBUG_TIMING   0
 #endif
 
-typedef unsigned char boolean;
-typedef unsigned char byte;
-
-#include "system.h"
+#if 0
+#include "libgame/libgame.h"
+#endif
 
 #ifndef FALSE
 #define FALSE          0
@@ -41,13 +40,15 @@ typedef unsigned char byte;
 #define WIN_XSIZE      672
 #define WIN_YSIZE      560
 #define WIN_SDL_DEPTH  16      /* !!! change this !!! */
-#ifndef MSDOS
+
+#if !defined(PLATFORM_MSDOS)
 #define WIN_XPOS       0
 #define WIN_YPOS       0
-#else  /* MSDOS */
+#else
 #define WIN_XPOS       ((XRES - WIN_XSIZE) / 2)
 #define WIN_YPOS       ((YRES - WIN_YSIZE) / 2)
-#endif /* MSDOS */
+#endif
+
 #define SCR_FIELDX     17
 #define SCR_FIELDY     17
 #define MAX_BUF_XSIZE  (SCR_FIELDX + 2)
@@ -236,20 +237,6 @@ struct HiScore
   int Score;
 };
 
-struct OptionInfo
-{
-  char *display_name;
-  char *server_host;
-  int server_port;
-  char *ro_base_directory;
-  char *rw_base_directory;
-  char *level_directory;
-  boolean serveronly;
-  boolean network;
-  boolean verbose;
-  boolean debug;
-};
-
 struct SetupJoystickInfo
 {
   char *device_name;
@@ -449,21 +436,25 @@ struct GlobalInfo
   int fps_slowdown_factor;
 };
 
-extern Display        *display;
-extern Visual         *visual;
-extern int             screen;
+#if 0
 extern DrawWindow      window;
-extern GC              gc, clip_gc[], tile_clip_gc;
+extern GC              gc;
+#endif
+
+extern GC              clip_gc[], tile_clip_gc;
 extern Bitmap          pix[];
 extern Bitmap          pix_masked[], tile_masked[];
 extern Pixmap          clipmask[], tile_clipmask[];
 
 extern DrawBuffer      drawto, drawto_field, backbuffer, fieldbuffer;
+#if 0
 extern Colormap                cmap;
+#endif
 
-extern int             sound_pipe[2];
-extern int             sound_device;
+#if 0
 extern char           *sound_device_name;
+#endif
+
 extern int             joystick_device;
 extern char           *joystick_device_name[];
 
@@ -476,10 +467,11 @@ extern int                button_status;
 extern boolean         motion_status;
 extern int             key_joystick_mapping;
 extern int             global_joystick_status, joystick_status;
-extern int             sound_status;
-extern boolean         sound_loops_allowed;
+
+#if 0
 extern boolean         fullscreen_available;
 extern boolean         fullscreen_enabled;
+#endif
 
 extern boolean         redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
 extern int             redraw_x1, redraw_y1;
@@ -515,7 +507,12 @@ extern int         SBX_Left, SBX_Right;
 extern int             SBY_Upper, SBY_Lower;
 extern int             ZX,ZY, ExitX,ExitY;
 extern int             AllPlayersGone;
-extern int             FrameCounter, TimeFrames, TimePlayed, TimeLeft;
+
+#if 0
+extern int             FrameCounter;
+#endif
+
+extern int             TimeFrames, TimePlayed, TimeLeft;
 extern boolean         SiebAktiv;
 extern int             SiebCount;
 
@@ -526,11 +523,21 @@ extern struct LevelInfo           level;
 extern struct PlayerInfo       stored_player[], *local_player;
 extern struct HiScore          highscore[];
 extern struct TapeInfo         tape;
-extern struct SoundInfo                Sound[];
+extern struct SampleInfo       Sound[];
 extern struct JoystickInfo     joystick[];
+
+#if 0
 extern struct OptionInfo       options;
+#endif
+
 extern struct SetupInfo                setup;
 extern struct GameInfo         game;
+
+#if 0
+extern struct VideoSystemInfo  video;
+extern struct AudioSystemInfo  audio;
+#endif
+
 extern struct GlobalInfo       global;
 
 extern char            *sound_name[];
@@ -1592,14 +1599,14 @@ extern int              num_element_info;
 #define NUM_SOUNDS             62
 
 /* default input keys */
-#define DEFAULT_KEY_LEFT       KEY_Left
-#define DEFAULT_KEY_RIGHT      KEY_Right
-#define DEFAULT_KEY_UP         KEY_Up
-#define DEFAULT_KEY_DOWN       KEY_Down
-#define DEFAULT_KEY_SNAP       KEY_Shift_L
-#define DEFAULT_KEY_BOMB       KEY_Shift_R
-#define DEFAULT_KEY_OKAY       KEY_Return
-#define DEFAULT_KEY_CANCEL     KEY_Escape
+#define DEFAULT_KEY_LEFT       KSYM_Left
+#define DEFAULT_KEY_RIGHT      KSYM_Right
+#define DEFAULT_KEY_UP         KSYM_Up
+#define DEFAULT_KEY_DOWN       KSYM_Down
+#define DEFAULT_KEY_SNAP       KSYM_Shift_L
+#define DEFAULT_KEY_BOMB       KSYM_Shift_R
+#define DEFAULT_KEY_OKAY       KSYM_Return
+#define DEFAULT_KEY_CANCEL     KSYM_Escape
 
 /* directions for moving */
 #define MV_NO_MOVING           0