-#define COMPILE_DATE_STRING "2010-04-17 10:50"
+#define COMPILE_DATE_STRING "2010-04-17 23:20"
case KSYM_0:
GameFrameDelay = (GameFrameDelay == 500 ? GAME_FRAME_DELAY : 500);
break;
+
+ case KSYM_b:
+ setup.sp_show_border_elements = !setup.sp_show_border_elements;
+ printf("Supaplex border elements %s\n",
+ setup.sp_show_border_elements ? "enabled" : "disabled");
+ break;
#endif
default:
if (mScrollX_last == -1 || mScrollY_last == -1)
{
+#if 1
+ mScrollX_last = (mScrollX / TILESIZE) * TILESIZE;
+ mScrollY_last = (mScrollY / TILESIZE) * TILESIZE;
+#else
mScrollX_last = mScrollX;
mScrollY_last = mScrollY;
+#endif
return;
}
int sx, sy, sxsize, sysize;
#if 1
- printf("::: %d, %d - %d, %d - %ld, %ld\n",
+ printf("::: %d, %d / %d, %d / %ld, %ld (%ld, %ld) / %d, %d\n",
MurphyScreenXPos, MurphyScreenYPos,
ScreenScrollXPos, ScreenScrollYPos,
- mScrollX, mScrollY);
+ mScrollX, mScrollY,
+ mScrollX_last, mScrollY_last,
+ px, py);
#endif
int xsize = SXSIZE;
sx = SX + (full_xsize < xsize ? (xsize - full_xsize) / 2 : 0);
sy = SY + (full_ysize < ysize ? (ysize - full_ysize) / 2 : 0);
+#if 1
+#if 1
+ {
+ px += game_sp.scroll_xoffset;
+ py += game_sp.scroll_yoffset;
+ }
+#else
+ if (1)
+ {
+ px += TILEX / 2;
+ py += TILEY / 2;
+ }
+#endif
+#else
#if 1
if (0 && !menBorder)
{
px += TILEX / 2;
py += TILEY / 2;
}
+#endif
#endif
BlitBitmap(bitmap_db_field_sp, target_bitmap, px, py, sxsize, sysize, sx, sy);
ScrollMaxX -= TILEX / 2;
ScrollMaxY -= TILEY / 2;
}
+#if 1
+ {
+ ScrollMinX -= game_sp.scroll_xoffset;
+ ScrollMaxX -= game_sp.scroll_xoffset;
+ ScrollMinY -= game_sp.scroll_yoffset;
+ ScrollMaxY -= game_sp.scroll_yoffset;
+ }
+#else
+ if (1)
+ {
+ ScrollMinX -= TILEX / 2;
+ ScrollMaxX -= TILEX / 2;
+ ScrollMinY -= TILEY / 2;
+ ScrollMaxY -= TILEY / 2;
+ }
+#endif
+#else
+ if (!menBorder)
+ {
+ ScrollMinX += TILEX / 2;
+ ScrollMinY += TILEY / 2;
+ ScrollMaxX -= TILEX / 2;
+ ScrollMaxY -= TILEY / 2;
+ }
#endif
#else
/* needed for engine snapshots */
int preceding_buffer_size;
+
+ int scroll_xoffset, scroll_yoffset;
};
struct DemoInfo_SP
menBorder = setup.sp_show_border_elements;
+ game_sp.scroll_xoffset = (EVEN(SCR_FIELDX) ? TILEX / 2 : 0);
+ game_sp.scroll_yoffset = (EVEN(SCR_FIELDY) ? TILEY / 2 : 0);
+
for (x = 0; x < SP_MAX_PLAYFIELD_WIDTH; x++)
{
for (y = 0; y < SP_MAX_PLAYFIELD_HEIGHT; y++)
#define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
#endif
+#ifndef ODD
+#define ODD(a) (((a) & 1) == 1)
+#endif
+
+#ifndef EVEN
+#define EVEN(a) (((a) & 1) == 0)
+#endif
+
#define SIZEOF_ARRAY(array, type) (sizeof(array) / sizeof(type))
#define SIZEOF_ARRAY_INT(array) SIZEOF_ARRAY(array, int)