aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/transparency_surface.h
diff options
context:
space:
mode:
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