rnd-20070420-2-src
authorHolger Schemel <info@artsoft.org>
Fri, 20 Apr 2007 18:09:45 +0000 (20:09 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:55:42 +0000 (10:55 +0200)
* added graphics engine directive "border.draw_masked_when_fading" that
  enables/disables drawing of border mask over screen that is just faded

ChangeLog
src/conftime.h
src/events.c
src/init.c
src/libgame/system.c
src/main.h
src/screens.c

index 247a18aced63a74877cac8196cb936bb5f47ee4e..c746ab0cd4813044abbc607465f9a3776299911e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-19
+       * added graphics engine directive "border.draw_masked_when_fading" that
+         enables/disables drawing of border mask over screen that is just faded
+
 2007-04-18
        * fixed small problem with separate fading definition for game screen
 
 2007-04-18
        * fixed small problem with separate fading definition for game screen
 
index 2bd6083e8c8f96fdcfffcb6049cdcc535d8b4108..6e192a2b779e2722014c12211441b03d009d4507 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-04-20 00:04"
+#define COMPILE_DATE_STRING "2007-04-20 20:09"
index 2dc5a01623be8323f34e618098d016283adf66d0..811d8f9ae87e01fdfc9b03eddfa96f93823a7160 100644 (file)
@@ -811,7 +811,8 @@ void HandleKey(Key key, int key_status)
          break;
 
        case KSYM_Escape:
          break;
 
        case KSYM_Escape:
-         FadeSkipNextFadeIn();
+         if (game_status != GAME_MODE_MAIN)
+           FadeSkipNextFadeIn();
 
          if (game_status == GAME_MODE_TITLE)
            HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);
 
          if (game_status == GAME_MODE_TITLE)
            HandleTitleScreen(0, 0, 0, 0, MB_MENU_LEAVE);
index d1316588d065e0185ddf0efa34e5a83b9b9bcda1..148f927d5bcfc697775bd63352b3677a6e05735e 100644 (file)
@@ -4462,8 +4462,10 @@ static void InitGlobal()
   global.fps_slowdown_factor = 1;
 
   global.border_status = GAME_MODE_MAIN;
   global.fps_slowdown_factor = 1;
 
   global.border_status = GAME_MODE_MAIN;
+#if 0
   global.fading_status = GAME_MODE_MAIN;
   global.fading_type = TYPE_ENTER_MENU;
   global.fading_status = GAME_MODE_MAIN;
   global.fading_type = TYPE_ENTER_MENU;
+#endif
 }
 
 void Execute_Command(char *command)
 }
 
 void Execute_Command(char *command)
index 09c804f06a4a3f6687266356e41b9d4672ffdbf8..c77567a93e8b3b97d939e545336302680248d624 100644 (file)
@@ -839,13 +839,10 @@ Bitmap *ZoomBitmap(Bitmap *src_bitmap, int zoom_width, int zoom_height)
   return dst_bitmap;
 }
 
   return dst_bitmap;
 }
 
