[Scummvm-git-logs] scummvm master -> 15d94ab08ad05ca5e8c5d5630e54446ba9faef24

dreammaster noreply at scummvm.org
Mon May 29 03:48:35 UTC 2023


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:
7b4312311c MM: MM1: Clean up Enhanced requirements message
aef18e3a25 MM: MM1: Add Clouds title music to Enhanced title screen
15d94ab08a MM: MM1: Add sound for bumping into walls


Commit: 7b4312311c993432deef6674ef93c3de7d141452
    https://github.com/scummvm/scummvm/commit/7b4312311c993432deef6674ef93c3de7d141452
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-28T20:48:28-07:00

Commit Message:
MM: MM1: Clean up Enhanced requirements message

Changed paths:
    engines/mm/POTFILES
    engines/mm/mm1/mm1.cpp


diff --git a/engines/mm/POTFILES b/engines/mm/POTFILES
index ece789cbbac..170f4ecb2ec 100644
--- a/engines/mm/POTFILES
+++ b/engines/mm/POTFILES
@@ -1,5 +1,6 @@
 engines/mm/detection.cpp
 engines/mm/metaengine.cpp
 engines/mm/mm1/metaengine.cpp
+engines/mm/mm1/mm1.cpp
 engines/mm/shared/utils/engine_data.cpp
 engines/mm/xeen/saves.cpp
diff --git a/engines/mm/mm1/mm1.cpp b/engines/mm/mm1/mm1.cpp
index f703b79652a..9fe58817ecd 100644
--- a/engines/mm/mm1/mm1.cpp
+++ b/engines/mm/mm1/mm1.cpp
@@ -24,6 +24,7 @@
 #include "common/debug-channels.h"
 #include "common/file.h"
 #include "common/system.h"
+#include "common/translation.h"
 #include "engines/util.h"
 #include "graphics/palette.h"
 #include "mm/mm1/mm1.h"
