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