Commit Graph

3352 Commits

Author SHA1 Message Date
Ch40zz bc7842e301 Allow unwinding of qvmcall64 call-stub for msvc/masm
qvmcall64 has its own custom calling convention due to pushing all non-volatile registers to the stack. The game uses set/longjmp which on Windows uses "RtlUnwindEx" to unwind the callstack. qvmcall64 cannot be unwound by default due to the custom calling convention. To allow unwinding, we need to add custom SEH unwind data to the function.
2021-06-23 18:01:53 +01:00
Ch40zz 60a2000419 Fixes a crash when compiling the project on windows in 64 bit mode.
Not all non-volatile registers were actually saved and restored, leading to a few registers being trashed after calling the vm instructions.
All non-volatile registers have been added.
2021-05-20 10:12:38 +01:00
Zack Middleton 4003a5b78c Fix the number of weights in the IQM model calculation
[The fourth bone influence of each vertex was ignored. --zturtleman]

Patch by Romulo Fernandes (razor85).
2021-04-03 15:40:45 -04:00
Zack Middleton 359db19619 Restore bots crushing unseen player on q3tourney6 in non-CTF
The affect of my 2017 commit c3e64d3806

    "Make bots only use q3tourney6 crusher to kill their enemy"

made it easier to beat the last map of the Quake 3 single player
campaign. It was mainly intended for CTF and Team Arena gametypes
variants of the map. (Team deathmatch is usually treated as deathmatch
with teams rather than an actual team based gametype.)

Restore original difficulty for non-CTF/Team Arena gametypes; bot will
crush player even if bot hasn't seen the player since either they or
player respawned. [This is not good in CTF where all five bots on the
team suddenly flip around and shoot at the crusher trigger.]

Team deathmatch still uses my added behavior of not triggering crusher
if there is a teammate under the crusher.
2021-02-27 00:26:03 -05:00
Zack Middleton eacb83a244 Allow using pulseaudio for SDL audio capture
Pulseaudio audio capture didn't stop when paused on Debian 8 but works
on Debian 9 when using the same manual SDL build. So it seems to have
been an issue in pulseaudio, not SDL.
2021-02-26 23:55:12 -05:00
Tim Angus 05180e32dc Use the correct compiler for tools when cross building under cygwin 2020-12-26 21:54:58 +00:00
Tim Angus 44270f7557 Fix use of TOOLS_CC being reported as CC 2020-12-25 21:34:49 +00:00
Tim Angus b388535307 Add TOOLS_CFLAGS to build preamble 2020-12-25 20:28:40 +00:00
Thomas Köppe d1b7ab6b22 [sdl] Turn tentative definition into actual definition.
There is no need for a tentative definition in this case. By providing
an explicit initializer, the resulting definition has the same effect
as before, but is no longer tentative. This avoids easy errors
resulting from multiple tentative definitions in different translation
units. (Previous compilers permitted those common errors, but GCC 10
rejects them by default.)
2020-11-17 18:08:13 +00:00
Jack Slater e7a7a2b6b6
Merge pull request #436 from Calinou/default-texturemode-mipmap-linear
Use `r_texturemode GL_LINEAR_MIPMAP_LINEAR` by default
2020-09-29 16:56:30 -10:00
Tim Angus a0b89d72d0 Run actions on pull request too 2020-09-09 13:21:27 +01:00
Tim Angus 8e74119d0f Avoid platform sed differences 2020-09-08 13:25:50 +01:00
Tim Angus d92c7493a6 Run apt-get update before installing deps 2020-09-08 10:50:29 +01:00
Tim Angus 2ec57b3a0e Fix shader stringify 2020-09-08 10:46:18 +01:00
Tim Angus c0b15329e3 Add status badge to README 2020-08-29 21:52:06 +01:00
Tim Angus 71cfe5f442 Remove old CI system configurations 2020-08-29 21:40:57 +01:00
Tim Angus 19172e1cd2 GitHub Actions setup 2020-08-29 21:40:57 +01:00
Tim Angus 909ab13aeb Make LCC path resolution more robust 2020-08-29 21:40:57 +01:00
Tim Angus c0d797f308 Simplify glsl -> C stringification 2020-08-29 21:40:57 +01:00
Jack Slater 2b42f0bdab
Merge pull request #447 from HappyFacade/patch-1
Add C syntax highlighting to readme
2020-07-15 00:56:26 -10:00
Zachary J. Slater af66e02932 Update README.md
Added various sponsorships, I hope that hotlinking works fine!
2020-07-07 00:36:27 -10:00
Happy f1e077c532
Add C syntax highlighting to readme 2020-04-07 08:18:15 -07:00
Tom Kidd f2c61c14c4
Merge pull request #428 from tomkidd/master
Additional updates to the Xcode project
2020-02-11 16:41:56 -06:00
Tom Kidd a03cb319a2 Figured out method of referencing GLSL generated C files outside of code directory 2020-02-10 17:20:17 -06:00
r-a-sattarov daae32ddfd E2K: fixed build by MCST lcc compiler when using USE_CURL=1 option 2019-12-07 08:16:15 -05:00
Hugo Locurcio 2171d070de
Use `r_texturemode GL_LINEAR_MIPMAP_LINEAR` by default
This improves visual quality without a noticeable performance loss,
especially on maps that use textures with high-frequency details
such as q3dm1.
2019-11-20 20:55:52 +01:00
Zack Middleton a6e66700e1 Fix duplicate team join center print for bots and g_teamAutoJoin
My 2017 commit f7c3276 ("Fix g_teamAutoJoin and g_teamForceBalance")
caused BroadcastTeamChange() to be run an extra time when bots connect.
This caused a duplicate center print message to be sent to all clients.

