diff options
author | Max Horn | 2009-01-24 23:06:58 +0000 |
---|---|---|
committer | Max Horn | 2009-01-24 23:06:58 +0000 |
commit | 16e7a7cd30e3523a53c0038b4e04289e07424479 (patch) | |
tree | a8671c66cec3b3b3b73e95fecbc67bbf9ddb26e4 /graphics/scaler.cpp | |
parent | e5feb689dfa8afc3d6af3ae6e66343cfc61b855c (diff) | |
download | scummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.tar.gz scummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.tar.bz2 scummvm-rg350-16e7a7cd30e3523a53c0038b4e04289e07424479.zip |
Turned two vars of the HQ2x/HQ3x ASM implementation into global vars, to make it possible to adjust them for 555 vs. 565 mode (555 mode is still a bit buggy, due to the interpolation code they use)
svn-id: r36046
Diffstat (limited to 'graphics/scaler.cpp')
-rw-r--r-- | graphics/scaler.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 08fbcf6d04..f540c60205 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -54,10 +54,15 @@ extern "C" { #if !defined(_WIN32) && !defined(MACOSX) && !defined(__OS2__) #define RGBtoYUV _RGBtoYUV #define LUT16to32 _LUT16to32 +#define hqx_highbits _hqx_highbits +#define hqx_lowbits _hqx_lowbits #endif #endif +uint32 hqx_highbits = 0xF7DEF7DE; +uint32 hqx_lowbits = 0x0821; + // FIXME/TODO: The following two tables suck up 512 KB. This is bad. // In addition we never free them... // @@ -114,11 +119,25 @@ void InitLUT(Graphics::PixelFormat format) { void InitScalers(uint32 BitFormat) { gBitFormat = BitFormat; + #ifndef DISABLE_HQ_SCALERS - if (gBitFormat == 555) + #undef highBits; + #undef lowBits; + + if (gBitFormat == 555) { InitLUT(Graphics::createPixelFormat<555>()); - if (gBitFormat == 565) +#ifdef USE_NASM + hqx_highbits = Graphics::ColorMasks<555>::highBits; + hqx_lowbits = Graphics::ColorMasks<555>::lowBits & 0xFFFF; +#endif + } + if (gBitFormat == 565) { InitLUT(Graphics::createPixelFormat<565>()); +#ifdef USE_NASM + hqx_highbits = Graphics::ColorMasks<565>::highBits; + hqx_lowbits = Graphics::ColorMasks<565>::lowBits & 0xFFFF; +#endif + } #endif } |