return ly;
}
-static int getFieldbufferOffsetX_RND(void)
+int getFieldbufferOffsetX_RND(int dir, int pos)
{
int full_lev_fieldx = lev_fieldx + (BorderElement != EL_EMPTY ? 2 : 0);
- int dx = (ScreenMovDir & (MV_LEFT | MV_RIGHT) ? ScreenGfxPos : 0);
+ int dx = (dir & MV_HORIZONTAL ? pos : 0);
int dx_var = dx * TILESIZE_VAR / TILESIZE;
int fx = FX;
return fx;
}
-static int getFieldbufferOffsetY_RND(void)
+int getFieldbufferOffsetY_RND(int dir, int pos)
{
int full_lev_fieldy = lev_fieldy + (BorderElement != EL_EMPTY ? 2 : 0);
- int dy = (ScreenMovDir & (MV_UP | MV_DOWN) ? ScreenGfxPos : 0);
+ int dy = (dir & MV_VERTICAL ? pos : 0);
int dy_var = dy * TILESIZE_VAR / TILESIZE;
int fy = FY;
static int getLevelFromScreenX_RND(int sx)
{
- int fx = getFieldbufferOffsetX_RND();
+ int fx = getFieldbufferOffsetX_RND(ScreenMovDir, ScreenGfxPos);
int dx = fx - FX;
int px = sx - SX;
int lx = LEVELX((px + dx) / TILESIZE_VAR);
static int getLevelFromScreenY_RND(int sy)
{
- int fy = getFieldbufferOffsetY_RND();
+ int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos);
int dy = fy - FY;
int py = sy - SY;
int ly = LEVELY((py + dy) / TILESIZE_VAR);
dst_x, dst_y);
}
+void BlitScreenToBitmapExt_RND(Bitmap *target_bitmap, int fx, int fy)
+{
+ BlitBitmap(drawto_field, target_bitmap, fx, fy, SXSIZE, SYSIZE, SX, SY);
+}
+
void BlitScreenToBitmap_RND(Bitmap *target_bitmap)
{
- int fx = getFieldbufferOffsetX_RND();
- int fy = getFieldbufferOffsetY_RND();
+ int fx = getFieldbufferOffsetX_RND(ScreenMovDir, ScreenGfxPos);
+ int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos);
- BlitBitmap(drawto_field, target_bitmap, fx, fy, SXSIZE, SYSIZE, SX, SY);
+ BlitScreenToBitmapExt_RND(target_bitmap, fx, fy);
}
void BlitScreenToBitmap(Bitmap *target_bitmap)
#define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
+int getFieldbufferOffsetX_RND(int, int);
+int getFieldbufferOffsetY_RND(int, int);
+
int correctLevelPosX_EM(int);
int correctLevelPosY_EM(int);
void SetDrawtoField(int);
void RedrawPlayfield(void);
+void BlitScreenToBitmapExt_RND(Bitmap *, int, int);
void BlitScreenToBitmap_RND(Bitmap *);
void BlitScreenToBitmap(Bitmap *);
void BackToFront(void);