DuckReconMajor
Forum Spammer

Posts: 3835
Registered: 01-09 |
I was looking through r_segs.c in the source code and noticed something odd. Take a close look, especially at third 'if' block.
code:
// two sided line
if (toptexture)
{
// top wall
mid = pixhigh>>HEIGHTBITS;
pixhigh += pixhighstep;
if (mid >= floorclip[rw_x])
mid = floorclip[rw_x]-1;
if (mid >= yl)
{
dc_yl = yl;
dc_yh = mid;
dc_texturemid = rw_toptexturemid;
dc_source = R_GetColumn(toptexture,texturecolumn);
colfunc ();
ceilingclip[rw_x] = mid;
}
else
ceilingclip[rw_x] = yl-1;
}
else
{
// no top wall
if (markceiling)
ceilingclip[rw_x] = yl-1;
}
if (bottomtexture)
{
// bottom wall
mid = (pixlow+HEIGHTUNIT-1)>>HEIGHTBITS;
pixlow += pixlowstep;
That way of rendering always boggled my mind, but I never noticed they'd stumbled upon something way ahead of their time. Carmack truly was (and of course still is) a genius. But it seems even he wasn't aware how smart he was!
Still don't see it? Here's a hint.
|