[Scummvm-git-logs] scummvm master -> 5dd961884276cfb3f5d5ae95b3c2440582ced917

csnover csnover at users.noreply.github.com
Sat Apr 29 21:36:11 CEST 2017


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
53fb26550d VIDEO: Unexpose audio sync API in AdvancedVMDDecoder
75c6b1fd3b SCI32: Promote GK2 and Torin demos to AGDF_TESTING
5dd9618842 SCI32: Remove unnecessary GfxFrameout::_frameNowVisible


Commit: 53fb26550d3f12cfdb61cd1b55bf4d69422a2d05
    https://github.com/scummvm/scummvm/commit/53fb26550d3f12cfdb61cd1b55bf4d69422a2d05
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-04-29T14:30:09-05:00

Commit Message:
VIDEO: Unexpose audio sync API in AdvancedVMDDecoder

This change was inadvertently added in commit
44dd029cb17160316b2015321a0a53f8854b6dd3 but is not actually used.

Changed paths:
    video/coktel_decoder.cpp
    video/coktel_decoder.h


diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 4c9ef67..905ffd6 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -2779,7 +2779,6 @@ void VMDDecoder::setAutoStartSound(bool autoStartSound) {
 AdvancedVMDDecoder::AdvancedVMDDecoder(Audio::Mixer::SoundType soundType) {
 	_decoder = new VMDDecoder(g_system->getMixer(), soundType);
 	_decoder->setAutoStartSound(false);
-	_useAudioSync = true;
 }
 
 AdvancedVMDDecoder::~AdvancedVMDDecoder() {
diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h
index 726d052..44de1c7 100644
--- a/video/coktel_decoder.h
+++ b/video/coktel_decoder.h
@@ -569,11 +569,6 @@ public:
 	void close();
 
 	void setSurfaceMemory(void *mem, uint16 width, uint16 height, uint8 bpp);
-	void setAudioSync(bool sync) { _useAudioSync = sync; }
-
-protected:
-	bool _useAudioSync;
-	bool useAudioSync() const { return _useAudioSync; }
 
 private:
 	class VMDVideoTrack : public FixedRateVideoTrack {


Commit: 75c6b1fd3bf34e37e5aa5b6b6bfce355091d2e4a
    https://github.com/scummvm/scummvm/commit/75c6b1fd3bf34e37e5aa5b6b6bfce355091d2e4a
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-04-29T14:30:09-05:00

Commit Message:
SCI32: Promote GK2 and Torin demos to AGDF_TESTING

Changed paths:
    engines/sci/detection_tables.h


diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 9c8ed4d..c2ca7c9 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -863,7 +863,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		{"resource.map", 0, "e0effce11c4908f4b91838741716c83d", 1351},
 		{"resource.000", 0, "d04cfc7f04b6f74d13025378be49ec2b", 4640330},
 		AD_LISTEND},
-		Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_GK2_DEMO },
+		Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_TESTING, GUIO_GK2_DEMO },
 
 	// Gabriel Knight 2 - English DOS (GOG version) - ressci.* merged in ressci.000
 	// using Enrico Rolfi's HD/DVD installer: http://gkpatches.vogons.zetafleet.com/
@@ -4642,7 +4642,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
 		{"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403},
 		{"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868},
 		AD_LISTEND},
-		Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE | ADGF_CD, GUIO_TORIN_DEMO },
+		Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_TESTING | ADGF_CD, GUIO_TORIN_DEMO },
 
 	// Torin's Passage (Multilingual) - English Windows CD
 	// SCI interpreter version 2.100.002


Commit: 5dd961884276cfb3f5d5ae95b3c2440582ced917
    https://github.com/scummvm/scummvm/commit/5dd961884276cfb3f5d5ae95b3c2440582ced917
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-04-29T14:31:01-05:00

Commit Message:
SCI32: Remove unnecessary GfxFrameout::_frameNowVisible

This flag was used in SSCI to read from VRAM instead of from the
back buffer when a mouse interrupt was received in the middle of
a back buffer update. Since ScummVM controls when mouse events
are received via polling, it is not possible to receive a mouse
event in the middle of back buffer updates, so this code is
unnecessary for the engine to work properly.

This also fixes Valgrind warnings about use of uninitialized
memory at the start of the game, caused by not filling the cursor
memory buffers because `_frameNowVisible` was false until the first
frame was rendered.