@@ -95,12 +96,12 @@ void MM1Engine::setupNormal() {
 }
 
 bool MM1Engine::setupEnhanced() {
-	if (!Common::File::exists("xeen.cc")) {// || !Common::File::exists("dark.cc")) {
-		GUIErrorMessage(
+	if (!Common::File::exists("xeen.cc")) {
+		GUIErrorMessage(_(
 			"In order to run in Enhanced mode,  please copy xeen.cc "
-			"and dark.cc from a copy of World of Xeen\n"
-			"or Dark Side of Xeen to your Might and Magic 1 game folder"
-		);
+			"from a copy of World of Xeen\n"
+			"or Clouds of Xeen to your Might and Magic 1 game folder"
+		));
 
 		return false;
 	}


Commit: aef18e3a25d43f4d0614a63cd4b82e3bb041e3f1
    https://github.com/scummvm/scummvm/commit/aef18e3a25d43f4d0614a63cd4b82e3bb041e3f1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-28T20:48:28-07:00

Commit Message:
MM: MM1: Add Clouds title music to Enhanced title screen

Changed paths:
  A engines/mm/mm1/views_enh/title.cpp
  A engines/mm/mm1/views_enh/title.h
    engines/mm/mm1/views_enh/dialogs.h
    engines/mm/module.mk
    engines/mm/shared/xeen/sound.cpp


diff --git a/engines/mm/mm1/views_enh/dialogs.h b/engines/mm/mm1/views_enh/dialogs.h
index 8cee1368407..681f6c950c6 100644
--- a/engines/mm/mm1/views_enh/dialogs.h
+++ b/engines/mm/mm1/views_enh/dialogs.h
@@ -24,7 +24,6 @@
 
 #include "mm/mm1/events.h"
 #include "mm/mm1/views/bash.h"
-#include "mm/mm1/views/title.h"
 #include "mm/mm1/views_enh/character_info.h"
 #include "mm/mm1/views_enh/character_inventory.h"
 #include "mm/mm1/views_enh/character_select.h"
@@ -44,6 +43,7 @@
 #include "mm/mm1/views_enh/quick_ref.h"
 #include "mm/mm1/views_enh/rest.h"
 #include "mm/mm1/views_enh/search.h"
+#include "mm/mm1/views_enh/title.h"
 #include "mm/mm1/views_enh/trade.h"
 #include "mm/mm1/views_enh/trap.h"
 #include "mm/mm1/views_enh/unlock.h"
@@ -155,6 +155,7 @@ private:
 	ViewsEnh::QuickRef _quickRef;
 	ViewsEnh::Rest _rest;
 	ViewsEnh::Search _search;
+	ViewsEnh::Title _title;
 	ViewsEnh::Trade _trade;
 	ViewsEnh::Trap _trap;
 	ViewsEnh::Unlock _unlock;
@@ -164,7 +165,6 @@ private:
 	ViewsEnh::WhoWillTry _whoWillTry;
 	ViewsEnh::WonGame _wonGame;
 	Views::Bash _bash;
-	Views::Title _title;
 public:
 	Dialogs() {}
 };
diff --git a/engines/mm/mm1/views_enh/title.cpp b/engines/mm/mm1/views_enh/title.cpp
new file mode 100644
index 00000000000..bbf9bef8f55
--- /dev/null
+++ b/engines/mm/mm1/views_enh/title.cpp
@@ -0,0 +1,42 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "mm/mm1/views_enh/title.h"
+#include "mm/mm1/mm1.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+
+bool Title::msgFocus(const FocusMessage &msg) {
+	Views::Title::msgFocus(msg);
+	g_engine->_sound->playSong("inn.m");
+	return true;
+}
+
+bool Title::msgUnfocus(const UnfocusMessage &msg) {
+	g_engine->_sound->stopSong();
+	return Views::Title::msgUnfocus(msg);
+}
+
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
diff --git a/engines/mm/mm1/views_enh/title.h b/engines/mm/mm1/views_enh/title.h
new file mode 100644
index 00000000000..c724945e576
--- /dev/null
+++ b/engines/mm/mm1/views_enh/title.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef MM1_VIEWS_ENH_TITLE_H
+#define MM1_VIEWS_ENH_TITLE_H
+
+#include "mm/mm1/views/title.h"
+
+namespace MM {
+namespace MM1 {
+namespace ViewsEnh {
+
+class Title : public Views::Title {
+public:
+	Title() : Views::Title() {}
+	virtual ~Title() {}
+
+	bool msgFocus(const FocusMessage &msg) override;
+	bool msgUnfocus(const UnfocusMessage &msg) override;
+};
+
+} // namespace ViewsEnh
+} // namespace MM1
+} // namespace MM
+
+#endif
diff --git a/engines/mm/module.mk b/engines/mm/module.mk
index 59fd7724613..798c1978c90 100644
--- a/engines/mm/module.mk
+++ b/engines/mm/module.mk
@@ -170,6 +170,7 @@ MODULE_OBJS += \
 	mm1/views_enh/select_number.o \
 	mm1/views_enh/text_entry.o \
 	mm1/views_enh/text_view.o \
+	mm1/views_enh/title.o \
 	mm1/views_enh/trade.o \
 	mm1/views_enh/trap.o \
 	mm1/views_enh/unlock.o \
diff --git a/engines/mm/shared/xeen/sound.cpp b/engines/mm/shared/xeen/sound.cpp
index 7481bc37e5a..5ca36ee7aa3 100644
--- a/engines/mm/shared/xeen/sound.cpp
+++ b/engines/mm/shared/xeen/sound.cpp
@@ -25,6 +25,7 @@
 #include "common/config-manager.h"
 #include "mm/shared/xeen/sound.h"
 #include "mm/shared/xeen/sound_driver_adlib.h"
+#include "mm/xeen/xeen.h"
 #include "mm/mm.h"
 
 namespace MM {
@@ -215,12 +216,13 @@ void Sound::playSong(const Common::String &name, int param) {
 	Common::File mf;
 	if (mf.open(name)) {
 		playSong(mf);
-	} else {
 #ifdef ENABLE_XEEN
+	} else if (dynamic_cast<MM::Xeen::XeenEngine *>(g_engine)) {
 		File f(name, _musicSide);
-#else
-		File f(name);
+		playSong(f);
 #endif
+	} else {
+		File f(name);
 		playSong(f);
 	}
 }


Commit: 15d94ab08ad05ca5e8c5d5630e54446ba9faef24
    https://github.com/scummvm/scummvm/commit/15d94ab08ad05ca5e8c5d5630e54446ba9faef24
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2023-05-28T20:48:28-07:00

Commit Message:
MM: MM1: Add sound for bumping into walls

Changed paths:
    engines/mm/mm1/sound.cpp


diff --git a/engines/mm/mm1/sound.cpp b/engines/mm/mm1/sound.cpp
index 0b6387a8611..4a747e2cd54 100644
--- a/engines/mm/mm1/sound.cpp
+++ b/engines/mm/mm1/sound.cpp
@@ -21,11 +21,19 @@
 
 #include "common/textconsole.h"
 #include "mm/mm1/sound.h"
+#include "mm/mm1/mm1.h"
 
 namespace MM {
 namespace MM1 {
 
 void Sound::sound(SoundId soundNum) {
+	if (g_engine->isEnhanced()) {
+		if (soundNum == SOUND_1) {
+			g_engine->_sound->playSound("gulp.voc");
+			return;
+		}
+	}
+
 	warning("TODO: sound %d", (int)soundNum);
 }
 




More information about the Scummvm-git-logs mailing list