added event stuff, c conc and more ...
[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 NOT_SPECIFIED 0
13
14 #define DEFAULT_X_SEG 50
15 #define DEFAULT_Y_SEG 50
16 #define DEFAULT_Z_SEG 100
17
18 #define DEFAULT_SLOPE_NEL 1
19 #define DEFAULT_START_NEL 0
20
21 #define DEFAULT_A_P_RANGE 0.2
22 #define DEFAULT_A_P_FAKTOR 0.2
23
24 #define DEFAULT_STEPS 5000
25
26 /* program defines, dont touch ;) */
27
28 #define URAND_MAX 0xffffffff
29 #define URAND_2BYTE_MAX 0xffff
30
31 typedef unsigned int u32;
32 typedef long long unsigned int u64;
33
34 #ifdef DEBUG
35  #define DEBUG_IT 1
36 #else 
37  #define DEBUG_IT 0
38 #endif
39
40 #define printfd(fmt,args...) if(DEBUG_IT) printf(fmt,##args);
41
42 /* display stuff */
43 typedef struct __display {
44  u32 max_x,max_y,max_z; /* dimensions */
45  void *cell_p; /* pointer to cell data */
46 #ifdef USE_DFB_API
47  IDirectFB *dfb; /* pointer to dfb main construct */
48  IDirectFBSurface *primary_surface; /* pointer to dfb primary surface */
49  IDirectFBFont *font; /* the font */
50  IDirectFBInputDevice *keyboard; /* for keyboard input */
51  IDirectFBEventBuffer *keyboard_buffer; /* event buffer */
52 #endif
53  int screen_height,screen_width; /* screen dimensions */
54 } display;
55
56 #define DEFAULT_DISPLAY_REF_RATE 100
57
58 #define DISPLAY_X_FREE 15
59 #define DISPLAY_Y_FREE 15
60
61 #define DISPLAY_FONT "/usr/share/DFBSee/decker.ttf"
62 #define MAX_TXT 20
63  
64 /* masks for u32 cell */
65 #define AMORPH 0x00000001
66 #define CRYSTAL 0x00000000
67 #define C_CONC_MASK 0xfffffffe
68