- }
- }
-
- FlushDisplay();
-
- for (x = 0; x < MAX_BUF_XSIZE; x++)
- for (y = 0; y < MAX_BUF_YSIZE; y++)
- redraw[x][y] = FALSE;
- redraw_tiles = 0;
-
- scrolling_last = scrolling;
-}
-
-
-void DDScrollBuffer_Blt_Ext(Bitmap *target_bitmap)
-{
- RECT DR, SR;
- long tX, tY, L;
- int sX, sY;
- // RECT ERect;
- // long Restore;
-
- if (NoDisplayFlag)
- return;
-
-#if 1
- DR.left = 0;
- DR.top = 0;
- DR.right = SCR_FIELDX * TILEX;
- DR.bottom = SCR_FIELDY * TILEY;
-#else
- // --- On Error GoTo BltEH
- DirectX.GetWindowRect(mhWnd, DR);
- // --- On Error GoTo 0
-#endif
-
- {
- tX = (DR.right - DR.left) / Stretch;
- tY = (DR.bottom - DR.top) / Stretch;
- }
-
- {
- SR.left = mScrollX + mDestXOff;
- SR.top = mScrollY + mDestYOff;
-
- SR.right = SR.left + tX;
- SR.bottom = SR.top + tY;
-
- // If mWidth < SR.right Then
- // SR.right = mWidth
- // DR.right = DR.left + Stretch * (SR.right - SR.left)
- // End If
- // If mHeight < SR.bottom Then
- // SR.bottom = mHeight
- // DR.bottom = DR.top + Stretch * (SR.bottom - SR.top)
- // End If
- // If (mScrollX + mDestXOff) < 0 Then
- // SR.left = 0
- // DR.left = DR.left - Stretch * (mScrollX + mDestXOff)
- // End If
- // If (mScrollY + mDestYOff) < 0 Then
- // SR.top = 0
- // DR.top = DR.top - Stretch * (mScrollY + mDestYOff)
- // End If
- }
-
-#if 1
- SR.left = (SR.left < 0 ? 0 : SR.left);
- SR.top = (SR.top < 0 ? 0 : SR.top);
-#endif
-
-#if 1
- {
- int full_xsize = (FieldWidth - (menBorder.Checked ? 0 : 1)) * TILEX;
- int full_ysize = (FieldHeight - (menBorder.Checked ? 0 : 1)) * TILEY;
- int sxsize = SCR_FIELDX * TILEX;
- int sysize = SCR_FIELDY * TILEY;
-
- tX = (full_xsize < sxsize ? full_xsize : tX);
- tY = (full_ysize < sysize ? full_ysize : tY);
- sX = SX + (full_xsize < sxsize ? (sxsize - full_xsize) / 2 : 0);
- sY = SY + (full_ysize < sysize ? (sysize - full_ysize) / 2 : 0);
- }
-#endif
-
-#if 1
- if (!menBorder.Checked)
- {
- SR.left += TILEX / 2;
- SR.top += TILEY / 2;
- }
-#endif
-
-#if 1