From 56412813c70ba44a6f6a74cee5bf460ca6a31402 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 8 Feb 2010 21:14:30 +0000 Subject: Add Heretic implementation of HHE "Text" section, add DEH_String() around appropriate strings to allow string replacements. Subversion-branch: /branches/raven-branch Subversion-revision: 1867 --- src/heretic/r_things.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/heretic/r_things.c') diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c index 6302303e..e5ff4b4b 100644 --- a/src/heretic/r_things.c +++ b/src/heretic/r_things.c @@ -25,6 +25,7 @@ #include #include #include "doomdef.h" +#include "deh_str.h" #include "i_swap.h" #include "i_system.h" #include "r_local.h" @@ -154,7 +155,7 @@ void R_InstallSpriteLump(int lump, unsigned frame, unsigned rotation, void R_InitSpriteDefs(char **namelist) { char **check; - int i, l, intname, frame, rotation; + int i, l, frame, rotation; int start, end; // count the number of sprite names @@ -176,17 +177,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'; @@ -209,7 +209,7 @@ void R_InitSpriteDefs(char **namelist) if (gamemode == shareware) continue; I_Error("R_InitSprites: No lumps found for sprite %s", - namelist[i]); + spritename); } maxframe++; @@ -219,7 +219,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'); + spritename, frame + 'A'); case 0: // only the first rotation is needed break; @@ -228,7 +228,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'); } } -- cgit v1.2.3