integrated stripping executable into distribution build target
[rocksndiamonds.git] / src / tools.c
index 0e030f7bb9da94839d8983af84c264c11f42054e..7a15c03e81b4973bbf5d29a533252ade5b43d30d 100644 (file)
@@ -649,7 +649,7 @@ void FadeSetEnterScreen()
 
 void FadeSetNextScreen()
 {
-  fading = menu.next_screen;
+  fading = menu.next_screen[game_status];
 
   // (do not overwrite fade mode set by FadeSetEnterScreen)
   // FadeSetLeaveNext(fading, TRUE);   /* (keep same fade mode) */
@@ -875,7 +875,8 @@ static void RedrawGlobalBorderIfNeeded()
     return;
 
   // copy current draw buffer to later copy back areas that have not changed
-  BlitBitmap(backbuffer, bitmap_db_store, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
+  if (game_status_last != GAME_MODE_TITLE)
+    BlitBitmap(backbuffer, bitmap_db_store, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0);
 
   if (CheckIfGlobalBorderRedrawIsNeeded())
   {
@@ -1064,8 +1065,8 @@ void getSizedGraphicSourceExt(int graphic, int frame, int tilesize,
   }
 
   *bitmap = src_bitmap;
-  *x = src_x * tilesize / TILESIZE;
-  *y = src_y * tilesize / TILESIZE;
+  *x = src_x * tilesize / g->tile_size;
+  *y = src_y * tilesize / g->tile_size;
 }
 
 void getFixedGraphicSourceExt(int graphic, int frame, Bitmap **bitmap,
@@ -1126,6 +1127,9 @@ inline static void getGraphicSourceExt(int graphic, int frame, Bitmap **bitmap,
     *x = src_x + frame * g->offset_x;
     *y = src_y + frame * g->offset_y;
   }
+
+  *x = *x * TILESIZE_VAR / g->tile_size;
+  *y = *y * TILESIZE_VAR / g->tile_size;
 }
 
 void getGraphicSource(int graphic, int frame, Bitmap **bitmap, int *x, int *y)