… | |
… | |
47 | #define MAGIC_MAP_SIZE 50 |
47 | #define MAGIC_MAP_SIZE 50 |
48 | #define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
48 | #define MAGIC_MAP_HALF MAGIC_MAP_SIZE/2 |
49 | |
49 | |
50 | #define MAP_LAYERS 3 |
50 | #define MAP_LAYERS 3 |
51 | |
51 | |
52 | /* options passed to ready_map_name and load_original_map */ |
|
|
53 | #define MAP_FLUSH 0x01 |
|
|
54 | #define MAP_PLAYER_UNIQUE 0x02 |
|
|
55 | #define MAP_BLOCK 0x04 |
|
|
56 | #define MAP_STYLE 0x08 |
|
|
57 | #define MAP_OVERLAY 0x10 |
|
|
58 | |
|
|
59 | /* Values for in_memory below. Should probably be an enumerations */ |
52 | /* Values for in_memory below. Should probably be an enumerations */ |
60 | enum { |
53 | enum { |
61 | MAP_IN_MEMORY, |
54 | MAP_IN_MEMORY, |
62 | MAP_SWAPPED, |
55 | MAP_SWAPPED, |
63 | MAP_LOADING, |
56 | MAP_LOADING, |
… | |
… | |
83 | |
76 | |
84 | /* You should really know what you are doing before using this - you |
77 | /* You should really know what you are doing before using this - you |
85 | * should almost always be using out_of_map instead, which takes into account |
78 | * should almost always be using out_of_map instead, which takes into account |
86 | * map tiling. |
79 | * map tiling. |
87 | */ |
80 | */ |
88 | #define OUT_OF_REAL_MAP(M,X,Y) !(IN_RANGE_EXC ((X), 0, (M)->width) && IN_RANGE_EXC ((Y), 0, (M)->height)) |
81 | #define OUT_OF_REAL_MAP(M,X,Y) (!(IN_RANGE_EXC ((X), 0, (M)->width) && IN_RANGE_EXC ((Y), 0, (M)->height))) |
89 | |
82 | |
90 | /* These are used in the MapLook flags element. They are not used in |
83 | /* These are used in the MapLook flags element. They are not used in |
91 | * in the object flags structure. |
84 | * in the object flags structure. |
92 | */ |
85 | */ |
93 | #define P_BLOCKSVIEW 0x01 |
86 | #define P_BLOCKSVIEW 0x01 |
… | |
… | |
125 | * to extend information about a space. |
118 | * to extend information about a space. |
126 | */ |
119 | */ |
127 | struct mapspace |
120 | struct mapspace |
128 | { |
121 | { |
129 | object *bot, *top; /* lowest/highest object on this space */ |
122 | object *bot, *top; /* lowest/highest object on this space */ |
130 | New_Face *faces[MAP_LAYERS]; /* faces for the 3 layers */ |
123 | facetile *faces[MAP_LAYERS]; /* faces for the 3 layers */ |
131 | object *faces_obj[MAP_LAYERS];/* face objects for the 3 layers */ |
124 | object *faces_obj[MAP_LAYERS];/* face objects for the 3 layers */ |
132 | uint8 flags_; /* flags about this space (see the P_ values above) */ |
125 | uint8 flags_; /* flags about this space (see the P_ values above) */ |
133 | sint8 light; /* How much light this space provides */ |
126 | sint8 light; /* How much light this space provides */ |
134 | MoveType move_block; /* What movement types this space blocks */ |
127 | MoveType move_block; /* What movement types this space blocks */ |
135 | MoveType move_slow; /* What movement types this space slows */ |
128 | MoveType move_slow; /* What movement types this space slows */ |