From 87a27333c3433ec7d19557ecb4c5a2459edb93aa Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Sun, 10 Jan 2021 10:16:30 +0100 Subject: [PATCH] Implement PixMap.rowBytes --- src/Graphics/Graphics.cpp | 1 + src/PommeTypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Graphics/Graphics.cpp b/src/Graphics/Graphics.cpp index d12f18d..91aef50 100644 --- a/src/Graphics/Graphics.cpp +++ b/src/Graphics/Graphics.cpp @@ -40,6 +40,7 @@ struct GrafPortImpl macpm = {}; macpm.bounds = boundsRect; macpm.pixelSize = 32; + macpm.rowBytes = (pixels.width * macpm.pixelSize / 8) | (1 << 15); // bit 15 = 1: structure is PixMap, not BitMap macpm._impl = (Ptr) &pixels; macpmPtr = &macpm; } diff --git a/src/PommeTypes.h b/src/PommeTypes.h index 059e761..634e5c5 100644 --- a/src/PommeTypes.h +++ b/src/PommeTypes.h @@ -143,6 +143,7 @@ typedef struct PixMap { Rect bounds; short pixelSize; + short rowBytes; Ptr _impl; // Points to ARGBPixmap } PixMap; typedef PixMap* PixMapPtr;