diff options
Diffstat (limited to 'games/xdoom/patches/patch-ar')
-rw-r--r-- | games/xdoom/patches/patch-ar | 65 |
1 files changed, 63 insertions, 2 deletions
diff --git a/games/xdoom/patches/patch-ar b/games/xdoom/patches/patch-ar index d3d63b3f9a9..6cd794d3e71 100644 --- a/games/xdoom/patches/patch-ar +++ b/games/xdoom/patches/patch-ar @@ -1,7 +1,7 @@ -$NetBSD: patch-ar,v 1.1 2000/02/03 16:01:15 abs Exp $ +$NetBSD: patch-ar,v 1.2 2002/08/22 04:18:44 mycroft Exp $ --- linuxdoom-1.10/r_data.c.orig Mon Dec 22 20:57:47 1997 -+++ linuxdoom-1.10/r_data.c Thu Feb 3 01:34:00 2000 ++++ linuxdoom-1.10/r_data.c Mon Aug 22 04:13:08 2022 @@ -84,10 +84,10 @@ typedef struct { @@ -15,3 +15,64 @@ $NetBSD: patch-ar,v 1.1 2000/02/03 16:01:15 abs Exp $ short patchcount; mappatch_t patches[1]; } maptexture_t; +@@ -479,13 +479,13 @@ + } + numtextures = numtextures1 + numtextures2; + +- textures = Z_Malloc (numtextures*4, PU_STATIC, 0); +- texturecolumnlump = Z_Malloc (numtextures*4, PU_STATIC, 0); +- texturecolumnofs = Z_Malloc (numtextures*4, PU_STATIC, 0); +- texturecomposite = Z_Malloc (numtextures*4, PU_STATIC, 0); +- texturecompositesize = Z_Malloc (numtextures*4, PU_STATIC, 0); +- texturewidthmask = Z_Malloc (numtextures*4, PU_STATIC, 0); +- textureheight = Z_Malloc (numtextures*4, PU_STATIC, 0); ++ textures = Z_Malloc (numtextures*sizeof(*textures), PU_STATIC, 0); ++ texturecolumnlump = Z_Malloc (numtextures*sizeof(*texturecolumnlump), PU_STATIC, 0); ++ texturecolumnofs = Z_Malloc (numtextures*sizeof(*texturecolumnofs), PU_STATIC, 0); ++ texturecomposite = Z_Malloc (numtextures*sizeof(*texturecomposite), PU_STATIC, 0); ++ texturecompositesize = Z_Malloc (numtextures*sizeof(*texturecompositesize), PU_STATIC, 0); ++ texturewidthmask = Z_Malloc (numtextures*sizeof(*texturewidthmask), PU_STATIC, 0); ++ textureheight = Z_Malloc (numtextures*sizeof(*textureheight), PU_STATIC, 0); + + totalwidth = 0; + +@@ -567,7 +567,7 @@ + R_GenerateLookup (i); + + // Create translation table for global animation. +- texturetranslation = Z_Malloc ((numtextures+1)*4, PU_STATIC, 0); ++ texturetranslation = Z_Malloc ((numtextures+1)*sizeof(*texturetranslation), PU_STATIC, 0); + + for (i=0 ; i<numtextures ; i++) + texturetranslation[i] = i; +@@ -587,7 +587,7 @@ + numflats = lastflat - firstflat + 1; + + // Create translation table for global animation. +- flattranslation = Z_Malloc ((numflats+1)*4, PU_STATIC, 0); ++ flattranslation = Z_Malloc ((numflats+1)*sizeof(*flattranslation), PU_STATIC, 0); + + for (i=0 ; i<numflats ; i++) + flattranslation[i] = i; +@@ -609,9 +609,9 @@ + lastspritelump = W_GetNumForName ("S_END") - 1; + + numspritelumps = lastspritelump - firstspritelump + 1; +- spritewidth = Z_Malloc (numspritelumps*4, PU_STATIC, 0); +- spriteoffset = Z_Malloc (numspritelumps*4, PU_STATIC, 0); +- spritetopoffset = Z_Malloc (numspritelumps*4, PU_STATIC, 0); ++ spritewidth = Z_Malloc (numspritelumps*sizeof(*spritewidth), PU_STATIC, 0); ++ spriteoffset = Z_Malloc (numspritelumps*sizeof(*spriteoffset), PU_STATIC, 0); ++ spritetopoffset = Z_Malloc (numspritelumps*sizeof(*spritetopoffset), PU_STATIC, 0); + + for (i=0 ; i< numspritelumps ; i++) + { +@@ -639,7 +639,7 @@ + lump = W_GetNumForName("COLORMAP"); + length = W_LumpLength (lump) + 255; + colormaps = Z_Malloc (length, PU_STATIC, 0); +- colormaps = (byte *)( ((int)colormaps + 255)&~0xff); ++ colormaps = (byte *)( ((long)colormaps + 255)&~0xff); + W_ReadLump (lump,colormaps); + } + |