[Scummvm-git-logs] scummvm master -> 61dc5d353e53e90440462ab80d79d1c339fda65b

Strangerke Strangerke at scummvm.org
Sun Jun 6 07:40:27 UTC 2021


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:
5ecae9704d TRECISION: Fix warning in MSVC
5d27d3a964 TRECISION: Pass a pointer instead of SDText in drawText
61dc5d353e TRECISION: Change the order of initialization of GraphicsManager to please MSVC, fix missing initialization


Commit: 5ecae9704dbbab30eefbe16bec72cc7e1c6785f3
    https://github.com/scummvm/scummvm/commit/5ecae9704dbbab30eefbe16bec72cc7e1c6785f3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-06T08:40:13+01:00

Commit Message:
TRECISION: Fix warning in MSVC

Changed paths:
    engines/trecision/video.cpp


diff --git a/engines/trecision/video.cpp b/engines/trecision/video.cpp
index 410e445b09..4b2b57d20d 100644
--- a/engines/trecision/video.cpp
+++ b/engines/trecision/video.cpp
@@ -490,7 +490,7 @@ void AnimManager::drawSmkIconFrame(uint16 startIcon, uint16 iconNum) {
 		return;
 
 	int stx = ICONMARGSX;
-	uint16 a;
+	uint a;
 	for (a = 0; a < ICONSHOWN; ++a) {
 		if (a + startIcon >= _vm->_inventory.size())
 			break;


Commit: 5d27d3a9643abfa3bcd43f5e8a982ba291b99f79
    https://github.com/scummvm/scummvm/commit/5d27d3a9643abfa3bcd43f5e8a982ba291b99f79
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-06T08:40:13+01:00

Commit Message:
TRECISION: Pass a pointer instead of SDText in drawText

Changed paths:
    engines/trecision/text.cpp
    engines/trecision/text.h


diff --git a/engines/trecision/text.cpp b/engines/trecision/text.cpp
index 5bbaf8c612..c4edbcf97a 100644
--- a/engines/trecision/text.cpp
+++ b/engines/trecision/text.cpp
@@ -401,27 +401,27 @@ void TextManager::clearLastText() {
 	}
 }
 
-void TextManager::drawText(StackText text) {
-	_curString._rect.left = text._x;
-	_curString._rect.top = text._y;
-	_curString._rect.setWidth(_vm->textLength(text._text));
+void TextManager::drawText(StackText *text) {
+	_curString._rect.left = text->_x;
+	_curString._rect.top = text->_y;
+	_curString._rect.setWidth(_vm->textLength(text->_text));
 	int16 w = _curString._rect.width();
 
-	if (text._y == MAXY - CARHEI && w > 600)
+	if (text->_y == MAXY - CARHEI && w > 600)
 		w = w * 3 / 5;
-	else if (text._y != MAXY - CARHEI && w > 960)
+	else if (text->_y != MAXY - CARHEI && w > 960)
 		w = w * 2 / 5;
-	else if (text._y != MAXY - CARHEI && w > 320)
+	else if (text->_y != MAXY - CARHEI && w > 320)
 		w = w * 3 / 5;
 
 	_curString._rect.setWidth(w);
 
-	_curString._text = text._text;
+	_curString._text = text->_text;
 	uint16 height = _curString.calcHeight(_vm);
 	_curString._subtitleRect = Common::Rect(_curString._rect.width(), height);
 	_curString._rect.setHeight(height);
-	_curString._textCol = text._textCol;
-	_curString._shadowCol = text._shadowCol;
+	_curString._textCol = text->_textCol;
+	_curString._shadowCol = text->_shadowCol;
 
 	if (_curString._rect.top <= height)
 		_curString._rect.top += height;
@@ -448,7 +448,7 @@ void TextManager::drawTexts() {
 		if (i->_clear)
 			clearText();
 		else
-			drawText(*i);
+			drawText(&*i);
 	}
 }
 
diff --git a/engines/trecision/text.h b/engines/trecision/text.h
index f81a76a7aa..145f572057 100644
--- a/engines/trecision/text.h
+++ b/engines/trecision/text.h
@@ -81,7 +81,7 @@ public:
 
 	void addText(Common::Point pos, const char *text, uint16 textCol, uint16 shadowCol);
 	void clearLastText();
-	void drawText(StackText text);
+	void drawText(StackText *text);
 	void clearText();
 	void drawTexts();
 	void redrawString();


Commit: 61dc5d353e53e90440462ab80d79d1c339fda65b
    https://github.com/scummvm/scummvm/commit/61dc5d353e53e90440462ab80d79d1c339fda65b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-06T08:40:13+01:00

Commit Message:
TRECISION: Change the order of initialization of GraphicsManager to please MSVC, fix missing initialization

Changed paths:
    engines/trecision/graphics.cpp


diff --git a/engines/trecision/graphics.cpp b/engines/trecision/graphics.cpp
index 5a414a577e..e9d07abec8 100644
--- a/engines/trecision/graphics.cpp
+++ b/engines/trecision/graphics.cpp
@@ -38,13 +38,15 @@
 
 namespace Trecision {
 
-GraphicsManager::GraphicsManager(TrecisionEngine *vm) : kImageFormat(2, 5, 5, 5, 0, 10, 5, 0, 0), // RGB555
-	_vm(vm), _font(nullptr) {	
+GraphicsManager::GraphicsManager(TrecisionEngine *vm) : _vm(vm),  _font(nullptr), kImageFormat(2, 5, 5, 5, 0, 10, 5, 0, 0) {	
+	// RGB555
 	_drawRect = Common::Rect(0, 0, 0, 0);
 	_drawObjRect = Common::Rect(0, 0, 0, 0);
 	_drawObjIndex = -1;
 	_drawMask = false;
 	_actorRect = nullptr;
+	for (int i = 0; i < 3; ++i)
+		_bitMask[i] = 0;
 }
 
 GraphicsManager::~GraphicsManager() {




More information about the Scummvm-git-logs mailing list