{ "viewport.window.width", "672" },
{ "viewport.window.height", "560" },
- { "viewport.playfield.width", "17" },
- { "viewport.playfield.height", "17" },
+ { "viewport.playfield.x", "6" },
+ { "viewport.playfield.y", "6" },
+ { "viewport.playfield.width", "548" },
+ { "viewport.playfield.height", "548" },
+ { "viewport.playfield.border_size", "2" },
+ { "viewport.playfield.MAIN.x", ARG_DEFAULT },
+ { "viewport.playfield.MAIN.y", ARG_DEFAULT },
{ "viewport.playfield.MAIN.width", ARG_DEFAULT },
{ "viewport.playfield.MAIN.height", ARG_DEFAULT },
+ { "viewport.playfield.MAIN.border_size", ARG_DEFAULT },
+ { "viewport.playfield.PLAYING.x", ARG_DEFAULT },
+ { "viewport.playfield.PLAYING.y", ARG_DEFAULT },
{ "viewport.playfield.PLAYING.width", ARG_DEFAULT },
{ "viewport.playfield.PLAYING.height", ARG_DEFAULT },
+ { "viewport.playfield.PLAYING.border_size", ARG_DEFAULT },
+ { "viewport.playfield.EDITOR.x", ARG_DEFAULT },
+ { "viewport.playfield.EDITOR.y", ARG_DEFAULT },
{ "viewport.playfield.EDITOR.width", ARG_DEFAULT },
{ "viewport.playfield.EDITOR.height", ARG_DEFAULT },
+ { "viewport.playfield.EDITOR.border_size", ARG_DEFAULT },
{ "viewport.door_1.x", "566" },
{ "viewport.door_1.y", "60" },
{ "viewport.door_1.MAIN.x", ARG_DEFAULT },
"viewport.window.height",
&viewport.window.height
},
+ {
+ "viewport.playfield.x",
+ &viewport.playfield[GFX_SPECIAL_ARG_DEFAULT].x
+ },
+ {
+ "viewport.playfield.y",
+ &viewport.playfield[GFX_SPECIAL_ARG_DEFAULT].y
+ },
{
"viewport.playfield.width",
&viewport.playfield[GFX_SPECIAL_ARG_DEFAULT].width
"viewport.playfield.height",
&viewport.playfield[GFX_SPECIAL_ARG_DEFAULT].height
},
+ {
+ "viewport.playfield.border_size",
+ &viewport.playfield[GFX_SPECIAL_ARG_DEFAULT].border_size
+ },
+ {
+ "viewport.playfield.MAIN.x",
+ &viewport.playfield[GFX_SPECIAL_ARG_MAIN].x
+ },
+ {
+ "viewport.playfield.MAIN.y",
+ &viewport.playfield[GFX_SPECIAL_ARG_MAIN].y
+ },
{
"viewport.playfield.MAIN.width",
&viewport.playfield[GFX_SPECIAL_ARG_MAIN].width
"viewport.playfield.MAIN.height",
&viewport.playfield[GFX_SPECIAL_ARG_MAIN].height
},
+ {
+ "viewport.playfield.MAIN.border_size",
+ &viewport.playfield[GFX_SPECIAL_ARG_MAIN].border_size
+ },
+ {
+ "viewport.playfield.PLAYING.x",
+ &viewport.playfield[GFX_SPECIAL_ARG_PLAYING].x
+ },
+ {
+ "viewport.playfield.PLAYING.y",
+ &viewport.playfield[GFX_SPECIAL_ARG_PLAYING].y
+ },
{
"viewport.playfield.PLAYING.width",
&viewport.playfield[GFX_SPECIAL_ARG_PLAYING].width
"viewport.playfield.PLAYING.height",
&viewport.playfield[GFX_SPECIAL_ARG_PLAYING].height
},
+ {
+ "viewport.playfield.PLAYING.border_size",
+ &viewport.playfield[GFX_SPECIAL_ARG_PLAYING].border_size
+ },
+ {
+ "viewport.playfield.EDITOR.x",
+ &viewport.playfield[GFX_SPECIAL_ARG_EDITOR].x
+ },
+ {
+ "viewport.playfield.EDITOR.y",
+ &viewport.playfield[GFX_SPECIAL_ARG_EDITOR].y
+ },
{
"viewport.playfield.EDITOR.width",
&viewport.playfield[GFX_SPECIAL_ARG_EDITOR].width
"viewport.playfield.EDITOR.height",
&viewport.playfield[GFX_SPECIAL_ARG_EDITOR].height
},
+ {
+ "viewport.playfield.EDITOR.border_size",
+ &viewport.playfield[GFX_SPECIAL_ARG_EDITOR].border_size
+ },
{
"viewport.door_1.x",
&viewport.door_1[GFX_SPECIAL_ARG_DEFAULT].x
-#define COMPILE_DATE_STRING "2010-04-16 11:49"
+#define COMPILE_DATE_STRING "2010-04-17 10:50"
/* (eg, init "viewport.door_1.MAIN.xyz" from "viewport.door_1.xyz") */
for (i = 0; i < NUM_SPECIAL_GFX_ARGS; i++)
{
- char *token_1 = "viewport.playfield.width";
- char *token_2 = "viewport.playfield.height";
- char *token_3 = "viewport.door_1.x";
- char *token_4 = "viewport.door_1.y";
- char *token_5 = "viewport.door_2.x";
- char *token_6 = "viewport.door_2.y";
+ char *token_1 = "viewport.playfield.x";
+ char *token_2 = "viewport.playfield.y";
+ char *token_3 = "viewport.playfield.width";
+ char *token_4 = "viewport.playfield.height";
+ char *token_5 = "viewport.playfield.border_size";
+ char *token_6 = "viewport.door_1.x";
+ char *token_7 = "viewport.door_1.y";
+ char *token_8 = "viewport.door_2.x";
+ char *token_9 = "viewport.door_2.y";
char *value_1 = getHashEntry(setup_file_hash, token_1);
char *value_2 = getHashEntry(setup_file_hash, token_2);
char *value_3 = getHashEntry(setup_file_hash, token_3);
char *value_4 = getHashEntry(setup_file_hash, token_4);
char *value_5 = getHashEntry(setup_file_hash, token_5);
char *value_6 = getHashEntry(setup_file_hash, token_6);
+ char *value_7 = getHashEntry(setup_file_hash, token_7);
+ char *value_8 = getHashEntry(setup_file_hash, token_8);
+ char *value_9 = getHashEntry(setup_file_hash, token_9);
if (value_1 != NULL)
- viewport.playfield[i].width = get_token_parameter_value(token_1,value_1);
+ viewport.playfield[i].x = get_token_parameter_value(token_1, value_1);
if (value_2 != NULL)
- viewport.playfield[i].height = get_token_parameter_value(token_2,value_2);
+ viewport.playfield[i].y = get_token_parameter_value(token_2, value_2);
if (value_3 != NULL)
- viewport.door_1[i].x = get_token_parameter_value(token_3, value_3);
+ viewport.playfield[i].width = get_token_parameter_value(token_3, value_3);
if (value_4 != NULL)
- viewport.door_1[i].y = get_token_parameter_value(token_4, value_4);
+ viewport.playfield[i].height = get_token_parameter_value(token_4,value_4);
if (value_5 != NULL)
- viewport.door_2[i].x = get_token_parameter_value(token_5, value_5);
+ viewport.playfield[i].border_size = get_token_parameter_value(token_5,
+ value_5);
if (value_6 != NULL)
- viewport.door_2[i].y = get_token_parameter_value(token_6, value_6);
+ viewport.door_1[i].x = get_token_parameter_value(token_6, value_6);
+ if (value_7 != NULL)
+ viewport.door_1[i].y = get_token_parameter_value(token_7, value_7);
+ if (value_8 != NULL)
+ viewport.door_2[i].x = get_token_parameter_value(token_8, value_8);
+ if (value_9 != NULL)
+ viewport.door_2[i].y = get_token_parameter_value(token_9, value_9);
}
/* special case: initialize with default values that may be overwritten */
long mScrollX, mScrollY;
long mScrollX_last, mScrollY_last;
+#if 1
+long 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];
boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+#endif
void RestorePlayfield()
int y2 = mScrollY_last / TILEY + (SCR_FIELDY - 1) + 2;
int x, y;
- BlitBitmap(screenBitmap, screenBitmap,
+ BlitBitmap(bitmap_db_field_sp, bitmap_db_field_sp,
TILEX * (dx == -1),
TILEY * (dy == -1),
(MAX_BUF_XSIZE * TILEX) - TILEX * (dx != 0),
int py = 2 * TILEY + (mScrollY - mScrollY_last) % TILEY;
int sx, sy, sxsize, sysize;
+#if 1
+ printf("::: %d, %d - %d, %d - %ld, %ld\n",
+ MurphyScreenXPos, MurphyScreenYPos,
+ ScreenScrollXPos, ScreenScrollYPos,
+ mScrollX, mScrollY);
+#endif
+
int xsize = SXSIZE;
int ysize = SYSIZE;
int full_xsize = (FieldWidth - (menBorder ? 0 : 1)) * TILEX;
sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0);
sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0);
+#if 1
+ if (0 && !menBorder)
+ {
+ if (mScrollX < ScrollMinX + TILEX / 2)
+ px += ScrollMinX + TILEX / 2 - mScrollX;
+ else if (mScrollX > ScrollMaxX - TILEX / 2)
+ px -= mScrollX - (ScrollMaxX - TILEX / 2);
+ if (mScrollY < ScrollMinY + TILEY / 2)
+ py += ScrollMinY + TILEY / 2 - mScrollY;
+ else if (mScrollY > ScrollMaxY - TILEY / 2)
+ py -= mScrollY - (ScrollMaxY - TILEY / 2);
+ }
+#else
if (!menBorder)
{
px += TILEX / 2;
py += TILEY / 2;
}
+#endif
- BlitBitmap(screenBitmap, target_bitmap, px, py, sxsize, sysize, sx, sy);
+ BlitBitmap(bitmap_db_field_sp, target_bitmap, px, py, sxsize, sysize, sx, sy);
}
void BackToFront_SP(void)
int yy = (top + y) % MAX_BUF_YSIZE;
if (redraw[xx][yy])
- BlitBitmap(screenBitmap, window,
+ BlitBitmap(bitmap_db_field_sp, window,
xx * TILEX, yy * TILEY, TILEX, TILEY,
SX + x * TILEX, SY + y * TILEY);
}
extern long mScrollX, mScrollY;
extern long mScrollX_last, mScrollY_last;
+#if 1
+extern boolean redraw[2 + MAX_PLAYFIELD_WIDTH + 2][2 + MAX_PLAYFIELD_HEIGHT + 2];
+#else
extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+#endif
extern int TEST_flag;
if (pX < sx1 || pX > sx2 || pY < sy1 || pY > sy2)
return;
- BlitBitmap(bitmap, screenBitmap, SpriteX, SpriteY,
+ BlitBitmap(bitmap, bitmap_db_field_sp, SpriteX, SpriteY,
TILEX, TILEY, sx, sy);
}
return;
ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
- ClearRectangle(screenBitmap, 0, 0,
+#if 1
+ ClearRectangle(bitmap_db_field_sp, 0, 0, FXSIZE, FYSIZE);
+#else
+ ClearRectangle(bitmap_db_field_sp, 0, 0,
MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY);
+#endif
#if 1
SetDisplayRegion();
void SetScrollEdges()
{
+#if 1
+ int border_offset = (menBorder ? 1 : 2);
+
+ ScrollMinX = 0;
+ ScrollMinY = 0;
+ ScrollMaxX = (DisplayMaxX + border_offset) * BaseWidth - SXSIZE;
+ ScrollMaxY = (DisplayMaxY + border_offset) * BaseWidth - SYSIZE;
+
+#if 1
+ if (!menBorder)
+ {
+ ScrollMinX += TILEX / 2;
+ ScrollMinY += TILEY / 2;
+ ScrollMaxX -= TILEX / 2;
+ ScrollMaxY -= TILEY / 2;
+ }
+#endif
+
+#else
ScrollMinX = (int)(DisplayMinX - 0.5) * BaseWidth;
ScrollMinY = (int)(DisplayMinY - 0.5) * BaseWidth;
ScrollMaxX = (int)(DisplayMaxX + 1.5) * BaseWidth - SXSIZE;
ScrollMaxY = (int)(DisplayMaxY + 1.5) * BaseWidth - SYSIZE;
+#endif
+
+#if 1
+ printf("::: (%ld, %ld), (%ld, %ld) -> (%d, %d), (%d, %d)\n",
+ DisplayMinX, DisplayMinY, DisplayMaxX, DisplayMaxY,
+ ScrollMinX, ScrollMinY, ScrollMaxX, ScrollMaxY);
+#endif
}
void DrawField(int X, int Y)
// printf("::: ExplosionShake [%d]\n", FrameCounter);
}
- {
- ax = SXSIZE / 2;
- ay = SYSIZE / 2;
- }
+#if 1
+ ax = (SCR_FIELDX / 2) * TILESIZE;
+ ay = (SCR_FIELDY / 2) * TILESIZE;
+
+ ScreenScrollXPos = MurphyScreenXPos - ax;
+ ScreenScrollYPos = MurphyScreenYPos - ay;
+#else
+ ax = SXSIZE / 2;
+ ay = SYSIZE / 2;
ScreenScrollXPos = (MurphyScreenXPos + TILEX / 2) - ax;
ScreenScrollYPos = (MurphyScreenYPos + TILEY / 2) - ay;
+#endif
}
extern void sp_open_all();
extern void sp_close_all();
+extern void InitGfxBuffers_SP();
+
extern void InitGameEngine_SP();
extern void GameActions_SP(byte *, boolean);
#include "global.h"
-Bitmap *screenBitmap;
+Bitmap *bitmap_db_field_sp;
struct EngineSnapshotInfo_SP engine_snapshot_sp;
{
Form_Load();
- screenBitmap = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
- DEFAULT_DEPTH);
+#if 0
+ printf("::: open 1: %d, %d [%08x]\n", FXSIZE, FYSIZE, bitmap_db_field_sp);
+
+ /*
+ bitmap_db_field_sp = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
+ bitmap_db_field_sp = CreateBitmap(MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
+ DEFAULT_DEPTH);
+ */
+
+ ReCreateBitmap(&bitmap_db_field_sp, FXSIZE, FYSIZE, DEFAULT_DEPTH);
+
+ printf("::: open 2: %d, %d [%08x]\n", FXSIZE, FYSIZE, bitmap_db_field_sp);
+#endif
}
void sp_close_all()
{
}
+void InitGfxBuffers_SP()
+{
+#if 1
+ printf("::: init 1: %d, %d [%08x]\n", FXSIZE, FYSIZE, bitmap_db_field_sp);
+
+ /*
+ ReCreateBitmap(&bitmap_db_field_sp, MAX_BUF_XSIZE * TILEX, MAX_BUF_YSIZE * TILEY,
+ DEFAULT_DEPTH);
+ */
+
+ ReCreateBitmap(&bitmap_db_field_sp, FXSIZE, FYSIZE, DEFAULT_DEPTH);
+
+ printf("::: init 2: %d, %d [%08x]\n", FXSIZE, FYSIZE, bitmap_db_field_sp);
+#endif
+}
+
unsigned int InitEngineRandom_SP(long seed)
{
if (seed == NEW_RANDOMIZE)
/* screen sizes and positions for SP engine */
-#define ORIG_TILEX 16
-#define ORIG_TILEY 16
+#define ORIG_TILESIZE 16
#define ZOOM_FACTOR 2
-#define TILEX (ORIG_TILEX * ZOOM_FACTOR)
-#define TILEY (ORIG_TILEY * ZOOM_FACTOR)
+#define TILESIZE (ORIG_TILESIZE * ZOOM_FACTOR)
+#define TILEX TILESIZE
+#define TILEY TILESIZE
#define ORIG_SCR_MENUX 20
#define ORIG_SCR_MENUY 12
#define SCR_MENUX 17
#define SCR_MENUY 12
+#if 1
+extern int SCR_FIELDX, SCR_FIELDY;
+#else
#define SCR_FIELDX 17
#define SCR_FIELDY 17
+#endif
#define MAX_BUF_XSIZE (2 + SCR_FIELDX + 2)
#define MAX_BUF_YSIZE (2 + SCR_FIELDY + 2)
/* often used screen positions */
+#if 1
+extern int SX, SY;
+#else
#define SX 8
#define SY 8
+#endif
#define SXSIZE (SCR_FIELDX * TILEX)
#define SYSIZE (SCR_FIELDY * TILEY)
+#define FXSIZE (MAX_BUF_XSIZE * TILEX)
+#define FYSIZE (MAX_BUF_YSIZE * TILEY)
+#if 1
+extern int REAL_SX, REAL_SY;
+#else
#define REAL_SX (SX - 2)
#define REAL_SY (SY - 2)
+#endif
#define FULL_SXSIZE (2 + SXSIZE + 2)
#define FULL_SYSIZE (2 + SYSIZE + 2)
extern struct LevelInfo_SP native_sp_level;
-extern Bitmap *screenBitmap;
-
-extern Bitmap *sp_objects;
+extern Bitmap *bitmap_db_field_sp;
extern int GfxElementLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
extern int GfxGraphicLast[SP_MAX_PLAYFIELD_WIDTH][SP_MAX_PLAYFIELD_HEIGHT];
InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
InitGfxWindowInfo(WIN_XSIZE, WIN_YSIZE);
InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
+
+ InitGfxBuffers_SP();
}
void InitGfx()
CheckDrawingArea(x, y, 1, 1, gfx.draw_background_mask));
}
+static boolean ValidClippedRectangle(Bitmap *bitmap, int *x, int *y,
+ int *width, int *height)
+{
+ /* skip if rectangle completely outside bitmap */
+
+ if (*x + *width <= 0 ||
+ *y + *height <= 0 ||
+ *x >= bitmap->width ||
+ *y >= bitmap->height)
+ return FALSE;
+
+ /* clip if rectangle overlaps bitmap */
+
+ if (*x < 0)
+ {
+ *x = 0;
+ *width += *x;
+ }
+ else if (*x + *width > bitmap->width)
+ *width = bitmap->width - *x;
+
+ if (*y < 0)
+ {
+ *y = 0;
+ *height += *y;
+ }
+ else if (*y + *height > bitmap->height)
+ *height = bitmap->height - *y;
+
+ return TRUE;
+}
+
void BlitBitmap(Bitmap *src_bitmap, Bitmap *dst_bitmap,
int src_x, int src_y, int width, int height,
int dst_x, int dst_y)
return;
#if 1
+ if (!ValidClippedRectangle(src_bitmap, &src_x, &src_y, &width, &height) ||
+ !ValidClippedRectangle(dst_bitmap, &dst_x, &dst_y, &width, &height))
+ return;
+#else
/* skip if rectangle starts outside bitmap */
if (src_x >= src_bitmap->width ||
src_y >= src_bitmap->height ||
int fade_mode, int fade_delay, int post_delay,
void (*draw_border_function)(void))
{
+#if 1
+ /* (use bitmap "backbuffer" -- "bitmap_cross" may be undefined) */
+ if (!ValidClippedRectangle(backbuffer, &x, &y, &width, &height))
+ return;
+#endif
+
#if defined(TARGET_SDL)
SDLFadeRectangle(bitmap_cross, x, y, width, height,
fade_mode, fade_delay, post_delay, draw_border_function);
return;
#if 1
+ if (!ValidClippedRectangle(bitmap, &x, &y, &width, &height))
+ return;
+#else
/* skip if rectangle starts outside bitmap */
if (x >= bitmap->width ||
y >= bitmap->height)
int width, height;
};
+struct RectWithBorder
+{
+ int x, y;
+ int width, height;
+ int border_size;
+};
+
struct MenuPosInfo
{
int x, y;
int WIN_XSIZE = 672, WIN_YSIZE = 560;
int SCR_FIELDX = 17, SCR_FIELDY = 17;
+int SX = 8, SY = 8;
+int REAL_SX = 6, REAL_SY = 6;
int DX = 566, DY = 60;
int VX = 566, VY = 400;
int EX = 566, EY = 356;
+#if 1
+int FX, FY;
+#else
int FX = SX, FY = SY;
+#endif
int ScrollStepSize;
int ScreenMovDir = MV_NONE, ScreenMovPos = 0;
int ScreenGfxPos = 0;
#define MAX_INITIAL_INVENTORY_SIZE 8
/* often used screen positions */
+#if 0
#define SX 8
#define SY 8
#define REAL_SX (SX - 2)
#define REAL_SY (SY - 2)
-#if 0
#define DX 566
#define DY 60
#define VX DX
struct ViewportInfo
{
- struct Rect window;
- struct Rect playfield[NUM_SPECIAL_GFX_ARGS];
- struct Rect door_1[NUM_SPECIAL_GFX_ARGS];
- struct Rect door_2[NUM_SPECIAL_GFX_ARGS];
+ struct RectWithBorder window;
+ struct RectWithBorder playfield[NUM_SPECIAL_GFX_ARGS];
+ struct RectWithBorder door_1[NUM_SPECIAL_GFX_ARGS];
+ struct RectWithBorder door_2[NUM_SPECIAL_GFX_ARGS];
};
struct HiScore
extern int WIN_XSIZE, WIN_YSIZE;
extern int SCR_FIELDX, SCR_FIELDY;
+extern int SX, SY;
+extern int REAL_SX, REAL_SY;
extern int DX, DY;
extern int VX, VY;
extern int EX, EY;
int gfx_game_mode = (game_status == GAME_MODE_PLAYING ||
game_status == GAME_MODE_EDITOR ? game_status :
GAME_MODE_MAIN);
+ struct RectWithBorder *vp_playfield = &viewport.playfield[gfx_game_mode];
+ struct RectWithBorder *vp_door_1 = &viewport.door_1[gfx_game_mode];
+ struct RectWithBorder *vp_door_2 = &viewport.door_2[gfx_game_mode];
+ int border_size = vp_playfield->border_size;
+ int new_sx = vp_playfield->x + border_size;
+ int new_sy = vp_playfield->y + border_size;
+ int new_scr_fieldx = (vp_playfield->width - 2 * border_size) / TILESIZE;
+ int new_scr_fieldy = (vp_playfield->height - 2 * border_size) / TILESIZE;
if (viewport.window.width != WIN_XSIZE ||
viewport.window.height != WIN_YSIZE)
#endif
}
- if (viewport.playfield[gfx_game_mode].width != SCR_FIELDX ||
- viewport.playfield[gfx_game_mode].height != SCR_FIELDY ||
- viewport.door_1[gfx_game_mode].x != *door_1_x ||
- viewport.door_1[gfx_game_mode].y != *door_1_y ||
- viewport.door_2[gfx_game_mode].x != *door_2_x ||
- viewport.door_2[gfx_game_mode].y != *door_2_y)
- {
- SCR_FIELDX = viewport.playfield[gfx_game_mode].width;
- SCR_FIELDY = viewport.playfield[gfx_game_mode].height;
-
- *door_1_x = viewport.door_1[gfx_game_mode].x;
- *door_1_y = viewport.door_1[gfx_game_mode].y;
- *door_2_x = viewport.door_2[gfx_game_mode].x;
- *door_2_y = viewport.door_2[gfx_game_mode].y;
+ if (new_scr_fieldx != SCR_FIELDX ||
+ new_scr_fieldy != SCR_FIELDY ||
+ new_sx != SX ||
+ new_sy != SY ||
+ vp_playfield->x != REAL_SX ||
+ vp_playfield->y != REAL_SY ||
+ vp_door_1->x != *door_1_x ||
+ vp_door_1->y != *door_1_y ||
+ vp_door_2->x != *door_2_x ||
+ vp_door_2->y != *door_2_y)
+ {
+ SCR_FIELDX = new_scr_fieldx;
+ SCR_FIELDY = new_scr_fieldy;
+ SX = new_sx;
+ SY = new_sy;
+ REAL_SX = vp_playfield->x;
+ REAL_SY = vp_playfield->y;
+
+ *door_1_x = vp_door_1->x;
+ *door_1_y = vp_door_1->y;
+ *door_2_x = vp_door_2->x;
+ *door_2_y = vp_door_2->y;
InitGfxBuffers();