53 m_initialvolume(MAXIMUM_VOLUME / 2),
54 m_renderbackend(
"SDL"),
55 m_sdlremovefakealpha(false),
56 m_oglcompressimages(false),
57 m_ogluseframebuffer(true),
59 m_oglMipmapping(false),
60 m_oglMonochrome(false),
62 m_oglDepthBuffer(false),
63 m_alphaTestValue(0.3),
66 m_windowtitle(
"FIFE"),
68 m_defaultfontpath(
"fonts/FreeSans.ttf"),
70 m_defaultfontglyphs(
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\\\""),
71 m_iscolorkeyenabled(false),
73 m_isframelimit(false),
75 m_mousesensitivity(0.0),
76 m_mouseacceleration(false),
77 m_nativeimagecursor(false),
78 m_joystickSupport(false) {
83 #if defined( __unix__ ) 85 #elif defined( WIN32 ) 87 #elif defined( __APPLE_CC__ ) 100 std::vector<uint8_t>::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel);
107 <<
" Tried to set screen bpp to an unsupporded value of " << bitsperpixel <<
108 ". Setting bpp to use the default value of 0 (the current screen bpp)");
114 std::vector<uint8_t> tmp;
125 <<
" Tried to set initial volume to an unsupporded value of " << volume <<
126 ". Setting volume to the default value of 5 (minumum is 0, maximum is 10)");
141 std::vector<std::string>::iterator i = std::find(pv.begin(), pv.end(), renderbackend);
147 << renderbackend <<
" is not a valid render backend " <<
148 ". Setting the render backend to the default value of \"SDL\".");
154 std::vector<std::string> tmp;
155 tmp.push_back(
"SDL");
156 tmp.push_back(
"OpenGL");
277 << lighting <<
" is not a valid lighting model." <<
278 ". 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.
const float MAXIMUM_VOLUME
bool isColorKeyEnabled() const
Gets whether the colorkey feature is in use.
uint16_t getFrameLimit() const
Gets the frame limit.
~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.
TextureFiltering m_oglTextureFilter
bool m_sdlremovefakealpha
EngineSettings()
Constructor.
void setMouseSensitivity(float sens)
Sets mouse sensitivity.
static Logger _log(LM_AUDIO)
void setGLUseMonochrome(bool monochrome)
Sets if OpenGL renderbackend should render only monochrome.
void setGLTextureFiltering(TextureFiltering filter)
Sets texture filtering method for OpenGL renderbackend.
std::string m_defaultfontglyphs
TextureFiltering getGLTextureFiltering() const
Gets current texture filter which uses OpenGL.
void setColorKeyEnabled(bool colorkeyenable)
Sets whether to use the colorkey feature.
uint16_t m_defaultfontsize
void setGLCompressImages(bool oglcompressimages)
Sets if images are compress by video driver in OpenGL renderbackend.
void setNativeImageCursorEnabled(bool nativeimagecursor)
Enables or disables native image cursor.
void setWindowTitle(const std::string &title)
Sets the title of the window.
void setDefaultFontPath(const std::string &defaultfontpath)
Sets path for default font.
float getGLAlphaTestValue() const
Gets current alpha test value which uses OpenGL.
void setGLUseDepthBuffer(bool buffer)
Sets if OpenGL renderbackend should use depth buffer.
void setGLUseMipmapping(bool mipmapping)
Sets if OpenGL renderbackend should use mipmapping.
std::string m_defaultfontpath
bool isFrameLimitEnabled() const
Gets whether the frame limiter is in use.
void setScreenHeight(uint16_t screenheight)
Sets screen height (pixels)
const SDL_Color & getColorKey() const
Gets the global colorkey setting.
void setFrameLimit(uint16_t framelimit)
Sets the frame limit.
void setGLAlphaTestValue(float alpha)
Sets alpha test value for OpenGL renderbackend.
float getMouseSensitivity() const
Gets mouse sensitivity.
bool isGLUseDepthBuffer() const
Tells if OpenGL renderbackend should use depth buffer.
void setRenderBackend(const std::string &renderbackend)
Sets name for renderbackend.
void setJoystickSupport(bool support)
Enables or disables joystick and gamepad support.
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.
bool isMouseAccelerationEnabled() const
Returns if mouse acceleration is enabled or not.
std::string m_windowtitle
std::vector< uint8_t > getPossibleBitsPerPixel() const
Gets all possible bits per pixel values.
bool isNativeImageCursorEnabled() const
Returns whether cursors set to an image or an animation are drawn natively.
void setGLUseNPOT(bool oglusenpot)
Sets if OpenGL renderbackend should use NPOT Textures (when available)
void setBitsPerPixel(uint8_t bitsperpixel)
Sets bits per pixel.
const std::string & getVideoDriver() const
Gets the video driver.
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.
bool isJoystickSupport() const
Returns whether joystick and gamepad support is enabled or not.
void setVideoDriver(const std::string &driver)
Sets the video driver.
std::string m_videodriver
bool isGLUseMonochrome() const
Tells if OpenGL renderbackend should render only monochrome.
bool isGLUseMipmapping() const
Tells if OpenGL renderbackend should use mipmapping.
std::string m_renderbackend
std::vector< std::string > getPossibleRenderBackends()
Gets all possible renderbackend names.