rnd-20091124-2-src
[rocksndiamonds.git] / src / game_sp / MainForm.c
index 4f7bee91c9cf26c209f0b9e9f882bdb04dfce4ed..a9dc22c5789dbf8cbaa4a74693cfd4feb05e4b54 100644 (file)
@@ -1003,6 +1003,17 @@ static boolean InstanceStillRunning(char *TmpFile)
 
 #endif
 
+void DrawFrameIfNeeded()
+{
+  DrawFrame(0);
+
+  /* !!! CHECK THIS !!! */
+#if 1
+  if (! menBorder.Checked)
+    DrawFrame(1);
+#endif
+}
+
 void DisplayLevel()
 {
   int X, Y;
@@ -1018,13 +1029,18 @@ void DisplayLevel()
   if (! LevelLoaded)
     return;
 
+  ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
+  ClearRectangle(screenBitmap, 0, 0,
+                MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY);
+
 #if 1
   SetDisplayRegion();
 #endif
 
   DrawFrame(0);
 
-#if 0
+  /* !!! CHECK THIS !!! */
+#if 1
   if (! menBorder.Checked)
     DrawFrame(1);
 #endif
@@ -1369,7 +1385,10 @@ void Form_Load()
   PauseMode = 0;
   //  BaseWidth = 16
 
-  menBorder_Click();
+#if 1
+  if (0)
+    menBorder_Click();
+#endif
 
   Loaded = True;
 
@@ -2509,7 +2528,9 @@ void menPlay_Click()
 
   // Trace "MainForm", "subFetchAndInitLevel returned"
 
+#if 0
   Stage.Blt();
+#endif
 
 #if 0
 
@@ -2520,7 +2541,6 @@ void menPlay_Click()
   // Trace "MainForm", "<-- menPlay_Click()"
 
 #endif
-
 }
 
 #if 1
@@ -2990,7 +3010,11 @@ static void picPane_Paint()
 
   Oldflag = NoDisplayFlag;
   NoDisplayFlag = False;
+
+#if 0
   Stage.Blt();
+#endif
+
   NoDisplayFlag = Oldflag;
 }
 
@@ -3082,7 +3106,9 @@ static void ReStretch(float NewStretch)
 
     ScrollTo(ScreenScrollXPos, ScreenScrollYPos);
 
+#if 0
     Stage.Blt();
+#endif
 
     picPane_Paint();
   }
@@ -3197,8 +3223,9 @@ void DrawFieldNoAnimated(int X, int Y)
       }
 
 #if 0
-      printf("::: MainForm.c: DrawFieldNoAnimated(): %d, %d [%d]\n",
-            X, Y, Tmp);
+      if (TEST_flag)
+       printf("::: MainForm.c: DrawFieldNoAnimated(): %d, %d [%d]\n",
+              X, Y, Tmp);
 #endif
 
       StretchedSprites.BltEx(StretchWidth * X, StretchWidth * Y, Tmp);