aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/transparency_surface.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-10-06 22:01:43 -0400
committerPaul Gilbert2016-10-06 22:01:43 -0400
commit6a1e5bd43a2a3b12b820a9b82c48761cb54a620a (patch)
treea91f40f07e1d7439e36cf0351f486b88ce1b3139 /engines/titanic/support/transparency_surface.h
parentcf96b50f08faac7e13b990043c0171798d8a6000 (diff)
downloadscummvm-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.h29
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