[Scummvm-git-logs] scummvm master -> 38902d0c86fc27069ccac92f1999d066554adecc

athrxx noreply at scummvm.org
Sun Jul 23 11:02:30 UTC 2023


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:
38902d0c86 KYRA: (EOB II/ZH) - fix button dimensions


Commit: 38902d0c86fc27069ccac92f1999d066554adecc
    https://github.com/scummvm/scummvm/commit/38902d0c86fc27069ccac92f1999d066554adecc
Author: athrxx (athrxx at scummvm.org)
Date: 2023-07-23T13:02:14+02:00

Commit Message:
KYRA: (EOB II/ZH) - fix button dimensions

Changed paths:
    engines/kyra/gui/gui_eob.cpp
    engines/kyra/resource/staticres_eob.cpp


diff --git a/engines/kyra/gui/gui_eob.cpp b/engines/kyra/gui/gui_eob.cpp
index d1933369217..2ad453e5395 100644
--- a/engines/kyra/gui/gui_eob.cpp
+++ b/engines/kyra/gui/gui_eob.cpp
@@ -854,7 +854,7 @@ void EoBCoreEngine::gui_initButton(int index, int, int, int) {
 	Button *b = 0;
 	int cnt = 1;
 
-	if (_flags.gameID == GI_EOB1 && !(_flags.platform == Common::kPlatformSegaCD && index >= 95) && index > 92)
+	if ((_flags.gameID == GI_EOB1 && !(_flags.platform == Common::kPlatformSegaCD && index >= 95) && index > 92) || (_flags.gameID == GI_EOB2 && _buttonDefs[index].x == 0x7fff))
 		return;
 
 	if (_activeButtons) {
diff --git a/engines/kyra/resource/staticres_eob.cpp b/engines/kyra/resource/staticres_eob.cpp
index 408bc33a746..2096ab85ba7 100644
--- a/engines/kyra/resource/staticres_eob.cpp
+++ b/engines/kyra/resource/staticres_eob.cpp
@@ -780,6 +780,33 @@ void EoBCoreEngine::initButtonData() {
 				_buttonDefs[66 + i].h = 8;
 			}
 		}
+	} else if (_flags.lang == Common::ZH_TWN) {
+		// Due to its modified user interface, the Chinese version has some modified button dimensions.
+		for (int i = 0; i < 6; ++i)
+			_buttonDefs[9 + i].y += 7;
+		for (int i = 0; i < 2; ++i) {
+			_buttonDefs[15 + i].y += 6;
+			_buttonDefs[78 + i].y += 7;
+			_buttonDefs[80 + i].y += 4;
+			_buttonDefs[82 + i].h += 7;
+		}
+		for (int i = 0; i < 4; ++i)
+			_buttonDefs[17 + i].h += 7;
+		for (int i = 0; i < 5; ++i)
+			_buttonDefs[61 + i].h = 7;
+		for (int i = 0; i < 3; ++i) {
+			_buttonDefs[66 + i].x = 71;
+			_buttonDefs[66 + i].y = 129 + i * 14;
+			_buttonDefs[66 + i].w = 63;
+			_buttonDefs[66 + i].h = 14;
+			_buttonDefs[69 + i].x = 0x7fff;
+		}
+		_buttonDefs[93].h = 7;
+		_buttonDefs[88].x = 139;
+		_buttonDefs[88].y = 130;
+		_buttonDefs[88].w = 35;
+		_buttonDefs[88].h = 16;
+		_buttonDefs[94].y -= 7;
 	}
 
 	// Replace keycodes for EOB II FM-Towns




More information about the Scummvm-git-logs mailing list