[Scummvm-git-logs] scummvm master -> 5c4ac51ce25ba0d65ac9fe9bc6e9a2453d7bd835

dreammaster paulfgilbert at gmail.com
Fri Sep 4 03:52:18 UTC 2020


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:
5c4ac51ce2 ULTIMA4: Fixes for original U4 spelling mixing


Commit: 5c4ac51ce25ba0d65ac9fe9bc6e9a2453d7bd835
    https://github.com/scummvm/scummvm/commit/5c4ac51ce25ba0d65ac9fe9bc6e9a2453d7bd835
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-09-03T20:52:03-07:00

Commit Message:
ULTIMA4: Fixes for original U4 spelling mixing

Changed paths:
    engines/ultima/ultima4/controllers/read_choice_controller.cpp
    engines/ultima/ultima4/controllers/read_choice_controller.h
    engines/ultima/ultima4/core/debugger.cpp
    engines/ultima/ultima4/core/debugger_actions.cpp
    engines/ultima/ultima4/core/settings.cpp


diff --git a/engines/ultima/ultima4/controllers/read_choice_controller.cpp b/engines/ultima/ultima4/controllers/read_choice_controller.cpp
index 75e58b4b22..0f5e95015c 100644
--- a/engines/ultima/ultima4/controllers/read_choice_controller.cpp
+++ b/engines/ultima/ultima4/controllers/read_choice_controller.cpp
@@ -50,6 +50,16 @@ bool ReadChoiceController::keyPressed(int key) {
 	return false;
 }
 
+void ReadChoiceController::keybinder(KeybindingAction action) {
+	if (action == KEYBIND_ESCAPE && _choices.contains('\x1B')) {
+		_value = 27;
+		doneWaiting();
+	} else {
+		WaitableController<int>::keybinder(action);
+	}
+}
+
+
 char ReadChoiceController::get(const Common::String &choices, EventHandler *eh) {
 	if (!eh)
 		eh = eventHandler;
diff --git a/engines/ultima/ultima4/controllers/read_choice_controller.h b/engines/ultima/ultima4/controllers/read_choice_controller.h
index a6b1614f51..9706d60e8d 100644
--- a/engines/ultima/ultima4/controllers/read_choice_controller.h
+++ b/engines/ultima/ultima4/controllers/read_choice_controller.h
@@ -36,6 +36,7 @@ class ReadChoiceController : public WaitableController<int> {
 public:
 	ReadChoiceController(const Common::String &choices);
 	bool keyPressed(int key) override;
+	void keybinder(KeybindingAction action) override;
 
 	static char get(const Common::String &choices, EventHandler *eh = nullptr);
 
diff --git a/engines/ultima/ultima4/core/debugger.cpp b/engines/ultima/ultima4/core/debugger.cpp
index bcd62b42c0..c050d0aec4 100644
--- a/engines/ultima/ultima4/core/debugger.cpp
+++ b/engines/ultima/ultima4/core/debugger.cpp
@@ -804,7 +804,7 @@ bool Debugger::cmdMixReagents(int argc, const char **argv) {
 			g_context->_stats->setView(STATS_MIXTURES);
 
 			int choice = ReadChoiceController::get("abcdefghijklmnopqrstuvwxyz \033\n\r");
-			if (choice == ' ' || choice == '\033' || choice == '\n' || choice == '\r')
+			if (choice == -1 || choice == ' ' || choice == '\033' || choice == '\n' || choice == '\r')
 				break;
 
 			int spell = choice - 'a';
diff --git a/engines/ultima/ultima4/core/debugger_actions.cpp b/engines/ultima/ultima4/core/debugger_actions.cpp
index 93eeb8475e..b56bd076d5 100644
--- a/engines/ultima/ultima4/core/debugger_actions.cpp
+++ b/engines/ultima/ultima4/core/debugger_actions.cpp
@@ -208,12 +208,12 @@ bool DebuggerActions::mixReagentsForSpellU4(int spell) {
 		}
 
 		// escape: put ingredients back and quit mixing
-		if (choice == '\033') {
+		if (choice == -1 || choice == '\033') {
 			ingredients.revert();
 			return true;
 		}
 
-		g_screen->screenMessage("%c\n", toupper(choice));
+		g_screen->screenMessage("\n");
 		if (!ingredients.addReagent((Reagent)(choice - 'a')))
 			g_screen->screenMessage("%cNone Left!%c\n", FG_GREY, FG_WHITE);
 		g_screen->screenMessage("Reagent: ");
diff --git a/engines/ultima/ultima4/core/settings.cpp b/engines/ultima/ultima4/core/settings.cpp
index e30ae72884..fe4f097f2f 100644
--- a/engines/ultima/ultima4/core/settings.cpp
+++ b/engines/ultima/ultima4/core/settings.cpp
@@ -158,11 +158,11 @@ void Settings::synchronize(Shared::ConfSerializer &s) {
 	s.syncAsInt("titleSpeedOther", _titleSpeedOther, DEFAULT_TITLE_SPEED_OTHER);
 	s.syncAsBool("innAlwaysCombat", _innAlwaysCombat, false);
 	s.syncAsBool("campingAlwaysCombat", _campingAlwaysCombat, false);
+	s.syncAsBool("u5spellMixing", _enhancementsOptions._u5SpellMixing, isEnhanced);
 
 	// all specific minor enhancements default to "on", any major enhancements default to "off"
 	// minor enhancement options
 	s.syncAsBool("activePlayer", _enhancementsOptions._activePlayer, true);
-	s.syncAsBool("u5spellMixing", _enhancementsOptions._u5SpellMixing, true);
 	s.syncAsBool("u5shrines", _enhancementsOptions._u5Shrines, true);
 	s.syncAsBool("slimeDivides", _enhancementsOptions._slimeDivides, true);
 	s.syncAsBool("gazerSpawnsInsects", _enhancementsOptions._gazerSpawnsInsects, true);




More information about the Scummvm-git-logs mailing list