From 8d306ebccfa7e88b2e4f4635bff3987e550f98d3 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 15 Jun 2009 09:45:19 +0000 Subject: Added kUnsupportedColorMode error code brought Scumm engine and SDL backend into compliance with API outlined in http://scummvmupthorn09.wordpress.com/2009/06/14/how-this-is-going-to-work/ Provided convenient Graphics::PixelFormat constructors for ColorMode enums, and bitformat integers. Removed last vestiges (I think) of initial cursor hack. svn-id: r41539 --- graphics/scaler.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'graphics/scaler.cpp') diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 11767848ed..3a2643ff91 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -30,17 +30,31 @@ int gBitFormat = 565; +#ifdef ENABLE_16BIT +static const Graphics::PixelFormat gPixelFormat555( +#else static const Graphics::PixelFormat gPixelFormat555 = { +#endif 2, 3, 3, 3, 8, 10, 5, 0, 0 +#ifdef ENABLE_16BIT + ); + +static const Graphics::PixelFormat gPixelFormat565( +#else }; static const Graphics::PixelFormat gPixelFormat565 = { +#endif 2, 3, 2, 3, 8, 11, 5, 0, 0 +#ifdef ENABLE_16BIT + ); +#else }; +#endif -- cgit v1.2.3 From 5d61784dae5dace556d15e1603d86d565d66cb31 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 15 Jun 2009 11:35:51 +0000 Subject: Remove uglyness with PixelFormat initialization. svn-id: r41541 --- graphics/scaler.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'graphics/scaler.cpp') diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 3a2643ff91..082258bfc0 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -30,32 +30,17 @@ int gBitFormat = 565; -#ifdef ENABLE_16BIT static const Graphics::PixelFormat gPixelFormat555( -#else -static const Graphics::PixelFormat gPixelFormat555 = { -#endif 2, 3, 3, 3, 8, 10, 5, 0, 0 -#ifdef ENABLE_16BIT ); static const Graphics::PixelFormat gPixelFormat565( -#else - }; - -static const Graphics::PixelFormat gPixelFormat565 = { -#endif 2, 3, 2, 3, 8, 11, 5, 0, 0 -#ifdef ENABLE_16BIT ); -#else - }; -#endif - #ifndef DISABLE_HQ_SCALERS -- cgit v1.2.3