updated the changelog and version

include git.h only from a single file
This commit is contained in:
myT 2023-11-11 01:21:33 +01:00
parent e52f482a4b
commit 8587c34719
9 changed files with 101 additions and 11 deletions

View file

@ -2,6 +2,82 @@
See the end of this file for known issues. See the end of this file for known issues.
DD Mmm YY - 1.54
add: togglegui and toggleguiinput to toggle (the mouse input of) the built-in GUI system
add: key binds starting with "keycatchgui" always take precedence over everything else
they will work in the main menu, the demo player in protected mode, when the console is down, ...
here's how you would bind keys to access the new built-in GUI:
bind F1 "keycatchgui;togglegui"
bind F2 "keycatchgui;toggleguiinput"
add: r_guiFont <0 to 2> (default: 0) sets the GUI's font
0 - Proggy Clean (13px)
1 - Sweet16 Mono (16px)
2 - custom font file (see r_guiFontFile and r_guiFontHeight)
note that the custom font can only get loaded at client start-up
add: r_guiFontFile <string> (default: "") is the file path to the custom .ttf font file
add: r_guiFontHeight <7 to 48> (default: 24) is the custom font's height
add: r_gpuPreference <0 to 2> (default: 0) sets the GPU selection preference
0 - high performance (discrete graphics)
1 - low power (integrated graphics)
2 - none
add: r_sleepThreshold <2000 to 4000> (default: 2500) is the frame sleep time cushion, in microseconds
it's a trade-off between frame time consistency and CPU usage
set to 2000 if you have a struggling old/low-power CPU
2500 should be enough to deal with delayed thread wake-ups
use the frame graph to confirm that higher values help on your system
add: r_smaa <0 to 4> (default: 0) enables enhanced sub-pixel morphological anti-aliasing
0 - no SMAA
1 - low quality
2 - medium quality
3 - high quality
4 - ultra quality
add: r_shadingRate <0 to 6> (default: 0) sets the variable-rate shading (VRS) mode
0 - 1x1 (VRS off)
1 - 2x1 (base mode)
2 - 1x2 (base mode)
3 - 2x2 (base mode)
4 - 4x2 (extended mode)
5 - 2x4 (extended mode)
6 - 4x4 (extended mode)
the numbers are the horizontal and vertical subsampling factors
1x1 is forced for the sky, nopicmipped sprites (e.g. simple items)
and nopicmipped alpha tested surfaces (e.g. grates)
if extended modes are not supported, 2x2 is used instead
prefer horizontal subsampling as many maps have textures with thin horizontal lines
which become an aliased mess when vertically subsampled
chg: dropped 32-bit support
chg: dropped Linux/FreeBSD client
chg: Windows support is limited to 10 and 11
chg: much improved rendering:
- removed all Direct3D 11 and OpenGL code
- rendering with Direct3D 12 (improved performance and better worst case input latency)
- much improved input latency when V-Sync is enabled
- improved frame-time consistency
- surfaces are sorted and rendered more efficiently
- fog handling has been completely overhauled (faster, simpler, decoupled from surfaces)
- MSAA and alpha-to-coverage have been removed
- added SMAA for anti-aliasing (gamma-corrected and not applied to UI for best results)
chg: removed cl_drawMouseLag, r_backend, r_frameSleep, r_gpuMipGen, r_alphaToCoverage, r_alphaToCoverageMipBoost
removed r_d3d11_syncOffsets, r_d3d11_presentMode, r_gl3_geoStream, r_ignoreGLErrors, r_finish, r_khr_debug
removed r_verbose, r_customaspect, r_speeds, r_msaa
replaced r_swapInterval with r_vsync <0|1> (default: 0) to enable V-Sync
replaced r_textureMode with r_lego <0|1> (default: 0) to enable nearest-neighbor texture filtering
30 Oct 23 - 1.53 30 Oct 23 - 1.53
add: /registerdemos adds Windows file associations for demo files (.dm_68 .dm_67 .dm_66) add: /registerdemos adds Windows file associations for demo files (.dm_68 .dm_67 .dm_66)

View file

