diff options
author | Paul Gilbert | 2017-07-10 19:24:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-07-10 19:24:10 -0400 |
commit | 7fc69ebdea10101d8d59eed400eff9da7c0b3b4c (patch) | |
tree | b637f300acb3c2d233e2632817275a3cbb183c6c /engines/titanic/support/transparency_surface.cpp | |
parent | a32ee25a28b074df197cd232d24fd544d633d542 (diff) | |
download | scummvm-rg350-7fc69ebdea10101d8d59eed400eff9da7c0b3b4c.tar.gz scummvm-rg350-7fc69ebdea10101d8d59eed400eff9da7c0b3b4c.tar.bz2 scummvm-rg350-7fc69ebdea10101d8d59eed400eff9da7c0b3b4c.zip |
TITANIC: Inline CTransparencySurface methods at wjp's suggestion
Diffstat (limited to 'engines/titanic/support/transparency_surface.cpp')
-rw-r--r-- | engines/titanic/support/transparency_surface.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/engines/titanic/support/transparency_surface.cpp b/engines/titanic/support/transparency_surface.cpp index 505cd1ff6c..a2efe12db7 100644 --- a/engines/titanic/support/transparency_surface.cpp +++ b/engines/titanic/support/transparency_surface.cpp @@ -57,39 +57,4 @@ CTransparencySurface::CTransparencySurface(const Graphics::Surface *surface, } } -int CTransparencySurface::moveX() { - if (++_pos.x >= _surface->w) { - _pos.x = 0; - ++_pos.y; - } - - return 1; -} - -uint CTransparencySurface::getPixel() const { - byte pixel = *(const byte *)_surface->getBasePtr(_pos.x, _pos.y); - return pixel; -} - -uint CTransparencySurface::getAlpha() const { - byte pixel = getPixel(); - return _opaqueColor ? 0xFF - pixel : pixel; -} - -bool CTransparencySurface::isPixelOpaque() const { - byte pixel = getPixel(); - if (_opaqueColor) - return pixel >= 0xf0; - else - return pixel < 0x10; -} - -bool CTransparencySurface::isPixelTransparent() const { - byte pixel = getPixel(); - if (_transparentColor) - return pixel >= 0xf0; - else - return pixel < 0x10; -} - } // End of namespace Titanic |