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

neuromancer noreply at scummvm.org
Mon Oct 7 11:02:57 UTC 2024


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:
b0df4500de FREESCAPE: implement info menu for castle zx
c01c1826b6 FREESCAPE: implement info menu for castle dos


Commit: b0df4500de789e7c91da2a19683d29142aa6140a
    https://github.com/scummvm/scummvm/commit/b0df4500de789e7c91da2a19683d29142aa6140a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-07T13:04:33+02:00

Commit Message:
FREESCAPE: implement info menu for castle zx

Changed paths:
    engines/freescape/games/castle/castle.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 0aaa2554ba2..2f1e88ed54b 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -231,7 +231,10 @@ void CastleEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *inf
 
 	act = new Common::Action("LOAD", _("Load Game"));
 	act->setCustomEngineActionEvent(kActionLoad);
-	act->addDefaultInputMapping("l");
+	if (_language == Common::ES_ESP)
+		act->addDefaultInputMapping("c");
+	else
+		act->addDefaultInputMapping("l");
 	infoScreenKeyMap->addAction(act);
 
 	act = new Common::Action("QUIT", _("Quit Game"));
@@ -239,7 +242,7 @@ void CastleEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *inf
 	if (isDOS() || isCPC())
 		act->addDefaultInputMapping("ESCAPE");
 	else if (isSpectrum())
-		act->addDefaultInputMapping("1");
+		act->addDefaultInputMapping("q");
 
 	infoScreenKeyMap->addAction(act);
 
@@ -435,6 +438,7 @@ void CastleEngine::drawInfoMenu() {
 	surface->fillRect(_viewArea, black);
 
 	int score = _gameStateVars[k8bitVariableScore];
+	int shield = _gameStateVars[k8bitVariableShield];
 	if (isDOS()) {
 		g_system->lockMouse(false);
 		g_system->showMouse(true);
@@ -453,12 +457,25 @@ void CastleEngine::drawInfoMenu() {
 	} else if (isSpectrum()) {
 		Common::Array<Common::String> lines;
 		lines.push_back(centerAndPadString("********************", 21));
-		lines.push_back(centerAndPadString("s-save l-load q-quit", 21));
-		lines.push_back("");
-		lines.push_back(centerAndPadString(Common::String::format("keys   %d collected", _keysCollected.size()), 21));
-		lines.push_back(centerAndPadString(Common::String::format("spirits  %d destroyed", _spiritsDestroyed), 21));
-		lines.push_back(centerAndPadString("strength  strong", 21));
-		lines.push_back(centerAndPadString(Common::String::format("score   %07d", score), 21));
+
+		if (_language == Common::EN_ANY) {
+			lines.push_back(centerAndPadString("s-save l-load q-quit", 21));
+			lines.push_back("");
+			lines.push_back(centerAndPadString(Common::String::format("keys   %d collected", _keysCollected.size()), 21));
+			lines.push_back(centerAndPadString(Common::String::format("spirits  %d destroyed", _spiritsDestroyed), 21));
+			lines.push_back(centerAndPadString(Common::String::format("strength  %s", _messagesList[62 + shield / 6].c_str()), 21));
+			lines.push_back(centerAndPadString(Common::String::format("score   %07d", score), 21));
+		} else if (_language == Common::ES_ESP) {
+			lines.push_back(centerAndPadString("s-salv c-carg q-quit", 21));
+			lines.push_back("");
+			lines.push_back(centerAndPadString(Common::String::format("llaves %d recogidas", _keysCollected.size()), 21));
+			lines.push_back(centerAndPadString(Common::String::format("espirit %d destruidos", _spiritsDestroyed), 21));
+			lines.push_back(centerAndPadString(Common::String::format("fuerza  %s", _messagesList[62 + shield / 6].c_str()), 21));
+			lines.push_back(centerAndPadString(Common::String::format("puntos   %07d", score), 21));
+		} else {
+			error("Language not supported");
+		}
+
 		lines.push_back("");
 		lines.push_back(centerAndPadString("********************", 21));
 		surface = drawStringsInSurface(lines, surface);


Commit: c01c1826b6c887c4c7d5796f2ae2b066833d612b
    https://github.com/scummvm/scummvm/commit/c01c1826b6c887c4c7d5796f2ae2b066833d612b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-10-07T13:04:33+02:00

Commit Message:
FREESCAPE: implement info menu for castle dos

Changed paths:
    engines/freescape/games/castle/castle.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 2f1e88ed54b..1c722eb32f0 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -447,6 +447,15 @@ void CastleEngine::drawInfoMenu() {
 		_gfx->readFromPalette(10, r, g, b);
 		front = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 		drawStringInSurface(Common::String::format("%07d", score), 166, 71, front, black, surface);
+		drawStringInSurface(centerAndPadString(Common::String::format("%s", _messagesList[134 + shield / 6].c_str()), 10), 151, 102,  front, black, surface);
+
+		Common::String keysCollected = _messagesList[141];
+		Common::replace(keysCollected, "X", Common::String::format("%d", _keysCollected.size()));
+		drawStringInSurface(keysCollected, 103, 41,  front, black, surface);
+
+		Common::String spiritsDestroyed = _messagesList[133];
+		Common::replace(spiritsDestroyed, "X", Common::String::format("%d", _spiritsDestroyed));
+		drawStringInSurface(spiritsDestroyed, 145 , 132,  front, black, surface);
 
 		for (int  i = 0; i < int(_keysCollected.size()) ; i++) {
 			if (i % 2 == 0)




More information about the Scummvm-git-logs mailing list