[Scummvm-git-logs] scummvm master -> f89f33ada9abbed530497962f6e6bce2635ca7b0

dreammaster noreply at scummvm.org
Mon Jun 8 11:04:13 UTC 2026


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

Summary:
a2937c6433 MADS: DRAGONSPHERE: Implement difficulty selection dialog
9053adf4fd MADS: DRAGONSPHERE: Implemented original game menu
0c14fffaa5 MADS: DRAGONSPHERE: Original save/load dialogs
a7119861d5 MADS: DRAGONSPHERE: Game options dialog
79728624fb MADS: DRAGONSPHERE: Game score dialog
f89f33ada9 MADS: DRAGONSPHERE: CDROM options dialog


Commit: a2937c6433d95bd76d08af9d0f45f77b63c32563
    https://github.com/scummvm/scummvm/commit/a2937c6433d95bd76d08af9d0f45f77b63c32563
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:25+10:00

Commit Message:
MADS: DRAGONSPHERE: Implement difficulty selection dialog

Changed paths:
    engines/mads/madsv2/core/game.cpp
    engines/mads/madsv2/dragonsphere/mads/quotes.h
    engines/mads/madsv2/dragonsphere/menus.cpp


diff --git a/engines/mads/madsv2/core/game.cpp b/engines/mads/madsv2/core/game.cpp
index d0d4fd24b75..d3cb1fc3718 100644
--- a/engines/mads/madsv2/core/game.cpp
+++ b/engines/mads/madsv2/core/game.cpp
@@ -1245,7 +1245,8 @@ void game_control() {
 		// Get difficulty level if new game
 		if (!kernel.teleported_in && (game.difficulty == -1)) {
 			// Difficulty menu
-			if (g_engine->getGameID() == GType_Phantom)
+			int gameId = g_engine->getGameID();
+			if (gameId == GType_Phantom || gameId == GType_Dragonsphere)
 				kernel.activate_menu = GAME_DIFFICULTY_MENU;
 			game_exec_function(game_menu_routine);
 			if (!game.going)
diff --git a/engines/mads/madsv2/dragonsphere/mads/quotes.h b/engines/mads/madsv2/dragonsphere/mads/quotes.h
index 0e4f55ce069..8e6671dbb09 100644
--- a/engines/mads/madsv2/dragonsphere/mads/quotes.h
+++ b/engines/mads/madsv2/dragonsphere/mads/quotes.h
@@ -29,6 +29,9 @@ namespace MADSV2 {
 namespace Dragonsphere {
 
 enum {
+	quote_difficulty_title    =  49,
+	quote_difficulty_item1    =  50,
+	quote_difficulty_item2    =  51,
 	quote_poem_one_how        =  74,
 	quote_poem_one_thou       =  75,
 	quote_poem_one_soft       =  76,
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index 9fe53d0397f..ac9b1ebe0a1 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -32,6 +32,7 @@
 #include "mads/madsv2/core/text.h"
 #include "mads/madsv2/dragonsphere/menus.h"
 #include "mads/madsv2/dragonsphere/global.h"
+#include "mads/madsv2/dragonsphere/mads/quotes.h"
 
 namespace MADS {
 namespace MADSV2 {
@@ -40,7 +41,7 @@ namespace Dragonsphere {
 #define SAVE_MENU_PIXEL_WIDTH           200
 #define MAX_SAVES_ON_SCREEN             10
 
-#define SPACE_BETWEEN                   -1
+#define SPACE_BETWEEN                   1
 
 #define MAIN_MENU_ITEM_WIDTH            140
 #define MAIN_MENU_FORCE_WIDTH           160
@@ -91,6 +92,15 @@ static int global_restore(int id) {
 }
 
 void global_menu_system_init() {
+	menu_quotes = quote_load(
+		1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
+		11, 12, 13, 15, 17, 18, 14, 16, 19, 20,
+		21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+		31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+		41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+		51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+		61, 0
+	);
 }
 
 void global_menu_system_shutdown() {
@@ -396,7 +406,6 @@ static void global_menu_options() {
 }
 
 static void global_menu_difficulty() {
-#if 0
 	PopupItem *easy_item;
 	PopupItem *result;
 
@@ -415,7 +424,6 @@ static void global_menu_difficulty() {
 		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0,
 		0, 0, 0);
 
-
 	popup_width_force(DIFFICULTY_MENU_FORCE_WIDTH);
 
 	game_menu_popup->cancel_item = NULL;
@@ -445,7 +453,6 @@ static void global_menu_difficulty() {
 	}
 
 	popup_dialog_destroy();
-#endif
 }
 
 static void global_menu_main() {


Commit: 9053adf4fd09c8694f273aa971aa8aadf9bbdc48
    https://github.com/scummvm/scummvm/commit/9053adf4fd09c8694f273aa971aa8aadf9bbdc48
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:25+10:00

Commit Message:
MADS: DRAGONSPHERE: Implemented original game menu

Changed paths:
    engines/mads/mads.h
    engines/mads/madsv2/dragonsphere/mads/quotes.h
    engines/mads/madsv2/dragonsphere/menus.cpp
    engines/mads/metaengine.cpp


diff --git a/engines/mads/mads.h b/engines/mads/mads.h
index 17f5733c734..b591b1ea824 100644
--- a/engines/mads/mads.h
+++ b/engines/mads/mads.h
@@ -83,6 +83,7 @@ public:
 	uint32 getGameID() const;
 	uint32 getGameFeatures() const;
 	bool isDemo() const;
+	bool isCDROM() const;
 
 	int getRandomNumber(int maxNumber);
 	int getRandomNumber(int minNumber, int maxNumber);
diff --git a/engines/mads/madsv2/dragonsphere/mads/quotes.h b/engines/mads/madsv2/dragonsphere/mads/quotes.h
index 8e6671dbb09..a1e0c326866 100644
--- a/engines/mads/madsv2/dragonsphere/mads/quotes.h
+++ b/engines/mads/madsv2/dragonsphere/mads/quotes.h
@@ -29,6 +29,13 @@ namespace MADSV2 {
 namespace Dragonsphere {
 
 enum {
+	quote_main_item1          =  12,
+	quote_main_item2          =  13,
+	quote_main_item6          =  14,
+	quote_main_item3          =  15,
+	quote_main_item7          =  16,
+	quote_main_item4          =  17,
+	quote_main_item5          =  18,
 	quote_difficulty_title    =  49,
 	quote_difficulty_item1    =  50,
 	quote_difficulty_item2    =  51,
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index ac9b1ebe0a1..1a64bf4ab38 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -456,41 +456,48 @@ static void global_menu_difficulty() {
 }
 
 static void global_menu_main() {
-#if 0
 	PopupItem *save_item;
 	PopupItem *restore_item;
 	PopupItem *score_item;
 	PopupItem *options_item;
+	PopupItem *cdrom_item;
 	PopupItem *resume_item;
 	PopupItem *quit_item;
 	PopupItem *result;
 
+	box_param.menu_text_y_offset = 3;
+	box_param.menu_text_x_bonus = 0;
+
 	popup_dialog_create(game_menu_popup, GAME_DIALOG_HEAP, 20);
 
 	popup_sprite(box_param.logo, 1, POPUP_CENTER, POPUP_FILL);
 	popup_blank(6);
 
 	save_item = popup_menu(menu_quote(quote_main_item1),
-		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0,
-		0, 0, 0);
+		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0, 0, 0, 0);
 
 	popup_blank(SPACE_BETWEEN);
 
 	restore_item = popup_menu(menu_quote(quote_main_item2),
-		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0,
-		0, 0, 0);
+		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0, 0, 0, 0);
 
 	popup_blank(SPACE_BETWEEN);
 
 	score_item = popup_menu(menu_quote(quote_main_item6),
-		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0,
-		0, 0, 0);
+		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0, 0, 0, 0);
 
 	popup_blank(SPACE_BETWEEN);
 
 	options_item = popup_menu(menu_quote(quote_main_item3),
-		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0,
-		0, 0, 0);
+		POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0, 0, 0, 0);
+
+	cdrom_item = nullptr;
+	if (g_engine->isCDROM()) {
+		popup_blank(SPACE_BETWEEN);
+
+		cdrom_item = popup_menu(menu_quote(quote_main_item7),
+			POPUP_CENTER, POPUP_FILL, MAIN_MENU_ITEM_WIDTH, 0, 0, 0, 0);
+	}
 
 	popup_blank(SPACE_BETWEEN);
 
@@ -517,6 +524,8 @@ static void global_menu_main() {
 		kernel.activate_menu = GAME_OPTIONS_MENU;
 	} else if (result == score_item) {
 		kernel.activate_menu = GAME_SCORE_MENU;
+	} else if (result == cdrom_item) {
+		kernel.activate_menu = GAME_CD_MENU;
 	} else {
 		kernel.activate_menu = GAME_NO_MENU;
 	}
@@ -551,7 +560,6 @@ static void global_menu_main() {
 	default:
 		break;
 	}
-#endif
 }
 
 void global_game_menu() {
diff --git a/engines/mads/metaengine.cpp b/engines/mads/metaengine.cpp
index 56dea28a691..6f562eb1d5e 100644
--- a/engines/mads/metaengine.cpp
+++ b/engines/mads/metaengine.cpp
@@ -167,6 +167,10 @@ bool MADSEngine::isDemo() const {
 	return (bool)(_gameDescription->desc.flags & ADGF_DEMO);
 }
 
+bool MADSEngine::isCDROM() const {
+	return (bool)(_gameDescription->desc.flags & ADGF_CD);
+}
+
 Common::Language MADSEngine::getLanguage() const {
 	return _gameDescription->desc.language;
 }


Commit: 0c14fffaa51d025e57c6ca83007e67b2ec8acaad
    https://github.com/scummvm/scummvm/commit/0c14fffaa51d025e57c6ca83007e67b2ec8acaad
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:25+10:00

Commit Message:
MADS: DRAGONSPHERE: Original save/load dialogs

Changed paths:
    engines/mads/detection_tables.h
    engines/mads/madsv2/dragonsphere/mads/quotes.h
    engines/mads/madsv2/dragonsphere/menus.cpp


diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 357e2713cc3..3db67c365c2 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -156,7 +156,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
-			GUIO4(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -171,7 +171,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_CD,
-			GUIO4(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -186,7 +186,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_DEMO,
-			GUIO5(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_NAUGHTY_MODE, GAMEOPTION_COPY_PROTECTION, GAMEOPTION_ORIGINAL_SAVELOAD)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Phantom,
 		0
@@ -201,7 +201,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE,
-			GUIO1(GAMEOPTION_EASY_MOUSE)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Dragonsphere,
 		0
@@ -217,7 +217,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			GF_INSTALLER | ADGF_UNSTABLE,
-			GUIO1(GAMEOPTION_EASY_MOUSE)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Dragonsphere,
 		0
@@ -232,7 +232,7 @@ static const MADSGameDescription gameDescriptions[] = {
 			Common::EN_ANY,
 			Common::kPlatformDOS,
 			ADGF_UNSTABLE | ADGF_DEMO,
-			GUIO1(GAMEOPTION_EASY_MOUSE)
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
 		},
 		GType_Dragonsphere,
 		0
diff --git a/engines/mads/madsv2/dragonsphere/mads/quotes.h b/engines/mads/madsv2/dragonsphere/mads/quotes.h
index a1e0c326866..fafc8365a4d 100644
--- a/engines/mads/madsv2/dragonsphere/mads/quotes.h
+++ b/engines/mads/madsv2/dragonsphere/mads/quotes.h
@@ -29,6 +29,12 @@ namespace MADSV2 {
 namespace Dragonsphere {
 
 enum {
+	quote_menu_cancel         =   2,
+	quote_menu_save           =   3,
+	quote_menu_restore        =   4,
+	quote_menu_clear          =   5,
+	quote_menu_empty          =   9,
+	quote_menu_unnamed        =  10,
 	quote_main_item1          =  12,
 	quote_main_item2          =  13,
 	quote_main_item6          =  14,
@@ -36,6 +42,8 @@ enum {
 	quote_main_item7          =  16,
 	quote_main_item4          =  17,
 	quote_main_item5          =  18,
+	quote_save_title          =  47,
+	quote_restore_title       =  48,
 	quote_difficulty_title    =  49,
 	quote_difficulty_item1    =  50,
 	quote_difficulty_item2    =  51,
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index 1a64bf4ab38..e27bd6b2d42 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -127,7 +127,6 @@ static void global_menu_score() {
 }
 
 static void global_menu_save_restore(int save) {
-#if 0
 	int status = -1;
 	int selection;
 	char *save_game_name;
@@ -235,7 +234,6 @@ static void global_menu_save_restore(int save) {
 	if (status >= 0) {
 		global_alert(status);
 	}
-#endif
 }
 
 static void global_menu_options() {


Commit: a7119861d5435b365f32e9aeb8b41b3d8c73517d
    https://github.com/scummvm/scummvm/commit/a7119861d5435b365f32e9aeb8b41b3d8c73517d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:26+10:00

Commit Message:
MADS: DRAGONSPHERE: Game options dialog

Changed paths:
    engines/mads/madsv2/dragonsphere/mads/quotes.h
    engines/mads/madsv2/dragonsphere/menus.cpp


diff --git a/engines/mads/madsv2/dragonsphere/mads/quotes.h b/engines/mads/madsv2/dragonsphere/mads/quotes.h
index fafc8365a4d..f0ed295795a 100644
--- a/engines/mads/madsv2/dragonsphere/mads/quotes.h
+++ b/engines/mads/madsv2/dragonsphere/mads/quotes.h
@@ -29,6 +29,7 @@ namespace MADSV2 {
 namespace Dragonsphere {
 
 enum {
+	quote_menu_done           =   1,
 	quote_menu_cancel         =   2,
 	quote_menu_save           =   3,
 	quote_menu_restore        =   4,
@@ -42,6 +43,26 @@ enum {
 	quote_main_item7          =  16,
 	quote_main_item4          =  17,
 	quote_main_item5          =  18,
+	quote_options_item1       =  20,
+	quote_options_item2       =  21,
+	quote_options_item3       =  22,
+	quote_options_item4       =  23,
+	quote_options_item5       =  24,
+	quote_options_item6       =  25,
+	quote_options_item1a      =  26,
+	quote_options_item1b      =  27,
+	quote_options_item2a      =  28,
+	quote_options_item2b      =  29,
+	quote_options_item3a      =  30,
+	quote_options_item3b      =  31,
+	quote_options_item4a      =  32,
+	quote_options_item4b      =  33,
+	quote_options_item4c      =  34,
+	quote_options_item5a      =  35,
+	quote_options_item5b      =  36,
+	quote_options_item5c      =  37,
+	quote_options_item6a      =  38,
+	quote_options_item6b      =  39,
 	quote_save_title          =  47,
 	quote_restore_title       =  48,
 	quote_difficulty_title    =  49,
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index e27bd6b2d42..c23462941fd 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -237,7 +237,6 @@ static void global_menu_save_restore(int save) {
 }
 
 static void global_menu_options() {
-#if 0
 	int initial_1, initial_2, initial_3;
 	int initial_4, initial_5, initial_6;
 	int former_music;
@@ -400,7 +399,6 @@ static void global_menu_options() {
 	}
 
 	popup_dialog_destroy();
-#endif
 }
 
 static void global_menu_difficulty() {


Commit: 79728624fb47220798c6758587914e54504603ff
    https://github.com/scummvm/scummvm/commit/79728624fb47220798c6758587914e54504603ff
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:26+10:00

Commit Message:
MADS: DRAGONSPHERE: Game score dialog

Changed paths:
    engines/mads/madsv2/dragonsphere/menus.cpp


diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index c23462941fd..5ca0808e21c 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -124,6 +124,37 @@ static void global_alert(int status) {
 }
 
 static void global_menu_score() {
+	int score;
+
+	score = global[player_score];
+	if (score > 250) score = 250;
+
+	text_index[0] = score;
+	text_index[1] = 250;
+
+	if (score <= 25) {
+		text_index[2] = 1;          /* Stage sweeper */
+	} else if (score <= 50) {
+		text_index[2] = 2;          /* Dresser */
+	} else if (score <= 75) {
+		text_index[2] = 3;          /* Usher */
+	} else if (score <= 100) {
+		text_index[2] = 4;          /* Stagehand */
+	} else if (score <= 150) {
+		text_index[2] = 5;          /* Chorus Member */
+	} else if (score <= 200) {
+		text_index[2] = 6;          /* Supporting Player */
+	} else if (score <= 249) {
+		text_index[2] = 7;          /* Star Player */
+	} else if (score <= 250) {
+		text_index[2] = 8;          /* Director */
+	} else {
+		text_index[2] = 9;          /* Bug Finder! */
+	}
+
+	text_show(99);
+
+	kernel.activate_menu = GAME_NO_MENU;
 }
 
 static void global_menu_save_restore(int save) {


Commit: f89f33ada9abbed530497962f6e6bce2635ca7b0
    https://github.com/scummvm/scummvm/commit/f89f33ada9abbed530497962f6e6bce2635ca7b0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-06-08T21:03:35+10:00

Commit Message:
MADS: DRAGONSPHERE: CDROM options dialog

Changed paths:
    engines/mads/detection_tables.h
    engines/mads/madsv2/dragonsphere/mads/quotes.h
    engines/mads/madsv2/dragonsphere/menus.cpp


diff --git a/engines/mads/detection_tables.h b/engines/mads/detection_tables.h
index 3db67c365c2..fb4e4d042eb 100644
--- a/engines/mads/detection_tables.h
+++ b/engines/mads/detection_tables.h
@@ -192,6 +192,21 @@ static const MADSGameDescription gameDescriptions[] = {
 		0
 	},
 
+	{
+		// Dragonsphere DOS English CD
+		{
+			"dragonsphere",
+			"CD",
+			AD_ENTRY2s("section1.hag", "2770e441d296be5e806194693eebd95a", 2061199, "speech.idx", "80d36ba3ca88e9d078cc19a7678aeb87", 1250),
+			Common::EN_ANY,
+			Common::kPlatformDOS,
+			ADGF_UNSTABLE | ADGF_CD,
+			GUIO3(GUIO_NOMIDI, GAMEOPTION_EASY_MOUSE, GAMEOPTION_ORIGINAL_SAVELOAD)
+		},
+		GType_Dragonsphere,
+		0
+	},
+
 	{
 		// Dragonsphere DOS English
 		{
diff --git a/engines/mads/madsv2/dragonsphere/mads/quotes.h b/engines/mads/madsv2/dragonsphere/mads/quotes.h
index f0ed295795a..5bb247d59fe 100644
--- a/engines/mads/madsv2/dragonsphere/mads/quotes.h
+++ b/engines/mads/madsv2/dragonsphere/mads/quotes.h
@@ -63,6 +63,12 @@ enum {
 	quote_options_item5c      =  37,
 	quote_options_item6a      =  38,
 	quote_options_item6b      =  39,
+	quote_cdrom_item1         =  41,
+	quote_cdrom_item2         =  42,
+	quote_cdrom_item1a        =  43,
+	quote_cdrom_item1b        =  44,
+	quote_cdrom_item2a        =  45,
+	quote_cdrom_item2b        =  46,
 	quote_save_title          =  47,
 	quote_restore_title       =  48,
 	quote_difficulty_title    =  49,
diff --git a/engines/mads/madsv2/dragonsphere/menus.cpp b/engines/mads/madsv2/dragonsphere/menus.cpp
index 5ca0808e21c..39ebcac1388 100644
--- a/engines/mads/madsv2/dragonsphere/menus.cpp
+++ b/engines/mads/madsv2/dragonsphere/menus.cpp
@@ -52,6 +52,9 @@ namespace Dragonsphere {
 #define OPTIONS_MENU_FORCE_WIDTH        170
 #define OPTIONS_MENU_OFF_CENTER         10
 
+#define CDROM_MENU_ITEM_WIDTH           160
+#define CDROM_MENU_FORCE_WIDTH          170
+#define CDROM_MENU_OFF_CENTER           10
 
 #define SAVE_SUCCESSFUL                 1
 #define RESTORE_SUCCESSFUL              2
@@ -482,6 +485,106 @@ static void global_menu_difficulty() {
 	popup_dialog_destroy();
 }
 
+static void global_menu_cdrom() {
+	int initial_1, initial_2;
+	int former_speech;
+	int former_text;
+	PopupItem *speech_item;
+	PopupItem *text_item;
+	PopupItem *done_button, *cancel_button;
+	PopupItem *result;
+
+	global_unload_config_parameters();
+
+	box_param.menu_text_y_offset = 3;
+	box_param.menu_text_x_bonus = 0;
+
+	popup_dialog_create(game_menu_popup, GAME_DIALOG_HEAP, 20);
+
+	popup_sprite(box_param.logo, 1, POPUP_CENTER, POPUP_FILL);
+	popup_blank(2);
+
+	former_speech = config_file.speech_flag;
+	former_text = config_file.show_speech_boxes;
+
+	initial_1 = config_file.speech_flag ? 0 : 1;
+	initial_2 = config_file.show_speech_boxes ? 0 : 1;
+
+	speech_item = popup_menu(menu_quote(quote_cdrom_item1),
+		POPUP_CENTER, POPUP_FILL, CDROM_MENU_ITEM_WIDTH,
+		CDROM_MENU_OFF_CENTER, 2, 40, initial_1);
+	popup_menu_option(speech_item, menu_quote(quote_cdrom_item1a));
+	popup_menu_option(speech_item, menu_quote(quote_cdrom_item1b));
+
+	popup_blank(SPACE_BETWEEN);
+
+	text_item = popup_menu(menu_quote(quote_cdrom_item2),
+		POPUP_CENTER, POPUP_FILL, CDROM_MENU_ITEM_WIDTH,
+		CDROM_MENU_OFF_CENTER, 2, 40, initial_2);
+	popup_menu_option(text_item, menu_quote(quote_cdrom_item2a));
+	popup_menu_option(text_item, menu_quote(quote_cdrom_item2b));
+
+	done_button = popup_button(menu_quote(quote_menu_done), POPUP_LEFT);
+	cancel_button = popup_cancel_button(menu_quote(quote_menu_cancel));
+
+	popup_width_force(CDROM_MENU_FORCE_WIDTH);
+
+	result = popup_execute();
+
+	kernel.activate_menu = GAME_MAIN_MENU;
+
+	if (result == cancel_button) {
+		switch (game_menu_popup->key) {
+		case alt_x_key:
+		case ctrl_x_key:
+		case alt_q_key:
+		case ctrl_q_key:
+			game.going = false;
+			kernel.activate_menu = GAME_NO_MENU;
+			break;
+
+		case f1_key:
+			kernel.activate_menu = GAME_MAIN_MENU;
+			break;
+
+		case f2_key:
+			kernel.activate_menu = GAME_SAVE_MENU;
+			break;
+
+		case f3_key:
+			kernel.activate_menu = GAME_RESTORE_MENU;
+			break;
+
+		case f4_key:
+			kernel.activate_menu = GAME_SCORE_MENU;
+			break;
+
+		case f5_key:
+			kernel.activate_menu = GAME_MAIN_MENU;
+			break;
+
+		default:
+			kernel.activate_menu = GAME_MAIN_MENU;
+			break;
+		}
+	}
+
+	if (result == done_button) {
+		config_file.speech_flag = !speech_item->list->picked_element;
+		config_file.show_speech_boxes = !text_item->list->picked_element;
+
+		global_write_config_file();
+		global_load_config_parameters();
+
+		kernel.activate_menu = GAME_NO_MENU;
+	}
+
+	if (former_speech != config_file.speech_flag)
+		speech_all_off();
+
+	popup_dialog_destroy();
+}
+
 static void global_menu_main() {
 	PopupItem *save_item;
 	PopupItem *restore_item;
@@ -634,6 +737,9 @@ void global_game_menu() {
 		case GAME_SCORE_MENU:
 			global_menu_score();
 			break;
+		case GAME_CD_MENU:
+			global_menu_cdrom();
+			break;
 		default:
 			kernel.activate_menu = GAME_NO_MENU;
 			break;




More information about the Scummvm-git-logs mailing list