#define CAVE_HEIGHT (MAX_PLAYFIELD_HEIGHT + 2)
/* with border for Zborder elements (surrounding the visible playfield) */
-#define CAVE_BUFFER_XOFFSET 1
-#define CAVE_BUFFER_YOFFSET 1
+#define CAVE_BUFFER_XOFFSET 4
+#define CAVE_BUFFER_YOFFSET 2
#define CAVE_BUFFER_WIDTH (CAVE_WIDTH + 2 * CAVE_BUFFER_XOFFSET)
#define CAVE_BUFFER_HEIGHT (CAVE_HEIGHT + 2 * CAVE_BUFFER_YOFFSET)
#include "main_em.h"
-#define MIN_SCREEN_XPOS 1
-#define MIN_SCREEN_YPOS 1
-#define MAX_SCREEN_XPOS MAX(1, lev.width - (SCR_FIELDX - 1))
-#define MAX_SCREEN_YPOS MAX(1, lev.height - (SCR_FIELDY - 1))
+#define MIN_SCREEN_XPOS_RAW 0
+#define MIN_SCREEN_YPOS_RAW 0
+#define MAX_SCREEN_XPOS_RAW MAX(0, lev.width - SCR_FIELDX)
+#define MAX_SCREEN_YPOS_RAW MAX(0, lev.height - SCR_FIELDY)
+
+#define MIN_SCREEN_XPOS (MIN_SCREEN_XPOS_RAW + CAVE_BUFFER_XOFFSET)
+#define MIN_SCREEN_YPOS (MIN_SCREEN_YPOS_RAW + CAVE_BUFFER_YOFFSET)
+#define MAX_SCREEN_XPOS (MAX_SCREEN_XPOS_RAW + CAVE_BUFFER_XOFFSET)
+#define MAX_SCREEN_YPOS (MAX_SCREEN_YPOS_RAW + CAVE_BUFFER_YOFFSET)
#define MIN_SCREEN_X (MIN_SCREEN_XPOS * TILEX)
#define MIN_SCREEN_Y (MIN_SCREEN_YPOS * TILEY)
for (count = lev.amoeba_time; count--;)
{
- x = (random >> 10) % (CAVE_BUFFER_WIDTH - 2);
- y = (random >> 20) % (CAVE_BUFFER_HEIGHT - 2);
+ x = CAVE_BUFFER_XOFFSET - 1 + (random >> 10) % CAVE_WIDTH;
+ y = CAVE_BUFFER_YOFFSET - 1 + (random >> 20) % CAVE_HEIGHT;
Lamoeba(x, y);