From 4164402d80526d20e557290cde88a19e0667260a Mon Sep 17 00:00:00 2001 From: mycroft Date: Thu, 22 Aug 2002 05:08:30 +0000 Subject: Fix more obvious word size cruft. --- games/xdoom/distinfo | 7 ++-- games/xdoom/patches/patch-ai | 78 ++++++++++++++++++++++++++++++++++++++++++-- games/xdoom/patches/patch-aw | 13 ++++++-- games/xdoom/patches/patch-ba | 13 ++++++++ 4 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 games/xdoom/patches/patch-ba (limited to 'games/xdoom') diff --git a/games/xdoom/distinfo b/games/xdoom/distinfo index d20149996f1..caf76df488a 100644 --- a/games/xdoom/distinfo +++ b/games/xdoom/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2002/08/22 04:18:43 mycroft Exp $ +$NetBSD: distinfo,v 1.7 2002/08/22 05:08:30 mycroft Exp $ SHA1 (doomsrc.zip) = ffd07e0bd95b7c6ba0cd003fb6ff5ebd535d6f99 Size (doomsrc.zip) = 362698 bytes @@ -12,7 +12,7 @@ SHA1 (patch-ae) = 5bba08b0ae36e3a9b9b48b1dba9570035cf1a54d SHA1 (patch-af) = 19367ee3112bfd0e5c054749347e642e6d0ff2ee SHA1 (patch-ag) = accb03154ee6fcd8771b5cd782bb4f4fb0c96b1b SHA1 (patch-ah) = 8ce7eff703079ca435bcffd125483285d8bade5c -SHA1 (patch-ai) = 26222ea901448bf134bda6de0843f6fa6f220339 +SHA1 (patch-ai) = 9759962516af3bd15474c03350f115fda6d36468 SHA1 (patch-aj) = 23e3b35b8072752a9d3fcaa1913f390cf6bd5146 SHA1 (patch-ak) = 7ac753f505c5becc2ce26de209723fc464096cdc SHA1 (patch-al) = a3c5b2ae0a820010339c06655f53778e5edfd498 @@ -26,7 +26,8 @@ SHA1 (patch-as) = 8d56b0a78a6cedb3b1ad63d9418081fb0277cf3d SHA1 (patch-at) = 96e5a88b7f250c35b148353d77eb6e598e35c661 SHA1 (patch-au) = ce66a255347aa3ec6ec0c7826e352e5b53a0e69d SHA1 (patch-av) = 494568bf3298195523c689125ad664d59d16e901 -SHA1 (patch-aw) = 6921aacea05d2dea043a69d7f9fc1d0ab665c817 +SHA1 (patch-aw) = 431b990ad5bcf32fc5152c4b4331ce2bc85aba8b SHA1 (patch-ax) = 7d046d27880b3e7d6fd99a9d8ed029f7e9f52544 SHA1 (patch-ay) = 8c6cebc66117e9a4493e3c83ce29a16d60374179 SHA1 (patch-az) = 48690eebd65de95b7ce4fd73390b46ffd6a58085 +SHA1 (patch-ba) = d8e41ed9d277145cd776ca5dc18e1c82cbefc8b7 diff --git a/games/xdoom/patches/patch-ai b/games/xdoom/patches/patch-ai index a7fcc49c37d..2df53ab194d 100644 --- a/games/xdoom/patches/patch-ai +++ b/games/xdoom/patches/patch-ai @@ -1,7 +1,7 @@ -$NetBSD: patch-ai,v 1.2 2000/02/03 16:01:15 abs Exp $ +$NetBSD: patch-ai,v 1.3 2002/08/22 05:08:31 mycroft Exp $ --- linuxdoom-1.10/i_video.c.orig Mon Dec 22 20:39:01 1997 -+++ linuxdoom-1.10/i_video.c Thu Feb 3 02:48:08 2000 ++++ linuxdoom-1.10/i_video.c Thu Aug 22 04:42:18 2002 @@ -36,7 +36,7 @@ #include // Had to dig up XShm.c for this one. @@ -53,3 +53,77 @@ $NetBSD: patch-ai,v 1.2 2000/02/03 16:01:15 abs Exp $ } +@@ -685,8 +691,7 @@ + // attach to the shared memory segment + image->data = X_shminfo.shmaddr = shmat(id, 0, 0); + +- fprintf(stderr, "shared memory id=%d, addr=0x%x\n", id, +- (int) (image->data)); ++ fprintf(stderr, "shared memory id=%d, addr=%p\n", id, image->data); + } + + void I_InitGraphics(void) +@@ -986,13 +991,13 @@ + { + fourpixels = lineptr[0]; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff0000)>>13) ); + xline[0] = dpixel; + xline[160] = dpixel; + xline[320] = dpixel; + xline[480] = dpixel; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff)<<3 ) ); + xline[1] = dpixel; + xline[161] = dpixel; + xline[321] = dpixel; +@@ -1000,13 +1005,13 @@ + + fourpixels = lineptr[1]; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff0000)>>13) ); + xline[2] = dpixel; + xline[162] = dpixel; + xline[322] = dpixel; + xline[482] = dpixel; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff)<<3 ) ); + xline[3] = dpixel; + xline[163] = dpixel; + xline[323] = dpixel; +@@ -1014,13 +1019,13 @@ + + fourpixels = lineptr[2]; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff0000)>>13) ); + xline[4] = dpixel; + xline[164] = dpixel; + xline[324] = dpixel; + xline[484] = dpixel; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff)<<3 ) ); + xline[5] = dpixel; + xline[165] = dpixel; + xline[325] = dpixel; +@@ -1028,13 +1033,13 @@ + + fourpixels = lineptr[3]; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff0000)>>13) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff0000)>>13) ); + xline[6] = dpixel; + xline[166] = dpixel; + xline[326] = dpixel; + xline[486] = dpixel; + +- dpixel = *(double *)( (int)exp + ( (fourpixels&0xffff)<<3 ) ); ++ dpixel = *(double *)( (long)exp + ( (fourpixels&0xffff)<<3 ) ); + xline[7] = dpixel; + xline[167] = dpixel; + xline[327] = dpixel; diff --git a/games/xdoom/patches/patch-aw b/games/xdoom/patches/patch-aw index 00427ccb9dd..b0815757d57 100644 --- a/games/xdoom/patches/patch-aw +++ b/games/xdoom/patches/patch-aw @@ -1,7 +1,7 @@ -$NetBSD: patch-aw,v 1.1 2000/02/03 16:01:16 abs Exp $ +$NetBSD: patch-aw,v 1.2 2002/08/22 05:08:32 mycroft Exp $ --- linuxdoom-1.10/z_zone.c.orig Mon Dec 22 21:07:09 1997 -+++ linuxdoom-1.10/z_zone.c Thu Feb 3 01:34:04 2000 ++++ linuxdoom-1.10/z_zone.c Thu Aug 22 05:00:10 2002 @@ -192,8 +192,12 @@ memblock_t* newblock; memblock_t* base; @@ -16,3 +16,12 @@ $NetBSD: patch-aw,v 1.1 2000/02/03 16:01:16 abs Exp $ // scan through the block list, // looking for the first free block // of sufficient size, +@@ -437,7 +441,7 @@ + if (block->id != ZONEID) + I_Error ("Z_ChangeTag: freed a pointer without ZONEID"); + +- if (tag >= PU_PURGELEVEL && (unsigned)block->user < 0x100) ++ if (tag >= PU_PURGELEVEL && block->user < (void **)0x100) + I_Error ("Z_ChangeTag: an owner is required for purgable blocks"); + + block->tag = tag; diff --git a/games/xdoom/patches/patch-ba b/games/xdoom/patches/patch-ba new file mode 100644 index 00000000000..9750ee546d3 --- /dev/null +++ b/games/xdoom/patches/patch-ba @@ -0,0 +1,13 @@ +$NetBSD: patch-ba,v 1.1 2002/08/22 05:08:32 mycroft Exp $ + +--- linuxdoom-1.10/p_saveg.c.orig Sun Dec 21 16:03:15 1997 ++++ linuxdoom-1.10/p_saveg.c Thu Aug 22 04:47:28 2002 +@@ -37,7 +37,7 @@ + + // Pads save_p to a 4-byte boundary + // so that the load/save works on SGI&Gecko. +-#define PADSAVEP() save_p += (4 - ((int) save_p & 3)) & 3 ++#define PADSAVEP() save_p += (4 - ((long) save_p & 3)) & 3 + + + -- cgit v1.2.3