diff options
author | Jody Northup | 2009-07-08 16:07:58 +0000 |
---|---|---|
committer | Jody Northup | 2009-07-08 16:07:58 +0000 |
commit | 828ed66555b99363fed62b4cbb83c36de68c3024 (patch) | |
tree | 954ef2912744813160ed95984808ac21c2b68a17 /backends/platform/sdl | |
parent | 3e47aaa151ff751af867c57344b063c30f5f75f3 (diff) | |
download | scummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.tar.gz scummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.tar.bz2 scummvm-rg350-828ed66555b99363fed62b4cbb83c36de68c3024.zip |
Reinstated static inline Graphics::PixelFormat::createFormatCLUT8(), which I am told was not supposed to be removed with the others.
svn-id: r42268
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 2 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 4 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 51 |
3 files changed, 21 insertions, 36 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 95a3276fa5..27f32ee8d2 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -361,7 +361,7 @@ void OSystem_SDL::initSize(uint w, uint h, const Graphics::PixelFormat *format) //avoid redundant format changes Graphics::PixelFormat newFormat; if (!format) - newFormat = Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0); + newFormat = Graphics::PixelFormat::createFormatCLUT8(); else newFormat = *format; diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index f7bd71361f..105206ec07 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -197,8 +197,8 @@ OSystem_SDL::OSystem_SDL() #endif _hwscreen(0), _screen(0), _tmpscreen(0), #ifdef ENABLE_RGB_COLOR - _screenFormat(Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0)), - _cursorFormat(Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0)), + _screenFormat(Graphics::PixelFormat::createFormatCLUT8()), + _cursorFormat(Graphics::PixelFormat::createFormatCLUT8()), #endif _overlayVisible(false), _overlayscreen(0), _tmpscreen2(0), diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index b8ab2f6d97..c2648e8ed7 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -94,44 +94,29 @@ public: if (HWFormat->BitsPerPixel >= 32) { list.push_back(Graphics::PixelFormat::createFormatRGBA8888()); - list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 16, 8, 0, 24) -); - list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 0, 8, 16, 24) -); - list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 8, 16, 24, 0) -); } + list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 16, 8, 0, 24)); + list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 0, 8, 16, 24)); + list.push_back(Graphics::PixelFormat(4, 0, 0, 0, 0, 8, 16, 24, 0)); + } if (HWFormat->BitsPerPixel >= 24) { - list.push_back(Graphics::PixelFormat(3, 0, 0, 0, 8, 16, 8, 0, 0) -); - list.push_back(Graphics::PixelFormat(3, 0, 0, 0, 8, 0, 8, 16, 0) -); + list.push_back(Graphics::PixelFormat(3, 0, 0, 0, 8, 16, 8, 0, 0)); + list.push_back(Graphics::PixelFormat(3, 0, 0, 0, 8, 0, 8, 16, 0)); } #endif //ENABLE_32BIT - if (HWFormat->BitsPerPixel >= 16) - { - list.push_back(Graphics::PixelFormat(2, 3, 2, 3, 8, 11, 5, 0, 0) -); - list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 7, 10, 5, 0, 15) -); - list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0) -); - list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0) -); - list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12) -); - list.push_back(Graphics::PixelFormat(2, 3, 2, 3, 8, 0, 5, 11, 0) -); - list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 7, 0, 5, 10, 15) -); - list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 8, 0, 5, 10, 0) -); - list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12) -); - list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0) -); + if (HWFormat->BitsPerPixel >= 16) { + list.push_back(Graphics::PixelFormat(2, 3, 2, 3, 8, 11, 5, 0, 0)); + list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 7, 10, 5, 0, 15)); + list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0)); + list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)); + list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12)); + list.push_back(Graphics::PixelFormat(2, 3, 2, 3, 8, 0, 5, 11, 0)); + list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 7, 0, 5, 10, 15)); + list.push_back(Graphics::PixelFormat(2, 3, 3, 3, 8, 0, 5, 10, 0)); + list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 0, 4, 8, 12)); + list.push_back(Graphics::PixelFormat(2, 4, 4, 4, 4, 4, 8, 12, 0)); } - list.push_back(Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0)); + list.push_back(Graphics::PixelFormat::createFormatCLUT8()); return list; } #endif |