mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
This commit is contained in:
commit
c7dce79831
18 changed files with 4637 additions and 27 deletions
|
@ -452,6 +452,33 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
|||
set( CMAKE_CXX_FLAGS_MINSIZEREL "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
|
||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
|
||||
|
||||
# Support for the GCC/Clang sanitizers.
|
||||
set( WITH_ASAN 0 CACHE BOOL "Enable the Address Sanitizer")
|
||||
if( NOT CMAKE_COMPILER_IS_GNUCXX )
|
||||
set( WITH_MSAN 0 CACHE BOOL "Enable the Memory Sanitizer")
|
||||
endif( NOT CMAKE_COMPILER_IS_GNUCXX )
|
||||
set( WITH_UBSAN 0 CACHE BOOL "Enable the Undefined Behavior Sanitizer")
|
||||
if( WITH_MSAN )
|
||||
if ( WITH_ASAN OR WITH_UBSAN )
|
||||
message( SEND_ERROR "You can't use MSAN with either ASAN or UBSAN." )
|
||||
endif ( WITH_ASAN OR WITH_UBSAN )
|
||||
endif( WITH_MSAN )
|
||||
|
||||
set( SANITIZER_FLAG "" )
|
||||
if( WITH_ASAN )
|
||||
set( SANITIZER_FLAG "-fsanitize=address" )
|
||||
if ( WITH_UBSAN )
|
||||
set( SANITIZER_FLAG "${SANITIZER_FLAG},undefined" )
|
||||
endif( WITH_UBSAN )
|
||||
elseif( WITH_MSAN )
|
||||
set( SANITIZER_FLAG "-fsanitize=memory" )
|
||||
elseif( WITH_UBSAN )
|
||||
set( SANITIZER_FLAG "-fsanitize=undefined" )
|
||||
endif( WITH_ASAN )
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${SANITIZER_FLAG} ${CMAKE_CXX_FLAGS}" )
|
||||
set( CMAKE_C_FLAGS "${SANITIZER_FLAG} ${CMAKE_C_FLAGS}" )
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.5")
|
||||
set( CMAKE_C_FLAGS "-Wno-unused-result ${CMAKE_C_FLAGS}" )
|
||||
set( CMAKE_CXX_FLAGS "-Wno-unused-result ${CMAKE_CXX_FLAGS}" )
|
||||
|
|
|
@ -56,6 +56,7 @@ struct FColormap
|
|||
LightColor = from->Color;
|
||||
desaturation = from->Desaturate;
|
||||
FadeColor = from->Fade;
|
||||
FadeColor.a = 0;
|
||||
blendfactor = from->Color.a;
|
||||
fogdensity = from->Fade.a*2;
|
||||
return * this;
|
||||
|
|
|
@ -296,11 +296,10 @@ void GLSprite::Draw(int pass)
|
|||
if (!gl_isBlack(Colormap.FadeColor))
|
||||
{
|
||||
float dist=Dist2(ViewPos.X, ViewPos.Y, x,y);
|
||||
|
||||
if (!Colormap.FadeColor.a) Colormap.FadeColor.a=clamp<int>(255-lightlevel,60,255);
|
||||
int fogd = gl_GetFogDensity(lightlevel, Colormap.FadeColor, Colormap.fogdensity);
|
||||
|
||||
// this value was determined by trial and error and is scale dependent!
|
||||
float factor=0.05f+exp(-Colormap.FadeColor.a*dist/62500.f);
|
||||
float factor = 0.05f + exp(-fogd*dist / 62500.f);
|
||||
fuzzalpha*=factor;
|
||||
minalpha*=factor;
|
||||
}
|
||||
|
@ -387,6 +386,7 @@ void GLSprite::Draw(int pass)
|
|||
|
||||
FColormap thiscm;
|
||||
thiscm.FadeColor = Colormap.FadeColor;
|
||||
thiscm.fogdensity = Colormap.fogdensity;
|
||||
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
||||
if (glset.nocoloredspritelighting)
|
||||
{
|
||||
|
|
|
@ -357,13 +357,30 @@ static FFlagDef MoreFlagDefs[] =
|
|||
DEFINE_DUMMY_FLAG(FASTER, true), // obsolete, replaced by 'Fast' state flag
|
||||
DEFINE_DUMMY_FLAG(FASTMELEE, true), // obsolete, replaced by 'Fast' state flag
|
||||
|
||||
// Deprecated name as an alias
|
||||
DEFINE_FLAG2_DEPRECATED(MF4_DONTHARMCLASS, DONTHURTSPECIES, AActor, flags4),
|
||||
|
||||
// Various Skulltag flags that are quite irrelevant to ZDoom
|
||||
DEFINE_DUMMY_FLAG(NONETID, false), // netcode-based
|
||||
DEFINE_DUMMY_FLAG(ALLOWCLIENTSPAWN, false), // netcode-based
|
||||
DEFINE_DUMMY_FLAG(CLIENTSIDEONLY, false), // netcode-based
|
||||
DEFINE_DUMMY_FLAG(SERVERSIDEONLY, false), // netcode-based
|
||||
DEFINE_DUMMY_FLAG(EXPLODEONDEATH, true), // seems useless
|
||||
DEFINE_FLAG2_DEPRECATED(MF4_DONTHARMCLASS, DONTHURTSPECIES, AActor, flags4), // Deprecated name as an alias
|
||||
// [BC] New DECORATE flag defines here.
|
||||
DEFINE_DUMMY_FLAG(BLUETEAM, false),
|
||||
DEFINE_DUMMY_FLAG(REDTEAM, false),
|
||||
DEFINE_DUMMY_FLAG(USESPECIAL, false),
|
||||
DEFINE_DUMMY_FLAG(BASEHEALTH, false),
|
||||
DEFINE_DUMMY_FLAG(SUPERHEALTH, false),
|
||||
DEFINE_DUMMY_FLAG(BASEARMOR, false),
|
||||
DEFINE_DUMMY_FLAG(SUPERARMOR, false),
|
||||
DEFINE_DUMMY_FLAG(SCOREPILLAR, false),
|
||||
DEFINE_DUMMY_FLAG(NODE, false),
|
||||
DEFINE_DUMMY_FLAG(USESTBOUNCESOUND, false),
|
||||
DEFINE_DUMMY_FLAG(EXPLODEONDEATH, true),
|
||||
DEFINE_DUMMY_FLAG(DONTIDENTIFYTARGET, false), // [CK]
|
||||
|
||||
// Skulltag netcode-based flags.
|
||||
// [BB] New DECORATE network related flag defines here.
|
||||
DEFINE_DUMMY_FLAG(NONETID, false),
|
||||
DEFINE_DUMMY_FLAG(ALLOWCLIENTSPAWN, false),
|
||||
DEFINE_DUMMY_FLAG(CLIENTSIDEONLY, false),
|
||||
DEFINE_DUMMY_FLAG(SERVERSIDEONLY, false),
|
||||
};
|
||||
|
||||
static FFlagDef InventoryFlagDefs[] =
|
||||
|
@ -391,6 +408,8 @@ static FFlagDef InventoryFlagDefs[] =
|
|||
DEFINE_FLAG(IF, TRANSFER, AInventory, ItemFlags),
|
||||
DEFINE_FLAG(IF, NOTELEPORTFREEZE, AInventory, ItemFlags),
|
||||
|
||||
DEFINE_DUMMY_FLAG(FORCERESPAWNINSURVIVAL, false),
|
||||
|
||||
DEFINE_DEPRECATED_FLAG(PICKUPFLASH),
|
||||
DEFINE_DEPRECATED_FLAG(INTERHUBSTRIP),
|
||||
};
|
||||
|
|
|
@ -414,15 +414,7 @@ void ParseScripts()
|
|||
while ((lump = Wads.FindLump("ZSCRIPT", &lastlump)) != -1)
|
||||
{
|
||||
DoParse(lump);
|
||||
if (!Args->CheckParm("-zscript"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Printf(TEXTCOLOR_PURPLE "WARNING!!!\n");
|
||||
Printf(TEXTCOLOR_PURPLE "As of this version, Zscript is still considered a feature in development which can change " TEXTCOLOR_RED "WITHOUT WARNING!!!\n");
|
||||
Printf(TEXTCOLOR_PURPLE "Use at your own risk!\n");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -696,7 +696,7 @@ void FString::StripRight ()
|
|||
{
|
||||
size_t max = Len(), i;
|
||||
if (max == 0) return;
|
||||
for (i = --max; i-- > 0; )
|
||||
for (i = --max; i > 0; i--)
|
||||
{
|
||||
if (!isspace((unsigned char)Chars[i]))
|
||||
break;
|
||||
|
@ -728,12 +728,12 @@ void FString::StripRight (const char *charset)
|
|||
{
|
||||
size_t max = Len(), i;
|
||||
if (max == 0) return;
|
||||
for (i = --max; i-- > 0; )
|
||||
for (i = --max; i > 0; i--)
|
||||
{
|
||||
if (!strchr (charset, Chars[i]))
|
||||
break;
|
||||
}
|
||||
if (i == max)
|
||||
if (i == max-1)
|
||||
{ // Nothing to strip.
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ class ScriptedMarine : Actor
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
void A_M_Refire (bool ignoremissile, statelabel jumpto = null)
|
||||
void A_M_Refire (bool ignoremissile = false, statelabel jumpto = null)
|
||||
{
|
||||
if (target == null || target.health <= 0)
|
||||
{
|
||||
|
|
2181
wadsrc_bm/static/filter/doom.doom2/gldefs.bm
Normal file
2181
wadsrc_bm/static/filter/doom.doom2/gldefs.bm
Normal file
File diff suppressed because it is too large
Load diff
|
@ -354,8 +354,8 @@ object TechLamp
|
|||
flickerlight2 BIGREDTORCH
|
||||
{
|
||||
color 1.0 0.5 0.2
|
||||
size 64
|
||||
secondarySize 72
|
||||
size 60
|
||||
secondarySize 66
|
||||
interval 0.1
|
||||
offset 0 60 0
|
||||
}
|
||||
|
@ -369,8 +369,8 @@ object RedTorch
|
|||
flickerlight2 BIGGREENTORCH
|
||||
{
|
||||
color 0.3 1.0 0.3
|
||||
size 64
|
||||
secondarySize 72
|
||||
size 60
|
||||
secondarySize 66
|
||||
interval 0.1
|
||||
offset 0 60 0
|
||||
}
|
||||
|
@ -384,8 +384,8 @@ object GreenTorch
|
|||
flickerlight2 BIGBLUETORCH
|
||||
{
|
||||
color 0.3 0.3 1.0
|
||||
size 64
|
||||
secondarySize 72
|
||||
size 60
|
||||
secondarySize 66
|
||||
interval 0.1
|
||||
offset 0 60 0
|
||||
}
|
1258
wadsrc_lights/static/filter/doom.doom2/gldefs.txt
Normal file
1258
wadsrc_lights/static/filter/doom.doom2/gldefs.txt
Normal file
File diff suppressed because it is too large
Load diff
1132
wadsrc_lights/static/filter/doom.freedoom/gldefs.txt
Normal file
1132
wadsrc_lights/static/filter/doom.freedoom/gldefs.txt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue