[Scummvm-git-logs] scummvm master -> 6c17a11e41b48cac6148428c50ca8371e66245c9
whiterandrek
whiterandrek at gmail.com
Thu May 21 11:11:12 UTC 2020
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:
6c17a11e41 PETKA: fixed drawing location names on the map
Commit: 6c17a11e41b48cac6148428c50ca8371e66245c9
https://github.com/scummvm/scummvm/commit/6c17a11e41b48cac6148428c50ca8371e66245c9
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-05-21T14:09:30+03:00
Commit Message:
PETKA: fixed drawing location names on the map
Changed paths:
engines/petka/interfaces/map.cpp
engines/petka/q_system.cpp
diff --git a/engines/petka/interfaces/map.cpp b/engines/petka/interfaces/map.cpp
index 980622c6d8..baca41aa67 100644
--- a/engines/petka/interfaces/map.cpp
+++ b/engines/petka/interfaces/map.cpp
@@ -21,6 +21,7 @@
*/
#include "common/system.h"
+#include "common/str-enc.h"
#include "petka/q_manager.h"
#include "petka/flc.h"
@@ -141,9 +142,9 @@ void InterfaceMap::onMouseMove(const Common::Point p) {
Graphics::PixelFormat fmt = g_system->getScreenFormat();
QMessageObject *obj = (QMessageObject *)_objUnderCursor;
if (!obj->_nameOnScreen.empty()) {
- setText(obj->_nameOnScreen, fmt.RGBToColor(0xFF, 0xFF, 0xC0), fmt.RGBToColor(0xA, 0xA, 0xA));
+ setText(Common::convertToU32String(obj->_nameOnScreen.c_str(), Common::kWindows1251), fmt.RGBToColor(0xC0, 0xFF, 0xFF), fmt.RGBToColor(0xA, 0xA, 0xA));
} else {
- setText(obj->_name, fmt.RGBToColor(0, 0, 0x80), fmt.RGBToColor(0xA, 0xA, 0xA));
+ setText(Common::convertToU32String(obj->_name.c_str(), Common::kWindows1251), fmt.RGBToColor(0x80, 0, 0), fmt.RGBToColor(0xA, 0xA, 0xA));
}
} else if (oldObj && !_objUnderCursor) {
setText(Common::U32String(""), 0, 0);
diff --git a/engines/petka/q_system.cpp b/engines/petka/q_system.cpp
index a91d2e0401..147c1365ea 100644
--- a/engines/petka/q_system.cpp
+++ b/engines/petka/q_system.cpp
@@ -82,7 +82,7 @@ static void readObject(QMessageObject &obj, Common::SeekableReadStream &stream,
}
}
- //namesIni.getKey(obj._name, "all", obj._nameOnScreen);
+ namesIni.getKey(obj._name, "all", obj._nameOnScreen);
Common::String rgbString;
if (castIni.getKey(obj._name, "all", rgbString)) {
More information about the Scummvm-git-logs
mailing list