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