diff options
author | Paul Gilbert | 2016-10-06 22:01:43 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-10-06 22:01:43 -0400 |
commit | 6a1e5bd43a2a3b12b820a9b82c48761cb54a620a (patch) | |
tree | a91f40f07e1d7439e36cf0351f486b88ce1b3139 /engines/titanic/support/transparency_surface.h | |
parent | cf96b50f08faac7e13b990043c0171798d8a6000 (diff) | |
download | scummvm-rg350-6a1e5bd43a2a3b12b820a9b82c48761cb54a620a.tar.gz scummvm-rg350-6a1e5bd43a2a3b12b820a9b82c48761cb54a620a.tar.bz2 scummvm-rg350-6a1e5bd43a2a3b12b820a9b82c48761cb54a620a.zip |
TITANIC: Cleanup usages of CTransparencySurface
Diffstat (limited to 'engines/titanic/support/transparency_surface.h')
-rw-r--r-- | engines/titanic/support/transparency_surface.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/engines/titanic/support/transparency_surface.h b/engines/titanic/support/transparency_surface.h index 5593dfa66d..06861b609b 100644 --- a/engines/titanic/support/transparency_surface.h +++ b/engines/titanic/support/transparency_surface.h @@ -43,19 +43,40 @@ private: bool _flag1; bool _flag2; public: + /** + * Constructor + */ CTransparencySurface(const Graphics::Surface *surface, TransparencyMode transMode); + /** + * Sets the row to get transparencies from + */ void setRow(int yp) { _pos.y = yp; } + /** + * Sets the column to get transparencies from + */ void setCol(int xp) { _pos.x = xp; } - uint getPixel() const; + /** + * Moves reading position horizontally by a single pixel + */ + int moveX(); - bool isPixelTransparent1() const; + /** + * Returns a byte from the transparency surface + */ + uint getPixel() const; - bool isPixelTransparent2() const; + /** + * Returns the alpha value for the pixel (0-31) + */ + uint getAlpha() const { return getPixel() >> 3; } - int moveX(); + /** + * Returns true if the pixel is completely transparent + */ + bool isPixelTransparent() const { return getAlpha() == 0; } }; } // End of namespace Titanic |