Some of you have already seen this in DHW before but I decided to post it here aswell...
In this tutorial I help you to create transparent ceilings (like in the Lair of Mantis - of coursre
my routine might differ a lot from the one theJosh used)...
Open wl_floorceiling.cpp and change the very end of the file from this:
In this tutorial I help you to create transparent ceilings (like in the Lair of Mantis - of coursre
my routine might differ a lot from the one theJosh used)...
Open wl_floorceiling.cpp and change the very end of the file from this:
- Code:
if (curbottex != lastbottex)
{
lastbottex = curbottex;
bottex = PM_GetTexture(curbottex);
}
u = (gu >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
v = (gv >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
unsigned texoffs = (u << TEXTURESHIFT) + (TEXTURESIZE - 1) - v;
#ifdef USE_SHADING
if(curtoptex)
vbuf[top_add] = curshades[toptex[texoffs]];
if(curbottex)
vbuf[bot_add] = curshades[bottex[texoffs]];
#else
if(curtoptex)
vbuf[top_add] = toptex[texoffs];
if(curbottex)
vbuf[bot_add] = bottex[texoffs];
#endif
}
}
gu += du;
gv += dv;
}
}
}
- Code:
if (curbottex != lastbottex)
{
lastbottex = curbottex;
bottex = PM_GetTexture(curbottex);
}
u = (gu >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
v = (gv >> (TILESHIFT - TEXTURESHIFT)) & (TEXTURESIZE - 1);
unsigned texoffs = (u << TEXTURESHIFT) + (TEXTURESIZE - 1) - v;
// Get tranparent:
byte color1=*(toptex+texoffs);
byte color2=*(bottex+texoffs);
#ifdef USE_SHADING
if(curtoptex){
if (color1 != 0xff)
vbuf[top_add] = curshades[toptex[texoffs]];
}
if(curbottex){
if (color2 != 0xff)
vbuf[bot_add] = curshades[bottex[texoffs]];
}
#else
if(curtoptex)
if (color1 != 0xff)
vbuf[top_add] = toptex[texoffs];
if(curbottex)
if (color2 != 0xff)
vbuf[bot_add] = bottex[texoffs];
#endif
}
}
gu += du;
gv += dv;
}
}
}
#endif
Last edited by WLHack on Tue Feb 26, 2013 1:31 am; edited 1 time in total