Commit | Line | Data |
---|---|---|
984263bc MD |
1 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ |
2 | /* def.rm.h - version 1.0.2 */ | |
304d60d9 | 3 | /* $DragonFly: src/games/hack/def.rm.h,v 1.2 2004/11/06 12:29:17 eirikn Exp $ */ |
984263bc MD |
4 | |
5 | /* Level location types */ | |
6 | #define HWALL 1 | |
7 | #define VWALL 2 | |
8 | #define SDOOR 3 | |
9 | #define SCORR 4 | |
10 | #define LDOOR 5 | |
6693db17 | 11 | #define POOL 6 /* not yet fully implemented */ |
984263bc MD |
12 | /* this should in fact be a bit like lit */ |
13 | #define DOOR 7 | |
14 | #define CORR 8 | |
15 | #define ROOM 9 | |
16 | #define STAIRS 10 | |
17 | ||
18 | /* | |
19 | * Avoid using the level types in inequalities: | |
20 | * these types are subject to change. | |
21 | * Instead, use one of the macros below. | |
22 | */ | |
23 | #define IS_WALL(typ) ((typ) <= VWALL) | |
6693db17 SW |
24 | #define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */ |
25 | #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */ | |
26 | #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM or STAIRS */ | |
27 | #define ZAP_POS(typ) ((typ) > DOOR) | |
984263bc MD |
28 | |
29 | /* | |
30 | * A few of the associated symbols are not hardwired. | |
31 | */ | |
32 | #ifdef QUEST | |
33 | #define CORR_SYM ':' | |
34 | #else | |
35 | #define CORR_SYM '#' | |
304d60d9 | 36 | #endif /* QUEST */ |
984263bc MD |
37 | #define POOL_SYM '}' |
38 | ||
39 | #define ERRCHAR '{' | |
40 | ||
41 | /* | |
42 | * The structure describing a coordinate position. | |
43 | * Before adding fields, remember that this will significantly affect | |
44 | * the size of temporary files and save files. | |
45 | */ | |
46 | struct rm { | |
47 | char scrsym; | |
48 | unsigned typ:5; | |
49 | unsigned new:1; | |
50 | unsigned seen:1; | |
51 | unsigned lit:1; | |
52 | }; | |
53 | extern struct rm levl[COLNO][ROWNO]; |