aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-01-06 13:33:28 +0000
committerTorbjörn Andersson2004-01-06 13:33:28 +0000
commiteb5c4a14499f09050ec1b9868c1eacbad93422d1 (patch)
tree1ec85814adf33ad2a45c36517b669786e7473b44
parentdd1eb2a4b4b0eef3a771ba67d24e737f4f016e8d (diff)
downloadscummvm-rg350-eb5c4a14499f09050ec1b9868c1eacbad93422d1.tar.gz
scummvm-rg350-eb5c4a14499f09050ec1b9868c1eacbad93422d1.tar.bz2
scummvm-rg350-eb5c4a14499f09050ec1b9868c1eacbad93422d1.zip
Made sure the screen is really cleared when drawing a dialog window, plus
some other cleanups. (This was a regression caused by the less stupid screen updates implemented recently.) svn-id: r12180
-rw-r--r--sword2/build_display.cpp8
-rw-r--r--sword2/controls.cpp9
-rw-r--r--sword2/function.cpp2
-rw-r--r--sword2/mouse.cpp6
4 files changed, 8 insertions, 17 deletions
diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp
index 709f221012..36dd1c41a1 100644
--- a/sword2/build_display.cpp
+++ b/sword2/build_display.cpp
@@ -51,14 +51,6 @@ void Sword2Engine::buildDisplay(void) {
_graphics->startRenderCycle();
while (1) {
- // clear the back buffer, before building up the new
- // screen from the back forwards
-
- // FIXME: I'm not convinced that this is needed. Isn't
- // the whole screen redrawn each time?
-
- // _graphics->clearScene();
-
// first background parallax + related anims
// open the screen resource
diff --git a/sword2/controls.cpp b/sword2/controls.cpp
index 68ce63e2bd..e195357df9 100644
--- a/sword2/controls.cpp
+++ b/sword2/controls.cpp
@@ -249,6 +249,13 @@ void FontRendererGui::drawText(int textId, int x, int y, int alignment) {
Dialog::Dialog(Gui *gui)
: _numWidgets(0), _finish(false), _result(0), _gui(gui) {
_gui->_vm->setFullPalette(CONTROL_PANEL_PALETTE);
+ _gui->_vm->_graphics->clearScene();
+
+ // HACK: Since the dialogs don't do normal scene updates we need to
+ // trigger a full redraw manually.
+
+ _gui->_vm->_graphics->setNeedFullRedraw();
+ _gui->_vm->_graphics->updateDisplay();
}
Dialog::~Dialog() {
@@ -1555,8 +1562,6 @@ void Gui::restartControl(void) {
// In case we were dead - well we're not anymore!
DEAD = 0;
- _vm->_graphics->clearScene();
-
// Restart the game. Clear all memory and reset the globals
temp_demo_flag = DEMO;
diff --git a/sword2/function.cpp b/sword2/function.cpp
index 158309b2bf..f6155eeb18 100644
--- a/sword2/function.cpp
+++ b/sword2/function.cpp
@@ -606,8 +606,6 @@ int32 Logic::fnPlayCredits(int32 *params) {
fnPlayMusic(pars);
_vm->_graphics->clearScene();
- _vm->_graphics->setNeedFullRedraw();
- _vm->_graphics->updateDisplay();
_vm->_graphics->fadeUp(0);
spriteInfo.scale = 0;
diff --git a/sword2/mouse.cpp b/sword2/mouse.cpp
index 9701863e16..8ea6c3f5f5 100644
--- a/sword2/mouse.cpp
+++ b/sword2/mouse.cpp
@@ -188,9 +188,6 @@ void Sword2Engine::systemMenuMouse(void) {
// restore proper looping_music_id
_loopingMusicId = safe_looping_music_id;
- // clear the screen & set up the new palette for the menus
-
- _graphics->clearScene();
_graphics->processMenu();
// call the relevent screen
@@ -223,9 +220,8 @@ void Sword2Engine::systemMenuMouse(void) {
buildSystemMenu();
}
- // Clear the screen & restore the location palette
+ // Back to the game again
- _graphics->clearScene();
_graphics->processMenu();
// Reset game palette, but not after a successful restore or restart!