mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- Nash's force fake contrast submission.
This commit is contained in:
parent
14d7b8b777
commit
4f383e5aa7
4 changed files with 27 additions and 1 deletions
|
@ -1287,6 +1287,7 @@ void G_InitLevelLocals ()
|
||||||
level.teamdamage = teamdamage;
|
level.teamdamage = teamdamage;
|
||||||
level.flags = 0;
|
level.flags = 0;
|
||||||
level.flags2 = 0;
|
level.flags2 = 0;
|
||||||
|
level.flags3 = 0;
|
||||||
|
|
||||||
info = FindLevelInfo (level.MapName);
|
info = FindLevelInfo (level.MapName);
|
||||||
|
|
||||||
|
@ -1340,6 +1341,7 @@ void G_InitLevelLocals ()
|
||||||
level.clusterflags = clus ? clus->flags : 0;
|
level.clusterflags = clus ? clus->flags : 0;
|
||||||
level.flags |= info->flags;
|
level.flags |= info->flags;
|
||||||
level.flags2 |= info->flags2;
|
level.flags2 |= info->flags2;
|
||||||
|
level.flags3 |= info->flags3;
|
||||||
level.levelnum = info->levelnum;
|
level.levelnum = info->levelnum;
|
||||||
level.Music = info->Music;
|
level.Music = info->Music;
|
||||||
level.musicorder = info->musicorder;
|
level.musicorder = info->musicorder;
|
||||||
|
|
|
@ -216,6 +216,9 @@ enum ELevelFlags
|
||||||
LEVEL2_ENDGAME = 0x20000000, // This is an epilogue level that cannot be quit.
|
LEVEL2_ENDGAME = 0x20000000, // This is an epilogue level that cannot be quit.
|
||||||
LEVEL2_NOAUTOSAVEHINT = 0x40000000, // tell the game that an autosave for this level does not need to be kept
|
LEVEL2_NOAUTOSAVEHINT = 0x40000000, // tell the game that an autosave for this level does not need to be kept
|
||||||
LEVEL2_FORGETSTATE = 0x80000000, // forget this map's state in a hub
|
LEVEL2_FORGETSTATE = 0x80000000, // forget this map's state in a hub
|
||||||
|
|
||||||
|
// More flags!
|
||||||
|
LEVEL3_FORCEFAKECONTRAST = 0x00000001, // forces fake contrast even with fog enabled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,6 +288,8 @@ struct level_info_t
|
||||||
int sucktime;
|
int sucktime;
|
||||||
DWORD flags;
|
DWORD flags;
|
||||||
DWORD flags2;
|
DWORD flags2;
|
||||||
|
DWORD flags3;
|
||||||
|
|
||||||
FString Music;
|
FString Music;
|
||||||
FString LevelName;
|
FString LevelName;
|
||||||
SBYTE WallVertLight, WallHorizLight;
|
SBYTE WallVertLight, WallHorizLight;
|
||||||
|
@ -398,6 +403,7 @@ struct FLevelLocals
|
||||||
|
|
||||||
DWORD flags;
|
DWORD flags;
|
||||||
DWORD flags2;
|
DWORD flags2;
|
||||||
|
DWORD flags3;
|
||||||
|
|
||||||
DWORD fadeto; // The color the palette fades to (usually black)
|
DWORD fadeto; // The color the palette fades to (usually black)
|
||||||
DWORD outsidefog; // The fog for sectors with sky ceilings
|
DWORD outsidefog; // The fog for sectors with sky ceilings
|
||||||
|
|
|
@ -1190,6 +1190,9 @@ enum EMIType
|
||||||
MITYPE_SETFLAG2,
|
MITYPE_SETFLAG2,
|
||||||
MITYPE_CLRFLAG2,
|
MITYPE_CLRFLAG2,
|
||||||
MITYPE_SCFLAGS2,
|
MITYPE_SCFLAGS2,
|
||||||
|
MITYPE_SETFLAG3,
|
||||||
|
MITYPE_CLRFLAG3,
|
||||||
|
MITYPE_SCFLAGS3,
|
||||||
MITYPE_COMPATFLAG,
|
MITYPE_COMPATFLAG,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1275,6 +1278,7 @@ MapFlagHandlers[] =
|
||||||
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
|
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
|
||||||
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
||||||
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 0 },
|
{ "spawnwithweaponraised", MITYPE_SETFLAG2, LEVEL2_PRERAISEWEAPON, 0 },
|
||||||
|
{ "forcefakecontrast", MITYPE_SETFLAG3, LEVEL3_FORCEFAKECONTRAST, 0 },
|
||||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||||
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
{ "compat_stairs", MITYPE_COMPATFLAG, COMPATF_STAIRINDEX, 0 },
|
||||||
|
@ -1372,6 +1376,20 @@ void FMapInfoParser::ParseMapDefinition(level_info_t &info)
|
||||||
info.flags2 = (info.flags2 & handler->data2) | handler->data1;
|
info.flags2 = (info.flags2 & handler->data2) | handler->data1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MITYPE_SETFLAG3:
|
||||||
|
info.flags3 |= handler->data1;
|
||||||
|
info.flags3 |= handler->data2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MITYPE_CLRFLAG3:
|
||||||
|
info.flags3 &= ~handler->data1;
|
||||||
|
info.flags3 |= handler->data2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MITYPE_SCFLAGS3:
|
||||||
|
info.flags3 = (info.flags3 & handler->data2) | handler->data1;
|
||||||
|
break;
|
||||||
|
|
||||||
case MITYPE_COMPATFLAG:
|
case MITYPE_COMPATFLAG:
|
||||||
{
|
{
|
||||||
int set = 1;
|
int set = 1;
|
||||||
|
|
|
@ -965,7 +965,7 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool noabsolute, int *pfak
|
||||||
*pfakecontrast = 0;
|
*pfakecontrast = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foggy) // Don't do relative lighting in foggy sectors
|
if (!foggy || level.flags3 & LEVEL3_FORCEFAKECONTRAST) // Don't do relative lighting in foggy sectors
|
||||||
{
|
{
|
||||||
if (!(Flags & WALLF_NOFAKECONTRAST) && r_fakecontrast != 0)
|
if (!(Flags & WALLF_NOFAKECONTRAST) && r_fakecontrast != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue