2001-01-16 05:50:27 +03:00
|
|
|
/* $NetBSD: def.rm.h,v 1.5 2001/01/16 02:50:28 cgd Exp $ */
|
1997-10-19 20:56:41 +04:00
|
|
|
|
1993-08-02 21:16:36 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
|
|
|
|
*/
|
1997-10-19 20:56:41 +04:00
|
|
|
#ifndef _DEF_RM_H_
|
|
|
|
#define _DEF_RM_H_
|
1993-03-21 12:45:37 +03:00
|
|
|
/* Level location types */
|
|
|
|
#define HWALL 1
|
|
|
|
#define VWALL 2
|
|
|
|
#define SDOOR 3
|
|
|
|
#define SCORR 4
|
|
|
|
#define LDOOR 5
|
|
|
|
#define POOL 6 /* not yet fully implemented */
|
|
|
|
/* this should in fact be a bit like lit */
|
|
|
|
#define DOOR 7
|
|
|
|
#define CORR 8
|
|
|
|
#define ROOM 9
|
|
|
|
#define STAIRS 10
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Avoid using the level types in inequalities:
|
|
|
|
* these types are subject to change.
|
|
|
|
* Instead, use one of the macros below.
|
|
|
|
*/
|
|
|
|
#define IS_WALL(typ) ((typ) <= VWALL)
|
|
|
|
#define IS_ROCK(typ) ((typ) < POOL) /* absolutely nonaccessible */
|
|
|
|
#define ACCESSIBLE(typ) ((typ) >= DOOR) /* good position */
|
|
|
|
#define IS_ROOM(typ) ((typ) >= ROOM) /* ROOM or STAIRS */
|
|
|
|
#define ZAP_POS(typ) ((typ) > DOOR)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A few of the associated symbols are not hardwired.
|
|
|
|
*/
|
|
|
|
#ifdef QUEST
|
|
|
|
#define CORR_SYM ':'
|
|
|
|
#else
|
|
|
|
#define CORR_SYM '#'
|
2001-01-16 05:50:27 +03:00
|
|
|
#endif /* QUEST */
|
1993-03-21 12:45:37 +03:00
|
|
|
#define POOL_SYM '}'
|
|
|
|
|
|
|
|
#define ERRCHAR '{'
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The structure describing a coordinate position.
|
|
|
|
* Before adding fields, remember that this will significantly affect
|
|
|
|
* the size of temporary files and save files.
|
|
|
|
*/
|
|
|
|
struct rm {
|
|
|
|
char scrsym;
|
|
|
|
unsigned typ:5;
|
|
|
|
unsigned new:1;
|
|
|
|
unsigned seen:1;
|
|
|
|
unsigned lit:1;
|
|
|
|
};
|
|
|
|
extern struct rm levl[COLNO][ROWNO];
|
1997-10-19 20:56:41 +04:00
|
|
|
#endif /* _DEF_RM_H_ */
|