SQCSimulator2023/SQCSim2021/settings.h

70 lines
1.2 KiB
C
Raw Permalink Normal View History

#ifndef SETTINGS_H__
#define SETTINGS_H__
2023-11-16 20:47:20 -05:00
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <map>
#include "define.h"
#include "audio.h"
2023-11-16 20:47:20 -05:00
class Settings {
2023-11-16 20:47:20 -05:00
public:
Settings(Audio& audio);
2023-11-16 20:47:20 -05:00
void SaveFile(const std::string& filename);
void LoadFile(const std::string& filename);
2023-11-16 20:47:20 -05:00
// Audio
float GetMainVolume() const;
void SetMainVolume(float volume);
2023-11-16 20:47:20 -05:00
void GetMusicVolume();
void SetMusicVolume(float volume);
2023-11-16 20:47:20 -05:00
float GetSfxVolume() const;
void SetSfxVolume(float volume);
2023-11-16 20:47:20 -05:00
// Graphic
float GetBrightness() const;
void SetBrightness(float brightness);
float GetContrast() const;
void SetContrast(float contrast);
bool GetFullscreen() const;
void SetFullscreen(bool fullscreen);
const Resolution& GetResolution() const;
void SetResolution(const Resolution& resolution);
2023-11-16 20:47:20 -05:00
// Gameplay
float GetMouseSensitivity() const;
void SetMouseSensitivity(float sensitivity);
void ApplyResolution(Resolution resolution);
private:
Audio& m_audio;
2023-11-16 20:47:20 -05:00
// Audio
float m_mainVolume;
float m_musicVolume;
float m_sfxVolume;
// Graphic
Resolution m_resolution;
2023-11-16 20:47:20 -05:00
bool m_fullscreen;
int m_rezWidth;
int m_rezHeight;
float m_brightness;
float m_contrast;
2023-11-16 20:47:20 -05:00
// Gameplay
float m_mouseSensitivity;
};
2023-11-16 20:47:20 -05:00
#endif // PARAMETERS_H