Mercurial > fife-parpg
changeset 650:51bbda7676f0
* Fixed some more integer definitions
* All vars containing bits per pixel should now be uint16_t
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 14 Oct 2010 15:32:09 +0000 |
parents | b9c132cb6ea4 |
children | 2851e232a113 |
files | engine/core/controller/engine.cpp engine/core/controller/engine.i engine/core/controller/enginesettings.cpp engine/core/controller/enginesettings.h |
diffstat | 4 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/core/controller/engine.cpp Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/engine.cpp Thu Oct 14 15:32:09 2010 +0000 @@ -205,7 +205,7 @@ FL_LOG(_log, "Querying device capabilities"); m_devcaps.fillDeviceCaps(); - uint32_t bpp = m_settings.getBitsPerPixel(); + uint16_t bpp = m_settings.getBitsPerPixel(); m_screenMode = m_devcaps.getNearestScreenMode( m_settings.getScreenWidth(),
--- a/engine/core/controller/engine.i Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/engine.i Thu Oct 14 15:32:09 2010 +0000 @@ -47,8 +47,8 @@ ~EngineSettings(); void validate() const; void setBitsPerPixel(uint8_t bitsperpixel); - uint8_t getBitsPerPixel() const; - std::vector<uint8_t> getPossibleBitsPerPixel() const; + uint16_t getBitsPerPixel() const; + std::vector<uint16_t> getPossibleBitsPerPixel() const; std::vector<std::pair<uint16_t, uint16_t> > getPossibleResolutions() const; void setFullScreen(bool fullscreen); bool isFullScreen() const;
--- a/engine/core/controller/enginesettings.cpp Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/enginesettings.cpp Thu Oct 14 15:32:09 2010 +0000 @@ -92,9 +92,9 @@ return result; } - void EngineSettings::setBitsPerPixel(uint8_t bitsperpixel) { - std::vector<uint8_t> pv = getPossibleBitsPerPixel(); - std::vector<uint8_t>::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel); + void EngineSettings::setBitsPerPixel(uint16_t bitsperpixel) { + std::vector<uint16_t> pv = getPossibleBitsPerPixel(); + std::vector<uint16_t>::iterator i = std::find(pv.begin(), pv.end(), bitsperpixel); if (i != pv.end()) { m_bitsperpixel = bitsperpixel; return; @@ -102,8 +102,8 @@ throw NotSupported("Given bits per pixel value is not supported"); } - std::vector<uint8_t> EngineSettings::getPossibleBitsPerPixel() const { - std::vector<uint8_t> tmp; + std::vector<uint16_t> EngineSettings::getPossibleBitsPerPixel() const { + std::vector<uint16_t> tmp; tmp.push_back(0); tmp.push_back(16); tmp.push_back(24);
--- a/engine/core/controller/enginesettings.h Thu Oct 14 15:06:26 2010 +0000 +++ b/engine/core/controller/enginesettings.h Thu Oct 14 15:32:09 2010 +0000 @@ -56,17 +56,17 @@ /** Sets bits per pixel * @see getPossibleBitsPerPixel */ - void setBitsPerPixel(uint8_t bitsperpixel); + void setBitsPerPixel(uint16_t bitsperpixel); /** Gets currently set bits per pixel value */ - unsigned int getBitsPerPixel() const { + uint16_t getBitsPerPixel() const { return m_bitsperpixel; } /** Gets all possible bits per pixel values */ - std::vector<uint8_t> getPossibleBitsPerPixel() const; + std::vector<uint16_t> getPossibleBitsPerPixel() const; /** Gets all possible screen resolutions */ @@ -130,7 +130,7 @@ /** Gets screen width (pixels) */ - unsigned int getScreenWidth() const { + uint16_t getScreenWidth() const { return m_screenwidth; } @@ -140,7 +140,7 @@ /** Gets screen height (pixels) */ - unsigned int getScreenHeight() const { + uint16_t getScreenHeight() const { return m_screenheight; }