@ -793,11 +793,11 @@ static void Con_DrawSolidConsole( float frac )
Con_FillRect( 0, y, cls.glconfig.vidWidth, 2, colBorder ); Con_FillRect( 0, y, cls.glconfig.vidWidth, 2, colBorder );
re.SetColor( colText ); re.SetColor( colText );
i = sizeof( Q3_VERSION )/sizeof(char) - 1; i = strlen( com_cnq3VersionWithHash );
x = cls.glconfig.vidWidth - SMALLCHAR_WIDTH; x = cls.glconfig.vidWidth - SMALLCHAR_WIDTH;
while (--i >= 0) { while (--i >= 0) {
x -= SMALLCHAR_WIDTH; x -= SMALLCHAR_WIDTH;
SCR_DrawChar( x, scanlines - (SMALLCHAR_HEIGHT * 1.5), SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, Q3_VERSION[i] ); SCR_DrawChar( x, scanlines - (SMALLCHAR_HEIGHT * 1.5), SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, com_cnq3VersionWithHash[i] );
} }
const int cw = (int)ceilf( con.cw ); const int cw = (int)ceilf( con.cw );

View file

@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "q_shared.h" #include "q_shared.h"
#include "qcommon.h" #include "qcommon.h"
#include "common_help.h" #include "common_help.h"
#include "git.h"
#include <setjmp.h> #include <setjmp.h>
#include <float.h> #include <float.h>
@ -105,6 +106,10 @@ int64_t com_nextTargetTimeUS = INT64_MIN;
static char com_errorMessage[MAXPRINTMSG]; static char com_errorMessage[MAXPRINTMSG];
const char* const com_cnq3VersionWithHash = Q3_VERSION " " GIT_COMMIT_SHORT;
const char* const com_gitBranch = GIT_BRANCH;
const char* const com_gitCommit = GIT_COMMIT;
static void Com_WriteConfigToFile( const char* filename, qbool forceWrite ); static void Com_WriteConfigToFile( const char* filename, qbool forceWrite );
static void Com_WriteConfig_f(); static void Com_WriteConfig_f();
static void Com_CompleteWriteConfig_f( int startArg, int compArg ); static void Com_CompleteWriteConfig_f( int startArg, int compArg );
@ -2301,7 +2306,7 @@ void Com_Init( char *commandLine )
Cmd_RegisterArray( com_cmds, MODULE_COMMON ); Cmd_RegisterArray( com_cmds, MODULE_COMMON );
const char* s = Q3_VERSION " " PLATFORM_STRING " " __DATE__; const char* const s = Q3_VERSION " " GIT_COMMIT_SHORT " " PLATFORM_STRING " " __DATE__;
com_version = Cvar_Get( "version", s, CVAR_ROM | CVAR_SERVERINFO ); com_version = Cvar_Get( "version", s, CVAR_ROM | CVAR_SERVERINFO );
Cvar_Get( "sys_compiler", Com_GetCompilerInfo(), CVAR_ROM ); Cvar_Get( "sys_compiler", Com_GetCompilerInfo(), CVAR_ROM );

View file

@ -21,7 +21,6 @@ along with Challenge Quake 3. If not, see <https://www.gnu.org/licenses/>.
// save and print useful data for JSON crash report files // save and print useful data for JSON crash report files
#include "crash.h" #include "crash.h"
#include "git.h"
#include "vm_local.h" #include "vm_local.h"
#include <sys/stat.h> #include <sys/stat.h>
@ -222,8 +221,8 @@ void Crash_PrintToFile(const char* engineFilePath)
#else #else
JSONW_BooleanValue("engine_dev_build", qfalse); JSONW_BooleanValue("engine_dev_build", qfalse);
#endif #endif
JSONW_StringValue("engine_git_branch", GIT_BRANCH); JSONW_StringValue("engine_git_branch", com_gitBranch);
JSONW_StringValue("engine_git_commit", GIT_COMMIT); JSONW_StringValue("engine_git_commit", com_gitCommit);
const unsigned int crc32 = CRC32_HashFile(engineFilePath); const unsigned int crc32 = CRC32_HashFile(engineFilePath);
if (crc32) if (crc32)
JSONW_HexValue("engine_crc32", crc32); JSONW_HexValue("engine_crc32", crc32);

