FS2_Open
Open source remastering of the Freespace 2 engine
optionsmenu.cpp File Reference
#include "bmpman/bmpman.h"
#include "freespace2/freespace.h"
#include "gamesequence/gamesequence.h"
#include "gamesnd/eventmusic.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/alphacolors.h"
#include "io/joy.h"
#include "io/key.h"
#include "io/mouse.h"
#include "io/timer.h"
#include "menuui/mainhallmenu.h"
#include "menuui/optionsmenu.h"
#include "menuui/optionsmenumulti.h"
#include "mission/missionbriefcommon.h"
#include "missionui/missionscreencommon.h"
#include "nebula/neb.h"
#include "network/multi.h"
#include "osapi/osregistry.h"
#include "pilotfile/pilotfile.h"
#include "popup/popup.h"
#include "popup/popupdead.h"
#include "sound/audiostr.h"
#include "weapon/weapon.h"

Go to the source code of this file.

Classes

struct  options_buttons
 

Macros

#define OPTIONS_NOTIFY_TIME   3500
 
#define OPTIONS_NOTIFY_Y   450
 
#define NUM_BUTTONS   24
 
#define NUM_ANIS   4
 
#define NUM_TABS   3
 
#define NUM_COMMONS   10
 
#define TABLESS   999
 
#define OPTIONS_TAB   0
 
#define MULTIPLAYER_TAB   1
 
#define DETAIL_LEVELS_TAB   2
 
#define ABORT_GAME_BUTTON   3
 
#define CONTROL_CONFIG_BUTTON   4
 
#define HUD_CONFIG_BUTTON   5
 
#define ACCEPT_BUTTON   6
 
#define BRIEF_VOICE_OFF   7
 
#define BRIEF_VOICE_ON   8
 
#define MOUSE_OFF   9
 
#define MOUSE_ON   10
 
#define GAMMA_DOWN   11
 
#define GAMMA_UP   12
 
#define PLANETS_ON   13
 
#define PLANETS_OFF   14
 
#define HUD_TARGETVIEW_RENDER_ON   15
 
#define HUD_TARGETVIEW_RENDER_OFF   16
 
#define WEAPON_EXTRAS_ON   17
 
#define WEAPON_EXTRAS_OFF   18
 
#define LOW_DETAIL_N   19
 
#define MEDIUM_DETAIL_N   20
 
#define HIGH_DETAIL_N   21
 
#define VERY_HIGH_DETAIL_N   22
 
#define CUSTOM_DETAIL_N   23
 
#define REPEAT   (1<<0)
 
#define NO_MOUSE_OVER_SOUND   (1<<1)
 
#define OPTIONS_X_COORD   0
 
#define OPTIONS_Y_COORD   1
 
#define OPTIONS_W_COORD   2
 
#define OPTIONS_H_COORD   3
 
#define NUM_OPTIONS_SLIDERS   7
 
#define OPT_SOUND_VOLUME_SLIDER   0
 
#define OPT_MUSIC_VOLUME_SLIDER   1
 
#define OPT_VOICE_VOLUME_SLIDER   2
 
#define OPT_MOUSE_SENS_SLIDER   3
 
#define OPT_JOY_SENS_SLIDER   4
 
#define OPT_JOY_DEADZONE_SLIDER   5
 
#define OPT_SKILL_SLIDER   6
 
#define MAX_GAMMA_BITMAP_SIZE   17500
 
#define NUM_DETAIL_SLIDERS   8
 
#define DETAIL_DISTANCE_SLIDER   0
 
#define NEBULA_DETAIL_SLIDER   1
 
#define HARDWARE_TEXTURES_SLIDER   2
 
#define NUM_PARTICLES_SLIDER   3
 
#define SHARD_CULLING_SLIDER   4
 
#define SHIELD_DETAIL_SLIDER   5
 
#define NUM_STARS_SLIDER   6
 
#define LIGHTING_SLIDER   7
 
#define OPTIONS_NUM_TEXT   49
 

Functions

void options_accept ()
 
void options_force_button_frame (int n, int frame_num)
 
void options_add_notify (const char *str)
 
void options_notify_do_frame ()
 
void options_detail_init ()
 
void options_detail_hide_stuff ()
 
void options_detail_unhide_stuff ()
 
void options_detail_do_frame ()
 
void options_detail_set_level (int level)
 
