[Scummvm-git-logs] scummvm master -> 69fd794b27cb8e7821358421120da67b34cb313b
criezy
criezy at scummvm.org
Sun Mar 7 19:32:12 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:
93859f25c6 AGS: Ensure clip rect is within the bitmap
50932ffb38 BUILD: Fix building with c++11 on systems without std::nullptr_t
69fd794b27 PETKA: Fix static assert trying to delete imcomplete Walk type
Commit: 93859f25c671a2df2111c65d3cd89f9fa4dc1272
https://github.com/scummvm/scummvm/commit/93859f25c671a2df2111c65d3cd89f9fa4dc1272
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-07T19:30:34Z
Commit Message:
AGS: Ensure clip rect is within the bitmap
This is consistent with what Allegro does.
Changed paths:
engines/ags/lib/allegro/gfx.cpp
diff --git a/engines/ags/lib/allegro/gfx.cpp b/engines/ags/lib/allegro/gfx.cpp
index 26643528f9..afa58460eb 100644
--- a/engines/ags/lib/allegro/gfx.cpp
+++ b/engines/ags/lib/allegro/gfx.cpp
@@ -26,6 +26,7 @@
#include "ags/ags.h"
#include "ags/globals.h"
#include "common/textconsole.h"
+#include "common/util.h"
#include "graphics/screen.h"
namespace AGS3 {
@@ -59,10 +60,10 @@ int set_gfx_mode(int card, int w, int h, int v_w, int v_h) {
void set_clip_rect(BITMAP *bitmap, int x1, int y1, int x2, int y2) {
// The rect passed to the function in inclusive-inclusive, but
// internally the clipping rect in BITMAP is inclusive-exclusive.
- bitmap->cl = x1;
- bitmap->ct = y1;
- bitmap->cr = x2 + 1;
- bitmap->cb = y2 + 1;
+ bitmap->cl = CLIP(x1, 0, (int)bitmap->w - 1);
+ bitmap->ct = CLIP(y1, 0, (int)bitmap->h - 1);
+ bitmap->cr = CLIP(x2 + 1, 0, (int)bitmap->w);
+ bitmap->cb = CLIP(y2 + 1, 0, (int)bitmap->h);
}
void get_clip_rect(BITMAP *bitmap, int *x1, int *y1, int *x2, int *y2) {
Commit: 50932ffb389bfbfaf5bf774de313edc5ad608d62
https://github.com/scummvm/scummvm/commit/50932ffb389bfbfaf5bf774de313edc5ad608d62
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-07T19:30:34Z
Commit Message:
BUILD: Fix building with c++11 on systems without std::nullptr_t
Changed paths:
common/scummsys.h
configure
diff --git a/common/scummsys.h b/common/scummsys.h
index ccf6930ca8..19550a5930 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -467,6 +467,15 @@ typedef uint32 uintptr;
#endif
+//
+// std::nullptr_t when c++11 is enabled but this type is not available
+//
+#if defined(USE_CXX11) && defined(NO_CXX11_NULLPTR_T)
+namespace std {
+ typedef decltype(nullptr) nullptr_t;
+}
+#endif
+
#include "common/forbidden.h"
#endif
diff --git a/configure b/configure
index f40badb461..598c473d20 100755
--- a/configure
+++ b/configure
@@ -2350,6 +2350,23 @@ EOF
echo no
define_in_config_if_yes yes 'NO_CXX11_INITIALIZER_LIST'
fi
+
+ # Check if std::nullptr_t is available
+ echo_n "Checking if C++11 std::nullptr_t is available..."
+ cat > $TMPC << EOF
+#include <cstddef>
+int main(int argc, char *argv[]) {
+ std::nullptr_t i = nullptr;
+ return 0;
+}
+EOF
+ cc_check
+ if test "$TMPR" -eq 0; then
+ echo yes
+ else
+ echo no
+ define_in_config_if_yes yes 'NO_CXX11_NULLPTR_T'
+ fi
fi
#
Commit: 69fd794b27cb8e7821358421120da67b34cb313b
https://github.com/scummvm/scummvm/commit/69fd794b27cb8e7821358421120da67b34cb313b
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-03-07T19:30:34Z
Commit Message:
PETKA: Fix static assert trying to delete imcomplete Walk type
The issue was with using Common::ScopedPtr for an incomplete
type. There is a static assert in common/ptr.h to catch this
that failed.
Changed paths:
engines/petka/objects/heroes.cpp
engines/petka/objects/heroes.h
diff --git a/engines/petka/objects/heroes.cpp b/engines/petka/objects/heroes.cpp
index f299c927fa..421c7102b6 100644
--- a/engines/petka/objects/heroes.cpp
+++ b/engines/petka/objects/heroes.cpp
@@ -30,7 +30,6 @@
#include "petka/sound.h"
#include "petka/objects/heroes.h"
#include "petka/interfaces/panel.h"
-#include "petka/walk.h"
namespace Petka {
diff --git a/engines/petka/objects/heroes.h b/engines/petka/objects/heroes.h
index 69eb926cb4..2f82023ed3 100644
--- a/engines/petka/objects/heroes.h
+++ b/engines/petka/objects/heroes.h
@@ -25,11 +25,10 @@
#include "common/ptr.h"
#include "petka/objects/object.h"
+#include "petka/walk.h"
namespace Petka {
-class Walk;
-
class QObjectPetka : public QObject {
public:
QObjectPetka();
More information about the Scummvm-git-logs
mailing list