Another round of instance globals changes.

This commit is contained in:
Bart House
2018-12-24 16:43:50 -08:00
parent e5e906dc3b
commit 572ee347b9
78 changed files with 946 additions and 975 deletions

View File

@@ -5,12 +5,6 @@
#ifndef VISION_H
#define VISION_H
#if 0 /* (moved to decl.h) */
extern boolean vision_full_recalc; /* TRUE if need vision recalc */
extern char **viz_array; /* could see/in sight row pointers */
extern char *viz_rmin; /* min could see indices */
extern char *viz_rmax; /* max could see indices */
#endif
#define COULD_SEE 0x1 /* location could be seen, if it were lit */
#define IN_SIGHT 0x2 /* location can be seen */
#define TEMP_LIT 0x4 /* location is temporarily lit */
@@ -27,9 +21,9 @@ extern char *viz_rmax; /* max could see indices */
* couldsee() - Returns true if the hero has a clear line of sight to
* the location.
*/
#define cansee(x, y) (viz_array[y][x] & IN_SIGHT)
#define couldsee(x, y) (viz_array[y][x] & COULD_SEE)
#define templit(x, y) (viz_array[y][x] & TEMP_LIT)
#define cansee(x, y) (g.viz_array[y][x] & IN_SIGHT)
#define couldsee(x, y) (g.viz_array[y][x] & COULD_SEE)
#define templit(x, y) (g.viz_array[y][x] & TEMP_LIT)
/*
* The following assume the monster is not blind.