aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/surface.cpp
diff options
context:
space:
mode:
authorDenis Kasak2009-07-13 19:08:04 +0000
committerDenis Kasak2009-07-13 19:08:04 +0000
commit224d8c087acac4e3f21913b6268f82c1ab9faca8 (patch)
tree76587b42ddf830fa889e396df9c7aac52ddcb9db /engines/draci/surface.cpp
parent77a810c0c9beed930a4b0ffe8e715bd22d7be448 (diff)
downloadscummvm-rg350-224d8c087acac4e3f21913b6268f82c1ab9faca8.tar.gz
scummvm-rg350-224d8c087acac4e3f21913b6268f82c1ab9faca8.tar.bz2
scummvm-rg350-224d8c087acac4e3f21913b6268f82c1ab9faca8.zip
Added Surface::fill() method and made Screen::fillScreen() use that instead of filling the surface manually. Changed Surface to use uint instead of uint8 throughout.
svn-id: r42447
Diffstat (limited to 'engines/draci/surface.cpp')
-rw-r--r--engines/draci/surface.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/draci/surface.cpp b/engines/draci/surface.cpp
index 148c24633b..636ec0c4ac 100644
--- a/engines/draci/surface.cpp
+++ b/engines/draci/surface.cpp
@@ -106,15 +106,24 @@ Common::List<Common::Rect> *Surface::getDirtyRects() {
/**
* @brief Returns the current transparent colour of the surface
*/
-uint8 Surface::getTransparentColour() {
+uint Surface::getTransparentColour() {
return _transparentColour;
}
/**
* @brief Sets the surface's transparent colour
*/
-void Surface::setTransparentColour(uint8 colour) {
+void Surface::setTransparentColour(uint colour) {
_transparentColour = colour;
}
+/**
+ * @ brief Fills the surface with the specified colour
+ */
+void Surface::fill(uint colour) {
+ byte *ptr = (byte *)getBasePtr(0, 0);
+
+ memset(ptr, colour, w * h);
+}
+
} // End of namespace Draci