shithub: choc

Download patch

ref: 129406f17da942e2613490cdad1c2b24591d50f6
parent: 317a60d93268f6a8646600a2c3ce0f6a2c6c2665
author: Simon Howard <[email protected]>
date: Fri Sep 22 16:32:00 EDT 2006

Add DEH_String() conversions on more strings that are not being converted.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 653

--- a/src/am_map.c
+++ b/src/am_map.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: am_map.c 641 2006-09-21 11:13:28Z rtc_marine $
+// $Id: am_map.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -49,7 +49,7 @@
 //
 //-----------------------------------------------------------------------------
 
-static const char rcsid[] = "$Id: am_map.c 641 2006-09-21 11:13:28Z rtc_marine $";
+static const char rcsid[] = "$Id: am_map.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <stdio.h>
 
@@ -534,7 +534,7 @@
   
     for (i=0;i<10;i++)
     {
-	sprintf(namebuf, "AMMNUM%d", i);
+	sprintf(namebuf, DEH_String("AMMNUM%d"), i);
 	marknums[i] = W_CacheLumpName(namebuf, PU_STATIC);
     }
 
@@ -1036,7 +1036,7 @@
 	   || fl->b.x < 0 || fl->b.x >= f_w
 	   || fl->b.y < 0 || fl->b.y >= f_h)
     {
-	fprintf(stderr, "fuck %d \r", fuck++);
+	fprintf(stderr, DEH_String("fuck %d \r"), fuck++);
 	return;
     }
 
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: d_main.c 642 2006-09-21 11:47:56Z fraggle $
+// $Id: d_main.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -184,7 +184,7 @@
 //-----------------------------------------------------------------------------
 
 
-static const char rcsid[] = "$Id: d_main.c 642 2006-09-21 11:47:56Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #define	BGCOLOR		7
 #define	FGCOLOR		8
@@ -478,7 +478,7 @@
     
     // clean up border stuff
     if (gamestate != oldgamestate && gamestate != GS_LEVEL)
-	I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));
+	I_SetPalette (W_CacheLumpName (DEH_String("PLAYPAL"),PU_CACHE));
 
     // see if the border needs to be initially drawn
     if (gamestate == GS_LEVEL && oldgamestate != GS_LEVEL)
@@ -513,7 +513,7 @@
 	else
 	    y = viewwindowy+4;
 	V_DrawPatchDirect(viewwindowx+(scaledviewwidth-68)/2,
-			  y,0,W_CacheLumpName ("M_PAUSE", PU_CACHE));
+			  y,0,W_CacheLumpName (DEH_String("M_PAUSE"), PU_CACHE));
     }
 
 
--- a/src/hu_stuff.c
+++ b/src/hu_stuff.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: hu_stuff.c 160 2005-10-03 21:39:39Z fraggle $
+// $Id: hu_stuff.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -43,7 +43,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: hu_stuff.c 160 2005-10-03 21:39:39Z fraggle $";
+rcsid[] = "$Id: hu_stuff.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <ctype.h>
 
@@ -317,7 +317,7 @@
     j = HU_FONTSTART;
     for (i=0;i<HU_FONTSIZE;i++)
     {
-	sprintf(buffer, "STCFN%.3d", j++);
+	sprintf(buffer, DEH_String("STCFN%.3d"), j++);
 	hu_font[i] = (patch_t *) W_CacheLumpName(buffer, PU_STATIC);
     }
 
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: i_system.c 610 2006-09-17 17:01:33Z fraggle $
+// $Id: i_system.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -81,7 +81,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: i_system.c 610 2006-09-17 17:01:33Z fraggle $";
+rcsid[] = "$Id: i_system.c 653 2006-09-22 20:32:00Z fraggle $";
 
 
 #include <stdlib.h>
@@ -91,6 +91,7 @@
 #include <stdarg.h>
 #include <SDL.h>
 
+#include "deh_main.h"
 #include "doomdef.h"
 #include "m_argv.h"
 #include "m_misc.h"
@@ -178,7 +179,7 @@
     unsigned char *endoom_data;
     unsigned char *screendata;
 
-    endoom_data = W_CacheLumpName("ENDOOM", PU_STATIC);
+    endoom_data = W_CacheLumpName(DEH_String("ENDOOM"), PU_STATIC);
 
     // Set up text mode screen
 
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: i_video.c 613 2006-09-18 12:13:40Z fraggle $
+// $Id: i_video.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -175,7 +175,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: i_video.c 613 2006-09-18 12:13:40Z fraggle $";
+rcsid[] = "$Id: i_video.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <SDL.h>
 #include <ctype.h>
@@ -184,6 +184,7 @@
 #include "chocolate_doom_icon.c"
 
 #include "config.h"
