Commit graph

1209 commits

Author SHA1 Message Date
Alibek Omarov
6cfa5877a4 engine: base_cmd: decrease base cmd hash size 2025-01-21 11:25:33 +03:00
Andrey Akhmichin
d278d3bdd7 engine: common: fix clang build. 2025-01-19 04:33:06 +03:00
Alibek Omarov
7811b60292 engine: common: fix build for apple and freebsd-15 2025-01-18 10:40:12 +03:00
Alibek Omarov
3e93aa459d engine: net_buffer: turn bit write and read masks into predefined arrays, so we don't have to call InitMasks
In future, net_buffer might get moved to libpublic.

Also, get rid of 32-th bit write mask, it's only get used when we're trying to
write zero bits value which is nonsense.
2025-01-18 09:54:11 +03:00
Alibek Omarov
5b9db5940b engine: mod_bmodel: don't try to load luma/fullbright texture for water, as no renderers support it anyway, and instead we will use that field for rippletexture 2025-01-18 08:30:59 +03:00
Alibek Omarov
4b1b3aa13c public: remove Q_colorstr, as it's completely useless and checking for color string is easy actually 2025-01-18 08:29:36 +03:00
Alibek Omarov
a75666a3cd engine: common: fix dedicated build by defining SV_GetMaxClients before CL_GetMaxClients stub (that redirects to it)
Also remove CL_Shutdown from dedicated stub lists.
2025-01-14 13:10:02 +03:00
Alibek Omarov
49426721d8 engine: use zero initializers instead of memset 2025-01-14 12:11:27 +03:00
Alibek Omarov
04125284a3 engine: dedicated: make some stubs inlined 2025-01-14 12:10:31 +03:00
Alibek Omarov
69341e36a3 public: expose commit and branch as global variables instead of functions 2025-01-13 20:02:59 +03:00
Alibek Omarov
90e493fa3a engine: common: add Host_ExitInMain function that will force engine return from Host_Main() function, essentially making engine gracefully exit on Android
In future, this might be used everywhere, so users would be able to add custom
cleanup in some advanced game_launch implementation, on any platform.
2025-01-09 20:31:26 +03:00
Alibek Omarov
0d55441830 engine: properly pass shutdown reason down to close log, helps to finally get rid of global finalmsg 2025-01-09 08:04:18 +03:00
Alibek Omarov
98ff33d9e2 engine: mod_bmodel: rewrite .lit file loader using normal stream io functions 2025-01-09 08:02:39 +03:00
Alibek Omarov
baa8fbaaec engine: mod_bmodel: fix misleading debug message telling about monochrome lighting when .lit file is used 2025-01-09 08:02:39 +03:00
Alibek Omarov
a0b46da04b engine: consolidate all box clipnodes used in studio models, pmove and server in a single place 2025-01-09 08:02:39 +03:00
Alibek Omarov
e70ba7ad64 engine: now, remove SUPPORT_BSP2_FORMAT macro, only prevent ref_soft from loading such maps 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
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
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
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
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
48bdd4238e engine: always include reason to server shutdown 2024-12-26 02:13:13 +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
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
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
70897af362 public: add dll helpers to simplify basic interaction with exported functions lists 2024-12-23 04:43:15 +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
1dd622fcbb engine: client: keys: refactoring, remove NULL sentinels, make keys structs and few more functions private to keys.c file 2024-12-21 15:22:48 +03:00
Alibek Omarov
af4b64983a engine: fix a typo in Cmd_AddFilteredCommand flags passed to Cmd_AddCommandEx. Make them return Cmd_AddCommandEx value 2024-12-21 15:01:04 +03:00
Alibek Omarov
e751092555 engine: common: cmd: consider filtered buffer privileged when we're running local singleplayer game 2024-12-20 05:48:33 +03:00
Alibek Omarov
a834f4996f engine: move client adding functions to their appropriate subsystems and make them static. Make in-engine functions inlined. 2024-12-20 05:47:46 +03:00
Alibek Omarov
3f1eed9f59 engine: client: remove svc_goldsrc_* definitions for message that semantics matches Xash3D 49 protocol and instead use it's definitions 2024-12-20 01:51:24 +03:00
Alibek Omarov
5007f8488c engine: host: add simple usage help for -bugcomp flag 2024-12-05 18:29:54 +03:00
Alibek Omarov
f7062498c2 engine: turn old pfnGetGameDir behavior into a bugcomp flag get_game_dir_full
This function is kinda nasty, some mods (like old RCBot builds) expect a slash,
some newer mods (like Sandbot) doesn't. To preserve compatibility with both old
and new mods, just add it as bug compatibility flag.
2024-12-05 18:14:15 +03:00
Alibek Omarov
e14cd758ad engine: turn Platform_Sleep into an inline function that directly calls platform-specific delay functions 2024-12-04 18:32:03 +03:00
Alibek Omarov
6d00aef398 engine: move soundlib onto client, only leave snd_utils with some functions that's engine core or server are dependent on 2024-12-02 21:05:41 +03:00
Alibek Omarov
2d52dae69c engine: common: soundlib: reformat everything using uncrustify 2024-12-02 21:05:34 +03:00
SNMetamorph
593b0f295a engine: soundlib: added proper errors reporting for Ogg Opus sound routines 2024-12-02 20:36:33 +03:00
SNMetamorph
7c23b6473c engine: soundlib: added proper errors reporting to Ogg Vorbis sound routines 2024-12-02 20:36:33 +03:00
SNMetamorph
960a3a1483 engine: soundlib: minor codestyle and headers-related fixes 2024-12-02 20:36:33 +03:00
SNMetamorph
b7c2c476a8 engine: soundlib: implemented sound looping feature for Ogg Vorbis 2024-12-02 20:36:33 +03:00
SNMetamorph
fa152bef20 engine: soundlib: implemented sound looping feature for Ogg Opus 2024-12-02 20:36:33 +03:00