summaryrefslogtreecommitdiff
path: root/games/xfreecell/patches/patch-card.cpp
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2018-02-19 09:51:48 +0000
committerhe <he@pkgsrc.org>2018-02-19 09:51:48 +0000
commitba015257c7d20b54a9a91cff8f10becbbafb69a7 (patch)
tree1283fc3059110fdbe6408b68b5aa39314c6e61e4 /games/xfreecell/patches/patch-card.cpp
parent2ec010d522554878fdc4abeb712628c2f21903cf (diff)
downloadpkgsrc-ba015257c7d20b54a9a91cff8f10becbbafb69a7.tar.gz
Sprinkle "unsigned" ahead of "char" for various bitmaps, and
handle the C++ trickle-down type conversion warnings. Bump PKGREVISION.
Diffstat (limited to 'games/xfreecell/patches/patch-card.cpp')
-rw-r--r--games/xfreecell/patches/patch-card.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/games/xfreecell/patches/patch-card.cpp b/games/xfreecell/patches/patch-card.cpp
index f0791e2b0cd..b5ab29a12ef 100644
--- a/games/xfreecell/patches/patch-card.cpp
+++ b/games/xfreecell/patches/patch-card.cpp
@@ -1,9 +1,43 @@
-$NetBSD: patch-card.cpp,v 1.1 2011/11/22 18:11:14 joerg Exp $
+$NetBSD: patch-card.cpp,v 1.2 2018/02/19 09:51:48 he Exp $
---- card.cpp.orig 2011-11-22 17:05:24.000000000 +0000
+--- card.cpp.orig 1999-03-27 13:36:28.000000000 +0000
+++ card.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
#include <cstdio>
#include <math.h>
#ifdef SHAPE
+@@ -40,7 +41,7 @@ static Pixmap boundingMask;
+ static Pixmap clipMask;
+ #endif
+
+-static char bitmap[bmWidth * (cardHeight - 2)];
++static unsigned char bitmap[bmWidth * (cardHeight - 2)];
+ static MoveMode moveMode;
+
+ Card::Card(Suit s, unsigned int v)
+@@ -49,9 +50,9 @@ Card::Card(Suit s, unsigned int v)
+ #ifdef SHAPE
+ if (Option::roundCard() && !initialized) {
+ //Shape
+- boundingMask = XCreateBitmapFromData(dpy, root(), boundingMask_bits,
++ boundingMask = XCreateBitmapFromData(dpy, root(), (const char*)boundingMask_bits,
+ boundingMask_width, boundingMask_height);
+- clipMask = XCreateBitmapFromData(dpy, root(), clipMask_bits, clipMask_width,
++ clipMask = XCreateBitmapFromData(dpy, root(), (const char*)clipMask_bits, clipMask_width,
+ clipMask_height);
+
+ //Cursor
+@@ -89,10 +90,10 @@ Card::Card(Suit s, unsigned int v)
+ hilight = getColor(dpy, "lightskyblue4");
+
+ _usualPixmap =
+- XCreatePixmapFromBitmapData(dpy, gameWindow, bitmap, cardWidth - 2,
++ XCreatePixmapFromBitmapData(dpy, gameWindow, (char*)bitmap, cardWidth - 2,
+ cardHeight - 2, fore, back, DefaultDepth(dpy, DefaultScreen(dpy)));
+ _hilightedPixmap =
+- XCreatePixmapFromBitmapData(dpy, gameWindow, bitmap, cardWidth - 2,
++ XCreatePixmapFromBitmapData(dpy, gameWindow, (char*)bitmap, cardWidth - 2,
+ cardHeight - 2, fore, hilight, DefaultDepth(dpy, DefaultScreen(dpy)));
+
+ selectInput(ButtonPressMask | EnterWindowMask | LeaveWindowMask);