#pragma once

#define APPNAME "Lephisto"

#define MALLOC_L(type)(malloc(sizeof(type)))
#define CALLOC_L(type)(calloc(1, sizeof(type)))

#define ABS(x)   (((x)<0)?-(x):(x))

#define MAX(x,y)  (((x)>(y))?(x):(y))
#define MIN(x,y)  (((x)>(y))?(y):(x))

#define pow2(x)  ((x)*(x))

#define DATA_DEF    "data"  /* Default data packfile. */
extern char* data;          /* Modifiable datafile. */
#define DATA        data    /* Data file. */
#define DATA_NAME_LEN 32    /* Max length of data name. */
extern char dataname[DATA_NAME_LEN];

/* Max filename path. */
#ifndef PATH_MAX
#  define PATH_MAX 128
#endif

#ifndef M_PI
#define M_PI 3.14159265358979323846 /* Pi. */
#endif

char* lephisto_version(void);

