#include <math.h>
-long mScrollX, mScrollY;
-long mScrollX_last, mScrollY_last;
+int mScrollX, mScrollY;
+int mScrollX_last, mScrollY_last;
#if 1
-long ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
+int ScreenBuffer[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
boolean redraw[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
#else
-long ScreenBuffer[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+int ScreenBuffer[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
#endif
int sx = x - x1;
int sy = y - y1;
int tsi = GetSI(x, y);
- long id = ((PlayField16[tsi]) |
- (PlayField8[tsi] << 16) |
- (DisPlayField[tsi] << 24));
+ int id = ((PlayField16[tsi]) |
+ (PlayField8[tsi] << 16) |
+ (DisPlayField[tsi] << 24));
if ((dx == -1 && x == x2) ||
(dx == +1 && x == x1) ||
SyncDisplay();
- if (redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last ||
+ if (0 ||
+ redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last ||
ExplosionShakeMurphy != 0 || ExplosionShakeMurphy_last != 0)
{
BlitScreenToBitmap_SP(window);
int full_xsize = (FieldWidth - (menBorder ? 0 : 1)) * TILEX;
int full_ysize = (FieldHeight - (menBorder ? 0 : 1)) * TILEY;
#endif
+#if 1
+ int xsize = SXSIZE;
+ int ysize = SYSIZE;
+ int sxsize = (full_xsize < xsize ? full_xsize : xsize);
+ int sysize = (full_ysize < ysize ? full_ysize : ysize);
+ int sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0);
+ int sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0);
+#else
int sx = SX + (full_xsize < SXSIZE ? (SXSIZE - full_xsize) / 2 : 0);
int sy = SY + (full_ysize < SYSIZE ? (SYSIZE - full_ysize) / 2 : 0);
+#endif
+#if 1
+ InitGfxClipRegion(TRUE, sx, sy, sxsize, sysize);
+#else
InitGfxClipRegion(TRUE, SX, SY, SXSIZE, SYSIZE);
+#endif
#if NEW_TILESIZE
scroll_xoffset = scroll_xoffset * TILESIZE_VAR / TILESIZE;
ScrollPlayfieldIfNeeded();
}
-void DDScrollBuffer_SoftScrollTo(int X, int Y, long TimeMS, int FPS)
+void DDScrollBuffer_SoftScrollTo(int X, int Y, int TimeMS, int FPS)
{
double dx, dY;
- long dT, StepCount;
+#if 0
+ int dT;
+#endif
+ int StepCount;
double T, tStep;
- long oldX, oldY, maxD;
+ int oldX, oldY, maxD;
static boolean AlreadyRunning = False;
if (NoDisplayFlag)
if (StepCount == 0)
StepCount = 1;
+#if 0
dT = 1000 / FPS;
+#endif
tStep = (double)1 / StepCount;
oldX = mScrollX;
oldY = mScrollY;