Changed paths:
    engines/sci/graphics/cursor32.cpp
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/frameout.h


diff --git a/engines/sci/graphics/cursor32.cpp b/engines/sci/graphics/cursor32.cpp
index e8450b7..2f74873 100644
--- a/engines/sci/graphics/cursor32.cpp
+++ b/engines/sci/graphics/cursor32.cpp
@@ -287,14 +287,13 @@ void GfxCursor32::setView(const GuiResourceId viewId, const int16 loopNo, const
 }
 
 void GfxCursor32::readVideo(DrawRegion &target) {
-	if (g_sci->_gfxFrameout->_frameNowVisible) {
-		copy(target, _vmapRegion);
-	} else {
-		// NOTE: SSCI would read the background for the cursor directly out of
-		// video memory here, but this is not necessary in ScummVM because mouse
-		// events in ScummVM are polled so can never interrupt the renderer
-		// between frames
-	}
+	// NOTE: In SSCI, mouse events were received via hardware interrupt, so
+	// there was a separate branch here that would read from VRAM instead of
+	// from the game's back buffer when a mouse event was received while the
+	// back buffer was being updated. In ScummVM, mouse events are polled, which
+	// means it is not possible to receive a mouse event during a back buffer
+	// update, so the code responsible for handling that is removed.
+	copy(target, _vmapRegion);
 }
 
 void GfxCursor32::copy(DrawRegion &target, const DrawRegion &source) {
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 4799276..259e3a0 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -69,7 +69,6 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio
 	_throttleFrameOut(true),
 	_throttleState(0),
 	_remapOccurred(false),
-	_frameNowVisible(false),
 	_overdrawThreshold(0),
 	_palMorphIsOn(false) {
 
@@ -467,11 +466,6 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
 
 	_remapOccurred = _palette->updateForFrame();
 
-	// NOTE: SCI engine set this to false on each loop through the
-	// planelist iterator below. Since that is a waste, we only set
-	// it once.
-	_frameNowVisible = false;
-
 	for (PlaneList::size_type i = 0; i < _planes.size(); ++i) {
 		drawEraseList(eraseLists[i], *_planes[i]);
 		drawScreenItemList(screenItemLists[i]);
@@ -487,8 +481,6 @@ void GfxFrameout::frameOut(const bool shouldShowBits, const Common::Rect &eraseR
 		showBits();
 	}
 
-	_frameNowVisible = true;
-
 	if (robotIsActive) {
 		robotPlayer.frameNowVisible();
 	}
@@ -528,7 +520,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
 	}
 
 	_remapOccurred = _palette->updateForFrame();
-	_frameNowVisible = false;
 
 	for (PlaneList::size_type i = 0; i < _planes.size(); ++i) {
 		drawEraseList(eraseLists[i], *_planes[i]);
@@ -564,8 +555,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
 		showBits();
 	}
 
-	_frameNowVisible = true;
-
 	for (PlaneList::iterator plane = _planes.begin(); plane != _planes.end(); ++plane) {
 		(*plane)->_redrawAllCount = getScreenCount();
 	}
@@ -586,9 +575,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
 	}
 
 	_remapOccurred = _palette->updateForFrame();
-	// NOTE: During this second loop, `_frameNowVisible = false` is
-	// inside the next loop in SCI2.1mid
-	_frameNowVisible = false;
 
 	for (PlaneList::size_type i = 0; i < _planes.size(); ++i) {
 		drawEraseList(eraseLists[i], *_planes[i]);
@@ -599,8 +585,6 @@ void GfxFrameout::palMorphFrameOut(const int8 *styleRanges, PlaneShowStyle *show
 	_palette->updateFFrame();
 	_palette->updateHardware(false);
 	showBits();
-
-	_frameNowVisible = true;
 }
 
 /**
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 208c5b4..1462115 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -307,13 +307,6 @@ private:
 
 public:
 	/**
-	 * Whether or not the data in the current buffer is what
-	 * is visible to the user. During rendering updates,
-	 * this flag is set to false.
-	 */
-	bool _frameNowVisible;
-
-	/**
 	 * Whether palMorphFrameOut should be used instead of
 	 * frameOut for rendering. Used by kMorphOn to
 	 * explicitly enable palMorphFrameOut for one frame.





More information about the Scummvm-git-logs mailing list