View file

@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "q_shared.h" #include "q_shared.h"
#include "qcommon.h" #include "qcommon.h"
#include "crash.h" #include "crash.h"
#include "git.h"
#include "common_help.h" #include "common_help.h"
#include <float.h> #include <float.h>
@ -1477,8 +1476,8 @@ void Cvar_Init()
Cvar_Get( "//trap_GetValue", "700", CVAR_INIT | CVAR_ROM ); Cvar_Get( "//trap_GetValue", "700", CVAR_INIT | CVAR_ROM );
cvar_cheats = Cvar_Get( "sv_cheats", "1", CVAR_ROM | CVAR_SYSTEMINFO ); cvar_cheats = Cvar_Get( "sv_cheats", "1", CVAR_ROM | CVAR_SYSTEMINFO );
Cvar_Get( "git_branch", GIT_BRANCH, CVAR_ROM ); Cvar_Get( "git_branch", com_gitBranch, CVAR_ROM );
Cvar_Get( "git_headHash", GIT_COMMIT, CVAR_ROM ); Cvar_Get( "git_headHash", com_gitCommit, CVAR_ROM );
Cmd_RegisterArray( cl_cmds, MODULE_COMMON ); Cmd_RegisterArray( cl_cmds, MODULE_COMMON );
} }

View file

@ -26,7 +26,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// q_shared.h -- included first by ALL program modules. // q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file // A user mod should never modify this file
#define Q3_VERSION "CNQ3 1.53"
#define Q3_VERSION "CNQ3 1.54"
#define CLIENT_WINDOW_TITLE "CNQ3" #define CLIENT_WINDOW_TITLE "CNQ3"
#define CONSOLE_WINDOW_TITLE "CNQ3 Console" #define CONSOLE_WINDOW_TITLE "CNQ3 Console"

View file

@ -940,6 +940,11 @@ extern qbool com_errorEntered;
extern fileHandle_t com_journalDataFile; extern fileHandle_t com_journalDataFile;
// use these variables instead of including git.h to avoid triggering rebuilds
extern const char* const com_cnq3VersionWithHash;
extern const char* const com_gitBranch;
extern const char* const com_gitCommit;
typedef enum { typedef enum {
TAG_FREE, TAG_FREE,
TAG_GENERAL, TAG_GENERAL,

View file

@ -2,8 +2,11 @@
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse HEAD`) DO ( FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse HEAD`) DO (
SET GIT_COMMIT_HASH=%%F SET GIT_COMMIT_HASH=%%F
) )
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --short HEAD`) DO (
SET GIT_COMMIT_HASH_SHORT=%%F
)
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --abbrev-ref HEAD`) DO ( FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --abbrev-ref HEAD`) DO (
SET GIT_BRANCH_NAME=%%F SET GIT_BRANCH_NAME=%%F
) )
:: We create the file in one go to avoid doubled lines in multi-threaded builds. :: We create the file in one go to avoid doubled lines in multi-threaded builds.
(echo #define GIT_COMMIT ^"%GIT_COMMIT_HASH%^" && echo #define GIT_BRANCH ^"%GIT_BRANCH_NAME%^")>%1 (echo #define GIT_COMMIT ^"%GIT_COMMIT_HASH%^" && echo #define GIT_COMMIT_SHORT ^"%GIT_COMMIT_HASH_SHORT%^" && echo #define GIT_BRANCH ^"%GIT_BRANCH_NAME%^")>%1

View file

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
COMMIT="$(git rev-parse HEAD)" COMMIT="$(git rev-parse HEAD)"
COMMIT_SHORT="$(git rev-parse --short HEAD)"
BRANCH="$(git rev-parse --abbrev-ref HEAD)" BRANCH="$(git rev-parse --abbrev-ref HEAD)"
echo "#define GIT_COMMIT \"${COMMIT}\"" > $1 echo "#define GIT_COMMIT \"${COMMIT}\"" > $1
echo "#define GIT_COMMIT_SHORT \"${COMMIT_SHORT}\"" >> $1
echo "#define GIT_BRANCH \"${BRANCH}\"" >> $1 echo "#define GIT_BRANCH \"${BRANCH}\"" >> $1