[Scummvm-cvs-logs] scummvm master -> a3bc17296b61448fa247a012d0c4013a32928118

DrMcCoy drmccoy at drmccoy.de
Fri Aug 26 07:52:08 CEST 2011


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

Summary:
a3bc17296b GOB: Add Geisha AdLib music opcodes


Commit: a3bc17296b61448fa247a012d0c4013a32928118
    https://github.com/scummvm/scummvm/commit/a3bc17296b61448fa247a012d0c4013a32928118
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2011-08-25T22:47:37-07:00

Commit Message:
GOB: Add Geisha AdLib music opcodes

adlibPlay() is commented out for now, until Strangerke fixes the
MDYPlayer. :P

Changed paths:
    engines/gob/detection_tables.h
    engines/gob/inter.h
    engines/gob/inter_geisha.cpp



diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h
index 0417383..4c1ff9a 100644
--- a/engines/gob/detection_tables.h
+++ b/engines/gob/detection_tables.h
@@ -2496,7 +2496,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			GUIO_NOSUBTITLES | GUIO_NOSPEECH
 		},
 		kGameTypeGeisha,
-		kFeaturesEGA,
+		kFeaturesEGA | kFeaturesAdLib,
 		"disk1.stk", "intro.tot", 0
 	},
 	{
@@ -2510,7 +2510,7 @@ static const GOBGameDescription gameDescriptions[] = {
 			GUIO_NOSUBTITLES | GUIO_NOSPEECH
 		},
 		kGameTypeGeisha,
-		kFeaturesEGA,
+		kFeaturesEGA | kFeaturesAdLib,
 		"disk1.stk", "intro.tot", 0
 	},
 	{
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index dc509b6..7946543 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -345,8 +345,13 @@ protected:
 	virtual void setupOpcodesGob();
 
 	void oGeisha_loadCursor(OpFuncParams &params);
+	void oGeisha_goblinFunc(OpFuncParams &params);
 	void oGeisha_loadSound(OpFuncParams &params);
 
+	void oGeisha_loadTitleMusic(OpGobParams &params);
+	void oGeisha_playMusic(OpGobParams &params);
+	void oGeisha_stopMusic(OpGobParams &params);
+
 	int16 loadSound(int16 slot);
 };
 
diff --git a/engines/gob/inter_geisha.cpp b/engines/gob/inter_geisha.cpp
index 98e904a..d4f92d9 100644
--- a/engines/gob/inter_geisha.cpp
+++ b/engines/gob/inter_geisha.cpp
@@ -50,7 +50,12 @@ void Inter_Geisha::setupOpcodesFunc() {
 	Inter_v1::setupOpcodesFunc();
 
 	OPCODEFUNC(0x03, oGeisha_loadCursor);
+	OPCODEFUNC(0x25, oGeisha_goblinFunc);
 	OPCODEFUNC(0x3A, oGeisha_loadSound);
+
+	OPCODEGOB(2, oGeisha_loadTitleMusic);
+	OPCODEGOB(3, oGeisha_playMusic);
+	OPCODEGOB(4, oGeisha_stopMusic);
 }
 
 void Inter_Geisha::setupOpcodesGob() {
@@ -67,6 +72,18 @@ void Inter_Geisha::oGeisha_loadSound(OpFuncParams &params) {
 	loadSound(-1);
 }
 
+void Inter_Geisha::oGeisha_goblinFunc(OpFuncParams &params) {
+	OpGobParams gobParams;
+	int16 cmd;
+
+	cmd = _vm->_game->_script->readInt16();
+
+	gobParams.paramCount = _vm->_game->_script->readInt16();
+	gobParams.extraData = cmd;
+
+	executeOpcodeGob(cmd, gobParams);
+}
+
 int16 Inter_Geisha::loadSound(int16 slot) {
 	const char *sndFile = _vm->_game->_script->evalString();
 
@@ -90,4 +107,26 @@ int16 Inter_Geisha::loadSound(int16 slot) {
 	return 0;
 }
 
+void Inter_Geisha::oGeisha_loadTitleMusic(OpGobParams &params) {
+	_vm->_game->_script->skip(2);
+
+	_vm->_sound->adlibLoadTBR("geisha.tbr");
+	_vm->_sound->adlibLoadMDY("geisha.mdy");
+}
+
+void Inter_Geisha::oGeisha_playMusic(OpGobParams &params) {
+	_vm->_game->_script->skip(2);
+
+	// TODO: The MDYPlayer is still broken!
+	warning("Geisha Stub: oGeisha_playMusic");
+	// _vm->_sound->adlibPlay();
+}
+
+void Inter_Geisha::oGeisha_stopMusic(OpGobParams &params) {
+	_vm->_game->_script->skip(2);
+
+	_vm->_sound->adlibStop();
+	_vm->_sound->adlibUnload();
+}
+
 } // End of namespace Gob






More information about the Scummvm-git-logs mailing list