Skip to content
Browse files

- Scratch that last commit. Use the Alpha property of the linedef ins…

…tead.

git-svn-id: http://mancubus.net/svn/hosted/zdoom/zdoom/branches/doom64@3135 a95907f1-e10c-0410-b46f-9e587ccb1026
  • Loading branch information...
1 parent b24799f commit 154b800cbf26567e5978e6df18b516fd4e5587bf blzut3 committed Feb 5, 2011
Showing with 119 additions and 129 deletions.
  1. +0 −3 src/doomdata.h
  2. +0 −1 src/namedef.h
  3. +8 −2 src/p_setup.cpp
  4. +0 −6 src/p_udmf.cpp
  5. +111 −114 src/r_segs.cpp
  6. +0 −2 wadsrc/static/xlat/defines.i
  7. +0 −1 wadsrc/static/xlat/doom64.txt
View
3 src/doomdata.h
@@ -184,9 +184,6 @@ enum ELineFlags
ML_BLOCKPROJECTILE = 0x01000000,
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
-
- // Doom 64
- ML_DRAWMIDTEXTURE = 0x08000000,
};
View
1 src/namedef.h
@@ -384,7 +384,6 @@ xx(Transparent)
xx(Passuse)
xx(Repeatspecial)
xx(Conversation)
-xx(Drawmidtexture)
xx(Playercross)
xx(Playeruse)
View
10 src/p_setup.cpp
@@ -2373,7 +2373,6 @@ void P_LoadLineDefs (MapData * map)
P_AdjustLine (ld);
P_SaveLineSpecial (ld);
- ld->flags |= ML_DRAWMIDTEXTURE; // Always have this set on non-Doom64 maps
if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
@@ -2458,7 +2457,6 @@ void P_LoadLineDefsHexen (MapData * map)
P_AdjustLine (ld);
P_SetLineID(ld);
P_SaveLineSpecial (ld);
- ld->flags |= ML_DRAWMIDTEXTURE; // Always have this set on non-Doom64 maps
if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
@@ -2474,6 +2472,11 @@ void P_LoadLineDefsHexen (MapData * map)
// Doom 64 LineDefs
void P_LoadLineDefsDoom64 (MapData * map)
{
+ enum
+ {
+ ML_DRAWMIDTEXTURE = 0x200,
+ };
+
int i, skipped;
line_t *ld;
int lumplen = map->Size(ML_LINEDEFS);
@@ -2548,6 +2551,9 @@ void P_LoadLineDefsDoom64 (MapData * map)
P_SetSideNum (&ld->sidedef[0], LittleShort(mld->sidenum[0]));
P_SetSideNum (&ld->sidedef[1], LittleShort(mld->sidenum[1]));
+ if (!(mld->flags & ML_DRAWMIDTEXTURE))
+ ld->Alpha = 0;
+
P_AdjustLine (ld);
P_SaveLineSpecial (ld);
if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
View
6 src/p_udmf.cpp
@@ -653,7 +653,6 @@ class UDMFParser : public UDMFParserBase
ld->Alpha = FRACUNIT;
ld->id = -1;
ld->sidedef[0] = ld->sidedef[1] = NULL;
- ld->flags |= ML_DRAWMIDTEXTURE; // Always have this set on non-Doom64 maps
if (level.flags2 & LEVEL2_CLIPMIDTEX) ld->flags |= ML_CLIP_MIDTEX;
if (level.flags2 & LEVEL2_WRAPMIDTEX) ld->flags |= ML_WRAP_MIDTEX;
if (level.flags2 & LEVEL2_CHECKSWITCHRANGE) ld->flags |= ML_CHECKSWITCHRANGE;
@@ -760,11 +759,6 @@ class UDMFParser : public UDMFParserBase
passuse = CheckBool(key);
continue;
- case NAME_Drawmidtexture:
- CHECK_N(Dm | Zd | Zdt | Va)
- Flag(ld->flags, ML_DRAWMIDTEXTURE, key);
- continue;
-
default:
break;
}
View
225 src/r_segs.cpp
@@ -327,149 +327,146 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
- if (curline->linedef->flags & ML_DRAWMIDTEXTURE)
- {
- if (!(curline->linedef->flags & ML_WRAP_MIDTEX) &&
- !(curline->sidedef->Flags & WALLF_WRAP_MIDTEX))
- { // Texture does not wrap vertically.
+ if (!(curline->linedef->flags & ML_WRAP_MIDTEX) &&
+ !(curline->sidedef->Flags & WALLF_WRAP_MIDTEX))
+ { // Texture does not wrap vertically.
+
+ // [RH] Don't bother drawing segs that are completely offscreen
+ if (MulScale12 (globaldclip, ds->sz1) < -textop &&
+ MulScale12 (globaldclip, ds->sz2) < -textop)
+ { // Texture top is below the bottom of the screen
+ goto clearfog;
+ }
- // [RH] Don't bother drawing segs that are completely offscreen
- if (MulScale12 (globaldclip, ds->sz1) < -textop &&
- MulScale12 (globaldclip, ds->sz2) < -textop)
- { // Texture top is below the bottom of the screen
- goto clearfog;
- }
+ if (MulScale12 (globaluclip, ds->sz1) > texheight - textop &&
+ MulScale12 (globaluclip, ds->sz2) > texheight - textop)
+ { // Texture bottom is above the top of the screen
+ goto clearfog;
+ }
- if (MulScale12 (globaluclip, ds->sz1) > texheight - textop &&
- MulScale12 (globaluclip, ds->sz2) > texheight - textop)
- { // Texture bottom is above the top of the screen
- goto clearfog;
- }
+ if ((fake3D & FAKE3D_CLIPBOTTOM) && textop <= sclipBottom - viewz)
+ {
+ goto clearfog;
+ }
+ if ((fake3D & FAKE3D_CLIPTOP) && textop - texheight >= sclipTop - viewz)
+ {
+ goto clearfog;
+ }
+
+ WallSZ1 = ds->sz1;
+ WallSZ2 = ds->sz2;
+ WallSX1 = ds->sx1;
+ WallSX2 = ds->sx2;
+
+ if (fake3D & FAKE3D_CLIPTOP)
+ {
+ OWallMost (wallupper, textop < sclipTop - viewz ? textop : sclipTop - viewz);
+ }
+ else
+ {
+ OWallMost (wallupper, textop);
+ }
+ if (fake3D & FAKE3D_CLIPBOTTOM)
+ {
+ OWallMost (walllower, textop - texheight > sclipBottom - viewz ? textop - texheight : sclipBottom - viewz);
+ }
+ else
+ {
+ OWallMost (walllower, textop - texheight);
+ }
+
+ for (i = x1; i <= x2; i++)
+ {
+ if (wallupper[i] < mceilingclip[i])
+ wallupper[i] = mceilingclip[i];
+ }
+ for (i = x1; i <= x2; i++)
+ {
+ if (walllower[i] > mfloorclip[i])
+ walllower[i] = mfloorclip[i];
+ }
+ mfloorclip = walllower;
+ mceilingclip = wallupper;
- if ((fake3D & FAKE3D_CLIPBOTTOM) && textop <= sclipBottom - viewz)
+ // draw the columns one at a time
+ if (drawmode == DoDraw0)
+ {
+ for (dc_x = x1; dc_x <= x2; ++dc_x)
{
- goto clearfog;
+ BlastMaskedColumn (R_DrawMaskedColumn, tex);
}
- if ((fake3D & FAKE3D_CLIPTOP) && textop - texheight >= sclipTop - viewz)
- {
+ }
+ else
+ {
+ // [RH] Draw up to four columns at once
+ int stop = (x2+1) & ~3;
+
+ if (x1 > x2)
goto clearfog;
- }
- WallSZ1 = ds->sz1;
- WallSZ2 = ds->sz2;
- WallSX1 = ds->sx1;
- WallSX2 = ds->sx2;
+ dc_x = x1;
- if (fake3D & FAKE3D_CLIPTOP)
- {
- OWallMost (wallupper, textop < sclipTop - viewz ? textop : sclipTop - viewz);
- }
- else
+ while ((dc_x < stop) && (dc_x & 3))
{
- OWallMost (wallupper, textop);
+ BlastMaskedColumn (R_DrawMaskedColumn, tex);
+ dc_x++;
}
- if (fake3D & FAKE3D_CLIPBOTTOM)
+
+ while (dc_x < stop)
{
- OWallMost (walllower, textop - texheight > sclipBottom - viewz ? textop - texheight : sclipBottom - viewz);
+ rt_initcols();
+ BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
+ BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
+ BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
+ BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex);
+ rt_draw4cols (dc_x - 3);
+ dc_x++;
}
- else
+
+ while (dc_x <= x2)
{
- OWallMost (walllower, textop - texheight);
+ BlastMaskedColumn (R_DrawMaskedColumn, tex);
+ dc_x++;
}
+ }
+ }
+ else
+ { // Texture does wrap vertically.
+ WallSZ1 = ds->sz1;
+ WallSZ2 = ds->sz2;
+ WallSX1 = ds->sx1;
+ WallSX2 = ds->sx2;
+ if (fake3D & FAKE3D_CLIPTOP)
+ {
+ OWallMost (wallupper, sclipTop - viewz);
for (i = x1; i <= x2; i++)
{
if (wallupper[i] < mceilingclip[i])
wallupper[i] = mceilingclip[i];
}
+ mceilingclip = wallupper;
+ }
+ if (fake3D & FAKE3D_CLIPBOTTOM)
+ {
+ OWallMost (walllower, sclipBottom - viewz);
for (i = x1; i <= x2; i++)
{
if (walllower[i] > mfloorclip[i])
walllower[i] = mfloorclip[i];
}
mfloorclip = walllower;
- mceilingclip = wallupper;
-
- // draw the columns one at a time
- if (drawmode == DoDraw0)
- {
- for (dc_x = x1; dc_x <= x2; ++dc_x)
- {
- BlastMaskedColumn (R_DrawMaskedColumn, tex);
- }
- }
- else
- {
- // [RH] Draw up to four columns at once
- int stop = (x2+1) & ~3;
-
- if (x1 > x2)
- goto clearfog;
-
- dc_x = x1;
-
- while ((dc_x < stop) && (dc_x & 3))
- {
- BlastMaskedColumn (R_DrawMaskedColumn, tex);
- dc_x++;
- }
-
- while (dc_x < stop)
- {
- rt_initcols();
- BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
- BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
- BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex); dc_x++;
- BlastMaskedColumn (R_DrawMaskedColumnHoriz, tex);
- rt_draw4cols (dc_x - 3);
- dc_x++;
- }
+ }
- while (dc_x <= x2)
- {
- BlastMaskedColumn (R_DrawMaskedColumn, tex);
- dc_x++;
- }
- }
+ rw_offset = 0;
+ rw_pic = tex;
+ if (colfunc == basecolfunc)
+ {
+ maskwallscan(x1, x2, mceilingclip, mfloorclip, MaskedSWall, maskedtexturecol, ds->yrepeat);
}
else
- { // Texture does wrap vertically.
- WallSZ1 = ds->sz1;
- WallSZ2 = ds->sz2;
- WallSX1 = ds->sx1;
- WallSX2 = ds->sx2;
-
- if (fake3D & FAKE3D_CLIPTOP)
- {
- OWallMost (wallupper, sclipTop - viewz);
- for (i = x1; i <= x2; i++)
- {
- if (wallupper[i] < mceilingclip[i])
- wallupper[i] = mceilingclip[i];
- }
- mceilingclip = wallupper;
- }
- if (fake3D & FAKE3D_CLIPBOTTOM)
- {
- OWallMost (walllower, sclipBottom - viewz);
- for (i = x1; i <= x2; i++)
- {
- if (walllower[i] > mfloorclip[i])
- walllower[i] = mfloorclip[i];
- }
- mfloorclip = walllower;
- }
-
- rw_offset = 0;
- rw_pic = tex;
- if (colfunc == basecolfunc)
- {
- maskwallscan(x1, x2, mceilingclip, mfloorclip, MaskedSWall, maskedtexturecol, ds->yrepeat);
- }
- else
- {
- transmaskwallscan(x1, x2, mceilingclip, mfloorclip, MaskedSWall, maskedtexturecol, ds->yrepeat);
- }
+ {
+ transmaskwallscan(x1, x2, mceilingclip, mfloorclip, MaskedSWall, maskedtexturecol, ds->yrepeat);
}
}
View
2 wadsrc/static/xlat/defines.i
@@ -255,8 +255,6 @@ enum
ML_FIRSTSIDEONLY = 0x00800000,
ML_BLOCKPROJECTILE = 0x01000000,
ML_BLOCKUSE = 0x02000000,
-
- ML_DRAWMIDTEXTURE = 0x08000000,
//
ML_PASSTHROUGH = -1,
View
1 wadsrc/static/xlat/doom64.txt
@@ -61,7 +61,6 @@ lineflag 5 = ML_SECRET;
lineflag 6 = ML_SOUNDBLOCK;
lineflag 7 = ML_DONTDRAW;
lineflag 8 = ML_MAPPED;
-lineflag 9 = ML_DRAWMIDTEXTURE;
// Use is not directly part of the type, they are determined by use flags. The following translations
// are temporary approximation based on the specs.

0 comments on commit 154b800

Please sign in to comment.
Something went wrong with that request. Please try again.