[Scummvm-git-logs] scummvm master -> 319e0afda4737ae0287fb70d7fa2269c16bd9e38

dreammaster paulfgilbert at gmail.com
Sat May 2 04:04:16 UTC 2020


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:
c2414c7dc7 ULTIMA4: Combat cast action
319e0afda4 ULTIMA4: Fix get chest crash


Commit: c2414c7dc742af7fde5f5749ac5dc3f977675dd2
    https://github.com/scummvm/scummvm/commit/c2414c7dc742af7fde5f5749ac5dc3f977675dd2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-01T21:00:18-07:00

Commit Message:
ULTIMA4: Combat cast action

Changed paths:
    engines/ultima/ultima4/controllers/combat_controller.cpp
    engines/ultima/ultima4/core/debugger.cpp
    engines/ultima/ultima4/core/debugger.h


diff --git a/engines/ultima/ultima4/controllers/combat_controller.cpp b/engines/ultima/ultima4/controllers/combat_controller.cpp
index b387fc2b12..c6a6bdeefb 100644
--- a/engines/ultima/ultima4/controllers/combat_controller.cpp
+++ b/engines/ultima/ultima4/controllers/combat_controller.cpp
@@ -871,11 +871,6 @@ bool CombatController::keyPressed(int key) {
 		break;
 	}
 
-	case 'c':
-		g_screen->screenMessage("Cast Spell!\n");
-		g_debugger->castSpell(_focus);
-		break;
-
 #ifdef IOS_ULTIMA4
 	case Common::KEYCODE_RETURN: // Fall through and get the chest.
 #endif
diff --git a/engines/ultima/ultima4/core/debugger.cpp b/engines/ultima/ultima4/core/debugger.cpp
index 3d9a9c8cf1..99b7db56c3 100644
--- a/engines/ultima/ultima4/core/debugger.cpp
+++ b/engines/ultima/ultima4/core/debugger.cpp
@@ -207,13 +207,6 @@ void Debugger::getChest(int player) {
 	cmdGet(2, argv);
 }
 
-void Debugger::castSpell(int player) {
-	Common::String param = Common::String::format("%d", player);
-	const char *argv[2] = { "cast", param.c_str() };
-
-	cmdCastSpell(2, argv);
-}
-
 void Debugger::readyWeapon(int player) {
 	Common::String param = Common::String::format("%d", player);
 	const char *argv[2] = { "ready", param.c_str() };
@@ -308,8 +301,9 @@ bool Debugger::cmdCastSpell(int argc, const char **argv) {
 	if (argc == 2)
 		player = strToInt(argv[1]);
 
+	print("Cast Spell!");
 	if (player == -1) {
-		printN("Cast Spell!\nPlayer: ");
+		printN("Player: ");
 		player = gameGetPlayer(false, true);
 	}
 	if (player == -1)
@@ -318,19 +312,19 @@ bool Debugger::cmdCastSpell(int argc, const char **argv) {
 	// get the spell to cast
 	g_context->_stats->setView(STATS_MIXTURES);
 	printN("Spell: ");
-	// ### Put the iPad thing too.
 #ifdef IOS_ULTIMA4
+	// ### Put the iPad thing too.
 	U4IOS::IOSCastSpellHelper castSpellController;
 #endif
 	int spell = AlphaActionController::get('z', "Spell: ");
 	if (spell == -1)
 		return isDebuggerActive();
 
-	print("%s!", g_spells->spellGetName(spell)); //Prints spell name at prompt
+	print("%s!", g_spells->spellGetName(spell)); // Prints spell name at prompt
 
 	g_context->_stats->setView(STATS_PARTY_OVERVIEW);
 
-	// if we can't really cast this spell, skip the extra parameters
+	// If we can't really cast this spell, skip the extra parameters
 	if (g_spells->spellCheckPrerequisites(spell, player) != CASTERR_NOERROR) {
 		gameCastSpell(spell, player, 0);
 		return isDebuggerActive();
diff --git a/engines/ultima/ultima4/core/debugger.h b/engines/ultima/ultima4/core/debugger.h
index 66dc2cb0fd..3693ba3668 100644
--- a/engines/ultima/ultima4/core/debugger.h
+++ b/engines/ultima/ultima4/core/debugger.h
@@ -389,11 +389,6 @@ public:
 	 */
 	void getChest(int player = -2);
 
-	/**
-	 * Cast a spell
-	 */
-	void castSpell(int player);
-
 	/**
 	 * Ready a weapon
 	 */


Commit: 319e0afda4737ae0287fb70d7fa2269c16bd9e38
    https://github.com/scummvm/scummvm/commit/319e0afda4737ae0287fb70d7fa2269c16bd9e38
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-05-01T21:03:58-07:00

Commit Message:
ULTIMA4: Fix get chest crash

Changed paths:
    engines/ultima/ultima4/core/debugger.cpp


diff --git a/engines/ultima/ultima4/core/debugger.cpp b/engines/ultima/ultima4/core/debugger.cpp
index 99b7db56c3..db8c0e85a7 100644
--- a/engines/ultima/ultima4/core/debugger.cpp
+++ b/engines/ultima/ultima4/core/debugger.cpp
@@ -546,7 +546,7 @@ bool Debugger::cmdFire(int argc, const char **argv) {
 }
 
 bool Debugger::cmdGet(int argc, const char **argv) {
-	int player = 1;
+	int player = -1;
 	if (argc == 2)
 		player = strToInt(argv[1]);
 




More information about the Scummvm-git-logs mailing list