viz_array[][] type

viz_array[][] is indexed by coordinates but the data it contains has
nothing to do with them so it shouldn't have been changed to coordxy.
'char' was sufficient; 'uchar' would have been better; this invents
'seenV' instead.  This led to a cascade of required changes.  The
result is warning free and seems to be working but my fingers are
crosssed....
This commit is contained in:
PatR
2022-07-15 13:48:29 -07:00
parent 5aca2fc590
commit b37f922cf7
7 changed files with 92 additions and 67 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 decl.h $NHDT-Date: 1655161560 2022/06/13 23:06:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.298 $ */
/* NetHack 3.7 decl.h $NHDT-Date: 1657918080 2022/07/15 20:48:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.303 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2007. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1247,10 +1247,10 @@ struct instance_globals {
short nocreate4;
/* uhitm.c */
boolean override_confirmation; /* Used to flag attacks caused by
Stormbringer's maliciousness. */
* Stormbringer's maliciousness. */
/* vision.c */
coordxy **viz_array; /* used in cansee() and couldsee() macros */
seenV **viz_array; /* used in cansee() and couldsee() macros */
coordxy *viz_rmin; /* min could see indices */
coordxy *viz_rmax; /* max could see indices */
boolean vision_full_recalc;