added support for ".draw_masked" when using title screen with background
[rocksndiamonds.git] / src / screens.c
index eefdca2da64e2e45b4c32649eefcec23680d5f60..52db91592ee33a6f3035ff0fe81beebcda516994 100644 (file)
@@ -1598,6 +1598,7 @@ static void DrawTitleScreenImage(int nr, boolean initial)
 {
   int graphic = getTitleScreenGraphic(nr, initial);
   Bitmap *bitmap = graphic_info[graphic].bitmap;
+  int draw_masked = graphic_info[graphic].draw_masked;
   int width  = graphic_info[graphic].width;
   int height = graphic_info[graphic].height;
   int src_x = graphic_info[graphic].src_x;
@@ -1630,7 +1631,7 @@ static void DrawTitleScreenImage(int nr, boolean initial)
 
   ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
 
-  if (DrawingOnBackground(dst_x, dst_y))
+  if (DrawingOnBackground(dst_x, dst_y) && draw_masked)
     BlitBitmapMasked(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
   else
     BlitBitmap(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
@@ -5491,16 +5492,16 @@ static void DrawScoreInfo_Content(int entry_nr)
   struct ScoreEntry *entry = &scores.entry[entry_nr];
   char *pos_text = getHallOfFameRankText(entry_nr, 0);
   char *tape_date = getHallOfFameTapeDateText(entry);
-  int font_head  = MENU_INFO_FONT_HEAD;
-  int font_text  = MENU_INFO_FONT_TEXT;
-  int font_foot  = MENU_INFO_FONT_FOOT;
-  int spacing_para  = menu.paragraph_spacing[GAME_MODE_SCOREINFO];
-  int spacing_line  = menu.line_spacing[GAME_MODE_SCOREINFO];
-  int spacing_left  = menu.left_spacing[GAME_MODE_SCOREINFO];
-  int spacing_top   = menu.top_spacing[GAME_MODE_SCOREINFO];
+  int font_head = MENU_INFO_FONT_HEAD;
+  int font_text = MENU_INFO_FONT_TEXT;
+  int font_foot = MENU_INFO_FONT_FOOT;
+  int spacing_para = menu.paragraph_spacing[GAME_MODE_SCOREINFO];
+  int spacing_line = menu.line_spacing[GAME_MODE_SCOREINFO];
+  int spacing_left = menu.left_spacing[GAME_MODE_SCOREINFO];
+  int spacing_top  = menu.top_spacing[GAME_MODE_SCOREINFO];
   int xstep = getFontWidth(font_text);
-  int ystep_para  = getMenuTextStep(spacing_para,  font_text);
-  int ystep_line  = getMenuTextStep(spacing_line,  font_text);
+  int ystep_para = getMenuTextStep(spacing_para,  font_text);
+  int ystep_line = getMenuTextStep(spacing_line,  font_text);
   int xstart  = mSX - SX + spacing_left;
   int ystart  = mSY - SY + spacing_top + getHeadlineSpacing();
   int ybottom = mSY - SY + SYSIZE - menu.bottom_spacing[GAME_MODE_SCOREINFO];
@@ -5513,7 +5514,7 @@ static void DrawScoreInfo_Content(int entry_nr)
   boolean play_visible = !strEqual(tape_date, UNKNOWN_NAME);
   int font_width = getFontWidth(font_text);
   int font_height = getFontHeight(font_text);
-  int tape_date_width  = getTextWidth(tape_date, font_text);
+  int tape_date_width = getTextWidth(tape_date, font_text);
   int pad_left = xstart2;
   int pad_right = menu.right_spacing[GAME_MODE_SCOREINFO];
   int max_chars_per_line = (SXSIZE - pad_left - pad_right) / font_width;