#ifndef LTYPES_H
#define LTYPES_H


#ifdef  SHOW_DEBUGGING_MESSAGES
#include <stdio.h>
#define DEBUGGING_MESSAGE1(A) {printf(A); fflush(stdout);}
#define DEBUGGING_MESSAGE2(A,B) {printf(A,B);fflush(stdout);}
#define DEBUGGING_MESSAGE3(A,B,C) {printf(A,B,C);fflush(stdout);}
#else
#define DEBUGGING_MESSAGE1(A) {}
#define DEBUGGING_MESSAGE2(A,B) {}
#define DEBUGGING_MESSAGE3(A,B,C) {}
#endif

/* Basic types --------------------------------------- */

/* Simple types */
typedef unsigned char      u8;
typedef unsigned short int u16;
typedef unsigned long int  u32;
typedef signed char        s8;
typedef signed short int   s16;
typedef signed long int    s32;
typedef float              r32;
typedef double             r64;

#ifdef M_PI
const r32 pi     = M_PI;
#else
const r32 pi     = (r32) 3.141592;
#endif

const r32 two_pi = (r32) 2.0*pi;

/* some constants used in the Lstring */
const float LENGTH_MAX=10000.0f;
const float LENGTH_DECR=0.9f;
const float ANGLE_DECR=0.9f;
const float ANGLE_MIN=0.0f;
const float ANGLE_MAX=1000.0f;
const float THICK_DECR=0.7f;
const float THICK_MAX=200.0f;
const float COLOUR_MAX=200.0f;

/* Some often used consts */
const r32 zero = 0.0;
const r32 one  = 1.0;
const float VIEW_ASPECT=1.3f;
const float VIEW_ANGLE=3.0f; //in degrees

#endif
