FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::EngineSettings Class Reference

This class defines the engine settings on engine init. More...

#include <enginesettings.h>

+ Collaboration diagram for FIFE::EngineSettings:

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
 

Detailed Description

This class defines the engine settings on engine init.

Definition at line 42 of file enginesettings.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

uint8_t FIFE::EngineSettings::getBitsPerPixel ( ) const
inline

Gets currently set bits per pixel value.

Definition at line 59 of file enginesettings.h.

References m_bitsperpixel.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

const std::string& FIFE::EngineSettings::getDefaultFontGlyphs ( ) const
inline

Gets current glyphs for default font.

Definition at line 207 of file enginesettings.h.

References m_defaultfontglyphs.

std::string FIFE::EngineSettings::getDefaultFontGlyphs ( )
inline

Gets current glyphs for default font.

Definition at line 213 of file enginesettings.h.

References m_defaultfontglyphs.

const std::string& FIFE::EngineSettings::getDefaultFontPath ( ) const
inline

Gets current path for default font.

Definition at line 181 of file enginesettings.h.

References m_defaultfontpath.

std::string FIFE::EngineSettings::getDefaultFontPath ( )
inline

Gets current path for default font.

Definition at line 187 of file enginesettings.h.

References m_defaultfontpath.

uint16_t FIFE::EngineSettings::getDefaultFontSize ( ) const
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().

+ Here is the caller graph for this function:

float FIFE::EngineSettings::getInitialVolume ( ) const
inline

Gets initial engine sound volume.

Definition at line 86 of file enginesettings.h.

References m_initialvolume.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

uint32_t FIFE::EngineSettings::getLightingModel ( ) const
inline

Gets the currently set light model.

Definition at line 275 of file enginesettings.h.

References m_lighting.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

float FIFE::EngineSettings::getMouseSensitivity ( ) const

Gets mouse sensitivity.

Definition at line 253 of file enginesettings.cpp.

References m_mousesensitivity.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

std::vector< std::string > FIFE::EngineSettings::getPossibleRenderBackends ( )

Gets all possible renderbackend names.

Definition at line 142 of file enginesettings.cpp.

Referenced by setRenderBackend().

+ Here is the caller graph for this function:

const std::string& FIFE::EngineSettings::getRenderBackend ( ) const
inline

Gets currently set renderbackend name.

Definition at line 101 of file enginesettings.h.

References m_renderbackend.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

std::string FIFE::EngineSettings::getRenderBackend ( )
inline

Gets currently set renderbackend name.

Definition at line 107 of file enginesettings.h.

References m_renderbackend.

uint16_t FIFE::EngineSettings::getScreenHeight ( ) const
inline

Gets screen height (pixels)

Definition at line 171 of file enginesettings.h.

References m_screenheight.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

uint16_t FIFE::EngineSettings::getScreenWidth ( ) const
inline

Gets screen width (pixels)

Definition at line 161 of file enginesettings.h.

References m_screenwidth.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

const std::string & FIFE::EngineSettings::getVideoDriver ( ) const

Definition at line 217 of file enginesettings.cpp.

References m_videodriver.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

const std::string& FIFE::EngineSettings::getWindowIcon ( ) const
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().

+ Here is the caller graph for this function:

std::string FIFE::EngineSettings::getWindowIcon ( )
inline

Gets the icon in the window title bar.

Definition at line 245 of file enginesettings.h.

References m_windowicon.

const std::string& FIFE::EngineSettings::getWindowTitle ( ) const
inline

Gets the current window title.

Definition at line 223 of file enginesettings.h.

References m_windowtitle.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

std::string FIFE::EngineSettings::getWindowTitle ( )
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().

+ Here is the caller graph for this function:

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().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isFullScreen ( ) const
inline

True, if set to fullscreen.

False = windowed

Definition at line 75 of file enginesettings.h.

References m_fullscreen.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isGLCompressImages ( ) const
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().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isGLUseFramebuffer ( ) const
inline

Tells if OpenGL renderbackend should use FramebufferObject.

Definition at line 141 of file enginesettings.h.

References m_ogluseframebuffer.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isGLUseNPOT ( ) const
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().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isMouseAccelerationEnabled ( ) const

Returns if mouse acceleration is enabled or not.

Returns
True if mouse acceleration is enabled, false if not.

Definition at line 261 of file enginesettings.cpp.

References m_mouseacceleration.

Referenced by FIFE::Engine::init().

+ Here is the caller graph for this function:

bool FIFE::EngineSettings::isSDLRemoveFakeAlpha ( ) const
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.

See Also
getPossibleBitsPerPixel

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)

