rnd-20030215-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 14 Feb 2003 23:08:47 +0000 (00:08 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:40:23 +0000 (10:40 +0200)
src/Makefile
src/conf_e2g.c
src/conf_esg.c
src/conftime.h
src/files.c
src/init.c
src/libgame/misc.c
src/libgame/pcx.c
src/libgame/toons.c
src/netserv.c

index 89e047585eadb073b4b59c7f6f54f5fdf477aaad..c994eaa93e59cc78ccbdb4d23bf1aa8109974825 100644 (file)
@@ -106,7 +106,8 @@ DEBUG = -DDEBUG -g
 # PROFILING = $(PROFILING_FLAGS)
 
 # OPTIONS = $(DEBUG) -Wall                     # only for debugging purposes
-OPTIONS = $(DEBUG) -O3 -Wall                   # only for debugging purposes
+# OPTIONS = $(DEBUG) -O3 -Wall                 # only for debugging purposes
+OPTIONS = $(DEBUG) -Wall                       # only for debugging purposes
 # OPTIONS = $(DEBUG) -Wall -ansi -pedantic     # only for debugging purposes
 # OPTIONS = -O3 -Wall -ansi -pedantic
 # OPTIONS = -O3 -Wall
index 176701b6d23d575667356d2cd337c9ceaea01590..82d0051f551ec18ede3a4cf05f24c371fa510aa9 100644 (file)
@@ -2252,10 +2252,6 @@ element_to_graphic[] =
     EL_ARROW_RED_DOWN,                         -1, -1,
     IMG_ARROW_RED_DOWN
   },
-  {
-    EL_BUG,                                    -1, -1,
-    IMG_BUG_RIGHT
-  },
   {
     EL_DOOR_WHITE,                             -1, -1,
     IMG_CHAR_QUESTION
@@ -2292,10 +2288,6 @@ element_to_graphic[] =
     EL_KEY_WHITE,                              -1, -1,
     IMG_CHAR_QUESTION
   },
-  {
-    EL_PACMAN,                                 -1, -1,
-    IMG_PACMAN_RIGHT
-  },
   {
     EL_SIGN_EXIT,                              -1, -1,
     IMG_CHAR_QUESTION
@@ -2336,10 +2328,6 @@ element_to_graphic[] =
     EL_SIGN_YINYANG,                           -1, -1,
     IMG_CHAR_QUESTION
   },
-  {
-    EL_SPACESHIP,                              -1, -1,
-    IMG_SPACESHIP_RIGHT
-  },
   {
     EL_CHAR_SPACE,                             -1, -1,
     IMG_CHAR_SPACE
index eb9aa0f05bd1ff7fbecc506940ecf590de93559a..83ddda904ad4454547a4642f73748588c46781ce 100644 (file)
@@ -223,6 +223,30 @@ element_to_special_graphic[] =
     EL_INVISIBLE_STEELWALL_VERTICAL,           GFX_SPECIAL_ARG_EDITOR,
     IMG_INVISIBLE_STEELWALL_VERTICAL_EDITOR
   },
+  {
+    EL_BUG,                                    GFX_SPECIAL_ARG_EDITOR,
+    IMG_BUG_RIGHT
+  },
+  {
+    EL_BUG,                                    GFX_SPECIAL_ARG_PREVIEW,
+    IMG_BUG_RIGHT
+  },
+  {
+    EL_PACMAN,                                 GFX_SPECIAL_ARG_EDITOR,
+    IMG_PACMAN_RIGHT
+  },
+  {
+    EL_PACMAN,                                 GFX_SPECIAL_ARG_PREVIEW,
+    IMG_PACMAN_RIGHT
+  },
+  {
+    EL_SPACESHIP,                              GFX_SPECIAL_ARG_EDITOR,
+    IMG_SPACESHIP_RIGHT
+  },
+  {
+    EL_SPACESHIP,                              GFX_SPECIAL_ARG_PREVIEW,
+    IMG_SPACESHIP_RIGHT
+  },
   {
     -1,                                                -1,
     -1
index 6fe78b7fddcc834f6fe1d8b0a152553b7841799a..49fba9917b94e09df34991b4d1ae476ad38b0772 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-02-11 10:29]"
+#define COMPILE_DATE_STRING "[2003-02-15 00:07]"
index 902b3b890889fdb6d30e812d43ce7f60c2987c38..a0e203572a7b13ad69de974a15fbe51f6e0c96f5 100644 (file)
@@ -1493,7 +1493,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->editor.el_diamond_caves = TRUE;
   si->editor.el_dx_boulderdash = TRUE;
   si->editor.el_chars = TRUE;