-#define MORE_ZOOM      1
-
 static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
                                boolean create_small_bitmaps)
 {
   Bitmap swap_bitmap;
 static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
                                boolean create_small_bitmaps)
 {
   Bitmap swap_bitmap;
-#if MORE_ZOOM
   Bitmap *new_bitmap;
   Bitmap *tmp_bitmap_1;
   Bitmap *tmp_bitmap_2;
   Bitmap *new_bitmap;
   Bitmap *tmp_bitmap_1;
   Bitmap *tmp_bitmap_2;
@@ -859,10 +856,6 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
   int width_8, height_8;
   int width_16, height_16;
   int width_32, height_32;
   int width_8, height_8;
   int width_16, height_16;
   int width_32, height_32;
-#else
-  Bitmap *new_bitmap, *tmp_bitmap_1, *tmp_bitmap_2, *tmp_bitmap_4,*tmp_bitmap_8;
-  int width_1, height_1, width_2, height_2, width_4, height_4, width_8,height_8;
-#endif
   int new_width, new_height;
 
   /* calculate new image dimensions for normal sized image */
   int new_width, new_height;
 
   /* calculate new image dimensions for normal sized image */
@@ -876,12 +869,11 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
     tmp_bitmap_1 = old_bitmap;
 
   /* this is only needed to make compilers happy */
     tmp_bitmap_1 = old_bitmap;
 
   /* this is only needed to make compilers happy */
-#if MORE_ZOOM
-  tmp_bitmap_2 = tmp_bitmap_4 = tmp_bitmap_8 = tmp_bitmap_16 = NULL;
+  tmp_bitmap_2 = NULL;
+  tmp_bitmap_4 = NULL;
+  tmp_bitmap_8 = NULL;
+  tmp_bitmap_16 = NULL;
   tmp_bitmap_32 = NULL;
   tmp_bitmap_32 = NULL;
-#else
-  tmp_bitmap_2 = tmp_bitmap_4 = tmp_bitmap_8 = NULL;
-#endif
 
   if (create_small_bitmaps)
   {
 
   if (create_small_bitmaps)
   {
@@ -892,12 +884,10 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
     height_4 = height_1 / 4;
     width_8  = width_1  / 8;
     height_8 = height_1 / 8;
     height_4 = height_1 / 4;
     width_8  = width_1  / 8;
     height_8 = height_1 / 8;
-#if MORE_ZOOM
     width_16  = width_1  / 16;
     height_16 = height_1 / 16;
     width_32  = width_1  / 32;
     height_32 = height_1 / 32;
     width_16  = width_1  / 16;
     height_16 = height_1 / 16;
     width_32  = width_1  / 32;
     height_32 = height_1 / 32;
-#endif
 
     /* get image with 1/2 of normal size (for use in the level editor) */
     if (zoom_factor != 2)
 
     /* get image with 1/2 of normal size (for use in the level editor) */
     if (zoom_factor != 2)
@@ -917,7 +907,6 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
     else
       tmp_bitmap_8 = old_bitmap;
 
     else
       tmp_bitmap_8 = old_bitmap;
 
-#if MORE_ZOOM
     /* get image with 1/16 of normal size (for use on the preview screen) */
     if (zoom_factor != 16)
       tmp_bitmap_16 = ZoomBitmap(tmp_bitmap_8, width_8 / 2, height_8 / 2);
     /* get image with 1/16 of normal size (for use on the preview screen) */
     if (zoom_factor != 16)
       tmp_bitmap_16 = ZoomBitmap(tmp_bitmap_8, width_8 / 2, height_8 / 2);
@@ -929,9 +918,9 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
       tmp_bitmap_32 = ZoomBitmap(tmp_bitmap_16, width_16 / 2, height_16 / 2);
     else
       tmp_bitmap_32 = old_bitmap;
       tmp_bitmap_32 = ZoomBitmap(tmp_bitmap_16, width_16 / 2, height_16 / 2);
     else
       tmp_bitmap_32 = old_bitmap;
-#endif
   }
 
   }
 
+#if 0
   /* if image was scaled up, create new clipmask for normal size image */
   if (zoom_factor != 1)
   {
   /* if image was scaled up, create new clipmask for normal size image */
   if (zoom_factor != 1)
   {
@@ -956,6 +945,7 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
     SDL_SetColorKey(tmp_surface_1, 0, 0);      /* reset transparent pixel */
 #endif
   }
     SDL_SetColorKey(tmp_surface_1, 0, 0);      /* reset transparent pixel */
 #endif
   }
+#endif
 
   if (create_small_bitmaps)
   {
 
   if (create_small_bitmaps)
   {
@@ -971,12 +961,10 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
               width_1 / 2, height_1);
     BlitBitmap(tmp_bitmap_8, new_bitmap, 0, 0, width_1 / 8, height_1 / 8,
               3 * width_1 / 4, height_1);
               width_1 / 2, height_1);
     BlitBitmap(tmp_bitmap_8, new_bitmap, 0, 0, width_1 / 8, height_1 / 8,
               3 * width_1 / 4, height_1);
-#if MORE_ZOOM
     BlitBitmap(tmp_bitmap_16, new_bitmap, 0, 0, width_1 / 16, height_1 / 16,
               7 * width_1 / 8, height_1);
     BlitBitmap(tmp_bitmap_32, new_bitmap, 0, 0, width_1 / 32, height_1 / 32,
               15 * width_1 / 16, height_1);
     BlitBitmap(tmp_bitmap_16, new_bitmap, 0, 0, width_1 / 16, height_1 / 16,
               7 * width_1 / 8, height_1);
     BlitBitmap(tmp_bitmap_32, new_bitmap, 0, 0, width_1 / 32, height_1 / 32,
               15 * width_1 / 16, height_1);
-#endif
   }
   else
   {
   }
   else
   {
@@ -1001,12 +989,11 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
     if (zoom_factor != 8)
       FreeBitmap(tmp_bitmap_8);
 
     if (zoom_factor != 8)
       FreeBitmap(tmp_bitmap_8);
 
-#if MORE_ZOOM
     if (zoom_factor != 16)
       FreeBitmap(tmp_bitmap_16);
     if (zoom_factor != 16)
       FreeBitmap(tmp_bitmap_16);
+
     if (zoom_factor != 32)
       FreeBitmap(tmp_bitmap_32);
     if (zoom_factor != 32)
       FreeBitmap(tmp_bitmap_32);
-#endif
   }
 
   /* replace image with extended image (containing 1/1, 1/2, 1/4, 1/8 size) */
   }
 
   /* replace image with extended image (containing 1/1, 1/2, 1/4, 1/8 size) */
