Commit graph

5082 commits

Author SHA1 Message Date
Alibek Omarov
8a41be9d47 engine: server: finally, make a union for large leaf indices in edict_t so we can run bsp2 maps without recompiling 2025-01-09 08:02:39 +03:00
Alibek Omarov
47aff9e30b engine: hack mnode_t struct so we can have 24-bit face and children indices to support BSP2 format in runtime 2025-01-09 08:02:39 +03:00
Alibek Omarov
ced8744ac9 engine: split edge struct into two with 16-bit indicies and 32-bit indicies to support BSP2 format in runtime 2025-01-08 14:46:07 +03:00
Alibek Omarov
734c07ddab engine: split clipnodes struct into two with 16-bit indicies and 32-bit indicies to support BSP2 format in runtime 2025-01-08 14:46:07 +03:00
Alibek Omarov
ceb603488a engine: platform: sdl: set up our custom log output function to catch all SDL errors in engine log file 2025-01-08 10:10:45 +03:00
Alibek Omarov
80bac157eb Update SDL to 2.30.11, use GitHub links for SDL, as it might be faster on Actions virtual machines 2025-01-08 09:42:53 +03:00
Alibek Omarov
b45581c630 Documentation: gameinfo: add a note about liblist.gam and gameinfo.txt changes 2025-01-08 01:22:23 +03:00
Alibek Omarov
d4fe3d6f8a filesystem: wscript: check d_type field in struct dirent, as this is an extension and some supported ports (like psvita) don't have it 2025-01-08 01:22:23 +03:00
Alibek Omarov
1907485895 filesystem: re-enable folder check for array returned by listdirectory with dirs_only set to true
According to glibc manual, not all filesystems support it and some might return DT_UNKNOWN.
2025-01-08 01:22:23 +03:00
Alibek Omarov
cfebb3e1d6 filesystem: massively rework how scanning game directories work
* No more conversion from liblist.gam to gameinfo.txt. We are using liblist.gam directly now.
  gameinfo.txt being native format to Xash3D not only remains, it takes priority over liblist.gam.
* Quake game directories now don't receive autogenerated gameinfo.txt.
* Empty directories don't get gameinfo.txt either, finally making it easier to support HD addon folders.
* If user still wishes to generate gameinfo.txt, there is now command fs_make_gameinfo that creates
  gameinfo.txt for currently running game.