void options_play_voice_clip ()
 
void options_tab_setup (int set_palette)
 
void options_tab_close ()
 
void options_change_tab (int n)
 
void set_sound_volume ()
 
void set_music_volume ()
 
void set_voice_volume ()
 
void options_cancel_exit ()
 
void options_change_gamma (float delta)
 
void options_button_pressed (int n)
 
void options_sliders_update ()
 
void options_load_background_and_mask (int tab)
 
void options_menu_init ()
 
void options_menu_close ()
 
void draw_gamma_box ()
 
void options_menu_do_frame (float frametime)
 
void options_detail_synch_sliders ()
 
void options_detail_sliders_update ()
 

Variables

op_sliders Options_sliders [GR_NUM_RESOLUTIONS][NUM_OPTIONS_SLIDERS]
 
UI_GADGET Options_bogus
 
int Options_notify_stamp = -1
 
char Options_notify_string [200]
 
float FreeSpace_gamma
 
int Options_gamma_coords [GR_NUM_RESOLUTIONS][4]
 
int Options_gamma_num_coords [GR_NUM_RESOLUTIONS][4]
 
int Options_skills_text_coords [GR_NUM_RESOLUTIONS][4]
 
op_sliders Detail_sliders [GR_NUM_RESOLUTIONS][NUM_DETAIL_SLIDERS]
 
int Detail_slider_pos [NUM_DETAIL_SLIDERS]
 
detail_levels Detail_original
 
UI_GADGET Detail_bogus
 
UI_XSTR Options_text [GR_NUM_RESOLUTIONS][OPTIONS_NUM_TEXT]
 
int Gamma_last_set = -1
 
int Gamma_colors_inited = 0
 

Macro Definition Documentation

#define ABORT_GAME_BUTTON   3

Definition at line 53 of file optionsmenu.cpp.

#define ACCEPT_BUTTON   6

Definition at line 56 of file optionsmenu.cpp.

#define BRIEF_VOICE_OFF   7

Definition at line 58 of file optionsmenu.cpp.

#define BRIEF_VOICE_ON   8

Definition at line 59 of file optionsmenu.cpp.

#define CONTROL_CONFIG_BUTTON   4

Definition at line 54 of file optionsmenu.cpp.

#define CUSTOM_DETAIL_N   23

Definition at line 77 of file optionsmenu.cpp.

#define DETAIL_DISTANCE_SLIDER   0

Definition at line 304 of file optionsmenu.cpp.

#define DETAIL_LEVELS_TAB   2

Definition at line 52 of file optionsmenu.cpp.

#define GAMMA_DOWN   11

Definition at line 62 of file optionsmenu.cpp.

#define GAMMA_UP   12

Definition at line 63 of file optionsmenu.cpp.

#define HARDWARE_TEXTURES_SLIDER   2

Definition at line 306 of file optionsmenu.cpp.

#define HIGH_DETAIL_N   21

Definition at line 75 of file optionsmenu.cpp.

#define HUD_CONFIG_BUTTON   5

Definition at line 55 of file optionsmenu.cpp.

#define HUD_TARGETVIEW_RENDER_OFF   16

Definition at line 69 of file optionsmenu.cpp.

#define HUD_TARGETVIEW_RENDER_ON   15

Definition at line 68 of file optionsmenu.cpp.

#define LIGHTING_SLIDER   7

Definition at line 311 of file optionsmenu.cpp.

#define LOW_DETAIL_N   19

Definition at line 73 of file optionsmenu.cpp.

#define MAX_GAMMA_BITMAP_SIZE   17500

Definition at line 267 of file optionsmenu.cpp.

#define MEDIUM_DETAIL_N   20

Definition at line 74 of file optionsmenu.cpp.

#define MOUSE_OFF   9

Definition at line 60 of file optionsmenu.cpp.

#define MOUSE_ON   10

Definition at line 61 of file optionsmenu.cpp.

#define MULTIPLAYER_TAB   1

Definition at line 51 of file optionsmenu.cpp.

#define NEBULA_DETAIL_SLIDER   1

Definition at line 305 of file optionsmenu.cpp.

#define NO_MOUSE_OVER_SOUND   (1<<1)

Definition at line 80 of file optionsmenu.cpp.

#define NUM_ANIS   4

Definition at line 44 of file optionsmenu.cpp.

#define NUM_BUTTONS   24

