diff options
author | Filippos Karapetis | 2011-01-30 20:36:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2011-01-30 20:36:17 +0000 |
commit | 9d6e398e74348d397e99915b20d96cd06e69ed15 (patch) | |
tree | ef408ac40a76f8d25db3097d56192d2592faa2d0 /engines/sword25/gfx/dynamicbitmap.cpp | |
parent | 2e42c2d11d27ae51431a7c287fab061fca38e23c (diff) | |
download | scummvm-rg350-9d6e398e74348d397e99915b20d96cd06e69ed15.tar.gz scummvm-rg350-9d6e398e74348d397e99915b20d96cd06e69ed15.tar.bz2 scummvm-rg350-9d6e398e74348d397e99915b20d96cd06e69ed15.zip |
SWORD25: Added alternative code for video frame blitting (currently disabled)
svn-id: r55664
Diffstat (limited to 'engines/sword25/gfx/dynamicbitmap.cpp')
-rw-r--r-- | engines/sword25/gfx/dynamicbitmap.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/sword25/gfx/dynamicbitmap.cpp b/engines/sword25/gfx/dynamicbitmap.cpp index 55a3070acd..49dacc069e 100644 --- a/engines/sword25/gfx/dynamicbitmap.cpp +++ b/engines/sword25/gfx/dynamicbitmap.cpp @@ -81,10 +81,27 @@ bool DynamicBitmap::doRender() { // Draw the bitmap bool result; if (_scaleFactorX == 1.0f && _scaleFactorY == 1.0f) { +#if 1 + // This is what the game does originally, which can be + // a bit slow when drawing videos, but it's not the main + // bottleneck. result = _image->blit(_absoluteX, _absoluteY, (_flipV ? BitmapResource::FLIP_V : 0) | (_flipH ? BitmapResource::FLIP_H : 0), 0, _modulationColor, -1, -1); +#else + // WIP: A bit faster code + + // We don't need to check for transparency when drawing + // videos, thus just copy the buffer contents directly. + // This messes up the fire animation in the menu, for + // some odd reason. It also makes the video colors a + // bit lighter, resulting in a visible black border + // around the typed letters in the intro (which are + // drawn over a black border) + _image->copyDirectly(_absoluteX, _absoluteY); +#endif + return true; } else { result = _image->blit(_absoluteX, _absoluteY, (_flipV ? BitmapResource::FLIP_V : 0) | |