rnd-19990127-2
[rocksndiamonds.git] / src / tools.c
index b1adf481f5ed1e98b1506edca81ef7be3bb345a9..de8c6d6fee4e06761e8fb29ff33b1b65d78f9cdc 100644 (file)
@@ -126,9 +126,11 @@ void BackToFront()
   if (redraw_mask & REDRAW_FIELD)
   {
     if (game_status != PLAYING || redraw_mask & REDRAW_FROM_BACKBUFFER)
+    {
       XCopyArea(display,backbuffer,window,gc,
                REAL_SX,REAL_SY, FULL_SXSIZE,FULL_SYSIZE,
                REAL_SX,REAL_SY);
+    }
     else
     {
       int fx = FX, fy = FY;
@@ -1450,12 +1452,12 @@ void DrawLevel()
   redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER);
 }
 
-void DrawMiniLevel(int scroll_x, int scroll_y)
+void DrawMiniLevel(int size_x, int size_y, int scroll_x, int scroll_y)
 {
   int x,y;
 
-  for(x=0; x<ED_FIELDX; x++)
-    for(y=0; y<ED_FIELDY; y++)
+  for(x=0; x<size_x; x++)
+    for(y=0; y<size_y; y++)
       DrawMiniElementOrWall(x, y, scroll_x, scroll_y);
 
   redraw_mask |= REDRAW_FIELD;
@@ -1682,8 +1684,6 @@ boolean Request(char *text, unsigned int req_state)
     text += tl + (tc == 32 ? 1 : 0);
   }
 
-
-
 #if 0
   if (req_state & REQ_ASK)
   {
@@ -1727,8 +1727,6 @@ boolean Request(char *text, unsigned int req_state)
 
 #endif
 
-
-
   OpenDoor(DOOR_OPEN_1);
   ClearEventQueue();
 
@@ -1756,7 +1754,10 @@ boolean Request(char *text, unsigned int req_state)
        case ButtonRelease:
        case MotionNotify:
        {
+
+#if 0
          int choice;
+#endif
 
          if (event.type == MotionNotify)
          {
@@ -2087,7 +2088,15 @@ unsigned int MoveDoor(unsigned int door_state)
        redraw_mask |= REDRAW_DOOR_2;
       }
 
+
+
+#if 1
       BackToFront();
+#else
+      XCopyArea(display, drawto, window, gc, DX, DY, DXSIZE, DYSIZE, DX, DY);
+#endif
+
+
 
       if (game_status == MAINMENU)
        DoAnimation();