aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/transparency_surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-10 19:24:10 -0400
committerPaul Gilbert2017-07-10 19:24:10 -0400
commit7fc69ebdea10101d8d59eed400eff9da7c0b3b4c (patch)
treeb637f300acb3c2d233e2632817275a3cbb183c6c /engines/titanic/support/transparency_surface.cpp
parenta32ee25a28b074df197cd232d24fd544d633d542 (diff)
downloadscummvm-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.cpp35
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