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

#include <devicecaps.h>

+ Collaboration diagram for FIFE::ScreenMode:

Public Member Functions

 ScreenMode ()
 Default Constructor. More...
 
 ScreenMode (uint16_t width, uint16_t height, uint16_t bpp, uint32_t SDLFlags)
 
 ScreenMode (const ScreenMode &rhs)
 
 ~ScreenMode ()
 Destructor. More...
 
bool operator< (const ScreenMode &rhs) const
 
uint16_t getWidth () const
 Returns the width of the screen mode. More...
 
uint16_t getHeight () const
 Returns the height of the screen mode. More...
 
uint16_t getBPP () const
 Returns the number of bits per pixel this mode uses. More...
 
uint32_t getSDLFlags () const
 Returns the SDL flags used when testing this mode. More...
 
bool isFullScreen () const
 True if this is a fullscreen mode. More...
 
bool isOpenGL () const
 True if this mode uses the OpenGL renderer. More...
 
bool isSDL () const
 Is this screen mode an SDL only screen mode. More...
 
bool isSDLHardwareSurface () const
 Returns true if this is a SDL screen mode with the SDL hardware surface enabled. More...
 

Static Public Attributes

static const uint32_t HW_WINDOWED_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL
 
static const uint32_t HW_FULLSCREEN_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN
 
static const uint32_t WINDOWED_SDL = 0
 
static const uint32_t WINDOWED_SDL_DB_HW = SDL_HWSURFACE | SDL_DOUBLEBUF
 
static const uint32_t FULLSCREEN_SDL = SDL_FULLSCREEN
 
static const uint32_t FULLSCREEN_SDL_DB_HW = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF
 

Private Attributes

uint16_t m_width
 
uint16_t m_height
 
uint16_t m_bpp
 
uint32_t m_SDLFlags
 

Detailed Description

Definition at line 40 of file devicecaps.h.

Constructor & Destructor Documentation

FIFE::ScreenMode::ScreenMode ( )

Default Constructor.

Note
You shouldn't construct these objects yourself. This default constructor was provided because swig complained that was none.

Definition at line 40 of file devicecaps.cpp.

FIFE::ScreenMode::ScreenMode ( uint16_t  width,
uint16_t  height,
uint16_t  bpp,
uint32_t  SDLFlags 
)

Definition at line 44 of file devicecaps.cpp.

FIFE::ScreenMode::ScreenMode ( const ScreenMode rhs)

Definition at line 48 of file devicecaps.cpp.

References getBPP(), getHeight(), getSDLFlags(), getWidth(), m_bpp, m_height, m_SDLFlags, and m_width.

FIFE::ScreenMode::~ScreenMode ( )
inline

Destructor.

Definition at line 52 of file devicecaps.h.

Member Function Documentation

uint16_t FIFE::ScreenMode::getBPP ( ) const
inline

Returns the number of bits per pixel this mode uses.

Definition at line 70 of file devicecaps.h.

References m_bpp.

Referenced by operator<(), ScreenMode(), FIFE::RenderBackendOpenGLe::setScreenMode(), FIFE::RenderBackendOpenGL::setScreenMode(), and FIFE::RenderBackendSDL::setScreenMode().

+ Here is the caller graph for this function:

uint16_t FIFE::ScreenMode::getHeight ( ) const
inline

Returns the height of the screen mode.

Note
If both width and height are 0 it means that ALL modes are available for use with the specified flags. Most likely this is a windowed mode.

Definition at line 66 of file devicecaps.h.

References m_height.

Referenced by FIFE::Engine::changeScreenMode(), operator<(), ScreenMode(), FIFE::RenderBackendOpenGLe::setScreenMode(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().

+ Here is the caller graph for this function:

uint32_t FIFE::ScreenMode::getSDLFlags ( ) const
inline

Returns the SDL flags used when testing this mode.

Definition at line 74 of file devicecaps.h.

References m_SDLFlags.

Referenced by operator<(), ScreenMode(), FIFE::RenderBackendOpenGLe::setScreenMode(), FIFE::RenderBackendOpenGL::setScreenMode(), and FIFE::RenderBackendSDL::setScreenMode().

+ Here is the caller graph for this function:

uint16_t FIFE::ScreenMode::getWidth ( ) const
inline

Returns the width of the screen mode.

Note
If both width and height are 0 it means that ALL modes are available for use with the specified flags. Most likely this is a windowed mode.

Definition at line 60 of file devicecaps.h.

References m_width.

Referenced by FIFE::Engine::changeScreenMode(), operator<(), ScreenMode(), FIFE::RenderBackendOpenGLe::setScreenMode(), FIFE::RenderBackendSDL::setScreenMode(), and FIFE::RenderBackendOpenGL::setScreenMode().

+ Here is the caller graph for this function:

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

True if this is a fullscreen mode.

False if it is a windowed mode.

Definition at line 78 of file devicecaps.h.

References m_SDLFlags.

Referenced by operator<().

+ Here is the caller graph for this function:

bool FIFE::ScreenMode::isOpenGL ( ) const
inline

True if this mode uses the OpenGL renderer.

False otherwise.

Definition at line 82 of file devicecaps.h.

References m_SDLFlags.

bool FIFE::ScreenMode::isSDL ( ) const
inline

Is this screen mode an SDL only screen mode.

Definition at line 86 of file devicecaps.h.

References m_SDLFlags.

bool FIFE::ScreenMode::isSDLHardwareSurface ( ) const
inline

Returns true if this is a SDL screen mode with the SDL hardware surface enabled.

Definition at line 90 of file devicecaps.h.

References m_SDLFlags.

bool FIFE::ScreenMode::operator< ( const ScreenMode rhs) const

Member Data Documentation

const uint32_t FIFE::ScreenMode::FULLSCREEN_SDL = SDL_FULLSCREEN
static

Definition at line 102 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().

const uint32_t FIFE::ScreenMode::FULLSCREEN_SDL_DB_HW = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF
static

Definition at line 104 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().

const uint32_t FIFE::ScreenMode::HW_FULLSCREEN_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN
static

Definition at line 96 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().

const uint32_t FIFE::ScreenMode::HW_WINDOWED_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL
static

Definition at line 94 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().

uint16_t FIFE::ScreenMode::m_bpp
private

Definition at line 109 of file devicecaps.h.

Referenced by getBPP(), operator<(), and ScreenMode().

uint16_t FIFE::ScreenMode::m_height
private

Definition at line 108 of file devicecaps.h.

Referenced by getHeight(), operator<(), and ScreenMode().

uint32_t FIFE::ScreenMode::m_SDLFlags
private
uint16_t FIFE::ScreenMode::m_width
private

Definition at line 107 of file devicecaps.h.

Referenced by getWidth(), operator<(), and ScreenMode().

const uint32_t FIFE::ScreenMode::WINDOWED_SDL = 0
static

Definition at line 98 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().

const uint32_t FIFE::ScreenMode::WINDOWED_SDL_DB_HW = SDL_HWSURFACE | SDL_DOUBLEBUF
static

Definition at line 100 of file devicecaps.h.

Referenced by FIFE::DeviceCaps::fillDeviceCaps().


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