+#include "deh_main.h"
 #include "doomdef.h"
 #include "doomstat.h"
 #include "d_main.h"
@@ -337,9 +338,9 @@
     int y;
 
     if (M_CheckParm("-cdrom") > 0)
-        disk = (patch_t *) W_CacheLumpName("STCDROM", PU_STATIC);
+        disk = (patch_t *) W_CacheLumpName(DEH_String("STCDROM"), PU_STATIC);
     else
-        disk = (patch_t *) W_CacheLumpName("STDISK", PU_STATIC);
+        disk = (patch_t *) W_CacheLumpName(DEH_String("STDISK"), PU_STATIC);
 
     V_DrawPatch(0, 0, 0, disk);
     disk_image_w = SHORT(disk->width);
@@ -1206,7 +1207,7 @@
     
     // Set the palette
 
-    I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));
+    I_SetPalette (W_CacheLumpName (DEH_String("PLAYPAL"),PU_CACHE));
     SDL_SetColors(screen, palette, 0, 256);
 
     // Setup title and icon
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_menu.c 641 2006-09-21 11:13:28Z rtc_marine $
+// $Id: m_menu.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -78,7 +78,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_menu.c 641 2006-09-21 11:13:28Z rtc_marine $";
+rcsid[] = "$Id: m_menu.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -867,7 +867,7 @@
     // We only ever draw the second page if this is 
     // gameversion == exe_doom_1_9 and gamemode == registered
 
-    V_DrawPatchDirect(0, 0, 0, W_CacheLumpName("HELP1", PU_CACHE));
+    V_DrawPatchDirect(0, 0, 0, W_CacheLumpName(DEH_String("HELP1"), PU_CACHE));
 }
 
 
@@ -1701,7 +1701,7 @@
 	    if (usegamma > 4)
 		usegamma = 0;
 	    players[consoleplayer].message = DEH_String(gammamsg[usegamma]);
-            I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));
+            I_SetPalette (W_CacheLumpName (DEH_String("PLAYPAL"),PU_CACHE));
 	    return true;
 				
 	}
@@ -1846,6 +1846,7 @@
     short		i;
     short		max;
     char		string[40];
+    char               *name;
     int			start;
 
     inhelpscreens = false;
@@ -1896,13 +1897,11 @@
 
     for (i=0;i<max;i++)
     {
-	if (currentMenu->menuitems[i].name[0])
-	{
-	    char *lumpname;
+        name = DEH_String(currentMenu->menuitems[i].name);
 
-	    lumpname = DEH_String(currentMenu->menuitems[i].name);
-
-	    V_DrawPatchDirect (x,y,0, W_CacheLumpName(lumpname, PU_CACHE));
+	if (name[0])
+	{
+	    V_DrawPatchDirect (x,y,0, W_CacheLumpName(name, PU_CACHE));
 	}
 	y += LINEHEIGHT;
     }
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_misc.c 649 2006-09-21 21:49:26Z fraggle $
+// $Id: m_misc.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -106,7 +106,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_misc.c 649 2006-09-21 21:49:26Z fraggle $";
+rcsid[] = "$Id: m_misc.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -122,6 +122,7 @@
 #endif
 
 #include "config.h"
+#include "deh_main.h"
 #include "doomdef.h"
 #include "doomfeatures.h"
 
@@ -813,9 +814,9 @@
     // save the pcx file
     WritePCXfile (lbmname, linear,
 		  SCREENWIDTH, SCREENHEIGHT,
-		  W_CacheLumpName ("PLAYPAL",PU_CACHE));
+		  W_CacheLumpName (DEH_String("PLAYPAL"),PU_CACHE));
 	
-    players[consoleplayer].message = "screen shot";
+    players[consoleplayer].message = DEH_String("screen shot");
 }
 
 
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: p_spec.c 642 2006-09-21 11:47:56Z fraggle $
+// $Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -45,7 +45,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: p_spec.c 642 2006-09-21 11:47:56Z fraggle $";
+rcsid[] = "$Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <stdlib.h>
 
@@ -148,7 +148,7 @@
     {true,	"WFALL4",	"WFALL1",	8},
     {true,	"DBRAIN4",	"DBRAIN1",	8},
 	
-    {  -1,       NULL,          NULL,           0},
+    {-1,        "",             "",             0},
 };
 
 anim_t		anims[MAXANIMS];
