make it possible to override CXX from the command line
[rofl0r-df-libgraphics.git] / g_src / init.h
blob243c5d17cfc467391b3572176ec229b0b67cf2bc
1 #ifndef INIT_H
2 #define INIT_H
4 #include "enabler.h"
5 #ifdef __APPLE__
6 #include <SDL_ttf/SDL_ttf.h>
7 #else
8 #include <SDL/SDL_ttf.h>
9 #endif
11 enum ttf_flag {
12 ttf_off, ttf_on, ttf_auto
15 class init_fontst
17 public:
18 long small_font_texpos[256];
19 long large_font_texpos[256];
20 long small_font_datapos[256];
21 long large_font_datapos[256];
22 float small_font_adjx;
23 float small_font_adjy;
24 float large_font_adjx;
25 float large_font_adjy;
26 long small_font_dispx;
27 long small_font_dispy;
28 long large_font_dispx;
29 long large_font_dispy;
30 ttf_flag use_ttf;
31 int ttf_limit;
34 enum InitDisplayFlag
36 INIT_DISPLAY_FLAG_USE_GRAPHICS,
37 INIT_DISPLAY_FLAG_BLACK_SPACE,
38 INIT_DISPLAY_FLAG_PARTIAL_PRINT,
39 INIT_DISPLAY_FLAG_FRAME_BUFFER,
40 INIT_DISPLAY_FLAG_SINGLE_BUFFER,
41 INIT_DISPLAY_FLAG_ACCUM_BUFFER,
42 INIT_DISPLAY_FLAG_VBO,
43 INIT_DISPLAY_FLAG_2D,
44 INIT_DISPLAY_FLAG_2DHW,
45 INIT_DISPLAY_FLAG_2DASYNC,
46 INIT_DISPLAY_FLAG_UNUSED_01_08,//
47 INIT_DISPLAY_FLAG_TEXT,
48 INIT_DISPLAY_FLAG_SHADER,
49 INIT_DISPLAY_FLAG_NOT_RESIZABLE,
50 INIT_DISPLAY_FLAG_ARB_SYNC,
51 INIT_DISPLAY_FLAGNUM
54 enum InitDisplayWindow
56 INIT_DISPLAY_WINDOW_TRUE,
57 INIT_DISPLAY_WINDOW_FALSE,
58 INIT_DISPLAY_WINDOW_PROMPT,
59 INIT_DISPLAY_WINDOWNUM
62 class init_displayst
64 public:
65 flagarrayst flag;
66 InitDisplayWindow windowed;
68 int grid_x, grid_y; // The *current* display grid size, kept up to date
70 int desired_fullscreen_width, desired_fullscreen_height;
71 int desired_windowed_width, desired_windowed_height;
74 char partial_print_count;
76 init_displayst();
79 enum InitMediaFlag
81 INIT_MEDIA_FLAG_SOUND_OFF,
82 INIT_MEDIA_FLAG_INTRO_OFF,
83 INIT_MEDIA_FLAG_COMPRESS_SAVES,
84 INIT_MEDIA_FLAGNUM
87 class init_mediast
89 public:
90 flagarrayst flag;
91 int32_t volume;
93 init_mediast()
95 flag.set_size_on_flag_num(INIT_MEDIA_FLAGNUM);
96 volume=255;
100 enum InitInputFlag
102 INIT_INPUT_FLAG_MOUSE_OFF,
103 INIT_INPUT_FLAG_MOUSE_PICTURE,
104 INIT_INPUT_FLAGNUM
107 class init_inputst
109 public:
110 long hold_time;
111 long repeat_time;
112 long macro_time;
113 long pause_zoom_no_interface_ms;
114 flagarrayst flag;
115 long zoom_speed;
116 int repeat_accel_start;
117 int repeat_accel_limit;
119 init_inputst()
121 hold_time=150;
122 repeat_time=150;
123 macro_time=75;
124 pause_zoom_no_interface_ms=0;
125 flag.set_size_on_flag_num(INIT_INPUT_FLAGNUM);
126 zoom_speed = 10;
127 repeat_accel_start = 10;
128 repeat_accel_limit = 1;
132 enum InitWindowFlag
134 INIT_WINDOW_FLAG_TOPMOST,
135 INIT_WINDOW_FLAG_VSYNC_ON,
136 INIT_WINDOW_FLAG_VSYNC_OFF,
137 INIT_WINDOW_FLAG_TEXTURE_LINEAR,
138 INIT_WINDOW_FLAGNUM
141 class init_windowst
143 public:
144 flagarrayst flag;
146 init_windowst()
148 flag.set_size_on_flag_num(INIT_WINDOW_FLAGNUM);
152 class initst
154 public:
155 init_displayst display;
156 init_mediast media;
157 init_inputst input;
158 init_fontst font;
159 init_windowst window;
161 void begin();
164 extern initst init;
166 #endif