[Scummvm-git-logs] scummvm master -> 421295bdc6dc9fc25d238bf56134b26dd09bf3ea

sev- noreply at scummvm.org
Sat May 20 21:24:02 UTC 2023


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:
421295bdc6 GRAPHICS: Change pitch from int16 to int32


Commit: 421295bdc6dc9fc25d238bf56134b26dd09bf3ea
    https://github.com/scummvm/scummvm/commit/421295bdc6dc9fc25d238bf56134b26dd09bf3ea
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-05-20T23:23:58+02:00

Commit Message:
GRAPHICS: Change pitch from int16 to int32

This is required for games allocating very big surfaces
(e.g. 9000x300 in Chronicle of Innsmouth - Mountains of Madness)

Changed paths:
    engines/ags/lib/allegro/surface.h
    graphics/managed_surface.h
    graphics/surface.h


diff --git a/engines/ags/lib/allegro/surface.h b/engines/ags/lib/allegro/surface.h
index 6ac73b40a5c..88405dc9681 100644
--- a/engines/ags/lib/allegro/surface.h
+++ b/engines/ags/lib/allegro/surface.h
@@ -32,7 +32,8 @@ class BITMAP {
 private:
 	Graphics::ManagedSurface *_owner;
 	public:
-	int16 &w, &h, &pitch;
+	int16 &w, &h;
+	int32 &pitch;
 	Graphics::PixelFormat &format;
 	bool clip;
 	int ct, cb, cl, cr;
diff --git a/graphics/managed_surface.h b/graphics/managed_surface.h
index dbf4289cf98..18ebd7876bb 100644
--- a/graphics/managed_surface.h
+++ b/graphics/managed_surface.h
@@ -103,7 +103,7 @@ public:
 public:
 	int16 &w;           /*!< Width of the surface rectangle. */
 	int16 &h;           /*!< Height of the surface rectangle. */
-	int16 &pitch;       /*!< Pitch of the surface rectangle. See @ref Surface::pitch. */
+	int32 &pitch;       /*!< Pitch of the surface rectangle. See @ref Surface::pitch. */
 	PixelFormat &format; /*!< Pixel format of the surface. See @ref PixelFormat. */
 public:
 	/**
diff --git a/graphics/surface.h b/graphics/surface.h
index 7ab9090c169..355a8d2bc84 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -79,7 +79,7 @@ struct Surface {
 	 *
 	 * @note This might not equal w * bytesPerPixel.
 	 */
-	int16 pitch;
+	int32 pitch;
 
 protected:
 	/**




More information about the Scummvm-git-logs mailing list