50 m_renderbackend(
"SDL"),
51 m_sdlremovefakealpha(false),
52 m_oglcompressimages(false),
53 m_ogluseframebuffer(true),
57 m_windowtitle(
"FIFE"),
59 m_defaultfontpath(
"fonts/FreeSans.ttf"),
61 m_defaultfontglyphs(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\\\""),
62 m_iscolorkeyenabled(false),
64 m_isframelimit(false),
66 m_mousesensitivity(0.0),
67 m_mouseacceleration(false) {
72 #if defined( __unix__ )
74 #elif defined( WIN32 )
76 #elif defined( __APPLE_CC__ )
89 std::vector<uint8_t>::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel);
96 <<
" Tried to set screen bpp to an unsupporded value of " << bitsperpixel <<
97 ". Setting bpp to use the default value of 0 (the current screen bpp)");
103 std::vector<uint8_t> tmp;
114 <<
" Tried to set initial volume to an unsupporded value of " << volume <<
115 ". Setting volume to the default value of 5 (minumum is 0, maximum is 10)");
130 std::vector<std::string>::iterator i = std::find(pv.begin(), pv.end(), renderbackend);
136 << renderbackend <<
" is not a valid render backend " <<
137 ". Setting the render backend to the default value of \"SDL\".");
143 std::vector<std::string> tmp;
144 tmp.push_back(
"SDL");
145 tmp.push_back(
"OpenGL");
146 tmp.push_back(
"OpenGLe");
227 << lighting <<
" is not a valid lighting model." <<
228 ". Setting the lighting model to the default value of 0 (off)");
#define FL_WARN(logger, msg)
void setDefaultFontSize(uint16_t defaultfontsize)
Sets size for default font.
float getMaxVolume() const
Gets maximum volume that can be set.
bool isColorKeyEnabled() const
Gets whether the colorkey feature is in use.
const float MAXIMUM_VOLUME
~EngineSettings()
Destructor.
Helper class to create log strings out from separate parts Usage: LMsg("some text") << variable << "...
void setGLUseFramebuffer(bool ogluseframebuffer)
Sets if OpenGL renderbackend should use FramebufferObject (when available)
void setFrameLimitEnabled(bool limited)
Sets whether to use the frame limiter.
void setInitialVolume(float volume)
Sets initial engine sound volume.
void setSDLRemoveFakeAlpha(bool sdlremovefakealpha)
Sets if fake alpha is removed in SDL renderbackend.
void setDefaultFontGlyphs(const std::string &defaultfontglyphs)
Sets glyphs for default font.
bool m_sdlremovefakealpha
EngineSettings()
Constructor.
void setMouseSensitivity(float sens)
Sets mouse sensitivity.
static Logger _log(LM_AUDIO)
bool isFrameLimitEnabled() const
Gets whether the frame limiter is in use.
std::string m_defaultfontglyphs
void setColorKeyEnabled(bool colorkeyenable)
Sets whether to use the colorkey feature.
const SDL_Color & getColorKey() const
Gets the global colorkey setting.
const std::string & getVideoDriver() const
uint16_t m_defaultfontsize
void setGLCompressImages(bool oglcompressimages)
Sets if images are compress by video driver in OpenGL renderbackend.
void setWindowTitle(const std::string &title)
Sets the title of the window.
float getMouseSensitivity() const
Gets mouse sensitivity.
void setDefaultFontPath(const std::string &defaultfontpath)
Sets path for default font.
std::string m_defaultfontpath
void setScreenHeight(uint16_t screenheight)
Sets screen height (pixels)
void setFrameLimit(uint16_t framelimit)
Sets the frame limit.
void setRenderBackend(const std::string &renderbackend)
Sets name for renderbackend.
void setScreenWidth(uint16_t screenwidth)
Sets screen width (pixels)
void setColorKey(uint8_t r, uint8_t g, uint8_t b)
Sets the global colorkey to use for images.
std::vector< uint8_t > getPossibleBitsPerPixel() const
Gets all possible bits per pixel values.
bool isMouseAccelerationEnabled() const
Returns if mouse acceleration is enabled or not.
std::string m_windowtitle
uint16_t getFrameLimit() const
Gets the frame limit.
void setGLUseNPOT(bool oglusenpot)
Sets if OpenGL renderbackend should use NPOT Textures (when available)
void setBitsPerPixel(uint8_t bitsperpixel)
Sets bits per pixel.
void setMouseAccelerationEnabled(bool acceleration)
Sets mouse acceleration if mouse acceleration is enabled, then the mouse sensitivity is used as speed...
void setLightingModel(uint32_t lighting)
Sets the light model.
void setWindowIcon(const std::string &icon)
Sets the icon that appears in the window title bar.
void setVideoDriver(const std::string &driver)
std::string m_videodriver
std::string m_renderbackend
std::vector< std::string > getPossibleRenderBackends()
Gets all possible renderbackend names.