summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2020-08-27 12:33:19 +0000
committerjoerg <joerg@pkgsrc.org>2020-08-27 12:33:19 +0000
commit15117bffb797faae6eb54ec914ec7b6c32b499d1 (patch)
tree1073255b1494d4f7cd22c2dde6d0ce156384dfd8 /games
parent2e7b60d24d712fd9c045d8c429c775e08495453e (diff)
downloadpkgsrc-15117bffb797faae6eb54ec914ec7b6c32b499d1.tar.gz
Don't use abs on unsigned types.
Diffstat (limited to 'games')
-rw-r--r--games/xu4/distinfo3
-rw-r--r--games/xu4/patches/patch-src_map.cpp23
-rw-r--r--games/xu4/patches/patch-src_map.cpp.orig0
3 files changed, 25 insertions, 1 deletions
diff --git a/games/xu4/distinfo b/games/xu4/distinfo
index 582d3a5949f..0c77de230ba 100644
--- a/games/xu4/distinfo
+++ b/games/xu4/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2015/11/03 20:57:10 agc Exp $
+$NetBSD: distinfo,v 1.6 2020/08/27 12:33:19 joerg Exp $
SHA1 (xu4-1.0beta3.tar.gz) = baf1bbdc18088096ae11ea31aa497532b7e7124c
RMD160 (xu4-1.0beta3.tar.gz) = f758fea4bc3034b19122651cfb725a88e0684960
@@ -19,6 +19,7 @@ SHA1 (patch-src_imagemgr.h) = 36b1bd2d750e17b9c403cded9d8787aa6a8a61cd
SHA1 (patch-src_intro.cpp) = 5330d1bedb8e79750468d9463a016b041b7aa496
SHA1 (patch-src_item.cpp) = 667498d2c8fcf4c2c35da0d9189d68c9b6a9baf5
SHA1 (patch-src_lzw_u6decode.cpp) = 1dbf1cb0f24ad9d083f4a7fe666f1503c9647ab6
+SHA1 (patch-src_map.cpp) = 052bccf08c87f64057d20acca65e15a95488867d
SHA1 (patch-src_menuitem_cpp) = 400943827ddd59a9cff547765e87b30590569cb2
SHA1 (patch-src_moongate.cpp) = b9edda01c2d405ac94082280a62e8169be66ba85
SHA1 (patch-src_person.cpp) = b93703514429257ae4665ab7242c5dc1ead18c3c
diff --git a/games/xu4/patches/patch-src_map.cpp b/games/xu4/patches/patch-src_map.cpp
new file mode 100644
index 00000000000..a623a24172b
--- /dev/null
+++ b/games/xu4/patches/patch-src_map.cpp
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_map.cpp,v 1.1 2020/08/27 12:33:19 joerg Exp $
+
+--- src/map.cpp.orig 2020-08-26 12:02:32.310434861 +0000
++++ src/map.cpp
+@@ -115,14 +115,14 @@ int MapCoords::getRelativeDirection(cons
+ if (map && map->border_behavior == Map::BORDER_WRAP) {
+ MapCoords me = *this;
+
+- if (abs(me.x - c.x) > abs(me.x + map->width - c.x))
++ if (abs(me.x - c.x) > abs(me.x + int(map->width - c.x)))
+ me.x += map->width;
+- else if (abs(me.x - c.x) > abs(me.x - map->width - c.x))
++ else if (abs(me.x - c.x) > abs(int(me.x - map->width) - c.x))
+ me.x -= map->width;
+
+- if (abs(me.y - c.y) > abs(me.y + map->width - c.y))
++ if (abs(me.y - c.y) > abs(me.y + int(map->width - c.y)))
+ me.y += map->height;
+- else if (abs(me.y - c.y) > abs(me.y - map->width - c.y))
++ else if (abs(me.y - c.y) > abs(int(me.y - map->width) - c.y))
+ me.y -= map->height;
+
+ dx = me.x - c.x;
diff --git a/games/xu4/patches/patch-src_map.cpp.orig b/games/xu4/patches/patch-src_map.cpp.orig
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/games/xu4/patches/patch-src_map.cpp.orig