diff --git a/polymer/eduke32/build/include/mdsprite.h b/polymer/eduke32/build/include/mdsprite.h index 34492466c..505dfc1a1 100644 --- a/polymer/eduke32/build/include/mdsprite.h +++ b/polymer/eduke32/build/include/mdsprite.h @@ -214,6 +214,13 @@ int32_t mddraw(const spritetype *tspr); typedef struct { float xadd, yadd, zadd; int16_t angadd, flags, fov; } hudtyp; +enum { + HUDFLAG_HIDE = 1, + HUDFLAG_NOBOB = 2, + HUDFLAG_FLIPPED = 4, + HUDFLAG_NODEPTH = 8, +}; + EXTERN hudtyp hudmem[2][MAXTILES]; EXTERN int32_t mdpause; diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index a42d998d2..d6d7f1b9a 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -1277,13 +1277,13 @@ static int32_t defsparser(scriptfile *script) case T_FOV: scriptfile_getsymbol(script,&fov); break; case T_HIDE: - flags |= 1; break; + flags |= HUDFLAG_HIDE; break; case T_NOBOB: - flags |= 2; break; + flags |= HUDFLAG_NOBOB; break; case T_FLIPPED: - flags |= 4; break; + flags |= HUDFLAG_FLIPPED; break; case T_NODEPTH: - flags |= 8; break; + flags |= HUDFLAG_NODEPTH; break; } } diff --git a/polymer/eduke32/build/src/polymost.c b/polymer/eduke32/build/src/polymost.c index 490af885c..6913f9263 100644 --- a/polymer/eduke32/build/src/polymost.c +++ b/polymer/eduke32/build/src/polymost.c @@ -4155,7 +4155,8 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16 spritetype tspr; memset(&tspr,0,sizeof(spritetype)); - if (hudmem[(dastat&4)>>2][picnum].flags&1) return; //"HIDE" is specified in DEF + if (hudmem[(dastat&4)>>2][picnum].flags & HUDFLAG_HIDE) + return; ogchang = gchang; gchang = 1.0; ogshang = gshang; gshang = 0.0; d = (double)z/(65536.0*16384.0); @@ -4177,7 +4178,7 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16 z1 = pr_hudzadd; } #endif - if (!(hudmem[(dastat&4)>>2][picnum].flags&2)) //"NOBOB" is specified in DEF + if (!(hudmem[(dastat&4)>>2][picnum].flags & HUDFLAG_NOBOB)) { double fx = ((double)sx)*(1.0/65536.0); double fy = ((double)sy)*(1.0/65536.0); @@ -4296,7 +4297,7 @@ void polymost_dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16 bglLoadIdentity(); } - if (hudmem[(dastat&4)>>2][picnum].flags&8) //NODEPTH flag + if (hudmem[(dastat&4)>>2][picnum].flags & HUDFLAG_NODEPTH) bglDisable(GL_DEPTH_TEST); else {