Definition at line 43 of file optionsmenu.cpp.

#define NUM_COMMONS   10

Definition at line 46 of file optionsmenu.cpp.

#define NUM_DETAIL_SLIDERS   8

Definition at line 292 of file optionsmenu.cpp.

#define NUM_OPTIONS_SLIDERS   7

Definition at line 160 of file optionsmenu.cpp.

#define NUM_PARTICLES_SLIDER   3

Definition at line 307 of file optionsmenu.cpp.

#define NUM_STARS_SLIDER   6

Definition at line 310 of file optionsmenu.cpp.

#define NUM_TABS   3

Definition at line 45 of file optionsmenu.cpp.

#define OPT_JOY_DEADZONE_SLIDER   5

Definition at line 166 of file optionsmenu.cpp.

#define OPT_JOY_SENS_SLIDER   4

Definition at line 165 of file optionsmenu.cpp.

#define OPT_MOUSE_SENS_SLIDER   3

Definition at line 164 of file optionsmenu.cpp.

#define OPT_MUSIC_VOLUME_SLIDER   1

Definition at line 162 of file optionsmenu.cpp.

#define OPT_SKILL_SLIDER   6

Definition at line 167 of file optionsmenu.cpp.

#define OPT_SOUND_VOLUME_SLIDER   0

Definition at line 161 of file optionsmenu.cpp.

#define OPT_VOICE_VOLUME_SLIDER   2

Definition at line 163 of file optionsmenu.cpp.

#define OPTIONS_H_COORD   3

Definition at line 86 of file optionsmenu.cpp.

#define OPTIONS_NOTIFY_TIME   3500

Definition at line 40 of file optionsmenu.cpp.

#define OPTIONS_NOTIFY_Y   450

Definition at line 41 of file optionsmenu.cpp.

#define OPTIONS_NUM_TEXT   49

Definition at line 344 of file optionsmenu.cpp.

#define OPTIONS_TAB   0

Definition at line 50 of file optionsmenu.cpp.

#define OPTIONS_W_COORD   2

Definition at line 85 of file optionsmenu.cpp.

#define OPTIONS_X_COORD   0

Definition at line 83 of file optionsmenu.cpp.

#define OPTIONS_Y_COORD   1

Definition at line 84 of file optionsmenu.cpp.

#define PLANETS_OFF   14

Definition at line 67 of file optionsmenu.cpp.

#define PLANETS_ON   13

Definition at line 66 of file optionsmenu.cpp.

#define REPEAT   (1<<0)

Definition at line 79 of file optionsmenu.cpp.

#define SHARD_CULLING_SLIDER   4

Definition at line 308 of file optionsmenu.cpp.

#define SHIELD_DETAIL_SLIDER   5

Definition at line 309 of file optionsmenu.cpp.

#define TABLESS   999

Definition at line 48 of file optionsmenu.cpp.

#define VERY_HIGH_DETAIL_N   22

Definition at line 76 of file optionsmenu.cpp.

#define WEAPON_EXTRAS_OFF   18

Definition at line 71 of file optionsmenu.cpp.

#define WEAPON_EXTRAS_ON   17

Definition at line 70 of file optionsmenu.cpp.

Function Documentation

void draw_gamma_box ( )

Definition at line 1070 of file optionsmenu.cpp.

void options_accept ( )

Definition at line 886 of file optionsmenu.cpp.

void options_add_notify ( const char *  str)

Definition at line 478 of file optionsmenu.cpp.

void options_button_pressed ( int  n)

Definition at line 706 of file optionsmenu.cpp.

void options_cancel_exit ( )

Definition at line 660 of file optionsmenu.cpp.

void options_change_gamma ( float  delta)

Definition at line 683 of file optionsmenu.cpp.

void options_change_tab ( int  n)

Definition at line 583 of file optionsmenu.cpp.

void options_detail_do_frame ( )

Definition at line 1414 of file optionsmenu.cpp.

void options_detail_hide_stuff ( )

Definition at line 1380 of file optionsmenu.cpp.

void options_detail_init ( )

Definition at line 1314 of file optionsmenu.cpp.

void options_detail_set_level ( int  level)

Definition at line 1479 of file optionsmenu.cpp.

void options_detail_sliders_update ( )

Definition at line 1354 of file optionsmenu.cpp.

void options_detail_synch_sliders ( )

