40 #define OPTIONS_NOTIFY_TIME 3500
41 #define OPTIONS_NOTIFY_Y 450
43 #define NUM_BUTTONS 24
46 #define NUM_COMMONS 10
51 #define MULTIPLAYER_TAB 1
52 #define DETAIL_LEVELS_TAB 2
53 #define ABORT_GAME_BUTTON 3
54 #define CONTROL_CONFIG_BUTTON 4
55 #define HUD_CONFIG_BUTTON 5
56 #define ACCEPT_BUTTON 6
58 #define BRIEF_VOICE_OFF 7
59 #define BRIEF_VOICE_ON 8
67 #define PLANETS_OFF 14
68 #define HUD_TARGETVIEW_RENDER_ON 15
69 #define HUD_TARGETVIEW_RENDER_OFF 16
70 #define WEAPON_EXTRAS_ON 17
71 #define WEAPON_EXTRAS_OFF 18
73 #define LOW_DETAIL_N 19
74 #define MEDIUM_DETAIL_N 20
75 #define HIGH_DETAIL_N 21
76 #define VERY_HIGH_DETAIL_N 22
77 #define CUSTOM_DETAIL_N 23
80 #define NO_MOUSE_OVER_SOUND (1<<1)
83 #define OPTIONS_X_COORD 0
84 #define OPTIONS_Y_COORD 1
85 #define OPTIONS_W_COORD 2
86 #define OPTIONS_H_COORD 3
96 options_buttons(
char *
name,
int x1,
int y1,
int h,
int t,
int f = 0) : filename(name), x(x1), y(y1), hotspot(h), tab(t), flags(
f) {}
160 #define NUM_OPTIONS_SLIDERS 7
161 #define OPT_SOUND_VOLUME_SLIDER 0
162 #define OPT_MUSIC_VOLUME_SLIDER 1
163 #define OPT_VOICE_VOLUME_SLIDER 2
164 #define OPT_MOUSE_SENS_SLIDER 3
165 #define OPT_JOY_SENS_SLIDER 4
166 #define OPT_JOY_DEADZONE_SLIDER 5
167 #define OPT_SKILL_SLIDER 6
171 op_sliders(
"OMB_10", 31, 139, -1, -1, 10, 20, 10,
172 "OMB_11", 11, 226, 137,
173 "OMB_09", 9, 4, 137 ),
174 op_sliders(
"OMB_13", 31, 174, -1, -1, 13, 20, 10,
175 "OMB_14", 14, 226, 172,
176 "OMB_12", 12, 4, 172 ),
177 op_sliders(
"OMB_16", 31, 209, -1, -1, 16, 20, 10,
178 "OMB_17", 17, 226, 206,
179 "OMB_15", 15, 4, 206 ),
180 op_sliders(
"OMB_20", 6, 316, -1, -1, 20, 20, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
181 op_sliders(
"OMB_28", 440, 259, -1, -1, 28, 20, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
182 op_sliders(
"OMB_29", 440, 290, -1, -1, 29, 20, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
183 op_sliders(
"OMB_21", 440, 75, -1, -1, 21, 36, 5, NULL, -1, -1, -1, NULL, -1, -1, -1)
186 op_sliders(
"2_OMB_10", 50, 223, -1, -1, 10, 32, 10,
187 "2_OMB_11", 11, 361, 219,
188 "2_OMB_09", 9, 7, 219 ),
189 op_sliders(
"2_OMB_13", 50, 279, -1, -1, 13, 32, 10,
190 "2_OMB_14", 14, 361, 275,
191 "2_OMB_12", 12, 7, 275 ),
192 op_sliders(
"2_OMB_16", 50, 335, -1, -1, 16, 32, 10,
193 "2_OMB_17", 17, 361, 330,
194 "2_OMB_15", 15, 7, 330 ),
195 op_sliders(
"2_OMB_20", 9, 505, -1, -1, 20, 32, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
196 op_sliders(
"2_OMB_28", 704, 414, -1, -1, 28, 32, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
197 op_sliders(
"2_OMB_29", 704, 464, -1, -1, 29, 32, 10, NULL, -1, -1, -1, NULL, -1, -1, -1),
198 op_sliders(
"2_OMB_21", 704, 120, -1, -1, 21, 60, 5, NULL, -1, -1, -1, NULL, -1, -1, -1)
211 {
"OptionsMain",
"OptionsMain-M", -1, -1},
212 {
"OptionsMulti",
"OptionsMulti-M", -1, -1},
213 {
"OptionsDetail",
"OptionsDetail-M", -1, -1},
216 {
"2_OptionsMain",
"2_OptionsMain-M", -1, -1},
217 {
"2_OptionsMulti",
"2_OptionsMulti-M", -1, -1},
218 {
"2_OptionsDetail",
"2_OptionsDetail-M", -1, -1},
224 static int Options_menu_inited = 0;
225 static int Options_multi_inited = 0;
226 static int Options_detail_inited = 0;
232 static int Backup_skill_level;
233 static float Backup_sound_volume;
234 static float Backup_music_volume;
235 static float Backup_voice_volume;
237 static int Backup_briefing_voice_enabled;
238 static int Backup_use_mouse_to_fly;
240 static int Sound_volume_int;
241 static int Music_volume_int;
242 static int Voice_volume_int;
244 static int Voice_vol_handle = -1;
267 #define MAX_GAMMA_BITMAP_SIZE 17500
292 #define NUM_DETAIL_SLIDERS 8
304 #define DETAIL_DISTANCE_SLIDER 0
305 #define NEBULA_DETAIL_SLIDER 1
306 #define HARDWARE_TEXTURES_SLIDER 2
307 #define NUM_PARTICLES_SLIDER 3
308 #define SHARD_CULLING_SLIDER 4
309 #define SHIELD_DETAIL_SLIDER 5
310 #define NUM_STARS_SLIDER 6
311 #define LIGHTING_SLIDER 7
314 op_sliders(
"ODB_07", 21, 71, -1, -1, 7, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
315 op_sliders(
"ODB_08", 21, 119, -1, -1, 8, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
316 op_sliders(
"ODB_09", 21, 166, -1, -1, 9, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
317 op_sliders(
"ODB_10", 21, 212, -1, -1, 10, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
318 op_sliders(
"ODB_11", 21, 260, -1, -1, 11, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
319 op_sliders(
"ODB_12", 21, 307, -1, -1, 12, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
320 op_sliders(
"ODB_13", 21, 354, -1, -1, 13, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
321 op_sliders(
"ODB_19", 518, 212, -1, -1, 19, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
324 op_sliders(
"2_ODB_07", 34, 114, -1, -1, 7, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
325 op_sliders(
"2_ODB_08", 34, 190, -1, -1, 8, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
326 op_sliders(
"2_ODB_09", 34, 265, -1, -1, 9, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
327 op_sliders(
"2_ODB_10", 34, 340, -1, -1, 10, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
328 op_sliders(
"2_ODB_11", 34, 416, -1, -1, 11, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
329 op_sliders(
"2_ODB_12", 34, 492, -1, -1, 12, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
330 op_sliders(
"2_ODB_13", 34, 567, -1, -1, 13, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
331 op_sliders(
"2_ODB_19", 829, 340, -1, -1, 19, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
344 #define OPTIONS_NUM_TEXT 49
521 for (i=0; i<256; i++){
594 if ( !Options_multi_inited ) {
598 Options_multi_inited = 1;
604 if (!Options_detail_inited) {
608 Options_detail_inited = 1;
623 Options_bogus.
hide();
676 if ( Options_detail_inited ) {
685 char tmp_gamma_string[32];
889 if ( Options_multi_inited ) {
926 Assert(!Options_menu_inited);
1024 Options_menu_inited = 1;
1034 Assert(Options_menu_inited);
1040 if ((Backgrounds[
gr_screen.
res][i].mask >= 0) && (i != Tab)){
1045 if ( Voice_vol_handle >= 0 ) {
1047 Voice_vol_handle = -1;
1062 Options_menu_inited = 0;
1063 Options_multi_inited = 0;
1064 Options_detail_inited = 0;
1089 ushort clr_full_white = 0;
1090 ushort clr_half_white = 0;
1096 r = g = b = a = 255;
1100 r = g = b = (
ubyte)v;
1105 ushort *dptr = Gamma_data;
1109 *dptr = clr_half_white;
1111 if ((x & 1) == (y & 1)) {
1112 *dptr = clr_full_white;
1139 Assert(Options_menu_inited);
1319 Detail_original =
Detail;
1390 Detail_bogus.
hide();
1450 current_detail = -1;
1459 switch ( current_detail ) {
void create(UI_WINDOW *wnd, int _x, int _y, int _num_pos, char *bm_slider, int slider_mask, char *bm_left=NULL, int left_mask=-1, int left_x=-1, int left_y=-1, char *bm_right=NULL, int right_mask=-1, int right_x=-1, int right_y=-1, int _dot_width=19)
DOT_SLIDER class down here.
void set_highlight_action(void(*_user_function)(void))
int timestamp(int delta_ms)
int Briefing_voice_enabled
void audiostream_set_volume_all(float volume, int type)
void add_XSTR(char *string, int _xstr_id, int _x, int _y, UI_GADGET *_assoc, int _color_type, int _font_id=-1)
GLfloat GLfloat GLfloat GLfloat h
int snd_load(game_snd *gs, int allow_hardware_load)
int bmap_ids[MAX_BMAPS_PER_GADGET]
#define GR_NUM_RESOLUTIONS
#define NETINFO_FLAG_OBSERVER
__inline void gr_string(int x, int y, const char *string, int resize_mode=GR_RESIZE_FULL)
general failure sound for any event
void event_music_enable()
void base_create(UI_WINDOW *wnd, int _kind, int _x, int _y, int _w, int _h)
int snd_is_playing(int sig)
#define GR_MAYBE_CLEAR_RES(bmap)
voice clip played when volume slider changes
void gr_set_color_fast(color *dst)
void gr_set_bitmap(int bitmap_num, int alphablend_mode, int bitblt_mode, float alpha)
int bm_release(int handle, int clear_render_targets)
Frees both a bitmap's data and it's associated slot.
void BM_SELECT_TEX_FORMAT()
Sets bm_set_components and bm_get_components to reference texture format functions.
int current_detail_level()
void common_set_interface_palette(char *filename)
void draw_forced(int frame_num)
void os_config_write_string(const char *section, const char *name, const char *value)
typedef int(SCP_EXT_CALLCONV *SCPDLL_PFVERSION)(SCPDLL_Version *)
void set_mask_bmap(char *fname)
int set_bmaps(char *ani_filename, int nframes=3, int start_frame=1)
void common_free_interface_palette()
void detail_level_set(int level)
GLdouble GLdouble GLdouble r
void weapon_pause_sounds()
void(* bm_set_components)(ubyte *pixel, ubyte *r, ubyte *g, ubyte *b, ubyte *a)
Functional pointer that references any of the bm_set_components functions.
float Master_sound_volume
GLboolean GLboolean GLboolean GLboolean a
Switching to a new screen, but not commit.
sprintf(buf,"(%f,%f,%f)", v3->xyz.x, v3->xyz.y, v3->xyz.z)
void main_hall_reset_ambient_vol()
int use_hack_to_get_around_stupid_problem_flag
bool save_player(player *_p=NULL)
#define MAX_BMAPS_PER_GADGET
GLint GLint GLint GLint GLint x
SCP_vector< game_snd > Snds_iface
const char * XSTR(const char *str, int index)
int bm_create(int bpp, int w, int h, void *data, int flags)
user_click (mouse selects a control)
void set_hotkey(int keycode)
GLuint const GLchar * name
void weapon_unpause_sounds()
int bm_load(const char *real_filename)
Loads a bitmap so we can draw with it later.
GLboolean GLboolean GLboolean b
void event_music_set_volume_all(float volume)
typedef float(SCP_EXT_CALLCONV *SCPTRACKIR_PFFLOATVOID)()
void link_hotspot(int num)
void create(UI_WINDOW *wnd, char *_text, int _x, int _y, int _w, int _h, int do_repeat=0, int ignore_focus=0)
press briefing, ship selection or weapons bar (top-left)
#define UI_XSTR_COLOR_PINK
void create(int _x, int _y, int _w, int _h, int _flags, int _f_id=-1)
void gr_get_string_size(int *w, int *h, const char *text, int len=9999)
void common_play_highlight_sound()
float Master_event_music_volume
const char * Skill_level_names(int skill_level, int translate=1)
#define timestamp_elapsed(stamp)
#define SND_PRIORITY_SINGLE_INSTANCE
void game_feature_disabled_popup()
void event_music_level_close()
void gr_bitmap(int _x, int _y, int resize_mode)
#define UI_XSTR_COLOR_GREEN
void neb2_set_detail_level(int level)
void gamesnd_play_iface(int n)
int process(int key_in=-1, int process_mouse=1)
void _cdecl gr_printf_menu(int x, int y, const char *format,...)
void gameseq_post_event(int event)
float Master_voice_volume
void BM_SELECT_SCREEN_FORMAT()
Sets bm_set_components and bm_get_components to reference screen format functions.
int snd_play_raw(int soundnum, float pan, float vol_scale, int priority)