cleanup of function for zooming bitmap (with masked and opaque surfaces)
[rocksndiamonds.git] / src / screens.c
index 12fa233140c51fff4c586e54ad711c3026f64661..66f863cce57fc97b3f99b4cc63bf69f52f7d5174 100644 (file)
@@ -3656,11 +3656,10 @@ static void DrawChooseTree(TreeInfo **ti_ptr)
   /* needed if different viewport properties defined for choosing level (set) */
   ChangeViewportPropertiesIfNeeded();
 
-  if (game_status == GAME_MODE_LEVELNR)
-    SetMainBackgroundImage(IMG_BACKGROUND_LEVELNR);
-  else if (game_status == GAME_MODE_LEVELS)
-    SetMainBackgroundImage(IMG_BACKGROUND_LEVELS);
-
+  SetMainBackgroundImage(game_status == GAME_MODE_LEVELNR ?
+                        IMG_BACKGROUND_LEVELNR :
+                        game_status == GAME_MODE_LEVELS ?
+                        IMG_BACKGROUND_LEVELS : IMG_BACKGROUND);
   ClearField();
 
   OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
@@ -4186,9 +4185,10 @@ static void drawHallOfFameList(int first_entry, int highlight_position)
     int font_nr2 = (active ? FONT_TEXT_2_ACTIVE : FONT_TEXT_2);
     int font_nr3 = (active ? FONT_TEXT_3_ACTIVE : FONT_TEXT_3);
     int font_nr4 = (active ? FONT_TEXT_4_ACTIVE : FONT_TEXT_4);
+    int dxoff = getFontDrawOffsetX(font_nr1);
     int dx1 = 3 * getFontWidth(font_nr1);
     int dx2 = dx1 + getFontWidth(font_nr1);
-    int dx3 = SXSIZE - 2 * (mSX - SX) - 5 * getFontWidth(font_nr4);
+    int dx3 = SXSIZE - 2 * (mSX - SX + dxoff) - 5 * getFontWidth(font_nr4);
     int num_dots = (dx3 - dx2) / getFontWidth(font_nr3);
     int sy = mSY + 64 + i * 32;