From 0c2776e7fc0e01f5b8919185fa677419f53f97ae Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 22 May 2014 11:17:50 +0000 Subject: [PATCH] game.c: in A_Spawn(), protect CSTAT_SPRITE_NOSHADE of spawned MASKWALL* sprites. git-svn-id: https://svn.eduke32.com/eduke32@4478 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 4 ++-- polymer/eduke32/source/game.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 3dc266586..df89a38a8 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5633,8 +5633,8 @@ int32_t A_Spawn(int32_t j, int32_t pn) case MASKWALL13__STATIC: case MASKWALL14__STATIC: case MASKWALL15__STATIC: - j = sp->cstat&60; - sp->cstat = j|1; + j = sp->cstat & SPAWN_PROTECT_CSTAT_MASK; + sp->cstat = j|CSTAT_SPRITE_BLOCK; changespritestat(i, STAT_DEFAULT); break; case FOOTPRINTS__STATIC: diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index bff508156..594fdbabd 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -386,6 +386,11 @@ extern vec2_t G_ScreenTextShadow(int32_t sx, int32_t sy, const int32_t font, int if (alpha < 0) { blend = -alpha; alpha = 0; orientation |= RS_TRANS1; } \ } while (0) +// Cstat protection mask for (currently) spawned MASKWALL* sprites. +// TODO: look at more cases of cstat=(cstat&PROTECTED)|ADDED in A_Spawn()? +// 2048+(32+16)+8+4 +#define SPAWN_PROTECT_CSTAT_MASK (CSTAT_SPRITE_NOSHADE|CSTAT_SPRITE_SLAB|CSTAT_SPRITE_XFLIP|CSTAT_SPRITE_YFLIP); + int32_t app_main(int32_t argc,const char **argv); void fadepal(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step); //void fadepaltile(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step,int32_t tile);