[Scummvm-git-logs] scummvm master -> 8716bb511cc186145f1b5fdaf84dd7d26dcfe51e
ccawley2011
ccawley2011 at gmail.com
Sun Feb 7 21:28:34 UTC 2021
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:
8716bb511c WINTERMUTE: Clean up the limit constants
Commit: 8716bb511cc186145f1b5fdaf84dd7d26dcfe51e
https://github.com/scummvm/scummvm/commit/8716bb511cc186145f1b5fdaf84dd7d26dcfe51e
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-02-07T21:28:19Z
Commit Message:
WINTERMUTE: Clean up the limit constants
Changed paths:
engines/wintermute/ad/ad_waypoint_group.cpp
engines/wintermute/base/base_region.cpp
engines/wintermute/debugger/listing_providers/blank_listing.cpp
engines/wintermute/wintermute.h
diff --git a/engines/wintermute/ad/ad_waypoint_group.cpp b/engines/wintermute/ad/ad_waypoint_group.cpp
index 64947ac0a2..0dbf3cec63 100644
--- a/engines/wintermute/ad/ad_waypoint_group.cpp
+++ b/engines/wintermute/ad/ad_waypoint_group.cpp
@@ -44,7 +44,7 @@ AdWaypointGroup::AdWaypointGroup(BaseGame *inGame) : BaseObject(inGame) {
_active = true;
_editorSelectedPoint = -1;
_lastMimicScale = -1;
- _lastMimicX = _lastMimicY = -INT_MAX_VALUE;
+ _lastMimicX = _lastMimicY = INT_MIN_VALUE;
}
diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp
index be8aa1d9d1..458dbb5c31 100644
--- a/engines/wintermute/base/base_region.cpp
+++ b/engines/wintermute/base/base_region.cpp
@@ -46,7 +46,7 @@ BaseRegion::BaseRegion(BaseGame *inGame) : BaseObject(inGame) {
_active = true;
_editorSelectedPoint = -1;
_lastMimicScale = -1;
- _lastMimicX = _lastMimicY = -INT_MAX_VALUE;
+ _lastMimicX = _lastMimicY = INT_MIN_VALUE;
_rect.setEmpty();
}
@@ -496,7 +496,7 @@ bool BaseRegion::getBoundingRect(Rect32 *rect) {
if (_points.size() == 0) {
rect->setEmpty();
} else {
- int32 minX = INT_MAX_VALUE, minY = INT_MAX_VALUE, maxX = -INT_MAX_VALUE, maxY = -INT_MAX_VALUE;
+ int32 minX = INT_MAX_VALUE, minY = INT_MAX_VALUE, maxX = INT_MIN_VALUE, maxY = INT_MIN_VALUE;
for (uint32 i = 0; i < _points.size(); i++) {
minX = MIN(minX, _points[i]->x);
diff --git a/engines/wintermute/debugger/listing_providers/blank_listing.cpp b/engines/wintermute/debugger/listing_providers/blank_listing.cpp
index 928c91dc7f..9357f81c25 100644
--- a/engines/wintermute/debugger/listing_providers/blank_listing.cpp
+++ b/engines/wintermute/debugger/listing_providers/blank_listing.cpp
@@ -21,13 +21,13 @@
*/
#include "blank_listing.h"
-#include "limits.h"
+#include "engines/wintermute/wintermute.h"
namespace Wintermute {
BlankListing::BlankListing(const Common::String filename) : _filename(filename) {}
-uint BlankListing::getLength() const { return UINT_MAX; }
+uint BlankListing::getLength() const { return UINT_MAX_VALUE; }
Common::String BlankListing::getLine(uint n) {
return "<no source for " + _filename + " ~~~ line: " + Common::String::format("%d", n) + ">";
diff --git a/engines/wintermute/wintermute.h b/engines/wintermute/wintermute.h
index 1e9f8213ec..8695912f14 100644
--- a/engines/wintermute/wintermute.h
+++ b/engines/wintermute/wintermute.h
@@ -35,8 +35,9 @@ class BaseGame;
class SystemClassRegistry;
class DebuggerController;
-const int INT_MAX_VALUE = 0x7fffffff;
-const int INT_MIN_VALUE = -INT_MAX_VALUE - 1; // WME3D
+const int INT_MAX_VALUE = 0x7fffffff;
+const int INT_MIN_VALUE = -INT_MAX_VALUE - 1;
+const int UINT_MAX_VALUE = 0xffffffff;
// our engine debug channels
enum {
More information about the Scummvm-git-logs
mailing list