int sysize = (full_ysize < ysize ? full_ysize : ysize);
int xxsize = MAX_BUF_XSIZE * TILEX - x;
int yysize = MAX_BUF_YSIZE * TILEY - y;
- int xoffset = 2 * TILEX;
- int yoffset = 2 * TILEY;
+ int xoffset = 2 * CAVE_BUFFER_XOFFSET * TILEX;
+ int yoffset = 2 * CAVE_BUFFER_YOFFSET * TILEY;
if (x < xoffset && y < yoffset)
{
extern int SCR_FIELDX, SCR_FIELDY;
-#define MAX_BUF_XSIZE (SCR_FIELDX + 2)
-#define MAX_BUF_YSIZE (SCR_FIELDY + 2)
+#define MAX_BUF_XSIZE (SCR_FIELDX + 2 * CAVE_BUFFER_XOFFSET)
+#define MAX_BUF_YSIZE (SCR_FIELDY + 2 * CAVE_BUFFER_YOFFSET)
/* often used screen positions */