g_teamAutoJoin 1 sent an extra center print when any player or bot
connects. Though that is the original behavior from Team Arena.

Team set during connection no longer sends broadcast as it will be
sent later in ClientConnect().

Reported by Pascal Brochart (pbrochart) as causing clients to be
kicked due to server command overflow if many bots join at the
same time.
2019-11-16 01:38:38 -06:00
Tom Kidd a545f81403 Further tweaks to Xcode project
Now works as well as possible in Xcode 11
2019-10-29 00:14:26 -05:00
Zack Middleton dc0c3e7bdf Fix team orders menu not listing clients with lower clientnums
If bots join before the local client (dedicated server) the bots would
not be listed in the Q3A team orders menu and so they could not be given
orders using the menu.

The Q3A team orders menu got local client's team while looping through
all clients. Ignoring any bots with clientnum lower than the local
client. Get local client's team before the loop so all bots are
listed.
2019-10-28 23:13:57 -05:00
Tom Kidd b340827153 Updated to latest recommended build settings, increased deployment target to 10.7
One of the settings (CLANG_ENABLE_OBJC_WEAK) doesn't like 10.6 anymore apparently.
2019-10-28 22:30:56 -05:00
Zachary J. Slater 34c0722b5e
Merge pull request #423 from tomkidd/master
Fix for macOS Catalina screen resolution issue thanks to Tom Kidd!
2019-10-26 18:16:20 -10:00
Tom Kidd c2025d94c5 Several updates to xcode project files for Xcode 11
A few more things to go
2019-10-26 22:14:14 -05:00
Tom Kidd de7123acee Fix for macOS Catalina screen resolution issue
Issue #422
2019-10-11 22:34:09 -05:00
Zack Middleton f717a8396e Fix lightning gun handling for corpses and single player podiums
The lightning trail is fired from the real non-predicted entity for
the local client so it can show the server location. The real client
entity was always used to check if a player entity is firing the
lighting gun. This potentially causes corpses and players on single
player podiums with lightning gun to render the lightning trail if
the real (living) client is firing the lightning gun.

I'm not aware of this causing any issues without modifying the game
logic. Corpses have no weapon and it's not possible to fire during
single player intermission.
2019-10-11 20:55:57 -05:00
Zachary J. Slater 4d82b8b525
Create Funding.yml
TODO: add more of these things https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository
2019-08-22 18:17:02 -10:00
Bernhard M. Wiedemann a96f32eba2 q3rcc: Allow to override build date
Allow to override __DATE__ and __TIME__ with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This behavior is what gcc already does.
2019-07-11 14:20:31 +01:00
Zack Middleton 350b8f9c7c Restore OpenGL 1.1 support (GL_CLAMP)
GL_CLAMP (clamp to border) was changed to GL_CLAMP_TO_EDGE in 2008
(f2baf359). In 2018 (ce1d5406) I made OpenGL 1.2 be required since
GL_CLAMP_TO_EDGE is used.

