[Scummvm-git-logs] scummvm master -> 0effa2f103e9d72e74516fcb95b1f5d803157fa3

bluegr bluegr at gmail.com
Fri Jun 11 21:05:48 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:
ff97b24f09 TRECISION: Remove the now redundant maskMouse variable
271ee6ab89 TRECISION: Change _inventorySpeed into a static const
0effa2f103 TRECISION: Make _sortTableReplay private


Commit: ff97b24f09c9516f00d2426fd41af44827ab4aca
    https://github.com/scummvm/scummvm/commit/ff97b24f09c9516f00d2426fd41af44827ab4aca
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-06-12T00:05:27+03:00

Commit Message:
TRECISION: Remove the now redundant maskMouse variable

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


diff --git a/engines/trecision/trecision.cpp b/engines/trecision/trecision.cpp
index 6b4cf625b6..ad955df1e8 100644
--- a/engines/trecision/trecision.cpp
+++ b/engines/trecision/trecision.cpp
@@ -151,9 +151,6 @@ TrecisionEngine::TrecisionEngine(OSystem *syst, const ADGameDescription *desc) :
 
 	_curTime = 0;
 	_characterSpeakTime = 0;
-
-	maskMouse = false;
-
 	_pauseStartTime = 0;
 	_textStatus = TEXT_OFF;
 
diff --git a/engines/trecision/trecision.h b/engines/trecision/trecision.h
index 50c5307744..42c8ec4387 100644
--- a/engines/trecision/trecision.h
+++ b/engines/trecision/trecision.h
@@ -147,8 +147,6 @@ class TrecisionEngine : public Engine {
 	bool _gamePaused;
 	uint8 _curStack;
 
-	bool maskMouse;
-
 public:
 	TrecisionEngine(OSystem *syst, const ADGameDescription *desc);
 	~TrecisionEngine() override;
diff --git a/engines/trecision/utils.cpp b/engines/trecision/utils.cpp
index 1efbea3f7e..24a84af35b 100644
--- a/engines/trecision/utils.cpp
+++ b/engines/trecision/utils.cpp
@@ -220,17 +220,13 @@ void TrecisionEngine::processMouse() {
 	if (!_graphicsMgr->isCursorVisible())
 		return;
 
-	if (_mouseLeftBtn && !maskMouse) {
+	if (_mouseLeftBtn) {
 		_scheduler->leftClick(mx, my);
-		maskMouse = true;
 		_mouseLeftBtn = false;
-	} else if (_mouseRightBtn && !maskMouse) {
+	} else if (_mouseRightBtn) {
 		_scheduler->rightClick(mx, my);
-		maskMouse = true;
 		_mouseRightBtn = false;
 	} else {
-		maskMouse = false;
-
 		if (!_flagScriptActive && _mouseMoved) {
 			processMouseMovement();
 			_mouseMoved = false;


Commit: 271ee6ab89e8024f210c52d3bb405c22af533fd9
    https://github.com/scummvm/scummvm/commit/271ee6ab89e8024f210c52d3bb405c22af533fd9
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-06-12T00:05:28+03:00

Commit Message:
TRECISION: Change _inventorySpeed into a static const

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


diff --git a/engines/trecision/inventory.cpp b/engines/trecision/inventory.cpp
index 2aa49b4bcd..def12b21ec 100644
--- a/engines/trecision/inventory.cpp
+++ b/engines/trecision/inventory.cpp
@@ -303,8 +303,10 @@ void TrecisionEngine::replaceIcon(uint8 oldIcon, uint8 newIcon) {
 }
 
 void TrecisionEngine::rollInventory(uint8 status) {
+	static const int16 inventorySpeed[8] = { 20, 10, 5, 3, 2, 0, 0, 0 };
+
 	if (status == INV_PAINT) {
-		_inventoryCounter -= _inventorySpeed[_inventorySpeedIndex++];
+		_inventoryCounter -= inventorySpeed[_inventorySpeedIndex++];
 		if (_inventoryCounter <= INVENTORY_SHOW || _inventorySpeedIndex > 5) {
 			_inventorySpeedIndex = 0;
 			setInventoryStart(_iconBase, INVENTORY_SHOW);
@@ -316,7 +318,7 @@ void TrecisionEngine::rollInventory(uint8 status) {
 			return;
 		}
 	} else if (status == INV_DEPAINT) {
-		_inventoryCounter += _inventorySpeed[_inventorySpeedIndex++];
+		_inventoryCounter += inventorySpeed[_inventorySpeedIndex++];
 
 		if (_inventoryCounter > INVENTORY_HIDE || _inventorySpeedIndex > 5) {
 			_inventorySpeedIndex = 0;
diff --git a/engines/trecision/trecision.cpp b/engines/trecision/trecision.cpp
index ad955df1e8..439f8ad59a 100644
--- a/engines/trecision/trecision.cpp
+++ b/engines/trecision/trecision.cpp
@@ -78,12 +78,6 @@ TrecisionEngine::TrecisionEngine(OSystem *syst, const ADGameDescription *desc) :
 	_inventoryStatus = INV_OFF;
 	_inventoryCounter = INVENTORY_HIDE;	
 	_flagInventoryLocked = false;
-	_inventorySpeed[0] = 20;
-	_inventorySpeed[1] = 10;
-	_inventorySpeed[2] = 5;
-	_inventorySpeed[3] = 3;
-	_inventorySpeed[4] = 2;
-	_inventorySpeed[5] = _inventorySpeed[6] = _inventorySpeed[7] = 0;
 	_inventorySpeedIndex = 0;
 	_inventoryScrollTime = 0;
 
diff --git a/engines/trecision/trecision.h b/engines/trecision/trecision.h
index 42c8ec4387..c50c4318eb 100644
--- a/engines/trecision/trecision.h
+++ b/engines/trecision/trecision.h
@@ -254,7 +254,6 @@ public:
 	uint8 _inventoryRefreshStartLine;
 	int16 _inventoryCounter;
 	bool  _flagInventoryLocked;
-	int16 _inventorySpeed[8];
 	uint8 _inventorySpeedIndex;
 	uint32 _inventoryScrollTime;
 	uint16 _lastInv;


Commit: 0effa2f103e9d72e74516fcb95b1f5d803157fa3
    https://github.com/scummvm/scummvm/commit/0effa2f103e9d72e74516fcb95b1f5d803157fa3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-06-12T00:05:28+03:00

Commit Message:
TRECISION: Make _sortTableReplay private

Changed paths:
    engines/trecision/trecision.h


diff --git a/engines/trecision/trecision.h b/engines/trecision/trecision.h
index c50c4318eb..a4939b9fa3 100644
--- a/engines/trecision/trecision.h
+++ b/engines/trecision/trecision.h
@@ -147,6 +147,8 @@ class TrecisionEngine : public Engine {
 	bool _gamePaused;
 	uint8 _curStack;
 
+	Common::List<SSortTable> _sortTableReplay;
+
 public:
 	TrecisionEngine(OSystem *syst, const ADGameDescription *desc);
 	~TrecisionEngine() override;
@@ -235,7 +237,6 @@ public:
 	SRoom _room[MAXROOMS];
 
 	Common::List<SSortTable> _sortTable;
-	Common::List<SSortTable> _sortTableReplay;
 
 	uint16 _curObj;
 	SObject _obj[MAXOBJ];




More information about the Scummvm-git-logs mailing list