1 | /* |
1 | /* |
2 | * static char *rcsid_define_h = |
2 | * static char *rcsid_define_h = |
3 | * "$Id: map.h,v 1.13 2006/08/29 08:01:36 root Exp $"; |
3 | * "$Id: map.h,v 1.18 2006/09/08 12:56:43 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
157 | * arch_blocked and functions that examine the return value. |
157 | * arch_blocked and functions that examine the return value. |
158 | */ |
158 | */ |
159 | |
159 | |
160 | #define AB_NO_PASS 0x04 |
160 | #define AB_NO_PASS 0x04 |
161 | /*#define P_PASS_THRU 0x08 *//* */ |
161 | /*#define P_PASS_THRU 0x08 *//* */ |
162 | #define P_SAFE 0x08 /* If this is set the map is a safe map, |
162 | #define P_SAFE 0x08 /* If this is set the map tile is a safe map, |
163 | * that means, nothing harmful there will be done, |
163 | * that means, nothing harmful there will be done, |
164 | * like: bombs, potion usage, alchemy, spells |
164 | * like: bombs, potion usage, alchemy, spells |
165 | * this was introduced to make shops more safe |
165 | * this was introduced to make shops more safe |
166 | * and propably other maps */ |
166 | * and propably other maps */ |
167 | #define P_IS_ALIVE 0x10 /* something alive is on this space */ |
167 | #define P_IS_ALIVE 0x10 /* something alive is on this space */ |
… | |
… | |
260 | char *jailmap; /*where a player that is arrested in this region should be imprisoned.*/ |
260 | char *jailmap; /*where a player that is arrested in this region should be imprisoned.*/ |
261 | sint16 jailx, jaily; /* The coodinates in jailmap to which the player should be sent. */ |
261 | sint16 jailx, jaily; /* The coodinates in jailmap to which the player should be sent. */ |
262 | }; |
262 | }; |
263 | |
263 | |
264 | |
264 | |
265 | struct shopitems { |
265 | struct shopitems : zero_initialised |
|
|
266 | { |
266 | const char *name; /* name of the item in question, null if it is the default item */ |
267 | const char *name; /* name of the item in question, null if it is the default item */ |
267 | const char *name_pl; /* plural name */ |
268 | const char *name_pl; /* plural name */ |
268 | int typenum; /* itemtype number we need to match 0 if it is the default price*/ |
269 | int typenum; /* itemtype number we need to match 0 if it is the default price*/ |
269 | sint8 strength; /* the degree of specialisation the shop has in this item, |
270 | sint8 strength; /* the degree of specialisation the shop has in this item, |
270 | * as a percentage from -100 to 100 */ |
271 | * as a percentage from -100 to 100 */ |
271 | int index; /* being the size of the shopitems array.*/ |
272 | int index; /* being the size of the shopitems array.*/ |
272 | }; |
273 | }; |
… | |
… | |
277 | * almost certainly break various features. You may think |
278 | * almost certainly break various features. You may think |
278 | * it is safe to look at width and height values directly |
279 | * it is safe to look at width and height values directly |
279 | * (or even through the macros), but doing so will completely |
280 | * (or even through the macros), but doing so will completely |
280 | * break map tiling. |
281 | * break map tiling. |
281 | */ |
282 | */ |
282 | struct mapstruct : attachable<mapstruct> { |
283 | struct mapstruct : zero_initialised, attachable<mapstruct> { |
283 | static data_type get_dt () { return DT_MAP; } |
|
|
284 | |
|
|
285 | struct mapstruct *next; /* Next map, linked list */ |
284 | struct mapstruct *next; /* Next map, linked list */ |
286 | char *tmpname; /* Name of temporary file */ |
285 | char *tmpname; /* Name of temporary file */ |
287 | char *name; /* Name of map as given by its creator */ |
286 | char *name; /* Name of map as given by its creator */ |
288 | struct region *region; /* What jurisdiction in the game world this map is ruled by |
287 | struct region *region; /* What jurisdiction in the game world this map is ruled by |
289 | * points to the struct containing all the properties of |
288 | * points to the struct containing all the properties of |
… | |
… | |
294 | */ |
293 | */ |
295 | uint32 fixed_resettime:1; /* if true, reset time is not affected by |
294 | uint32 fixed_resettime:1; /* if true, reset time is not affected by |
296 | * players entering/exiting map |
295 | * players entering/exiting map |
297 | */ |
296 | */ |
298 | uint32 unique:1; /* if set, this is a per player unique map */ |
297 | uint32 unique:1; /* if set, this is a per player unique map */ |
299 | uint32 safe_map:1; /* if set, this map doesn't allow using magic or harmful stuff in any way */ |
|
|
300 | uint32 templatemap:1; /* if set, this is a template map */ |
298 | uint32 templatemap:1; /* if set, this is a template map */ |
301 | uint32 nosmooth:1; /* if set the content of this map has smoothlevel=0 forced*/ |
299 | uint32 nosmooth:1; /* if set the content of this map has smoothlevel=0 forced*/ |
302 | sint32 timeout; /* swapout is set to this */ |
300 | sint32 timeout; /* swapout is set to this */ |
303 | sint32 swap_time; /* When it reaches 0, the map will be swapped out */ |
301 | sint32 swap_time; /* When it reaches 0, the map will be swapped out */ |
304 | sint16 players; /* How many plares are on this level right now */ |
302 | sint16 players; /* How many plares are on this level right now */ |