diff options
author | James Brown | 2002-09-17 12:52:53 +0000 |
---|---|---|
committer | James Brown | 2002-09-17 12:52:53 +0000 |
commit | 978e879009e205f32b4579f8a77061a9619bc2ea (patch) | |
tree | dbb7357ea7d03a6da438ad1504b2bc55c2fec5a2 | |
parent | ab2eb4d928ff2dae94cce3bcb228c504964a9bf7 (diff) | |
download | scummvm-rg350-978e879009e205f32b4579f8a77061a9619bc2ea.tar.gz scummvm-rg350-978e879009e205f32b4579f8a77061a9619bc2ea.tar.bz2 scummvm-rg350-978e879009e205f32b4579f8a77061a9619bc2ea.zip |
Fix newgui crash, and commit patch 600645: Loom flashlight fix
svn-id: r4958
-rw-r--r-- | gui/dialog.cpp | 6 | ||||
-rw-r--r-- | scumm/actor.cpp | 14 | ||||
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 4 |
4 files changed, 15 insertions, 11 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index b2c5473383..54b50e8958 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -151,7 +151,7 @@ void Dialog::handleMouseDown(int x, int y, int button, int clickCount) _focusedWidget = w; } - if (w == _focusedWidget) + if (w && w == _focusedWidget) _focusedWidget->handleMouseDown(x - _focusedWidget->_x, y - _focusedWidget->_y, button, clickCount); } @@ -428,8 +428,8 @@ AboutDialog::AboutDialog(NewGui *gui) : Dialog (gui, 30, 20, 260, 124) { addButton(110, 100, 40, 16, CUSTOM_STRING(23), kCloseCmd, 'C'); // Close dialog - FIXME - new StaticTextWidget(this, 10, 10, 240, 16, "Build " SCUMMVM_VERSION " (" SCUMMVM_CVS ")", kTextAlignCenter); - new StaticTextWidget(this, 10, 30, 240, 16, "ScummVM http://scummvm.sourceforge.net", kTextAlignCenter); + new StaticTextWidget(this, 10, 10, 240, 16, "ScummVM " SCUMMVM_VERSION " (" SCUMMVM_CVS ")", kTextAlignCenter); + new StaticTextWidget(this, 10, 30, 240, 16, "http://scummvm.sourceforge.net", kTextAlignCenter); new StaticTextWidget(this, 10, 50, 240, 16, "All games (c) LucasArts", kTextAlignCenter); new StaticTextWidget(this, 10, 64, 240, 16, "Except", kTextAlignCenter); new StaticTextWidget(this, 10, 78, 240, 16, "Simon the Sorcerer (c) Adventuresoft", kTextAlignCenter); diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 6fad8ae9c1..bd94f91d83 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -966,7 +966,7 @@ void Actor::animateCostume() } } -void Scumm::setActorRedrawFlags() +void Scumm::setActorRedrawFlags(bool fg, bool bg) { int i, j; uint32 bits; @@ -974,8 +974,10 @@ void Scumm::setActorRedrawFlags() if (_fullRedraw) { for (j = 0; j < NUM_ACTORS; j++) { Actor *a = derefActor(j); - a->needRedraw = true; - a->needBgReset = true; + if (fg) + a->needRedraw = true; + if (bg) + a->needBgReset = true; } } else { for (i = 0; i < 40; i++) { @@ -984,8 +986,10 @@ void Scumm::setActorRedrawFlags() for (j = 0; j < NUM_ACTORS; j++) { if ((bits & (1 << j)) && bits != (uint32)(1 << j)) { Actor *a = derefActor(j); - a->needRedraw = true; - a->needBgReset = true; + if (fg) + a->needRedraw = true; + if (bg) + a->needBgReset = true; } } } diff --git a/scumm/scumm.h b/scumm/scumm.h index e7d50a00e9..4d26ad63fb 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -696,7 +696,7 @@ public: void walkActors(); void playActorSounds(); - void setActorRedrawFlags(); + void setActorRedrawFlags(bool fg, bool bg); void resetActorBgs(); void processActors(); int getActorFromPos(int x, int y); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 15a94864e8..df9dddf824 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -449,13 +449,13 @@ int Scumm::scummLoop(int delta) } processDrawQue(); - setActorRedrawFlags(); + setActorRedrawFlags(true, true); resetActorBgs(); if (!(_vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_screen) && _vars[VAR_CURRENT_LIGHTS] & LIGHTMODE_flashlight) { drawFlashlight(); - setActorRedrawFlags(); + setActorRedrawFlags(true, false); } processActors(); |