From 224d8c087acac4e3f21913b6268f82c1ab9faca8 Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Mon, 13 Jul 2009 19:08:04 +0000 Subject: 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 --- engines/draci/surface.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/draci/surface.cpp') 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 *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 -- cgit v1.2.3