X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fgraphics.c;h=3d9649800fc49f31e9da3dce82c8a02750c561e1;hb=d7bde1388f184dfb73b68c977917462e02f9b61f;hp=548b24db1c7e29680e687fa64fa1b9673665e04d;hpb=48e1901624a8e50765f16a6825ab0ccb7cfe819a;p=rocksndiamonds.git 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)