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

whiterandrek whiterandrek at gmail.com
Sat May 23 09:37:26 UTC 2020


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b88dfe94b8 PETKA: fix description opcode
4f1186a1e5 PETKA: fixed star visibility after returning an item
62061987b5 PETKA: fixed case position when item is added
c6f539721c PETKA: fixed moving mouse


Commit: b88dfe94b809cdb21c341c424c28e2b347d5fabf
    https://github.com/scummvm/scummvm/commit/b88dfe94b809cdb21c341c424c28e2b347d5fabf
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-05-23T12:27:18+03:00

Commit Message:
PETKA: fix description opcode

Changed paths:
    engines/petka/objects/object.cpp
    engines/petka/objects/text.cpp


diff --git a/engines/petka/objects/object.cpp b/engines/petka/objects/object.cpp
index 5c83c64097..8ec792bb72 100644
--- a/engines/petka/objects/object.cpp
+++ b/engines/petka/objects/object.cpp
@@ -359,14 +359,15 @@ void QMessageObject::processMessage(const QMessage &msg) {
 			break;
 		case kDescription: {
 			Common::ScopedPtr<Common::SeekableReadStream> invStream(g_vm->openFile("invntr.txt", false));
-			Common::INIFile invIni;
 			if (invStream) {
 				Common::String desc;
+				Common::INIFile invIni;
 
+				invIni.allowNonEnglishCharacters();
 				invIni.loadFromStream(*invStream);
 				invIni.getKey(_name, "ALL", desc);
 
-				g_vm->getQSystem()->_mainInterface->setTextDescription(Common::U32String(desc.c_str()), msg.arg1);
+				g_vm->getQSystem()->_mainInterface->setTextDescription(Common::convertToU32String(desc.c_str(), Common::kWindows1251), msg.arg1);
 			}
 			break;
 		}
diff --git a/engines/petka/objects/text.cpp b/engines/petka/objects/text.cpp
index 00b6e09c9c..35b2548445 100644
--- a/engines/petka/objects/text.cpp
+++ b/engines/petka/objects/text.cpp
@@ -135,7 +135,7 @@ QTextDescription::QTextDescription(const Common::U32String &desc, uint32 frame)
 	const Graphics::Surface *frameS = flc->getCurrentFrame();
 	Graphics::Surface *s = g_vm->resMgr()->findOrCreateSurface(-2, 640, 480);
 
-	Graphics::Surface *convS = frameS->convertTo(s->format);
+	Graphics::Surface *convS = frameS->convertTo(s->format, flc->getPalette());
 	s->copyRectToSurface(*convS, 0, 0, _rect);
 	convS->free();
 	delete convS;


Commit: 4f1186a1e53bfe231e1d3de86a4086bfc97482a6
    https://github.com/scummvm/scummvm/commit/4f1186a1e53bfe231e1d3de86a4086bfc97482a6
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-05-23T12:30:05+03:00

Commit Message:
PETKA: fixed star visibility after returning an item

Changed paths:
    engines/petka/objects/object_star.cpp


diff --git a/engines/petka/objects/object_star.cpp b/engines/petka/objects/object_star.cpp
index ff1ab14b79..23069dc915 100644
--- a/engines/petka/objects/object_star.cpp
+++ b/engines/petka/objects/object_star.cpp
@@ -76,6 +76,7 @@ void QObjectStar::onClick(int x, int y) {
 	} else {
 		QObjectCursor *cursor = g_vm->getQSystem()->_cursor.get();
 		cursor->show(0);
+		cursor->returnInvItem();
 		cursor->_resourceId = button + kFirstCursorId;
 		cursor->_actionType = button - 1;
 		cursor->show(1);


Commit: 62061987b5d8e0b62729aea05412a01141542fa0
    https://github.com/scummvm/scummvm/commit/62061987b5d8e0b62729aea05412a01141542fa0
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-05-23T12:32:14+03:00

Commit Message:
PETKA: fixed case position when item is added

Changed paths:
    engines/petka/objects/object_case.cpp


diff --git a/engines/petka/objects/object_case.cpp b/engines/petka/objects/object_case.cpp
index 2d24fcee95..f496b9ea8e 100644
--- a/engines/petka/objects/object_case.cpp
+++ b/engines/petka/objects/object_case.cpp
@@ -71,12 +71,12 @@ QObjectCase::QObjectCase() {
 	_isShown = false;
 	_updateZ = false;
 
-	_itemsLocation[kChapayevButton] = Common::Point(120, 145);
-	_itemsLocation[kPanelButton] = Common::Point(240, 145);
-	_itemsLocation[kMapButton] = Common::Point(360, 145);
-	_itemsLocation[kCloseButton] = Common::Point(100, 220);
-	_itemsLocation[kNextPageButton] = Common::Point(240, 220);
-	_itemsLocation[kPrevPageButton] = Common::Point(380, 220);
+	_itemsLocation[0] = Common::Point(120, 145);
+	_itemsLocation[1] = Common::Point(240, 145);
+	_itemsLocation[2] = Common::Point(360, 145);
+	_itemsLocation[3] = Common::Point(100, 220);
+	_itemsLocation[4] = Common::Point(240, 220);
+	_itemsLocation[5] = Common::Point(380, 220);
 }
 
 void QObjectCase::update(int time) {
@@ -214,11 +214,11 @@ void QObjectCase::addItemObjects() {
 	const uint size = (_itemIndex + kItemsOnPage >= _items.size()) ? _items.size() : (_itemIndex + kItemsOnPage);
 	for (uint i = _itemIndex; i < size; ++i) {
 		QMessageObject *obj = g_vm->getQSystem()->findObject(_items[i]);
+		obj->_x = _itemsLocation[i - _itemIndex].x;
+		obj->_y = _itemsLocation[i - _itemIndex].y;
 		obj->_z = kItemZ;
-		objs.push_back(obj);
 		g_vm->resMgr()->loadFlic(obj->_resourceId);
-		_x = _itemsLocation[i - _itemIndex].x;
-		_y = _itemsLocation[i - _itemIndex].y;
+		objs.push_back(obj);
 	}
 }
 


Commit: c6f539721c6db9982ab692e978a9adb5069d2915
    https://github.com/scummvm/scummvm/commit/c6f539721c6db9982ab692e978a9adb5069d2915
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-05-23T12:36:11+03:00

Commit Message:
PETKA: fixed moving mouse

Changed paths:
    engines/petka/interfaces/main.cpp


diff --git a/engines/petka/interfaces/main.cpp b/engines/petka/interfaces/main.cpp
index aac25e3015..7b92573cce 100644
--- a/engines/petka/interfaces/main.cpp
+++ b/engines/petka/interfaces/main.cpp
@@ -244,6 +244,7 @@ void InterfaceMain::onMouseMove(const Common::Point p) {
 		for (int i = _objs.size() - 1; i >= 0; --i) {
 			if (_objs[i]->isInPoint(p.x, p.y)) {
 				_objs[i]->onMouseMove(p.x, p.y);
+				break;
 			}
 		}
 	}




More information about the Scummvm-git-logs mailing list