Reformat .h files.

I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.

The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
This commit is contained in:
Sean Hunt
2015-05-25 09:03:10 +09:00
parent 26ee7dc370
commit 8b57d96fd2
156 changed files with 10712 additions and 10701 deletions

View File

@@ -7,15 +7,15 @@
#ifndef VISION_H
#define VISION_H
#if 0 /* (moved to decl.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 */
#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 */
/*
* Light source sources
@@ -29,9 +29,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) (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)
/*
* The following assume the monster is not blind.
@@ -43,27 +43,29 @@ extern char *viz_rmax; /* max could see indices */
* location and the hero is visible, then monster can see the
* hero.
*/
#define m_cansee(mtmp,x2,y2) clear_path((mtmp)->mx,(mtmp)->my,(x2),(y2))
#define m_cansee(mtmp, x2, y2) clear_path((mtmp)->mx, (mtmp)->my, (x2), (y2))
#define m_canseeu(m) ((!Invis || perceives((m)->data)) && \
!(Underwater || u.uburied || (m)->mburied) ? \
couldsee((m)->mx,(m)->my) : 0)
#define m_canseeu(m) \
((!Invis || perceives((m)->data)) \
&& !(Underwater || u.uburied || (m)->mburied) \
? couldsee((m)->mx, (m)->my) \
: 0)
/*
* Circle information
*/
#define MAX_RADIUS 15 /* this is in points from the source */
#define MAX_RADIUS 15 /* this is in points from the source */
/* Use this macro to get a list of distances of the edges (see vision.c). */
#define circle_ptr(z) (&circle_data[(int)circle_start[z]])
#define circle_ptr(z) (&circle_data[(int) circle_start[z]])
/* howmonseen() bitmask values */
#define MONSEEN_NORMAL 0x0001 /* normal vision */
#define MONSEEN_SEEINVIS 0x0002 /* seeing invisible */
#define MONSEEN_INFRAVIS 0x0004 /* via infravision */
#define MONSEEN_TELEPAT 0x0008 /* via telepathy */
#define MONSEEN_XRAYVIS 0x0010 /* via Xray vision */
#define MONSEEN_DETECT 0x0020 /* via extended monster detection */
#define MONSEEN_WARNMON 0x0040 /* via type-specific warning */
#define MONSEEN_NORMAL 0x0001 /* normal vision */
#define MONSEEN_SEEINVIS 0x0002 /* seeing invisible */
#define MONSEEN_INFRAVIS 0x0004 /* via infravision */
#define MONSEEN_TELEPAT 0x0008 /* via telepathy */
#define MONSEEN_XRAYVIS 0x0010 /* via Xray vision */
#define MONSEEN_DETECT 0x0020 /* via extended monster detection */
#define MONSEEN_WARNMON 0x0040 /* via type-specific warning */
#endif /* VISION_H */