shithub: choc

Download patch

ref: c137615aa75afda8c744e57278c138bd29d5d68e
parent: f8b216522bb4a2f2a8279412ff949955706d727e
author: Simon Howard <[email protected]>
date: Wed Oct 1 14:19:11 EDT 2008

Rename "FuzzColumn"/"FuzzPatch" for Heretic/Hexen code to
TLColumn/TLPatch for consistency; these are translucent draw functions,
not fuzzy draw functions like Doom's R_DrawFuzzColumn.

Subversion-branch: /branches/raven-branch
Subversion-revision: 1313

--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -231,7 +231,7 @@
 #define MF_MISSILE		0x10000 // don't hit same species, explode on block
 
 #define	MF_DROPPED		0x20000 // dropped by a demon, not level spawned
-#define	MF_SHADOW		0x40000 // use fuzzy draw (shadow demons / invis)
+#define	MF_SHADOW		0x40000 // use translucent draw (shadow demons / invis)
 #define	MF_NOBLOOD		0x80000 // don't bleed when shot (use puff)
 #define	MF_CORPSE		0x100000        // don't stop moving halfway off a step
 #define	MF_INFLOAT		0x200000        // floating to a height for a move, don't
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -896,12 +896,12 @@
             }
             else
             {
-                V_DrawFuzzPatch(40, ypos,
-                                W_CacheLumpNum(patchFaceOkayBase + i,
-                                               PU_CACHE));
-                V_DrawFuzzPatch(xpos, 18,
-                                W_CacheLumpNum(patchFaceDeadBase + i,
-                                               PU_CACHE));
+                V_DrawTLPatch(40, ypos,
+                              W_CacheLumpNum(patchFaceOkayBase + i,
+                                             PU_CACHE));
+                V_DrawTLPatch(xpos, 18,
+                              W_CacheLumpNum(patchFaceDeadBase + i,
+                                             PU_CACHE));
             }
             kpos = 86;
             for (j = 0; j < MAXPLAYERS; j++)
--- a/src/heretic/r_draw.c
+++ b/src/heretic/r_draw.c
@@ -120,22 +120,9 @@
     while (count--);
 }
 
+// Translucent column draw - blended with background using tinttable.
 
