#ifndef _OBJ_MAP_H_f2f6f74c_ #define _OBJ_MAP_H_f2f6f74c_ #include "structs.h" /* * Make a map an accurate, complete description of a level. Magic * mapping, basically. */ extern void map_complete(OBJ *, LEVEL *); /* * Find the map that's an auto-link up or down from the argument map; * if one is found, return the offset deltas through the other two * args. */ extern OBJ *map_auto_link_up(OBJ *, int *, int *); extern OBJ *map_auto_link_dn(OBJ *, int *, int *); /* * Set the label string for a ap. The string argument is copied; it * does not need to remain valid once map_setlabel returns. */ extern void map_setlabel(OBJ *, const char *); /* * Try to auto-switch maps when taking stairs up, stairs down, or a * gate. The LOC pointer to the gate function is the location of the * gate the player stepped into. The string argument to each of them * is the label to be applied to the new map, if a blank map is * allocated and labeled for the switch. */ extern int map_auto_switch_up(const char *); extern int map_auto_switch_dn(const char *); extern int map_auto_switch_gate(LOC *, const char *); /* * Set the character at a given location in a given map. Returns true * if it did anything, false if not. */ extern int map_setcharat(OBJ *, int, int, char); /* * Look up and return the character at a given location on a given map. */ extern char map_charat(OBJ *, int, int); /* * Return true iff the argument map is blank. */ extern int map_blank(OBJ *); /* * Return the label string for a map. */ extern const char *map_label(OBJ *); /* * Return the bounding-box coordinates of a map. */ extern int map_minx(OBJ *); extern int map_maxx(OBJ *); extern int map_miny(OBJ *); extern int map_maxy(OBJ *); /* * Replace the current map with the argument map. That is, change * things so the argument map is now the map used for this level. */ extern void map_replace_current(OBJ *); /* * Make a monster stop using a map. This is a no-op if the map is not * in use. It is a panic if object is not a map, if the monster is * not carrying the map, or if the map is in use by any other monster * (this last is not possible at this writing, as map use is specific * to the player avatar, and this is never claled for any other * monster). */ extern void map_stop_using(MONST *, INVOBJ *); #endif