Definition at line 1302 of file optionsmenu.cpp.

void options_detail_unhide_stuff ( )

Definition at line 1393 of file optionsmenu.cpp.

void options_force_button_frame ( int  n,
int  frame_num 
)

Definition at line 1406 of file optionsmenu.cpp.

void options_load_background_and_mask ( int  tab)

Definition at line 911 of file optionsmenu.cpp.

void options_menu_close ( )

Definition at line 1030 of file optionsmenu.cpp.

void options_menu_do_frame ( float  frametime)

Definition at line 1135 of file optionsmenu.cpp.

void options_menu_init ( )

Definition at line 921 of file optionsmenu.cpp.

void options_notify_do_frame ( )

Definition at line 484 of file optionsmenu.cpp.

void options_play_voice_clip ( )

Definition at line 465 of file optionsmenu.cpp.

void options_sliders_update ( )

Definition at line 835 of file optionsmenu.cpp.

void options_tab_close ( )

Definition at line 570 of file optionsmenu.cpp.

void options_tab_setup ( int  set_palette)

Definition at line 510 of file optionsmenu.cpp.

void set_music_volume ( )

Definition at line 650 of file optionsmenu.cpp.

void set_sound_volume ( )

Definition at line 645 of file optionsmenu.cpp.

void set_voice_volume ( )

Definition at line 655 of file optionsmenu.cpp.

Variable Documentation

Definition at line 205 of file optionsmenu.cpp.

UI_GADGET Detail_bogus

Definition at line 336 of file optionsmenu.cpp.

detail_levels Detail_original

Definition at line 335 of file optionsmenu.cpp.

int Detail_slider_pos[NUM_DETAIL_SLIDERS]

Definition at line 334 of file optionsmenu.cpp.

Initial value:
= {
{
op_sliders("ODB_07", 21, 71, -1, -1, 7, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_08", 21, 119, -1, -1, 8, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_09", 21, 166, -1, -1, 9, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_10", 21, 212, -1, -1, 10, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_11", 21, 260, -1, -1, 11, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_12", 21, 307, -1, -1, 12, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_13", 21, 354, -1, -1, 13, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("ODB_19", 518, 212, -1, -1, 19, 20, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
},
{
op_sliders("2_ODB_07", 34, 114, -1, -1, 7, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_08", 34, 190, -1, -1, 8, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_09", 34, 265, -1, -1, 9, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_10", 34, 340, -1, -1, 10, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_11", 34, 416, -1, -1, 11, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_12", 34, 492, -1, -1, 12, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_13", 34, 567, -1, -1, 13, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
op_sliders("2_ODB_19", 829, 340, -1, -1, 19, 32, 5, NULL, -1, -1, -1, NULL, -1, -1, -1),
}
}

Definition at line 312 of file optionsmenu.cpp.

char* filename

Definition at line 203 of file optionsmenu.cpp.

float FreeSpace_gamma

Definition at line 191 of file fredstubs.cpp.

int Gamma_colors_inited = 0

Definition at line 919 of file optionsmenu.cpp.

int Gamma_last_set = -1

Definition at line 918 of file optionsmenu.cpp.

Definition at line 206 of file optionsmenu.cpp.

char* mask_filename

Definition at line 204 of file optionsmenu.cpp.

UI_GADGET Options_bogus

Definition at line 230 of file optionsmenu.cpp.

int Options_gamma_coords[GR_NUM_RESOLUTIONS][4]
Initial value:
= {
{
435, 179, 195, 28
},
{
692, 287, 308, 44
}
}

Definition at line 258 of file optionsmenu.cpp.

int Options_gamma_num_coords[GR_NUM_RESOLUTIONS][4]
Initial value:
= {
{
489, 159, 65, 17
},
{
779, 254, 65, 17
}
}

Definition at line 269 of file optionsmenu.cpp.

int Options_notify_stamp = -1

Definition at line 245 of file optionsmenu.cpp.

char Options_notify_string[200]

Definition at line 246 of file optionsmenu.cpp.

int Options_skills_text_coords[GR_NUM_RESOLUTIONS][4]
Initial value:
= {
{
468, 104, 155, 10
},
{
750, 169, 246, 21
}
}

Definition at line 278 of file optionsmenu.cpp.

Definition at line 169 of file optionsmenu.cpp.

Definition at line 345 of file optionsmenu.cpp.