diff options
author | Max Horn | 2009-01-22 04:59:09 +0000 |
---|---|---|
committer | Max Horn | 2009-01-22 04:59:09 +0000 |
commit | 0034aa3b9c7a1f0123df9e809a6a5d0d58bd9bd1 (patch) | |
tree | 3e5d5b10e6cfdb6112a86e7c204c3051d388f50a /graphics/VectorRendererSpec.cpp | |
parent | 17f5d4eeea9b22e833b4f9fb2f7f2670af27b4fa (diff) | |
download | scummvm-rg350-0034aa3b9c7a1f0123df9e809a6a5d0d58bd9bd1.tar.gz scummvm-rg350-0034aa3b9c7a1f0123df9e809a6a5d0d58bd9bd1.tar.bz2 scummvm-rg350-0034aa3b9c7a1f0123df9e809a6a5d0d58bd9bd1.zip |
Got rid of several occurrences of gBitFormat
svn-id: r35995
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 46c0ec6a67..055a51a4a1 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -151,8 +151,6 @@ inline uint32 fp_sqroot(uint32 x) { } -extern int gBitFormat; - namespace Graphics { VectorRenderer *createRenderer(int mode) { @@ -172,21 +170,27 @@ VectorRenderer *createRenderer(int mode) { return 0; \ } + // FIXME/TODO: This looks like a real gross hack. // It might be fine to assume that '1555' only happens for PSP // so it could maybe be handled via DISABLE_FANCY_THEMES, // same goes for 4444, which is only used by DC port. - if (gBitFormat == 1555) { + PixelFormat format = g_system->getOverlayFormat(); + if (format == createPixelFormat<1555>()) { CREATE_RENDERER_16(1555) - } else if (gBitFormat == 4444) { + } + if (format == createPixelFormat<4444>()) { CREATE_RENDERER_16(4444) - } else if (gBitFormat == 555) { + } + if (format == createPixelFormat<555>()) { CREATE_RENDERER_16(555) - } else if (gBitFormat == 565) { + } + if (format == createPixelFormat<565>()) { CREATE_RENDERER_16(565) - } else { - return 0; } + + return 0; + #undef CREATE_RENDERER_16 #endif } |