1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//! Types related to the main configuration file (`settings.ron`).

use serde::{Deserialize, Serialize};

/// Describes the available fields of `settings.ron`.
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct GameConfig {
    /// The speed of the player when they're walking, in pixels/second.
    pub player_walking_speed: f32,
    /// The speed of the player when they're running, in pixels/second.
    pub player_running_speed: f32,
    /// The delay between letters appearing within a text box, in
    /// characters/second. This can be less than the interval between frames:
    /// that results in multiple characters appearing per frame.
    pub text_delay: f32,
    /// The duration of fade in/out animations, in seconds.
    pub fade_duration: f32,
    /// The starting map of the player.
    pub player_starting_map: String,
    /// The starting position of the player, in Map Coordinates.
    pub player_starting_position: (u32, u32),
    /// Decides whether background music should be played.
    pub play_bgm: bool,
    /// Decides whether sound effects should be played.
    pub play_sfx: bool,
    /// Decides whether the FPS should be printed.
    pub show_fps: bool,
}