[Scummvm-cvs-logs] SF.net SVN: scummvm: [23216] scummvm/trunk/engines/scumm
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Wed Jun 21 12:28:18 CEST 2006
Revision: 23216
Author: kirben
Date: 2006-06-21 03:28:09 -0700 (Wed, 21 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23216&view=rev
Log Message:
-----------
Add cyx's patch for bug #1035739 - SCUMM/SMUSH: Ugly palette change when video finishes
Modified Paths:
--------------
scummvm/trunk/engines/scumm/gfx.cpp
scummvm/trunk/engines/scumm/script_v6.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/scumm.h
scummvm/trunk/engines/scumm/smush/smush_player.cpp
Modified: scummvm/trunk/engines/scumm/gfx.cpp
===================================================================
--- scummvm/trunk/engines/scumm/gfx.cpp 2006-06-21 06:58:22 UTC (rev 23215)
+++ scummvm/trunk/engines/scumm/gfx.cpp 2006-06-21 10:28:09 UTC (rev 23216)
@@ -3028,6 +3028,16 @@
#pragma mark -
void ScummEngine::fadeIn(int effect) {
+ if (_disableFadeInEffect) {
+ // fadeIn() calls can be disabled in TheDig after a SMUSH movie
+ // has been played. Like the original interpreter, we introduce
+ // an extra flag to handle this.
+ _disableFadeInEffect = false;
+ _doEffect = false;
+ _screenEffectFlag = true;
+ return;
+ }
+
updatePalette();
switch (effect) {
@@ -3079,7 +3089,11 @@
if (!(_game.features & GF_NEW_CAMERA))
camera._last.x = camera._cur.x;
- if (_screenEffectFlag && effect != 0) {
+ // TheDig can disable fadeIn(), and may call fadeOut() several times
+ // successively. Disabling the _screenEffectFlag check forces the screen
+ // to get cleared. This fixes glitches, at least, in the first cutscenes
+ // when bypassed of FT and TheDig.
+ if ((_game.version == 7 || _screenEffectFlag) && effect != 0) {
// Fill screen 0 with black
memset(vs->getPixels(0, 0), 0, vs->pitch * vs->h);
@@ -3178,9 +3192,9 @@
for (i = 0; i < 16; i++)
tab_2[i] += delta[i];
- // Draw the current state to the screen and wait half a sec so the user
- // can watch the effect taking place.
- waitForTimer(30);
+ // Draw the current state to the screen and wait a few secs so the
+ // user can watch the effect taking place.
+ waitForTimer(VAR_FADE_DELAY != 0xFF ? VAR(VAR_FADE_DELAY) * 10 : 30);
}
}
Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp 2006-06-21 06:58:22 UTC (rev 23215)
+++ scummvm/trunk/engines/scumm/script_v6.cpp 2006-06-21 10:28:09 UTC (rev 23216)
@@ -2535,6 +2535,10 @@
else
sp->play((char *)getStringAddressVar(VAR_VIDEONAME));
delete sp;
+
+ if (_game.id == GID_DIG) {
+ _disableFadeInEffect = true;
+ }
} else if (_game.id == GID_FT) {
const int insaneVarNum = ((_game.features & GF_DEMO) && (_game.platform == Common::kPlatformPC))
? 232 : 233;
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2006-06-21 06:58:22 UTC (rev 23215)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2006-06-21 10:28:09 UTC (rev 23216)
@@ -364,6 +364,7 @@
_bgNeedsRedraw = false;
_screenEffectFlag = false;
_completeScreenRedraw = false;
+ _disableFadeInEffect = false;
memset(&_cursor, 0, sizeof(_cursor));
memset(_grabbedCursor, 0, sizeof(_grabbedCursor));
_currentCursor = 0;
@@ -1549,8 +1550,6 @@
while (!_quit) {
- updatePalette();
-
diff -= _system->getMillis();
waitForTimer(delta * 15 + diff);
diff = _system->getMillis();
@@ -1595,6 +1594,10 @@
// that it will be in a different state each time you run the program.
_rnd.getRandomNumber(2);
+ if (_game.version <= 6) {
+ updatePalette();
+ }
+
#ifndef DISABLE_HE
if (_game.heversion >= 90) {
((ScummEngine_v90he *)this)->_moviePlay->handleNextFrame();
@@ -1755,6 +1758,9 @@
handleMouseOver(oldEgo != VAR(VAR_EGO));
// Render everything to the screen.
+ if (_game.version >= 7) {
+ updatePalette();
+ }
drawDirtyScreenParts();
// FIXME / TODO: Try to move the following to scummLoop_handleSound or
Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h 2006-06-21 06:58:22 UTC (rev 23215)
+++ scummvm/trunk/engines/scumm/scumm.h 2006-06-21 10:28:09 UTC (rev 23216)
@@ -976,6 +976,7 @@
//ender: fullscreen
bool _fullRedraw, _bgNeedsRedraw;
bool _screenEffectFlag, _completeScreenRedraw;
+ bool _disableFadeInEffect;
struct {
int hotspotX, hotspotY, width, height;
Modified: scummvm/trunk/engines/scumm/smush/smush_player.cpp
===================================================================
--- scummvm/trunk/engines/scumm/smush/smush_player.cpp 2006-06-21 06:58:22 UTC (rev 23215)
+++ scummvm/trunk/engines/scumm/smush/smush_player.cpp 2006-06-21 10:28:09 UTC (rev 23216)
@@ -345,17 +345,11 @@
_vm->_fullRedraw = true;
- // WORKAROUND bug #1035739: This is hack to workaround some ugly palette
- // issues, see the mentioned bug report for details.
- _vm->_doEffect = false;
-
-
// HACK HACK HACK: This is an *evil* trick, beware! See above for
// some explanation.
_vm->virtscr[0].pitch = _origPitch;
_vm->gdi._numStrips = _origNumStrips;
-
_initDone = false;
}
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