Structures sizes should be mosly correct and have found by estimate
sizes that could have lump size mod equal to zero as for other formats.
Possition of fields are taken from IBSP structures, that could be
incorrect. All other fields marked as unknow/unused.
...and alter the render finding and fallback sequences to include GLES3
as the first fallback. This should have been done years ago, when GL3
became the clear better option above GL1.
SDL major versions must not be combined in one process, otherwise bad
things will happen. In the best case the game crashes, in the worst case
strange bugs will occure. To prevent that:
* Add a new field `framework_version` to the renderer API and use it to
pass the SDL major version from the renderer to client. Don't load the
renderer if it and the client were build with different SDL major
versions.
* Bump the renderer API version to 7. This could have been implemented
by assuming `framework_version == 0` (not filled by renderer) as SDL
2, but let's keep things clean and bump the version.
While here fix a long standing bug with printing the error when not
loading a renderer lib. The message must be generated before shutting
down the renderer, otherwise the API version will alsways be 0. The
struct is zeroed at renderer shutdown.
Changes are:
* SDL_SetWindowGrab() was renamed to SDL_SetWindowMouseGrab().
* SDL doesn't give precalculated battery states anymore. Use the same
scale as SDL 3.1.0, 20% is low and 1% is empty.
With SDL3 the high dpi support is in much better shape than with SDL2.
And for Wayland the experience on high dpi displays is generally better
when the application is high dpi aware.
Reimplement `SDL_BackendInit()` and `SDL_BackendShutdown()` for SDL 3.
Hide now unnecessary locking calls behind !USE_SDL3. To minimize code
duplication `SDL_Callback()` is hidden behind a wrapper function.
SDL_INIT_VIDEO includes SDL_INIT_EVENTS when initialized through
SDL_Init(), but not when shutdown to SDL_Quit(). Handle the shutdown
in the input subsystem. This closes some memory leaks in SDL.
With SDL 2 the refreshrate handling was rather limited by SDL 2 only
supporting integer refreshrates, making it impossible to represent the
common 59.95hz and other non-integer refreshrates. Quake II works around
this by assuming a refreshrate of 2hz higher than returned by SDL.
SDL 3 finally supports float refreshrates. Refactor the internal API to
also use floats.
This should be a no-op since the 'refreshrate * 1.02' logic stayes in
place for the time being. This can be reevaluated at a later time for
the SDL 3 build, but needs testing.
As a nice side effect fix the `vid_displayrefreshrate` cvar. It was
broken in both SDL 2 and 3 since it was always overwritten with the
actual display refresh rate.
In SDL 2 the first display was 0 and the error code -1. In SDL 3 this
changed to 1 as the first display and 0 for the error code. While at
it implement error handling and fallbacks for all cases.
SDL 3 has a new approach to fullscreen handling, which is way better
than the old fiddling with several window flags. In SDL 3:
* The SDL_FULLSCREEN_FLAG puts the window in fullscreen window mode.
* For exclusive fullscreen a fullscreen mode must be requested and set.
* Applying the mode to the window is asynchronous, the mode change may
occure at any later time. The window can be synchronized to force the
mode change.
This is - of course - totaly untested, since the client doesn't build
yet with SDL 3. There will likely be bugs and shortcomings.
And the code is still ugly, it can be refactored somewhat more.
Not many changes here. `make ref_gl1` now builds a library and it works
with the proof of concept port of the client.
SDL3 dropped support for hardware gamma, so `vid_gamma` will be ignored
until we can come up with something else. If we can, gamma without
shaders is hard to impossible :/
SDL3 TODOs will be marked with 'TODO SDL3:'.
This is hidden behind WITH_SDL3, which is disabled by default.
Additionally rename the SDL sources files in the client to represent the
SDL major version they are supporting. They will be forked for SDL 3.
That isn't optimal, because it forces us to support two variants of the
same code. However the changes between SDL 2 and 3 are too big to work
with #ifdef and something like function pointer magic is even more
confusing.
BraXi (2):
renders: fix BSPX lightmaps
Rename functions r_dlightframecount parameter to lightframecount
David Carlier (1):
models_md5 few memory related fixes
Denis Pauk (58):
client: add custom protocol with short model index
client: bump protocol and game version / unstable compatibility
render: sync count of images with protocol max image count
models: md5 do not copy token before use
models: md5 partial COM_Parse in ReadMD5Anim
models: md5 partial COM_Parse usage in ReadMD5Model
models: ReadMD5Anim use strtol for parse
models: ReadMD5Model get rid of sscanf usage
models: ReadMD5Model more strict validation
models: ReadMD5Anim get rid sscanf usage
models: md5 call R_CompressNormalMDL only once for vertex
soft: reuse R_LerpVerts code
soft: move R_LerpVerts upper by call stack
refresh/files: cppcheck warning clean up
gl3/gl4: fix count lightmap in mgu5m2
gl1: cppcheck fixes
models: md3/md5 show count of verts and tris
models: show number commands in model
models: md3 compress commands
models: remove static buffers for commands compress
models: prepare command compress to share logic
models: md5 rearrange glcommands generation
models: save triangles ofs/num in each mesh
soft: fix multi mesh models render
client: fix pickup message in demo
models: md5 tris compress before compress gl commands.
models: apply md3 compress tris logic
models: revert slow vect compress logic
models: md3/md5 share command generation code
models: mdl compress triangles
models: mdl support grouped frames
models: make mdl count frames detect separate function
models: mdl separate function for image load
models: mdl fix texture coordinates
models: dkm Daikatana, md2 Anachronox generate normals
models: dkm split model to meshes
models: add mdx / Kingpin models support
renders: load mdx/Kingpin models support
models: MDX mesh split by subobj value
soft: fix cppcheck warnings, remove unused isflattop
soft: fix cppcheck warning and remove unused fullscreen property
cin: support tga/jpg/png static image
models: fix md5 replacement load without md2 model
filesystem: add support of Anachronox DAT archive format
filesystem: Anachronox fix load sky
filesystem: support longer path in archives (up to 128)
client: add xatrix demo protocol check
Add windows 32bit build releases
small build clean up
Add readme note about SiN maps
protocol: share configstring convert logic
server: convert config string to protocol range
server: support of load original game library
server: QII97 protocol version check unification
server: extend count of sound indexes
server: extend gun frame and index to short
soft: fix original Quake 2 map lights regression
renders: split R_BuildLightMap to two function
Feels Duck Man (4):
Added a speedometer that displays the player's speed in QU/s. Wasn't quite sure how to implement it without adding GetPlayerSpeed() to pmove.c. Unsure if there is a cleaner way to do this while keeping it inside cl_screen.c
Removed 'Speed' label for speedometer when being displayed
Added an option to draw speed under the crosshair with cl_showspeed 2, fixed drawing the speedometer when the game wasn't playing.
Added documentation for 'cl_showspeed' in 040_cvarlist.md
Guilherme Nemeth (1):
berserker: slam attack, running club attack
Sajt (1):
models: add gl command compress code from qwalk
apartfromtime (3):
Texture filtering option
Texture filtering options for OpenGL and Software video modes
Fix software dithering