naev 0.10.4
conf.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#define CONF_FILE "conf.lua"
11/* Gameplay options */
12#define DOUBLETAP_SENSITIVITY_DEFAULT 250
13#define TIME_COMPRESSION_DEFAULT_MAX 5000.
14#define TIME_COMPRESSION_DEFAULT_MULT 200
15#define REDIRECT_FILE_DEFAULT 1
16#define SAVE_COMPRESSION_DEFAULT 1
17#define MOUSE_FLY_DEFAULT 1
18#define MOUSE_THRUST_DEFAULT 1
19#define MOUSE_DOUBLECLICK_TIME 0.5
20#define AUTONAV_RESET_DIST_DEFAULT 5000.
21#define AUTONAV_RESET_SHIELD_DEFAULT 1.
22#define MANUAL_ZOOM_DEFAULT 0
23#define ZOOM_FAR_DEFAULT 0.5
24#define ZOOM_NEAR_DEFAULT 1.0
25#define ZOOM_SPEED_DEFAULT 0.25
26#define MAP_OVERLAY_OPACITY_DEFAULT 0.3
27#define INPUT_MESSAGES_DEFAULT 5
28#define DIFFICULTY_DEFAULT NULL
29/* Video options */
30#define RESOLUTION_W_MIN 1280
31#define RESOLUTION_H_MIN 720
32#define RESOLUTION_W_DEFAULT RESOLUTION_W_MIN
33#define RESOLUTION_H_DEFAULT RESOLUTION_H_MIN
34#define FULLSCREEN_DEFAULT 0
35#define FULLSCREEN_MODESETTING 0
36#define FSAA_DEFAULT 1
37#define VSYNC_DEFAULT 0
38#define SCALE_FACTOR_DEFAULT 1.
39#define NEBULA_SCALE_FACTOR_DEFAULT 4.
40#define SHOW_FPS_DEFAULT 0
41#define FPS_MAX_DEFAULT 60
42#define SHOW_PAUSE_DEFAULT 1
43#define MINIMIZE_DEFAULT 1
44#define COLORBLIND_DEFAULT 0
45#define HEALTHBARS_DEFAULT 1
46#define BG_BRIGHTNESS_DEFAULT 0.5
47#define NEBU_NONUNIFORMITY_DEFAULT 1.
48#define GAMMA_CORRECTION_DEFAULT 1.
49#define BACKGROUND_FANCY_DEFAULT 0
50#define JUMP_BRIGHTNESS_DEFAULT 1.
51#define BIG_ICONS_DEFAULT 0
52#define FONT_SIZE_CONSOLE_DEFAULT 10
53#define FONT_SIZE_INTRO_DEFAULT 18
54#define FONT_SIZE_DEF_DEFAULT 12
55#define FONT_SIZE_SMALL_DEFAULT 11
56/* Audio options */
57#define USE_EFX_DEFAULT 1
58#define MUTE_SOUND_DEFAULT 0
59#define SOUND_VOLUME_DEFAULT 0.6
60#define MUSIC_VOLUME_DEFAULT 0.8
61#define ENGINE_VOLUME_DEFAULT 0.8
62/* Editor Options */
63#define DEV_SAVE_SYSTEM_DEFAULT "../dat/ssys/"
64#define DEV_SAVE_SPOB_DEFAULT "../dat/spob/"
65#define DEV_SAVE_MAP_DEFAULT "../dat/outfits/maps/"
66
72typedef struct PlayerConf_s {
73 int loaded;
75 /* ndata. */
76 char *ndata;
77 char *datapath;
79 /* Language. */
80 char *language;
82 /* OpenGL properties. */
83 int fsaa;
84 int vsync;
86 /* Video options. */
87 int width;
88 int height;
90 double scalefactor;
91 double nebu_scale;
105 /* Sound. */
106 int al_efx;
108 double sound;
109 double music;
110 double engine_vol;
112 /* FPS. */
116 /* Pause. */
119 /* Joystick. */
123 /* GUI. */
129 /* Keyrepeat. */
130 unsigned int repeat_delay;
131 unsigned int repeat_freq;
133 /* Zoom. */
135 double zoom_far;
136 double zoom_near;
137 double zoom_speed;
138 double zoom_stars;
140 /* Font sizes. */
146 /* Misc. */
152 unsigned int doubletap_sens;
162 int nosave;
165 time_t last_played;
167 /* Debugging. */
170 /* Editor. */
175extern PlayerConf_t conf;
177/*
178 * loading
179 */
180void conf_setDefaults (void);
181void conf_setGameplayDefaults (void);
182void conf_setAudioDefaults (void);
183void conf_setVideoDefaults (void);
184void conf_loadConfigPath( void );
185int conf_loadConfig( const char* file );
186void conf_parseCLI( int argc, char** argv );
187void conf_cleanup (void);
188
189/*
190 * Some handling.
191 */
192void conf_copy( PlayerConf_t *dest, const PlayerConf_t *src );
193void conf_free( PlayerConf_t *config );
194
195/*
196 * saving
197 */
198int conf_saveConfig( const char* file );
Struct containing player options.
Definition: conf.h:72
double jump_brightness
Definition: conf.h:101
int lua_repl
Definition: conf.h:161
int always_radar
Definition: conf.h:127
int nosound
Definition: conf.h:107
double engine_vol
Definition: conf.h:110
double scalefactor
Definition: conf.h:90
double zoom_stars
Definition: conf.h:138
int healthbars
Definition: conf.h:98
char * dev_save_map
Definition: conf.h:172
int font_size_def
Definition: conf.h:143
double autonav_reset_shield
Definition: conf.h:157
char * datapath
Definition: conf.h:77
int fullscreen
Definition: conf.h:92
int vsync
Definition: conf.h:84
double compression_velocity
Definition: conf.h:148
int colorblind
Definition: conf.h:97
int modesetting
Definition: conf.h:93
int fps_max
Definition: conf.h:114
int width
Definition: conf.h:87
time_t last_played
Definition: conf.h:165
double zoom_speed
Definition: conf.h:137
int minimize
Definition: conf.h:96
int font_size_small
Definition: conf.h:144
char * language
Definition: conf.h:80
int devmode
Definition: conf.h:158
int pause_show
Definition: conf.h:117
int height
Definition: conf.h:88
int loaded
Definition: conf.h:73
int mouse_thrust
Definition: conf.h:154
int notresizable
Definition: conf.h:94
int big_icons
Definition: conf.h:126
unsigned int repeat_freq
Definition: conf.h:131
double music
Definition: conf.h:109
double mouse_doubleclick
Definition: conf.h:155
char * ndata
Definition: conf.h:76
double autonav_reset_dist
Definition: conf.h:156
int devautosave
Definition: conf.h:159
int al_efx
Definition: conf.h:106
unsigned int repeat_delay
Definition: conf.h:130
char * difficulty
Definition: conf.h:147
double compression_mult
Definition: conf.h:149
int background_fancy
Definition: conf.h:103
int fps_show
Definition: conf.h:113
int mesg_visible
Definition: conf.h:124
double sound
Definition: conf.h:108
double zoom_far
Definition: conf.h:135
double gamma_correction
Definition: conf.h:102
int explicit_dim
Definition: conf.h:89
int nosave
Definition: conf.h:162
unsigned int doubletap_sens
Definition: conf.h:152
int lua_enet
Definition: conf.h:160
double bg_brightness
Definition: conf.h:99
int font_size_console
Definition: conf.h:141
int zoom_manual
Definition: conf.h:134
int save_compress
Definition: conf.h:151
int redirect_file
Definition: conf.h:150
double map_overlay_opacity
Definition: conf.h:125
double nebu_scale
Definition: conf.h:91
char * dev_save_spob
Definition: conf.h:173
int mouse_fly
Definition: conf.h:153
double nebu_nonuniformity
Definition: conf.h:100
double zoom_near
Definition: conf.h:136
char * lastversion
Definition: conf.h:163
int translation_warning_seen
Definition: conf.h:164
int fsaa
Definition: conf.h:83
int fpu_except
Definition: conf.h:168
int borderless
Definition: conf.h:95
int font_size_intro
Definition: conf.h:142
int joystick_ind
Definition: conf.h:120
char * dev_save_sys
Definition: conf.h:171
char * joystick_nam
Definition: conf.h:121