[Scummvm-cvs-logs] scummvm master -> 4e1face8901ab1f997242a9c927836005be37ba5

bluegr md5 at scummvm.org
Mon Oct 10 11:29:45 CEST 2011


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

Summary:
32b4ef8199 SCI: SCI32 kernel functions kRepaintPlane and kInputText are unused
4e1face890 SCI: Mixed Adlib/MIDI mode for audio resources should always be enabled in SCI32


Commit: 32b4ef8199b00edc3e048355e47e0b165b3206de
    https://github.com/scummvm/scummvm/commit/32b4ef8199b00edc3e048355e47e0b165b3206de
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-10-10T02:18:12-07:00

Commit Message:
SCI: SCI32 kernel functions kRepaintPlane and kInputText are unused

Changed paths:
    engines/sci/engine/kernel.h
    engines/sci/engine/kernel_tables.h
    engines/sci/engine/kgraphics.cpp
    engines/sci/graphics/frameout.cpp
    engines/sci/graphics/frameout.h



diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index b605908..e3e3f51 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -446,7 +446,6 @@ reg_t kCreateTextBitmap(EngineState *s, int argc, reg_t *argv);
 reg_t kAddPlane(EngineState *s, int argc, reg_t *argv);
 reg_t kDeletePlane(EngineState *s, int argc, reg_t *argv);
 reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv);
-reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv);
 reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv);
 reg_t kGetHighPlanePri(EngineState *s, int argc, reg_t *argv);
 reg_t kFrameOut(EngineState *s, int argc, reg_t *argv);
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 2ed5e6c..22f9c95 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -493,7 +493,6 @@ static SciKernelMapEntry s_kernelMap[] = {
 	// our own memory manager and garbage collector, thus we simply call FlushResources, which in turn invokes
 	// our garbage collector (i.e. the SCI0-SCI1.1 semantics).
 	{ "Purge", kFlushResources,    SIG_EVERYWHERE,           "i",                     NULL,            NULL },
-	{ MAP_CALL(RepaintPlane),      SIG_EVERYWHERE,           "o",                     NULL,            NULL },
 	{ MAP_CALL(SetShowStyle),      SIG_EVERYWHERE,           "ioiiiii([ri])(i)",      NULL,            NULL },
 	{ MAP_CALL(String),            SIG_EVERYWHERE,           "(.*)",                  NULL,            NULL },
 	{ MAP_CALL(UpdatePlane),       SIG_EVERYWHERE,           "o",                     NULL,            NULL },
@@ -540,7 +539,7 @@ static SciKernelMapEntry s_kernelMap[] = {
 	// are marked as dummy, so if they're ever used the engine will error out.
 	{ MAP_DUMMY(AddMagnify),       SIG_EVERYWHERE,           "(.*)",                  NULL,            NULL },
 	{ MAP_DUMMY(DeleteMagnify),    SIG_EVERYWHERE,           "(.*)",                  NULL,            NULL },
-
+	{ MAP_DUMMY(RepaintPlane),     SIG_EVERYWHERE,           "o",                     NULL,            NULL },
 	{ MAP_DUMMY(InspectObject),    SIG_EVERYWHERE,           "(.*)",                  NULL,            NULL },
 	// Profiler (same as SCI0-SCI1.1)
 	// Record (same as SCI0-SCI1.1)
@@ -812,7 +811,7 @@ static const char *const sci2_default_knames[] = {
 	/*0x19*/ "AddPlane",
 	/*0x1a*/ "DeletePlane",
 	/*0x1b*/ "UpdatePlane",
-	/*0x1c*/ "RepaintPlane",
+	/*0x1c*/ "RepaintPlane",		// unused function
 	/*0x1d*/ "SetShowStyle",
 	/*0x1e*/ "ShowStylePercent",	// unused function
 	/*0x1f*/ "SetScroll",
@@ -828,7 +827,7 @@ static const char *const sci2_default_knames[] = {
 	/*0x29*/ "Dummy",
 	/*0x2a*/ "SetQuitStr",
 	/*0x2b*/ "EditText",
-	/*0x2c*/ "InputText",	// unused function
+	/*0x2c*/ "InputText",			// unused function
 	/*0x2d*/ "CreateTextBitmap",
 	/*0x2e*/ "DisposeTextBitmap",
 	/*0x2f*/ "GetEvent",
@@ -1024,7 +1023,7 @@ static const char *const sci21_default_knames[] = {
 	/*0x48*/ "Message",
 	/*0x49*/ "Font",
 	/*0x4a*/ "EditText",
-	/*0x4b*/ "InputText",
+	/*0x4b*/ "InputText",		// unused function
 	/*0x4c*/ "ScrollWindow",	// Dummy in SCI3
 	/*0x4d*/ "Dummy",
 	/*0x4e*/ "Dummy",
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 3d8a777..4b35864 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1316,11 +1316,6 @@ reg_t kUpdatePlane(EngineState *s, int argc, reg_t *argv) {
 	return s->r_acc;
 }
 
-reg_t kRepaintPlane(EngineState *s, int argc, reg_t *argv) {
-	g_sci->_gfxFrameout->kernelRepaintPlane(argv[0]);
-	return s->r_acc;
-}
-
 reg_t kAddPicAt(EngineState *s, int argc, reg_t *argv) {
 	reg_t planeObj = argv[0];
 	GuiResourceId pictureId = argv[1].toUint16();
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index e4d921a..432ad05 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -170,10 +170,6 @@ void GfxFrameout::kernelUpdatePlane(reg_t object) {
 	error("kUpdatePlane called on plane that wasn't added before");
 }
 
-void GfxFrameout::kernelRepaintPlane(reg_t object) {
-	// TODO
-}
-
 void GfxFrameout::kernelDeletePlane(reg_t object) {
 	deletePlanePictures(object);
 	for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); it++) {
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index d2c8086..4e0f312 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -89,7 +89,6 @@ public:
 
 	void kernelAddPlane(reg_t object);
 	void kernelUpdatePlane(reg_t object);
-	void kernelRepaintPlane(reg_t object);
 	void kernelDeletePlane(reg_t object);
 	void kernelAddScreenItem(reg_t object);
 	void kernelUpdateScreenItem(reg_t object);


Commit: 4e1face8901ab1f997242a9c927836005be37ba5
    https://github.com/scummvm/scummvm/commit/4e1face8901ab1f997242a9c927836005be37ba5
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-10-10T02:20:52-07:00

Commit Message:
SCI: Mixed Adlib/MIDI mode for audio resources should always be enabled in SCI32

Changed paths:
    engines/sci/sound/soundcmd.cpp



diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index b4776b3..e7d294d 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -37,7 +37,15 @@ SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segM
 
 	_music = new SciMusic(_soundVersion);
 	_music->init();
+	// Check if the user wants synthesized or digital sound effects in SCI1.1
+	// or later games
 	_bMultiMidi = ConfMan.getBool("multi_midi");
+	// In SCI2 and later games, this check should always be true - there was
+	// always only one version of each sound effect or digital music track
+	// (e.g. the menu music in GK1 - there is a sound effect with the same
+	// resource number, but it's totally unrelated to the menu music).
+	if (getSciVersion() >= SCI_VERSION_2)
+		_bMultiMidi = true;
 }
 
 SoundCommandParser::~SoundCommandParser() {
@@ -83,12 +91,8 @@ void SoundCommandParser::initSoundResource(MusicEntry *newSound) {
 	if (checkAudioResource && _resMan->testResource(ResourceId(kResourceTypeAudio, newSound->resourceId))) {
 		// Found a relevant audio resource, create an audio stream if there is
 		// no associated sound resource, or if both resources exist and the
-		// user wants the digital version. In SCI2 and later games, this check
-		// doesn't apply - there was always only one version of each sound
-		// effect or digital music track (e.g. the menu music in GK1 - there is
-		// a sound effect with the same resource number, but it's totally
-		// unrelated to the menu music).
-		if (_bMultiMidi || !newSound->soundRes || getSciVersion() >= SCI_VERSION_2) {
+		// user wants the digital version.
+		if (_bMultiMidi || !newSound->soundRes) {
 			int sampleLen;
 			newSound->pStreamAud = _audio->getAudioStream(newSound->resourceId, 65535, &sampleLen);
 			newSound->soundType = Audio::Mixer::kSpeechSoundType;






More information about the Scummvm-git-logs mailing list