[Scummvm-git-logs] scummvm master -> 63747963b353dc9c002ccc893c72ce132c182250

athrxx noreply at scummvm.org
Sun Dec 5 17:50:31 UTC 2021


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:
63747963b3 KYRA: (LoK/Trd. Chinese) - fix Kyrandia logo glitch


Commit: 63747963b353dc9c002ccc893c72ce132c182250
    https://github.com/scummvm/scummvm/commit/63747963b353dc9c002ccc893c72ce132c182250
Author: athrxx (athrxx at scummvm.org)
Date: 2021-12-05T18:48:55+01:00

Commit Message:
KYRA: (LoK/Trd. Chinese) - fix Kyrandia logo glitch

The animation has been modified so that the frame numbers don't match. The sequence data needs to be modified accordingly...

Changed paths:
    engines/kyra/engine/kyra_lok.cpp
    engines/kyra/resource/staticres.cpp


diff --git a/engines/kyra/engine/kyra_lok.cpp b/engines/kyra/engine/kyra_lok.cpp
index 099d3bbe08..156a5644a9 100644
--- a/engines/kyra/engine/kyra_lok.cpp
+++ b/engines/kyra/engine/kyra_lok.cpp
@@ -158,6 +158,9 @@ KyraEngine_LoK::~KyraEngine_LoK() {
 
 	for (int i = 0; i < ARRAYSIZE(_sceneAnimTable); ++i)
 		delete[] _sceneAnimTable[i];
+
+	// This one has to be deleted manually, since we allocate an extra buffer for it.
+	delete[] _seq_KyrandiaLogo;
 }
 
 Common::Error KyraEngine_LoK::init() {
diff --git a/engines/kyra/resource/staticres.cpp b/engines/kyra/resource/staticres.cpp
index d7880db8f8..ed5d291589 100644
--- a/engines/kyra/resource/staticres.cpp
+++ b/engines/kyra/resource/staticres.cpp
@@ -743,7 +743,20 @@ void KyraEngine_LoK::initStaticResource() {
 	int temp = 0;
 	_seq_Forest = _staticres->loadRawData(k1ForestSeq, temp);
 	_seq_KallakWriting = _staticres->loadRawData(k1KallakWritingSeq, temp);
+
 	_seq_KyrandiaLogo = _staticres->loadRawData(k1KyrandiaLogoSeq, temp);
+	uint8 *kyraLogo = new uint8[temp];
+	memcpy(kyraLogo, _seq_KyrandiaLogo, temp);
+	// The Kyrandia logo has been modified for the Chinese version and unfortunately
+	// this includes the sequence data. The data is currently not treated as language
+	// specific in KYRA.DAT and I want to keep it that way, since all other version
+	// use the exact same data. We just patch the data...
+	if (_flags.lang == Common::ZH_TWN) {
+		kyraLogo[30] = kyraLogo[86] = 0x0d;
+		kyraLogo[45] = kyraLogo[60] = kyraLogo[64] = 0x0e;
+	}
+	_seq_KyrandiaLogo = kyraLogo;
+
 	_seq_KallakMalcolm = _staticres->loadRawData(k1KallakMalcolmSeq, temp);
 	_seq_MalcolmTree = _staticres->loadRawData(k1MalcolmTreeSeq, temp);
 	_seq_WestwoodLogo = _staticres->loadRawData(k1WestwoodLogoSeq, temp);




More information about the Scummvm-git-logs mailing list