Skip to content

Commit

Permalink
Heretic: Added map info flag "mif_dim_torch"
Browse files Browse the repository at this point in the history
Setting the "mif_dim_torch" flag causes the Torch artifact to be rendered like in Hexen so that the light attenuates by distance from the viewer.
  • Loading branch information
skyjake committed Jul 27, 2019
1 parent dc67959 commit b2d015e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions doomsday/apps/api/def_share.h
Expand Up @@ -118,6 +118,7 @@ typedef struct {
#define MIF_NO_INTERMISSION 0x4 ///< Skip any intermission between maps.
#define MIF_LIGHTNING 0x8 ///< Lightning is used in the map.
#define MIF_SPAWN_ALL_FIREMACES 0x10 ///< Heretic: Spawn all firemaces (disable randomness).
#define MIF_DIM_TORCH 0x20 ///< Heretic: Use the attenuated torch (not fullbright).
///@}

#define DDLT_MAX_APARAMS 10
Expand Down
Expand Up @@ -71,6 +71,7 @@ Flag { ID = "mif_sphere"; Value = 0x2; } # Draw the sky sphere even when models
Flag { ID = "mif_nointermission"; Value = 0x4; }
Flag { ID = "mif_lightning"; Value = 0x8; }
Flag { ID = "mif_spawn_all_firemaces"; Value = 0x10; }
Flag { ID = "mif_dim_torch"; Value = 0x20; }

# Sky Info
Flag { ID = "sif_sphere"; Value = 0x1; } # Draw the sky sphere even when models are in use.
Expand Down
5 changes: 5 additions & 0 deletions doomsday/apps/plugins/common/src/world/p_mapsetup.cpp
Expand Up @@ -990,6 +990,11 @@ void P_FinalizeMapChange(uri_s const *mapUri_)
#endif
#if __JHERETIC__
P_TurnGizmosAwayFromDoors();

// Torch rendering mode for the map. By default (vanilla), Heretic has a
// fullbright torch.
DD_SetInteger(DD_FIXEDCOLORMAP_ATTENUATE,
(gfw_Session()->mapInfo().geti("flags") & MIF_DIM_TORCH) != 0);
#endif
}

Expand Down

0 comments on commit b2d015e

Please sign in to comment.