@@ -190,7 +190,7 @@
 	}
 	else
 	{
-	    if (W_CheckNumForName(animdefs[i].startname) == -1)
+	    if (W_CheckNumForName(startname) == -1)
 		continue;
 
 	    lastanim->picnum = R_FlatNumForName(endname);
@@ -1267,7 +1267,7 @@
     int		episode;
 
     episode = 1;
-    if (W_CheckNumForName("texture2") >= 0)
+    if (W_CheckNumForName(DEH_String("texture2")) >= 0)
 	episode = 2;
 
     
--- a/src/r_data.c
+++ b/src/r_data.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_data.c 558 2006-06-16 17:06:05Z fraggle $
+// $Id: r_data.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -58,8 +58,9 @@
 
 
 static const char
-rcsid[] = "$Id: r_data.c 558 2006-06-16 17:06:05Z fraggle $";
+rcsid[] = "$Id: r_data.c 653 2006-09-22 20:32:00Z fraggle $";
 
+#include "deh_main.h"
 #include "i_system.h"
 #include "z_zone.h"
 
@@ -513,7 +514,7 @@
     
     // Load the patch names from pnames.lmp.
     name[8] = 0;	
-    names = W_CacheLumpName ("PNAMES", PU_STATIC);
+    names = W_CacheLumpName (DEH_String("PNAMES"), PU_STATIC);
     nummappatches = LONG ( *((int *)names) );
     name_p = names+4;
     patchlookup = Z_Malloc(nummappatches*sizeof(*patchlookup), PU_STATIC, NULL);
@@ -528,16 +529,16 @@
     // Load the map texture definitions from textures.lmp.
     // The data is contained in one or two lumps,
     //  TEXTURE1 for shareware, plus TEXTURE2 for commercial.
-    maptex = maptex1 = W_CacheLumpName ("TEXTURE1", PU_STATIC);
+    maptex = maptex1 = W_CacheLumpName (DEH_String("TEXTURE1"), PU_STATIC);
     numtextures1 = LONG(*maptex);
-    maxoff = W_LumpLength (W_GetNumForName ("TEXTURE1"));
+    maxoff = W_LumpLength (W_GetNumForName (DEH_String("TEXTURE1")));
     directory = maptex+1;
 	
-    if (W_CheckNumForName ("TEXTURE2") != -1)
+    if (W_CheckNumForName (DEH_String("TEXTURE2")) != -1)
     {
-	maptex2 = W_CacheLumpName ("TEXTURE2", PU_STATIC);
+	maptex2 = W_CacheLumpName (DEH_String("TEXTURE2"), PU_STATIC);
 	numtextures2 = LONG(*maptex2);
-	maxoff2 = W_LumpLength (W_GetNumForName ("TEXTURE2"));
+	maxoff2 = W_LumpLength (W_GetNumForName (DEH_String("TEXTURE2")));
     }
     else
     {
@@ -558,8 +559,8 @@
     totalwidth = 0;
     
     //	Really complex printing shit...
-    temp1 = W_GetNumForName ("S_START");  // P_???????
-    temp2 = W_GetNumForName ("S_END") - 1;
+    temp1 = W_GetNumForName (DEH_String("S_START"));  // P_???????
+    temp2 = W_GetNumForName (DEH_String("S_END")) - 1;
     temp3 = ((temp2-temp1+63)/64) + ((numtextures+63)/64);
     printf("[");
     for (i = 0; i < temp3; i++)
@@ -655,8 +656,8 @@
 {
     int		i;
 	
-    firstflat = W_GetNumForName ("F_START") + 1;
-    lastflat = W_GetNumForName ("F_END") - 1;
+    firstflat = W_GetNumForName (DEH_String("F_START")) + 1;
+    lastflat = W_GetNumForName (DEH_String("F_END")) - 1;
     numflats = lastflat - firstflat + 1;
 	
     // Create translation table for global animation.
@@ -678,8 +679,8 @@
     int		i;
     patch_t	*patch;
 	
-    firstspritelump = W_GetNumForName ("S_START") + 1;
-    lastspritelump = W_GetNumForName ("S_END") - 1;
+    firstspritelump = W_GetNumForName (DEH_String("S_START")) + 1;
+    lastspritelump = W_GetNumForName (DEH_String("S_END")) - 1;
     
     numspritelumps = lastspritelump - firstspritelump + 1;
     spritewidth = Z_Malloc (numspritelumps*sizeof(*spritewidth), PU_STATIC, 0);
@@ -709,7 +710,7 @@
     
     // Load in the light tables, 
     //  256 byte align tables.
-    lump = W_GetNumForName("COLORMAP"); 
+    lump = W_GetNumForName(DEH_String("COLORMAP"));
     length = W_LumpLength (lump);
     colormaps = W_CacheLumpNum(lump, PU_STATIC);
 }
--- a/src/r_draw.c
+++ b/src/r_draw.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_draw.c 120 2005-09-22 13:13:47Z fraggle $
+// $Id: r_draw.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -46,10 +46,11 @@
 
 
 static const char
-rcsid[] = "$Id: r_draw.c 120 2005-09-22 13:13:47Z fraggle $";
+rcsid[] = "$Id: r_draw.c 653 2006-09-22 20:32:00Z fraggle $";
 
 
 #include "doomdef.h"
+#include "deh_main.h"
 
 #include "i_system.h"
 #include "z_zone.h"
@@ -831,10 +832,10 @@
     patch_t*	patch;
 
     // DOOM border patch.
-    char	name1[] = "FLOOR7_2";
+    char       *name1 = DEH_String("FLOOR7_2");
 
     // DOOM II border patch.
-    char	name2[] = "GRNROCK";	
+    char       *name2 = DEH_String("GRNROCK");
 
     char*	name;
 	
@@ -864,19 +865,19 @@
 	} 
     } 
 	
