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 light.c $NHDT-Date: 1604442297 2020/11/03 22:24:57 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.46 $ */
/* NetHack 3.7 light.c $NHDT-Date: 1657918094 2022/07/15 20:48:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.57 $ */
/* Copyright (c) Dean Luick, 1994 */
/* NetHack may be freely redistributed. See license for details. */
@@ -134,14 +134,14 @@ del_light_source(int type, anything *id)
/* Mark locations that are temporarily lit via mobile light sources. */
void
do_light_sources(coordxy **cs_rows)
do_light_sources(seenV **cs_rows)
{
coordxy x, y, min_x, max_x, max_y;
int offset;
coordxy *limits;
short at_hero_range = 0;
light_source *ls;
coordxy *row;
seenV *row;
for (ls = g.light_base; ls; ls = ls->next) {
ls->flags &= ~LSF_SHOW;