[Scummvm-cvs-logs] SF.net SVN: scummvm:[42397] scummvm/branches/gsoc2009-16bit

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Jul 12 00:58:29 CEST 2009


Revision: 42397
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42397&view=rev
Author:   Kirben
Date:     2009-07-11 22:58:29 +0000 (Sat, 11 Jul 2009)

Log Message:
-----------
Merged revisions 42382,42385-42387,42393-42394 via svnmerge from 
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk

........
  r42382 | Kirben | 2009-07-11 22:23:42 +1000 (Sat, 11 Jul 2009) | 1 line
  
  Fix pinball type mini game in Putt-Putt Enters The Race.
........
  r42385 | wjpalenstijn | 2009-07-12 01:00:40 +1000 (Sun, 12 Jul 2009) | 3 lines
  
  SCI: don't let TimerSongIterator loop forever, and don't immediately
  signal completion when starting it. This fixes a sync issue with
  the departing spaceship at the start of SQ4CD (after the intro).
........
  r42386 | thebluegr | 2009-07-12 02:07:14 +1000 (Sun, 12 Jul 2009) | 1 line
  
  If we fail to auto-detect either the volume or the map version, set the one to be equal to the other
........
  r42387 | thebluegr | 2009-07-12 03:25:49 +1000 (Sun, 12 Jul 2009) | 1 line
  
  Removed the version parameter from GfxResManager
........
  r42393 | thebluegr | 2009-07-12 05:00:56 +1000 (Sun, 12 Jul 2009) | 1 line
  
  Some work on QFG1VGA (looks like a mix of SCI1 and SCI1.1)
........
  r42394 | thebluegr | 2009-07-12 05:38:41 +1000 (Sun, 12 Jul 2009) | 1 line
  
  Changed an incorrect warning back to scidprintf - the relevant message is for testing only
........

Modified Paths:
--------------
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/ksound.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.y
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.h
    scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/resource.cpp
    scummvm/branches/gsoc2009-16bit/engines/sci/sfx/iterator.cpp
    scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.cpp

Property Changed:
----------------
    scummvm/branches/gsoc2009-16bit/


Property changes on: scummvm/branches/gsoc2009-16bit
___________________________________________________________________
Modified: svnmerge-integrated
   - /scummvm/trunk:1-42380 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703
   + /scummvm/trunk:1-42396 /scummvm/branches/gsoc2008-tfmx:1-31765 /scummvm/branches/gsoc2008-gui:1-31703

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/engine/ksound.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/engine/ksound.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -823,7 +823,6 @@
 				sampleLen = s->_sound.startAudio(65535, number);
 				// Also create iterator, that will fire SI_FINISHED event, when the sound is done playing
 				s->_sound.sfx_add_song(build_timeriterator(s, sampleLen), 0, handle, number);
-				PUT_SEL32V(obj, signal, sampleLen);
 			} else {
 				if (!s->resmgr->testResource(ResourceId(kResourceTypeSound, number))) {
 					warning("Could not open song number %d", number);

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -2314,7 +2314,7 @@
 
 	}
 
-	warning("augment_match_expression_p(): Generic failure");
+	scidprintf("augment_match_expression_p(): Generic failure\n");
 
 	return 0;
 }

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.y
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.y	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/engine/said.y	2009-07-11 22:58:29 UTC (rev 42397)
@@ -670,7 +670,7 @@
 
 	}
 
-	scidprintf("Generic failure\n");
+	scidprintf("augment_match_expression_p(): Generic failure\n");
 
 	return 0;
 }

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -49,13 +49,19 @@
 	GfxDriver *driver;
 };
 
