pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/devilutionx devilutionx: Backport some more 64-b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a48427c728eb
branches: trunk
changeset: 336921:a48427c728eb
user: nia <nia%pkgsrc.org@localhost>
date: Mon Jul 29 09:34:31 2019 +0000
description:
devilutionx: Backport some more 64-bit fixes that I missed.
Bump PKGREVISION.
diffstat:
games/devilutionx/Makefile | 4 +-
games/devilutionx/distinfo | 5 ++-
games/devilutionx/patches/patch-Source_list.h | 28 +++++++++++++++++++
games/devilutionx/patches/patch-Source_loadsave.cpp | 30 ++++++++++++++------
4 files changed, 54 insertions(+), 13 deletions(-)
diffs (156 lines):
diff -r 4b8bb844c62a -r a48427c728eb games/devilutionx/Makefile
--- a/games/devilutionx/Makefile Mon Jul 29 08:46:44 2019 +0000
+++ b/games/devilutionx/Makefile Mon Jul 29 09:34:31 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2019/07/28 10:26:43 nia Exp $
+# $NetBSD: Makefile,v 1.7 2019/07/29 09:34:31 nia Exp $
DISTNAME= devilutionx-0.4.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GITHUB:=diasurgical/}
GITHUB_PROJECT= devilutionX
diff -r 4b8bb844c62a -r a48427c728eb games/devilutionx/distinfo
--- a/games/devilutionx/distinfo Mon Jul 29 08:46:44 2019 +0000
+++ b/games/devilutionx/distinfo Mon Jul 29 09:34:31 2019 +0000
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.3 2019/07/28 10:26:43 nia Exp $
+$NetBSD: distinfo,v 1.4 2019/07/29 09:34:31 nia Exp $
SHA1 (devilutionx-0.4.0.tar.gz) = d5d71cf752dc0b5c89f9827b52f1567cb5cfb8f4
RMD160 (devilutionx-0.4.0.tar.gz) = 0b647b8ee4641d9af000d4d54e1008a506a9fc66
SHA512 (devilutionx-0.4.0.tar.gz) = ba8f650f8dd00e3b08f6ac082566351c8f3b6162d7bfa2fdf3464b38c201b08677d2f6151f2272e1d73eb972b8babc49b38364523d10763eb179f6b682641443
Size (devilutionx-0.4.0.tar.gz) = 1351201 bytes
SHA1 (patch-Source_inv.cpp) = 788414c9141da13391cd4f540e364a034fd87b41
-SHA1 (patch-Source_loadsave.cpp) = 22d8d6e4ca44358dfbc55741b8aebeac6af8e468
+SHA1 (patch-Source_list.h) = 1dd4dbe80c2d99ef127462de0b8cfc35e1b861de
+SHA1 (patch-Source_loadsave.cpp) = ea0d7f41ddec197f7b8002fba8a8479c3f49c415
SHA1 (patch-Source_loadsave.h) = 6d7e7cc9e188e5a406c10caceb0aa80139c6e301
SHA1 (patch-structs.h) = d9cba47b2ca876529aef33d4190f082d134cdcb6
diff -r 4b8bb844c62a -r a48427c728eb games/devilutionx/patches/patch-Source_list.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/devilutionx/patches/patch-Source_list.h Mon Jul 29 09:34:31 2019 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_list.h,v 1.1 2019/07/29 09:34:32 nia Exp $
+
+[PATCH] Cast pointer to ptrdiff_t to make code less undefined for 64-bit.
+https://github.com/diasurgical/devilutionX/commit/c4c2132ac67a457cc7f55cc8a6d5e099747dbdb8.patch
+
+--- Source/list.h.orig 2019-05-19 17:06:45.000000000 +0000
++++ Source/list.h
+@@ -196,17 +196,17 @@ public:
+
+ T *Next()
+ {
+- if ((intptr_t)m_nextNode <= 0)
++ if ((ptrdiff_t)m_nextNode <= 0)
+ return NULL;
+ return m_nextNode;
+ }
+
+ TLink<T> *NextLink(size_t offset = -1)
+ {
+- if ((intptr_t)m_nextNode <= 0)
++ if ((ptrdiff_t)m_nextNode <= 0)
+ return (TLink<T> *)~((size_t)m_nextNode);
+
+- if ((intptr_t)offset < 0) {
++ if ((int)offset < 0) {
+ // Calculate the offset from a node pointer to a link structure
+ offset = (size_t)this - (size_t)m_prevLink->m_nextNode;
+ }
diff -r 4b8bb844c62a -r a48427c728eb games/devilutionx/patches/patch-Source_loadsave.cpp
--- a/games/devilutionx/patches/patch-Source_loadsave.cpp Mon Jul 29 08:46:44 2019 +0000
+++ b/games/devilutionx/patches/patch-Source_loadsave.cpp Mon Jul 29 09:34:31 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-Source_loadsave.cpp,v 1.1 2019/07/28 10:26:43 nia Exp $
+$NetBSD: patch-Source_loadsave.cpp,v 1.2 2019/07/29 09:34:32 nia Exp $
64bit Compatible Saves
https://patch-diff.githubusercontent.com/raw/diasurgical/devilutionX/pull/162.patch
@@ -6,9 +6,18 @@
[PATCH] Fix load/save monster padding
https://github.com/diasurgical/devilutionX/commit/10ebca4efd422bbf46bad6d12ea4cdade9038b01.patch
+[PATCH] Fix typo in SaveObject.
+https://github.com/diasurgical/devilutionX/commit/15d046dc644cc1661483cd68bcc8de8888a17f7a.patch
+
+[PATCH] Fix typo in LoadPremium, SavePremium.
+https://github.com/diasurgical/devilutionX/commit/6e3619022144a39c57de8aab83ee07326ac61694.patch
+
+[PATCH] Fix MonstStruct load/save
+https://github.com/diasurgical/devilutionX/commit/b2f358874705598ec139f290b21e340c73d250f6.patch
+
--- Source/loadsave.cpp.orig 2019-05-19 17:06:45.000000000 +0000
+++ Source/loadsave.cpp
-@@ -207,42 +207,829 @@ BOOL OLoad()
+@@ -207,42 +207,830 @@ BOOL OLoad()
return FALSE;
}
@@ -561,7 +570,8 @@
+ CopyChar(tbuff, &pMonster->leaderflag);
+ CopyChar(tbuff, &pMonster->packsize);
+ CopyChar(tbuff, &pMonster->mlid);
-+
++
++ tbuff += sizeof(DWORD) * 3; // Skip 3 pointers
SyncMonsterAnim(i);
}
@@ -846,11 +856,11 @@
{
- memcpy(&premiumitem[i], tbuff, sizeof(*premiumitem));
- tbuff += sizeof(*premiumitem);
-+ CopyItem(&item[i]);
++ CopyItem(&premiumitem[i]);
}
void LoadQuest(int i)
-@@ -348,7 +1135,7 @@ void SaveGame()
+@@ -348,7 +1136,7 @@ void SaveGame()
for (i = 0; i < MAXITEMS; i++)
BSave(itemavail[i]);
for (i = 0; i < numitems; i++)
@@ -859,7 +869,7 @@
for (i = 0; i < 128; i++)
OSave(UniqueItemFlag[i]);
-@@ -446,40 +1233,201 @@ void OSave(BOOL v)
+@@ -446,40 +1234,203 @@ void OSave(BOOL v)
*tbuff++ = FALSE;
}
@@ -968,6 +978,8 @@
+ CopyChar(&pMonster->leaderflag, tbuff);
+ CopyChar(&pMonster->packsize, tbuff);
+ CopyChar(&pMonster->mlid, tbuff);
++
++ tbuff += sizeof(DWORD) * 3; // Skip 3 pointers
}
void SaveMissile(int i)
@@ -1035,7 +1047,7 @@
- memcpy(tbuff, &item[i], sizeof(*item));
- tbuff += sizeof(*item);
+ ObjectStruct *pObject = &object[i];
-+ CopyInt(tbuff, &pObject->_otype);
++ CopyInt(&pObject->_otype, tbuff);
+ CopyInt(&pObject->_ox, tbuff);
+ CopyInt(&pObject->_oy, tbuff);
+ CopyInt(&pObject->_oLight, tbuff);
@@ -1077,11 +1089,11 @@
{
- memcpy(tbuff, &premiumitem[i], sizeof(*premiumitem));
- tbuff += sizeof(*premiumitem);
-+ SaveItem(&item[i]);
++ SaveItem(&premiumitem[i]);
}
void SaveQuest(int i)
-@@ -554,7 +1502,7 @@ void SaveLevel()
+@@ -554,7 +1505,7 @@ void SaveLevel()
for (i = 0; i < MAXITEMS; i++)
BSave(itemavail[i]);
for (i = 0; i < numitems; i++)
Home |
Main Index |
Thread Index |
Old Index