From: Holger Schemel Date: Wed, 29 Jan 2020 18:50:51 +0000 (+0100) Subject: increased cave buffer offset (and adjusted graphics and amoeba logic) X-Git-Tag: 4.2.0.0~165 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d7bde1388f184dfb73b68c977917462e02f9b61f;p=rocksndiamonds.git increased cave buffer offset (and adjusted graphics and amoeba logic) --- diff --git a/src/game_em/emerald.h b/src/game_em/emerald.h index 26032ff4..9dc949fb 100644 --- a/src/game_em/emerald.h +++ b/src/game_em/emerald.h @@ -56,8 +56,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #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) diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index 548b24db..3d964980 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -5,10 +5,15 @@ #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) diff --git a/src/game_em/logic.c b/src/game_em/logic.c index df027b63..8bd29b3c 100644 --- a/src/game_em/logic.c +++ b/src/game_em/logic.c @@ -6334,8 +6334,8 @@ void logic_3(void) 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);