rnd-20100224-1-src
[rocksndiamonds.git] / src / game_sp / MainForm.c
index 1c93dc26e7627ceddfb38fc49cc6d57b975e0154..f44177c7f6bab040dac44d392e4e172ef449a597 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;
@@ -3283,11 +3314,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)