[chocolate-doom] 33/42: Allow dehacked substitutions on sprite names

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.0
in repository chocolate-doom.

commit f9d08985de6d73e56f7acd86aa37628b66b7265a
Author: Simon Howard <fraggle at gmail.com>
Date:   Sat Oct 8 21:02:55 2005 +0000

    Allow dehacked substitutions on sprite names
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 177
---
 src/r_things.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/r_things.c b/src/r_things.c
index 86dabd6..4e4b051 100644
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_things.c 45 2005-08-06 18:37:47Z fraggle $
+// $Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.6  2005/10/08 21:02:55  fraggle
+// Allow dehacked substitutions on sprite names
+//
 // Revision 1.5  2005/08/06 18:37:47  fraggle
 // Fix low resolution mode
 //
@@ -45,13 +48,14 @@
 
 
 static const char
-rcsid[] = "$Id: r_things.c 45 2005-08-06 18:37:47Z fraggle $";
+rcsid[] = "$Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $";
 
 
 #include <stdio.h>
 #include <stdlib.h>
 
 
+#include "deh_main.h"
 #include "doomdef.h"
 #include "m_swap.h"
 
@@ -201,7 +205,6 @@ void R_InitSpriteDefs (char** namelist)
     char**	check;
     int		i;
     int		l;
-    int		intname;
     int		frame;
     int		rotation;
     int		start;
@@ -228,17 +231,16 @@ void R_InitSpriteDefs (char** namelist)
     // Just compare 4 characters as ints
     for (i=0 ; i<numsprites ; i++)
     {
-	spritename = namelist[i];
+	spritename = DEH_String(namelist[i]);
 	memset (sprtemp,-1, sizeof(sprtemp));
 		
 	maxframe = -1;
-	intname = *(int *)namelist[i];
 	
 	// scan the lumps,
 	//  filling in the frames for whatever is found
 	for (l=start+1 ; l<end ; l++)
 	{
-	    if (*(int *)lumpinfo[l].name == intname)
+	    if (!strncasecmp(lumpinfo[l].name, spritename, 4))
 	    {
 		frame = lumpinfo[l].name[4] - 'A';
 		rotation = lumpinfo[l].name[5] - '0';
@@ -275,7 +277,7 @@ void R_InitSpriteDefs (char** namelist)
 	      case -1:
 		// no rotations were found for that frame at all
 		I_Error ("R_InitSprites: No patches found "
-			 "for %s frame %c", namelist[i], frame+'A');
+			 "for %s frame %c", spritename, frame+'A');
 		break;
 		
 	      case 0:
@@ -288,7 +290,7 @@ void R_InitSpriteDefs (char** namelist)
 		    if (sprtemp[frame].lump[rotation] == -1)
 			I_Error ("R_InitSprites: Sprite %s frame %c "
 				 "is missing rotations",
-				 namelist[i], frame+'A');
+				 spritename, frame+'A');
 		break;
 	    }
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list