@@ -1024,7 +1011,7 @@ static void CreateScaledBitmaps(Bitmap *old_bitmap, int zoom_factor,
   old_bitmap->height = new_bitmap->height;
 
 #if 1
   old_bitmap->height = new_bitmap->height;
 
 #if 1
-  /* !!! THIS URGENTLY NEEDS OPTIMIZATION -- DO NOT CREATE MASKS BEFORE !!! */
+  /* this replaces all blit masks created when loading -- maybe optimize this */
   {
 #if defined(TARGET_X11)
     if (old_bitmap->clip_mask)
   {
 #if defined(TARGET_X11)
     if (old_bitmap->clip_mask)
index 61932a5db15c4d2d275fe60f185f36ab0ea76811..76304e2a2dc1c7f5f7832043576120bfe5e28fd1 100644 (file)
 #define PROGRAM_VERSION_MAJOR          3
 #define PROGRAM_VERSION_MINOR          2
 #define PROGRAM_VERSION_PATCH          4
 #define PROGRAM_VERSION_MAJOR          3
 #define PROGRAM_VERSION_MINOR          2
 #define PROGRAM_VERSION_PATCH          4
-#define PROGRAM_VERSION_BUILD          1
+#define PROGRAM_VERSION_BUILD          2
 
 #define PROGRAM_TITLE_STRING           "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING          "Holger Schemel"
 
 #define PROGRAM_TITLE_STRING           "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING          "Holger Schemel"
@@ -2338,8 +2338,10 @@ struct GlobalInfo
 
   /* global values for fading screens and masking borders */
   int border_status;
 
   /* global values for fading screens and masking borders */
   int border_status;
+#if 0
   int fading_status;
   int fading_type;
   int fading_status;
   int fading_type;
+#endif
 };
 
 struct ElementChangeInfo
 };
 
 struct ElementChangeInfo
index 4289203cf9269f05601b370fe7c659cf9d1ff33b..4989985a00d967c5406722e4185957d874848049 100644 (file)
@@ -1529,7 +1529,9 @@ void DrawMainMenuExt(int redraw_mask, boolean do_fading)
   MapTapeButtons();
   MapScreenMenuGadgets(SCREEN_MASK_MAIN);
 
   MapTapeButtons();
   MapScreenMenuGadgets(SCREEN_MASK_MAIN);
 
+#if 0
   DrawMaskedBorder(REDRAW_ALL);
   DrawMaskedBorder(REDRAW_ALL);
+#endif
 
 #if 1
   if (redraw_mask == REDRAW_ALL)
 
 #if 1
   if (redraw_mask == REDRAW_ALL)
@@ -6065,21 +6067,6 @@ void HandleGameActions()
     AutoPlayTape();    /* continue automatically playing next tape */
 }
 
     AutoPlayTape();    /* continue automatically playing next tape */
 }
 
-#if 0
-void ChangeGameStatus(int new_game_status)
-{
-  /* for fading out last screen, use the last game status */
-  global.border_status = game_status;
-  global.fading_status = game_status;
-
-  /* ... */
-
-  /* for fading in next screen, use the new game status */
-  global.border_status = new_game_status;
-  global.fading_status = new_game_status;
-}
-#endif
-
 
 /* ---------- new screen button stuff -------------------------------------- */
 
 
 /* ---------- new screen button stuff -------------------------------------- */