static void ReStretch(float NewStretch);
static void picPane_Paint();
static void picViewPort_Resize();
+static void menBorder_Click();
#else
int X, Y;
#if 1
- printf("::: MainForm.c: DisplayLevel: %d, %d, %d\n",
+ printf("::: MainForm.c: DisplayLevel(): %d, %d, %d\n",
Loaded, LevelLoaded, bPlaying);
#endif
if (bPlaying)
{
#if 1
- printf("::: MainForm.c: DisplayLevel: [%ld, %ld, %ld, %ld]...\n",
- DisplayMinY, DisplayMaxY, DisplayMinX, DisplayMaxX);
+ printf("::: MainForm.c: DisplayLevel(): [%ld, %ld, %ld, %ld] [%d, %d]...\n",
+ DisplayMinX, DisplayMinY, DisplayMaxX, DisplayMaxY,
+ FieldWidth, FieldHeight);
#endif
for (Y = DisplayMinY; Y <= DisplayMaxY; Y++)
EditFlag = False;
EditMode = edMove;
// FMark = New MarkerObject; // (handle this later, if needed)
+
InitGlobals();
#if 0
PauseMode = 0;
// BaseWidth = 16
-#if 0
menBorder_Click();
-#endif
Loaded = True;
-#if 1
-
ReStretch(Stretch);
-#endif
-
#if 0
LoadKeyIndicators();
}
}
+#endif
+
static void menBorder_Click()
{
if (menBorder.Checked)
DisplayMinY = 1;
DisplayMaxY = FieldHeight - 2;
DisplayHeight = FieldHeight;
+
if (Loaded && LevelLoaded)
DrawFrame(1);
DisplayMinY = 0;
DisplayMaxY = FieldHeight - 1;
DisplayHeight = FieldHeight + 2;
+
if (Loaded && LevelLoaded)
RestoreFrame();
}
// DisplayLevel True
}
-#endif
-
void SetDisplayRegion()
{
-#if 1
- if (0)
-#else
if (! menBorder.Checked)
-#endif
{
DisplayMinX = 1;
DisplayMaxX = FieldWidth - 2;
#endif
LastFrame = 0;
+
#if 0
LastTick = T.TickNow();
#endif
#if 0
-
fpsTim.Enabled = True;
-
#endif
// DimPrimary 100
bPlaying = True;
#if 0
-
UpdateDeltaT();
+#endif
+#if 1
+ printf("::: MainForm.c: menPlay_Click(): subFetchAndInitLevelB(): ...\n");
#endif
subFetchAndInitLevelB();
#if 1
- ReStretch(Stretch);
+ printf("::: MainForm.c: menPlay_Click(): subFetchAndInitLevelB(): done\n");
#endif
+ ReStretch(Stretch);
+
// Trace "MainForm", "CountDown 1"
CountDown(2, (0 == DemoFlag));
// Trace "MainForm", "Call GoPlay"
#endif
#if 1
- printf("::: MainForm.c: ReStretch: %d, %d\n", Loaded, LevelLoaded);
+ printf("::: MainForm.c: ReStretch(): %d, %d\n", Loaded, LevelLoaded);
#endif
if (! Loaded)
if (Loaded && LevelLoaded)
{
+#if 1
+ printf("::: MainForm.c: ReStretch(): ...\n");
+#endif
+
SetDisplayRegion();
picViewPort_Resize();
DisplayLevel();
}
subCalculateScreenScrollPos();
+
+#if 1
+ printf("::: MainForm.c: ReStretch(): %d, %d\n", ScreenScrollXPos, ScreenScrollYPos);
+#endif
+
ScrollTo(ScreenScrollXPos, ScreenScrollYPos);
+
Stage.Blt();
+
picPane_Paint();
}
static void SetScrollEdges()
{
#if 1
- printf("::: SetScrollEdges ... [%ld, %ld, %ld, %ld] [%f, %d] [%d, %d, %d, %d]\n",
+ printf("::: MainForm.c: SetScrollEdges() ... [%ld, %ld, %ld, %ld] [%f, %d] [%d, %d, %d, %d]\n",
DisplayMinX, DisplayMinY, DisplayMaxX, DisplayMaxY,
Stretch, BaseWidth,
ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY);
ScrollMinX = (int)(DisplayMinX - 0.5) * Stretch * BaseWidth;
ScrollMinY = (int)(DisplayMinY - 0.5) * Stretch * BaseWidth;
-#if 1
- ScrollMaxX = (int)(DisplayMaxX + 1.5) * Stretch * BaseWidth;
- ScrollMaxY = (int)(DisplayMaxY + 1.5) * Stretch * BaseWidth;
-#else
ScrollMaxX = (int)(DisplayMaxX + 1.5) * Stretch * BaseWidth - picPane.Width;
ScrollMaxY = (int)(DisplayMaxY + 1.5) * Stretch * BaseWidth - picPane.Height;
-#endif
#if 1
- printf("::: SetScrollEdges done [%d, %d, %d, %d]\n",
+ printf("::: MainForm.c: SetScrollEdges() done [%d, %d, %d, %d]\n",
ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY);
#endif
}
Tmp = DisPlayField[tsi];
}
+#if 0
+ printf("::: MainForm.c: DrawFieldNoAnimated(): %d, %d [%d]\n",
+ X, Y, Tmp);
+#endif
+
StretchedSprites.BltEx(StretchWidth * X, StretchWidth * Y, Tmp);
break;
}
#endif
SetScrollEdges();
+
+#if 1
+ printf("::: MainForm.c: picViewPort_Resize(): %d, %d\n", ScrollX, ScrollY);
+#endif
+
ScrollTo(ScrollX, ScrollY);
+
// SizeTim.Interval = 1
}