fountain and sink bookkeeping
This replaces most of commit 0ca2af4d8b
from a couple of days ago with something more robust. That change
actually introduced redundant code that caused fountain and/or sink
count to be off instead of preventing it.
Revise set_levltyp() to update level.flags.nfountains and
level.flags.nsinks if setting the type to or from fountain or sink.
A bunch of places that were setting levl[x][y].typ directly needed
to be revised to use set_levltyp() instead. set_levltyp() itself
hadn't been updated to handle LAVAWALL (to force such to be lit).
This commit is contained in:
@@ -1399,6 +1399,7 @@ extern void add_subroom(struct mkroom *, int, int, int, int, boolean, schar,
|
||||
extern void free_luathemes(boolean);
|
||||
extern void makecorridors(void);
|
||||
extern void add_door(coordxy, coordxy, struct mkroom *);
|
||||
extern void count_level_features(void);
|
||||
extern void clear_level_structures(void);
|
||||
extern void level_finalize_topology(void);
|
||||
extern void mklev(void);
|
||||
|
||||
@@ -96,6 +96,7 @@ enum levl_typ_types {
|
||||
#define ZAP_POS(typ) ((typ) >= POOL)
|
||||
#define SPACE_POS(typ) ((typ) > DOOR)
|
||||
#define IS_POOL(typ) ((typ) >= POOL && (typ) <= DRAWBRIDGE_UP)
|
||||
#define IS_LAVA(typ) ((typ) == LAVAPOOL || (typ) == LAVAWALL)
|
||||
#define IS_THRONE(typ) ((typ) == THRONE)
|
||||
#define IS_FOUNTAIN(typ) ((typ) == FOUNTAIN)
|
||||
#define IS_SINK(typ) ((typ) == SINK)
|
||||
|
||||
Reference in New Issue
Block a user