aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-06-04 01:55:23 +0200
committerEinar Johan Trøan Sømåen2012-06-04 01:55:23 +0200
commit31d0b89e82952c3956289c95a3a748255038e09a (patch)
tree8a12da7fed15eba93886fb15d8aa06c710f23a92 /engines/wintermute
parent70427e6d7e0e06e0559aed167e86784a9c176f34 (diff)
downloadscummvm-rg350-31d0b89e82952c3956289c95a3a748255038e09a.tar.gz
scummvm-rg350-31d0b89e82952c3956289c95a3a748255038e09a.tar.bz2
scummvm-rg350-31d0b89e82952c3956289c95a3a748255038e09a.zip
WINTERMUTE: Reenable CBRenderSDL::Fill to let the screen be blanked for every frame
This makes J.U.L.I.A. look a lot better.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp13
-rw-r--r--engines/wintermute/Base/BRenderSDL.h4
-rw-r--r--engines/wintermute/Base/BRenderer.cpp4
-rw-r--r--engines/wintermute/Base/BRenderer.h5
4 files changed, 18 insertions, 8 deletions
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index 01e48f3e04..5513dd5e69 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -228,9 +228,18 @@ HRESULT CBRenderSDL::Flip() {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::Fill(byte r, byte g, byte b, RECT *rect) {
+HRESULT CBRenderSDL::Fill(byte r, byte g, byte b, Common::Rect *rect) {
//SDL_SetRenderDrawColor(_renderer, r, g, b, 0xFF);
//SDL_RenderClear(_renderer);
+ uint32 color = _renderSurface->format.ARGBToColor(0xFF, r, g, b);
+ if (!rect) {
+ rect = new Common::Rect();
+ rect->setWidth(_renderSurface->w);
+ rect->setHeight(_renderSurface->h);
+ _renderSurface->fillRect(*rect, color);
+ delete rect;
+ }
+ _renderSurface->fillRect(*rect, color);
return S_OK;
}
@@ -243,7 +252,7 @@ HRESULT CBRenderSDL::Fade(uint16 Alpha) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::FadeToColor(uint32 Color, RECT *rect) {
+HRESULT CBRenderSDL::FadeToColor(uint32 Color, Common::Rect *rect) {
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
diff --git a/engines/wintermute/Base/BRenderSDL.h b/engines/wintermute/Base/BRenderSDL.h
index 6718e33f86..ab343578f4 100644
--- a/engines/wintermute/Base/BRenderSDL.h
+++ b/engines/wintermute/Base/BRenderSDL.h
@@ -47,10 +47,10 @@ public:
HRESULT InitRenderer(int width, int height, bool windowed);
HRESULT Flip();
- HRESULT Fill(byte r, byte g, byte b, RECT *rect);
+ HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect);
HRESULT Fade(uint16 Alpha);
- HRESULT FadeToColor(uint32 Color, RECT *rect = NULL);
+ HRESULT FadeToColor(uint32 Color, Common::Rect *rect = NULL);
HRESULT SwitchFullscreen();
diff --git a/engines/wintermute/Base/BRenderer.cpp b/engines/wintermute/Base/BRenderer.cpp
index ba7b0bb405..9c48c93070 100644
--- a/engines/wintermute/Base/BRenderer.cpp
+++ b/engines/wintermute/Base/BRenderer.cpp
@@ -138,7 +138,7 @@ void CBRenderer::OnWindowChange() {
//////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::Fill(byte r, byte g, byte b, RECT *rect) {
+HRESULT CBRenderer::Fill(byte r, byte g, byte b, Common::Rect *rect) {
return E_FAIL;
}
@@ -186,7 +186,7 @@ HRESULT CBRenderer::Fade(uint16 Alpha) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::FadeToColor(uint32 Color, RECT *rect) {
+HRESULT CBRenderer::FadeToColor(uint32 Color, Common::Rect *rect) {
return E_FAIL;
}
diff --git a/engines/wintermute/Base/BRenderer.h b/engines/wintermute/Base/BRenderer.h
index 91d0f211c6..a13082b1b2 100644
--- a/engines/wintermute/Base/BRenderer.h
+++ b/engines/wintermute/Base/BRenderer.h
@@ -32,6 +32,7 @@
#include "engines/wintermute/coll_templ.h"
#include "engines/wintermute/Base/BBase.h"
+#include "common/rect.h"
namespace WinterMute {
@@ -52,7 +53,7 @@ public:
virtual HRESULT SetViewport(RECT *Rect);
virtual HRESULT SetScreenViewport();
virtual HRESULT Fade(uint16 Alpha);
- virtual HRESULT FadeToColor(uint32 Color, RECT *rect = NULL);
+ virtual HRESULT FadeToColor(uint32 Color, Common::Rect *rect = NULL);
virtual HRESULT DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
virtual HRESULT DrawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width = 1);
CBRenderer(CBGame *inGame = NULL);
@@ -62,7 +63,7 @@ public:
};
virtual HRESULT WindowedBlt();
- virtual HRESULT Fill(byte r, byte g, byte b, RECT *rect = NULL);
+ virtual HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
virtual void OnWindowChange();
virtual HRESULT InitRenderer(int width, int height, bool windowed);
virtual HRESULT Flip();