fixed bug with playing team mode tapes with changed visible playfield size
[rocksndiamonds.git] / src / game_em / graphics.c
index a29d2e0e7208ab4d45cf1e7cad2a4bb1bd1311a0..398ae6e0e303254f319e69931debc5d4b8b0b291 100644 (file)
@@ -553,11 +553,13 @@ static void setMinimalPlayerBoundaries(int *sx1, int *sy1, int *sx2, int *sy2)
 boolean checkIfAllPlayersFitToScreen(void)
 {
   int sx1 = 0, sy1 = 0, sx2 = 0, sy2 = 0;
+  int scr_fieldx = getScreenFieldSizeX();
+  int scr_fieldy = getScreenFieldSizeY();
 
   setMinimalPlayerBoundaries(&sx1, &sy1, &sx2, &sy2);
 
-  return (sx2 - sx1 <= SCR_FIELDX * TILEX &&
-         sy2 - sy1 <= SCR_FIELDY * TILEY);
+  return (sx2 - sx1 <= scr_fieldx * TILEX &&
+         sy2 - sy1 <= scr_fieldy * TILEY);
 }
 
 static void setScreenCenteredToAllPlayers(int *sx, int *sy)