diff options
author | Samuel Villareal | 2010-09-07 00:11:51 +0000 |
---|---|---|
committer | Samuel Villareal | 2010-09-07 00:11:51 +0000 |
commit | bdd800ded2c0e2df1b15372135b9cfd5901f6ecd (patch) | |
tree | d70f1c80fe892f5033190e2c25484b0ef506b571 /src/strife/r_things.c | |
parent | d95111bc5c481f7ccd155d8a8d8064d81b0180ac (diff) | |
download | chocolate-doom-bdd800ded2c0e2df1b15372135b9cfd5901f6ecd.tar.gz chocolate-doom-bdd800ded2c0e2df1b15372135b9cfd5901f6ecd.tar.bz2 chocolate-doom-bdd800ded2c0e2df1b15372135b9cfd5901f6ecd.zip |
+ Translucent sprites - initial implementation
Subversion-branch: /branches/strife-branch
Subversion-revision: 2029
Diffstat (limited to 'src/strife/r_things.c')
-rw-r--r-- | src/strife/r_things.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/strife/r_things.c b/src/strife/r_things.c index a13f355b..112e4214 100644 --- a/src/strife/r_things.c +++ b/src/strife/r_things.c @@ -413,23 +413,43 @@ R_DrawVisSprite fixed_t frac; patch_t* patch; int clip; // villsa [STRIFE] + int translation; // villsa [STRIFE] patch = W_CacheLumpNum (vis->patch+firstspritelump, PU_CACHE); dc_colormap = vis->colormap; + + // villsa [STRIFE] + translation = vis->mobjflags & (MF_COLORSWAP1|MF_COLORSWAP2|MF_COLORSWAP3); - if (!dc_colormap) + // villsa [STRIFE] unused + /*if (!dc_colormap) { // NULL colormap = shadow draw colfunc = fuzzcolfunc; + }*/ + // villsa [STRIFE] + if(vis->mobjflags & MF_SHADOW) + { + if(!translation) + { + if(vis->mobjflags & MF_MVIS) + colfunc = R_DrawMVisTLColumn; + else + colfunc = fuzzcolfunc; + } + else + { + colfunc = R_DrawTRTLColumn; + dc_translation = translationtables - 256 + (translation>>20); + } } // villsa [STRIFE] new translation tables - else if (vis->mobjflags & (MF_COLORSWAP1|MF_COLORSWAP2|MF_COLORSWAP3)) + else if (translation) { colfunc = transcolfunc; - dc_translation = translationtables - 256 + - ((vis->mobjflags & (MF_COLORSWAP1|MF_COLORSWAP2|MF_COLORSWAP3))>>20); + dc_translation = translationtables - 256 + (translation>>20); } dc_iscale = abs(vis->xiscale)>>detailshift; @@ -602,12 +622,13 @@ void R_ProjectSprite (mobj_t* thing) vis->patch = lump; // get light level - if (thing->flags & MF_SHADOW) + // villsa [STRIFE] unused + /*if (thing->flags & MF_SHADOW) { // shadow draw vis->colormap = NULL; } - else if (fixedcolormap) + else */if (fixedcolormap) { // fixed map vis->colormap = fixedcolormap; |