view src/things.h @ 25:8eaf72e2041b

Reindent the source using GNU indent and "indent -i4 -bli0 -npcs -nprs -npsl". Fix the problems introduced afterwards.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 24 Sep 2011 14:16:04 +0300
parents 241c93442be0
children a68786b9c74b
line wrap: on
line source

/*
 *	things.h
 *	Header for things.cc
 *	BW & RQ sometime in 1993 or 1994.
 */


#ifndef YH_THINGS		/* Prevent multiple inclusion */
#define YH_THINGS		/* Prevent multiple inclusion */


#include "wstructs.h"


/* starting areas */
#define THING_PLAYER1         1
#define THING_PLAYER2         2
#define THING_PLAYER3         3
#define THING_PLAYER4         4
#define THING_DEATHMATCH      11


extern
#ifndef YC_THINGS
    const
#endif
int _max_radius;


void create_things_table();
void delete_things_table();
bool is_thing_type(wad_ttype_t type);
acolour_t get_thing_colour(wad_ttype_t type);
const char *get_thing_name(wad_ttype_t type);
const char *get_thing_sprite(wad_ttype_t type);
char get_thing_flags(wad_ttype_t type);
int get_thing_radius(wad_ttype_t type);
inline int get_max_thing_radius()
{
    return _max_radius;
}

const char *GetAngleName(int);
const char *GetWhenName(int);


/*
 *	angle_to_direction - convert angle to direction (0-7)
 *
 *	Return a value that is guaranteed to be within [0-7].
 */
inline int angle_to_direction(wad_tangle_t angle)
{
    return ((unsigned) angle / 45) % 8;
}


#endif /* Prevent multiple inclusion */