rnd-20001203-4-src
[rocksndiamonds.git] / src / main.c
index 92e8b38a1e20514c004175fbe370ec0de64ede82..40a19333c34cb2f928e5ca636a988e0cfeaa4473 100644 (file)
 #include "events.h"
 #include "joystick.h"
 
+#if 0
 #if defined(PLATFORM_MSDOS)
 #include <fcntl.h>
 #endif
+#endif
 
 #if 0
 DrawWindow     window = None;
@@ -29,12 +31,25 @@ DrawBuffer  backbuffer;
 GC             gc;
 #endif
 
-GC             clip_gc[NUM_BITMAPS], tile_clip_gc;
+#if 0
+GC             clip_gc[NUM_BITMAPS];
+#endif
+GC             tile_clip_gc;
 Bitmap         pix[NUM_BITMAPS];
-Bitmap         pix_masked[NUM_BITMAPS], tile_masked[NUM_TILES];
-Pixmap         clipmask[NUM_BITMAPS], tile_clipmask[NUM_TILES];
+#if 0
+Bitmap         pix_masked[NUM_BITMAPS];
+
+Bitmap         tile_masked[NUM_TILES];
+
+Pixmap         clipmask[NUM_BITMAPS];
+#endif
+Pixmap         tile_clipmask[NUM_TILES];
 
-DrawBuffer     drawto, drawto_field, fieldbuffer;
+#if 0
+DrawBuffer     drawto;
+#endif
+
+DrawBuffer     drawto_field, fieldbuffer;
 #if 0
 Colormap       cmap;
 #endif
@@ -52,13 +67,19 @@ char               *joystick_device_name[MAX_PLAYERS] =
   DEV_JOYSTICK_3
 };
 
+#if 0
 char          *program_name = NULL;
+#endif
 
 int            game_status = MAINMENU;
 boolean                level_editor_test_game = FALSE;
 boolean                network_playing = FALSE;
+
+#if 0
 int            button_status = MB_NOT_PRESSED;
 boolean                motion_status = FALSE;
+#endif
+
 int            key_joystick_mapping = 0;
 int            global_joystick_status = JOYSTICK_STATUS;
 int            joystick_status = JOYSTICK_STATUS;
@@ -70,8 +91,11 @@ boolean              fullscreen_enabled = FALSE;
 
 boolean                redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
 int            redraw_x1 = 0, redraw_y1 = 0;
+
+#if 0
 int            redraw_mask;
 int            redraw_tiles;
+#endif
 
 short          Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          Ur[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
@@ -112,7 +136,9 @@ int         TimeFrames, TimePlayed, TimeLeft;
 
 boolean                network_player_action_received = FALSE;
 
+#if 0
 struct LevelDirInfo    *leveldir_first = NULL, *leveldir_current = NULL;
+#endif
 struct LevelInfo       level;
 struct PlayerInfo      stored_player[MAX_PLAYERS], *local_player = NULL;
 struct HiScore         highscore[MAX_SCORE_ENTRIES];
@@ -586,6 +612,8 @@ int num_element_info = sizeof(element_info)/sizeof(char *);
 
 
 
+#if 0
+
 /* +-----------------------------------------------------------------------+ */
 /* | SDL TEST STUFF                                                        | */
 /* +-----------------------------------------------------------------------+ */
@@ -960,19 +988,29 @@ void TEST_SDL_JOYSTICK()
 /* | SDL TEST STUFF                                                        | */
 /* +-----------------------------------------------------------------------+ */
 
+#endif
+
 
 
 int main(int argc, char *argv[])
 {
+#if 0
   program_name = (strrchr(argv[0],'/') ? strrchr(argv[0],'/') + 1 : argv[0]);
+#endif
 
+  InitCommandName(argv[0]);
+  InitExitFunction(CloseAllAndExit);
+  InitPlatformDependantStuff();
+
+#if 0
 #if defined(PLATFORM_MSDOS)
   _fmode = O_BINARY;
 #endif
+#endif
 
 #if 1
   GetOptions(argv);
-  OpenAll(argc,argv);
+  OpenAll();
 #endif
 
 #if 0