Brought back WaterWarp
This commit is contained in:
parent
c194c200c0
commit
174cf094b6
2 changed files with 15 additions and 53 deletions
|
@ -196,23 +196,20 @@ void D_WarpScreen (void)
|
|||
w = r_refdef.vrect.width;
|
||||
h = r_refdef.vrect.height;
|
||||
|
||||
printf("THIS IS HAPPENING BTW\n");
|
||||
wratio = w / (float)scr_vrect.width;
|
||||
hratio = h / (float)scr_vrect.height;
|
||||
|
||||
for (v=0 ; v<scr_vrect.height+AMP2*2 ; v++)
|
||||
{
|
||||
rowptr[v] = d_viewbuffer + (r_refdef.vrect.y * screenwidth) +
|
||||
(screenwidth * (int)((float)v * hratio * h / (h + AMP2 * 2)));
|
||||
}
|
||||
rowptr[v] = d_viewbuffer + (r_refdef.vrect.y * screenwidth) + (screenwidth * (int)((float)v * hratio * h / (h + AMP2 * 2)));
|
||||
|
||||
for (u=0 ; u<scr_vrect.width+AMP2*2 ; u++)
|
||||
{
|
||||
column[u] = r_refdef.vrect.x +
|
||||
(int)((float)u * wratio * w / (w + AMP2 * 2));
|
||||
}
|
||||
column[u] = r_refdef.vrect.x + (int)((float)u * wratio * w / (w + AMP2 * 2));
|
||||
|
||||
|
||||
turb = intsintable + ((int)(cl.time*SPEED)&(CYCLE-1));
|
||||
dest = vid.buffer + scr_vrect.y * vid.rowbytes + scr_vrect.x;
|
||||
|
||||
|
||||
turb = intsintable + ((int)(cl.time*SPEED)&(CYCLE-1));
|
||||
for (v=0 ; v<scr_vrect.height ; v++, dest += vid.rowbytes)
|
||||
{
|
||||
col = &column[turb[v]];
|
||||
|
@ -316,30 +313,7 @@ void D_CrapScreenMH (void)
|
|||
turb = atableofnothingtable;
|
||||
|
||||
dest = vid.buffer + scr_vrect.y * vid.rowbytes + scr_vrect.x;
|
||||
// Shrooms case
|
||||
if (r_doshrooms)
|
||||
{
|
||||
for (v = 0; v < scr_vrect.height; v++, dest += vid.rowbytes)
|
||||
{
|
||||
byte *myrow = rowptr[v];
|
||||
int *mycol = column;
|
||||
byte *mydest = dest;
|
||||
|
||||
for (u = 0; u < scr_vrect.width; u += 4, mycol += 4, mydest += 4)
|
||||
{
|
||||
// Shrooms effect test
|
||||
|
||||
mydest[0] = transTable[myrow[mycol[0]]][mydest[0]];
|
||||
mydest[1] = transTable[myrow[mycol[1]]][mydest[1]];
|
||||
mydest[2] = transTable[myrow[mycol[2]]][mydest[2]];
|
||||
mydest[3] = transTable[myrow[mycol[3]]][mydest[3]];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// Normal case
|
||||
else
|
||||
{
|
||||
for (v = 0; v < scr_vrect.height; v++, dest += vid.rowbytes)
|
||||
{
|
||||
byte *myrow = rowptr[v];
|
||||
|
@ -353,12 +327,9 @@ void D_CrapScreenMH (void)
|
|||
mydest[0] = myrow[mycol[0]];
|
||||
mydest[1] = myrow[mycol[1]];
|
||||
mydest[2] = myrow[mycol[2]];
|
||||
mydest[3] = myrow[mycol[3]];
|
||||
|
||||
mydest[3] = myrow[mycol[3]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if !id386
|
||||
|
|
|
@ -263,7 +263,7 @@ void R_Init_Cvars (void)
|
|||
r_drawflat = Cvar_Get ("r_drawflat", "0", CVAR_ORIGINAL);
|
||||
r_ambient = Cvar_Get ("r_ambient", "0", CVAR_ORIGINAL);
|
||||
r_clearcolor = Cvar_Get ("r_clearcolor", "2", CVAR_ORIGINAL);
|
||||
r_waterwarp = Cvar_Get ("r_waterwarp", "0", CVAR_ORIGINAL);
|
||||
r_waterwarp = Cvar_Get ("r_waterwarp", "1", CVAR_ORIGINAL);
|
||||
r_fullbright = Cvar_Get ("r_fullbright", "0", CVAR_ORIGINAL);
|
||||
r_drawentities = Cvar_Get ("r_drawentities", "1", CVAR_ORIGINAL);
|
||||
r_drawviewmodel = Cvar_Get ("r_drawviewmodel", "1", CVAR_ORIGINAL);
|
||||
|
@ -1834,26 +1834,17 @@ void R_RenderView_ (void)
|
|||
if (particleblood != r_particleblood->value)
|
||||
particleblood = r_particleblood->value;
|
||||
|
||||
|
||||
|
||||
// now, render out lens flares afterward (sort hack)
|
||||
// Screen Resolution Reduction
|
||||
|
||||
|
||||
|
||||
|
||||
if (amilow) // 160x100
|
||||
D_CrapScreen ();
|
||||
|
||||
else
|
||||
{
|
||||
if (r_dowarp){
|
||||
if (r_dowarp)
|
||||
D_WarpScreen ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (amilow)
|
||||
D_CrapScreen ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (r_viewleaf->contents <= CONTENTS_WATER)
|
||||
playersnd = 2;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue