[Scummvm-git-logs] scummvm master -> a646936fb18ba757e8c86b192c3995e808990845
sev-
sev at scummvm.org
Tue Sep 6 21:45:23 CEST 2016
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:
471c76a9a7 FULLPIPE: Fix rounding error in MctlGraph::makeQueue
a646936fb1 FULLPIPE: Use cp866 for logging on Windows build
Commit: 471c76a9a75a41615f6fd0788cb36f0da18f961f
https://github.com/scummvm/scummvm/commit/471c76a9a75a41615f6fd0788cb36f0da18f961f
Author: Retro-Junk (bambarbee at yandex.ru)
Date: 2016-09-06T21:44:46+02:00
Commit Message:
FULLPIPE: Fix rounding error in MctlGraph::makeQueue
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 490e593..b910c81 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2332,7 +2332,7 @@ MessageQueue *MctlGraph::makeQueue(StaticANIObject *obj, int xpos, int ypos, int
double dst1 = sqrt((double)((ypos - nod->_y) * (ypos - nod->_y) + (xpos - nod->_x) * (xpos - nod->_x)));
int dst = linkInfoDest.link->_graphDst->_z - nod->_z;
- mctlMQ1.distance2 = (int)(nod->_z + (dst1 * (double)dst / linkInfoDest.link->_length));
+ mctlMQ1.distance2 = nod->_z + (int)(dst1 * (double)dst / linkInfoDest.link->_length);
putToLink(&mctlMQ1.pt2, linkInfoDest.link, 1);
Commit: a646936fb18ba757e8c86b192c3995e808990845
https://github.com/scummvm/scummvm/commit/a646936fb18ba757e8c86b192c3995e808990845
Author: Retro-Junk (bambarbee at yandex.ru)
Date: 2016-09-06T21:44:55+02:00
Commit Message:
FULLPIPE: Use cp866 for logging on Windows build
Changed paths:
engines/fullpipe/utils.cpp
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 148f779..de7cbbb 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -473,6 +473,19 @@ byte *transCyrillic(byte *s) {
int i = 0;
for (byte *p = s; *p; p++) {
+#ifdef WIN32
+ // translate from cp1251 to cp866
+ byte c = *p;
+ if (c >= 0xC0 && c <= 0xEF)
+ c = c - 0xC0 + 0x80;
+ else if (c >= 0xF0 && c <= 0xFF)
+ c = c - 0xF0 + 0xE0;
+ else if (c == 0xA8)
+ c = 0xF0;
+ else if (c == 0xB8)
+ c = 0xF1;
+ tmp[i++] = c;
+#else
if (*p < 128) {
tmp[i++] = *p;
} else {
@@ -487,6 +500,7 @@ byte *transCyrillic(byte *s) {
assert(trans[j]);
}
+#endif
}
tmp[i] = 0;
More information about the Scummvm-git-logs
mailing list