rm.h (1539B)
1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 2 /* rm.h - version 1.0.2 */ 3 4 /* Level location types */ 5 #define HWALL 1 6 #define VWALL 2 7 #define SDOOR 3 8 #define SCORR 4 9 #define LDOOR 5 10 #define POOL 6 /* not yet fully implemented */ 11 /* this should in fact be a bit like lit */ 12 #define DOOR 7 13 #define CORR 8 14 #define ROOM 9 15 #define STAIRS 10 16 17 /* 18 * Avoid using the level types in inequalities: 19 * these types are subject to change. 20 * Instead, use one of the macros below. 21 */ 22 #define IS_WALL(typ) ((typ) <= VWALL) 23 #define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */ 24 #define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */ 25 #define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM or STAIRS */ 26 #define ZAP_POS(typ) ((typ) > DOOR) 27 28 /* 29 * A few of the associated symbols are not hardwired. 30 */ 31 #define CORR_SYM '#' 32 #define POOL_SYM '}' 33 34 #define ERRCHAR '{' 35 36 /* 37 * The structure describing a coordinate position. 38 * Before adding fields, remember that this will significantly affect 39 * the size of temporary files and save files. 40 */ 41 #ifdef MSDOS 42 /* Save disk space by using unsigned char's instead of unsigned ints 43 */ 44 struct rm { 45 uchar scrsym; 46 uchar typ:5; 47 uchar new:1; 48 uchar seen:1; 49 uchar lit:1; 50 }; 51 #else 52 struct rm { 53 char scrsym; 54 unsigned typ:5; 55 unsigned new:1; 56 unsigned seen:1; 57 unsigned lit:1; 58 }; 59 #endif /* MSDOS /**/ 60 extern struct rm levl[COLNO][ROWNO]; 61 62 #ifdef DGK 63 #define ACTIVE 1 64 #define SWAPPED 2 65 66 struct finfo { 67 int where; 68 long time; 69 long size; 70 }; 71 extern struct finfo fileinfo[]; 72 #endif