Denis Pauk
e7dc4f3b2c
menu: Fix default NULL
2024-06-11 23:28:50 +03:00
Denis Pauk
28aeb68826
menu: show weapon in player model preview
2024-06-08 23:36:57 +03:00
Denis Pauk
8fd8c2b546
menu: support long player skin name
2024-06-08 23:21:00 +03:00
Denis Pauk
1775874418
Merge remote-tracking branch 'yquake2/master'
2024-06-08 22:47:14 +03:00
Yamagi
41e9b46358
Merge pull request #1110 from protocultor/gyro_tightening
...
Gyro tightening
2024-06-08 19:09:53 +02:00
Jaime Moreira
c842ab806f
Remove fruitless glBindTexture() calls
...
...when there are no SURF_DRAWTURB surfaces to draw.
2024-06-06 18:23:26 -04:00
Jaime Moreira
5b44620c0e
Correct OpenGL boolean flags.
2024-06-05 23:17:52 +03:00
Denis Pauk
d3bf7368c4
models: add models normal fix
...
If model has only zero notmal, update model with normal recalculate.
2024-06-05 22:59:54 +03:00
Denis Pauk
ec8b792a4b
renders: use three bytes for save model normal
2024-06-04 23:47:48 +03:00
Jaime Moreira
24b03b61f8
Gyro tightening
...
A practical way to avoid a noisy gyro signal, or shaky hands.
Unlike a deadzone, inputs below the threshold are "squeezed towards
zero", so they are not completely ignored. Source:
http://gyrowiki.jibbsmart.com/blog:good-gyro-controls-part-1:the-gyro-is-a-mouse#toc9
2024-06-04 15:48:42 -04:00
Jaime Moreira
0e63bad7d9
Sliders and gamepad buttons refactor
...
Same logic with less code.
2024-06-04 15:18:37 -04:00
Jaime Moreira
d2b0ebd522
Correct OpenGL boolean flags.
2024-06-04 15:10:41 -04:00
Jaime Moreira
6869d7dddd
GL1 multitexture combine removed
...
Applied too many OpenGL calls for an effect that could not be told
apart from normal GL_MODULATE; explains its absence from Q3A code.
Also, removed calls to glPixelStorei when no dynamic lights present.
2024-06-04 14:59:05 -04:00
Jaime Moreira
c68ffec274
GL1 multitexture bugfix
...
With "hand 2" and no "alias" models in player sight, sometimes only
lightmap was visible. Now forcing disabled multitexture when needed.
Another bugfix: "gl_showbbox 1" no longer produces OpenGL errors.
2024-06-04 14:53:25 -04:00
Denis Pauk
88bb466f1e
renders: use dot product of shadevector and normal directly
2024-06-04 20:01:23 +03:00
Denis Pauk
a9219192e0
menu: show player weapon model in preview
2024-06-01 16:18:42 +03:00
Denis Pauk
acea97c16f
menu: fix cppcheck warnings
2024-06-01 13:47:58 +03:00
Denis Pauk
36242bd254
menu: extend player model and skin name to MAX_QPATH
2024-06-01 13:00:11 +03:00
starfrost013
e160691fec
Fix potential memory corruption issue where cl_numparticles is 0 and CL_ClearParticles is called.
2024-05-29 15:41:12 +01:00
Denis Pauk
7f47af1371
Version bump
2024-05-28 22:36:48 +03:00
Denis Pauk
faf86b72c5
GL1 big lightmaps and scrap
...
https://github.com/yquake2/yquake2/pull/1108
Merge remote-tracking branch 'yquake2/master'
2024-05-27 08:41:53 +03:00
Denis Pauk
e00ab4ffde
game: fix save of quake monsters
2024-05-15 00:43:42 +03:00
Denis Pauk
5709e2c746
game: quake1 monsters, use defines instead frame number
2024-05-12 13:43:27 +03:00
Denis Pauk
75b05838a1
game: use defines for DOOR_ANIMATED and DOOR_ANIMATED_FAST
...
Based on:
* https://github.com/id-Software/quake2-rerelease-dll/blob/main/rerelease/g_func.cpp
2024-05-12 13:27:06 +03:00
Denis Pauk
d08500643d
maps: provide in and our lump position to convert lump function
...
Replace some of convert function to byte copy and long copy.
2024-05-12 13:27:06 +03:00
Denis Pauk
33a3aed03e
GL1 multitexture
...
Merge changes from https://github.com/yquake2/yquake2/pull/1103
Merge remote-tracking branch 'yquake2/master'
2024-05-12 12:55:53 +03:00
Denis Pauk
1eb55aa3de
renders: lightmap generation, trust caller about size of provided buffer
2024-05-12 12:04:46 +03:00
Jaime Moreira
0f307cc9c1
GL1 scrap/atlas configurable size
...
Controlled by gl1_biglightmaps cvar, works like new lightmaps.
Max size is 384x384; a bigger size is not justified.
Added a transparent border so colors from one picture don't bleed
into the next.
2024-05-11 18:20:13 -04:00
Jaime Moreira
81fd2c1027
Increased lightmap size in GL1
...
Controlled by new cvar, gl1_biglightmaps.
Size is now up to 512x512, for a max quantity of 8 lightmaps.
Should reduce rebinding of them, and reduce the number of calls
to glTexSubImage2D(), although it may increase data transfer on
each call.
2024-05-11 18:18:28 -04:00
Jaime Moreira
a8824972db
Fixed potential game crash at shutdown
...
Only happens in Windows. A cvar was being queried just after
all cvars were freed, in Qcommon_Shutdown().
GL_GENERATE_MIPMAP definition relocated.
scrap_uploads counter deleted, it wasn't being read anywhere.
2024-05-11 18:16:38 -04:00
Denis Pauk
d3239738e9
Merge commit '3faa3db1'
...
Partial merge of https://github.com/yquake2/yquake2/pull/1103
2024-05-12 00:17:49 +03:00
Yamagi
b401846ce6
Merge pull request #1103 from protocultor/gl1_multitexture
...
GL1 multitexture
2024-05-11 16:28:39 +02:00
Denis Pauk
44afb2e91b
maps: support IDBSP format without ident
2024-05-09 23:42:27 +03:00
Denis Pauk
cfd1e5f346
renders: fix parse of SiN def format
...
Some of files could have name of animation and skin, but some of files
does no have naming of action and textures. Search include file by extention
instead use name + filename format.
2024-05-08 01:42:35 +03:00
Denis Pauk
eff91e34c0
renders: check for SiN format in player models
2024-05-08 01:42:21 +03:00
Denis Pauk
9145c0a923
renders: additional validation cleanups for SiN
2024-05-08 01:41:46 +03:00
Denis Pauk
13e1df2bda
renders: inital support of SiN def/sbm/sam load
...
Added only file format support without model overwrite.
Based on https://web.archive.org/web/20001212060900/http://starbase.neosoft.com:80/~otaku/program.html
2024-05-08 01:41:14 +03:00
Denis Pauk
e463721665
maps: Use LUMP defines instead numbers in rules
2024-05-05 15:55:23 +03:00
Denis Pauk
1b73b4ea5b
maps: move IBSP to QBSP code to separate file
2024-05-05 12:36:14 +03:00
Denis Pauk
dbc7a5fbe5
maps: prepare code for use formats with different position of lumps
2024-05-05 12:23:06 +03:00
Denis Pauk
fbc91514eb
Merge remote-tracking branch 'yquake2/master'
2024-05-05 12:00:43 +03:00
Yamagi
d50408ff0b
Bump SDL 3 support to the latest preview, SDL 3.1.2.
...
SDL 3.1.1 -> 3.1.2 brings another round of API changes. Only one of them
is relevant for us: the SDL_RENDERER_ACCELERATED flag was removed.
2024-05-05 09:37:36 +02:00
Denis Pauk
fb85150702
maps: move entity add null terminate to sv_init
2024-05-04 17:18:48 +03:00
Denis Pauk
7e53c83c88
maps: fix lump size calculation
2024-05-04 15:39:01 +03:00
Denis Pauk
f1d9bd6f47
game: port TRAIN_FIX_OFFSET and TRAIN_USE_ORIGIN from ReRelease
...
Fix platforms in `train` level.
2024-05-02 23:42:05 +03:00
Denis Pauk
ded6f0c962
game: change level hack
...
Look like ReRelease code just ignore spawn target if target has not found.
`base2` has `eou1_.cin+*bunk1$start` as target but `bunk1` does not have such target.
Look to:
* 8dc1fc9794/rerelease/p_client.cpp (L1492)
* https://github.com/yquake2/yquake2remaster/issues/22
2024-05-02 00:25:38 +03:00
Denis Pauk
78c7f62aba
CMod_LoadAreaPortals: reuse cache as map_areaportals
2024-05-01 19:07:42 +03:00
Denis Pauk
bf81d4e427
maps: cache QBSP in collision map list
2024-05-01 14:23:49 +03:00
Denis Pauk
98cc9c1ea0
models: move Mod_LoadFile to client side
2024-05-01 11:00:33 +03:00
Trey Harrison
bbcc0ed222
renders: add SAM/SBM/DEF model files definitions
...
Author: Trey Harrison <trey@u.washington.edu>
Based on: https://web.archive.org/web/20001212060900/http://starbase.neosoft.com:80/~otaku/program.html
2024-04-30 00:23:56 +03:00
Denis Pauk
9abc88e6ab
gl4: support multimesh models
2024-04-30 00:13:48 +03:00
Jaime Moreira
b81e910929
GL1 multitexture, refactored memory allocation
...
It was missing error checking and cleanup at shutdown.
Also, reset state when needed. Fixes "death by laser" in boss1 map.
2024-04-29 14:39:48 -04:00
Denis Pauk
19f6e5df62
Version bump 8.31RR7
...
* Rework map load logic,
* Support SiN map load,
* Support track names,
* Support N64 flags,
* SDL3 build support (by Yamagi),
* Fixes for sort render (by dkoreshkov),
* Added cvar cl_laseralpha (by BjossiAlfreds),
* VectorLength reduces complexity (by devnexen),
* Sync with latest yquake 2 code.
2024-04-27 00:22:00 +03:00
Denis Pauk
42b4a61794
renders: support SURF_N64_UV
2024-04-24 23:54:52 +03:00
Denis Pauk
f7ec7d268e
server: use game api version for protocol detect
2024-04-24 00:55:53 +03:00
Jaime Moreira
ba71af2af8
GL1 multitexture: fast dynamic lighting
...
Using MH's solution, which is keeping all lightmaps in memory
to modify and upload them as a batch when possible.
lightmap_buffer is now an array; index 0 is used as the legacy
lightmap buffer (when no mtex), and the rest of the indexes are
to store the different lightmaps (only when using mtex).
2024-04-23 12:26:44 -04:00
Jaime Moreira
86528d7812
GL1 multitexture, first version
...
Unlike the old, buggy one, this implementation follows the
texture chain, just like the standard execution path. It also
avoids doing the lightmap chains, since it has already done it
in the second TMU; there's no duplicated work for lightmaps.
No errors appear in the lava on the "boss1" map either.
It's still slow when having an overdraw of dynamic lights.
Further work is needed.
2024-04-23 12:25:38 -04:00
Jaime Moreira
3faa3db167
GL1 multitexture, initialization
...
While it is based on the old, buggy multitexture implementation
(removed in 68a12d4e
& 8fe8f832
), rework will be done to make it
function as intended this time.
For this commit, just init and function declarations.
2024-04-23 12:24:20 -04:00
Jaime Moreira
79bb13d3a7
Updated OpenGL definitions in qgl.h
...
Using GL 1.4 declarations in code, although 'point parameters' will
use legacy extensions if they're the only ones found.
Moved stuff out of local.h; better to have definitions in one place.
Extracted from <glext.h>.
2024-04-23 12:23:00 -04:00
Jaime Moreira
3dde0d5859
Texture chains working properly
...
Somehow, R_TextureAnimation() returns different results for the same
surface when called consecutively. We force it to be called once, so
the chains in R_DrawTextureChains() are getting respected now.
2024-04-23 12:21:40 -04:00
Denis Pauk
1364e4703f
renders: implement SURF_N64_SCROLL
2024-04-22 00:35:54 +03:00
Denis Pauk
eb344a030e
renders: Move scroll logic to R_FlowingScroll
2024-04-22 00:04:21 +03:00
Denis Pauk
9a13efe9b4
game: fix door open in base3
...
Partial revert f95ca597
with sorting of fields.
2024-04-21 18:46:17 +03:00
Denis Pauk
067a30e83d
savegame: fix load/save Q64 maps
2024-04-20 18:40:32 +03:00
Denis Pauk
85dcc852b7
cmodels: Add quake2 map type for remove all ReRelease flags
2024-04-20 17:21:51 +03:00
Denis Pauk
119e1f6993
cmodels: extend texture name size to 64
2024-04-20 13:07:19 +03:00
Denis Pauk
cca9317a55
cmodels: add surface and contents flags convert logic
...
Based on:
* https://github.com/NightDive-Studio/sin-ex-game
* https://github.com/TrenchBroom/TrenchBroom/
2024-04-20 01:35:12 +03:00
Denis Pauk
9b6bae3454
renders: remove custom function for non QBSP format
...
Also remove Little* function usage, QBSP come with correct byte order.
2024-04-18 01:06:06 +03:00
Denis Pauk
8d21ed6874
renders: remove support of QBSP map format
...
Map should be converted from any format to QBSP before render by
Mod_Load2QBSP
2024-04-18 00:29:14 +03:00
Denis Pauk
c3af9815e6
renders: use converted to QBSP format map
...
Mod_LoadValidateLumps is fully removed.
2024-04-17 01:14:22 +03:00
Denis Pauk
606451cc9c
collision: move surface flag to QBSP convert logic
...
Only Mod_LoadVisibility has LittleLong format convertion logic on
server side.
2024-04-17 00:34:36 +03:00
Denis Pauk
3e46e777c0
cmodel: implement left QBSP to QBSP convert
2024-04-17 00:28:43 +03:00
Denis Pauk
becea2987b
collision: direct QBSP map load
2024-04-17 00:22:10 +03:00
Denis Pauk
1bc2d7d18b
collision: add DKBSP callbacks
2024-04-17 00:20:23 +03:00
Denis Pauk
aefea127e2
cmodel: move convert callback to rules tables
2024-04-17 00:16:33 +03:00
Denis Pauk
c0e3a86f30
collision: use RBSP to QBSP converted maps
2024-04-16 23:55:39 +03:00
Denis Pauk
3cd279248d
cmodel: Split Mod_Load2QBSP_IBSP to separate functions
2024-04-16 23:38:49 +03:00
Denis Pauk
53d69f98e5
collision: create IBSP -> QBSP convert logic
2024-04-16 23:22:36 +03:00
Denis Pauk
12aaebf80e
maps: validate read outside of BSPX section
2024-04-16 01:17:09 +03:00
Denis Pauk
2f0d3e2189
render: support texture name with full field size
2024-04-16 00:12:43 +03:00
Denis Pauk
ea91764196
collision: make firstbrushside unsigned
2024-04-16 00:12:24 +03:00
Denis Pauk
446224467d
Fix memory use after free detected by ASAN
2024-04-15 00:30:30 +03:00
Denis Pauk
701defd4ad
maps: move get rules to separate function
2024-04-13 15:58:32 +03:00
Denis Pauk
2d6241b31e
renders: move lightmap calls to LM_CreateLightmapsPoligon
2024-04-13 14:44:40 +03:00
Denis Pauk
02b8e85c01
opengl renders: support of gl_version_override cvar
...
Provides way to check render with lower officialy
reported OpenGL version.
Same as:
* MESA_GL_VERSION_OVERRIDE=4.6
* MESA_GLSL_VERSION_OVERRIDE=460
2024-04-13 13:25:34 +03:00
Denis Pauk
5babb3b96a
renders: fix function name in GL4*_InitContext errors
2024-04-13 01:03:42 +03:00
Denis Pauk
4ab6777e1f
renders: move lightmap creation call outside of LoadFace code
2024-04-13 00:15:31 +03:00
Denis Pauk
310c0fdb58
maps: load code cleanup
2024-04-12 00:13:14 +03:00
Denis Pauk
7a5154bd6b
renders: Add RBSP initial support
...
Surfaces/faces/tetures flags is incorrect.
2024-04-11 00:35:43 +03:00
Denis Pauk
c13074758a
client: Add RBSP initial support
...
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.
2024-04-11 00:13:10 +03:00
Denis Pauk
d4bc315363
client: play arbitrary CDTRACK ogg file
...
Initial implementation of https://github.com/yquake2/yquake2remaster/issues/18
2024-04-09 00:34:47 +03:00
Denis Pauk
1e935a5879
collision: fix crash without vis info
2024-04-08 23:07:01 +03:00
Denis Pauk
c1920e3ec4
client: fix gles3 name
...
Fix regression introduced in e61d9444c
https://github.com/yquake2/yquake2/issues/1097
2024-04-07 18:50:01 +03:00
Denis Pauk
30861e07ef
filesystem: sort files in pack and use binary search in packs
2024-04-07 18:46:40 +03:00
Denis Pauk
e3a1b0ef11
maps: Mod_CalcNonModelLumpHunkSize combine QBSP cases
2024-04-07 18:46:40 +03:00
Denis Pauk
e90fa70680
renders: reuse Mod_CalcNonModelLumpHunkSize
2024-04-07 18:46:40 +03:00
Denis Pauk
d2e5955547
renders: reuse CalcLumpHunkSize for Leaf and Nodes
2024-04-07 18:46:40 +03:00
Denis Pauk
851c72f7b4
soft: sync code with other renders
2024-04-07 18:46:40 +03:00
Denis Pauk
fe96447980
client: fix gles3 name
...
Fix regression introduced in e61d9444c
https://github.com/yquake2/yquake2/issues/1097
2024-04-07 18:43:45 +03:00
Yamagi
352d87af15
Add SDL 3 support to ref_gl4.
...
This is mostly a port of the same changes to ref_gl3:
* Add SDL 3 support to the Makefile.
* Port API changes.
* Bump renderer API to version 7.
a884514f97
https://github.com/yquake2/yquake2/issues/1097
2024-04-07 18:38:15 +03:00