-#define FUZZTABLE	50
-
-#define FUZZOFF	(SCREENWIDTH)
-int fuzzoffset[FUZZTABLE] = {
-    FUZZOFF, -FUZZOFF, FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF, -FUZZOFF, FUZZOFF,
-        FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF, FUZZOFF, -FUZZOFF, FUZZOFF,
-        FUZZOFF, FUZZOFF, -FUZZOFF, -FUZZOFF, -FUZZOFF, -FUZZOFF, FUZZOFF,
-        -FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF, FUZZOFF, FUZZOFF, -FUZZOFF,
-        FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF, -FUZZOFF, -FUZZOFF, FUZZOFF,
-        FUZZOFF, -FUZZOFF, -FUZZOFF, -FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF,
-        FUZZOFF, FUZZOFF, -FUZZOFF, FUZZOFF, FUZZOFF, -FUZZOFF, FUZZOFF
-};
-int fuzzpos = 0;
-
-void R_DrawFuzzColumn(void)
+void R_DrawTLColumn(void)
 {
     int count;
     byte *dest;
@@ -152,7 +139,7 @@
 
 #ifdef RANGECHECK
     if ((unsigned) dc_x >= SCREENWIDTH || dc_yl < 0 || dc_yh >= SCREENHEIGHT)
-        I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
+        I_Error("R_DrawTLColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
 #endif
 
     dest = ylookup[dc_yl] + columnofs[dc_x];
@@ -160,17 +147,6 @@
     fracstep = dc_iscale;
     frac = dc_texturemid + (dc_yl - centery) * fracstep;
 
-// OLD FUZZY INVISO SPRITE STUFF
-/*	do
-	{
-		*dest = colormaps[6*256+dest[fuzzoffset[fuzzpos]]];
-		if (++fuzzpos == FUZZTABLE)
-			fuzzpos = 0;
-		dest += SCREENWIDTH;
-		frac += fracstep;
-	} while (count--);
-*/
-
     do
     {
         *dest =
@@ -177,11 +153,6 @@
             tinttable[((*dest) << 8) +
                       dc_colormap[dc_source[(frac >> FRACBITS) & 127]]];
 
-        //*dest = dest[SCREENWIDTH*10+5];
-
-//              *dest = //tinttable[((*dest)<<8)+colormaps[dc_source[(frac>>FRACBITS)&127]]];
-
-//              *dest = dc_colormap[dc_source[(frac>>FRACBITS)&127]];
         dest += SCREENWIDTH;
         frac += fracstep;
     }
@@ -228,7 +199,7 @@
     while (count--);
 }
 
-void R_DrawTranslatedFuzzColumn(void)
+void R_DrawTranslatedTLColumn(void)
 {
     int count;
     byte *dest;
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -302,7 +302,7 @@
 
 extern void (*colfunc) (void);
 extern void (*basecolfunc) (void);
-extern void (*fuzzcolfunc) (void);
+extern void (*tlcolfunc) (void);
 extern void (*spanfunc) (void);
 
 int R_PointOnSide(fixed_t x, fixed_t y, node_t * node);
@@ -455,10 +455,10 @@
 
 void R_DrawColumn(void);
 void R_DrawColumnLow(void);
-void R_DrawFuzzColumn(void);
-void R_DrawFuzzColumnLow(void);
+void R_DrawTLColumn(void);
+void R_DrawTLColumnLow(void);
 void R_DrawTranslatedColumn(void);
-void R_DrawTranslatedFuzzColumn(void);
+void R_DrawTranslatedTLColumn(void);
 void R_DrawTranslatedColumnLow(void);
 
 extern int ds_y;
--- a/src/heretic/r_main.c
+++ b/src/heretic/r_main.c
@@ -77,7 +77,7 @@
 
 void (*colfunc) (void);
 void (*basecolfunc) (void);
-void (*fuzzcolfunc) (void);
+void (*tlcolfunc) (void);
 void (*transcolfunc) (void);
 void (*spanfunc) (void);
 
@@ -583,7 +583,7 @@
     if (!detailshift)
     {
         colfunc = basecolfunc = R_DrawColumn;
-        fuzzcolfunc = R_DrawFuzzColumn;
+        tlcolfunc = R_DrawTLColumn;
         transcolfunc = R_DrawTranslatedColumn;
         spanfunc = R_DrawSpan;
     }
@@ -590,7 +590,7 @@
     else
     {
         colfunc = basecolfunc = R_DrawColumnLow;
-        fuzzcolfunc = R_DrawFuzzColumn;
+        tlcolfunc = R_DrawTLColumn;
         transcolfunc = R_DrawTranslatedColumn;
         spanfunc = R_DrawSpanLow;
     }
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -29,7 +29,7 @@
 #include "r_local.h"
 
 void R_DrawColumn(void);
-void R_DrawFuzzColumn(void);
+void R_DrawTLColumn(void);
 
 typedef struct
 {
@@ -355,7 +355,7 @@
             dc_source = (byte *) column + 3;
             dc_texturemid = basetexturemid - (column->topdelta << FRACBITS);
 //                      dc_source = (byte *)column + 3 - column->topdelta;
-            colfunc();          // either R_DrawColumn or R_DrawFuzzColumn
+            colfunc();          // either R_DrawColumn or R_DrawTLColumn
         }
         column = (column_t *) ((byte *) column + column->length + 4);
     }
@@ -387,19 +387,19 @@
     dc_colormap = vis->colormap;
 
 //      if(!dc_colormap)
-//              colfunc = fuzzcolfunc;  // NULL colormap = shadow draw
+//              colfunc = tlcolfunc;  // NULL colormap = shadow draw
 
     if (vis->mobjflags & MF_SHADOW)
     {
         if (vis->mobjflags & MF_TRANSLATION)
         {
-            colfunc = R_DrawTranslatedFuzzColumn;
+            colfunc = R_DrawTranslatedTLColumn;
             dc_translation = translationtables - 256 +
                 ((vis->mobjflags & MF_TRANSLATION) >> (MF_TRANSSHIFT - 8));
         }
         else
         {                       // Draw using shadow column function
-            colfunc = fuzzcolfunc;
+            colfunc = tlcolfunc;
         }
     }
     else if (vis->mobjflags & MF_TRANSLATION)
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -948,7 +948,7 @@
     {
         if (CPlayer->readyArtifact > 0)
         {
-            V_DrawFuzzPatch(286, 170, W_CacheLumpName("ARTIBOX", PU_CACHE));
+            V_DrawTLPatch(286, 170, W_CacheLumpName("ARTIBOX", PU_CACHE));
             V_DrawPatch(286, 170,
                         W_CacheLumpName(patcharti[CPlayer->readyArtifact],
                                         PU_CACHE));
@@ -960,8 +960,8 @@
         x = inv_ptr - curpos;
         for (i = 0; i < 7; i++)
         {
-            V_DrawFuzzPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX",
-                                                              PU_CACHE));
+            V_DrawTLPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX",
+                                                            PU_CACHE));
             if (CPlayer->inventorySlotNum > x + i
                 && CPlayer->inventory[x + i].type != arti_none)
             {
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -329,8 +329,8 @@
 #define	MF_TELEPORT		0x8000  // don't cross lines or look at heights
 #define MF_MISSILE		0x10000 // don't hit same species, explode on block
 
-#define	MF_ALTSHADOW	0x20000 // alternate fuzzy draw
-#define	MF_SHADOW		0x40000 // use fuzzy draw (shadow demons / invis)
+#define	MF_ALTSHADOW	0x20000 // alternate translucent draw
+#define	MF_SHADOW		0x40000 // use translucent draw (shadow demons / invis)
 #define	MF_NOBLOOD		0x80000 // don't bleed when shot (use puff)
 #define	MF_CORPSE		0x100000        // don't stop moving halfway off a step
 #define	MF_INFLOAT		0x200000        // floating to a height for a move, don't
@@ -1228,8 +1228,8 @@
 
 void V_Init(void);              // Allocates buffer screens, call before R_Init
 void V_DrawPatch(int x, int y, patch_t * patch);
-void V_DrawFuzzPatch(int x, int y, patch_t * patch);
-void V_DrawAltFuzzPatch(int x, int y, patch_t * patch);
+void V_DrawTLPatch(int x, int y, patch_t * patch);
+void V_DrawAltTLPatch(int x, int y, patch_t * patch);
 void V_DrawShadowedPatch(int x, int y, patch_t * patch);
 void V_DrawRawScreen(byte * raw);
 
--- a/src/hexen/r_draw.c
+++ b/src/hexen/r_draw.c
@@ -126,17 +126,8 @@
     while (count--);
 }
 
