support for building without Network/Graphics, although the disable-graphics case is kind of hackish still
#ifndef TYPES_HH
#define TYPES_HH
/**
* Define various types
*/
#include "Vector.hh"
#include <stdint.h>
/*
* Standard vector used for Physics stuff
*/
typedef VectorType<float> Vector;
/**
* A player's health is measured in...
*/
typedef int16_t Health;
/**
* Terrain/Graphics pixel dimension values are long ints
*/
typedef long int PixelDimension;
/**
* A Terrain/Pixel coordinate as a PixelDimension Vector
*/
typedef VectorType<PixelDimension> PixelCoordinate;
/**
* Dimensions of something in pixels
*/
struct PixelDimensions {
/** Item width/height */
PixelDimension width, height;
/** Simple constructor */
PixelDimensions (PixelDimension width, PixelDimension height) :
width(width), height(height)
{ }
};
/**
* A rectangular area of pixels
*/
struct PixelArea {
PixelDimension left, top, right, bottom;
PixelArea (PixelDimension left, PixelDimension top, PixelDimension right, PixelDimension bottom) :
left(left), top(top), right(right), bottom(bottom)
{ }
};
/**
* A time interval, measured in real milliseconds
*/
typedef signed long TimeMS;
/**
* Abstract tick count, defined as a number of Timer::interval's against real time
*/
typedef int32_t TickCount;
/**
* Terrain "pixel" type
*
* @see TerrainType
*/
typedef uint8_t TerrainPixel;
#endif