diff options
author | Eugene Sandulenko | 2010-08-21 19:26:00 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 23:10:36 +0000 |
commit | c51f4629cfab692e0e1fc62f0030e4c67cd8d9c5 (patch) | |
tree | dfe1e81c270565ff2356a3d01b2bbd74a1671e08 /engines/sword25/gfx | |
parent | f1e7fb28a0d3a1d38692332322df911959b0020b (diff) | |
download | scummvm-rg350-c51f4629cfab692e0e1fc62f0030e4c67cd8d9c5.tar.gz scummvm-rg350-c51f4629cfab692e0e1fc62f0030e4c67cd8d9c5.tar.bz2 scummvm-rg350-c51f4629cfab692e0e1fc62f0030e4c67cd8d9c5.zip |
SWORD25: Implement graphics Fill() method
svn-id: r53269
Diffstat (limited to 'engines/sword25/gfx')
-rw-r--r-- | engines/sword25/gfx/opengl/openglgfx.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engines/sword25/gfx/opengl/openglgfx.cpp b/engines/sword25/gfx/opengl/openglgfx.cpp index bc2e228030..bc3f87e556 100644 --- a/engines/sword25/gfx/opengl/openglgfx.cpp +++ b/engines/sword25/gfx/opengl/openglgfx.cpp @@ -212,18 +212,21 @@ bool OpenGLGfx::GetVsync() const { // ----------------------------------------------------------------------------- -bool OpenGLGfx::Fill(const Common::Rect *FillRectPtr, unsigned int Color) { - Common::Rect Rect; - - if (!FillRectPtr) { - Rect.left = 0; - Rect.top = 0; - Rect.right = m_Width; - Rect.bottom = m_Height; - FillRectPtr = &Rect; +bool OpenGLGfx::Fill(const Common::Rect *fillRectPtr, unsigned int color) { + Common::Rect rect; + + if (!fillRectPtr) { + rect.left = 0; + rect.top = 0; + rect.right = m_Width - 1; + rect.bottom = m_Height - 1; + fillRectPtr = ▭ } - warning("STUB: Fill()"); + if (fillRectPtr->width() > 0 && fillRectPtr->height() > 0) { + _backSurface.fillRect(*fillRectPtr, color); + g_system->copyRectToScreen((byte *)_backSurface.getBasePtr(fillRectPtr->left, fillRectPtr->top), _backSurface.pitch, fillRectPtr->left, fillRectPtr->top, fillRectPtr->width(), fillRectPtr->height()); + } return true; } |