]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/def.rm.h
.Nm does not need a dummy argument ("") before punctuation or
[bsdgames-darwin.git] / hack / def.rm.h
1 /* $NetBSD: def.rm.h,v 1.5 2001/01/16 02:50:28 cgd Exp $ */
2
3 /*
4 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
5 */
6 #ifndef _DEF_RM_H_
7 #define _DEF_RM_H_
8 /* Level location types */
9 #define HWALL 1
10 #define VWALL 2
11 #define SDOOR 3
12 #define SCORR 4
13 #define LDOOR 5
14 #define POOL 6 /* not yet fully implemented */
15 /* this should in fact be a bit like lit */
16 #define DOOR 7
17 #define CORR 8
18 #define ROOM 9
19 #define STAIRS 10
20
21 /*
22 * Avoid using the level types in inequalities:
23 * these types are subject to change.
24 * Instead, use one of the macros below.
25 */
26 #define IS_WALL(typ) ((typ) <= VWALL)
27 #define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */
28 #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */
29 #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM or STAIRS */
30 #define ZAP_POS(typ) ((typ) > DOOR)
31
32 /*
33 * A few of the associated symbols are not hardwired.
34 */
35 #ifdef QUEST
36 #define CORR_SYM ':'
37 #else
38 #define CORR_SYM '#'
39 #endif /* QUEST */
40 #define POOL_SYM '}'
41
42 #define ERRCHAR '{'
43
44 /*
45 * The structure describing a coordinate position.
46 * Before adding fields, remember that this will significantly affect
47 * the size of temporary files and save files.
48 */
49 struct rm {
50 char scrsym;
51 unsigned typ:5;
52 unsigned new:1;
53 unsigned seen:1;
54 unsigned lit:1;
55 };
56 extern struct rm levl[COLNO][ROWNO];
57 #endif /* _DEF_RM_H_ */