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

@@ -14,14 +14,14 @@ typedef boolean FDECL((*callback_proc), (genericptr_t, genericptr_t));
/*
* player_flags
*/
#define REG_HERO_INSIDE 0x01
#define REG_NOT_HEROS 0x02
#define hero_inside(r) ((r)->player_flags & REG_HERO_INSIDE)
#define heros_fault(r) (!((r)->player_flags & REG_NOT_HEROS))
#define set_hero_inside(r) ((r)->player_flags |= REG_HERO_INSIDE)
#define clear_hero_inside(r) ((r)->player_flags &= ~REG_HERO_INSIDE)
#define set_heros_fault(r) ((r)->player_flags &= ~REG_NOT_HEROS)
#define clear_heros_fault(r) ((r)->player_flags |= REG_NOT_HEROS)
#define REG_HERO_INSIDE 0x01
#define REG_NOT_HEROS 0x02
#define hero_inside(r) ((r)->player_flags & REG_HERO_INSIDE)
#define heros_fault(r) (!((r)->player_flags & REG_NOT_HEROS))
#define set_hero_inside(r) ((r)->player_flags |= REG_HERO_INSIDE)
#define clear_hero_inside(r) ((r)->player_flags &= ~REG_HERO_INSIDE)
#define set_heros_fault(r) ((r)->player_flags &= ~REG_NOT_HEROS)
#define clear_heros_fault(r) ((r)->player_flags |= REG_NOT_HEROS)
/*
* Note: if you change the size/type of any of the fields below,
@@ -32,37 +32,37 @@ typedef boolean FDECL((*callback_proc), (genericptr_t, genericptr_t));
*/
typedef struct {
NhRect bounding_box; /* Bounding box of the region */
NhRect *rects; /* Rectangles composing the region */
short nrects; /* Number of rectangles */
boolean attach_2_u; /* Region attached to player ? */
unsigned int attach_2_m; /* Region attached to monster ? */
/*struct obj *attach_2_o;*/ /* Region attached to object ? UNUSED YET */
const char* enter_msg; /* Message when entering */
const char* leave_msg; /* Message when leaving */
long ttl; /* Time to live. -1 is forever */
short expire_f; /* Function to call when region's ttl expire */
short can_enter_f; /* Function to call to check wether the player
can, or can not, enter the region */
short enter_f; /* Function to call when the player enters*/
short can_leave_f; /* Function to call to check wether the player
can, or can not, leave the region */
short leave_f; /* Function to call when the player leaves */
short inside_f; /* Function to call every turn if player's
inside */
unsigned int player_flags; /* (see above) */
unsigned int* monsters; /* Monsters currently inside this region */
short n_monst; /* Number of monsters inside this region */
short max_monst; /* Maximum number of monsters that can be
listed without having to grow the array */
#define MONST_INC 5
NhRect bounding_box; /* Bounding box of the region */
NhRect *rects; /* Rectangles composing the region */
short nrects; /* Number of rectangles */
boolean attach_2_u; /* Region attached to player ? */
unsigned int attach_2_m; /* Region attached to monster ? */
/*struct obj *attach_2_o;*/ /* Region attached to object ? UNUSED YET */
const char *enter_msg; /* Message when entering */
const char *leave_msg; /* Message when leaving */
long ttl; /* Time to live. -1 is forever */
short expire_f; /* Function to call when region's ttl expire */
short can_enter_f; /* Function to call to check wether the player
can, or can not, enter the region */
short enter_f; /* Function to call when the player enters*/
short can_leave_f; /* Function to call to check wether the player
can, or can not, leave the region */
short leave_f; /* Function to call when the player leaves */
short inside_f; /* Function to call every turn if player's
inside */
unsigned int player_flags; /* (see above) */
unsigned int *monsters; /* Monsters currently inside this region */
short n_monst; /* Number of monsters inside this region */
short max_monst; /* Maximum number of monsters that can be
listed without having to grow the array */
#define MONST_INC 5
/* Should probably do the same thing about objects */
/* Should probably do the same thing about objects */
boolean visible; /* Is the region visible ? */
int glyph; /* Which glyph to use if visible */
anything arg; /* Optional user argument (Ex: strength of
force field, damage of a fire zone, ...*/
boolean visible; /* Is the region visible ? */
int glyph; /* Which glyph to use if visible */
anything arg; /* Optional user argument (Ex: strength of
force field, damage of a fire zone, ...*/
} NhRegion;
#endif /* REGION_H */