changed function from public to static
[rocksndiamonds.git] / src / game_em / emerald.h
index fe90d7937deefb3a236d8baa81a9e4f900b6940b..1afbfbfc58f62850d9856741dcbd39d937b4c223 100644 (file)
@@ -51,9 +51,14 @@ 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 EM_MAX_CAVE_WIDTH              (MAX_PLAYFIELD_WIDTH  + 2 + 2)
-#define EM_MAX_CAVE_HEIGHT             (MAX_PLAYFIELD_HEIGHT + 2 + 2)
+#define CAVE_WIDTH                     MAX_PLAYFIELD_WIDTH
+#define CAVE_HEIGHT                    MAX_PLAYFIELD_HEIGHT
+
+/* additional padding for Zborder elements and linked cave buffer columns */
+#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)
 
 /*
   -----------------------------------------------------------------------------
@@ -631,6 +636,11 @@ struct LEVEL
   int width;                   /* playfield width */
   int height;                  /* playfield height */
 
+  int left;                    /* playfield left edge */
+  int top;                     /* playfield top edge */
+  int right;                   /* playfield right edge */
+  int bottom;                  /* playfield bottom edge */
+
   int time_seconds;            /* available time (seconds) */
   int time_initial;            /* available time (initial) */
   int time;                    /* time remaining (runtime) */
@@ -701,15 +711,15 @@ struct LEVEL
 
   int exit_x, exit_y;          /* kludge for playing player exit sound */
 
-  short cavebuf[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
-  short nextbuf[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
-  short drawbuf[EM_MAX_CAVE_WIDTH][EM_MAX_CAVE_HEIGHT];
-  short boombuf[EM_MAX_CAVE_WIDTH][EM_MAX_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[EM_MAX_CAVE_WIDTH];
-  short *nextcol[EM_MAX_CAVE_WIDTH];
-  short *drawcol[EM_MAX_CAVE_WIDTH];
-  short *boomcol[EM_MAX_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;