[Scummvm-git-logs] scummvm master -> 824938109e451509fdde77ec79016fd6b8dbfff2

whiterandrek whiterandrek at gmail.com
Sat Oct 3 15:00:35 UTC 2020


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

Summary:
51e9a742ec PETKA: fixed drawing text choices
d648873ebe PETKA: read settings in panel ctor
824938109e PETKA: updated engine status


Commit: 51e9a742ec0ad657838e4757dc958a415154f97d
    https://github.com/scummvm/scummvm/commit/51e9a742ec0ad657838e4757dc958a415154f97d
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-10-03T17:58:22+03:00

Commit Message:
PETKA: fixed drawing text choices

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


diff --git a/engines/petka/objects/text.cpp b/engines/petka/objects/text.cpp
index d3f51945db..a226110986 100644
--- a/engines/petka/objects/text.cpp
+++ b/engines/petka/objects/text.cpp
@@ -188,7 +188,7 @@ QTextChoice::QTextChoice(const Common::Array<Common::U32String> &choices, uint16
 }
 
 void QTextChoice::onMouseMove(Common::Point p) {
-	p.x = p.x - _rect.left;
+	p.x = p.x - _rect.left - g_vm->getQSystem()->_xOffset;
 	p.y = p.y - _rect.top;
 	uint newChoice;
 	for (newChoice = 0; newChoice < _rects.size(); ++newChoice) {
@@ -201,12 +201,13 @@ void QTextChoice::onMouseMove(Common::Point p) {
 		Graphics::Surface *s = g_vm->resMgr()->loadBitmap(-2);
 		Common::ScopedPtr<Graphics::Font> font(Graphics::loadTTFFontFromArchive("FreeSans.ttf", 18));
 
-		if (_activeChoice < _choices.size()) {
-			font->drawString(s, _choices[_activeChoice], _rects[_activeChoice].left, _rects[_activeChoice].top, _rects[_activeChoice].width(), _choiceColor);
-		}
-
-		if (newChoice < _choices.size()) {
-			font->drawString(s, _choices[newChoice], _rects[newChoice].left, _rects[newChoice].top, _rects[newChoice].width(), _selectedColor);
+		s->fillRect(Common::Rect(s->w, s->h), 0);
+		for (uint i = 0; i < _choices.size(); ++i) {
+			if (i == newChoice) {
+				font->drawString(s, _choices[newChoice], _rects[newChoice].left, _rects[newChoice].top, s->w, _selectedColor);
+			} else {
+				font->drawString(s, _choices[i], _rects[i].left, _rects[i].top, s->w, _choiceColor);
+			}
 		}
 
 		_activeChoice = newChoice;


Commit: d648873ebeb3180acee37ea84526d7f1ff7fd09d
    https://github.com/scummvm/scummvm/commit/d648873ebeb3180acee37ea84526d7f1ff7fd09d
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-10-03T17:58:22+03:00

Commit Message:
PETKA: read settings in panel ctor

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


diff --git a/engines/petka/interfaces/panel.cpp b/engines/petka/interfaces/panel.cpp
index 7aed5fdc2a..2547991935 100644
--- a/engines/petka/interfaces/panel.cpp
+++ b/engines/petka/interfaces/panel.cpp
@@ -87,12 +87,7 @@ InterfacePanel::InterfacePanel() {
 	_objectPoints[21] = Common::Point(0, 0);
 	_objectPoints[22] = Common::Point(0, 0);
 	_objectPoints[23] = Common::Point(0, 0);
-
-	_subtitles = false;
-	_speechFrame = 1;
-	_musicFrame = 1;
-	_sfxFrame = 1;
-	_speedFrame = 1;
+	readSettings();
 }
 
 void InterfacePanel::start(int id) {


Commit: 824938109e451509fdde77ec79016fd6b8dbfff2
    https://github.com/scummvm/scummvm/commit/824938109e451509fdde77ec79016fd6b8dbfff2
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-10-03T18:00:10+03:00

Commit Message:
PETKA: updated engine status

Changed paths:
    engines/petka/petka.h


diff --git a/engines/petka/petka.h b/engines/petka/petka.h
index 0c46efcf47..25aabb8772 100644
--- a/engines/petka/petka.h
+++ b/engines/petka/petka.h
@@ -41,8 +41,8 @@
  *  - Red Comrades Demo
  *  - Red Comrades Save the Galaxy
  *  	- Part 1: can be completed
- *  	- Part 2: unplayable (requires support of scrolling backgrounds)
- *  	- Part 3: not tested
+ *  	- Part 2: error: unsupported flc
+ *  	- Part 3: script bug
  *  - Red Comrades 2: For the Great Justice
  */
 




More information about the Scummvm-git-logs mailing list