some more dfb stuff
[physik/morpheus.git] / defines.h
1 /*
2  * morpheus - defines.h
3  *
4  * default parameters and program defines
5  *
6  */
7
8 #ifdef USE_DFB_API
9 #include <directfb.h>
10 #endif
11
12 #define DEFAULT_X_SEG 50
13 #define DEFAULT_Y_SEG 50
14 #define DEFAULT_Z_SEG 100
15
16 #define DEFAULT_SLOPE_NEL 1
17 #define DEFAULT_START_NEL 0
18
19 #define DEFAULT_STEPS 5000
20
21 /* program defines, dont touch ;) */
22
23 #define URAND_MAX 0xffffffff
24
25 typedef unsigned int u32;
26 typedef long long unsigned int u64;
27
28 #ifdef DEBUG
29  #define DEBUG_IT 1
30 #else 
31  #define DEBUG_IT 0
32 #endif
33
34 #define printfd(fmt,args...) if(DEBUG_IT) printf(fmt,##args);
35
36 /* display stuff */
37 typedef struct __display {
38  u32 max_x,max_y,max_z; /* dimensions */
39  void *cell_p; /* pointer to cell data */
40 #ifdef USE_DFB_API
41  IDirectFB *dfb; /* pointer to dfb main construct */
42  IDirectFBSurface *primary_surface; /* pointer to dfb primary surface */
43 #endif
44  int screen_height,screen_width; /* screen dimensions */
45 } display;
46
47 #define DEFAULT_DISPLAY_X 25
48 #define DEFAULT_DISPLAY_Y 25
49 #define DEFAULT_DISPLAY_Z 50
50 #define DEFAULT_DISPLAY_REF_RATE 100
51
52 #define DISPLAY_X_FREE 15
53 #define DISPLAY_Y_FREE 15
54  
55 /* masks for u32 cell */
56 #define AMORPH 0x00000001
57 #define CRYSTAL 0x00000000
58 #define C_CONC_MASK 0xfffffffe
59