rnd-20030901-B-src
[rocksndiamonds.git] / src / tools.c
index 97853144b22e327fa06080fe9c3097fc6758e7f8..b986e81eae00fc64d28496ba2aacc9e3c7d57b10 100644 (file)
@@ -504,6 +504,9 @@ inline void DrawLevelGraphicAnimationIfNeeded(int x, int y, int graphic)
     return;
 
   DrawGraphicAnimation(sx, sy, graphic);
+
+  if (CAN_BE_CRUMBLED(Feld[x][y]))
+    DrawLevelFieldCrumbledSand(x, y);
 }
 
 void DrawLevelElementAnimationIfNeeded(int x, int y, int element)
@@ -520,6 +523,9 @@ void DrawLevelElementAnimationIfNeeded(int x, int y, int element)
     return;
 
   DrawGraphicAnimation(sx, sy, graphic);
+
+  if (CAN_BE_CRUMBLED(element))
+    DrawLevelFieldCrumbledSand(x, y);
 }
 
 void DrawAllPlayers()
@@ -593,6 +599,10 @@ void DrawPlayer(struct PlayerInfo *player)
            player->is_moving ? ACTION_MOVING :
            player->snapped ? ACTION_SNAPPING : ACTION_DEFAULT);
 
+#if 0
+  printf("::: '%s'\n", element_action_info[action].suffix);
+#endif
+
   InitPlayerGfxAnimation(player, action, move_dir);
 
   /* ----------------------------------------------------------------------- */
@@ -1628,8 +1638,7 @@ static void DrawMicroLevelLabelExt(int mode)
 
   if (strlen(label_text) > 0)
   {
-    int text_width = strlen(label_text) * getFontWidth(font_nr);
-    int lxpos = SX + (SXSIZE - text_width) / 2;
+    int lxpos = SX + (SXSIZE - getTextWidth(label_text, font_nr)) / 2;
     int lypos = MICROLABEL_YPOS;
 
     DrawText(lxpos, lypos, label_text, font_nr);
@@ -1665,8 +1674,8 @@ void DrawMicroLevel(int xpos, int ypos, boolean restart)
 
     if (leveldir_current->name)
     {
-      int len = strlen(leveldir_current->name);
-      int lxpos = SX + (SXSIZE - len * getFontWidth(FONT_TEXT_1)) / 2;
+      int text_width = getTextWidth(leveldir_current->name, FONT_TEXT_1);
+      int lxpos = SX + (SXSIZE - text_width) / 2;
       int lypos = SY + 352;
 
       DrawText(lxpos, lypos, leveldir_current->name, FONT_TEXT_1);
@@ -1767,6 +1776,10 @@ boolean Request(char *text, unsigned int req_state)
   unsigned int old_door_state;
   int last_game_status = game_status;  /* save current game status */
 
+#if 1
+  SetMouseCursor(CURSOR_DEFAULT);
+#endif
+
 #if defined(PLATFORM_UNIX)
   /* pause network game while waiting for request to answer */
   if (options.network &&
@@ -1877,6 +1890,10 @@ boolean Request(char *text, unsigned int req_state)
 
   SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
 
+#if 0
+  SetMouseCursor(CURSOR_DEFAULT);
+#endif
+
   while(result < 0)
   {
     if (PendingEvent())