-GfxResManager::GfxResManager(int version, gfx_options_t *options, GfxDriver *driver, ResourceManager *resManager) :
-				_version(version), _options(options), _driver(driver), _resManager(resManager),
+GfxResManager::GfxResManager(gfx_options_t *options, GfxDriver *driver, ResourceManager *resManager) :
+				_options(options), _driver(driver), _resManager(resManager),
 				_lockCounter(0), _tagLockCounter(0), _staticPalette(0) {
 	gfxr_init_static_palette();
 
 	_portBounds = Common::Rect(0, 10, 320, 200);	// default value, with a titlebar of 10px
+	_version = resManager->_volVersion;
 
+	// Workaround for QFG1 VGA (has SCI 1.1 view data with SCI 1 compression)
+	if (_version == SCI_VERSION_1 && !strcmp(((SciEngine*)g_engine)->getGameID(), "qfg1")) {
+		_version = SCI_VERSION_1_1;
+	}
+
 	if (!_resManager->isVGA()) {
 		_staticPalette = gfx_sci0_pic_colors->getref();
 	} else if (_version == SCI_VERSION_1_1) {

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.h	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/gfx/gfx_resmgr.h	2009-07-11 22:58:29 UTC (rev 42397)
@@ -90,9 +90,7 @@
 /** Graphics resource manager */
 class GfxResManager {
 public:
-	GfxResManager(int version, gfx_options_t *options,
-			GfxDriver *driver, ResourceManager *resManager);
-
+	GfxResManager(gfx_options_t *options, GfxDriver *driver, ResourceManager *resManager);
 	~GfxResManager();
 
 	/**

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/gfx/operations.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -424,7 +424,7 @@
 
 	state->driver = new GfxDriver(xfact, yfact, mode);
 
-	state->gfxResMan = new GfxResManager(version, state->options, state->driver, resManager);
+	state->gfxResMan = new GfxResManager(state->options, state->driver, resManager);
 	
 	gfxop_set_clip_zone(state, gfx_rect(0, 0, 320, 200));
 

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/resource.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/resource.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/resource.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -470,6 +470,15 @@
 	} else {
 		_mapVersion = detectMapVersion();
 		_volVersion = detectVolVersion();
+		if (_volVersion == 0 && _mapVersion > 0) {
+			warning("Volume version not detected, but map version has been detected. Setting volume version to map version");
+			_volVersion = _mapVersion;
+		}
+
+		if (_mapVersion == 0 && _volVersion > 0) {
+			warning("Map version not detected, but volume version has been detected. Setting map version to volume version");
+			_mapVersion = _volVersion;
+		}
 	}
 	debug("Using resource map version %d %s", _mapVersion, versionNames[_mapVersion]);
 	debug("Using volume version %d %s", _volVersion, versionNames[_volVersion]);
@@ -528,6 +537,12 @@
 		}
 	}
 
+	// Workaround for QFG1 VGA (has SCI 1.1 view data with SCI 1 compression)
+	if (version == SCI_VERSION_1 && !strcmp(((SciEngine*)g_engine)->getGameID(), "qfg1")) {
+		debug("Resmgr: Detected QFG1 VGA");
+		_isVGA = true;
+	}
+
 	_sciVersion = version;
 	// temporary version printout - should be reworked later
 	switch (_sciVersion) {
@@ -712,7 +727,7 @@
 		}
 	}
 	if (file.isOpen() == false) {
-		warning("Failed to open resource map file");
+		error("Failed to open resource map file");
 		return SCI_VERSION_AUTODETECT;
 	}
 	// detection
@@ -792,7 +807,7 @@
 		}
 	}
 	if (file.isOpen() == false) {
-		warning("Failed to open volume file");
+		error("Failed to open volume file");
 		return SCI_VERSION_AUTODETECT;
 	}
 	// SCI0 volume format:  {wResId wPacked+4 wUnpacked wCompression} = 8 bytes

Modified: scummvm/branches/gsoc2009-16bit/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/sci/sfx/iterator.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/sci/sfx/iterator.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -1173,7 +1173,9 @@
 
 int TimerSongIterator::nextCommand(byte *buf, int *result) {
 	if (_delta) {
-	   return _delta;
+		int d = _delta;
+		_delta = 0;
+		return d;
 	}
 	return SI_FINISHED;
 }

Modified: scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.cpp	2009-07-11 21:30:30 UTC (rev 42396)
+++ scummvm/branches/gsoc2009-16bit/engines/scumm/he/logic_he.cpp	2009-07-11 22:58:29 UTC (rev 42397)
@@ -357,8 +357,8 @@
 	const double scalarProduct = x * args[0] + y * args[1];
 
 	// Finally compute the projection of (arg2,arg3) onto (arg0,arg1)
-	double projX = args[0] - 2 * scalarProduct * args[2];
-	double projY = args[1] - 2 * scalarProduct * args[3];
+	double projX = args[0] - 2 * scalarProduct * x;
+	double projY = args[1] - 2 * scalarProduct * y;
 
 	projX = projX * 20.0 / 23.0;	// FIXME: Why is this here?
 


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