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

Sync few engine headers #211

Merged
merged 3 commits into from
May 29, 2024
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
2 changes: 1 addition & 1 deletion client/parsemsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "utils.h"
#include "gl_local.h"
#include "pm_movevars.h"
#include "xash3d_features.h"
#include "enginefeatures.h"

static byte *gpBuf;
static const char *gpszName;
Expand Down
2 changes: 1 addition & 1 deletion client/render/gl_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ GNU General Public License for more details.
#include "cl_dlight.h"
#include "cl_entity.h"
#include "texture_handle.h"
#include "xash3d_features.h"
#include "enginefeatures.h"
#include <utlarray.h>
#include "vector.h"
#include <matrix.h>
Expand Down
2 changes: 1 addition & 1 deletion client/render/r_weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GNU General Public License for more details.
#include "triangleapi.h"
#include "custom_alloc.h"
#include "parsemsg.h"
#include "xash3d_features.h"
#include "enginefeatures.h"
#include "r_weather.h"
#include "gl_local.h"
#include "gl_debug.h"
Expand Down
18 changes: 11 additions & 7 deletions common/cvardef.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
Expand All @@ -25,14 +25,18 @@
#define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
#define FCVAR_UNLOGGED (1<<8) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
#define FCVAR_NOEXTRAWHITEPACE (1<<9) // strip trailing/leading white space from this cvar
#define FCVAR_PRIVILEGED (1<<10) // only available in privileged mode
#define FCVAR_FILTERABLE (1<<11) // filtered in unprivileged mode if cl_filterstuffcmd is 1

#define FCVAR_MOVEVARS (1<<10) // this cvar is a part of movevars_t struct that shared between client and server
#define FCVAR_LATCH (1<<11) // notify client what this cvar will be applied only after server restart (but don't does more nothing)
#define FCVAR_GLCONFIG (1<<12) // write it into opengl.cfg
// Xash3D extensions
#define FCVAR_GLCONFIG (1<<12) // write it into <renderer>.cfg(see RefAPI)
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
#define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled


// a1ba: let's reuse higher bits for flags extensions from now on
#define FCVAR_LATCH (1<<30) // notify client what this cvar will be applied only after server restart (but don't does more nothing)

typedef struct cvar_s
{
char *name;
Expand Down
15 changes: 15 additions & 0 deletions common/xash3d_features.h → common/enginefeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,19 @@ GNU General Public License for more details.
#define ENGINE_COMPUTE_STUDIO_LERP (1<<7) // enable MOVETYPE_STEP lerping back in engine
#define ENGINE_LINEAR_GAMMA_SPACE (1<<8) // disable influence of gamma/brightness cvars to textures/lightmaps, for mods with custom renderer

#define ENGINE_STEP_POSHISTORY_LERP (1U<<31) // enable MOVETYPE_STEP interpolation based on position history. Incompatible with ENGINE_COMPUTE_STUDIO_LERP!

// adjust the mask when features will be added or removed
#define ENGINE_FEATURES_MASK \
( ENGINE_WRITE_LARGE_COORD \
| ENGINE_QUAKE_COMPATIBLE \
| ENGINE_LOAD_DELUXEDATA \
| ENGINE_PHYSICS_PUSHER_EXT \
| ENGINE_LARGE_LIGHTMAPS \
| ENGINE_COMPENSATE_QUAKE_BUG \
| ENGINE_IMPROVED_LINETRACE \
| ENGINE_COMPUTE_STUDIO_LERP \
| ENGINE_LINEAR_GAMMA_SPACE \
| ENGINE_STEP_POSHISTORY_LERP )

#endif//FEATURES_H
6 changes: 4 additions & 2 deletions common/render_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef enum
TF_KEEP_SOURCE = (1<<1), // some images keep source
TF_NOFLIP_TGA = (1<<2), // Steam background completely ignore tga attribute 0x20
TF_EXPAND_SOURCE = (1<<3), // Don't keep source as 8-bit expand to RGBA
TF_ALLOW_EMBOSS = (1<<4), // Allow emboss-mapping for this image
// reserved
TF_RECTANGLE = (1<<5), // this is GL_TEXTURE_RECTANGLE
TF_CUBEMAP = (1<<6), // it's cubemap texture
TF_DEPTHMAP = (1<<7), // custom texture filter used
Expand All @@ -112,7 +112,8 @@ typedef enum
TF_ARB_FLOAT = (1<<26), // float textures
TF_NOCOMPARE = (1<<27), // disable comparing for depth textures
TF_ARB_16BIT = (1<<28), // keep image as 16-bit (not 24)
TF_MULTISAMPLE = (1<<29), // multisample texture
TF_MULTISAMPLE = (1<<29), // multisampling texture
TF_ALLOW_NEAREST = (1<<30), // allows toggling nearest filtering for TF_NOMIPMAP textures
} texFlags_t;

typedef enum
Expand Down Expand Up @@ -280,4 +281,5 @@ typedef struct render_interface_s
// shuffle previous & next states for lerping
void (*CL_UpdateLatchedVars)( struct cl_entity_s *e, qboolean reset );
} render_interface_t;

#endif//RENDER_API_H
2 changes: 1 addition & 1 deletion server/physic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GNU General Public License for more details.
#include "com_model.h"
#include "studio.h"
#include "movelist.h"
#include "xash3d_features.h"
#include "enginefeatures.h"
#include "render_api.h"
#include "physic.h"
#include "triangleapi.h"
Expand Down
Loading