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:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 global.h $NHDT-Date: 1646322467 2022/03/03 15:47:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.135 $ */
|
||||
/* NetHack 3.7 global.h $NHDT-Date: 1657918090 2022/07/15 20:48:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.144 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -85,6 +85,11 @@ typedef schar boolean; /* 0 or 1 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* vision seen vectors: viz_array[][] and levl[][].seenv, which use different
|
||||
values from each other but are close enough in size to share a type;
|
||||
viz_array contains 8-bit bitmasks, lev->seenv is a 5-bit bitfield */
|
||||
typedef unsigned char seenV; /* no need for uint8_t */
|
||||
|
||||
/* Type for third parameter of read(2) */
|
||||
#if defined(BSD) || defined(ULTRIX)
|
||||
typedef int readLenType;
|
||||
|
||||
Reference in New Issue
Block a user