Restore support for GL_CLAMP in order to support OpenGL 1.1 like vanilla
Quake 3 does. This should allow using the default Microsoft Windows
GDI Generic OpenGL 1.1 driver (untested but it won't fail the version
check at least).

From gpuinfo.org, it looks like drivers stopped advertising support for
GL_SGIS_texture_edge_clamp so use a version check in addition to the
extension check.

r_allowExtensions 0 disables using GL_CLAMP_TO_EDGE in the opengl1
renderer. GL_CLAMP support wasn't added to the opengl2 renderer.
2019-05-28 22:44:57 -05:00
Zack Middleton 0fbde293db Remove erroneous newlines from Com_Error in sdl_glimp.c 2019-05-28 21:01:28 -05:00
Zack Middleton 2a2646fe43 Fix IQM quat normalize fail case
Should only happen with invalid models though.
2019-05-28 21:00:02 -05:00
Zack Middleton 95b9cab4d6 Fix warnings that IQM blendWeights may not be initialized 2019-04-29 15:01:47 -05:00
Zack Middleton d404519cce Fix rendering IQM models between model frames
For lerped frames (refEntity_t frame not equal oldframe) IQM joint
matrices may have incorrect axis scale. This can cause significant model
distortion. The matrix lerp is linear causing each vector to move in a
straight line between frames instead of arcing like a circle. Each joint
frame can have a different scale so can't just normalize the joint
matrix.

Store joints as quaternions and spherical lerp between them and then
convert to a matrix. For my test model, setting up the skeleton is four
times slower now but it still seems to be fast enough to be usable.
2019-04-29 15:01:47 -05:00
Zack Middleton d13d06424e OpenGL2: Disable r_cubeMapping if not OpenGL 3.0+
r_cubeMapping requires textureCubeLod() which is only in OpenGL 3.0
(GLSL 1.30) and later. It's not in OpenGL ES 3.0 / GLSL ES 3.00.
This needs to be checked before R_InitImages() so can't just check in
GLSL_InitGPUShaders().
2019-04-16 11:48:10 -05:00
Zack Middleton 9fcb2bb336 Override video mode list in Team Arena UI
Override the video mode list in the Team Arena data files with detected
modes from SDL like in ioquake3's Q3 UI. Add the aspect ratio to the
end of the video resolution (i.e., "640x480 (4:3)"). Add the current
(custom) video mode to the list.

Before when using a custom resolution in the menu you could not change
the video mode using the mouse because the resolution text was blank.
Now custom video resolution is displayed and can be clicked.
2019-04-16 00:02:27 -05:00
Zack Middleton c61417b8e2 Add current (custom) resolution to Q3 UI video mode list
Custom resolution is displayed when entering system options menu and
settings can be changed without being forced to change video resolution.
2019-04-15 23:50:46 -05:00
Zack Middleton 9b4dcc809e OpenGL2: Fix compiling lightall GLSL on OpenGL 2.1
textureCubeLod() requires OpenGL 3.0 / GLSL 1.30. Added in
2018-12-21 commit e5da13f146
"OpenGL2: r_cubemapping 2 for box cubemap parallax."

Report by brugal and Simon McVittie.

Bug-Debian: https://bugs.debian.org/923226
2019-04-15 23:40:32 -05:00
Ane-Jouke Schat 44b18d72ac Fix PRINT_ERROR print level missing from CL_RefPrintf
It's used for one message in the OpenGL2 renderer.
2019-04-15 23:13:36 -05:00
James Canete d068e1dce1 Add r_parallaxMapShadows. 2019-02-06 01:10:42 -08:00
James Canete e5da13f146 OpenGL2: r_cubemapping 2 for box cubemap parallax. 2018-12-21 19:53:18 -08:00
kungfooman b0d2b141e7 Add .gitignore for misc/msvc12 2018-12-14 10:00:58 +00:00
kungfooman a6df505d59 Prevent Q_IsColorString from asserting on negative ascii chars 2018-12-14 10:00:24 +00:00