* No more creating empty folders for RoDir. They are now created on demand.
2025-01-08 01:22:23 +03:00
Alibek Omarov
f9a0057c28 wscript: fix bsp2 build bruh 2025-01-08 01:22:23 +03:00
Alibek Omarov
ceb2b0c5e4 filesystem: add utility function FS_CheckForQuakePak that parses Quake PAK file and looks for specific files in it's root
Used to properly detect Quake game dirs.
2025-01-08 01:22:23 +03:00
Alibek Omarov
83b5edea88 engine: platform: sdl: clear key states on losing window focus 2025-01-06 16:38:16 +03:00
Alibek Omarov
9d2a85f11f engine: client: clear mouse state along with everything else in Key_ClearStates 2025-01-06 16:38:16 +03:00
Alibek Omarov
93d3df81ee engine: client: small refactoring and better explanation for char input handler for menus that don't query our extended API 2025-01-06 16:00:11 +03:00
Alibek Omarov
2a7f13151a engine: cmd: when command is already defined and has the same function pointer, show it as warning 2025-01-06 13:51:25 +03:00
Alibek Omarov
0c4f6ae61d engine: client: like GoldSrc, use cancelselect command for escape key. It is handled in client.dll and allows mods to override Esc key behavior 2025-01-06 13:51:25 +03:00
Andrey Akhmichin
b7150c3208 Documentation: opensource-mods.md: add "Earth Special Forces". 2025-01-02 05:35:33 +03:00
Alibek Omarov
d6ebff81e2 engine: client: vgui: track textures upload to avoid issues in buggy mods (that are probably will never get fixed) 2024-12-30 07:28:33 +03:00
Alibek Omarov
ce4148f351 engine: client: vgui: deprecate VGUI_CreateTexture and VGUI_UploadTextureBlock functions, as they never used by vgui_support module
* vgui_support used them in old engine for font cache, but we don't have that anymore.
2024-12-30 07:16:30 +03:00
Alibek Omarov
08c2632c14 engine: platform: nswitch: export _Unwind_GetIPInfo as required by cs16-client 2024-12-29 09:11:21 +03:00
Alibek Omarov
03eac904c1 public: make COM_FixSlashes inlined 2024-12-29 09:05:15 +03:00
Alibek Omarov
62f3354f4e mainui: update 2024-12-29 08:06:58 +03:00
Alibek Omarov
d5b6eff0c0 game_launch: fix --disable-menu-changegame by request 2024-12-29 08:06:50 +03:00
Alibek Omarov
c9ee844a24 scripts: gha: bundle SDL2 pdb file for better stacktraces on Windows 2024-12-29 02:08:05 +03:00
Alibek Omarov
687c9b004f engine: platform: sdl: set directsound as default audio driver on Windows, due to incompatibilities with mods 2024-12-29 02:01:23 +03:00
Alibek Omarov
14e79f04ac engine: prevent extra malloc in exec by checking if cfg already contains newline at EOL and appending it to cbuf if required 2024-12-28 16:03:49 +03:00
Alibek Omarov
5d6cf48687 engine: client: fix lightstyle timings on GoldSrc protocol, share the parser with Quake protocol handler 2024-12-28 01:40:59 +03:00
Alibek Omarov
88949a9ee6 engine: launcher: drop support for changing games from within internal launcher for platforms that do not have execv equivalent 2024-12-27 18:45:31 +03:00
Alibek Omarov
2d1e76199b engine: host: always print Host_Error text to log, even if console hasn't been enabled 2024-12-27 18:37:25 +03:00
Alibek Omarov
a5d78ecfd7 engine: be more verbose on why the engine is going to be shut down 2024-12-27 18:30:46 +03:00
Alibek Omarov
3576e474e6 engine: get rid of SendKeyEvents function, it only listened for WM_QUIT on Windows and we don't use that with SDL 2024-12-27 18:30:01 +03:00
Alibek Omarov
d50927f21f ref: gl: make r_ripple work with non-square non-pot textures, fix holes caused by unexpected transparency 2024-12-26 06:31:53 +03:00
Alibek Omarov
c6e3146290 ref: gl: fix broken water texture when it was discarded by R_UploadRipples 2024-12-26 03:49:12 +03:00
Alibek Omarov
9811988cce engine: server: set mapname globals field before making first call into DLL, as some mods tend to read it too early 2024-12-26 02:50:30 +03:00
Alibek Omarov
48bdd4238e engine: always include reason to server shutdown 2024-12-26 02:13:13 +03:00
Alibek Omarov
fd2b7e9197 engine: client: declare music command as overridable as the same command exists in HLU SDK 2024-12-26 01:16:48 +03:00
Alibek Omarov
0e42e5b9e3 engine: command: introduce new type of commands that can be overriden by a mod DLL for better compatibility 2024-12-26 01:15:32 +03:00
Alibek Omarov
65750f0cf3 engine: server: hack save fields that use types unsupported by Half-Life Unified SDK through array types 2024-12-26 00:36:28 +03:00
Alibek Omarov
6469b0a5f5 engine: common: shut up warn-unused-result on log write functions, only fetch system time for system logs when necessary 2024-12-24 11:27:34 +03:00
Alibek Omarov
4f98187e9a engine: move select-based stdin input function to platform/posix 2024-12-24 11:13:05 +03:00
Alibek Omarov
74c19a1557 engine: client: leave SDL2 client.dll detection for Windows only 2024-12-24 10:46:39 +03:00
Alibek Omarov
cfebee6ea8 engine: split crashhandler to win32 and posix versions 2024-12-24 10:37:49 +03:00
Alibek Omarov
bd0d6644e0 engine: move Sys_SendKeyEvents to platform/win32 2024-12-24 09:59:47 +03:00
Alibek Omarov
f41450127a Documentation: add note about pkg-config when compiling for Windows under Wine 2024-12-24 09:59:09 +03:00
Alibek Omarov
70897af362 public: add dll helpers to simplify basic interaction with exported functions lists 2024-12-23 04:43:15 +03:00
Alibek Omarov
f1d7101ad8 engine: client: get rid of NULL sentinels at the end of arrays 2024-12-22 07:43:26 +03:00
Alibek Omarov
ac9d960eef engine: common: get rid of NULL sentinels at the end of arrays 2024-12-22 07:22:10 +03:00
Alibek Omarov
0c471aecb1 engine: common: imagelib: get rid of NULL sentinels at the end of arrays 2024-12-22 07:21:06 +03:00
Alibek Omarov
72d0d70587 engine: server: get rid of NULL sentinels at the end of arrays 2024-12-22 07:12:32 +03:00