Fix newgui crash, and commit patch 600645: Loom flashlight fix
svn-id: r4958
This commit is contained in:
parent
ab2eb4d928
commit
978e879009
4 changed files with 15 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -966,7 +966,7 @@ void Actor::animateCostume()
|
|||
}
|
||||
}
|
||||
|
||||
void Scumm::setActorRedrawFlags()
|
||||
void Scumm::setActorRedrawFlags(bool fg, bool bg)
|
||||
{
|
||||
int i, j;
|
||||
uint32 bits;
|
||||
|
@ -974,7 +974,9 @@ void Scumm::setActorRedrawFlags()
|
|||
if (_fullRedraw) {
|
||||
for (j = 0; j < NUM_ACTORS; j++) {
|
||||
Actor *a = derefActor(j);
|
||||
if (fg)
|
||||
a->needRedraw = true;
|
||||
if (bg)
|
||||
a->needBgReset = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -984,7 +986,9 @@ void Scumm::setActorRedrawFlags()
|
|||
for (j = 0; j < NUM_ACTORS; j++) {
|
||||
if ((bits & (1 << j)) && bits != (uint32)(1 << j)) {
|
||||
Actor *a = derefActor(j);
|
||||
if (fg)
|
||||
a->needRedraw = true;
|
||||
if (bg)
|
||||
a->needBgReset = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue