Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ec-/Quake3e
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomenor committed Jan 7, 2025
2 parents 11896c9 + f5b387e commit 604e604
Show file tree
Hide file tree
Showing 27 changed files with 467 additions and 397 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=1 USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin USE_SDL=1 USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'release'
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip in Release builds
run: |
make ${{ matrix.rule }} -j 8 ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl
make ${{ matrix.rule }} -j$(nproc) ARCH=${{ matrix.arch }} CC=${{ matrix.cc }} DESTDIR=bin ${{ matrix.use_sdl }} USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl
- uses: actions/upload-artifact@v4
if: matrix.cc == 'gcc' && matrix.btype == 'release'
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Build
if: ${{ github.event_name != 'release' || matrix.btype != 'Debug' }} # skip Debug configuration in Release build
run: |
make ${{ matrix.rule }} -j 4 CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl STRIP=echo
make ${{ matrix.rule }} -j$(sysctl -n hw.logicalcpu) CC=${{ matrix.cc }} DESTDIR=bin INSTALL=ginstall USE_RENDERER_DLOPEN=1 RENDERER_DEFAULT=opengl STRIP=echo
- uses: actions/upload-artifact@v4
if: matrix.cc == 'clang' && matrix.btype == 'release'
Expand All @@ -228,6 +228,7 @@ jobs:
7z a -r cmod-windows-mingw-x86_64.zip ./windows-mingw-x86_64/*
7z a -r cmod-windows-msvc-arm64.zip ./windows-msvc-arm64/*
7z a -r cmod-macos-x86_64.zip ./macos-x86_64/*
7z a -r cmod-macos-aarch64.zip ./macos-aarch64/*
- name: Create latest build
uses: czietz/action-automatic-releases@latest
Expand Down
15 changes: 15 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ To compile with Vulkan backend - clean solution, right click on `quake3e` projec

---

### windows/msys2

Install the build dependencies:

`MSYS2 MSYS`

* pacman -Syu
* pacman -S make mingw-w64-x86_64-gcc mingw-w64-i686-gcc

Use `MSYS2 MINGW32` or `MSYS2 MINGW64` depending on your target system, then copy resulting binaries from created `build` directory or use command:

`make install DESTDIR=<path_to_game_files>`

---

### windows/mingw

All build dependencies (libraries, headers) are bundled-in
Expand Down
2 changes: 1 addition & 1 deletion code/client/cl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void CL_InitInput( void ) {
cl_anglespeedkey = Cvar_Get( "cl_anglespeedkey", "1.5", 0 );
Cvar_SetDescription( cl_anglespeedkey, "Set the speed that the direction keys (not mouse) change the view angle." );

cl_maxpackets = Cvar_Get ("cl_maxpackets", "60", CVAR_ARCHIVE );
cl_maxpackets = Cvar_Get ("cl_maxpackets", "125", CVAR_ARCHIVE );
Cvar_CheckRange( cl_maxpackets, "15", "125", CV_INTEGER );
Cvar_SetDescription( cl_maxpackets, "Set how many client packets are sent to the server per second, can't exceed \\com_maxFPS." );
cl_packetdup = Cvar_Get( "cl_packetdup", "1", CVAR_ARCHIVE_ND );
Expand Down
9 changes: 6 additions & 3 deletions code/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static void CL_CompleteRecordName(const char *args, int argNum )
{
char demoExt[ 16 ];

Com_sprintf( demoExt, sizeof( demoExt ), ".%s%d", DEMOEXT, com_protocol->integer );
Com_sprintf( demoExt, sizeof( demoExt ), "." DEMOEXT "%d", com_protocol->integer );
Field_CompleteFilename( "demos", demoExt, qtrue, FS_MATCH_EXTERN | FS_MATCH_STICK );
}
}
Expand Down Expand Up @@ -900,7 +900,7 @@ static void CL_CompleteDemoName(const char *args, int argNum )
if ( argNum == 2 )
{
FS_SetFilenameCallback( CL_DemoNameCallback_f );
Field_CompleteFilename( "demos", "." DEMOEXT "??", qfalse, FS_MATCH_ANY | FS_MATCH_STICK );
Field_CompleteFilename( "demos", "." DEMOEXT "??", qfalse, FS_MATCH_ANY | FS_MATCH_STICK | FS_MATCH_SUBDIRS );
FS_SetFilenameCallback( NULL );
}
}
Expand Down Expand Up @@ -4149,9 +4149,12 @@ static void CL_InitGLimp_Cvars( void )
r_mode = Cvar_Get( "r_mode", "-2", CVAR_ARCHIVE | CVAR_LATCH );
Cvar_CheckRange( r_mode, "-2", va( "%i", s_numVidModes-1 ), CV_INTEGER );
Cvar_SetDescription( r_mode, "Set video mode:\n -2 - use current desktop resolution\n -1 - use \\r_customWidth and \\r_customHeight\n 0..N - enter \\modelist for details" );
#ifdef _DEBUG
r_modeFullscreen = Cvar_Get( "r_modeFullscreen", "", CVAR_ARCHIVE | CVAR_LATCH );
#else
r_modeFullscreen = Cvar_Get( "r_modeFullscreen", "-2", CVAR_ARCHIVE | CVAR_LATCH );
#endif
Cvar_SetDescription( r_modeFullscreen, "Dedicated fullscreen mode, set to \"\" to use \\r_mode in all cases." );

r_fullscreen = Cvar_Get( "r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH );
Cvar_SetDescription( r_fullscreen, "Fullscreen mode. Set to 0 for windowed mode." );
r_customPixelAspect = Cvar_Get( "r_customPixelAspect", "1", CVAR_ARCHIVE_ND | CVAR_LATCH );
Expand Down
4 changes: 0 additions & 4 deletions code/client/snd_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ static void *S_CodecGetSound( const char *filename, snd_info_t *info )
}
}

#ifdef ELITEFORCE
Com_DPrintf( S_COLOR_YELLOW "WARNING: Failed to %s sound %s!\n", info ? "load" : "open", filename );
#else
Com_Printf( S_COLOR_YELLOW "WARNING: Failed to %s sound %s!\n", info ? "load" : "open", filename );
#endif

return NULL;
#endif
Expand Down
4 changes: 2 additions & 2 deletions code/client/snd_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static sfxHandle_t S_Base_RegisterSound( const char *name, qboolean compressed )

if ( sfx->soundData ) {
if ( sfx->defaultSound ) {
Com_Printf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
Com_DPrintf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
return 0;
}
return sfx - s_knownSfx;
Expand All @@ -352,7 +352,7 @@ static sfxHandle_t S_Base_RegisterSound( const char *name, qboolean compressed )
// the new entry is head anyways.
sfxHash[hash] = sfx->next;
#else
Com_Printf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
Com_DPrintf( S_COLOR_YELLOW "WARNING: could not find %s - using default\n", sfx->soundName );
#endif
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions code/filesystem/fspublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ typedef enum {
#define FS_MATCH_EXTERN LISTFLAG_DIRECT_SOURCE_ONLY
#define FS_MATCH_PK3s LISTFLAG_PK3_SOURCE_ONLY
#define FS_MATCH_STICK LISTFLAG_IGNORE_PURE_LIST
#define FS_MATCH_SUBDIRS 0 // Fixme
#define FS_MATCH_ANY 0

typedef qboolean ( *fnamecallback_f )( const char *filename, int length );
Expand Down
4 changes: 2 additions & 2 deletions code/qcommon/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,8 @@ Cmd_CompleteCfgName
==================
*/
static void Cmd_CompleteCfgName( const char *args, int argNum ) {
if( argNum == 2 ) {
Field_CompleteFilename( "", "cfg", qfalse, FS_MATCH_ANY | FS_MATCH_STICK );
if ( argNum == 2 ) {
Field_CompleteFilename( "", "cfg", qfalse, FS_MATCH_ANY | FS_MATCH_STICK | FS_MATCH_SUBDIRS );
}
}

Expand Down
19 changes: 18 additions & 1 deletion code/qcommon/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,9 @@ void Com_Init( char *commandLine ) {
const char *s;
int qport;

// get the initial time base
Sys_Milliseconds();

Com_Printf( "%s %s %s\n", SVN_VERSION, PLATFORM_STRING, __DATE__ );

if ( Q_setjmp( abortframe ) ) {
Expand Down Expand Up @@ -4229,7 +4232,8 @@ void Com_Init( char *commandLine ) {
// set com_frameTime so that if a map is started on the
// command line it will still be able to count on com_frameTime
// being random enough for a serverid
lastTime = com_frameTime = Com_Milliseconds();
// lastTime = com_frameTime = Com_Milliseconds();
Com_FrameInit();

if ( !com_errorEntered )
Sys_ShowConsole( com_viewlog->integer, qfalse );
Expand All @@ -4242,6 +4246,10 @@ void Com_Init( char *commandLine ) {
com_fullyInitialized = qtrue;

Com_Printf( "--- Common Initialization Complete ---\n" );

NET_Init();

Com_Printf( "Working directory: %s\n", Sys_Pwd() );
}


Expand Down Expand Up @@ -4436,6 +4444,15 @@ static int Com_TimeVal( int minMsec )
return timeVal;
}

/*
=================
Com_FrameInit
=================
*/
void Com_FrameInit( void )
{
lastTime = com_frameTime = Com_Milliseconds();
}

/*
=================
Expand Down
Loading

0 comments on commit 604e604

Please sign in to comment.