-    patch = W_CacheLumpName ("brdr_t",PU_CACHE);
+    patch = W_CacheLumpName (DEH_String("brdr_t"),PU_CACHE);
 
     for (x=0 ; x<scaledviewwidth ; x+=8)
 	V_DrawPatch (viewwindowx+x,viewwindowy-8,1,patch);
-    patch = W_CacheLumpName ("brdr_b",PU_CACHE);
+    patch = W_CacheLumpName (DEH_String("brdr_b"),PU_CACHE);
 
     for (x=0 ; x<scaledviewwidth ; x+=8)
 	V_DrawPatch (viewwindowx+x,viewwindowy+viewheight,1,patch);
-    patch = W_CacheLumpName ("brdr_l",PU_CACHE);
+    patch = W_CacheLumpName (DEH_String("brdr_l"),PU_CACHE);
 
     for (y=0 ; y<viewheight ; y+=8)
 	V_DrawPatch (viewwindowx-8,viewwindowy+y,1,patch);
-    patch = W_CacheLumpName ("brdr_r",PU_CACHE);
+    patch = W_CacheLumpName (DEH_String("brdr_r"),PU_CACHE);
 
     for (y=0 ; y<viewheight ; y+=8)
 	V_DrawPatch (viewwindowx+scaledviewwidth,viewwindowy+y,1,patch);
@@ -886,22 +887,22 @@
     V_DrawPatch (viewwindowx-8,
 		 viewwindowy-8,
 		 1,
-		 W_CacheLumpName ("brdr_tl",PU_CACHE));
+		 W_CacheLumpName (DEH_String("brdr_tl"),PU_CACHE));
     
     V_DrawPatch (viewwindowx+scaledviewwidth,
 		 viewwindowy-8,
 		 1,
-		 W_CacheLumpName ("brdr_tr",PU_CACHE));
+		 W_CacheLumpName (DEH_String("brdr_tr"),PU_CACHE));
     
     V_DrawPatch (viewwindowx-8,
 		 viewwindowy+viewheight,
 		 1,
-		 W_CacheLumpName ("brdr_bl",PU_CACHE));
+		 W_CacheLumpName (DEH_String("brdr_bl"),PU_CACHE));
     
     V_DrawPatch (viewwindowx+scaledviewwidth,
 		 viewwindowy+viewheight,
 		 1,
-		 W_CacheLumpName ("brdr_br",PU_CACHE));
+		 W_CacheLumpName (DEH_String("brdr_br"),PU_CACHE));
 } 
  
 
--- a/src/st_lib.c
+++ b/src/st_lib.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: st_lib.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -36,10 +36,11 @@
 
 
 static const char
-rcsid[] = "$Id: st_lib.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $";
 
 #include <ctype.h>
 
+#include "deh_main.h"
 #include "doomdef.h"
 
 #include "z_zone.h"
@@ -70,7 +71,7 @@
 
 void STlib_init(void)
 {
-    sttminus = (patch_t *) W_CacheLumpName("STTMINUS", PU_STATIC);
+    sttminus = (patch_t *) W_CacheLumpName(DEH_String("STTMINUS"), PU_STATIC);
 }
 
 
--- a/src/st_stuff.c
+++ b/src/st_stuff.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: st_stuff.c 326 2006-01-22 23:38:05Z fraggle $
+// $Id: st_stuff.c 653 2006-09-22 20:32:00Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -63,7 +63,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: st_stuff.c 326 2006-01-22 23:38:05Z fraggle $";
+rcsid[] = "$Id: st_stuff.c 653 2006-09-22 20:32:00Z fraggle $";
 
 
 #include <stdio.h>
@@ -1170,7 +1170,7 @@
 
 void ST_loadData(void)
 {
-    lu_palette = W_GetNumForName ("PLAYPAL");
+    lu_palette = W_GetNumForName (DEH_String("PLAYPAL"));
     ST_loadGraphics();
 }