rnd-20100315-1-src
[rocksndiamonds.git] / src / game_sp / MainForm.c
index 1c93dc26e7627ceddfb38fc49cc6d57b975e0154..731cd0fb00b72411086898528c6a2564af884a3a 100644 (file)
@@ -1652,6 +1652,35 @@ static void Form_Resize()
 
 #endif
 
+#if 1
+
+static void DrawFrame(int Delta)
+{
+  int i, LX, tY, RX, BY;
+
+  LX = -1 + Delta;
+  tY = -1 + Delta;
+  RX = FieldWidth - Delta;
+  BY = FieldHeight - Delta;
+  DrawImage(LX, tY, imgFrameCorner);
+  DrawImage(LX, BY, imgFrameCorner);
+  DrawImage(RX, tY, imgFrameCorner);
+  DrawImage(RX, BY, imgFrameCorner);
+  for (i = LX + 1; i <= RX - 1; i++)
+  {
+    DrawImage(i, tY, imgFrameHorizontal);
+    DrawImage(i, BY, imgFrameHorizontal);
+  }
+
+  for (i = tY + 1; i <= BY - 1; i++)
+  {
+    DrawImage(LX, i, imgFrameVertical);
+    DrawImage(RX, i, imgFrameVertical);
+  }
+}
+
+#else
+
 static void DrawFrame(int Delta)
 {
   int i, LX, tY, RX, BY;
@@ -1677,6 +1706,8 @@ static void DrawFrame(int Delta)
   }
 }
 
+#endif
+
 static void RestoreFrame()
 {
   int i, LX, tY, RX, BY;
@@ -3259,12 +3290,6 @@ void DrawFieldNoAnimated(int X, int Y)
           Tmp = DisPlayField[tsi];
       }
 
-#if 0
-      if (TEST_flag)
-       printf("::: MainForm.c: DrawFieldNoAnimated(): %d, %d [%d]\n",
-              X, Y, Tmp);
-#endif
-
 #if 1
       if (Tmp >= 0 && Tmp <= 40)
       {
@@ -3283,11 +3308,22 @@ void DrawFieldNoAnimated(int X, int Y)
   }
 }
 
+#if 1
+
+void DrawImage(int X, int Y, int graphic)
+{
+  StretchedSprites.BltImg(StretchWidth * X, StretchWidth * Y, graphic, 0);
+}
+
+#else
+
 void DrawSprite(int X, int Y, int SpritePos)
 {
   StretchedSprites.BltEx(StretchWidth * X, StretchWidth * Y, SpritePos);
 }
 
+#endif
+
 #if 0
 
 void InvalidateRect(long XMin, long YMin, long XMax, long YMax)