diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 0a077c5da..bb5efa385 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -379,7 +379,9 @@ enum { // bit 8: 1 = Blocking sprite (use with hitscan / cliptype 1) "H" // bit 9: 1 = Transluscence reversing, 0 = normal "T" // bit 10: reserved (in use by a renderer hack, see CSTAT_SPRITE_MDHACK) -// bit 11: 1 = determine shade based only on its own shade member (see CON's spritenoshade command) +// bit 11: 1 = determine shade based only on its own shade member (see CON's spritenoshade command), i.e. +// don't take over shade from parallaxed ceiling/nonparallaxed floor +// (NOTE: implemented on the game side) // bit 12: reserved // bit 13: 1 = does not cast shadow // bit 14: 1 = invisible but casts shadow diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 34e425aa6..d5abe6108 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -6294,8 +6294,9 @@ static void Keys3d(void) { if (AIMING_AT_SPRITE) { - sprite[searchwall].cstat ^= 2048; - message("Sprite %d spritenoshade bit: %s", searchwall, ONOFF(sprite[searchwall].cstat&2048)); + sprite[searchwall].cstat ^= CSTAT_SPRITE_NOSHADE; + message("Sprite %d spritenoshade bit: %s", searchwall, + ONOFF(sprite[searchwall].cstat&CSTAT_SPRITE_NOSHADE)); } } @@ -10981,7 +10982,7 @@ void ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothr tspr->pal = fpal; // 2nd and 3rd rule minus "actor condition" - if (!wallaligned && (tspr->cstat&2048)==0) + if (!wallaligned && (tspr->cstat&CSTAT_SPRITE_NOSHADE)==0) { if (sector[tspr->sectnum].ceilingstat&1) sh = sector[tspr->sectnum].ceilingshade; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8f7b58c06..68593bbbd 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7234,7 +7234,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo continue; } - if (A_CheckSpriteFlags(t->owner,SPRITE_NOSHADE) || (t->cstat&2048)) + if (A_CheckSpriteFlags(t->owner, SPRITE_NOSHADE) || (t->cstat&CSTAT_SPRITE_NOSHADE)) l = sprite[t->owner].shade; else { diff --git a/polymer/eduke32/source/macros.h b/polymer/eduke32/source/macros.h index 6367e9b5f..f146e4196 100644 --- a/polymer/eduke32/source/macros.h +++ b/polymer/eduke32/source/macros.h @@ -155,7 +155,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // bit 8: 1 = Blocking sprite (use with hitscan) "H" // bit 9: reserved // bit 10: reserved -// bit 11: reserved +// bit 11: 1 = determine shade based only on its own shade member (see CON's spritenoshade command), i.e. +// don't take over shade from parallaxed ceiling/nonparallaxed floor +// (NOTE: implemented on the game side) // bit 12: reserved // bit 13: reserved // bit 14: reserved @@ -172,6 +174,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CSTAT_SPRITE_YCENTER BIT(7) #define CSTAT_SPRITE_BLOCK_HITSCAN BIT(8) #define CSTAT_SPRITE_TRANS_FLIP BIT(9) +#define CSTAT_SPRITE_NOSHADE BIT(11) #define CSTAT_SPRITE_INVISIBLE BIT(15)