-  si->editor.el_custom = FALSE;
+  si->editor.el_custom = TRUE;
 
   si->shortcut.save_game = DEFAULT_KEY_SAVE_GAME;
   si->shortcut.load_game = DEFAULT_KEY_LOAD_GAME;
index cf6987dbb83eda0ce3bbdd4325ac0b8818cd13b7..862365fa1259bf46ec62d09a9f8971d969efd2fe 100644 (file)
@@ -977,13 +977,14 @@ static void set_graphic_parameters(int graphic, char **parameter_raw)
 
 static void InitGraphicInfo()
 {
-  static boolean clipmasks_initialized = FALSE;
   int fallback_graphic = IMG_CHAR_EXCLAM;
   struct FileInfo *fallback_image = getImageListEntry(fallback_graphic);
   Bitmap *fallback_bitmap = getBitmapFromImageID(fallback_graphic);
   int num_images = getImageListSize();
   int i;
+
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
+  static boolean clipmasks_initialized = FALSE;
   Pixmap src_pixmap;
   XGCValues clip_gc_values;
   unsigned long clip_gc_valuemask;
@@ -1105,6 +1106,7 @@ static void InitGraphicInfo()
     clip_gc_values.graphics_exposures = False;
     clip_gc_values.clip_mask = graphic_info[i].clip_mask;
     clip_gc_valuemask = GCGraphicsExposures | GCClipMask;
+
     graphic_info[i].clip_gc =
       XCreateGC(display, window->drawable, clip_gc_valuemask, &clip_gc_values);
 #endif
@@ -1113,9 +1115,9 @@ static void InitGraphicInfo()
 #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
   if (copy_clipmask_gc)
     XFreeGC(display, copy_clipmask_gc);
-#endif
 
   clipmasks_initialized = TRUE;
+#endif
 }
 
 static void InitElementSoundInfo()
index f35620c237768cadcb77ac225d9bf8ba7c168bc0..d68316d873777ba91f6c17e8e593d60b81606dc0 100644 (file)
@@ -537,6 +537,11 @@ void GetOptions(char *argv[])
   options.verbose = FALSE;
   options.debug = FALSE;
 
+#if !defined(PLATFORM_UNIX)
+  if (*options_left == NULL)   /* no options given -- enable verbose mode */
+    options.verbose = TRUE;
+#endif
+
   while (*options_left)
   {
     char option_str[MAX_OPTION_LEN];
index 9792331422cbb919763f6d13a45eee7dc90201ed..7756b240f1831041170475fd12a52277043d3ee1 100644 (file)
@@ -122,14 +122,23 @@ static boolean PCX_ReadBitmap(FILE *file, struct PCX_Header *pcx, Image *image)
       if (count == 0)
       {
        if ((value_int = fgetc(file)) == EOF)
+       {
+         free(row_buffer);
          return FALSE;
+       }
+
        value = (byte)value_int;
 
        if ((value & 0xc0) == 0xc0)     /* this is a repeat count byte */
        {
          count = value & 0x3f;         /* extract repeat count from byte */
+
          if ((value_int = fgetc(file)) == EOF)
+         {
+           free(row_buffer);
            return FALSE;
+         }
+
          value = (byte)value_int;
        }
        else
@@ -186,6 +195,8 @@ static boolean PCX_ReadBitmap(FILE *file, struct PCX_Header *pcx, Image *image)
     bitmap_ptr += image->bytes_per_row;
   }
 
+  free(row_buffer);
+
   return TRUE;
 }
 
index c8c71e3a96c6f7ac6323ae12dea69b10c1197a75..94c72152c2890d0461b849675d8fd18672033265 100644 (file)
@@ -317,6 +317,10 @@ void HandleAnimation(int mode)
   if (!setup.toons)
     return;
 
+  /* this may happen after reloading graphics and redefining "num_toons" */
+  if (toon_nr >= screen_info.num_toons)
+    anim_restart = TRUE;
+
   switch(mode)
   {
     case ANIM_START:
@@ -359,7 +363,7 @@ void HandleAnimation(int mode)
     toon_nr = SimpleRND(screen_info.num_toons);
   }
 
-  anim_restart = reset_delay = AnimateToon(toon_nr,anim_restart);
+  anim_restart = reset_delay = AnimateToon(toon_nr, anim_restart);
 }
 
 void InitAnimation()
index 21a48572d08af642fc09fbb42cd94630971fa0b6..58c32a6e06d13391bb8d70d2dc8fcfffea75a48e 100644 (file)
@@ -478,7 +478,7 @@ void NetworkServer(int port, int serveronly)
   if (is_daemon)
   {
     /* become a daemon, breaking all ties with the controlling terminal */
-    options.verbose = 0;
+    options.verbose = FALSE;
     for (i=0; i<255; i++)
     {
       if (i != lfd)