X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Femerald.h;h=26032ff428c3486bdc6681c0a4618171e887a2ac;hb=dd11b3af00799f1dcd34481281bb219216ac9a4b;hp=1cf3deffc07d50d5ab76af5f8b7f31234ed88c89;hpb=52ae89df67ad56dbb6302fd9e85ad45279554a4c;p=rocksndiamonds.git diff --git a/src/game_em/emerald.h b/src/game_em/emerald.h index 1cf3deff..26032ff4 100644 --- a/src/game_em/emerald.h +++ b/src/game_em/emerald.h @@ -51,9 +51,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* define these to use additional elements */ #define EM_ENGINE_USE_ADDITIONAL_ELEMENTS -/* one border for Zborder elements, one border for steelwall, if needed */ -#define CAVE_WIDTH (MAX_PLAYFIELD_WIDTH + 2 + 2) -#define CAVE_HEIGHT (MAX_PLAYFIELD_HEIGHT + 2 + 2) +/* with border for steelwall, if needed (when converted from R'n'D level) */ +#define CAVE_WIDTH (MAX_PLAYFIELD_WIDTH + 2) +#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_WIDTH (CAVE_WIDTH + 2 * CAVE_BUFFER_XOFFSET) +#define CAVE_BUFFER_HEIGHT (CAVE_HEIGHT + 2 * CAVE_BUFFER_YOFFSET) /* ----------------------------------------------------------------------------- @@ -701,15 +707,15 @@ struct LEVEL int exit_x, exit_y; /* kludge for playing player exit sound */ - short cavebuf[CAVE_WIDTH][CAVE_HEIGHT]; - short nextbuf[CAVE_WIDTH][CAVE_HEIGHT]; - short drawbuf[CAVE_WIDTH][CAVE_HEIGHT]; - short boombuf[CAVE_WIDTH][CAVE_HEIGHT]; + short cavebuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; + short nextbuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; + short drawbuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; + short boombuf[CAVE_BUFFER_WIDTH][CAVE_BUFFER_HEIGHT]; - short *cavecol[CAVE_WIDTH]; - short *nextcol[CAVE_WIDTH]; - short *drawcol[CAVE_WIDTH]; - short *boomcol[CAVE_WIDTH]; + short *cavecol[CAVE_BUFFER_WIDTH]; + short *nextcol[CAVE_BUFFER_WIDTH]; + short *drawcol[CAVE_BUFFER_WIDTH]; + short *boomcol[CAVE_BUFFER_WIDTH]; short **cave; short **next;