diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/VectorRenderer.cpp | 2 | ||||
-rw-r--r-- | graphics/VectorRenderer.h | 8 | ||||
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 7 | ||||
-rw-r--r-- | graphics/VectorRendererSpec.h | 4 |
4 files changed, 18 insertions, 3 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index 4f9bd48334..8c7f9662cf 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -37,6 +37,7 @@ namespace Graphics { +#ifndef DISABLE_FANCY_THEMES const VectorRenderer::ConvolutionDataSet VectorRenderer::_convolutionData[VectorRenderer::kConvolutionMAX] = { { {{1, 1, 1}, {1, 8, 1}, {1, 1, 1}}, 16, 0 }, // soft blur matrix { {{2, 2, 2}, {2, 2, 2}, {2, 2, 2}}, 18, 0 }, // hard blur matrix @@ -45,6 +46,7 @@ const VectorRenderer::ConvolutionDataSet VectorRenderer::_convolutionData[Vector { {{-1, -1, -1}, {-1, 9, -1}, {-1, -1, -1}}, 1, 0}, // sharpen matrix { {{1, 1, 1}, {1, -7, 1}, {1, 1, 1}}, 1, 0} // edge find matrix }; +#endif /******************************************************************** * DRAWSTEP handling functions diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 377933e890..b5fa4cb6cf 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -114,6 +114,7 @@ public: kTriangleRight }; +#ifndef DISABLE_FANCY_THEMES enum ConvolutionData { kConvolutionSoftBlur, kConvolutionHardBlur, @@ -129,6 +130,7 @@ public: int divisor; int offset; }; +#endif /** * Draws a line by considering the special cases for optimization. @@ -501,6 +503,7 @@ public: virtual void disableShadows() { _disableShadows = true; } virtual void enableShadows() { _disableShadows = false; } +#ifndef DISABLE_FANCY_THEMES /** * Applies a convolution matrix on the given surface area. * Call applyConvolutionMatrix() instead if you want to use @@ -526,6 +529,7 @@ public: virtual void applyConvolutionMatrix(const ConvolutionData id, const Common::Rect &area) { areaConvolution(area, _convolutionData[id].matrix, _convolutionData[id].divisor, _convolutionData[id].offset); } +#endif /** * Applies a whole-screen shading effect, used before opening a new dialog. @@ -547,9 +551,9 @@ protected: int _gradientFactor; /**< Multiplication factor of the active gradient */ int _gradientBytes[3]; /**< Color bytes of the active gradient, used to speed up calculation */ +#ifndef DISABLE_FANCY_THEMES static const ConvolutionDataSet _convolutionData[kConvolutionMAX]; - - static const int _dimPercentValue = 256 * 50 / 100; /**< default value for screen dimming (50%) */ +#endif }; } // end of namespace Graphics diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index e9a8e15566..4aa5d320e0 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -159,14 +159,17 @@ VectorRenderer *createRenderer(int mode) { case GUI::ThemeEngine::kGfxStandard16bit: return new VectorRendererSpec<uint16, ColorMasks<565> >; +#ifndef DISABLE_FANCY_THEMES case GUI::ThemeEngine::kGfxAntialias16bit: return new VectorRendererAA<uint16, ColorMasks<565> >; +#endif default: return 0; } } +#ifndef DISABLE_FANCY_THEMES template <typename PixelType, typename PixelFormat> void VectorRendererSpec<PixelType, PixelFormat>:: areaConvolution(const Common::Rect &area, const int filter[3][3], int filterDiv, int offset) { @@ -201,6 +204,7 @@ areaConvolution(const Common::Rect &area, const int filter[3][3], int filterDiv, } } } +#endif template <typename PixelType, typename PixelFormat> void VectorRendererSpec<PixelType, PixelFormat>:: @@ -1409,7 +1413,7 @@ drawRoundedSquareFakeBevel(int x1, int y1, int r, int w, int h, int amount) { - +#ifndef DISABLE_FANCY_THEMES /******************************************************************** * ANTIALIASED PRIMITIVES drawing algorithms - VectorRendererAA @@ -1587,5 +1591,6 @@ drawCircleAlg(int x1, int y1, int r, PixelType color, VectorRenderer::FillMode f } } +#endif } diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index ce78c8a557..c0d3b3e00f 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -225,7 +225,9 @@ protected: */ inline void colorFill(PixelType *first, PixelType *last, PixelType color); +#ifndef DISABLE_FANCY_THEMES void areaConvolution(const Common::Rect &area, const int filter[3][3], int filterDiv, int offset); +#endif PixelType _fgColor; /**< Foreground color currently being used to draw on the renderer */ PixelType _bgColor; /**< Background color currently being used to draw on the renderer */ @@ -238,6 +240,7 @@ protected: }; +#ifndef DISABLE_FANCY_THEMES /** * VectorRendererAA: Anti-Aliased Vector Renderer Class * @@ -291,6 +294,7 @@ protected: // Common::Rect(x, y, x + w + blur * 2, y + h + blur * 2)); } }; +#endif } #endif |