[Scummvm-git-logs] scummvm-tools master -> cb9ed1d6dd051f7411d4d607442b782f13b31d57
sev-
sev at scummvm.org
Tue Nov 14 22:37:46 CET 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
cb9ed1d6dd PRINCE: Fix packer for Polish extracted texts
Commit: cb9ed1d6dd051f7411d4d607442b782f13b31d57
https://github.com/scummvm/scummvm-tools/commit/cb9ed1d6dd051f7411d4d607442b782f13b31d57
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-11-14T22:37:18+01:00
Commit Message:
PRINCE: Fix packer for Polish extracted texts
Changed paths:
engines/prince/pack_prince.cpp
diff --git a/engines/prince/pack_prince.cpp b/engines/prince/pack_prince.cpp
index 8ebf511..c8b2a0f 100644
--- a/engines/prince/pack_prince.cpp
+++ b/engines/prince/pack_prince.cpp
@@ -707,7 +707,10 @@ void PackPrince::talkTxtNoDialog() {
std::string line;
Common::Array<TalkTxt> normalLinesArray;
TalkTxt tempNormalLine;
+ bool havePragma;
while (1) {
+ havePragma = true;
+
// Special dialog data
line.clear();
while ((c = _databank.readByte()) != '\r') {
@@ -728,20 +731,32 @@ void PackPrince::talkTxtNoDialog() {
continue;
} else if (!line.compare("#END")) {
break;
+ } else {
+ if (line.front() == '#') {
+ printf("UNKNOWN pragma: %s", line.c_str());
+ break;
+ } else {
+ tempNormalLine._txt = line;
+ havePragma = false;
+
+ tempNormalLine._txt += '\0';
+ }
}
- // Line of text
- tempNormalLine._txt.clear();
- while ((c = _databank.readByte()) != '\r') {
- c = correctPolishLetter(c); // temporary
- if (c == '|') {
- c = 10;
+ if (havePragma) {
+ // Line of text
+ tempNormalLine._txt.clear();
+ while ((c = _databank.readByte()) != '\r') {
+ c = correctPolishLetter(c); // temporary
+ if (c == '|') {
+ c = 10;
+ }
+ tempNormalLine._txt += c;
}
+ c = 0;
tempNormalLine._txt += c;
+ _databank.readByte(); // skip '\n'
}
- c = 0;
- tempNormalLine._txt += c;
- _databank.readByte(); // skip '\n'
normalLinesArray.push_back(tempNormalLine);
}
@@ -789,6 +804,10 @@ void PackPrince::packMobs() {
newMob._name.clear();
newMob._examTxt.clear();
+ if ((uint)_databank.pos() == fileSize) {
+ break;
+ }
+
// Test if end of location - next number
if ((c = _databank.readByte()) > 47 && c < 58) {
// Set location nr:
More information about the Scummvm-git-logs
mailing list