Documentation ¶
Overview ¶
Package d2config contains configuration management for OpenDiablo2
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the absolute path for the default config file location
func LocalConfigPath ¶
func LocalConfigPath() string
LocalConfigPath returns the absolute path to the directory of the OpenDiablo2 executable
Types ¶
type Configuration ¶
type Configuration struct { MpqLoadOrder []string MpqPath string TicksPerSecond int FpsCap int SfxVolume float64 BgmVolume float64 FullScreen bool RunInBackground bool VsyncEnabled bool Backend string // contains filtered or unexported fields }
Configuration defines the configuration for the engine, loaded from config.json
func DefaultConfig ¶
func DefaultConfig() *Configuration
DefaultConfig creates and returns a default configuration
func (*Configuration) Base ¶
func (c *Configuration) Base() string
Base returns the base component of the path
func (*Configuration) Dir ¶
func (c *Configuration) Dir() string
Dir returns the directory component of the path
func (*Configuration) Path ¶
func (c *Configuration) Path() string
Path returns the config file path
func (*Configuration) Save ¶
func (c *Configuration) Save() error
Save saves the configuration object to disk
func (*Configuration) SetPath ¶
func (c *Configuration) SetPath(p string)
SetPath sets where the config file is saved to (a full path)
Click to show internal directories.
Click to hide internal directories.