-/*
-#define FUZZTABLE	50
-#define FUZZOFF	(SCREENWIDTH)
-int		fuzzoffset[FUZZTABLE] = {
-FUZZOFF,-FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF,FUZZOFF,-FUZZOFF,FUZZOFF
-};
-int fuzzpos = 0;
-*/
-
 #ifndef __WATCOMC__
-void R_DrawFuzzColumn(void)
+void R_DrawTLColumn(void)
 {
     int count;
     byte *dest;
@@ -153,7 +144,7 @@
 
 #ifdef RANGECHECK
     if ((unsigned) dc_x >= SCREENWIDTH || dc_yl < 0 || dc_yh >= SCREENHEIGHT)
-        I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
+        I_Error("R_DrawTLColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
 #endif
 
     dest = ylookup[dc_yl] + columnofs[dc_x];
@@ -161,17 +152,6 @@
     fracstep = dc_iscale;
     frac = dc_texturemid + (dc_yl - centery) * fracstep;
 
-// OLD FUZZY INVISO SPRITE STUFF
-/*	do
-	{
-		*dest = colormaps[6*256+dest[fuzzoffset[fuzzpos]]];
-		if (++fuzzpos == FUZZTABLE)
-			fuzzpos = 0;
-		dest += SCREENWIDTH;
-		frac += fracstep;
-	} while (count--);
-*/
-
     do
     {
         *dest = tinttable[*dest +
@@ -186,11 +166,11 @@
 
 //============================================================================
 //
-// R_DrawAltFuzzColumn
+// R_DrawAltTLColumn
 //
 //============================================================================
 
-void R_DrawAltFuzzColumn(void)
+void R_DrawAltTLColumn(void)
 {
     int count;
     byte *dest;
@@ -207,7 +187,7 @@
 
 #ifdef RANGECHECK
     if ((unsigned) dc_x >= SCREENWIDTH || dc_yl < 0 || dc_yh >= SCREENHEIGHT)
-        I_Error("R_DrawFuzzColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
+        I_Error("R_DrawAltTLColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
 #endif
 
     dest = ylookup[dc_yl] + columnofs[dc_x];
@@ -267,11 +247,11 @@
 
 //============================================================================
 //
-// R_DrawTranslatedFuzzColumn
+// R_DrawTranslatedTLColumn
 //
 //============================================================================
 
-void R_DrawTranslatedFuzzColumn(void)
+void R_DrawTranslatedTLColumn(void)
 {
     int count;
     byte *dest;
@@ -305,12 +285,12 @@
 
 //============================================================================
 //
-// R_DrawTranslatedAltFuzzColumn
+// R_DrawTranslatedAltTLColumn
 //
 //============================================================================
 
 /*
-void R_DrawTranslatedAltFuzzColumn (void)
+void R_DrawTranslatedAltTLColumn (void)
 {
 	int			count;
 	byte		*dest;
--- a/src/hexen/r_local.h
+++ b/src/hexen/r_local.h
@@ -356,7 +356,7 @@
 
 extern void (*colfunc) (void);
 extern void (*basecolfunc) (void);
-extern void (*fuzzcolfunc) (void);
+extern void (*tlcolfunc) (void);
 extern void (*spanfunc) (void);
 
 int R_PointOnSide(fixed_t x, fixed_t y, node_t * node);
@@ -520,13 +520,13 @@
 
 void R_DrawColumn(void);
 void R_DrawColumnLow(void);
-void R_DrawFuzzColumn(void);
-void R_DrawFuzzColumnLow(void);
+void R_DrawTLColumn(void);
+void R_DrawTLColumnLow(void);
 void R_DrawTranslatedColumn(void);
-void R_DrawTranslatedFuzzColumn(void);
+void R_DrawTranslatedTLColumn(void);
 void R_DrawTranslatedColumnLow(void);
-void R_DrawAltFuzzColumn(void);
-//void  R_DrawTranslatedAltFuzzColumn(void);
+void R_DrawAltTLColumn(void);
+//void  R_DrawTranslatedAltTLColumn(void);
 
 extern int ds_y;
 extern int ds_x1;
--- a/src/hexen/r_main.c
+++ b/src/hexen/r_main.c
@@ -75,7 +75,7 @@
 
 void (*colfunc) (void);
 void (*basecolfunc) (void);
-void (*fuzzcolfunc) (void);
+void (*tlcolfunc) (void);
 void (*transcolfunc) (void);
 void (*spanfunc) (void);
 
@@ -603,7 +603,7 @@
     if (!detailshift)
     {
         colfunc = basecolfunc = R_DrawColumn;
-        fuzzcolfunc = R_DrawFuzzColumn;
+        tlcolfunc = R_DrawTLColumn;
         transcolfunc = R_DrawTranslatedColumn;
         spanfunc = R_DrawSpan;
     }
@@ -610,7 +610,7 @@
     else
     {
         colfunc = basecolfunc = R_DrawColumnLow;
-        fuzzcolfunc = R_DrawFuzzColumn;
+        tlcolfunc = R_DrawTLColumn;
         transcolfunc = R_DrawTranslatedColumn;
         spanfunc = R_DrawSpanLow;
     }
--- a/src/hexen/r_things.c
+++ b/src/hexen/r_things.c
@@ -30,9 +30,9 @@
 #include "r_local.h"
 
 void R_DrawColumn(void);
-void R_DrawFuzzColumn(void);
-void R_DrawAltFuzzColumn(void);
-//void R_DrawTranslatedAltFuzzColumn(void);
+void R_DrawTLColumn(void);
+void R_DrawAltTLColumn(void);
+//void R_DrawTranslatedAltTLColumn(void);
 
 typedef struct
 {
@@ -359,7 +359,7 @@
             dc_source = (byte *) column + 3;
             dc_texturemid = basetexturemid - (column->topdelta << FRACBITS);
 //                      dc_source = (byte *)column + 3 - column->topdelta;
-            colfunc();          // either R_DrawColumn or R_DrawFuzzColumn
+            colfunc();          // either R_DrawColumn or R_DrawTLColumn
         }
         column = (column_t *) ((byte *) column + column->length + 4);
     }
@@ -391,13 +391,13 @@
     dc_colormap = vis->colormap;
 
 //      if(!dc_colormap)
-//              colfunc = fuzzcolfunc;  // NULL colormap = shadow draw
+//              colfunc = tlcolfunc;  // NULL colormap = shadow draw
 
     if (vis->mobjflags & (MF_SHADOW | MF_ALTSHADOW))
     {
         if (vis->mobjflags & MF_TRANSLATION)
         {
-            colfunc = R_DrawTranslatedFuzzColumn;
+            colfunc = R_DrawTranslatedTLColumn;
             dc_translation = translationtables - 256
                 + vis->class * ((MAXPLAYERS - 1) * 256) +
                 ((vis->mobjflags & MF_TRANSLATION) >> (MF_TRANSSHIFT - 8));
@@ -404,11 +404,11 @@
         }
         else if (vis->mobjflags & MF_SHADOW)
         {                       // Draw using shadow column function
-            colfunc = fuzzcolfunc;
+            colfunc = tlcolfunc;
         }
         else
         {
-            colfunc = R_DrawAltFuzzColumn;
+            colfunc = R_DrawAltTLColumn;
         }
     }
     else if (vis->mobjflags & MF_TRANSLATION)
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -1545,16 +1545,16 @@
             if (CPlayer->armorpoints[i] <=
                 (ArmorIncrement[CPlayer->class][i] >> 2))
             {
-                V_DrawFuzzPatch(150 + 31 * i, 164,
-                                W_CacheLumpNum(W_GetNumForName("armslot1") +
-                                               i, PU_CACHE));
+                V_DrawTLPatch(150 + 31 * i, 164,
+                              W_CacheLumpNum(W_GetNumForName("armslot1") +
+                                             i, PU_CACHE));
             }
             else if (CPlayer->armorpoints[i] <=
                      (ArmorIncrement[CPlayer->class][i] >> 1))
             {
-                V_DrawAltFuzzPatch(150 + 31 * i, 164,
-                                   W_CacheLumpNum(W_GetNumForName("armslot1")
-                                                  + i, PU_CACHE));
+                V_DrawAltTLPatch(150 + 31 * i, 164,
+                                 W_CacheLumpNum(W_GetNumForName("armslot1")
+                                                + i, PU_CACHE));
             }
             else
             {
@@ -1640,7 +1640,7 @@
     {
         if (CPlayer->readyArtifact > 0)
         {
-            V_DrawFuzzPatch(286, 170, W_CacheLumpName("ARTIBOX", PU_CACHE));
+            V_DrawTLPatch(286, 170, W_CacheLumpName("ARTIBOX", PU_CACHE));
             V_DrawPatch(284, 169,
                         W_CacheLumpName(patcharti[CPlayer->readyArtifact],
                                         PU_CACHE));
@@ -1655,8 +1655,8 @@
         x = inv_ptr - curpos;
         for (i = 0; i < 7; i++)
         {
-            V_DrawFuzzPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX",
-                                                              PU_CACHE));
+            V_DrawTLPatch(50 + i * 31, 168, W_CacheLumpName("ARTIBOX",
+                                                            PU_CACHE));
             if (CPlayer->inventorySlotNum > x + i
                 && CPlayer->inventory[x + i].type != arti_none)
             {
--- a/src/hexen/v_video.c
+++ b/src/hexen/v_video.c
@@ -178,7 +178,7 @@
 /*
 ==================
 =
-= V_DrawFuzzPatch
+= V_DrawTLPatch
 =
 = Masks a column based translucent masked pic to the screen.
 =
@@ -186,7 +186,7 @@
 */
 extern byte *tinttable;
 
-void V_DrawFuzzPatch(int x, int y, patch_t * patch)
+void V_DrawTLPatch(int x, int y, patch_t * patch)
 {
     int count, col;
     column_t *column;
@@ -229,7 +229,7 @@
 /*
 ==================
 =
-= V_DrawAltFuzzPatch
+= V_DrawAltTLPatch
 =
 = Masks a column based translucent masked pic to the screen.
 =
@@ -237,7 +237,7 @@
 */
 extern byte *tinttable;
 
-void V_DrawAltFuzzPatch(int x, int y, patch_t * patch)
+void V_DrawAltTLPatch(int x, int y, patch_t * patch)
 {
     int count, col;
     column_t *column;
--- a/src/m_argv.h
+++ b/src/m_argv.h
@@ -28,6 +28,8 @@
 #ifndef __M_ARGV__
 #define __M_ARGV__
 
+#include "doomtype.h"
+
 //
 // MISC
 //
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -316,12 +316,12 @@
 } 
 
 //
-// V_DrawFuzzPatch
+// V_DrawTLPatch
 //
 // Masks a column based translucent masked pic to the screen.
 //
 
-void V_DrawFuzzPatch(int x, int y, patch_t * patch)
+void V_DrawTLPatch(int x, int y, patch_t * patch)
 {
     int count, col;
     column_t *column;
@@ -336,7 +336,7 @@
      || y < 0
      || y + SHORT(patch->height) > SCREENHEIGHT)
     {
-        I_Error("Bad V_DrawFuzzPatch");
+        I_Error("Bad V_DrawTLPatch");
     }
 
     col = 0;
--- a/src/v_video.h
+++ b/src/v_video.h
@@ -57,7 +57,7 @@
 
 void V_DrawPatch(int x, int y, patch_t *patch);
 void V_DrawPatchFlipped(int x, int y, patch_t *patch);
-void V_DrawFuzzPatch(int x, int y, patch_t *patch);
+void V_DrawTLPatch(int x, int y, patch_t *patch);
 void V_DrawShadowedPatch(int x, int y, patch_t *patch);
 
 void V_DrawPatchDirect(int x, int y, patch_t *patch);