home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / apilot.lha / APilot / APilot_Ser / map.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-03  |  1.6 KB  |  54 lines

  1. /***************************************************************************
  2.  *
  3.  * map.h -- Map specific definitions.
  4.  *
  5.  *-------------------------------------------------------------------------
  6.  * Authors: Casper Gripenberg  (casper@alpha.hut.fi)
  7.  *          Kjetil Jacobsen  (kjetilja@stud.cs.uit.no)    
  8.  *
  9.  */
  10.  
  11. #ifndef __MAP_H__
  12. #define __MAP_H__
  13.  
  14. #define MAPFILE "APilot.mapfile"      /* Name of the mapfile         */
  15.  
  16. #define MAXLINE         400           /* Maximum length of a mapline */
  17.  
  18. #define MAP_BLOCKSIZE   32            /* Number of pixels on-screen  */
  19.                                       /* occupied by one block       */
  20.  
  21. /* These define the different blocktypes */
  22. typedef enum { 
  23.   BLOCK_EMPTY,
  24.   BLOCK_FILLED_ND,  /* Filled but No Draw (Don't draw it) */
  25.   BLOCK_FILLED,     /*   x   */
  26.   BLOCK_RU,         /*   a   */       
  27.   BLOCK_LU,         /*   s   */
  28.   BLOCK_RD,         /*   q   */
  29.   BLOCK_LD,         /*   w   */
  30.   BLOCK_CU,         /*   r   */
  31.   BLOCK_CD,         /*   c   */
  32.   BLOCK_CL,         /*   d   */
  33.   BLOCK_CR,         /*   f   */
  34.   BLOCK_FUEL,       /*   #   */
  35.   BLOCK_BASE,       /*   _   */
  36. } btype;
  37.  
  38. /* And these define which lines to draw in each block */
  39. #define DRAW_UP         1
  40. #define DRAW_DOWN       2
  41. #define DRAW_LEFT       4
  42. #define DRAW_RIGHT      8
  43.  
  44. typedef struct _map_point {
  45.   APTR   objectptr;           /* This points to the object at this location. */
  46.                               /* Used for cannons, fueltanks etc..           */
  47.   UWORD  edge_x;              /* Coordinates of the upper left edge */
  48.   UWORD  edge_y;
  49.   btype  blocktype;
  50.   USHORT draw_flags;          /* Only for BLOCK_FILLED */
  51. } MAP_Point;
  52.  
  53. #endif
  54.