FIFE
|
This class defines the engine settings on engine init. More...
#include <enginesettings.h>
Public Member Functions | |
EngineSettings () | |
Constructor. More... | |
~EngineSettings () | |
Destructor. More... | |
void | setBitsPerPixel (uint8_t bitsperpixel) |
Sets bits per pixel. More... | |
uint8_t | getBitsPerPixel () const |
Gets currently set bits per pixel value. More... | |
std::vector< uint8_t > | getPossibleBitsPerPixel () const |
Gets all possible bits per pixel values. More... | |
void | setFullScreen (bool fullscreen) |
Sets fullscreen / windowed mode. More... | |
bool | isFullScreen () const |
True, if set to fullscreen. More... | |
void | setInitialVolume (float volume) |
Sets initial engine sound volume. More... | |
float | getInitialVolume () const |
Gets initial engine sound volume. More... | |
float | getMaxVolume () const |
Gets maximum volume that can be set. More... | |
void | setRenderBackend (const std::string &renderbackend) |
Sets name for renderbackend. More... | |
const std::string & | getRenderBackend () const |
Gets currently set renderbackend name. More... | |
std::string | getRenderBackend () |
Gets currently set renderbackend name. More... | |
std::vector< std::string > | getPossibleRenderBackends () |
Gets all possible renderbackend names. More... | |
void | setSDLRemoveFakeAlpha (bool sdlremovefakealpha) |
Sets if fake alpha is removed in SDL renderbackend. More... | |
bool | isSDLRemoveFakeAlpha () const |
Tells if fake alpha is removed in SDL renderbackend. More... | |
void | setGLCompressImages (bool oglcompressimages) |
Sets if images are compress by video driver in OpenGL renderbackend. More... | |
bool | isGLCompressImages () const |
Tells if images are compress by video driver in OpenGL renderbackend. More... | |
void | setGLUseFramebuffer (bool ogluseframebuffer) |
Sets if OpenGL renderbackend should use FramebufferObject (when available) More... | |
bool | isGLUseFramebuffer () const |
Tells if OpenGL renderbackend should use FramebufferObject. More... | |
void | setGLUseNPOT (bool oglusenpot) |
Sets if OpenGL renderbackend should use NPOT Textures (when available) More... | |
bool | isGLUseNPOT () const |
Tells if OpenGL renderbackend should use NPOT Textures. More... | |
void | setScreenWidth (uint16_t screenwidth) |
Sets screen width (pixels) More... | |
uint16_t | getScreenWidth () const |
Gets screen width (pixels) More... | |
void | setScreenHeight (uint16_t screenheight) |
Sets screen height (pixels) More... | |
uint16_t | getScreenHeight () const |
Gets screen height (pixels) More... | |
void | setDefaultFontPath (const std::string &defaultfontpath) |
Sets path for default font. More... | |
const std::string & | getDefaultFontPath () const |
Gets current path for default font. More... | |
std::string | getDefaultFontPath () |
Gets current path for default font. More... | |
void | setDefaultFontSize (uint16_t defaultfontsize) |
Sets size for default font. More... | |
uint16_t | getDefaultFontSize () const |
Gets size for default font. More... | |
void | setDefaultFontGlyphs (const std::string &defaultfontglyphs) |
Sets glyphs for default font. More... | |
const std::string & | getDefaultFontGlyphs () const |
Gets current glyphs for default font. More... | |
std::string | getDefaultFontGlyphs () |
Gets current glyphs for default font. More... | |
void | setWindowTitle (const std::string &title) |
Sets the title of the window. More... | |
const std::string & | getWindowTitle () const |
Gets the current window title. More... | |
std::string | getWindowTitle () |
Gets the current window title. More... | |
void | setWindowIcon (const std::string &icon) |
Sets the icon that appears in the window title bar. More... | |
const std::string & | getWindowIcon () const |
Gets the icon in the window title bar. More... | |
std::string | getWindowIcon () |
Gets the icon in the window title bar. More... | |
void | setColorKeyEnabled (bool colorkeyenable) |
Sets whether to use the colorkey feature. More... | |
bool | isColorKeyEnabled () const |
Gets whether the colorkey feature is in use. More... | |
void | setColorKey (uint8_t r, uint8_t g, uint8_t b) |
Sets the global colorkey to use for images. More... | |
const SDL_Color & | getColorKey () const |
Gets the global colorkey setting. More... | |
void | setVideoDriver (const std::string &driver) |
const std::string & | getVideoDriver () const |
void | setLightingModel (uint32_t lighting) |
Sets the light model. More... | |
uint32_t | getLightingModel () const |
Gets the currently set light model. More... | |
void | setFrameLimitEnabled (bool limited) |
Sets whether to use the frame limiter. More... | |
bool | isFrameLimitEnabled () const |
Gets whether the frame limiter is in use. More... | |
void | setFrameLimit (uint16_t framelimit) |
Sets the frame limit. More... | |
uint16_t | getFrameLimit () const |
Gets the frame limit. More... | |
void | setMouseSensitivity (float sens) |
Sets mouse sensitivity. More... | |
float | getMouseSensitivity () const |
Gets mouse sensitivity. More... | |
void | setMouseAccelerationEnabled (bool acceleration) |
Sets mouse acceleration if mouse acceleration is enabled, then the mouse sensitivity is used as speed max. More... | |
bool | isMouseAccelerationEnabled () const |
Returns if mouse acceleration is enabled or not. More... | |
Private Attributes | |
uint8_t | m_bitsperpixel |
bool | m_fullscreen |
float | m_initialvolume |
std::string | m_renderbackend |
bool | m_sdlremovefakealpha |
bool | m_oglcompressimages |
bool | m_ogluseframebuffer |
bool | m_oglusenpot |
uint16_t | m_screenwidth |
uint16_t | m_screenheight |
std::string | m_windowtitle |
std::string | m_windowicon |
std::string | m_defaultfontpath |
uint16_t | m_defaultfontsize |
std::string | m_defaultfontglyphs |
bool | m_iscolorkeyenabled |
SDL_Color | m_colorkey |
std::string | m_videodriver |
uint32_t | m_lighting |
bool | m_isframelimit |
uint16_t | m_framelimit |
float | m_mousesensitivity |
bool | m_mouseacceleration |
This class defines the engine settings on engine init.
Definition at line 42 of file enginesettings.h.
FIFE::EngineSettings::EngineSettings | ( | ) |
Constructor.
Definition at line 46 of file enginesettings.cpp.
References m_colorkey, and m_videodriver.
FIFE::EngineSettings::~EngineSettings | ( | ) |
Destructor.
Definition at line 84 of file enginesettings.cpp.
|
inline |
Gets currently set bits per pixel value.
Definition at line 59 of file enginesettings.h.
References m_bitsperpixel.
Referenced by FIFE::Engine::init().
const SDL_Color & FIFE::EngineSettings::getColorKey | ( | ) | const |
Gets the global colorkey setting.
Definition at line 208 of file enginesettings.cpp.
References m_colorkey.
Referenced by FIFE::Engine::init().
|
inline |
Gets current glyphs for default font.
Definition at line 207 of file enginesettings.h.
References m_defaultfontglyphs.
|
inline |
Gets current glyphs for default font.
Definition at line 213 of file enginesettings.h.
References m_defaultfontglyphs.
|
inline |
Gets current path for default font.
Definition at line 181 of file enginesettings.h.
References m_defaultfontpath.
|
inline |
Gets current path for default font.
Definition at line 187 of file enginesettings.h.
References m_defaultfontpath.
|
inline |
Gets size for default font.
Definition at line 197 of file enginesettings.h.
References m_defaultfontsize.
uint16_t FIFE::EngineSettings::getFrameLimit | ( | ) | const |
Gets the frame limit.
Definition at line 245 of file enginesettings.cpp.
References m_framelimit.
Referenced by FIFE::Engine::init().
|
inline |
Gets initial engine sound volume.
Definition at line 86 of file enginesettings.h.
References m_initialvolume.
Referenced by FIFE::Engine::init().
|
inline |
Gets the currently set light model.
Definition at line 275 of file enginesettings.h.
References m_lighting.
Referenced by FIFE::Engine::init().
float FIFE::EngineSettings::getMaxVolume | ( | ) | const |
Gets maximum volume that can be set.
Definition at line 124 of file enginesettings.cpp.
References FIFE::MAXIMUM_VOLUME.
Referenced by setInitialVolume().
float FIFE::EngineSettings::getMouseSensitivity | ( | ) | const |
Gets mouse sensitivity.
Definition at line 253 of file enginesettings.cpp.
References m_mousesensitivity.
Referenced by FIFE::Engine::init().
std::vector< uint8_t > FIFE::EngineSettings::getPossibleBitsPerPixel | ( | ) | const |
Gets all possible bits per pixel values.
Definition at line 102 of file enginesettings.cpp.
Referenced by setBitsPerPixel().
std::vector< std::string > FIFE::EngineSettings::getPossibleRenderBackends | ( | ) |
Gets all possible renderbackend names.
Definition at line 142 of file enginesettings.cpp.
Referenced by setRenderBackend().
|
inline |
Gets currently set renderbackend name.
Definition at line 101 of file enginesettings.h.
References m_renderbackend.
Referenced by FIFE::Engine::init().
|
inline |
Gets currently set renderbackend name.
Definition at line 107 of file enginesettings.h.
References m_renderbackend.
|
inline |
Gets screen height (pixels)
Definition at line 171 of file enginesettings.h.
References m_screenheight.
Referenced by FIFE::Engine::init().
|
inline |
Gets screen width (pixels)
Definition at line 161 of file enginesettings.h.
References m_screenwidth.
Referenced by FIFE::Engine::init().
const std::string & FIFE::EngineSettings::getVideoDriver | ( | ) | const |
Definition at line 217 of file enginesettings.cpp.
References m_videodriver.
Referenced by FIFE::Engine::init().
|
inline |
Gets the icon in the window title bar.
Definition at line 239 of file enginesettings.h.
References m_windowicon.
Referenced by FIFE::Engine::init().
|
inline |
Gets the icon in the window title bar.
Definition at line 245 of file enginesettings.h.
References m_windowicon.
|
inline |
Gets the current window title.
Definition at line 223 of file enginesettings.h.
References m_windowtitle.
Referenced by FIFE::Engine::init().
|
inline |
Gets the current window title.
Definition at line 229 of file enginesettings.h.
References m_windowtitle.
bool FIFE::EngineSettings::isColorKeyEnabled | ( | ) | const |
Gets whether the colorkey feature is in use.
Definition at line 198 of file enginesettings.cpp.
References m_iscolorkeyenabled.
Referenced by FIFE::Engine::init().
bool FIFE::EngineSettings::isFrameLimitEnabled | ( | ) | const |
Gets whether the frame limiter is in use.
Definition at line 237 of file enginesettings.cpp.
References m_isframelimit.
Referenced by FIFE::Engine::init().
|
inline |
True, if set to fullscreen.
False = windowed
Definition at line 75 of file enginesettings.h.
References m_fullscreen.
Referenced by FIFE::Engine::init().
|
inline |
Tells if images are compress by video driver in OpenGL renderbackend.
Definition at line 131 of file enginesettings.h.
References m_oglcompressimages.
Referenced by FIFE::Engine::init().
|
inline |
Tells if OpenGL renderbackend should use FramebufferObject.
Definition at line 141 of file enginesettings.h.
References m_ogluseframebuffer.
Referenced by FIFE::Engine::init().
|
inline |
Tells if OpenGL renderbackend should use NPOT Textures.
Definition at line 151 of file enginesettings.h.
References m_oglusenpot.
Referenced by FIFE::Engine::init().
bool FIFE::EngineSettings::isMouseAccelerationEnabled | ( | ) | const |
Returns if mouse acceleration is enabled or not.
Definition at line 261 of file enginesettings.cpp.
References m_mouseacceleration.
Referenced by FIFE::Engine::init().
|
inline |
Tells if fake alpha is removed in SDL renderbackend.
Definition at line 121 of file enginesettings.h.
References m_sdlremovefakealpha.
void FIFE::EngineSettings::setBitsPerPixel | ( | uint8_t | bitsperpixel | ) |
Sets bits per pixel.
Definition at line 87 of file enginesettings.cpp.
References FIFE::_log, FL_WARN, getPossibleBitsPerPixel(), and m_bitsperpixel.
void FIFE::EngineSettings::setColorKey | ( | uint8_t | r, |
uint8_t | g, | ||
uint8_t | b | ||
) |
Sets the global colorkey to use for images.
Definition at line 202 of file enginesettings.cpp.
References m_colorkey.
void FIFE::EngineSettings::setColorKeyEnabled | ( | bool | colorkeyenable | ) |
Sets whether to use the colorkey feature.
Definition at line 194 of file enginesettings.cpp.
References m_iscolorkeyenabled.
void FIFE::EngineSettings::setDefaultFontGlyphs | ( | const std::string & | defaultfontglyphs | ) |
Sets glyphs for default font.
Definition at line 182 of file enginesettings.cpp.
References m_defaultfontglyphs.
void FIFE::EngineSettings::setDefaultFontPath | ( | const std::string & | defaultfontpath | ) |
Sets path for default font.
Definition at line 174 of file enginesettings.cpp.
References m_defaultfontpath.
void FIFE::EngineSettings::setDefaultFontSize | ( | uint16_t | defaultfontsize | ) |
Sets size for default font.
Definition at line 178 of file enginesettings.cpp.
References m_defaultfontsize.
void FIFE::EngineSettings::setFrameLimit | ( | uint16_t | framelimit | ) |
void FIFE::EngineSettings::setFrameLimitEnabled | ( | bool | limited | ) |
Sets whether to use the frame limiter.
Definition at line 233 of file enginesettings.cpp.
References m_isframelimit.
|
inline |
Sets fullscreen / windowed mode.
Definition at line 69 of file enginesettings.h.
References m_fullscreen.
void FIFE::EngineSettings::setGLCompressImages | ( | bool | oglcompressimages | ) |
Sets if images are compress by video driver in OpenGL renderbackend.
Definition at line 154 of file enginesettings.cpp.
References m_oglcompressimages.
void FIFE::EngineSettings::setGLUseFramebuffer | ( | bool | ogluseframebuffer | ) |
Sets if OpenGL renderbackend should use FramebufferObject (when available)
Definition at line 158 of file enginesettings.cpp.
References m_ogluseframebuffer.
void FIFE::EngineSettings::setGLUseNPOT | ( | bool | oglusenpot | ) |
Sets if OpenGL renderbackend should use NPOT Textures (when available)
Definition at line 162 of file enginesettings.cpp.
References m_oglusenpot.
void FIFE::EngineSettings::setInitialVolume | ( | float | volume | ) |
Sets initial engine sound volume.
Definition at line 111 of file enginesettings.cpp.
References FIFE::_log, FL_WARN, getMaxVolume(), and m_initialvolume.
void FIFE::EngineSettings::setLightingModel | ( | uint32_t | lighting | ) |
Sets the light model.
Definition at line 220 of file enginesettings.cpp.
References FIFE::_log, FL_WARN, and m_lighting.
void FIFE::EngineSettings::setMouseAccelerationEnabled | ( | bool | acceleration | ) |
Sets mouse acceleration if mouse acceleration is enabled, then the mouse sensitivity is used as speed max.
Definition at line 257 of file enginesettings.cpp.
References m_mouseacceleration.
void FIFE::EngineSettings::setMouseSensitivity | ( | float | sens | ) |
Sets mouse sensitivity.
Definition at line 249 of file enginesettings.cpp.
References m_mousesensitivity.
void FIFE::EngineSettings::setRenderBackend | ( | const std::string & | renderbackend | ) |
Sets name for renderbackend.
Definition at line 128 of file enginesettings.cpp.
References FIFE::_log, FL_WARN, getPossibleRenderBackends(), and m_renderbackend.
void FIFE::EngineSettings::setScreenHeight | ( | uint16_t | screenheight | ) |
Sets screen height (pixels)
Definition at line 170 of file enginesettings.cpp.
References m_screenheight.
void FIFE::EngineSettings::setScreenWidth | ( | uint16_t | screenwidth | ) |
Sets screen width (pixels)
Definition at line 166 of file enginesettings.cpp.
References m_screenwidth.
void FIFE::EngineSettings::setSDLRemoveFakeAlpha | ( | bool | sdlremovefakealpha | ) |
Sets if fake alpha is removed in SDL renderbackend.
Definition at line 150 of file enginesettings.cpp.
References m_sdlremovefakealpha.
void FIFE::EngineSettings::setVideoDriver | ( | const std::string & | driver | ) |
Definition at line 212 of file enginesettings.cpp.
References m_videodriver.
void FIFE::EngineSettings::setWindowIcon | ( | const std::string & | icon | ) |
Sets the icon that appears in the window title bar.
Definition at line 190 of file enginesettings.cpp.
References m_windowicon.
void FIFE::EngineSettings::setWindowTitle | ( | const std::string & | title | ) |
Sets the title of the window.
Definition at line 186 of file enginesettings.cpp.
References m_windowtitle.
|
private |
Definition at line 316 of file enginesettings.h.
Referenced by getBitsPerPixel(), and setBitsPerPixel().
|
private |
Definition at line 334 of file enginesettings.h.
Referenced by EngineSettings(), getColorKey(), and setColorKey().
|
private |
Definition at line 332 of file enginesettings.h.
Referenced by getDefaultFontGlyphs(), and setDefaultFontGlyphs().
|
private |
Definition at line 330 of file enginesettings.h.
Referenced by getDefaultFontPath(), and setDefaultFontPath().
|
private |
Definition at line 331 of file enginesettings.h.
Referenced by getDefaultFontSize(), and setDefaultFontSize().
|
private |
Definition at line 338 of file enginesettings.h.
Referenced by getFrameLimit(), and setFrameLimit().
|
private |
Definition at line 317 of file enginesettings.h.
Referenced by isFullScreen(), and setFullScreen().
|
private |
Definition at line 318 of file enginesettings.h.
Referenced by getInitialVolume(), and setInitialVolume().
|
private |
Definition at line 333 of file enginesettings.h.
Referenced by isColorKeyEnabled(), and setColorKeyEnabled().
|
private |
Definition at line 337 of file enginesettings.h.
Referenced by isFrameLimitEnabled(), and setFrameLimitEnabled().
|
private |
Definition at line 336 of file enginesettings.h.
Referenced by getLightingModel(), and setLightingModel().
|
private |
Definition at line 340 of file enginesettings.h.
Referenced by isMouseAccelerationEnabled(), and setMouseAccelerationEnabled().
|
private |
Definition at line 339 of file enginesettings.h.
Referenced by getMouseSensitivity(), and setMouseSensitivity().
|
private |
Definition at line 321 of file enginesettings.h.
Referenced by isGLCompressImages(), and setGLCompressImages().
|
private |
Definition at line 322 of file enginesettings.h.
Referenced by isGLUseFramebuffer(), and setGLUseFramebuffer().
|
private |
Definition at line 323 of file enginesettings.h.
Referenced by isGLUseNPOT(), and setGLUseNPOT().
|
private |
Definition at line 319 of file enginesettings.h.
Referenced by getRenderBackend(), and setRenderBackend().
|
private |
Definition at line 325 of file enginesettings.h.
Referenced by getScreenHeight(), and setScreenHeight().
|
private |
Definition at line 324 of file enginesettings.h.
Referenced by getScreenWidth(), and setScreenWidth().
|
private |
Definition at line 320 of file enginesettings.h.
Referenced by isSDLRemoveFakeAlpha(), and setSDLRemoveFakeAlpha().
|
private |
Definition at line 335 of file enginesettings.h.
Referenced by EngineSettings(), getVideoDriver(), and setVideoDriver().
|
private |
Definition at line 327 of file enginesettings.h.
Referenced by getWindowIcon(), and setWindowIcon().
|
private |
Definition at line 326 of file enginesettings.h.
Referenced by getWindowTitle(), and setWindowTitle().