[Scummvm-cvs-logs] SF.net SVN: scummvm:[53269] scummvm/trunk/engines/sword25/gfx/opengl/ openglgfx.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 01:10:36 CEST 2010
Revision: 53269
http://scummvm.svn.sourceforge.net/scummvm/?rev=53269&view=rev
Author: sev
Date: 2010-10-12 23:10:36 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Implement graphics Fill() method
Modified Paths:
--------------
scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
Modified: scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp 2010-10-12 23:10:15 UTC (rev 53268)
+++ scummvm/trunk/engines/sword25/gfx/opengl/openglgfx.cpp 2010-10-12 23:10:36 UTC (rev 53269)
@@ -212,18 +212,21 @@
// -----------------------------------------------------------------------------
-bool OpenGLGfx::Fill(const Common::Rect *FillRectPtr, unsigned int Color) {
- Common::Rect 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;
- Rect.bottom = m_Height;
- FillRectPtr = &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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list