#define fatal(s)    fatalexit(s, __FILE__, __LINE__)

void fatalexit( char *message, char *file, int line );


typedef unsigned char       byte, uchar, uint8;
typedef unsigned short      ushort, uint16;
typedef unsigned int        uint, uint32;
typedef unsigned __int64    uint64;

#ifndef __cplusplus
#define bool int
#define true 1
#define false 0
#endif

#ifndef null
#ifdef __cplusplus
#define null    0
#else
#define null    ((void *)0)
#endif
#endif

extern const char *AppTitle;

extern unsigned int *pixels;
extern unsigned char *videoMem;
extern int pitch;
extern int palette[256];
extern const unsigned int width;
extern const unsigned int height;
extern const unsigned int bpp;
extern unsigned int pixelLength;

extern const float PI;

extern char *file;

void loop();
void AAinit(HINSTANCE);

extern void makeSinTable(int);
extern float tcos(float);
extern float tsin(float);
