Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUKE some unused RF_/RDF_ stuff and MAX_DLIGHTS #1524

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions src/engine/renderer/tr_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,8 @@ void R_AddMDVSurfaces( trRefEntity_t *ent )
personalModel = ( ent->e.renderfx & RF_THIRD_PERSON ) &&
tr.viewParms.portalLevel == 0;

if ( ent->e.renderfx & RF_WRAP_FRAMES )
{
ent->e.frame %= tr.currentModel->mdv[ 0 ]->numFrames;
ent->e.oldframe %= tr.currentModel->mdv[ 0 ]->numFrames;
}

// compute LOD
if ( ent->e.renderfx & RF_FORCENOLOD )
{
lod = 0;
}
else
{
lod = R_ComputeLOD( ent );
}
lod = R_ComputeLOD( ent );

// Validate the frames so there is no chance of a crash.
// This will write directly into the entity structure, so
Expand Down
19 changes: 5 additions & 14 deletions src/engine/renderer/tr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ using bool8_t = uint8_t;
#define MAX_WEIGHTS 4 // GPU vertex skinning limit, never change this without rewriting many GLSL shaders
// XreaL END

#define MAX_DLIGHTS 32 // can't be increased, because bit flags are used on surfaces
#define MAX_ENTITIES MAX_REF_ENTITIES // RB: for compatibility

// renderfx flags
Expand All @@ -66,26 +65,18 @@ using bool8_t = uint8_t;
// for lighting. This allows entities to sink into the floor
// with their origin going solid, and allows all parts of a
// player to get the same lighting
#define RF_WRAP_FRAMES 0x000080 // mod the model frames by the maxframes to allow continuous
// animation without needing to know the frame count
#define RF_FORCENOLOD 0x000400
#define RF_SWAPCULL 0x000800 // swap CT_FRONT_SIDED and CT_BACK_SIDED
#define RF_SWAPCULL 0x000040 // swap CT_FRONT_SIDED and CT_BACK_SIDED

// refdef flags
#define RDF_NOWORLDMODEL ( 1 << 0 ) // used for player configuration screen
#define RDF_NOSHADOWS ( 1 << 1 ) // force renderer to use faster lighting only path
#define RDF_HYPERSPACE ( 1 << 2 ) // teleportation effect
#define RDF_HYPERSPACE ( 1 << 1 ) // teleportation effect

// Rafael
#define RDF_SKYBOXPORTAL ( 1 << 3 )

//----(SA)
#define RDF_UNDERWATER ( 1 << 4 ) // so the renderer knows to use underwater fog when the player is underwater
#define RDF_DRAWINGSKY ( 1 << 5 )
#define RDF_SKYBOXPORTAL ( 1 << 2 )

// XreaL BEGIN
#define RDF_NOCUBEMAP ( 1 << 7 ) // RB: don't use cubemaps
#define RDF_NOBLOOM ( 1 << 8 ) // RB: disable bloom. useful for HUD models
#define RDF_NOCUBEMAP ( 1 << 3 ) // RB: don't use cubemaps
#define RDF_NOBLOOM ( 1 << 4 ) // RB: disable bloom. useful for HUD models
// XreaL END

#define MAX_ALTSHADERS 64 // alternative shaders ('when <condition> <shader>') – selection controlled from cgame
Expand Down
Loading