Struct gta_vc_settings::GtaVcSettings
[−]
[src]
pub struct GtaVcSettings { pub total_sections: u32, pub controls: [u8; 352], pub strings: [u8; 51], pub unknown: u8, pub mouse_sensitivity: u32, pub mouse_invert_y: u8, pub steer_with_mouse: u8, pub sfx_volume: u8, pub music_volume: u8, pub mp3_volume_boost: u8, pub current_radio: u8, pub speakers_configuration: u8, pub audio_hardware: u8, pub dynamic_acoustic_mode: u8, pub brightness: u16, pub draw_distance: f32, pub subtitles: u8, pub widescreen: u8, pub frame_limiter: u8, pub video_mode: u8, pub skin_path: [u8; 256], pub standard_controls: u8, pub current_language: u8, pub hud_mode: u8, pub radar_mode: u8, pub map_legend: u8, }
Struct representing a settings file.
Fields
total_sections: u32
Defaults to 3
controls: [u8; 352]
Primary controls, Secondary controls, Tertiary controls and Quaternary controls.
strings: [u8; 51]
Some strings generated by the game.
unknown: u8
Unknown byte.
mouse_sensitivity: u32
Mouse sensitivity.
mouse_invert_y: u8
Invert mouse vertically. (0 = on, 1 = off)
steer_with_mouse: u8
Mouse controlled steering. (0 = on, 1 = off)
sfx_volume: u8
SFX volume. (1 = lowest setting, 65 = highest setting, 49 = default setting)
music_volume: u8
Music volume. (1 = lowest setting, 65 = highest setting, 49 = default setting)
mp3_volume_boost: u8
MP3 volume boost. (1 = lowest setting, 65 = highest setting, 0 = default setting)
current_radio: u8
Radio station. See http://www.gtamodding.com/wiki/List_of_radio_stations_(VC) for more information.
speakers_configuration: u8
Speakers configuration. (0 = 2 speakers, 1 = headphones, 2 = more than 2 speakers)
audio_hardware: u8
Audio hardware.
dynamic_acoustic_mode: u8
Dynamic acoustic modeling. (0 = off, 1 = on)
brightness: u16
Brightness. (6 = lowest setting, 384 = highest setting, 256 = default)
draw_distance: f32
Draw distance. (0.925 = lowest setting, 1.80 = highest setting, 1.20 = default setting)
subtitles: u8
Subtitles. (0 = off, 1 = on)
widescreen: u8
Wide screen. (0 = off, 1 = on)
frame_limiter: u8
Frame limiter. (0 = off, 1 = on)
video_mode: u8
Screen resolution.
skin_path: [u8; 256]
Skin name without file extension with null terminator (default skin = $$""\0)
standard_controls: u8
Controls. (0 = standard, 1 = classic)
current_language: u8
Language. (0 = English, 1 = French, 2 = German, 3 = Italian, 4 = Spanish)
hud_mode: u8
HUD mode. (0 = off, 1 = on)
radar_mode: u8
Radar mode. (0 = map & blips, 1 = blips only, 2 = off)
map_legend: u8
Map legend.
Methods
impl GtaVcSettings
[src]
fn new() -> GtaVcSettings
Creates a GtaVcSettings with default data.
Examples
use gta_vc_settings::GtaVcSettings; let settings = GtaVcSettings::new(); assert_eq!(settings.total_sections, 3);
fn read<P: AsRef<Path>>(&mut self, path: P) -> SettingsResult
Opens and reads a GTA: Vice City settings file and returns a GtaVcSettings with it's data.
Examples
use gta_vc_settings::GtaVcSettings; let mut settings = GtaVcSettings::new(); settings.read("./tests/gta_vc.set"); assert_eq!(settings.total_sections, 3);
fn write<P: AsRef<Path>>(&self, path: P) -> SettingsResult
Writes a GTA: Vice City settings file to the filesystem.
Examples
use gta_vc_settings::GtaVcSettings; let settings = GtaVcSettings::new(); settings.write("./ouput.set");