Conway
This commit is contained in:
@@ -513,6 +513,8 @@ typedef unsigned char uchar;
|
||||
but it isn't necessary for successful operation of the program */
|
||||
#define FREE_ALL_MEMORY /* free all memory at exit */
|
||||
|
||||
#define CONWAY /* Conway's Life level */
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
|
||||
@@ -360,17 +360,17 @@ E const char *const monexplain[], invisexplain[], *const oclass_names[];
|
||||
* provides all the subclasses that seem reasonable, and sets up for all
|
||||
* prefixes being null. Port code can set those that it wants.
|
||||
*/
|
||||
#define HACKPREFIX 0
|
||||
#define LEVELPREFIX 1
|
||||
#define SAVEPREFIX 2
|
||||
#define BONESPREFIX 3
|
||||
#define DATAPREFIX 4 /* this one must match hardcoded value in dlb.c */
|
||||
#define SCOREPREFIX 5
|
||||
#define LOCKPREFIX 6
|
||||
#define SYSCONFPREFIX 7
|
||||
#define CONFIGPREFIX 8
|
||||
#define TROUBLEPREFIX 9
|
||||
#define PREFIX_COUNT 10
|
||||
#define HACKPREFIX 0 /* shared, RO */
|
||||
#define LEVELPREFIX 1 /* per-user, RW */
|
||||
#define SAVEPREFIX 2 /* per-user, RW */
|
||||
#define BONESPREFIX 3 /* shared, RW */
|
||||
#define DATAPREFIX 4 /* dungeon/dlb; must match value in dlb.c */
|
||||
#define SCOREPREFIX 5 /* shared, RW */
|
||||
#define LOCKPREFIX 6 /* shared, RW */
|
||||
#define SYSCONFPREFIX 7 /* shared, RO */
|
||||
#define CONFIGPREFIX 8
|
||||
#define TROUBLEPREFIX 9 /* shared or per-user, RW (append-only) */
|
||||
#define PREFIX_COUNT 10
|
||||
/* used in files.c; xxconf.h can override if needed */
|
||||
#ifndef FQN_MAX_FILENAME
|
||||
#define FQN_MAX_FILENAME 512
|
||||
@@ -417,6 +417,10 @@ E struct plinemsg_type *plinemsg_types;
|
||||
E char *ARGV0;
|
||||
#endif
|
||||
|
||||
#ifdef DROPLEVEL
|
||||
E void NDECL((*dropleveltempsfn));
|
||||
#endif
|
||||
|
||||
#undef E
|
||||
|
||||
#endif /* DECL_H */
|
||||
|
||||
@@ -1132,6 +1132,7 @@ E int FDECL(sleep_monst, (struct monst *, int, int));
|
||||
E void FDECL(slept_monst, (struct monst *));
|
||||
E void FDECL(xdrainenergym, (struct monst *, BOOLEAN_P));
|
||||
E long FDECL(attk_protection, (int));
|
||||
E int FDECL(mdamagem, (struct monst *, struct monst *, struct attack *));
|
||||
E void FDECL(rustm, (struct monst *, struct obj *));
|
||||
|
||||
/* ### mhitu.c ### */
|
||||
@@ -1219,6 +1220,8 @@ E void NDECL(water_friction);
|
||||
E void FDECL(save_waterlevel, (int, int));
|
||||
E void FDECL(restore_waterlevel, (int));
|
||||
E const char *FDECL(waterbody_name, (XCHAR_P, XCHAR_P));
|
||||
E void NDECL(conway_update);
|
||||
E void NDECL(conway_restore);
|
||||
|
||||
/* ### mkobj.c ### */
|
||||
|
||||
|
||||
@@ -350,4 +350,15 @@ struct savefile_info {
|
||||
#define PANICTRACE_GDB
|
||||
#endif
|
||||
|
||||
/* Only CONWAY requires this at the moment, but it should be generally useful. */
|
||||
#ifdef CONWAY
|
||||
# define DROPLEVEL
|
||||
#endif
|
||||
|
||||
#ifdef DROPLEVEL
|
||||
# define DROPLEVEL_WINDUP(fn) dropleveltempsfn = &fn;
|
||||
# define DROPLEVEL_UNWIND(held) \
|
||||
dropleveltempsfn = held; held=0; if(dropleveltempsfn)(*dropleveltempsfn)();
|
||||
#endif
|
||||
|
||||
#endif /* GLOBAL_H */
|
||||
|
||||
@@ -560,6 +560,9 @@ struct levelflags {
|
||||
normal mode descendant of such) */
|
||||
Bitfield(corrmaze, 1); /* Whether corridors are used for the maze
|
||||
rather than ROOM */
|
||||
#ifdef CONWAY
|
||||
Bitfield(conway, 1);
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define CORRMAZE 0x00000800L /* for maze levels only */
|
||||
#define CHECK_INACCESSIBLES 0x00001000L /* check for inaccessible areas and
|
||||
generate ways to escape from them */
|
||||
#define FLAG_CONWAY 0x00002000L /* avoid confusion with the value of CONWAY */
|
||||
|
||||
/* different level layout initializers */
|
||||
#define LVLINIT_NONE 0
|
||||
|
||||
@@ -386,5 +386,7 @@ struct you {
|
||||
}; /* end of `struct you' */
|
||||
|
||||
#define Upolyd (u.umonnum != u.umonster)
|
||||
/* something like MON_AT (rm.h) */
|
||||
#define HERO_AT(x,y) ((x)==u.ux && (y)==u.uy)
|
||||
|
||||
#endif /* YOU_H */
|
||||
|
||||
Reference in New Issue
Block a user