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

sev- sev at scummvm.org
Thu Apr 30 08:34:05 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:
afa3470343 PRINCE: Update translation file with version info
ef8b5a4a0a PRINCE: Print translation file version and build date. Made format extensible


Commit: afa34703434f5f93309070db97ab7210fc8d9914
    https://github.com/scummvm/scummvm/commit/afa34703434f5f93309070db97ab7210fc8d9914
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T10:33:48+02:00

Commit Message:
PRINCE: Update translation file with version info

Changed paths:
    dists/engine-data/prince_translation.dat


diff --git a/dists/engine-data/prince_translation.dat b/dists/engine-data/prince_translation.dat
index 4074ff8d6d..89d62dda49 100644
Binary files a/dists/engine-data/prince_translation.dat and b/dists/engine-data/prince_translation.dat differ


Commit: ef8b5a4a0a7bc88a0c13c6bdbe37e9fb5b3485a8
    https://github.com/scummvm/scummvm/commit/ef8b5a4a0a7bc88a0c13c6bdbe37e9fb5b3485a8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T10:33:48+02:00

Commit Message:
PRINCE: Print translation file version and build date. Made format extensible

Changed paths:
    engines/prince/archive.cpp


diff --git a/engines/prince/archive.cpp b/engines/prince/archive.cpp
index 0ed6e8c753..94af629674 100644
--- a/engines/prince/archive.cpp
+++ b/engines/prince/archive.cpp
@@ -98,6 +98,29 @@ bool PtcArchive::openTranslation(const Common::String &filename) {
 		_items[translationNames[i]] = item;
 	}
 
+	if (_items[translationNames[0]]._offset == _stream->pos()) {
+		warning("v0 translation file detected, update is needed");
+
+		return true;
+	}
+
+	// We have latter versions of the file
+	if (_stream->readByte() != '\n') {
+		error("Malformed prince_translation.dat file");
+	}
+
+	Common::String version = _stream->readLine();
+	Common::String stamp = _stream->readLine();
+
+	warning("%s translation file detected, built on %s", version.c_str(), stamp.c_str());
+
+	if (version.equals("v1.0")) {
+		// No more data, we all fine
+		return true;
+	}
+
+	// Here we have format extension data
+
 	return true;
 }
 




More information about the Scummvm-git-logs mailing list