Sets the frame limit.

Definition at line 241 of file enginesettings.cpp.

References m_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.

void FIFE::EngineSettings::setFullScreen ( bool  fullscreen)
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.

See Also
getInitialMaxVolume

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.

See Also
getPossibleRenderBackends

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.

Member Data Documentation

uint8_t FIFE::EngineSettings::m_bitsperpixel
private

Definition at line 316 of file enginesettings.h.

Referenced by getBitsPerPixel(), and setBitsPerPixel().

SDL_Color FIFE::EngineSettings::m_colorkey
private

Definition at line 334 of file enginesettings.h.

Referenced by EngineSettings(), getColorKey(), and setColorKey().

std::string FIFE::EngineSettings::m_defaultfontglyphs
private

Definition at line 332 of file enginesettings.h.

Referenced by getDefaultFontGlyphs(), and setDefaultFontGlyphs().

std::string FIFE::EngineSettings::m_defaultfontpath
private

Definition at line 330 of file enginesettings.h.

Referenced by getDefaultFontPath(), and setDefaultFontPath().

uint16_t FIFE::EngineSettings::m_defaultfontsize
private

Definition at line 331 of file enginesettings.h.

Referenced by getDefaultFontSize(), and setDefaultFontSize().

uint16_t FIFE::EngineSettings::m_framelimit
private

Definition at line 338 of file enginesettings.h.

Referenced by getFrameLimit(), and setFrameLimit().

bool FIFE::EngineSettings::m_fullscreen
private

Definition at line 317 of file enginesettings.h.

Referenced by isFullScreen(), and setFullScreen().

float FIFE::EngineSettings::m_initialvolume
private

Definition at line 318 of file enginesettings.h.

Referenced by getInitialVolume(), and setInitialVolume().

bool FIFE::EngineSettings::m_iscolorkeyenabled
private

Definition at line 333 of file enginesettings.h.

Referenced by isColorKeyEnabled(), and setColorKeyEnabled().

bool FIFE::EngineSettings::m_isframelimit
private

Definition at line 337 of file enginesettings.h.

Referenced by isFrameLimitEnabled(), and setFrameLimitEnabled().

uint32_t FIFE::EngineSettings::m_lighting
private

Definition at line 336 of file enginesettings.h.

Referenced by getLightingModel(), and setLightingModel().

bool FIFE::EngineSettings::m_mouseacceleration
private

Definition at line 340 of file enginesettings.h.

Referenced by isMouseAccelerationEnabled(), and setMouseAccelerationEnabled().

float FIFE::EngineSettings::m_mousesensitivity
private

Definition at line 339 of file enginesettings.h.

Referenced by getMouseSensitivity(), and setMouseSensitivity().

bool FIFE::EngineSettings::m_oglcompressimages
private

Definition at line 321 of file enginesettings.h.

Referenced by isGLCompressImages(), and setGLCompressImages().

bool FIFE::EngineSettings::m_ogluseframebuffer
private

Definition at line 322 of file enginesettings.h.

Referenced by isGLUseFramebuffer(), and setGLUseFramebuffer().

bool FIFE::EngineSettings::m_oglusenpot
private

Definition at line 323 of file enginesettings.h.

Referenced by isGLUseNPOT(), and setGLUseNPOT().

std::string FIFE::EngineSettings::m_renderbackend
private

Definition at line 319 of file enginesettings.h.

Referenced by getRenderBackend(), and setRenderBackend().

uint16_t FIFE::EngineSettings::m_screenheight
private

Definition at line 325 of file enginesettings.h.

Referenced by getScreenHeight(), and setScreenHeight().

uint16_t FIFE::EngineSettings::m_screenwidth
private

Definition at line 324 of file enginesettings.h.

Referenced by getScreenWidth(), and setScreenWidth().

bool FIFE::EngineSettings::m_sdlremovefakealpha
private

Definition at line 320 of file enginesettings.h.

Referenced by isSDLRemoveFakeAlpha(), and setSDLRemoveFakeAlpha().

std::string FIFE::EngineSettings::m_videodriver
private

Definition at line 335 of file enginesettings.h.

Referenced by EngineSettings(), getVideoDriver(), and setVideoDriver().

std::string FIFE::EngineSettings::m_windowicon
private

Definition at line 327 of file enginesettings.h.

Referenced by getWindowIcon(), and setWindowIcon().

std::string FIFE::EngineSettings::m_windowtitle
private

Definition at line 326 of file enginesettings.h.

Referenced by getWindowTitle(), and setWindowTitle().


The documentation for this class was generated from the following files: