Compare commits

...

2289 Commits

Author SHA1 Message Date
Alibek Omarov
59b96b81ba engine: platform: sdl: try to save and restore mouse position during showing or hiding cursor 2025-02-22 17:35:45 +03:00
Alibek Omarov
4c15cceb32 engine: client: deprecate custom id, it is not used meaningfully by anyone 2025-02-20 15:41:17 +03:00
Alibek Omarov
3e4c5beb25 ref: fix another typo made after R_StudioCalcBones refactor 2025-02-18 19:22:06 +03:00
Alibek Omarov
f84d865f4a engine: client: fix crash if server sends new movevars before entities were created
Nothing bad will happen if we skip wave height for world entity for now, but
we might need to handle this situation somehow in the future.
2025-02-17 13:02:21 +03:00
SNMetamorph
2465782a3e engine: platform: sys_win: fixed compiling error 2025-02-15 13:45:22 +03:00
Alibek Omarov
7ba2209124 engine: platform: sdl: set requested timer delay in units of 100ns according to the documentation 2025-02-15 13:08:05 +03:00
Alibek Omarov
af6b434b71 engine: platform: win32: implement nanosleep using waitable timers with high precision 2025-02-15 11:57:41 +03:00
Alibek Omarov
052ea6a8bd engine: platform: introduce for Platform_NanoSleep, to be used for better sleeping in between frames for lowering CPU usage 2025-02-15 10:11:17 +03:00
Alibek Omarov
448dc720ed engine: server: immediately exit from SV_GetChallenge on unknown type addresses 2025-02-15 09:31:20 +03:00
Alibek Omarov
75b15696f8 engine: zone: ensure memheader_t size is always expected 2025-02-15 09:31:20 +03:00
Andrey Akhmichin
7fb113f610 Documentation: opensource-mods.md: add "Delta Particles". 2025-02-15 08:02:44 +03:00
Andrey Akhmichin
0497e00ad2 Documentation: supported-mod-list.md: update. 2025-02-15 08:02:35 +03:00
Alibek Omarov
9c50288bbb engine: server: rewrite challenge generator to something more simple: salted MD5 of an IP address
The idea was taken from ReHLDS project.
2025-02-15 08:01:44 +03:00
Alibek Omarov
c5d4af802c engine: server: even if user set non-integer value for cl_updaterate, clamp it to sv_minupdaterate 2025-02-15 08:01:44 +03:00
Alibek Omarov
340a8b5e0c engine: server: fixes for userinfo change ratelimiting
* Add pentalty earlier
* Increase disallowed timewindow according to penality multiplier
* Allow first change even if it falls into ignore timewindow
2025-02-15 08:01:44 +03:00
Alibek Omarov
bc1b86c19c engine: server: refactor SV_ConnectClient, simplify LAN IP check 2025-02-15 08:01:44 +03:00
Alibek Omarov
b605cf603e common: xash3d_types: make it more compatible for inclusion in SDK 2025-02-15 08:01:44 +03:00
xiaodo
fdc2ed8093 engine: server: pfnClientCommand and pfnQueryClientCvarValue should execute on unspawned player 2025-02-14 20:52:45 +03:00
xiaodo
a27375d1f5 engine: server: cmds: fix kick command incorrect argc 2025-02-14 20:52:45 +03:00
Alibek Omarov
0e2abf9040 engine: platform: always create zeroed buffer for audio 2025-02-14 05:20:40 +03:00
Alibek Omarov
89430400d9 engine: sys_con: only allow names that start with either alphabetic or numerical character for a log file 2025-02-14 01:51:50 +03:00
Alibek Omarov
f1a9d408bf engine: sys_con: check if the next argument after -log starts with minus and ignore it if it does 2025-02-14 00:50:01 +03:00
Alibek Omarov
6529692244 engine: disable timestamps in log file by default, allow changing log file name with -log argument 2025-02-14 00:28:00 +03:00
Alibek Omarov
51d11f8e86 engine: platform: win32: remove unused log variables and checks from Win32 console, sys_con does the job 2025-02-14 00:28:00 +03:00
Alibek Omarov
c5397191e5 engine: client: touch: limit usage of touch_set_stroke and touch_setclientonly only for privileged mode 2025-02-13 20:55:49 +03:00
Alibek Omarov
44426709f7 engine: platform: posix: skip first stack frame when printing stack trace with libbacktrace 2025-02-13 20:43:32 +03:00
Alibek Omarov
2d8f747e84 wscript: disable using system-wide libbacktrace, as it might not support features we need 2025-02-13 19:21:07 +03:00
Alibek Omarov
0dd5a60410 3rdparty: gl4es: update submodule 2025-02-13 02:32:28 +03:00
Alibek Omarov
eec8129be4 3rdparty: extras: update submodule 2025-02-13 02:31:30 +03:00
Alibek Omarov
934c5e018d readme: clarify that chat is for russian speaking people [ci skip] 2025-02-12 18:08:10 +03:00
Alibek Omarov
d658d8cc78 readme: remove builds.sr.ht status, add Telegram chat link, remove stable build link (it's very outdated and not recommended to use) [skip ci] 2025-02-12 17:58:51 +03:00
Alibek Omarov
ca9a3f0491 engine: server: fix out of bounds write in SV_FindTouchedLeafs 2025-02-11 21:15:54 +03:00
Alibek Omarov
1510cb458f public: fix another typo 2025-02-11 21:12:50 +03:00
Andrey Akhmichin
30cabb8107 Documentation: supported-mod-list.md: fix branch name. 2025-02-11 21:10:59 +03:00
Alibek Omarov
64ee956618 engine: fix a typo 2025-02-11 20:06:15 +03:00
Alibek Omarov
39659644bf public: merge calc bone quaternion and position into single function
Expect that only adj and output quaternion can be NULL.
2025-02-11 18:57:08 +03:00
Alibek Omarov
eb09af0b08 ref: gl: avoid generating GL_INVALID_OPERATION if gl_vbo_dlightmode is set to 0 2025-02-11 18:57:08 +03:00
Andrey Akhmichin
91a4ace12c Documentation: supported-mod-list.md: update. 2025-02-11 16:28:40 +03:00
Alibek Omarov
2ad2e46b30 mainui: update 2025-02-10 13:18:59 +03:00
Alibek Omarov
627444279f Revert "common: cvar: make auto descriptions private to cvar subsystem, use them when Cvar_Get is called with NULL description"
This reverts commit ade560c601.
2025-02-10 12:49:05 +03:00
Alibek Omarov
3550bdb30d 3rdparty: mainui: update 2025-02-09 23:14:24 +03:00
Alibek Omarov
c201b895eb common: netadr: force cast uint16_t type to netadrtype_t
So it compiles in C++
2025-02-09 23:13:29 +03:00
Alibek Omarov
72f1ac3780 wscript: ensure system-wide libbacktrace supports threads 2025-02-09 18:29:02 +03:00
Alibek Omarov
d7dc3192de 3rdparty: libbacktrace: fix applying uselib 2025-02-09 18:25:40 +03:00
Alibek Omarov
43ea65fffc ci: upgrade freebsd tasks. 2025-02-09 17:41:01 +03:00
Alibek Omarov
a72d921c12 wscript: add system-wide libbacktrace detection 2025-02-09 17:41:01 +03:00
Alibek Omarov
99b7d71824 wscript: set DEST_SIZEOF_VOID_P with allow 64bit flag 2025-02-09 17:16:17 +03:00
Alibek Omarov
67c73bdcbe engine: server: remove impulse 204, it's not used anywhere
Thanks @tyabus for reminding me about this feature.
2025-02-09 17:16:05 +03:00
Alibek Omarov
8b1dbcf166 ci: remove extra 20s of wait before removing current release and downloading artifacts 2025-02-09 17:02:31 +03:00
Alibek Omarov
5f60095dc4 scripts: flatpak: disable separate debuginfo 2025-02-09 16:54:51 +03:00
Alibek Omarov
c7282b488b 3rdparty: libbacktrace: disable linking zlib, lzma and zstd for now, figure this out later 2025-02-09 16:49:43 +03:00
Alibek Omarov
afa829d996 3rdparty: libbacktrace: don't define POSIX_SOURCE, it breaks build on Mac 2025-02-09 16:41:26 +03:00
Alibek Omarov
c06ea8d915 engine: platform: posix: add printing backtrace to stderr and logfile for libbacktrace backend 2025-02-09 16:41:26 +03:00
Alibek Omarov
bf344282ec android: explicitly set Waf output directory so it doesn't mess with current configuration and places generated files where CMake expects them to be 2025-02-09 16:20:38 +03:00
Alibek Omarov
21f62910ac engine: platform: posix: fix build when glibc execinfo.h is not available, but libbacktrace is still used 2025-02-09 16:20:38 +03:00
Alibek Omarov
54552d93ef Documentation: goldsrc-protocol-support: I am not going to support Dproto 2025-02-09 16:18:21 +03:00
Alibek Omarov
97455e7fd4 engine: platform: sdl: fix build after last PR 2025-02-09 15:56:16 +03:00
Alibek Omarov
6087d43043 3rdparty: libbacktrace: properly disable it on win32, nswitch and psvita 2025-02-09 15:55:12 +03:00
Alibek Omarov
c1a96d3ff1 engine: platform: posix: fix build 2025-02-09 15:51:25 +03:00
Alibek Omarov
e27d20dfa3 android: enable debug symbols for native libraries 2025-02-09 15:49:28 +03:00
Alibek Omarov
890e12ec76 engine: platform: posix: flush stdout/stderr before everything, include build branch 2025-02-09 15:45:44 +03:00
Alibek Omarov
774d2ac28a engine: platform: posix: add libbacktrace support for crash handler 2025-02-09 15:42:28 +03:00
Alibek Omarov
960d724828 3rdparty: libbacktrace: add submodule 2025-02-09 15:40:07 +03:00
Alibek Omarov
32aa1f91bf engine: pass argv0 to crash handler setup, which is required for libbacktrace integration
Fix indentation in crash_posix.c
2025-02-09 15:36:49 +03:00
Alibek Omarov
bd3634c815 wscript: add sanity test for opusfile because some distros don't ship 32-bit binary 2025-02-09 15:34:30 +03:00
Oleg
eda0ac92cc engine: platform: sdl: change behavior when window position is not set 2025-02-09 08:54:31 +03:00
Oleg
546903ea05 engine: platform: sdl: write windows position changes even in fullscreen 2025-02-09 08:54:31 +03:00
Oleg
4975001795 engine: platform: sdl: enumerate video modes for display where window located is instead of display zero 2025-02-09 08:54:31 +03:00
Oleg
a078ad1f51 engine: platform: sdl: fix windows save position for multiple monitors 2025-02-09 08:54:31 +03:00
Oleg
8307f671d4 engine: platform: sdl: let platform decide where to put our fullscreen window 2025-02-09 08:54:31 +03:00
Alibek Omarov
241fab02b1 ref: gl: don't try to free luma and detail texture of water texture, as these fields used by r_ripple 2025-02-08 16:57:20 +03:00
Alibek Omarov
1bfee70477 engine: con_utils: add autocompletion for cvar commands like set, reset and toggle 2025-02-08 16:45:52 +03:00
Alibek Omarov
eb51d17cd2 engine: server: enable sv_zmax clamping back to avoid overflowing zmax value encoded in delta 2025-02-08 16:38:11 +03:00
Alibek Omarov
b5cb0b9f10 ref: gl: add r_dlight_virtual_radius. It potentially fixes ugly dlight cut off on largely scaled textures (or at least allows to tune it)
It also adds a fix found in JoeQuake (which traces back to FitzQuake, in which
it is attributed to LadyHavoc, Darkplaces author) to exactly calculate whether
the light hits the surface, so we don't wrongly enable lighting on a surface by
an increased radius.
2025-02-07 23:07:08 +03:00
Alibek Omarov
a955d1e957 ref: gl: make GL_BuildPolygonFromSurface static, remove one global variable usage (which is unused anyway) 2025-02-07 22:55:38 +03:00
Alibek Omarov
2b2c967e85 engine: add ms3.mentality.rip master server 2025-02-07 19:32:37 +03:00
Alibek Omarov
c48d93e3ce public: use last Git commit date (committer date, to be exact) as more predictable source for build num 2025-02-07 17:51:10 +03:00
Alibek Omarov
8f257cc331 public: add parsing build date from ISO-8601 alike format 2025-02-07 17:47:23 +03:00
Alibek Omarov
151e7fe37b public: crtlib: check for empty buffer in Q_vsnprintf 2025-02-06 21:19:10 +03:00
Alibek Omarov
add02dc6f9 engine: fix potential UB in netadr_t 2025-02-06 20:54:18 +03:00
Alibek Omarov
d4c34abd6e engine: enable writing log even if console hasn't been enabled at the engine startup (it might be enabled later, it might also contain crash data) 2025-02-06 20:03:07 +03:00
Alibek Omarov
1d81e611f0 scripts: gha: use N+1 job count when building PSVita dependencies 2025-02-06 00:32:42 +03:00
Alibek Omarov
6a0038e26a ref: gl: always set texture env mode to GL_MODULATE in TriAPI's RenderMode call
Not sure if this is correct, but it's generally a good idea to restore it to an
expected value.
2025-02-06 00:30:32 +03:00
Alibek Omarov
1d99f65e86 filesystem: when shutting down, clean up gameinfo pointers and total games count 2025-02-05 21:14:08 +03:00
Alibek Omarov
5e524bca60 engine: client: enable half-texel hack for nearest filtering too, if the scaling factor isn't an integer 2025-02-05 20:16:16 +03:00
Alibek Omarov
cf3e56e275 engine: client: add alternative mode for hud_scale, where it scales HUD down to selected resolution with preserving aspect ratio 2025-02-05 19:47:59 +03:00
Alibek Omarov
ade560c601 common: cvar: make auto descriptions private to cvar subsystem, use them when Cvar_Get is called with NULL description
It allows us to not lose engine-side description when client or gameui registers cvar with the same name. In case of
menu it's the only way to get cvar pointer.
2025-02-05 19:11:16 +03:00
Alibek Omarov
62e3ba2126 engine: add cvars to control mounting additional directories
Use existing ui_language cvar for mounting localization folders.
2025-02-05 18:54:28 +03:00
Alibek Omarov
674a4e5883 filesystem: add ability to mount HD, LV, addon and language folders by engine request 2025-02-05 18:24:36 +03:00
Alibek Omarov
f911210b81 public: simplify ctype.h is* functions wrappers for null-terminated strings, add Q_isalpha 2025-02-05 18:21:18 +03:00
Alibek Omarov
14eb07653c engine: client: fix incorrect format in error message in CL_SetLightStyle 2025-02-05 17:41:01 +03:00
Alibek Omarov
54b0cf9991 ref: gl: check OES NPOT texture extension in BigGL mode 2025-02-05 14:00:44 +03:00
Alibek Omarov
3ebcb08a97 ref: gl: add cvar r_large_lightmaps to enable larger lightmap sizes, opt-in, yields better performance with VBO renderer 2025-02-05 13:02:37 +03:00
Alibek Omarov
23940f8590 readme: remove fontconfig from dependencies list, we aren't using it anymore [skip ci] 2025-02-04 21:00:42 +03:00
Alibek Omarov
687fb0123f engine: implement basic gamepad gyroscope calibration
Called on game controller becoming active or by user request.
Exposes current calibration state by read-only console variable.
2025-02-03 13:14:51 +03:00
Alibek Omarov
6c91fdb0cd ref: gl: gl2_shim: fix int vs GLuint 2025-02-02 20:57:37 +03:00
Alibek Omarov
4832232fd6 ci: attempt to fix flatpak upload 2025-02-02 20:31:51 +03:00
Alibek Omarov
185bce0489 engine: common: remove unused D_ enum used for MsgDev in old engine. Make sure all enums and structs here are not anonymous 2025-02-02 20:26:07 +03:00
Alibek Omarov
f460aa63b0 engine: platform: posix: don't forget to print backtrace to stderr too 2025-02-02 19:20:54 +03:00
Alibek Omarov
22f8b6f9c3 engine: platform: enable crash handler for macOS 2025-02-02 18:30:41 +03:00
Alibek Omarov
0cb034afc2 engine: wscript: improve execinfo and GNU backtrace() check 2025-02-02 18:18:26 +03:00
Alibek Omarov
d0464ef602 engine: platform: posix: use glibc-based backtrace implementation for crash handling, if execinfo.h can be found 2025-02-02 18:06:18 +03:00
Alibek Omarov
c3ebb84b97 ci: bump SDL2 to 2.30.12 2025-02-02 08:14:24 +03:00
Alibek Omarov
11742efbc3 engine: fix player move on dedicated servers 2025-02-02 08:08:15 +03:00
Alibek Omarov
95af635ab4 engine: client: add command replaybufferdat to aid in debugging protocol errors by parsing buffer.dat 2025-02-02 05:22:46 +03:00
Alibek Omarov
1abec80191 engine: client: set codepage to 0 if con_charset value is unknown 2025-02-02 02:34:08 +03:00
Alibek Omarov
93ebddfba3 public: utflib: simplify Q_EncodeUTF8 2025-02-02 02:31:56 +03:00
Alibek Omarov
5378494199 wscript: enable main() function for Android port, which was forgotten after last refactoring 2025-02-01 18:26:20 +03:00
Alibek Omarov
1b44d7733e engine: platform: add improved Platform_Vibrate2 function, that allows to control vibration strength 2025-02-01 18:08:53 +03:00
Alibek Omarov
694c630b44 engine: zone: don't error when trying to free NULL pointer, like standard C free() and C++ delete 2025-02-01 17:51:02 +03:00
Alibek Omarov
7df1d4b9e2 engine: platform: sdl: remove useless for us game controller events 2025-01-31 19:48:33 +03:00
Alibek Omarov
b16037eabf engine: drop raw SDL joystick API, always use GameController instead. Implement actually working rumble, ensure we're freeing up all resources related to gamepads 2025-01-31 17:50:19 +03:00
Alibek Omarov
bff7299f9b gha: publish binaries even if flatpak fails 2025-01-31 10:37:41 +03:00
Alibek Omarov
de196b1c58 common: xash3d_types: avoid defining true and false in C23 2025-01-31 10:36:27 +03:00
Alibek Omarov
a0eec8b85d scripts: waifulib: add special_install_path for platform-specific executable formats that create post link stage (was nro_install_path) 2025-01-31 10:25:02 +03:00
Alibek Omarov
c7e8ea2ffa scripts: gha: linux: build smaller SDL2 (without 2D renderer) for Linux as well 2025-01-31 10:02:19 +03:00
Alibek Omarov
1c1cf3d646 scripts: waifulib: psvita: make sce_sys truly optional in apply_vpk 2025-01-31 10:02:19 +03:00
Alibek Omarov
9759b80b78 scripts: waifulib: psvita: set default title id and app name to just test 2025-01-31 09:10:39 +03:00
Alibek Omarov
94b2c0b443 scripts: gha: build render-less SDL2 for PSVita 2025-01-31 09:10:09 +03:00
Alibek Omarov
ff8d17a5a8 scripts: waifulib: psvita: add missing cprogram attributes 2025-01-31 09:04:40 +03:00
Alibek Omarov
aa23196a55 scripts: waifulib: support vpk and nro pass for pure C programs, just in case 2025-01-30 20:51:01 +03:00
Alibek Omarov
83b488c37e wscript: let building client and dedicated server in the same configuration 2025-01-30 20:23:12 +03:00
Alibek Omarov
77abf621d7 ref: gl: make GL_Support and GL_MaxTextureUnits functions inlined 2025-01-30 19:02:53 +03:00
Alibek Omarov
f9d4ac2771 ref: gl: fix ugly seam at the skybox, thanks Spoike for help 2025-01-30 18:53:31 +03:00
Alibek Omarov
f076d84975 engine: platform: android: move dlsym-weak hack from C++ to C 2025-01-30 18:07:35 +03:00
Alibek Omarov
faf0b32a94 ref: gl: fix massive frame drop caused by ripples code rendering same texture multiple times in the frame 2025-01-29 20:15:21 +03:00
Alibek Omarov
feb80e5997 engine: platform: sdl: read gamecontrollerdb.txt from extras.pk3 2025-01-29 13:43:10 +03:00
Alibek Omarov
578a77518f engine: client: fix clearing keyboard buttons caused by typical brain fart 2025-01-29 10:04:47 +03:00
Alibek Omarov
2457ecf226 filesystem: fix recursive basedir possible cyclic dependency when default game directory uses a basedir that's base directory is undefined
That could happen when default game directory depends on base directory that don't have gameinfo.txt.
Because all game directories with liblist.gam automatically have dependency on default game directory, it causes cyclic dependency.
2025-01-29 09:49:29 +03:00
Alibek Omarov
8cd99885f1 filesystem: clean added status for game folders when purging search paths 2025-01-29 09:46:18 +03:00
Alibek Omarov
684e229ac8 engine: client: get rid of absolutely useless bitfields 2025-01-26 23:34:04 +03:00
SNMetamorph
c0f1d8c647 engine: model: fixed incorrect check in Mod_LoadModel 2025-01-26 23:27:18 +03:00
SNMetamorph
c3b8696957 engine: platform: win32: disable initializing console in case of regular game startup 2025-01-26 23:02:24 +03:00
Tom Kidd
3ca413dbab Fixed path calc for extras on Mac 2025-01-26 22:25:08 +03:00
Alibek Omarov
92dc04ff3c engine: client: minor change, add forgotten newline in CL_DeltaEntityGS Host_Error call 2025-01-25 17:51:48 +03:00
Alibek Omarov
ad6db91285 engine: move xashid stuff onto client 2025-01-25 17:51:48 +03:00
David DeGraw
90a0f74087 undo change to mod link 2025-01-25 08:23:04 +03:00
David DeGraw
4f7f5288a1 more nits 2025-01-25 08:23:04 +03:00
David DeGraw
c23b4bfe61 nits 2025-01-25 08:23:04 +03:00
David DeGraw
4780f70ea2 Improve mod installation instructions
Also improved uplink setup and used a better source for mod files.
2025-01-25 08:23:04 +03:00
NightFox
98a04c7764 FIx Matrix*x4_LoadIdentity (xash3d_mathlib.h) 2025-01-25 08:21:21 +03:00
Alibek Omarov
7da9772143 engine: check for macOS bundle in SDL_GetBasePath, and fallback to SDL_GetPrefPath for our directory 2025-01-23 22:58:19 +03:00
Alibek Omarov
f0b29bac1b engine: client: add cl_trace_consistency used to print which resources server wants to check 2025-01-23 13:57:17 +03:00
Alibek Omarov
7b5ff606bd 3rdparty: extras: enable compression of extras.pk3 2025-01-23 13:08:53 +03:00
Alibek Omarov
3e22ee64ae scripts: waifulib: zip: add support for passing compression level on Python 3.7. Exclude PNG files from compression 2025-01-23 13:08:21 +03:00
Alibek Omarov
c86c45503f engine: replace few more Xash3D strings by XASH_ENGINE_NAME macro 2025-01-23 10:33:22 +03:00
Alibek Omarov
ef75a4c28d engine: rename pref path on Mac to Xash3D FWGS by allowing for custom branding through XASH_ENGINE_NAME macro 2025-01-23 10:24:55 +03:00
Alibek Omarov
bccd3f2271 engine: pass launcher's default game directory all the way down to Platform_Init, so we mount correct extras.pk3 on Mac 2025-01-23 10:22:53 +03:00
Tom Kidd
7bbc3e8238 Made modifications for Mac App Bundle
- Looks for game data in SDL pref path (Application Support)
- Sets XASH3D_EXTRAS_PAK1 to SDL base path (Resources dir in App Bundle
- Added option to force search for SDL dylib via pkgconfig on Darwin instead of Framework (option for Mac Source Ports build process)
2025-01-23 10:15:47 +03:00
Alibek Omarov
c34e0c66d9 engine: add fuzzing target for Mod_LoadModel 2025-01-23 10:12:32 +03:00
Alibek Omarov
e5d80878b8 scripts: waifulib: add asan-only build type 2025-01-23 10:11:56 +03:00
Alibek Omarov
1e075d25b7 engine: make LZSS compression optional for 49 protocol, disable it for local clients (singleplayer) 2025-01-22 21:18:19 +03:00
Alibek Omarov
d29e53481d engine: client: remove unused S_StreamAviSamples 2025-01-22 20:01:11 +03:00
Alibek Omarov
d23a2fd2df engine: client: stub AVI_StreamSound RenderAPI call, it is not used in ffmpeg-based video playback code 2025-01-22 20:00:50 +03:00
Alibek Omarov
f6f15cc204 engine: mod_studio: validate studio self-reported length before loading model 2025-01-22 20:00:13 +03:00
Alibek Omarov
4f2249ed8e ref: support loading sprites with truncated palette 2025-01-22 19:24:00 +03:00
Alibek Omarov
9f322df498 engine: imagelib: handle loading truncated palette files, by filling remaining bytes with zeros 2025-01-22 19:21:51 +03:00
Alibek Omarov
b554d7e215 ref: properly handle unloading sprites that aren't loaded completely 2025-01-22 19:20:20 +03:00
Alibek Omarov
719093c10b ref: properly return false to the engine if renderer refuses to load the model for some reason 2025-01-22 19:13:23 +03:00
Alibek Omarov
c2da140ccc engine: model: do not crash if renderer refused to load this model 2025-01-22 19:12:43 +03:00
Alibek Omarov
375998dffb Cleanup xash3d_types.h from engine-specific macros and types 2025-01-22 15:10:18 +03:00
Alibek Omarov
787444f63d engine: simplify sound fx allocation 2025-01-22 14:46:40 +03:00
Alibek Omarov
0c50076ff0 engine: zone: ensure poolcount is zero on Memory_Init 2025-01-22 13:49:51 +03:00
Alibek Omarov
8ce01c38c7 engine: http: ensure we don't write broken decompressed files 2025-01-22 13:49:24 +03:00
Alibek Omarov
cac6206984 engine: client: allocate everything related to sounds in the sound pool 2025-01-22 13:49:02 +03:00
Alibek Omarov
a5c88bdda9 engine: touch: allow smoother migration from old engine touch configs by stripping .tga extension 2025-01-22 13:40:47 +03:00
Alibek Omarov
fc017286a6 engine: base_cmd: slightly faster search based on assumption that list is always ordered 2025-01-22 05:41:52 +03:00
Alibek Omarov
20d4e3e719 engine: fix flexible array member usage in case of null terminated strings
(woops)
2025-01-22 05:41:52 +03:00
Alibek Omarov
4eaa32fc10 engine: whereami: sync with upstream 2025-01-21 20:03:20 +03:00
Alibek Omarov
b7c025b167 filesystem: android: request buffer for Android asset LoadFile implementation
Might be better than asking for random access and then only reading forward.
2025-01-21 19:50:14 +03:00
Alibek Omarov
f29c588e0f filesystem: take code from DarkPlaces to properly read compressed files 2025-01-21 18:47:42 +03:00
Alibek Omarov
2065ef143a engine: server: fix ent_create under PrimeXT 2025-01-21 16:09:56 +03:00
Alibek Omarov
a5c02c85f0 filesystem: wad: get rid of sentinel value at the end of wad_types array 2025-01-21 15:26:06 +03:00
Alibek Omarov
9a8761f1d8 engine: client: remove unused NetAPI_ValueForKey function 2025-01-21 15:17:03 +03:00
Alibek Omarov
273990d292 engine: cmd: store command description in flexible array member 2025-01-21 15:06:08 +03:00
Alibek Omarov
0e27d8717c ref: remove servercount from texture struct, Xash don't use it (and it's also harmful anyway) 2025-01-21 14:36:42 +03:00
Alibek Omarov
8a9b209db0 engine: zone: optimize memory usage a bit by compressing memheader_t better while keeping it efficient
It saves about 40 kilobytes of memory.
2025-01-21 14:04:33 +03:00
Alibek Omarov
232d1f8583 engine: make separate mempools for cmds, cvars and basecmd 2025-01-21 11:26:35 +03:00
Alibek Omarov
6cfa5877a4 engine: base_cmd: decrease base cmd hash size 2025-01-21 11:25:33 +03:00
Alibek Omarov
154df00f94 filesystem: don't create full path to rwdir, as cwd is always equal to rwdir
Fixes updating gameinfo.txt.
2025-01-20 19:53:04 +03:00
Alibek Omarov
c5649c94d5 engine: client: fix delta entity packet flush on GoldSrc protocol
Implement counting playerbytes for more accurate net_graph, even if we're
skipping this delta frame.
2025-01-20 19:38:44 +03:00
Alibek Omarov
a1da10fe38 filesystem: set default values for quick/autosave aged count 2025-01-20 16:06:57 +03:00
Andrey Akhmichin
17a71ffc96 ci: upgrade freebsd tasks. 2025-01-19 04:36:07 +03:00
Andrey Akhmichin
4609fbc0c5 Documentation: supported-mod-list.md: update links. 2025-01-19 04:35:17 +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
870fad5606 public: tests: remove Q_colorstr tests 2025-01-18 10:36:11 +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
626c5e44f6 engine: client: use existing engine functions for some client API functions 2025-01-18 09:44:21 +03:00
Alibek Omarov
c906aa0106 ref: gl: make DrawGLPoly and R_TextureAnimation private to brush rendering code 2025-01-18 08:39:31 +03:00
Alibek Omarov
0a41b70e44 ref: gl: store ripple texture in texture's fb_texturenum as it's only used for water and water don't have luma 2025-01-18 08:38:43 +03:00
Alibek Omarov
ea338adc46 ref: gl: make GL_FrustumSetPlanme private to the frustum implementation 2025-01-18 08:34:25 +03:00
Alibek Omarov
5fa777578b ref: gl: fix detail texture leak, fix texture leak when texture have default texture set (in which case it still might have other textures set) 2025-01-18 08:33:20 +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
2d51d23d89 engine: client: don't send commands until ca_active on Xash protocol 2025-01-17 15:06:59 +03:00
Alibek Omarov
b5b6dad39c engine: fix a typo in scroll lock (missing L) 2025-01-15 23:49:13 +03:00
Alibek Omarov
a5619e9960 engine: take keydefs header from Quake-2 source code (client/keys.h) 2025-01-15 23:47:55 +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
1d4f7b2f94 engine: server: slight refactoring, make SV_ModelHandle inlined, move PlayerIsFrozen to sv_client, fix packet loss data type 2025-01-14 12:09:23 +03:00
Alibek Omarov
38c82a3f76 engine: don't bother calculating crc32 for local clients for better performance (thanks @tyabus for the idea) 2025-01-14 11:55:28 +03:00
Alibek Omarov
785632a437 filesystem: minor refactoring in MD5_HashFile, use initializer instead of memset, limit buffer variable scope 2025-01-14 11:36:13 +03:00
Alibek Omarov
4be75af214 engine: client: always write buffer.dat so we will be able to request it from users. Append protocol number to it 2025-01-14 11:31:10 +03:00
Alibek Omarov
dcdca01e86 ref: gl: declare VBO globals static 2025-01-14 11:30:35 +03:00
Alibek Omarov
201d9c8f80 public: split VCS info to separate file for slightly better compilation speeds 2025-01-13 20:02:59 +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
3532a77643 public: move git commit and branch private to libpublic 2025-01-13 20:02:59 +03:00
Alibek Omarov
35dc072b26 filesystem: on Android, assume all paths are case-sensitive because doing Linux-specific ioctl check crashes FUSE driver and kills our app 2025-01-13 13:56:15 +03:00
Alibek Omarov
f92a3695b3 filesystem: fix fd leak in Platform_GetDirectoryCaseSensitivity 2025-01-13 13:54:42 +03:00
Alibek Omarov
a7b776f3b9 Revert "wscript: disable /showIncludes based msvcdeps for now, it causes issues with non-English locales"
Add option --enable-msvcdeps that we only enable on CI.

This reverts commit e58007aab3.
2025-01-10 21:48:43 +03:00
Alibek Omarov
f2fb668c9e android: now run exit() from Java side, as the next engine run is expected to be clean 2025-01-09 21:29:01 +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
692bcc4073 engine: client: cl_tent: rewrite fizz effect, fix incorrect positoning along the way 2025-01-09 19:23:40 +03:00
Alibek Omarov
823642b10d readme: add link to ipa-reader.com for Xash word pronounciation [skip ci] 2025-01-09 17:13:56 +03:00
Alibek Omarov
07189ca2f5 engine: client: remove spammy message about not precached model on client side
Recently, mods (Brutal Half-Life v3 and MMod) started to call this function
every frame as a hacky way to detect presence of some model on the level. I
don't know why they do that, but users (who co-incidentally run engine with
-dev) has been complaining about console spam.

This is why we can't have things.
2025-01-09 17:10:54 +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
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
Alibek Omarov
bec526a77e utils: xar: fix xar build 2024-12-22 07:11:53 +03:00
Alibek Omarov
4d1119391a ref: gl: get rid of NULL sentinels at the end of arrays 2024-12-22 07:11:28 +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
ce06b1d3d7 engine: client: allow CL_GetLocalPlayer to return NULL rather than halting whole server 2024-12-20 05:47:46 +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
fdcf267fe3 engine: client: fix usermessage being removed because of case-sensitivity (message names are case-insensitive when transferred from server to client) 2024-12-20 03:05:14 +03:00
Alibek Omarov
7f2ebd1b5e engine: server: add command sv_list_messages to print all registered user messages 2024-12-20 02:37:38 +03:00
Alibek Omarov
68b2d9f269 engine: server: fix possible message number inconsistency if server requested it twice 2024-12-20 02:37:01 +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
0637dbaab1 engine: client: refactor and simplify CL_RegisterUserMessage 2024-12-20 01:51:24 +03:00
Alibek Omarov
85388e97c1 engine: client: add command cl_list_messages to print all registered user messages 2024-12-20 01:51:24 +03:00
Alibek Omarov
de961eb45e engine: client: use new extension for creating temporary files for demoheader 2024-12-19 07:10:02 +03:00
Alibek Omarov
3d60770b84 filesystem: add flag to open files in a RAM
On Linux, it uses memfd_create syscall that can be found on Linux 3.17 and
higher. By default memfds are executable, so we set MFD_NOEXEC_SEAL flag to
prevent execution at creation time.
2024-12-19 04:22:25 +03:00
Alibek Omarov
93c5853356 engine: server: merge SV_FindBestBaseline for normal entities and static entities into single function 2024-12-18 06:57:43 +03:00
Alibek Omarov
98e587285b engine: client: allocate static entities only when server sends static entity packet 2024-12-18 06:57:43 +03:00
Alibek Omarov
2aa13c8347 public: xash3d_mathlib: include string.h with memset definition 2024-12-17 21:58:42 +03:00
Alibek Omarov
53344771fd public: xash3d_mathlib: get rid of matrix identity global macros 2024-12-17 21:01:51 +03:00
Alibek Omarov
2373743920 public: mention FSF in copyright header, as some of the libc extensions callbacks were derived from glibc [skip ci] 2024-12-17 20:41:55 +03:00
Alibek Omarov
90a3497afe public: improve Q_strncat fallback implementation 2024-12-17 20:40:19 +03:00
Alibek Omarov
339aebb08c public: add Q_strnlen with fallback to memchr 2024-12-17 20:03:09 +03:00
Alibek Omarov
b4afe390d6 public: slight refactoring 2024-12-17 19:57:27 +03:00
Alibek Omarov
ca0c5f929a engine: slight refactoring of lightstyle handling functions 2024-12-17 17:04:26 +03:00
Alibek Omarov
48cc526c7e engine: client: fix possible svc_pings misparse by reading until null bit is encountered 2024-12-15 18:22:40 +03:00
Alibek Omarov
3d30dc8d02 mainui: update 2024-12-08 01:58:39 +03:00
Alibek Omarov
75adb2e686 engine: server: for entities physics code directly use cvar values rather than movevars. Leave movevars to player movement only 2024-12-08 01:39:24 +03:00
Alibek Omarov
45787a87b3 android: try to enable poly-opt and lto optimizations for release builds 2024-12-05 22:33:22 +03:00
Alibek Omarov
0a85734ae7 engine: server: avoid useless copying in SV_GetClientIDString for bots or local clients 2024-12-05 19:49:51 +03:00
Alibek Omarov
b28c1186b2 filesystem: fix loading dlls by full path as required by metamod-r 2024-12-05 19:20:13 +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
964744d330 engine: client: fix broken build due to incorrect constant being used 2024-12-05 14:20:43 +03:00
Alibek Omarov
f5d635b67b engine: client: allow VOX words use other formats than WAV 2024-12-05 12:41:56 +03:00
Alibek Omarov
d0112a98b5 engine: client: improve error reporting in VOX_LoadSound, allow longer result paths, fix possible buffer overflow 2024-12-05 12:41:56 +03:00
Alibek Omarov
614b9113ad engine: platform: as an exception, allow calling direct platform-specific implementations of Platform_Sleep to make them inlined 2024-12-04 18:37:55 +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
de1361d99d android: don't show unfinished downloads. Set progress to 1.0f when done 2024-12-04 17:08:55 +03:00
Alibek Omarov
e731775f70 android: cleanup unused imports 2024-12-04 16:27:53 +03:00
Alibek Omarov
342d61b283 engine: platform: sdl: always call SDL_Quit in Platform_Shutdown 2024-12-04 16:14:56 +03:00
Alibek Omarov
b030cdb4e3 engine: client: add NULL check to prevent crash if in_graph key doesn't exist in client.dll 2024-12-03 21:56:06 +03:00
Alibek Omarov
18a973d4f2 engine: server: always set sv_background to zero on server shutdown rather than on server dll unload 2024-12-03 21:02:37 +03:00
Alibek Omarov
51fa7d2611 wscript: strip lib prefix from new opus and vorbis targets, don't link them in dedicated 2024-12-02 21:59:11 +03:00
Alibek Omarov
6b6d3b3770 3rdparty: opusfile: wscript: hack building on Android with API level lower than 24
In API level 21 **and** _FILE_OFFSET_BITS == 64 we don't get fseeko/ftello functions.
To avoid increasing API level, just set _FILE_OFFSET_BITS to some bogus value.
Undefining it doesn't work as opusfile sets it to 64 automatically.
2024-12-02 21:28:36 +03:00
Alibek Omarov
fd5e3fbbb9 android: configure waf with bundled deps to not look for system libs, as Android doesn't have any 2024-12-02 21:10:10 +03:00
Alibek Omarov
6247bbc629 3rdparty: libogg: wscript: remove useless defines 2024-12-02 21:10:00 +03:00
Alibek Omarov
0181e640c9 3rdparty: wscript: set explicit names for correct dependency calc of generated files
This helps avoid issue when the bzip2 or libogg are compiled before header is
generated for them.
In theory, we shouldn't do that, but I guess dependency calculation through
include directives doesn't work when the file doesn't exist.
2024-12-02 21:07:30 +03:00
Alibek Omarov
26230596ba 3rdparty: bzip2: wscript: bring back generating bz_version.h.in now that cmake.py has subst support 2024-12-02 21:07:12 +03:00
Alibek Omarov
884e052d98 scripts: waifulib: cmake: replicate Waf behavior and always add build directories to the include path.
Also, set cmake minimum required version to 3.5 only to shut up deprecation notice.
2024-12-02 21:06:07 +03:00
Alibek Omarov
5516180ed8 scripts: waifulib: cmake: add limited subst feature support 2024-12-02 21:05:59 +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
Alibek Omarov
eb64ffcec9 uncrustify: sync with fakk2-sdk and make some fixes on star ptr alignments 2024-12-02 21:05:28 +03:00
Alibek Omarov
7eba5a994d wscript: specifically look for opus 1.4, as 1.5 have broken custom modes
Link to GitHub issue: https://github.com/xiph/opus/issues/374
2024-12-02 21:05:08 +03:00
Alibek Omarov
c39d2e243a wscript: look for system provided vorbis and opus dependencies
In some configuration, like Flatpak, on dev machines or when packaging for *nix
we can safely link with system libraries.
2024-12-02 21:04:28 +03:00
SNMetamorph
3661af921e readme: added mention of Ogg Vorbis & Ogg Opus formats support 2024-12-02 20:36:33 +03:00
SNMetamorph
4581755f9b 3rdparty: libogg: added generating of config_types.h 2024-12-02 20:36:33 +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
485d4324f8 3rdparty: libvorbis & libvorbisfile combined into one wscript 2024-12-02 20:36:33 +03:00
SNMetamorph
881788c0c9 3rdparty: libogg & opusfile wscript fixes 2024-12-02 20:36:33 +03:00
SNMetamorph
73cf55b958 wscript: link sound format related libraries in XASH_DEDICATED build mode 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
SNMetamorph
770054daaf engine: soundlib: implemented Ogg Opus sounds streaming 2024-12-02 20:36:33 +03:00
SNMetamorph
2ad5066271 engine: soundlib: different Ogg sound formats split to separate files 2024-12-02 20:36:33 +03:00
SNMetamorph
99acd64203 engine: soundlib: implemented Ogg Vorbis sounds streaming 2024-12-02 20:36:33 +03:00
SNMetamorph
86154f81aa engine: soundlib: allowed resampling sounds with rate >44kHz 2024-12-02 20:36:33 +03:00
SNMetamorph
e982b7911f engine: soundlib: implemented Ogg Opus sounds playback 2024-12-02 20:36:33 +03:00
SNMetamorph
4e138ee795 engine: wscript: link libopusfile dependency 2024-12-02 20:36:33 +03:00
SNMetamorph
8e5d0a6425 3rdparty: opusfile: added wscript for libopusfile 2024-12-02 20:36:33 +03:00
SNMetamorph
33901afa57 3rdparty: added libopusfile submodule 2024-12-02 20:36:33 +03:00
SNMetamorph
8fce7dc78e engine: soundlib: initially implemented Ogg Vorbis sounds playback 2024-12-02 20:36:33 +03:00
SNMetamorph
d618b817ca engine: wscript: link libvorbisfile dependency 2024-12-02 20:36:33 +03:00
SNMetamorph
914be8dbd7 3rdparty: vorbis: added wscript for libvorbisfile 2024-12-02 20:36:33 +03:00
SNMetamorph
9e67a90b25 3rdparty: vorbis: added wscript for libvorbis 2024-12-02 20:36:33 +03:00
SNMetamorph
44e67c987b 3rdparty: added Vorbis submodule 2024-12-02 20:36:33 +03:00
SNMetamorph
3c6c90c1e7 3rdparty: libogg: added wscript for libogg 2024-12-02 20:36:33 +03:00
SNMetamorph
3e8bd16d2b 3rdparty: added libogg submodule 2024-12-02 20:36:33 +03:00
Alibek Omarov
fb964b8686 mainui: update 2024-12-01 11:34:44 +03:00
Alibek Omarov
38ef16b08b engine: server: do not unload server library on win327 2024-12-01 11:21:02 +03:00
Alibek Omarov
1f5c97964b engine: return full path in server's pfnGetGameDir, if possible 2024-11-30 09:28:30 +03:00
Alibek Omarov
4798cd6d1e filesystem: add new export to get fs_rootdir path 2024-11-30 09:28:30 +03:00
Alibek Omarov
df4194ca57 engine: net_chan: check BZ2 functions return value and log if it's not BZ_OK 2024-11-28 19:27:13 +03:00
Alibek Omarov
888599677e engine: net_chan: fix size of outgoing BZ2 compressed packets 2024-11-28 18:50:55 +03:00
Alibek Omarov
22da42b121 3rdparty: mainui: update 2024-11-27 16:59:18 +03:00
Alibek Omarov
5ad8bc3ba4 3rdparty: update submodules 2024-11-27 16:40:14 +03:00
Alibek Omarov
0154ffa060 wscript: try to automatically set console subsystem flag depending on target features
Remove subsystem flag from shlibs and stlibs, it's only required for executables.
2024-11-27 15:43:13 +03:00
Alibek Omarov
cb3f5a74a8 wscript: don't check for cmake twice 2024-11-27 15:08:42 +03:00
Alibek Omarov
b3c7dbe3e4 wscript: don't install import libraries 2024-11-27 15:08:28 +03:00
Alibek Omarov
6b24b263ab engine: host: expose new -clientport settings. Realign options 2024-11-25 02:53:28 +03:00
Alibek Omarov
75b69fbf85 engine: net_ws: allow setting custom client port 2024-11-25 02:51:40 +03:00
Alibek Omarov
23b410ccb0 engine: mod_bmodel: optimize loading wad textures by directly loading it from the archive through new filesystem functions 2024-11-23 15:04:05 +03:00
Alibek Omarov
bf6a9cb0e7 engine: client: make R_GetTextureParms inlined 2024-11-23 15:02:13 +03:00
Alibek Omarov
689e29bc42 engine: client: only load paused icon when requested 2024-11-23 15:01:50 +03:00
Alibek Omarov
b316af13d6 engine: client: only load tile image when requested 2024-11-23 15:01:50 +03:00
Alibek Omarov
e7f939c87b engine: always add .wad extension to wadlist names to simplify how it's being used 2024-11-23 14:01:09 +03:00
Alibek Omarov
b94446161e filesystem: add functions to directly look up into archives 2024-11-23 13:56:53 +03:00
Alibek Omarov
567cf44111 filesystem: wad: remove unused variable in FS_FindFile_WAD 2024-11-23 13:56:25 +03:00
SNMetamorph
9244bdc7db ref: gl: added gl_fog cvar for better GoldSrc compatibility 2024-11-21 23:11:53 +03:00
Alibek Omarov
0db2597d1e engine: platform: psvita: try to explicitly export strtok() function 2024-11-21 05:31:43 +03:00
Alibek Omarov
744d5d1141 ci: include proguard mapping files archive 2024-11-20 17:05:46 +03:00
Alibek Omarov
778315da5f android: let's implement proguard rules for SDL2 2024-11-20 17:05:46 +03:00
Alibek Omarov
1acda22ad4 android: CMakeLists: try to build smaller SDL2 2024-11-20 12:55:26 +03:00
Alibek Omarov
4cb1f69475 android: remove unrelated readme file 2024-11-20 12:42:56 +03:00
Alibek Omarov
f1806cbf2e android: add SDL classes and some engine methods to proguard rules file 2024-11-20 12:41:38 +03:00
Alibek Omarov
a4beb7d493 android: remove fastlane, as we don't really need it anymore 2024-11-20 12:05:58 +03:00
Alibek Omarov
880ae0fe7c android: change default arguments to -console -log, as -dev enables cheats which may be undesired for users 2024-11-20 10:36:53 +03:00
Alibek Omarov
cd3cc7e696 android: FileCopyWorker: implement simple progress tracking 2024-11-20 10:36:24 +03:00
Alibek Omarov
9e9a9847fc android: fix xash-extras assets path 2024-11-20 08:49:42 +03:00
Alibek Omarov
cb5f5baa2b Revert "wscript: as an experiment, add -pipe flag for better compilation speeds"
This reverts commit 6bfa5ce600.
2024-11-20 08:13:02 +03:00
Alibek Omarov
edef41fb71 ci: android: fix deploying APK to artifacts 2024-11-20 08:08:35 +03:00
Alibek Omarov
6bfa5ce600 wscript: as an experiment, add -pipe flag for better compilation speeds 2024-11-20 08:08:16 +03:00
Alibek Omarov
d1f70bfe2c scripts: waifulib: cmake: filter out -MMD compiler flag from generated CMake flags 2024-11-20 07:53:12 +03:00
Alibek Omarov
a56f512dc3 ci: fix signing Android APK 2024-11-20 07:43:17 +03:00
Alibek Omarov
7c88fd0a17 ci: android: fix SDL unpacking once again 2024-11-20 07:33:06 +03:00
Alibek Omarov
bec23c6d57 ci: don't run Gradle Daemon to not waste time 2024-11-20 07:31:54 +03:00
Alibek Omarov
81197b1aa4 android: bump NDK to r27c 2024-11-20 07:29:36 +03:00
Alibek Omarov
8205e22465 ci: android: fix SDL unpack, don't waste time installing NDK, gradle will do it 2024-11-20 07:29:21 +03:00
Alibek Omarov
8407af17f4 android: don't add verbose flags to waf, fix SDL path on CI 2024-11-20 07:23:40 +03:00
Alibek Omarov
22fef6fa36 android: add forgotten CMakeLists.txt 2024-11-20 07:15:50 +03:00
Alibek Omarov
88f91d3959 ci: download SDL release tarball for Android 2024-11-20 07:04:47 +03:00
Alibek Omarov
b63abe1cf2 android: use correct build flavor 2024-11-20 06:56:58 +03:00
Alibek Omarov
cd3dc78d4d Include android project into the sources 2024-11-20 06:32:16 +03:00
Alibek Omarov
ddf5a01dfc 3rdparty: MultiEmulator: update 2024-11-20 06:32:16 +03:00
Alibek Omarov
10e8790311 filesystem: VFileSystem009: fix missing override keyword on a virtual method 2024-11-20 06:32:16 +03:00
Alibek Omarov
f04a26901c Add 'android/' from commit 'add509bf9ebaa488e2afe2cdc158a0e6725cd654'
git-subtree-dir: android
git-subtree-mainline: b9f4f1eba4
git-subtree-split: add509bf9e
2024-11-20 05:31:39 +03:00
Alibek Omarov
b9f4f1eba4 engine: client: fix engine features masking for 48 and 49 protocol 2024-11-20 04:16:44 +03:00
Alibek Omarov
8b0d49f036 ci: update SDL2 to 2.30.9 2024-11-18 20:03:34 +03:00
Alibek Omarov
e94a2c900f ci: use macos-13, as macos-12 is deprecated by GitHub 2024-11-18 19:55:32 +03:00
Alibek Omarov
bfb84a7ac4 ci: rework Linux build scripts, allow crosscompiling with whatever is included in Ubuntu 20.04 (which is used on GitHub Actions now) repositories 2024-11-18 19:55:32 +03:00
Alibek Omarov
fa272d9d93 public: add optional feature for COM_ParseFileSafe to ignore shell like hash symbol prefixed comments 2024-11-18 14:14:49 +03:00
Alibek Omarov
87f0217588 engine: client: add cl_showcmd, yet another debugging aid to print current usercmd state 2024-11-18 10:42:39 +03:00
Alibek Omarov
c4f71f1a44 engine: client: remove unncesseray int <-> qboolean branch in CL_GetMessage 2024-11-18 10:42:39 +03:00
Alibek Omarov
af332eb8ac engine: client: validate dem_usercmd size before reading it into the buffer 2024-11-18 10:42:39 +03:00
Alibek Omarov
ac6dc2c2d3 engine: platform: directly call __NR_gettid syscall for compatibility with older systems 2024-11-18 10:42:39 +03:00
Alibek Omarov
a29b6772b9 engine: mod_bmodel: fix wadlist, wad file names don't have an extension there 2024-11-18 04:53:48 +03:00
Alibek Omarov
3691f02359 public: crtlib: make Q_strchrnul return non-const pointer, like strchr 2024-11-17 13:56:31 +03:00
Alibek Omarov
622d88eeba engine: client: only check active tempentities when detaching player following tents 2024-11-17 13:38:14 +03:00
Alibek Omarov
56c19c4f5a engine: client: make some simple functions, like querying entity by index, getting local player, inline 2024-11-17 13:37:32 +03:00
Alibek Omarov
c5471fe6fd engine: server: make SV_IsPlayerIndex and SV_HavePassword inline 2024-11-17 13:36:40 +03:00
Alibek Omarov
046b1da8a8 ref: fix some possible off by one errors 2024-11-17 13:26:03 +03:00
Alibek Omarov
8fd5a5af96 filesystem: simplify ambient number bound check 2024-11-17 13:04:44 +03:00
Alibek Omarov
229f1560b0 engine: fix some possible off by one errors 2024-11-17 13:04:20 +03:00
Alibek Omarov
8f7f311f60 engine: mod_bmodel: simplify wadlist parser 2024-11-17 06:28:02 +03:00
Alibek Omarov
721c8043f1 public: optimize COM_FileExtension 2024-11-17 06:20:52 +03:00
Alibek Omarov
31a86d8af2 engine: use new Q_splitstr to work with single character delimited strings 2024-11-17 05:35:36 +03:00
Alibek Omarov
ac7617990a public: add Q_splitstr function 2024-11-17 05:34:29 +03:00
Alibek Omarov
0813d2c7ce engine: mod_bmodel: merge Mod_LoadColoredLightmap and Mod_LoadDeluxemap into a single function 2024-11-17 04:59:52 +03:00
Alibek Omarov
0ceb0d9e11 engine: provide compatible replacement for CompareFileTime function 2024-11-17 04:33:13 +03:00
Alibek Omarov
30db748dcb engine: net_http: don't consider EISCONN an error, just proceed to next step 2024-11-17 03:13:39 +03:00
Alibek Omarov
399d549d0c engine: net_ws: request Winsock 2 2024-11-17 03:13:39 +03:00
Alibek Omarov
77fb2d0eb2 engine: net_ws: fix misleading error when comparing IPv6 addresses 2024-11-15 16:41:42 +03:00
Alibek Omarov
ea88bb88b2 engine: add secondary master server 2024-11-15 15:25:40 +03:00
Alibek Omarov
190e4a5e8a engine: client: don't kill entity's beams if this entity number was never used on client
Fixes issue when beam was sent over to client before it's start point entity
(due to PVS, for example)
2024-11-15 08:07:21 +03:00
Alibek Omarov
823dc3d46f engine: net_http: don't consider EALREADY on connect() an error 2024-11-14 22:55:27 +03:00
Alibek Omarov
779cb2f721 engine: server: use calloc in SV_AllocString, allocate strings at stringspool preventing memory leaks. Fix strings deduplication on 64-bits. 2024-11-13 23:36:53 +03:00
Alibek Omarov
88c42d50f2 engine: server: always allocate svgame.stringspool, it's used to track temp string allocations like in SV_CopyString
Potentially fixes memory leakage on 64-bit when game uses instanced baselines or consistency lists
2024-11-13 23:35:45 +03:00
Alibek Omarov
a749bb8ef1 engine: server: reset str64 statistics on server deactivate 2024-11-13 23:32:05 +03:00
Alibek Omarov
723cd8e26c engine: server: adjust 64-bit string pool size depending on max_edicts value (65k for each 1024 edicts) 2024-11-13 23:30:54 +03:00
Alibek Omarov
a6592e7776 public: add test to check that pair Q_buildos and Q_buildarch return expected (for this build) data 2024-11-12 21:24:48 +03:00
Alibek Omarov
4342689e73 engine: net_http: fix build with dedicated server 2024-11-12 14:46:06 +03:00
Alibek Omarov
8a2a7d1180 engine: rework how HTTP finite-machine works, use function pointers instead of enum. Preliminary chunked transfer and compression support. (#1862) 2024-11-11 10:30:15 +03:00
Vladimir
199e226758 Documentation updates and additions (#1875)
* Documentation: actualize and prettify entity tools instructions

* Documentation: added article about NAT bypass feature

* Documentation: updated GoldSrc protocol support article
2024-11-11 10:29:24 +03:00
Alibek Omarov
16ed6cbdcb engine: mark some functions as never returning nullptr 2024-11-07 16:11:58 +03:00
Alibek Omarov
b51d1a4e2e public: mark some functions as never returning nullptr 2024-11-07 16:11:40 +03:00
Alibek Omarov
534adc9630 common: xash3d_types: add returns nonnull attribute 2024-11-07 15:46:10 +03:00
Alibek Omarov
d15949d2e8 Rename _format to FORMAT_CHECK 2024-11-07 14:24:07 +03:00
Alibek Omarov
43609bc77c mainui: update 2024-11-07 14:12:21 +03:00
Alibek Omarov
3917e096ea engine: client: the most important change since forever, move downloading message a bit to the right so it looks better on 640x480 2024-11-07 14:12:10 +03:00
Alibek Omarov
d1a571201b engine: client: s_mix: attempt to fix S_InterpolateCubic2x buffer overflow 2024-11-07 14:12:10 +03:00
Alibek Omarov
8a8cdd2927 engine: client: another possible null pointer dereference 2024-11-07 14:12:10 +03:00
Alibek Omarov
3ef4acecb5 Documentation: ports: clarify support for some merged but not tested ports. Add Dreamcast port repository by @maximqaxd 2024-11-07 11:23:21 +03:00
Alibek Omarov
e8c1fc958f mainui: update 2024-11-07 10:18:16 +03:00
Alibek Omarov
08bc4ccec4 3rdparty: opus: wscript: implement looking for C99 VLA or alloca 2024-11-07 10:15:19 +03:00
Alibek Omarov
6ae62e3bb1 engine: platform: posix: include sys/filio.h to have FIONBIO declaration for networking code 2024-11-07 07:42:07 +03:00
Alibek Omarov
397f2f208a engine: wscript: link libsocket on Solaris 2024-11-07 07:41:37 +03:00
Alibek Omarov
8bebf698ef ref: fix out of bound access when the entity is marked as player but has invalid number
It's possible when client.dll passes a self allocated entity and wants to draw
it as player but doesn't initialize or set the entity number correctly.
2024-11-07 07:18:14 +03:00
Alibek Omarov
6a2a2c33ee engine: client: don't go out of bounds if studio model don't have any sequences
Fixes models/null.mdl in Master Sword Rebirth. It's technically a valid model, though
completely useless for renderer.
2024-11-07 07:13:20 +03:00
Alibek Omarov
0adda483c5 public: add definitions for Solaris 2024-11-07 07:12:30 +03:00
Alibek Omarov
d8eb918cea filesystem: rename IVFileSystem009 to IFileSystem to avoid UBsan errors when debugging a mod that calls this interface using original headers 2024-11-06 19:46:22 +03:00
Alibek Omarov
96b95db7c8 filesystem: compile with rtti, but still disable exceptions 2024-11-06 19:46:22 +03:00
Alibek Omarov
b1915106b0 vgui_support: update 2024-11-06 19:46:22 +03:00
Alibek Omarov
0d2a8488ae engine: client: replace illegal for infostring characters in server info got from TSource Engine Query 2024-11-06 19:46:22 +03:00
Alibek Omarov
a52c8aa291 ref: soft: as an experiment, reformat ref_soft as it's easier to notice config inaccuracies 2024-11-06 02:41:38 +03:00
Alibek Omarov
fbbafb45a3 Add uncrustify config file [skip ci] 2024-11-06 02:40:26 +03:00
Alibek Omarov
659adca473 ref: soft: remove dead, commented out code 2024-11-06 02:17:06 +03:00
Alibek Omarov
38e8a581b6 engine: server: fix possible NULL dereference 2024-11-06 01:39:46 +03:00
Alibek Omarov
06e476e8c8 engine: reorder mstudiocache_t fields for better memory efficiency 2024-11-06 01:39:46 +03:00
Alibek Omarov
f529f06ea1 engine: use designated initializers to define BSP lumps. Reorder mlumpinfo_t for better memory efficiency 2024-11-06 01:39:46 +03:00
Alibek Omarov
159ded433d ref: gl: don't touch polygon offset when not drawing debug hulls as it breaks decals with VBO
Also correctly restore polygon offset state so decals gets drawn even with VBO
2024-11-06 01:39:46 +03:00
Alibek Omarov
c3b6422ad0 engine: common: add lzss fixes by nillerusr 2024-11-06 01:39:46 +03:00
Alibek Omarov
41b78c26ef engine: client: s_vox: fix incorrect check in VOX_FreeWord 2024-11-06 01:39:46 +03:00
Alibek Omarov
ca93c5b666 engine: client: touch: use FillRGBA to draw edit grid 2024-11-06 01:39:46 +03:00
Alibek Omarov
80f8b778a9 engine: client: cl_tent: more accurate R_FizzEffect 2024-11-06 01:39:46 +03:00
Alibek Omarov
8c5db5f980 engine: client: turn some asserts in texture remap code into proper nullptr checks 2024-11-06 01:39:46 +03:00
Alibek Omarov
3756361cfe engine: client: fix possible NULL dereference when setting up bbox for non-solid visent that somehow doesn't have a model 2024-11-06 01:39:46 +03:00
Alibek Omarov
5f3e167799 engine: client: prevent possible null dereference with malformed consistency info packet 2024-11-06 01:39:45 +03:00
Alibek Omarov
b7ed779f71 public: mathlib: fix incorrect usage of DotProductAbs, it will give the integer result, while float is expected 2024-11-06 01:39:45 +03:00
Alibek Omarov
fa6f564c12 engine: client: allow extended amount of commands to be sent for newer GoldSrc server. Also refactoring 2024-11-06 01:39:45 +03:00
Alibek Omarov
ad457f717b engine: client: no sense to check for position history pointers for NULL in CL_FindInterpolationUpdates, as they never are 2024-11-06 01:39:45 +03:00
Alibek Omarov
f95ce7f52d engine: client: cl_font: fix possible NULL dereference 2024-11-06 01:39:45 +03:00
Alibek Omarov
ec73f23e4a engine: client: rewrite R_RocketTrail for accuracy and fix potential uninitialized vectors 2024-11-05 17:43:09 +03:00
Alibek Omarov
2972d7c309 wscript: disable enum-float-conversion on clang 2024-11-03 04:24:54 +03:00
Alibek Omarov
4d003bc13f ref: remove Mod_LoadMapSprite from RefAPI 2024-11-03 02:59:44 +03:00
Alibek Omarov
4cb11861e4 engine: client: reimplement Mod_LoadMapSprite on engine side 2024-11-03 02:58:31 +03:00
Alibek Omarov
addd50467e engine: remove FillRGBABlend from RefAPI. FillRGBA now accepts rendermode parameter 2024-11-03 02:24:36 +03:00
Alibek Omarov
6cd2dbf178 engine: remove R_DrawTileClear from RefAPI 2024-11-03 02:21:38 +03:00
Alibek Omarov
f079e63737 engine: client: reimplement R_DrawTileClear on engine-side 2024-11-03 02:19:49 +03:00
Alibek Omarov
d807041aa5 engine: client: register sound cvars even if audio was disabled 2024-11-03 01:20:30 +03:00
Alibek Omarov
6153d7f168 engine: make CL_RunLightStyles accept lightstyles array pointer as an argument. Make necessary changes in renderers. 2024-11-03 01:20:30 +03:00
Alibek Omarov
e37feece4d engine: finally remove GetLightStyle, GetDynamicLight and GetEntityLight from RefAPI 2024-11-03 01:20:30 +03:00
Alibek Omarov
6cf11cb6cf ref: soft: migrate to new way to get lightstyles and dlights 2024-11-03 01:20:30 +03:00
Alibek Omarov
bb4e64ea58 ref: gl: migrate to new way to get lightstyles and dlights 2024-11-03 01:20:30 +03:00
Alibek Omarov
9ed55776a9 engine: add PARM_GET_*_PTR for lightstyles and dlights arrays 2024-11-03 01:20:30 +03:00
Alibek Omarov
b45bc9af67 engine: remove gamma functions from RefAPI 2024-11-03 01:20:30 +03:00
Alibek Omarov
2227e487c0 engine: client: explicitly set rendermode for R_ShowTree 2024-11-03 01:20:30 +03:00
Alibek Omarov
1f49ce599f engine: client: fix out of bound read in gamma table access functions 2024-11-03 01:20:30 +03:00
Alibek Omarov
8af995cc28 engine: introduce REF_GET_*_PTR for gamma tables 2024-11-03 01:20:30 +03:00
Alibek Omarov
b39d660189 ref: refactor R_BuildLightMap 2024-11-03 01:20:30 +03:00
Alibek Omarov
9608da5bf9 engine: move debug hulls rendering from renderer, implement through TriAPI
Bump RefAPI version to 9.
2024-11-02 22:57:26 +03:00
Alibek Omarov
d3adcf3185 ref: soft: fix misplaced lightmaps 2024-11-02 04:09:04 +03:00
Alibek Omarov
40c051fb6b ref: refactor R_AddDynamicLights 2024-11-02 04:08:40 +03:00
Alibek Omarov
015f1ba8c0 ref: gl: small optimization for brush model rendering passes, track the first and last texture id of a special surface (fullbrights, alpha chains, details..) 2024-11-02 03:24:54 +03:00
Alibek Omarov
c3de4a5c3b ref: gl: add fullbright textures to the list with VBO renderer 2024-11-02 02:18:43 +03:00
Alibek Omarov
09210e4316 wscript: add option to build with extended msurface_t from HL25 2024-11-02 02:16:59 +03:00
Alibek Omarov
93b382f174 wscript: move SUPPORT_BSP2_FORMAT definition to the main wscript file. Manually define REF_DLL in the build task 2024-11-02 01:57:33 +03:00
Alibek Omarov
42cf51c6aa wscript: don't look for amd64_x86 MSVC crosscompiler when using msvc-wine 2024-11-02 01:55:35 +03:00
Alibek Omarov
f7bc258c2f ref: gl: reduce copypasted branch at LM_UploadBlock 2024-11-01 19:06:09 +03:00
Alibek Omarov
9e1908fc6f engine: client: rewrite stupid comma separated single-line operations into more sane code 2024-10-30 22:01:41 +03:00
Alibek Omarov
6bdb3f6ea1 engine: don't save fps_override value as it's an experimental feature 2024-10-30 19:26:37 +03:00
Alibek Omarov
2fe94bceb6 engine: limit framerate during connection to GoldSrc servers to exactly 31 FPS, like GoldSrc 2024-10-30 19:25:48 +03:00
Alibek Omarov
371639f0dc engine: introduce fps_override to unlock the 200 FPS limit in multiplayer games to 1000 2024-10-30 18:28:55 +03:00
Alibek Omarov
f88d424ecd engine: client: don't make useless comparison, cl_cmdrate is always clamped between 10 and 100. 2024-10-30 18:16:47 +03:00
Alibek Omarov
c2ca80c889 engine: client: don't immediately send client packet after receiveing server packet or full update
It doesn't seem to be useful for anything. Instead, it completely breaks cl_cmdrate behavior, constantly
spamming server with move commands
2024-10-30 18:11:48 +03:00
Alibek Omarov
0313e19674 filesystem: strip upper directory access from FS_FindFile when FS_AllowDirectPath is set to true
Detailed explanation is available in the code comments.
2024-10-29 16:13:31 +03:00
Alibek Omarov
281d4359d0 Upgrade Freedesktop SDK to 24.08 2024-10-29 16:13:31 +03:00
Alibek Omarov
7b02c37fa7 engine: add generated by version line to the config and help.txt files
Remove an attempt to copyright generated files came from the original Xash3D.
2024-10-29 16:13:31 +03:00
Alibek Omarov
2ea0b0d60c engine: client: fix fire field additive transparency from 80 to 180 (thanks @autisoid!) 2024-10-28 20:13:52 +03:00
Alibek Omarov
d879e028cf engine: soundlib: snd_wav: fix clang warning 2024-10-28 15:32:25 +03:00
Alibek Omarov
3e7e81e078 engine: platform: android: sprinkle it with more const modifiers 2024-10-28 14:32:57 +03:00
Max Parry
cc53d59532 gha: adds SDL2 to OSX builds (resolves #1791) (#1855)
* updated build_apple.sh to copy over SDL2 from the Frameworks folder that it was installed in by dep_apple.sh
2024-10-28 12:58:46 +03:00
Alibek Omarov
319dea1f7d mainui: update 2024-10-28 12:22:10 +03:00
Alibek Omarov
48047c05b7 extras: update 2024-10-28 12:22:10 +03:00
Alibek Omarov
85b0273911 engine: client: check resource nIndex before writing it to the precache arrays 2024-10-28 12:22:10 +03:00
Alibek Omarov
eb72b6baee ref: gl: fix r_shadows and gl_vbo registration order. It must be registered before reading renderer config 2024-10-28 02:10:24 +03:00
Alibek Omarov
422addcbb6 public: make Q_atoi_hex public, check for 0x prefix 2024-10-28 02:09:05 +03:00
Alibek Omarov
4a58be2aa0 ref: gl: deregister timerefresh command in renderer, as it's renderer-specific 2024-10-28 01:59:39 +03:00
Alibek Omarov
562b54839c engine: client: console: fix printing multiline messages with CRLF, like HTTP headers 2024-10-28 01:58:47 +03:00
Alibek Omarov
639eaa9416 engine: split HTTP client into a separate file 2024-10-27 17:07:35 +03:00
Alibek Omarov
6c6cb65b30 mainui: update 2024-10-27 14:33:27 +03:00
Alibek Omarov
8ea8437e19 3rdparty: opus: downgrade to 1.4.0 2024-10-27 14:32:43 +03:00
Alibek Omarov
2656eb1aeb engine: fix A2S_GOLDSRC_INFO, it must always include Source Engine Query and a null terminator 2024-10-26 20:24:31 +03:00
Alibek Omarov
fa1e92b127 engine: request file from server if HTTP locations failed 2024-10-26 20:24:31 +03:00
Alibek Omarov
cff8ee13e6 engine: rcon refactoring. Use sizebuf_t to concatenate commands. Only call redirect when we're executing command. 2024-10-26 19:37:30 +03:00
Alibek Omarov
3956e3863e engine: make Netchan_TransmitBits accept const data 2024-10-26 19:19:37 +03:00
Alibek Omarov
9600218757 engine: client: send tempdecal.wad to GoldSrc servers 2024-10-26 19:16:59 +03:00
Alibek Omarov
2db7cb0d64 engine: client: when validating, we're supposed to send move and delta commands 2024-10-26 19:12:52 +03:00
Alibek Omarov
267a70d621 engine: common: don't print svc/clc_nop with net_recv/send_debug 2024-10-26 05:18:09 +03:00
Alibek Omarov
667bedab82 engine: client: allow reading upper directories for clc_fileconsistency. Initialize md5 digest, add note about servers relying on uninitialized md5 value in some cases. 2024-10-26 05:17:24 +03:00
Alibek Omarov
49990a0859 mainui: update 2024-10-26 05:15:55 +03:00
Alibek Omarov
f7c4cd9398 engine: client: allow case-insensitive goldsrc proto argument in connect and queryserver commands 2024-10-26 05:15:46 +03:00
Alibek Omarov
cd4f4d5ad4 engine: common: fix hpkextract command 2024-10-26 05:15:09 +03:00
Alibek Omarov
fe429fe213 engine: common: net_ws: fix HTTP request when server have custom port and/or doesn't have slash at the end of URL. Set Accept: */* just in case. 2024-10-26 05:14:51 +03:00
Alibek Omarov
0a24ca3fe2 engine: client: fix svc_updateuserinfo for inactive player on GoldSrc servers 2024-10-26 05:13:22 +03:00
Alibek Omarov
8c93a0d247 engine: client: allow playing back demos recorded on GoldSrc servers 2024-10-26 05:12:11 +03:00
Alibek Omarov
5c75dda864 mainui: update 2024-10-26 02:42:30 +03:00
Alibek Omarov
55bdded6a4 engine: add pfnIsCvarReadOnly to mainui API 2024-10-25 05:09:02 +03:00
Alibek Omarov
25b2c0f7e3 ref: gl: use FCVAR_GLCONFIG on VBO and detail textures cvars, so it always gets saved to opengl.cfg 2024-10-24 23:31:16 +03:00
Alibek Omarov
ed522852cf mainui: update 2024-10-24 23:30:23 +03:00
Alibek Omarov
224e42d345 engine: platform: android: make dlsym-weak C++ again (because of struct soinfo definition). Reformat linker.h file as well. 2024-10-24 17:54:09 +03:00
Alibek Omarov
128a1f59a9 engine: cleanup XASH_64BIT usage. Always use it from build.h 2024-10-24 16:39:09 +03:00
Alibek Omarov
40ffde0439 3rdparty: opus: update to 1.5.2 2024-10-24 15:51:41 +03:00
Alibek Omarov
ec5578a437 ref: gl: vgl_shim: remove -fno-PIC to properly link it with shared library 2024-10-24 15:47:06 +03:00
Alibek Omarov
1cf40a2d17 engine: wscript: remove useless globs 2024-10-24 15:46:33 +03:00
Alibek Omarov
958ea0ac1d scripts: gha: temporarily enable verbose build output for PSVita 2024-10-24 02:05:47 +03:00
Alibek Omarov
a9fdae28b2 engine: platform: android: reformat dlsym-weak and make it C only 2024-10-24 02:04:52 +03:00
Alibek Omarov
3d9eb869b0 ci: fix netbsd bzip2 package name 2024-10-24 00:57:18 +03:00
Alibek Omarov
8162c6d42f scripts: waifulib: xshlib: prepend xshlib so it's always first 2024-10-24 00:46:43 +03:00
Alibek Omarov
48a9f17222 filesystem: only export GetFSAPI, CreateInterface is useless with static linking (and should be implemented differently) 2024-10-24 00:40:47 +03:00
Alibek Omarov
e381d04094 ref: simplify wscripts, remove gl2_shim unused wscript, fix non-existent export in exports.txt 2024-10-24 00:40:12 +03:00
Alibek Omarov
0e79326571 waf: upgrade to latest, fix for api changes 2024-10-24 00:37:05 +03:00
Alibek Omarov
f7eb8cd913 engine: wscript: ensure we always add needed features when mixing C and C++ objects. Simplify bld call for all platforms 2024-10-23 23:22:23 +03:00
Alibek Omarov
a15c1f99b2 wscript: remove useless features 2024-10-23 23:20:47 +03:00
Alibek Omarov
ba2191172d ci: add bzip2 for sourcehut CI 2024-10-23 20:25:26 +03:00
Alibek Omarov
6ab2c9dbbf engine: client: fix out of bounds access with some ticket generators
* Update MultiEmulator submodule
2024-10-22 02:13:36 +03:00
Alibek Omarov
7da460d4b1 public: bump miniz to latest release 2024-10-21 21:22:50 +03:00
Alibek Omarov
ffe7b1f4a1 3rdparty: MultiEmulator: move it to submodule 2024-10-21 14:08:16 +03:00
Alibek Omarov
6a1f502d25 3rdparty: MultiEmulator: remove unused code 2024-10-21 06:30:53 +03:00
Alibek Omarov
434359ea01 3rdparty: update mainui and extras 2024-10-21 06:19:11 +03:00
Alibek Omarov
ae2ad6ddf2 3rdparty: add MultiEmulator by 2010kohtep
* patched to be portable, turned into a static library
* integrated to the engine
2024-10-21 06:19:11 +03:00
Alibek Omarov
ec11683dc5 engine: client: minor fix, reference cl_allowdownload cvar actual name 2024-10-21 04:49:25 +03:00
Alibek Omarov
47318b0c14 engine: server: minor fix, use __func__ instead of the function name in debug message 2024-10-21 02:32:07 +03:00
Alibek Omarov
60d6214ad7 engine: client: implement parsing GoldSrc server query response for mainui_cpp 2024-10-21 02:31:45 +03:00
Alibek Omarov
a3e26a21a7 engine: common: net_chan: as we expect pfnBlockSize to be always set, use it to determine if netchan was initialized or not 2024-10-21 02:30:49 +03:00
Alibek Omarov
d0f3a6f74b engine: client: add command queryserver for mainui to query a specific address. Make server querying commands restricted 2024-10-20 02:22:09 +03:00
Alibek Omarov
fee236a050 engine: common: net_ws: make NET_IsLocalAddress inline 2024-10-19 14:08:27 +03:00
Alibek Omarov
e3e4bcc015 engine: global refactoring of connectionless packets, now they can be customized from single protocol.h header 2024-10-19 14:05:00 +03:00
Alibek Omarov
2d546ccbf7 engine: implement CL_MsgInfo for dedicated server 2024-10-18 03:13:43 +03:00
Alibek Omarov
b41804bb5b mainui: update 2024-10-17 14:56:38 +03:00
Alibek Omarov
47a04df189 wscript: try to fix Windows XP compatibility on 32-bit binaries 2024-10-17 14:56:10 +03:00
Alibek Omarov
2efedaf46c pm_shared: mark PM_TraceSurface call in PMove API as Xash3D specific 2024-10-17 03:36:29 +03:00
Alibek Omarov
49e43c830b engine: client: fix formatting error in CL_ParseExtraInfo 2024-10-16 22:29:21 +03:00
Alibek Omarov
763e101208 ref: preserve aspect ratio when saving level and save shots 2024-10-16 21:35:52 +03:00
Alibek Omarov
e39a62b1fd mainui: update 2024-10-16 08:33:44 +03:00
Alibek Omarov
da76abda75 engine: even more refactorings to avoid global cls.legacymode usage, now with GoldSrc server autodetection 2024-10-16 07:31:27 +03:00
Alibek Omarov
829d7d0a7e engine: client: CL_SendConnectPacket refactoring 2024-10-16 07:02:23 +03:00
Alibek Omarov
9f6372b305 engine: client: implement GoldSrc fragment size limits 2024-10-16 07:00:10 +03:00
Alibek Omarov
12edd782c6 engine: common: net_chan: always rely on pfnBlockSize being non-null 2024-10-16 06:59:33 +03:00
Alibek Omarov
0b59fa9416 engine: swap Cvar_VariableInteger and simple integer checks for performance 2024-10-16 06:57:46 +03:00
Alibek Omarov
cc0f12ed26 engine: client: add stubs for richpresence commands added in HL25 2024-10-16 05:57:32 +03:00
Alibek Omarov
f42553d0e1 readme: install 32-bit deps on Ubuntu with aptitude, as it's less prone to fuck up entire system (remove random packages, bootloader, etc...) [skip ci] 2024-10-16 00:32:23 +03:00
Alibek Omarov
e7564420c9 engine: fix some ubsan warnings (alignment, integer limits...) 2024-10-16 00:32:22 +03:00
Alibek Omarov
e81a0ded11 engine: client: fix sendres message for GoldSrc protocol 2024-10-16 00:32:22 +03:00
Alibek Omarov
a32c702dbd engine: client: avoid useless check on empty clc_resourcelist, which will never be false 2024-10-15 06:15:22 +03:00
Alibek Omarov
23a5ed71de engine: easier MSG_EndBitWriting byte padding 2024-10-15 06:14:37 +03:00
Alibek Omarov
245dc97cfb engine: semi-correct printing GoldSrc client messages 2024-10-15 06:12:31 +03:00
Alibek Omarov
ece204c30f engine: common: add cvars net_send_debug and net_recv_debug to print server/client messages to console 2024-10-15 06:11:57 +03:00
Alibek Omarov
1bd59096fd engine: client: implement miscellaneous, often unused, GoldSrc protocol messages 2024-10-15 06:10:25 +03:00
Alibek Omarov
0b02c2c6a7 engine: client: fix disconnect on GoldSrc servers 2024-10-15 06:08:21 +03:00
Alibek Omarov
6a61a499e9 engine: client: don't send useless/empty clc_move commands while we're connecting to server 2024-10-15 06:07:57 +03:00
Alibek Omarov
6b1c283082 engine: client: fix svc_event parsing 2024-10-15 06:07:06 +03:00
Alibek Omarov
5402a9611e engine: common: fix discarded const qualifier 2024-10-14 19:41:36 +03:00
Alibek Omarov
43e06ccd45 engine: common: make some simple functions inlined 2024-10-14 19:20:47 +03:00
Alibek Omarov
f52c825bf5 engine: make some global variables static and const, make even more functions static if possible 2024-10-14 19:19:46 +03:00
Alibek Omarov
bf8b709372 engine: move pm_debug particle functions to client, as they are never used on server 2024-10-14 19:11:26 +03:00
Alibek Omarov
fdf82e5270 engine: client: cleanup tent and efx code, make global variables static, remove unused functions 2024-10-14 18:08:01 +03:00
Alibek Omarov
0224a1b66b engine: client: better debug messages for GoldSrc entities packet parsing 2024-10-14 17:59:17 +03:00
Alibek Omarov
505ad6d69b engine: server: reinitalize delta in case if delta was shutdown by client and some tables were omitted (movevars after using GoldSrc server) 2024-10-14 06:56:17 +03:00
Alibek Omarov
5bcd573821 engine: remove goldsrc meta delta table reinitialization 2024-10-14 06:54:41 +03:00
Alibek Omarov
c5a291d9c7 engine: minor refactoring 2024-10-14 05:17:21 +03:00
Alibek Omarov
232a8c1148 engine: common: net_ws: don't expect more than 5 splits for GoldSrc protocol 2024-10-14 05:17:03 +03:00
Alibek Omarov
663f6eaf5c ref: turn r_shadows into extended convar_t 2024-10-14 04:18:35 +03:00
Alibek Omarov
9d3210259c ref: set hullcolor (used by r_drawentities) as const 2024-10-14 04:15:48 +03:00
Alibek Omarov
4ec6c2f7cf engine: client: support vox sentence that starts with leading slash 2024-10-14 04:13:10 +03:00
Alibek Omarov
8452bec877 engine: client: reduce reads of cls.legacymode 2024-10-14 04:13:10 +03:00
Alibek Omarov
0d4296e0e1 engine: client: explicitly pass protocol to svc_time parser 2024-10-14 04:13:10 +03:00
Alibek Omarov
2b85da3bc9 engine: client: fix parsing svc_setpause and svc_goldsrc_timescale for GoldSrc protocol 2024-10-14 04:13:10 +03:00
Alibek Omarov
17f194b9a3 engine: client: consolidate usermsg registering and parsing for multiple protocols 2024-10-14 04:13:10 +03:00
Alibek Omarov
ff47fbaedc engine: client: another fix baselines and entities parsing for GoldSrc, ensure we always call MSG_EndBitWriting 2024-10-14 04:13:10 +03:00
Alibek Omarov
87c88f7463 engine: client: fix svc_particles parsing on GoldSrc protocol 2024-10-14 04:13:10 +03:00
Alibek Omarov
60fd5f7ab8 engine: client: stub svc_restoresound for legacy protocol, it's only used during save restore which is unuseful for us
* Set sequence flag for restored sound, even though we don't support sequences anymore.
2024-10-14 04:13:10 +03:00
Alibek Omarov
5ceab059dc engine: client: add function for parsing common protocol messages, which structure is enforced by server DLL compatibility 2024-10-14 04:13:10 +03:00
Alibek Omarov
67c898f9ad engine: client: improve server data parsing for GoldSrc, restore nick name and remove unuseful userinfo keys before connection 2024-10-14 04:13:10 +03:00
Alibek Omarov
d903187eea public: make crc value init functions inline, move hex2char/ex2string to crclib and make them private to it 2024-10-14 04:13:10 +03:00
54ac
653f0841e4 ref: gl: restore r_shadows (#1843) 2024-10-13 17:15:29 +03:00
Alibek Omarov
10bfadb556 engine: client: support svc_disconnect reason messages for GoldSrc protocol 2024-10-11 20:58:46 +03:00
Alibek Omarov
0b2cc066dd engine: fix signed integers encoding with alternate format for GoldSrc protocol 2024-10-11 20:36:09 +03:00
Alibek Omarov
60ab13d216 engine: client: always add [Xash3D] to the nickname on GoldSrc servers 2024-10-11 19:32:16 +03:00
Alibek Omarov
f90c658567 engine: client: skip voice data for GoldSrc protocol to avoid svc_bad 2024-10-11 19:31:41 +03:00
Alibek Omarov
0c54895877 engine: client: add unmunge function for consistency info for GoldSrc protocol 2024-10-11 18:41:17 +03:00
Alibek Omarov
4eb54328f8 engine: client: various connection setup fixes for GoldSrc proto
* always add "steam" to getchallenge message
* cdkey md5 should be sent with lowercase
* strip null terminator from connect message
2024-10-11 18:41:16 +03:00
Alibek Omarov
b1189db9c5 engine: client: avoid clc_move spam when we're connected but not spawned yet 2024-10-11 00:08:21 +03:00
Alibek Omarov
869578f1ba engine: client: lie about sv_version for GoldSrc protocol 2024-10-11 00:08:21 +03:00
Alibek Omarov
3320f776ce engine: client: implement correct clc_fileconsistency response for GoldSrc 2024-10-11 00:08:21 +03:00
Alibek Omarov
1d64635783 engine: correctly check for cls.legacymode, as it's not a boolean anymore 2024-10-11 00:08:21 +03:00
Alibek Omarov
bbb076c0d4 engine: client: voice: don't print about unsupported codec with empty string name 2024-10-10 23:40:23 +03:00
Alibek Omarov
fe2a4d0428 engine: common: net_encode: remove DT_SIGNED_GS flag just in case 2024-10-10 23:40:23 +03:00
Alibek Omarov
6bdc1941e6 engine: common: netchan: only compress with BZip2 when it's efficient 2024-10-10 23:40:23 +03:00
Alibek Omarov
9188905145 engine: client: fix map CRC match with GoldSrc protocol 2024-10-10 23:40:23 +03:00
Alibek Omarov
3f2fbb10d8 engine: client: only send continueloading for legacy protocol 2024-10-10 23:40:23 +03:00
Alibek Omarov
9c97235fe8 engine: client: implement GoldSrc connectionless print message 2024-10-10 23:40:23 +03:00
Alibek Omarov
70a13b47db engine: client: implement randomized cdkey for GoldSrc protocol 2024-10-10 23:40:22 +03:00
Alibek Omarov
18afaf0eaf engine: client: more accurate clc_move for GoldSrc protocol 2024-10-10 23:38:55 +03:00
Alibek Omarov
8b8c3d8116 scripts: waifulib: xcompile: define WebAssembly target as DEST_OS wasi 2024-10-10 16:13:54 +03:00
Alibek Omarov
514fc9fe43 public: reserve identifier for WebAssembly port 2024-10-10 16:13:20 +03:00
Alibek Omarov
5d8923d69c scripts: waifulib: sdl2: fix build on macOS 2024-10-10 15:44:32 +03:00
Alibek Omarov
5db880af57 engine: wscript: add an ability to build with SDL3 2024-10-10 06:13:56 +03:00
Alibek Omarov
c05db9ce58 waf: upgrade waifu to latest master 2024-10-10 06:13:32 +03:00
Alibek Omarov
04079abe00 scripts: waifulib: re-export sdl2.py from waifu repository, add sdl3 compatibility 2024-10-10 06:13:23 +03:00
Alibek Omarov
8054b69f73 readme: add GoldSrc protocol support, add RedHat/Fedora build instructions, better wording [skip ci] 2024-10-10 01:58:56 +03:00
SNMetamorph
b5ee777466 Documentation: added article about GoldSrc network protocol support 2024-10-10 01:52:44 +03:00
Alibek Omarov
96f3061709 ref: gl: show texture size in memory, skip empty pages, skip empty 0-th texture 2024-10-09 02:44:26 +03:00
Alibek Omarov
420c5a4ff3 ref: gl: set numeric value for wrappers macros, similar to build.h macros 2024-10-09 02:01:10 +03:00
Alibek Omarov
e8f6476e8c ref: gl: patch to compile with nanogl (nanogl doesn't impement glTexCoord3f) 2024-10-09 00:31:05 +03:00
Alibek Omarov
65ec35b732 engine: client: fix bug in temp entity parsing caused by find and replace 2024-10-08 23:02:02 +03:00
Alibek Omarov
8d731b5d15 engine: common: fix for dedicated again 2024-10-08 16:41:25 +03:00
Alibek Omarov
38c0dc4551 3rdparty: bzip2: properly use stdio-free version, don't include tests and utils to the build 2024-10-08 15:39:56 +03:00
Alibek Omarov
4d8cb0469f scripts: gha: build Linux binaries with bundled deps, to avoid external dependency on libbz2 2024-10-08 13:09:34 +03:00
Alibek Omarov
62cb8f5ba6 3rdparty: bzip2: forgot to add actual bz_version.h file 2024-10-08 13:07:42 +03:00
Alibek Omarov
97c75d96d5 3rdparty: bzip2: build with BZ_NO_STDIO 2024-10-08 13:06:02 +03:00
Alibek Omarov
f5ae806b31 ref: gl: add r_showtextures implementation by ncuxonaT
Main changes made by me besides engine differences:
* Text color changed to pure white for better readability
* An attempt to draw texture name in full size
2024-10-08 12:56:07 +03:00
Alibek Omarov
482dc3a5a5 engine: client: fix joining current protocol servers 2024-10-08 12:43:29 +03:00
Alibek Omarov
a8539ac004 3rdparty: bzip2: add pre-generated bz_version.h header as some generators (like cmake.py) don't understand subst yet 2024-10-08 12:27:41 +03:00
Alibek Omarov
9970c56218 engine: common: disable bzip2 for dedicated server, it's not used there 2024-10-08 12:14:37 +03:00
Alibek Omarov
480218412a engine: client: remove voidptr hack from IN_EngineAppendMove, just use usercmd_t directly 2024-10-08 04:07:03 +03:00
Alibek Omarov
6ae09d2866 engine: client: support GoldSrc signon and refactor parsing delta entities for current and legacy protocols 2024-10-08 04:07:03 +03:00
Alibek Omarov
609680b328 engine: client: support parsing GoldSrc event messages 2024-10-08 04:07:03 +03:00
Alibek Omarov
ccbe370c8e engine: client: add support for parsing GoldSrc messages 2024-10-08 04:07:03 +03:00
Alibek Omarov
9706e47643 engine: client: refactor and implement GoldSrc-specific parsing bits in common message parsing code 2024-10-08 03:28:02 +03:00
Alibek Omarov
d98361f782 engine: client: add support for parsing GoldSrc svc_temp_entity 2024-10-08 03:28:02 +03:00
Alibek Omarov
ba7c789ec9 engine: common: add GoldSrc delta support 2024-10-08 03:28:02 +03:00
Alibek Omarov
d128997d40 engine: common: add GoldSrc bitbuf operations, add support for GoldSrc signed integers 2024-10-08 03:28:02 +03:00
Alibek Omarov
61342547ce engine: common: add support for GoldSrc split packet 2024-10-08 03:28:02 +03:00
Alibek Omarov
c1a5f173b8 engine: common: add GoldSrc netchan support 2024-10-08 03:28:02 +03:00
Alibek Omarov
f5c5b7b2c8 engine: common: add buffer munge functions 2024-10-08 03:28:02 +03:00
Alibek Omarov
057b47555d 3rdparty: bzip2: add wscript for bzip2, check for system-wide bzip2, add readme note 2024-10-08 03:28:02 +03:00
Alibek Omarov
43299f6747 3rdparty: add bzip2 submodule 2024-10-08 03:28:02 +03:00
Alibek Omarov
03bf6cb719 engine: client: get rid of PROTOCOL_GOLDSRC_VERSION, as connprotocol_t enum does it's job 2024-10-08 03:27:32 +03:00
Alibek Omarov
3a1bb12830 engine: client: rename CL_LegacyMode to CL_Protocol 2024-10-08 03:27:09 +03:00
Alibek Omarov
5efa68757e engine: remove unused svc_deltapacketbones 2024-10-08 03:27:09 +03:00
Alibek Omarov
afaf5bf3ea engine: improve security a little bit by properly checking customization files starting with \!MD5
Implement basic test for COM_IsSafeFileToDownload

Move COM_ParseFileSafe test to libpublic
2024-10-08 03:22:53 +03:00
SNMetamorph
50c805826f engine: implemented handling SIGTERM signal for proper stopping dedicated server 2024-10-08 01:05:26 +03:00
Alibek Omarov
35ae9f4a64 engine: client: don't save thirdperson value, it's not used anywhere 2024-10-07 21:00:16 +03:00
Alibek Omarov
d7d96c02a2 engine: client: implement cvar showpause for GoldSrc compatibility 2024-10-07 20:59:44 +03:00
Alibek Omarov
dd03723144 readme: add libopus-dev to dependencies list on Debian/Ubuntu 2024-10-07 18:09:32 +03:00
xiaodo
26f07196ea engine: Format Codes. 2024-10-07 17:22:27 +03:00
xiaodo
8c291fdfe3 engine: fix CenterPrint Wrong Y Position. 2024-10-07 17:22:27 +03:00
xiaodoxd
d1e118f07c Fix CenterPrint Wrong X Position 2024-10-07 17:22:27 +03:00
Alibek Omarov
6c531c14e6 engine: common: cvar: compatibility hack for mods that depend on HL25 widescreen FOV
Fixes Natural Selection 3.3 beta 9.
2024-10-04 19:09:43 +03:00
Alibek Omarov
433213c915 engine: server: fix cvar description for mp_footsteps 2024-10-04 19:07:44 +03:00
Alibek Omarov
ab0c0b18c2 engine: server: remove limit on sv_zmax value as it breaks Natural Selection mod 2024-10-04 19:07:08 +03:00
Alibek Omarov
29fd5f9fbe engine: server: remove FCVAR_SERVER flag from sv_zmax
The problem is that FCVAR_SERVER flagged cvars get saved to listenserver.cfg.

The game code usually sets sv_zmax value to worldspawn parameters and
listenserver.cfg gets generated before server DLL gets initialized.
2024-10-04 19:04:34 +03:00
Alibek Omarov
882d8afc93 engine: server: stub SV_RestartDecals for dedicated server 2024-10-04 01:28:22 +03:00
Alibek Omarov
e11635d15c engine: server: slight refactoring, hide client calls under XASH_DEDICATED, remove useless dedicated stub 2024-10-04 01:22:59 +03:00
Alibek Omarov
5d79d93aac engine: server: use safe cvar unlinking for mods that deallocate cvars (like HL Unified SDK) 2024-10-03 15:32:14 +03:00
Alibek Omarov
7ccf651fd0 engine: cvar: implement safer cvar unlinking in case when game deallocates cvar 2024-10-03 15:32:14 +03:00
Alibek Omarov
67af41cce8 engine: common: net_ws: more minor refactoring, avoid memcpy for same type structs 2024-10-02 23:30:42 +03:00
Alibek Omarov
e2c96e62e1 engine: common: net_ws: drop IPv4 mapped as IPv6 support, it's an artifact from dual-stacking experiments and not used anymore 2024-10-02 23:26:28 +03:00
Alibek Omarov
2ecae442fc engine: common: net_ws: minor refactoring 2024-10-02 23:25:12 +03:00
Alibek Omarov
a1060b0eb5 engine: add v6only master servers, add v6only flag for NET_StringToAdrNB 2024-10-02 23:23:08 +03:00
Alibek Omarov
ddd8de888f engine: add macro XASH_NO_IPV6_RESOLVE to completely skip resolving addresses with family AF_INET6 2024-10-02 23:21:25 +03:00
Alibek Omarov
a758dffbc1 public: avoid useless copy in Q_timestamp 2024-10-02 22:18:16 +03:00
Alibek Omarov
87775faeca engine: common: properly check if we can destroy resolve mutexes. Add net_resolve_debug cvar to enable printing resolve thread debug messages. 2024-10-02 22:16:51 +03:00
Alibek Omarov
ef0fc46ed8 wscript: allow async resolving for NSwitch 2024-10-02 00:55:53 +03:00
Alibek Omarov
138b4fa247 wscript: allow async resolving for PSVita 2024-10-02 00:55:53 +03:00
Alibek Omarov
47d1f3459c engine: common: try to implement DNS resolve thread through SDL2 functions if SDL2 build is enabled 2024-10-02 00:55:53 +03:00
Alibek Omarov
4712aae834 engine: server: move autoprecaching wads after parsing reslists
An attempt to avoid assert() in HL Unified SDK.
2024-09-30 18:46:01 +03:00
Ivan Avdeev
2900ee1cde engine: allow specifying screenshot filenames in command directly 2024-09-30 17:15:09 +03:00
Alibek Omarov
c6c4178dd2 engine: client: set TE_SPRAY to collide with world, fixes c7ad8e4bf 2024-09-30 04:15:22 +03:00
Alibek Omarov
a3ce0e6b1b public: tests: test_efp: mark Test_ExtractFilePath as static 2024-09-30 04:00:28 +03:00
Alibek Omarov
0b1ad3b7f0 engine: imagelib: fix mismatched dealloc in a test 2024-09-30 04:00:28 +03:00
Alibek Omarov
37fb46f092 wscript: enable mismatched-dealloc and free-nonheap-object, now that we mark all malloc-like functions with malloc attribute 2024-09-30 04:00:28 +03:00
Alibek Omarov
bc8bf9a9fb engine: add const on delta functions 2024-09-30 04:00:28 +03:00
Alibek Omarov
9e28c98911 engine: print to stderr if writing message to logfile failed 2024-09-30 04:00:28 +03:00
Alibek Omarov
0a1269d52d filesystem: zip: fix non-heap object dealloc 2024-09-30 04:00:28 +03:00
Alibek Omarov
2e5bc31c9e filesystem: set malloc like attribute for imported zone memory allocator functions 2024-09-30 04:00:28 +03:00
Alibek Omarov
1b335fd945 ref: soft: set malloc like attribute for imported zone memory allocator functions 2024-09-30 04:00:28 +03:00
Alibek Omarov
0c8b2d007a ref: gl: set malloc like attribute for imported zone memory allocator functions 2024-09-30 04:00:28 +03:00
Alibek Omarov
9ee1b32e2d engine: set malloc like and warn_unused_result attributes on common allocation functions, fs, image and soundlib 2024-09-30 04:00:28 +03:00
Alibek Omarov
953ad98a16 engine: workaround buggy stringop-overflow 2024-09-30 04:00:28 +03:00
Alibek Omarov
1357057bd8 common: add GCC malloc and warn_unused_result attribute macro 2024-09-30 04:00:28 +03:00
Alibek Omarov
35c9323de6 public: make vec3_origin and identity matrix inlined 2024-09-30 00:15:47 +03:00
Alibek Omarov
13a0afef06 public: reorganize mathlib, inline more functions 2024-09-30 00:15:47 +03:00
Alibek Omarov
c7ad8e4bf6 engine: client: more accurate implementation of TE_SPRAY and TE_SPRITE_SPRAY 2024-09-29 20:36:09 +03:00
Alibek Omarov
f1754bdd5f wscript: disable cast-align diagnostic, it's mostly useless 2024-09-29 20:36:09 +03:00
Alibek Omarov
c462a1c500 wscript: add commented out freevgui subproject 2024-09-29 20:36:09 +03:00
Alibek Omarov
0bba184994 public: add VectorUnpack macro to read vector values into variables 2024-09-29 20:33:33 +03:00
Alibek Omarov
178602ea1f engine: fix loading map in Dark Future mod with broken mark surface id 2024-09-05 15:23:23 +03:00
Alibek Omarov
2eb8f88a20 engine: move attenuation none sound spatialize fix to bugcomp mode, as Xash native games use this 2024-09-05 13:50:15 +03:00
Alibek Omarov
96d11df06c Revert "engine: client: sounds with zero attenuation must get spatialized anyway"
This reverts commit 0870536405.
2024-09-05 13:27:54 +03:00
Alibek Omarov
950d210ec5 Revert ABI2, it wasn't meant to end up in master branch. 2024-09-05 04:31:50 +03:00
Alibek Omarov
55c1bddac5 ref: gl: implement generating VBO only when gl_vbo was set to 1
* Make it safer by creating a function that returns VBO state, was it
  generated or enabled by user
2024-09-05 04:10:56 +03:00
Alibek Omarov
ac50c762d7 ref: gl: slight refactoring, split large R_RenderBrushPoly to smaller functions
* Use R_RenderDetailsForSurface in R_AddSurfToVBO instead of copypaste
* Use existing VBO's R_CheckLightMap in R_RenderLightmapForSurface
2024-09-05 02:40:57 +03:00
Alibek Omarov
5c2ab150b3 ref: gl: move forcing gl_vbo to 0 after checking GL extensions out from R_GenerateVBO 2024-09-05 01:47:14 +03:00
Alibek Omarov
0870536405 engine: client: sounds with zero attenuation must get spatialized anyway 2024-09-05 01:28:55 +03:00
Alibek Omarov
b47ede477a engine: server: strip 64-bit string pool stuff for now, to not mess up abi2 2024-09-05 01:28:55 +03:00
Alibek Omarov
eef5cc17b3 breaking engine headers by replacing int with string_t where it's supposed to be 2024-09-05 01:28:55 +03:00
Alibek Omarov
ad2191333d engine: add _st64 prefix to load abi2 binaries 2024-09-05 01:28:55 +03:00
SNMetamorph
a85cac497d ref: disabled verbose reporting about tracer invalid color index 2024-09-03 15:31:51 +03:00
SNMetamorph
e0c69d7df5 gha: fixed binaries signing in Windows workflow 2024-08-30 07:34:40 +03:00
Alibek Omarov
ff3d91ceb4 engine: add aaaa.mentality.rip:27011 master server 2024-08-28 19:56:41 +03:00
Alibek Omarov
5777431577 engine: common: insert spaces between arguments in echo command 2024-08-22 16:45:42 +03:00
Alibek Omarov
cd86f80203 engine: common: make MSG_WriteOneBit inlined, as it's usually called with literal argument 2024-08-22 12:51:47 +03:00
Alibek Omarov
8c885d3f37 mainui: update 2024-08-22 12:50:01 +03:00
Alibek Omarov
dddb46a6d0 mainui: update 2024-08-21 18:14:21 +03:00
Alibek Omarov
6b0f378c5b engine: client: ensure requested (but failed) renderer won't be loaded twice 2024-08-21 12:18:06 +03:00
Alibek Omarov
9dd7f37d42 Revert "engine: client: add missing ref_null to R_CollectRendererNames"
This reverts commit 69ec810ed0.
2024-08-21 12:18:06 +03:00
Alibek Omarov
9f10fb6472 engine: client: ensure RefDll cvars have FCVAR_REFDLL flag, clean up them automatically. Don't unload failed renderer, it will be done in R_UnloadProgs 2024-08-21 12:18:06 +03:00
Alibek Omarov
64dbccb9bd engine: platform: sdl: do not call SDL_VideoQuit in R_Free_Video, as one failed renderer will shut down whole SDL video subsystem 2024-08-21 12:18:06 +03:00
Alibek Omarov
9a432a5a13 common: rewrite cvardef.h from scratch based on Quake definitions
* unify cvar.h and cvardef.h, enable private definitions only for refdll and engine

* add FCVAR_REFDLL for easier RefDll cvars cleanup
2024-08-21 12:18:06 +03:00
Alibek Omarov
842e494fa6 common: add macro for simultaneously checking data type size for ILP32 and LP64 2024-08-21 12:00:35 +03:00
Alibek Omarov
7fc9ee154a engine: client: fail with Sys_Error when no renderer is loaded, as we can't recover from it 2024-08-19 13:25:07 +03:00
Alibek Omarov
5f84010c2a engine: server: enable allocating 64-bit string pool closer to server library only for Linux amd64, as mmap() isn't reliable anywhere else 2024-08-19 13:22:04 +03:00
Alibek Omarov
3dcd6cb80b wscript: set crosscompiling msvc toolchain on 64-bit systems 2024-08-18 14:13:51 +03:00
Alibek Omarov
79e94bf766 Revert "scripts: gha: use 64-bit compiler for 32-bit target for faster compilation on Win32"
This reverts commit 3de370f3d5.
2024-08-18 14:13:01 +03:00
Alibek Omarov
3de370f3d5 scripts: gha: use 64-bit compiler for 32-bit target for faster compilation on Win32 2024-08-18 14:04:54 +03:00
Alibek Omarov
c84d2f4624 gha: first attempt at signing binaries 2024-08-18 13:52:02 +03:00
Alibek Omarov
380a9f7a6f scripts: add self-signed certificate for win32
* There is no infrastructure to use signtool during win32 builds yet.
2024-08-18 12:24:17 +03:00
Alibek Omarov
a6c7b67d0d filesystem: include errno.h for Win32 2024-08-17 17:32:50 +03:00
Alibek Omarov
c13c1f2577 public: wscript: always define alloca header as malloc.h on Win32 2024-08-17 13:17:48 +03:00
Alibek Omarov
151405618f engine: client: input: slight refactoring of mouse grabbing, add verbose output for debugging mouse issues 2024-08-16 12:59:54 +03:00
Alibek Omarov
70e11cc309 engine: platform: sdl: borderless fullscreen windows don't need to restore desktop resolution
* This fixes the case when we switch from windowed to borderless, minimize the window
  and restore makes it lose it's fullscreen state
2024-08-16 12:25:08 +03:00
Alibek Omarov
7619824d80 engine: platform: sdl: return correct value from SW_CreateBuffer on success 2024-08-16 11:36:36 +03:00
Alibek Omarov
f3d181b5ee engine: platform: psvita: explicitly export __aeabi_ul2f 2024-08-16 02:22:25 +03:00
Alibek Omarov
55055a70f0 engine: client: allocate mods list for UI on demand 2024-08-15 12:27:43 +03:00
Alibek Omarov
22d3ba674e engine: client: ensure demoheader will be written when we're recording demo and changed level 2024-08-14 19:10:00 +03:00
Alibek Omarov
ac487a2133 mainui: update 2024-08-14 10:29:42 +03:00
Alibek Omarov
4da3a14adc mainui: update 2024-08-13 19:25:32 +03:00
Alibek Omarov
69ec810ed0 engine: client: add missing ref_null to R_CollectRendererNames 2024-08-13 19:16:59 +03:00
Alibek Omarov
2df01316ce engine: client: add two new APIs for mainui to get extended new gameinfo structure 2024-08-13 18:28:07 +03:00
Alibek Omarov
3a67aefee2 filesystem: check rodir too when checking falldir existence too, just in case 2024-08-13 17:25:25 +03:00
Alibek Omarov
d114dffcb4 filesystem: add new gameinfo.txt key: demomap 2024-08-13 17:22:06 +03:00
Alibek Omarov
7bb5d9a67a gha: give github 20s to process remaining artifacts upload before downloading them. Upgrade Flatpak Docker image 2024-08-12 11:43:01 +03:00
Alibek Omarov
a6b1e57ae1 gha: simplify uploading releases by using gh cli tool 2024-08-12 11:26:36 +03:00
Alibek Omarov
c70c13eb5c gha: don't upload flatpak, action does it for us. Print found artifacts, as it seems actions/download-artifact sometimes skips some 2024-08-12 10:44:25 +03:00
Alibek Omarov
d905ea354e scripts: gha: do not waste time building bshift, just copy binary from mobile_hacks 2024-08-12 10:27:26 +03:00
Alibek Omarov
99cec81894 gha: update flatpak actions 2024-08-12 10:07:41 +03:00
Alibek Omarov
5d5bccf1bb gha: should've been doing this in a branch meh 2024-08-12 09:53:45 +03:00
Alibek Omarov
6fcf0a77af scripts: gha: fix typo 2024-08-12 09:43:02 +03:00
Alibek Omarov
e7477c0abf gha: update more actions, use gh delete release instead of delete-tag-and-release 2024-08-12 09:37:55 +03:00
Alibek Omarov
85540855c3 gha: update actions/checkout and actions/upload-artifact 2024-08-12 09:12:32 +03:00
Alibek Omarov
2dc220b42f gha: add build for macOS ARM and x86
Very barebones, doesn't build universal app, doesn't build dmg
2024-08-12 09:12:13 +03:00
Alibek Omarov
2d6cadbf1b waf: update to latest waifu 2024-08-12 08:38:52 +03:00
Alibek Omarov
340871e03a engine: platform: sdl: correct the message about glblit in ref_soft 2024-08-11 18:32:10 +03:00
Alibek Omarov
e222a74960 ref: soft: fail to the engine if CreateBuffer has failed (otherwise it sits in infinite loop) 2024-08-11 18:28:45 +03:00
Alibek Omarov
ab499d5095 scripts: waifulib: vgui: fix vgui_support getting automatically enabled on x86 machines with unsupported OS 2024-08-11 18:08:20 +03:00
Alibek Omarov
a5f7027229 readme: better wording 2024-08-10 15:03:07 +03:00
Alibek Omarov
bf5cf897e2 readme: add IPA pronounciation for word 'Xash' 2024-08-10 15:02:31 +03:00
Alibek Omarov
d33c1af549 wscript: don't force 32-bit for OSX users, as OSX don't support launching 32-bit applications since Catalina
Add `-4` or `--32bits` configure flag to specifically target 32-bit engine
2024-08-10 15:01:42 +03:00
Alibek Omarov
677464d04d ref: rename glpoly_t to glpoly2_t to make the changes more obvious and easier to notice 2024-08-10 13:46:00 +03:00
Alibek Omarov
d2d6ed8bd4 filesystem: fix zip_t and pack_t definition so it have true standard flexible array member 2024-08-10 13:46:00 +03:00
Alibek Omarov
bd2a44dbdd engine: common: fix fragbuf_t definition so it has true standard flexible array member 2024-08-10 13:46:00 +03:00
Alibek Omarov
e9ee4beb9f engine: client: fix rawchan_t definition so it has true standard flexible array member 2024-08-10 13:46:00 +03:00
Alibek Omarov
3b3f057f6f engine: common: fix winding_t definition so it has true standard flexible array member 2024-08-10 13:46:00 +03:00
Alibek Omarov
a9dec51e59 ref: fix glpoly_t definition so it has true standard flexible array member 2024-08-10 13:46:00 +03:00
Alibek Omarov
257312ad7c 3rdparty: update extras 2024-08-10 13:45:41 +03:00
Владислав Сухов
6ee8a2dfa7 scripts: sailfish: bump engine version to 0.21 2024-08-09 12:41:47 +03:00
Владислав Сухов
75c5e9cfa7 engine: bump engine version to 0.21 2024-08-09 12:41:47 +03:00
Gleb Mazovetskiy
1a94f2b585 Enable vsync by default
This is the first setting I change after installing xash3d-fwgs. Some distros even patch xash3d-fwgs to enable vsync by default (e.g. Batocera).

Let's enable vsync by default here.
2024-08-09 09:14:50 +03:00
Alibek Omarov
f0b4c42c68 engine: common: faster and simpler Netchan_OutOfBand 2024-08-08 04:37:16 +03:00
Alibek Omarov
9be061735f engine: client: fix misleading gcc warning about printf format string not being literal 2024-08-08 04:36:40 +03:00
Alibek Omarov
6bfa525080 engine: common: faster and simpler MSG_WriteString 2024-08-08 04:35:55 +03:00
Alibek Omarov
8fcaf18897 engine: client: remove useless copy in NetAPI_SendRequest 2024-08-08 04:32:58 +03:00
Alibek Omarov
f558cde266 engine: client: fix build with -Wincompatible-pointer-types-discards-qualifiers 2024-08-08 04:31:51 +03:00
Alibek Omarov
b508a33f5d engine: client: minor refactoring in CL_DecayLights, get rid of pointer iterating in for-loop 2024-08-07 09:23:09 +03:00
Alibek Omarov
b4db99006b engine: client: always print timedemo result 2024-08-07 08:46:55 +03:00
Alibek Omarov
8994f079a5 engine: common: don't uselessly copy data in Netchan_OutOfBound when playing a demo 2024-08-07 02:28:58 +03:00
Alibek Omarov
b2d184cfa5 engine: common: add unit tests for net_buffer functions 2024-08-07 02:28:13 +03:00
Alibek Omarov
92dc92379f engine: client: minor refactoring, turn quake stats into an enum 2024-08-06 08:42:23 +03:00
Alibek Omarov
2a6862ceb9 engine: soundlib: fix buffer overflow with truncated WAV files containing CoolEdit cue mark 2024-08-06 08:41:36 +03:00
Alibek Omarov
4c569e1d5f engine: client: ensure loading plaque was removed after we request spawn on legacy protocol 2024-08-03 11:27:45 +03:00
Alibek Omarov
4420ffd49e engine: fix buffer overflow in Sys_PrintLog 2024-08-03 11:27:45 +03:00
Alibek Omarov
fb7f57cf6a engine: client: switch efrags to dynamic allocation (as suggested on insideqc by @mh) 2024-08-03 11:27:45 +03:00
Alibek Omarov
8be3bdac5d engine: client: add command listdemo to show information about demo file (isn't really useful, just reads file header) 2024-08-03 11:01:17 +03:00
Alibek Omarov
2785376bd3 ref: remove unused function declarations 2024-08-03 09:14:56 +03:00
Alibek Omarov
d6e77e531d engine: fix memory leak in netchan
frag_message_buf wasn't always freed alongside with fragbuf_t
instead of ensuring frag_message_buf being freed, I turned it into
a flexible array member
2024-08-03 08:40:33 +03:00
Владислав Сухов
add509bf9e android: apply themed icon on Android 13+ 2024-08-01 15:08:42 +03:00
Alibek Omarov
e686b1410d engine: client: set default fullscreen value in vid_fullscreen cvar definition 2024-07-31 00:53:58 +03:00
Alibek Omarov
2c23a1e0a0 engine: platform: sdl: fix going fullscreen after manually changing VIDRESTART cvars (like width and height) 2024-07-31 00:53:29 +03:00
Alibek Omarov
47eb9e8c8f engine: client: replace same struct type memcpys by assignments 2024-07-31 00:06:22 +03:00
Alibek Omarov
712b354421 engine: common: replace same struct type memcpys by assignments 2024-07-31 00:06:22 +03:00
Alibek Omarov
18ef4922de engine: server: replace same struct type memcpys by assignments 2024-07-31 00:06:22 +03:00
Alibek Omarov
274f9d5846 filesystem: replace same struct type memcpys by assignments 2024-07-31 00:06:15 +03:00
Alibek Omarov
f6fa085fe4 ref: gl: replace same struct type memcpys by assignments 2024-07-31 00:06:07 +03:00
Alibek Omarov
9ab0f04ba5 ref: null: replace same struct type memcpys by assignments 2024-07-31 00:05:57 +03:00
Alibek Omarov
fb7854f1ef ref: soft: replace same struct type memcpys by assignments 2024-07-31 00:05:44 +03:00
Владислав Сухов
1086c31503 engine: client: in_touch.c: make the voicechat and spray buttons multiplayer only 2024-07-30 17:52:28 +03:00
Alibek Omarov
3a47248a09 extras: update submodule 2024-07-30 15:34:20 +03:00
Владислав Сухов
71a333261b engine: client: in_touch.c: added voicechat touch button 2024-07-30 15:33:35 +03:00
Alibek Omarov
5ea2e295c1 engine: prevent rescanning filesystem when new player connects or on late precache
By reusing a padding hole in resource_t structure, we put a bit indicating that this archive
was already mounted by filesystem and skip it.

Because we associate this with resource, theoretical use of late precache with archives
will rescan filesystem and allow using newly downloaded assets.
2024-07-30 15:25:48 +03:00
Alibek Omarov
1fc7547a53 engine: client: clean up scr_viewsize remnants, don't tell client.dll scr_viewsize cvar value 2024-07-30 15:25:20 +03:00
Alibek Omarov
a7d63649f8 engine: add checks to verify resource_t, customization_t and HPAK data structs sizes 2024-07-30 15:25:20 +03:00
Alibek Omarov
2f26fcdc2a public: disallow backslashes in COM_PathSlashFix 2024-07-30 15:25:20 +03:00
Alibek Omarov
107d4cdd61 engine: client: fix buffer overrun in S_TrimEnd 2024-07-30 15:25:20 +03:00
Alibek Omarov
52f9aad4d0 filesystem: add new call to fs_stdio C API to check whether we support that archive format 2024-07-30 15:25:20 +03:00
Alibek Omarov
7bb5175084 Turn downloaded/ and custom/ into com_strings.h definitions, like sound path and saves path 2024-07-30 15:25:20 +03:00
Alibek Omarov
dd570b616b engine: client: properly exit from touch editor to menu when user have chosen to cancel and reset 2024-07-29 05:11:41 +03:00
Alibek Omarov
943a30af04 engine: client: add privileged flag to touch_in_menu and touch_enable 2024-07-29 05:08:35 +03:00
Alibek Omarov
eabed60e56 engine: automatically turn-on touch emulation while editing touch from menu 2024-07-29 05:06:10 +03:00
Alibek Omarov
f793413a79 mainui: update 2024-07-29 05:05:20 +03:00
Alibek Omarov
f4a3b8571d engine: fix inverted check in debug log output
Why there is even this check in the first place???
2024-07-29 04:48:21 +03:00
Alibek Omarov
da6586b847 ref: gl: fix white border around the screen in Base Defense mod 2024-07-28 23:58:09 +03:00
Alibek Omarov
4a5f34089d engine: client: fix TriColor4fRendermode 2024-07-28 20:50:20 +03:00
Alibek Omarov
90da9659d1 engine: client: vgui: enable texturing in VGUI by default, just in case reset color too 2024-07-28 20:03:32 +03:00
Alibek Omarov
2e30acf611 engine: client: voice: allow restoring voice after toggling voice_enable while connected to server 2024-07-28 17:12:32 +03:00
Alibek Omarov
5554d13f7f engine: client: fix buffer overflow in voice sound mixer 2024-07-28 16:41:20 +03:00
Alibek Omarov
a5ef33b302 mainui: update 2024-07-28 14:51:09 +03:00
Alibek Omarov
9a2588f7eb engine: client: console: fix a rare crash when we're in game, console is enabled but it's empty
With ui_allowconsole toggle it's easy to reproduce: join game without console, go to menu,
enable console and return back to game.
2024-07-28 14:48:40 +03:00
Alibek Omarov
cac5852e68 ref: enable multiplayer high defintion model in menu preview 2024-07-28 14:45:10 +03:00
Alibek Omarov
d52d50e283 engine: client: set user name as default value for name cvar. Add ui_username cvar with user name. 2024-07-28 14:44:03 +03:00
Alibek Omarov
6911da8581 engine: client: add ui_allowconsole command that enables console
To be used by UI
2024-07-28 13:32:52 +03:00
Alibek Omarov
e70f9a67b8 engine: host: always enable console for dedicated 2024-07-26 11:08:34 +03:00
dependabot[bot]
e4bc767644 build(deps): bump rexml from 3.2.5 to 3.3.2
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.5 to 3.3.2.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.5...v3.3.2)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 10:33:11 +03:00
Владислав Сухов
97ab977f58 android: fix a string not fitting on some DPIs 2024-07-24 13:49:45 +03:00
Alibek Omarov
173aa7333a scripts: waifulib: vgui: add option to disable vgui platform support checks, try to lookup DEST_CPU subdirectories for prebuilt library 2024-07-24 07:04:53 +03:00
David
058aca0ce3 Fix strings.xml ptbr 2024-07-23 19:25:34 +03:00
Владислав Сухов
8ab693f3fe android: added russian strings 2024-07-23 17:55:51 +03:00
Alibek Omarov
2396b2d4db ref: gl: add VBO generating/uploading times 2024-07-22 22:24:19 +03:00
Alibek Omarov
6120c0daec engine: print command line args alongside developer level during init 2024-07-22 22:15:56 +03:00
Alibek Omarov
790f9bde54 engine: client: hack mobile API init because of incorrectly defined export in hlsdk-portable 2024-07-21 21:18:00 +03:00
Alibek Omarov
7a469fb481 engine: always use original player hulls for pmove trace, because mods can write invalid data in pmove->player_{mins,maxs} 2024-07-21 11:01:18 +03:00
Alibek Omarov
d4a2011a59 wscript: add configuration option for building xar 2024-07-21 05:36:58 +03:00
Alibek Omarov
9165832caf mainui: update 2024-07-21 05:34:23 +03:00
Владислав Сухов
d274a5c13c Documentation: supported-mod-list: added new supported mods (from mobile_hacks branch of hlsdk-portable) 2024-07-21 05:16:30 +03:00
Владислав Сухов
e6bd15c68b Documentation: supported-mod-list: fix dead links 2024-07-21 05:16:30 +03:00
Alibek Omarov
38bef99f98 engine: client: fix opening Quake demos 2024-07-21 05:01:31 +03:00
Alibek Omarov
95ff9e7165 engine: client: prevent empty lightstyle console flood 2024-07-21 05:01:16 +03:00
Alibek Omarov
2fddbdddee engine: client: fix ScreenFade under quake compatibility mode 2024-07-21 04:33:46 +03:00
Alibek Omarov
465e812ed9 engine: client: fix EF_DIMLIGHT under quake compatibility mode 2024-07-21 04:33:31 +03:00
Alibek Omarov
3b1fb79a85 engine: client: use Host_IsQuakeCompatible instead of checking host.features bit 2024-07-21 04:32:38 +03:00
Alibek Omarov
0f8f35b415 engine: fix alias model loading 2024-07-21 04:15:56 +03:00
Alibek Omarov
a133b1c2a9 engine: remove unused texFlags argument in Mod_LoadSpriteModel 2024-07-21 03:04:21 +03:00
Alibek Omarov
fa74acb5f0 Revert "engine: client: make client engfuncs const"
This reverts commit 14ae9b312d.
2024-07-21 02:53:28 +03:00
Alibek Omarov
836b4c358f Revert "engine: server: make physic engfuncs const"
This reverts commit 5af9511505.
2024-07-21 02:53:23 +03:00
Alibek Omarov
982e32d108 engine: client: don't mistakingly tell user about failed mobile api, when it's just not used by client.dll 2024-07-21 02:07:38 +03:00
Alibek Omarov
024a335505 engine: move wcon definitions to platform.h 2024-07-21 02:06:51 +03:00
Alibek Omarov
963cbf61e4 filesystem: fix loading libraries from archives on Windows 2024-07-21 01:49:34 +03:00
Alibek Omarov
6d98d2c7c3 engine: check XASH3D_GAME if -game argument wasn't found, do not override default base directory
Clarify that `--gamedir` configure option and `XASH_GAMEDIR` macro specify base directory
2024-07-21 01:04:50 +03:00
Alibek Omarov
64726f13e1 engine: client: more accurate R_BeamKill reimplementation
Reverse engineered from HL25 hw.so
2024-07-19 07:13:14 +03:00
Alibek Omarov
85dfaaa2c2 engine: imagelib: add LUMP_TEXGAMMA palette kind to only pass HL textures through texgamma, not Quake 2024-07-19 06:34:51 +03:00
Alibek Omarov
42a915b04a wscript: enforce -Werror=format-extra-args 2024-07-18 01:28:35 +03:00
Alibek Omarov
42a8aa6c66 mainui: update 2024-07-18 01:27:30 +03:00
Alibek Omarov
56464d3291 engine: when colorizing standard output, use bold text, as it makes it more visible (especially with black text) 2024-07-17 22:53:35 +03:00
Alibek Omarov
aed96ee753 engine: common: reduce large static arrays amount for logging by adding generic function accepting va_list 2024-07-17 22:27:20 +03:00
Alibek Omarov
a937320c65 engine: wscript: add ffmpeg hidden option, just to make it easier for me to switch between branches 2024-07-17 22:27:20 +03:00
Alibek Omarov
71b2232995 Remove non-translatable strings from values-pt-rBR 2024-07-17 02:29:19 +03:00
David
a2d9730c60 Update strings.xml to Portuguese brazilian 2024-07-17 02:29:19 +03:00
Alibek Omarov
a81a0cb059 engine: client: make menu engfuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
5af9511505 engine: server: make physic engfuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
14ae9b312d engine: client: make client engfuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
2d3e5c2e0b engine: client: make renderer engfuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
17950fec3e filesystem: make engfuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
2009140da8 ref: make gReffuncs const 2024-07-16 15:23:03 +03:00
Alibek Omarov
2a394eee62 filesystem: make g_api const 2024-07-16 15:23:03 +03:00
Alibek Omarov
09a7585643 engine: soundlib: super micro-optimization, reallocate buffer in Image_Copy rather than allocating and copying 2024-07-16 05:11:06 +03:00
Alibek Omarov
a09084ceba engine: imagelib: super micro-optimization, reallocate buffer in Image_Copy rather than allocating and copying 2024-07-16 05:10:29 +03:00
Alibek Omarov
147e5dceff engine: request SDL to ungrab mouse before signaling debugger to stop 2024-07-16 05:09:02 +03:00
Alibek Omarov
3510afd30b engine: zone: allow moving allocation from one pool to another during realloc 2024-07-16 05:06:44 +03:00
Alibek Omarov
d3586c2143 engine: soundlib: add support for converting stereo to mono and back, attempt to simplify conversion boilerplate 2024-07-16 05:05:50 +03:00
Alibek Omarov
56ba2325c1 engine: client: skip drawing 2D during changelevel before the client was active
* Prevents screen garbage on GPUs with tile-based renderers like Adreno and ImgTec
2024-07-11 09:01:19 +03:00
Alibek Omarov
b77a4ed3a1 engine: client: ignore changelevel for old protocol
* Prevents engine from drawing too early during reconnect to a
  legacy coop server
2024-07-11 08:59:42 +03:00
Alibek Omarov
9b86c3127a engine: properly disconnect from online game when loading local game (save, newgame or a level) 2024-07-10 12:32:33 +03:00
Alibek Omarov
0da7ffe45f engine: client: reset video after last screen update in begin loading plaque. Because update screen supposedly should draw the whole screen now, gl_clear hack shouldn't be required anymore 2024-07-10 11:59:54 +03:00
Alibek Omarov
30b78d9559 mainui: update 2024-07-10 11:32:30 +03:00
Alibek Omarov
c16abc0b85 engine: server: first check for dedicated server in SV_IsSimulating, as CL_Active()/CL_IsInConsole() don't make sense if we're running dedicated server already 2024-07-10 10:35:47 +03:00
Alibek Omarov
708c691cdb engine: fix XASH_DEDICATED check 2024-07-10 10:34:57 +03:00
Alibek Omarov
31c20ac4d8 engine: client: don't call Host_IsDedicated when getting split size for client 2024-07-10 10:34:30 +03:00
Alibek Omarov
1458014a29 engine: remove unused CL_IsInMenu, don't check for Host_IsDedicated in SCR_BeginLoadingPlaque, it's useless 2024-07-10 10:24:22 +03:00
Alibek Omarov
4de1241713 Update HLSDK and Xash3D submodules 2024-07-09 19:53:44 +03:00
Alibek Omarov
1c84a5c8ad engine: platform: sdl: disable restoring desktop resolution for mobile platforms, as it leads to unwanted window minimize (which correctly implemented by SDL by the way) 2024-07-09 19:52:11 +03:00
Alibek Omarov
6728b843f7 engine: platform: android: use RTLD_NOW in dlopen()
We basically use RTLD_NOW everywhere in the engine these days,
only platform code is behind that
2024-07-09 16:50:37 +03:00
Alibek Omarov
1b55104d51 editorconfig: add IDEA exported config 2024-07-09 16:46:51 +03:00
Alibek Omarov
55d78b0197 AndroidManifest: use launchMode=singleTask, so our activity gets pushed at the top of the stack. Besides, launching engine again with another engine launched in background just crashes it 2024-07-09 16:30:26 +03:00
Alibek Omarov
c3c277f03b AndroidManifest: disable unneeded configChanges, we don't care about RTL settings in-game or locale changes. Add touchscreen just in case (old port uses it somehow?) 2024-07-09 16:29:21 +03:00
Alibek Omarov
76978bfd47 scripts: gha: change Android project URL, update Android CLI tools and NDK 2024-07-09 08:56:14 +03:00
Alibek Omarov
6ff3231dab engine: change current working directory before initializing filesystem_stdio 2024-07-09 08:45:27 +03:00
Alibek Omarov
64716e6b42 filesystem: request win32 error string in wide chars and then transform it to UTF-8 using our utflib 2024-07-09 08:25:15 +03:00
Alibek Omarov
a1191eb4ab engine: platform: win32: request error string in wide chars and then transform it to UTF-8 using our utflib 2024-07-09 08:24:58 +03:00
Alibek Omarov
ccb687e552 xash3d-fwgs: update submodule 2024-07-08 22:25:39 +03:00
Alibek Omarov
075dbbd08b hlsdk-portable: update submodule 2024-07-08 22:24:30 +03:00
Alibek Omarov
24266c64ef SDL: update submodule 2024-07-08 22:23:57 +03:00
Alibek Omarov
f19430447a gradle: upgrade gradle and android plugin 2024-07-08 22:21:26 +03:00
Alibek Omarov
166bed732e engine: crashhandler: few improvements for win32 crashhandler
* Larger message buffer
* Print version at first line
* Tell SDL2 to ungrab mouse
2024-07-08 05:56:20 +03:00
Alibek Omarov
02cb12e4b4 mainui: update 2024-07-08 05:49:24 +03:00
Alibek Omarov
159467ad44 engine: add IPv6 master server 2024-07-07 21:18:02 +03:00
Alibek Omarov
2a006086c5 mainui: update 2024-07-07 06:51:47 +03:00
Alibek Omarov
e0dc1eec93 engine: client: more reliable way to find the payload the netinfo response 2024-07-07 06:49:54 +03:00
Alibek Omarov
ab130ee92c engine: client: fix infostring truncation in NetAPI requests 2024-07-07 06:17:38 +03:00
Alibek Omarov
dabbe09918 engine: add NetAPI flag to send NetAPI requests to old protocol servers 2024-07-07 06:17:15 +03:00
Alibek Omarov
296a7ac11d engine: client: fix NetAPI request sending 2024-07-07 06:16:46 +03:00
Alibek Omarov
6bbf08893e engine: add NetAPI to extended menu API 2024-07-07 03:39:09 +03:00
Alibek Omarov
f8b958738a engine: client: rework NetAPI response parsing 2024-07-07 03:30:34 +03:00
Alibek Omarov
1b4427f13f engine: server: rework NetAPI responses
players list and rules are now actually useful
2024-07-07 03:29:27 +03:00
Alibek Omarov
e55577fd26 engine: get rid of some size constants passed to Info_SetValueForKey, use sizeof instead 2024-07-07 03:02:02 +03:00
Alibek Omarov
c42960ec2a engine: server: mark some cvars and movevars as server cvars, so they get reported in rules query
Bring back sv_contact cvar, as it makes sense to get this from rules query
2024-07-07 03:01:59 +03:00
Alibek Omarov
c033d4b65c engine: server: optimize source query 2024-07-07 02:34:43 +03:00
Alibek Omarov
dc6f03b4e4 engine: server: add function SV_HavePassword that correctly checks whether this server have set up password 2024-07-07 02:10:48 +03:00
Alibek Omarov
b6967a432a engine: add NetAPI flag NET_ERROR_FORBIDDEN 2024-07-07 02:05:25 +03:00
Alibek Omarov
7d0467863c engine: server: add cvar to not expose current player list, or if server has a password 2024-07-07 01:59:56 +03:00
Alibek Omarov
a0b72d3995 engine: server: light sv_query.c refactoring, use Netchan_OutOfBand instead of manually creating out of band packet 2024-07-07 01:55:03 +03:00
Alibek Omarov
5fe4b867f3 engine: server: do not expose some cvars in rules, some of them just don't make sense 2024-07-07 01:51:50 +03:00
Alibek Omarov
40af058406 engine: client: console: add conback.dds by request, don't fail on texture that cannot be loaded 2024-07-06 22:30:05 +03:00
Alibek Omarov
b4376a6a8c engine: client: make a common function for sending out userinfo changes 2024-07-06 06:09:19 +03:00
Alibek Omarov
457422c679 engine: server: fix possible byte overflow when sending sound with attenuation == 4.0f 2024-07-06 05:50:53 +03:00
Alibek Omarov
080eba948f engine: server: fix sound not being overriden when an entity sound came from has an aiment set
This check was added 10+ years ago in 8f6f3fc (viewable in Xash3DArchive) and
probably doesn't make any sense anymore.
2024-07-06 05:32:20 +03:00
Alibek Omarov
eff86defd9 public: fix Q_equal for case when applying epsilon doesn't change the value 2024-07-04 07:55:32 +03:00
Alibek Omarov
fcb463d400 engine: client: flush demoheader before copying it 2024-07-04 07:23:48 +03:00
Alibek Omarov
efee8149e2 filesystem: remove unneeded cast to fs_offset_t in write() call 2024-07-04 07:23:13 +03:00
Alibek Omarov
bc32f37fce public: use Q_strchr in COM_FixSlashes 2024-07-04 06:42:49 +03:00
Alibek Omarov
58bfa247a4 public: add test case for COM_FixSlashes 2024-07-04 06:42:35 +03:00
Alibek Omarov
59b9b31604 public: avoid useless copies in Q_pretifymem 2024-07-04 06:39:18 +03:00
Alibek Omarov
844af709c0 public: simplify Q_colorstr and Q_strnlwr 2024-07-04 06:38:50 +03:00
Alibek Omarov
bb6e2d6885 public: add Q_colorstr and Q_strnlwr tests 2024-07-04 06:38:09 +03:00
Alibek Omarov
6243dc7913 public: simplify Q_ato{i,f} implementation 2024-07-04 06:30:59 +03:00
Alibek Omarov
45c4362ae6 public: add Q_ato{i,f,v} test 2024-07-04 06:29:46 +03:00
Alibek Omarov
a0230b7e00 engine: client: console: minor refactoring, move common NXPrintf code to Con_NXPrintfv 2024-07-04 05:49:33 +03:00
Alibek Omarov
768755c31a engine: client: use Con_Printf instead of Con_Print (which is just printing to console, not the logging) 2024-07-03 04:22:28 +03:00
Alibek Omarov
3088c7f198 scripts: gha: set proper PKG_CONFIG_PATH when building 32-bit SDL 2024-07-02 19:26:39 +03:00
Alibek Omarov
c8469071bf scripts: gha: add remaining wayland dependencies 2024-07-02 19:15:02 +03:00
Alibek Omarov
115fc301b5 scripts: gha: fix installing pulseaudio dependency for 32-bit build 2024-07-02 19:02:54 +03:00
Alibek Omarov
bc449b8e95 scripts: gha: enable JACK in automatic builds 2024-07-02 18:59:13 +03:00
Alibek Omarov
74bbc0fe7e scripts: gha: install pulse, jack and wayland development files for SDL to detect them 2024-07-02 18:58:53 +03:00
Alibek Omarov
c73fa3d7a6 filesystem: fix mounting wads again
Because of the mounting order, VFS fails to automatically find unpacked WADs
2024-06-28 18:00:40 +03:00
Alibek Omarov
5694610478 filesystem: fix writedir being prepended to rodir path when searching for library
* Refactor generating shortName
* Refactor library origin checks
2024-06-27 08:16:56 +03:00
Alibek Omarov
ec107dfba5 filesystem: load on-disk archives like PAK and PK3 through VFS (disk-only for now)
* Track from which archive the file has been opened and provide needed functions for it
2024-06-27 07:31:11 +03:00
Alibek Omarov
64aa476330 editorconfig: add Visual Studio options (generated) 2024-06-27 07:18:10 +03:00
Alibek Omarov
42f6719e8d filesystem: drop direct path hacks for WAD files, let VFS decide how to open WAD archives 2024-06-27 05:55:06 +03:00
Alibek Omarov
244b9dc02b wscript: disable -Wformat=2 back (it wasn't supposed to be pushed anyway) 2024-06-24 20:01:29 +03:00
Alibek Omarov
fe3644a417 engine: client: add simple debugging tool that shows entities number, model and movetype (to be extended) 2024-06-22 08:19:19 +03:00
Alibek Omarov
e18b61e041 Fixes for -Wformat=2 on 64-bit targets 2024-06-22 07:31:37 +03:00
Alibek Omarov
d054782693 engine: client: fix broken legacy demos playing
Fixes: ff4221fbe7 ("engine: client: write correct cls.legacymode/net_protocol value for demos")
2024-06-22 07:30:47 +03:00
Alibek Omarov
d56e53a347 Replace hardcoded functions names by __func__ macro
* while we're here, fix some possible bugs
* and fix -Wformat=2

s/__FUNCTION__/__func__/g

awawawa
2024-06-19 06:53:42 +03:00
Alibek Omarov
3503c721ac engine: client: console: simplify loading console background image 2024-06-19 03:35:28 +03:00
Alibek Omarov
0fab5f07d0 Revert "engine: common: mod_studio: reject models with split textures files that cannot be loaded"
This reverts commit 3256236ba2.
2024-06-18 22:50:06 +03:00
Alibek Omarov
b0d12f8bf9 engine: client: fix build
Forgot to stage these changes two commits ago =/
2024-06-18 00:01:54 +03:00
Alibek Omarov
9fe58aaabc engine: client: send expected cvar not found string for old protocol cvar query 2024-06-17 23:44:05 +03:00
Alibek Omarov
03c8ea14cc engine: client: mute music if not in focus 2024-06-17 20:32:04 +03:00
Alibek Omarov
260edc2a08 ref: gl: try to match texture slot and texture object handle because of buggy games 2024-06-15 19:21:26 +03:00
Alibek Omarov
b41591a527 ref: gl: decreate alphatest value for lightmapped sprites to make them easier to see
With 0.5 they're too tiny
2024-06-15 19:07:17 +03:00
Alibek Omarov
4e9481451b mainui: update 2024-06-15 17:22:52 +03:00
Alibek Omarov
95b48da37d engine: allow to change hardcoded path to custom.hpk 2024-06-15 17:22:26 +03:00
Alibek Omarov
1b36785177 engine: common: hpak: rename hpk_maxsize to hpak_max_size to avoid Valve's defaults
While we're here:
* Increase it to 64 MiB.
* Make it privileged.
* Add hpk_maxsize stub command as a deprecation notice.
2024-06-15 16:55:25 +03:00
Alibek Omarov
8bc76e3d58 engine: host: do not specifically check timedemo or vsync in Host_CalcSleep, because it's already has been checked in Host_CalcFPS 2024-06-15 13:57:12 +03:00
Alibek Omarov
1a5e2b907d engine: client: minor refactoring for cls.demoplayback check 2024-06-15 13:56:25 +03:00
Alibek Omarov
3717e5c2e0 engine: client: simplify server message parsing by moving common code out of protocol-specific parsing funcs 2024-06-15 13:51:02 +03:00
Alibek Omarov
33a1416199 engine: common: net_chan: remove unneeded check for demo and remote address in netchan, as it's handled in client and server already 2024-06-15 13:44:26 +03:00
Alibek Omarov
ff4221fbe7 engine: client: write correct cls.legacymode/net_protocol value for demos 2024-06-15 13:43:18 +03:00
Alibek Omarov
486bca82e8 engine: add quake svc messages names 2024-06-15 11:04:30 +03:00
Alibek Omarov
611d07fc16 engine: client: redefine legacymode from qboolean to an enum with selected protocol. Remove protocol auto-guess hack, it's useless since connect accept accepts protocol string 2024-06-15 10:52:26 +03:00
Alibek Omarov
f7e12586cf engine: platform: sdl: we must notify the engine about the unpressed button when text input was activated 2024-06-15 08:44:19 +03:00
Alibek Omarov
f62aa051c8 engine: common: make netchan cvars static 2024-06-15 08:44:19 +03:00
Alibek Omarov
2b6b898102 engine: client: make some cvars static 2024-06-15 08:44:19 +03:00
Alibek Omarov
1dd0444531 engine: server: comment out unused cvars, make some static 2024-06-15 08:44:19 +03:00
Alibek Omarov
ba9eb01c1f engine: server: replace timeout cvar by sv_timeout cvar for consistency with GoldSrc 2024-06-15 08:44:19 +03:00
Alibek Omarov
73a8144e75 engine: client: reduce console spam about not precached model to dev level 1 2024-06-15 08:44:18 +03:00
Alibek Omarov
6aef422de6 ref: remove unneeded dlight pointer increment 2024-06-15 08:44:18 +03:00
Alibek Omarov
5f4b8b60cb engine: client: make remote print messages more obvious 2024-06-15 08:44:18 +03:00
Alibek Omarov
3256236ba2 engine: common: mod_studio: reject models with split textures files that cannot be loaded 2024-06-14 11:34:42 +03:00
Alibek Omarov
b102727320 engine: client: try to not save passwords to console history 2024-06-14 11:34:37 +03:00
Alibek Omarov
3434005e66 engine: common: make Host_IsLocalGame and Host_IsLocalClient inlined 2024-06-13 01:20:14 +03:00
Alibek Omarov
b3026a7991 engine: client: don't use CL_Active/CL_GetMaxClients wrappers as they are only intended to be either passed to DLL or used in common/server code 2024-06-13 01:19:38 +03:00
Alibek Omarov
0a051832a8 engine: client: do not mute sounds in menu with multiplayer, the bug already been solved different way 2024-06-13 01:07:49 +03:00
Alibek Omarov
2dbafbda02 engine: common: mod_studio: fix NULL mod->cache.data if model has split texture file but none was loaded 2024-06-12 23:37:30 +03:00
Alibek Omarov
240b6fb6f2 engine: fix possible unprivileged config execute with fake extension 2024-06-12 11:16:31 +03:00
Alibek Omarov
4163d3655a engine: reformat and reorder host_parm_s struct, remove now unused host.daemonize and host.enabledll 2024-06-12 11:16:26 +03:00
Alibek Omarov
2c7bf49fc9 engine: host: avoid some of unnecessary double-to-float conversions 2024-06-12 10:20:09 +03:00
Alibek Omarov
739592e50d engine: host: refactoring, reduce usage of global variables a bit 2024-06-12 10:20:09 +03:00
Alibek Omarov
393e31e509 engine: move finding root/readonly directory to FS initialization, remove unused host.rodir, host.rootidr 2024-06-12 10:20:09 +03:00
Alibek Omarov
a1dceacc8f engine: remove unused host.hMutex and host.hInst 2024-06-12 10:20:09 +03:00
Alibek Omarov
cf26c87872 engine: remove unused host.decalList and host.numdecals 2024-06-12 10:20:09 +03:00
Alibek Omarov
21195b3491 engine: increase logo and hpak limits, add cl_logomaxdim cvar to limit decal size (set to 96, default HL logo size is 64) 2024-06-11 07:47:01 +03:00
Alibek Omarov
3f66f6a6a5 ref: null: update to RefAPI 8 2024-06-11 06:30:17 +03:00
Alibek Omarov
daae4f2f80 engine: ref_api: bump RefAPI to version 8 2024-06-11 06:18:09 +03:00
Alibek Omarov
4e2708c1ac engine: bring back texture replacement 2024-06-11 06:16:26 +03:00
Alibek Omarov
d57d8e0d5d ref: soft: fix R_DrawStretchPic and Draw_Fill with OpenMP enabled 2024-06-11 02:07:49 +03:00
Alibek Omarov
9577a6af21 ref: moved VGUI support API implementation to the engine 2024-06-11 02:07:49 +03:00
Alibek Omarov
107a6aed01 ref: move PARM_SURF_SAMPLESIZE handling to the engine 2024-06-11 02:07:49 +03:00
Alibek Omarov
2c2045d413 ref: move PARM_SKY_SPHERE handling to the engine 2024-06-11 02:07:49 +03:00
Alibek Omarov
30fe471d2b ref: move loading skybox into the engine 2024-06-11 02:07:44 +03:00
Alibek Omarov
5ab6979633 ref: move common quake sky cloud loading to the engine 2024-06-10 22:47:39 +03:00
SNMetamorph
ec5e9cb6e3 engine: client: send engine build information to masterserver 2024-06-10 20:53:59 +03:00
Alibek Omarov
f4b4546197 engine: temporarily fix loading studio models with split texture model 2024-06-10 14:57:00 +03:00
Alibek Omarov
f047749e61 engine: move studio model truncation into separate function, disable it by default 2024-06-10 13:34:02 +03:00
Alibek Omarov
87840ce91d engine: fix potential buffer overflow in Mod_StudioTexName
* Model names are 64 bytes wide, adding texture character means we needs 65 byte wide string.
* It never gets stored in memory anyway.
2024-06-10 13:28:01 +03:00
Alibek Omarov
bf31e9f634 engine: fix NO_ASAN macro usage with MSVC 2024-06-09 09:37:16 +03:00
Alibek Omarov
f86d84daed engine: platform: sdl: initialize window name string when building with old SDL 2024-06-09 09:16:45 +03:00
Alibek Omarov
41ed920d35 common: xash3d_types: fix build 2024-06-09 09:16:07 +03:00
Alibek Omarov
df23ddb545 engine: server: fix signed integer overflow in challenge generator 2024-06-09 07:05:24 +03:00
Alibek Omarov
767556ccad engine: temporarily disable ASan in MSG_WriteUBitLong (evil!) 2024-06-09 07:03:59 +03:00
Alibek Omarov
f9dab2ad19 engine: server: rename sv_allow_upload to sv_allowupload for compatibility 2024-06-09 07:02:50 +03:00
Alibek Omarov
66cb3a6120 engine: client: add room_off variable to toggle sound effects processing for GoldSrc compatibility
* Fixes Sven-Coop 4.8 client.
* Declare dsp_off deprecated.
2024-06-09 03:51:43 +03:00
Tuldok
7672a370da engine: Crashhandler support for Windows-on-ARM (arm/arm64) 2024-06-08 21:35:55 +03:00
Alibek Omarov
870e47ed03 engine: ensure character signness when checking for nonprintable characters 2024-06-07 22:22:13 +03:00
Alibek Omarov
32d4bdb80f engine: fix UTF-8 sequence input
Fixes: 2e0fc3e4c1 ("engine: client: do not repeatedly check cl_charset value, use generic Con_UtfProcessChar")
2024-06-07 22:16:32 +03:00
Alibek Omarov
929dfd2c71 mainui: update 2024-06-03 09:04:47 +03:00
Alibek Omarov
f437af6451 mainui: update 2024-06-03 07:57:10 +03:00
Alibek Omarov
413a0fb2e5 engine: client: improve accumulating rounding error, thanks @SNMetamorph for suggestion 2024-06-02 13:09:10 +03:00
Alibek Omarov
793adadb06 mainui: update 2024-06-02 12:51:30 +03:00
Alibek Omarov
999b43b89f engine: implement changing cursor type in gameui 2024-06-02 12:24:14 +03:00
Alibek Omarov
bd60c88c7d ref: soft: fix build with OpenMP under Visual Studio 2024-06-02 11:39:54 +03:00
Alibek Omarov
23b9a2eddf waf.bat: add checks for newer pythons, remove checks for pythons below 2.7 2024-06-02 11:39:54 +03:00
Alibek Omarov
0b57d97c8c vgui_support: update submodule 2024-06-02 11:35:57 +03:00
Alibek Omarov
6255293dd4 engine: fix using OpenMP PHS generation under Visual Studio 2024-06-02 10:34:10 +03:00
Alibek Omarov
04136d95a3 filesystem: fix build warning 2024-06-02 10:33:33 +03:00
Alibek Omarov
40aa29e42a ci: remove freebsd-13-2 task 2024-06-02 10:04:04 +03:00
Alibek Omarov
a709f30da9 engine: soundlib: libmpg: add wrappers on top of libc read & lseek in case they don't match internal mpg123 types
(we better migrate to upstream libmpg at some point)
2024-06-02 09:19:17 +03:00
Alibek Omarov
0796c14e79 engine: client: fix framerate depending player move 2024-06-02 04:15:17 +03:00
Alibek Omarov
a9c0a4be23 engine: server: add cvar to disable bandwidth test on server side 2024-06-01 05:27:35 +03:00
Alibek Omarov
3e1209d3a4 engine: client: do not rely on host.downloadcount when connecting to the server with HTTP enabled
* Replace cl.downloadUrl by cl.http_download
2024-06-01 04:30:21 +03:00
Alibek Omarov
caf14c1b7c engine: soundlib: libmpg: fix the inconsistent use of offset types in lseek() 2024-05-31 03:35:39 +03:00
Alibek Omarov
27f7d2c8d2 engine: common: ban few more executable types for COM_IsSafeFileToDownload 2024-05-31 00:43:28 +03:00
Alibek Omarov
8ee430eda2 engine: common: double check that resource starting with !MD5 doesn't have any extension 2024-05-31 00:42:44 +03:00
Alibek Omarov
484e4cb225 engine: common: net_ws: less verbose HTTP client, fix printing header size in case of an error 2024-05-31 00:07:14 +03:00
Alibek Omarov
b080ad9954 engine: moved link_t helpers to sv_world.c from world.c and made them static 2024-05-30 07:31:03 +03:00
Alibek Omarov
f6625d9188 engine: common: remove unused et_name array 2024-05-30 07:22:21 +03:00
Alibek Omarov
1eb2816bc4 engine: client: manually call FS_Rescan if we downloaded an archive while connecting to server 2024-05-30 06:48:17 +03:00
Alibek Omarov
077be5aaf3 engine: client: only strip DEFAULT_SOUNDPATH from t_sound resources 2024-05-30 06:47:46 +03:00
Alibek Omarov
d59875f114 engine: common: for automatic wad precache to work, we need to count the real wad usage on dedicated 2024-05-30 06:18:15 +03:00
Alibek Omarov
e89191ed39 engine: common: automatically precache wad files required by loaded map
Makes it easier to host server with multiplayer maps and broken .res files.
2024-05-30 05:58:41 +03:00
Alibek Omarov
ea21438637 engine: netchan: append .ztmp extension instead of replacing original extension
* so we don't send wrong file that has same name but different extension

* validate filename size so it won't get truncated in fragbuf_t
2024-05-30 04:50:58 +03:00
Alibek Omarov
0d2e8333e8 common: remove unused boneinfo.h header 2024-05-29 12:25:23 +03:00
Alibek Omarov
338399e622 engine: common: implement PHS calculation like in QuakeWorld/GoldSrc 2024-05-29 05:58:51 +03:00
Alibek Omarov
27cab8aad5 scripts: waifulib: compiler_optimizations: set HAVE_OPENMP=1 define if openmp feature was enabled during the build 2024-05-29 05:41:47 +03:00
Alibek Omarov
1545a49b4c engine: client: only allocate debug hulls polygons when they're requested
* Make the appropriate changes in ref_gl
2024-05-29 05:41:47 +03:00
Alibek Omarov
3ca15250e8 engine: common: use Mod_PointInLeaf in Mod_GetPVSForPoint instead of traversing nodes manually 2024-05-29 05:41:47 +03:00
Alibek Omarov
6cbac51731 engine: common: add function for compressing visdata 2024-05-29 05:41:47 +03:00
Alibek Omarov
e310c666b1 engine: common: add phs flag to Mod_FatPVS, unused currently 2024-05-29 05:41:47 +03:00
Alibek Omarov
677b0170aa engine: server: remove recalculating viewpoint for PVS hack, as it causes issues with inconsistency between real and "restored" view positions 2024-05-29 05:41:47 +03:00
Alibek Omarov
9150b770e4 engine: common: mod_bmodel: add function Mod_DecompressVisTo that will copy fat vis data into the provided buffer 2024-05-29 05:41:47 +03:00
Alibek Omarov
2ad6511c31 public: add Q_memor routine that binary OR's data from src to dst
Supposed to be compiled with optimizations enabled.
2024-05-29 05:41:33 +03:00
Alibek Omarov
0848f28d83 waf: upgrade to latest master 2024-05-26 19:32:14 +03:00
Alibek Omarov
5d9bc950ce wscript: do not load msvc manually, it will be loaded by compiler_{c,cxx} 2024-05-25 22:40:25 +03:00
Alibek Omarov
714da79395 mainui: update 2024-05-25 22:25:33 +03:00
Alibek Omarov
823fe9ebbd waf: upgrade to waf 2.1.1/waifu 1.3.0. Try to fix most optparse->argparse migration issues 2024-05-25 04:58:28 +03:00
Alibek Omarov
4bf72b5383 engine: forbid accessing cvars starting with con_ and scr_ through stufftext
Some stupid servers might mess up with console cvars values.
2024-05-25 02:26:42 +03:00
Alibek Omarov
51945f002b engine: server: check for invoker entity when filtering out host client during entities thinking 2024-05-23 02:06:54 +03:00
Alibek Omarov
bcca9387de engine: server: sv_pmove: always set FEV_NOTHOST for events coming from PMove (like GoldSrc) 2024-05-23 01:51:42 +03:00
Alibek Omarov
b8417fa46d ref: soft: search parent in both entity lists when drawing MOVETYPE_FOLLOW entities
Fixes the issue in Brutal Half-Life beta 2 with invisible scientist skin.

Fixes: 6862b14e59 ("ref: soft: only draw MOVETYPE_FOLLOW studio model if it's parent is visible")
2024-05-19 06:31:46 +03:00
Alibek Omarov
85b0699288 ref: gl: search parent in both entity lists when drawing MOVETYPE_FOLLOW entities
Fixes the issue in Brutal Half-Life beta 2 with invisible scientist skin.

Fixes: dc1d65f621 ("ref: gl: only draw MOVETYPE_FOLLOW studio model if it's parent is visible")
2024-05-19 06:29:22 +03:00
Alibek Omarov
6c03fb0226 engine: client: first attempt to use utflib to replace Con_UtfProcessCharForce calls 2024-05-15 05:25:53 +03:00
Alibek Omarov
a084dea07c public: add functions to convert from Unicode codepoints into CP1251 or CP1252 2024-05-15 05:07:18 +03:00
Alibek Omarov
2e0fc3e4c1 engine: client: do not repeatedly check cl_charset value, use generic Con_UtfProcessChar 2024-05-15 05:06:57 +03:00
Alibek Omarov
24f4d410ce filesystem: take FS_Read improvements from DarkPlaces and proper fix for buffer overflow 2024-05-15 03:43:02 +03:00
Alibek Omarov
052e0445ab engine: client: console: cleanup input buffer from line feed characters before pushing it to the console history 2024-05-15 03:08:22 +03:00
Alibek Omarov
758c908d5a public: add buffer size parameter to COM_RemoveLineFeed 2024-05-15 03:06:57 +03:00
Alibek Omarov
3917c2589d filesystem: fix buffer overflow in FS_Read when we pass single byte buffer to it with one character sitting in ungetc 2024-05-15 02:45:01 +03:00
Alibek Omarov
f4a77308ec engine: soundlib: fix possible buffer overflow in Sound_ConvertUpsample 2024-05-06 15:45:49 +03:00
Alibek Omarov
103b9724f9 scripts: waifulib: compiler_optimizations: fix linking OpenMP 2024-05-06 15:36:26 +03:00
Alibek Omarov
75a315ecf0 engine: client: add optional (compile time for now) setting to reconfigure engine to use 48kHz sounds 2024-05-06 15:10:34 +03:00
Alibek Omarov
63b3b9ef6d engine: client: fix missing upsampling for >32kHz sounds 2024-05-06 15:09:52 +03:00
Alibek Omarov
a6c2cfe89b engine: avoid constants in Q_strncpy third argument, where possible 2024-05-06 14:27:26 +03:00
Alibek Omarov
5120657386 engine: fix possible buffer overflow in S_StreamGetCurrentState 2024-05-06 06:53:22 +03:00
Alibek Omarov
e754de46d1 engine: client: fix buffer overflow in S_FindName 2024-05-06 06:42:47 +03:00
Alibek Omarov
5d718aa0d6 scripts: waifulib: compiler_optimizations: add flag for building with OpenMP (not used anywhere in the engine but let's keep it) 2024-05-06 06:42:15 +03:00
Alibek Omarov
55fcbc8880 engine: soundlib: implement linear interpolation in Sound_ResampleInternal
* split resampling into three functions
* added resampling using SDL_AudioCVT, it's slow, so isn't enabled by default
2024-05-06 06:41:23 +03:00
Alibek Omarov
e19aa001b2 engine: client: ref_common: slight refactoring, reorder ref_state_t 2024-05-06 01:59:50 +03:00
Alibek Omarov
b447ea9c18 engine: client: remove unused fields in client_static_t 2024-05-06 01:59:14 +03:00
Alibek Omarov
13274655d4 engine: client: sound: slight refactoring, removed unused s_listener.velocity 2024-05-06 01:30:06 +03:00
Alibek Omarov
3723ac60ef engine: client: s_mix: _inline -> static 2024-05-06 00:51:32 +03:00
Alibek Omarov
da578f47f1 engine: client: fix sounds being paused in menu and then blasted all at the same time in multiplayer 2024-05-06 00:41:38 +03:00
Alibek Omarov
433e7de686 engine: clean up unused soundlib flags, set SOUND_LOOPED flag on looped sounds 2024-05-05 06:16:57 +03:00
Alibek Omarov
e18e9ae2ea engine: platform: sdl: ignore keyboard events if text mode is active 2024-05-04 11:05:17 +03:00
Alibek Omarov
27d5123a61 mainui: update 2024-05-03 16:55:17 +03:00
Alibek Omarov
89b9f9ffe2 github: update SDL to 2.30.3 2024-05-03 16:04:13 +03:00
Alibek Omarov
a17b8aaa13 public: fix parameter name omitted error for older compilers 2024-05-03 16:01:24 +03:00
Alibek Omarov
e210969612 scripts: gha: build_linux: spew config.log on build failure 2024-05-03 15:57:26 +03:00
Alibek Omarov
1208356b92 ref: gl: gl2_shim: remove unused ALLOCA_H include 2024-05-03 15:53:57 +03:00
Alibek Omarov
d7cd74fe2f wscript: no need to pass PACKAGING into env 2024-05-03 15:45:20 +03:00
Alibek Omarov
31b63e9939 wscript: exclude executing large file test for PSVita 2024-05-03 15:44:35 +03:00
Alibek Omarov
b99c2c2df1 wscript: do not execute test for test for large files 2024-05-03 15:38:35 +03:00
Alibek Omarov
94d3eff9ce engine: host: fix build with Q_strchrnul returning const char * 2024-05-03 15:31:20 +03:00
Alibek Omarov
b78e9961c6 public: fix build on Windows
stristr doesn't exist actually
2024-05-03 15:30:42 +03:00
Alibek Omarov
b0704ca5d6 mainui: update 2024-05-03 06:38:21 +03:00
Alibek Omarov
31c0934108 engine: fix parsing -bugcomp flags, assume bugcomp flags only starts with alphabetic character 2024-05-03 06:28:48 +03:00
Alibek Omarov
37083c8aef ref: soft: mark sw_drawflat and sw_draworder as cheats 2024-05-01 00:52:45 +03:00
Alibek Omarov
af23b0c67b public: crtlib: refactoring with new macros, use system strlcpy/strlcat if possible 2024-04-30 02:20:14 +03:00
Alibek Omarov
a9e83fb9cf wscript: move std defining macros into libpublic's sdk_includes target, so we don't accidentally feed submodules our macros 2024-04-29 05:29:53 +03:00
Alibek Omarov
51126e1691 mainui: update 2024-04-29 05:28:41 +03:00
Alibek Omarov
dd410a2de5 engine: implement small Message Rewrite Facitility that allows to run mods that directly write internal GoldSrc messages 2024-04-28 06:59:18 +03:00
Alibek Omarov
7ccb0b5c02 public: make simple ctype functions inlined 2024-04-28 06:59:18 +03:00
Alibek Omarov
7f3e62e456 public: remove unneeded copy in Q_atov 2024-04-28 06:59:18 +03:00
Alibek Omarov
fcfc29d7ea public: fix variables types in COM_HashKey, they are all supposed to be unsigned integers 2024-04-28 06:59:18 +03:00
Alibek Omarov
2f3429a144 engine: common: base_cmd: use flexible array to store basecmd name 2024-04-28 06:59:18 +03:00
Alibek Omarov
20782693f4 engine: server: rename symbols for svs, sv and SV_DropClient to avoid AMXModX trying to acquire their pointers 2024-04-28 06:59:18 +03:00
Alibek Omarov
0cfb354374 common: add RENAME_SYMBOL macro that renames symbol for compatibility with nasty mods (also reformat this portion, while we're at it) 2024-04-28 06:59:18 +03:00
Alibek Omarov
9be5b7c6c9 engine: physint: empty-define ALLOC_CHECK if not defined by SDK, so this header can be freely moved to another SDK 2024-04-28 06:59:18 +03:00
Alibek Omarov
e7653d2ea6 engine: soundlib: fix searching for a RIFF/WAVE chunks in streams 2024-04-27 10:51:56 +03:00
Alibek Omarov
1494887e29 engine: soundlib: snd_wav: replace strncmp by IsFourCC helper function 2024-04-26 06:29:38 +03:00
Alibek Omarov
42dab2b1a5 engine: soundlib: snd_wav: attempt to fix misleading warning about truncated file 2024-04-26 06:25:18 +03:00
Alibek Omarov
36a0c1fb17 ref: if the entity is opaque, check the renderfx too, it might become translucent 2024-04-26 04:15:21 +03:00
Alibek Omarov
60c6767337 filesystem: copy absolute path to library in FS_FindLibrary for compatibility
Extend fullPath for longer absolute paths.
2024-04-22 04:02:46 +03:00
Alibek Omarov
75451cc7fa engine: client: print correct message names in legacymode 2024-04-22 04:02:46 +03:00
Alibek Omarov
db10035d9d engine: add GoldSrc protocol definitions 2024-04-22 04:02:46 +03:00
Alibek Omarov
de21d845ec engine: don't forget to put newline at the end of overflowed console message 2024-04-21 20:21:17 +03:00
Alibek Omarov
320f8466e6 engine: hpak: don't print error about missing custom.hpak in quiet mode 2024-04-21 20:05:37 +03:00
Alibek Omarov
f3208e95b2 engine: server: remove misleading message about interface version in case when GetEntityAPI2 has failed
Add message when GetEntityAPI was used instead
2024-04-21 20:05:34 +03:00
Alibek Omarov
ea34bc8652 engine: turn bugcomp into flags that can be enabled/disabled separately 2024-04-21 16:52:15 +03:00
Alibek Omarov
3daf014af8 wscript: always enable -Werror=implicit-function-declaration 2024-04-20 20:48:01 +03:00
Alibek Omarov
ca9d3d262a engine: common: net_encode: directly call MSG_ReadSBitLong for DT_TIMEWINDOW_*, don't do the multiplier check for DT_TIMEWINDOW_BIG 2024-04-20 20:48:01 +03:00
Alibek Omarov
a08f5e439d engine: common: net_encode: fix comparing DT_TIMEWINDOW_* fields
Fixes: 35783bcec2 ("engine: common: net_encode: fix inaccuracy in DT_TIMEWINDOW_* encoding")
2024-04-19 01:51:25 +03:00
Alibek Omarov
8f6771dff4 engine: common: zone: check that Mem_FindPool might return NULL (it can if Sys_Error was called inside of a Sys_Error) 2024-04-19 00:14:26 +03:00
Alibek Omarov
cd47c6b5b3 engine: common: zone: disallow migrating allocations from one pool to another, as this isn't practically used anywhere 2024-04-19 00:14:26 +03:00
Alibek Omarov
1f4f3d7fda engine: common: zone: remove mempool sentinels as pools aren't subject to buffer overflow or double free anymore 2024-04-19 00:14:26 +03:00
Alibek Omarov
e81b5144b3 engine: common: zone: use realloc for managing mem pools
rearrange data in memheader_s to avoid unnecessary paddings
2024-04-19 00:14:26 +03:00
Alibek Omarov
9ec1caed53 engine: common: zone: implement dummy Q_realloc for XASH_CUSTOM_SWAP 2024-04-19 00:14:26 +03:00
Alibek Omarov
ca3b4a9d7f engine: host: oops 2024-04-18 16:48:41 +03:00
Alibek Omarov
87ac217887 engine: common: net_encode: add bitmask operation to delta tests 2024-04-18 16:44:15 +03:00
Alibek Omarov
213650db8f engine: exit with non-zero return code if engine tests are failed 2024-04-18 16:36:18 +03:00
Alibek Omarov
ac46164a6e engine: common: net_encode: implement basic delta tests 2024-04-17 20:27:22 +03:00
Alibek Omarov
6d12d84e94 engine: common: net_encode: apply post_multiplier to integer fields, like GoldSrc does 2024-04-17 06:23:22 +03:00
Alibek Omarov
2a18cde60c engine: common: net_encode: fix applying integer clamp before multiplier
Without this fix, data still might overflow after applying multiplier
and potentially send incorrect data.
2024-04-17 06:16:44 +03:00
Alibek Omarov
35783bcec2 engine: common: net_encode: fix inaccuracy in DT_TIMEWINDOW_* encoding
By avoiding double rounding, we get more accurate time on client when timebase
gets rounded down and target time gets rounded up:

```
>>> round(123.1) - round(124.51)
-2
>>> round(123.1 - 124.51)
-1
```
2024-04-17 06:09:52 +03:00
Alibek Omarov
1677835b45 engine: common: simplify bit buffer operations
Yields a small performance boost
2024-04-08 07:24:53 +03:00
Alibek Omarov
2f2780cb1b ref: null: fix crashes 2024-04-08 07:23:56 +03:00
Alibek Omarov
95b134b5a6 ci: fix cirrus CI configuration file 2024-04-06 06:58:15 +03:00
Alibek Omarov
f60e856f35 engine: server: replace useless call to SV_Serverinfo to a direct access 2024-04-06 06:58:15 +03:00
Alibek Omarov
2ec0d25d85 Documentation: add note about environment variables 2024-04-05 20:15:38 +03:00
Alibek Omarov
fcd0982524 engine: server: free 64-bit string pool last when unloading library 2024-04-05 19:45:24 +03:00
Alibek Omarov
6881ee742d engine: server: fix incorrect NULL check in pfnCvar_RegisterServerVariable 2024-04-05 18:45:15 +03:00
Alibek Omarov
f070bbef3c engine: server: make EDICT_NUM inlined 2024-04-04 20:42:25 +03:00
Alibek Omarov
dd8c66d90e engine: common: fix possible NULL dereference in LZSS_Compress 2024-04-04 20:42:25 +03:00
Alibek Omarov
f995d055b5 filesystem: fix possible NULL dereference 2024-04-04 20:42:25 +03:00
Alibek Omarov
fed65dd497 engine: imagelib: fix possible NULL dereference 2024-04-04 20:42:25 +03:00
Alibek Omarov
c896425ad9 engine: server: make changelevel commands compatible with GoldSrc 2024-04-04 00:21:28 +03:00
Alibek Omarov
4107bd4e0f engine: common: quickly assume that map is valid when generating maps.lst if mpfilter is set or game is multiplayer only 2024-04-03 06:13:43 +03:00
Alibek Omarov
156b2b2b10 engine: server: remove MAP_HAS_SPAWNPOINT checks 2024-04-03 05:52:42 +03:00
Alibek Omarov
13a063bf7d mainui: update 2024-04-02 04:05:49 +03:00
Alibek Omarov
ef786b7d79 engine: client: fix sprites transparency in Night at the Office 2024-04-02 02:18:49 +03:00
Alibek Omarov
5c0c1b1226 ref: gl: make g_posenum in alias renderer static 2024-03-30 03:52:50 +03:00
Alibek Omarov
d041b2aa27 engine: fix error_on_exit data type 2024-03-26 17:15:34 +03:00
Alibek Omarov
f6d489e038 engine: server: register str64stats command that prints string pool usage statistics 2024-03-26 17:15:15 +03:00
Alibek Omarov
d34fedea69 engine: server: cleanup unused variables 2024-03-25 05:50:04 +03:00
Alibek Omarov
80b3f90091 engine: server: more accurate SV_ParseEdict
* Add removing trailing spaces, like GoldSrc does
* Pass classname first to allow game to override it
* Remove FL_CUSTOMENTITY flag usage, GoldSrc doesn't set this flag for "custom"
  export entities
* Fix possible memory leak
2024-03-25 05:49:59 +03:00
SNMetamorph
2a4fafc3f9 engine: voice: added voice_transmit_scale cvar to configure outcoming voice audio volume 2024-03-23 23:37:03 +03:00
SNMetamorph
9b3ccf5f04 engine: voice: output_buffer renamed to compress_buffer 2024-03-23 23:37:03 +03:00
SNMetamorph
f59ac2360a engine: voice: made voice_scale to influence incoming voice audio volume 2024-03-23 23:37:03 +03:00
Alibek Omarov
ff21fb42e6 engine: client: create separate Opus decoders for each player
Turns out, we can't re-use same decoder for different streams.
2024-03-20 18:41:52 +03:00
Alibek Omarov
288cac69de public: add small utility library for unicode stuff 2024-03-19 21:34:18 +03:00
Alibek Omarov
2640b6d869 engine: host: remove misleading message about TAB-autocompletion in dedicated mode 2024-03-19 21:24:21 +03:00
Alibek Omarov
d8910b0e38 engine: platform: linux: do not search sd_notify if NOTIFY_SOCKET isn't set 2024-03-19 21:23:53 +03:00
Alibek Omarov
049bed555e engine: host: fit -help into 80 columns terminal 2024-03-19 21:13:28 +03:00
Alibek Omarov
fe5944720b engine: use common strings to name the engine, makes branding easier for custom forks 2024-03-19 21:11:10 +03:00
Alibek Omarov
665c46b281 filesystem: minor logging opened archives change 2024-03-19 20:42:10 +03:00
Alibek Omarov
975ab6785e engine: make log starting and ending messages shorter, so it fits into standard 80 columns term 2024-03-19 20:41:46 +03:00
Alibek Omarov
6fa4dbfba2 public: build: use XASH_BUILD_BRANCH define set by Waf. Expect XASH_BUILD_{BRANCH,COMMIT} to be always set. 2024-03-19 19:34:30 +03:00
SNMetamorph
0506a1dfce engine: sys_con: added VCS branch name printing to log file header 2024-03-19 19:31:54 +03:00
SNMetamorph
908a9930e6 public: added Q_buildbranch function, needed for better logging 2024-03-19 19:31:54 +03:00
SNMetamorph
7d7e72196b engine: host: enabled printing current developer level 2024-03-19 19:31:54 +03:00
SNMetamorph
7cc67157e5 engine: sys_con: fixed incorrect logging init messages order 2024-03-19 19:31:54 +03:00
SNMetamorph
b7ff9c7a24 engine: sys_con: added missing title for log messages 2024-03-19 19:31:54 +03:00
Alibek Omarov
aab1fa1ba2 wscript: move gitversion load to libpublic, define XASH_BUILD_BRANCH, use unknown-{commit,branch} if detecting git version was failed 2024-03-19 19:30:52 +03:00
Alibek Omarov
effeba2f44 waf: upgrade to waifu 1.2.0 2024-03-19 19:24:49 +03:00
Alibek Omarov
e039ef35c0 filesystem: don't check for SDL whether we can load Android assets, because filesystem doesn't know anything about SDL
Replace it with runtime check instead.
2024-03-11 23:25:10 +03:00
Alibek Omarov
599a1f026e engine: client: fix missing comma 2024-03-11 22:56:52 +03:00
Alibek Omarov
39cba17f01 filesystem: android: try to fix compiling-in AAsset mounting code 2024-03-11 21:49:33 +03:00
SNMetamorph
17e106f96d ref: gl: invalidate texture units state cache when texture deletes 2024-03-09 22:12:35 +03:00
Alibek Omarov
081cf9132b engine: client: read console_history.txt as binary, skip empty and repeating lines, reimplement it through FS_Gets for fun 2024-03-08 15:25:36 +03:00
Alibek Omarov
6a7e027248 engine: common: add joy_ prefix to automatically filterable cvars 2024-03-08 15:25:36 +03:00
Alibek Omarov
27100e7751 engine: client: hook sensitivity cvar registration and make it priveleged cvar 2024-03-08 15:25:36 +03:00
Alibek Omarov
75d9ed341a Create FUNDING.yml 2024-03-07 09:41:18 +03:00
Alibek Omarov
1a0867523d engine: system: parent messagebox to main window when dealing with Sys_Error 2024-03-05 17:12:51 +03:00
Alibek Omarov
7584bbe47e engine: client: fix sound mute when losing focus 2024-03-03 19:00:50 +03:00
Andrey Akhmichin
505b6cc264 utils: mdldec: boneweights fix. 2024-03-01 20:26:18 +03:00
Alibek Omarov
24f23908be engine: platform: stub Sys_DebuggerPresent on unsupported platforms 2024-02-27 05:17:01 +03:00
Alibek Omarov
43bd73f37b engine: platform: that's why commit --amend and/or rebase --interactive your fixes in your patches before proposing them 2024-02-27 04:59:54 +03:00
mittorn
bb2753cbfc engine/system: add asm-based raise implementation for arm and aarch64, making Sys_DebugBreak more relevant, use tgkill instead of kill 2024-02-27 04:54:55 +03:00
mittorn
5568eccc8a ref/r_sprite: move dframetype to inner block 2024-02-27 04:17:21 +03:00
mittorn
c3b2cc4423 waifulib/compiler_optimizations: disable no-semantic-interposition for gcc4 in release builds too 2024-02-27 04:16:14 +03:00
mittorn
d84130219f crashhandler: set host.crashed before messagebox to allow platform code handle crashed state in different way 2024-02-27 04:14:37 +03:00
mittorn
d97d4d6c42 filesystem: add XASH_ANDROID_ASSETS macro for aassets switch 2024-02-27 04:04:54 +03:00
mittorn
15798aaf52 ref/r_sprite: move dframetype to inner block 2024-02-27 04:04:54 +03:00
mittorn
e53892e827 ref_gl: fix loop scope in ripple code 2024-02-27 04:04:54 +03:00
mittorn
cb12af69ed gl2shim: add SOFTFP_LINK support for gles3compat 2024-02-27 04:04:54 +03:00
mittorn
e82050a4bc gl2shim: fix gcc 4.9 build 2024-02-27 04:04:54 +03:00
mittorn
e4edd2da45 platform/posix: check for non-zero dladdr ret 2024-02-27 04:04:54 +03:00
mittorn
4f80922358 waf/compiler_optimizations: remove no-semantic-interposition for gcc4 2024-02-27 04:04:54 +03:00
mittorn
ae7ed03376 ref_soft: fix crash when y < -height 2024-02-27 04:04:54 +03:00
mittorn
c082e46662 imagelib: fix for loop scope 2024-02-27 04:04:54 +03:00
mittorn
b0bbcab6b4 ref_soft,ref_gl: fix unaligned read in sprite code 2024-02-27 04:04:54 +03:00
SNMetamorph
0fc83080ec engine: server: allowed bandwidth test on listen servers 2024-02-26 19:41:32 +03:00
SNMetamorph
73883b504f engine: client: improved bandwidth test logic 2024-02-26 19:41:32 +03:00
SNMetamorph
8efc9d74e8 engine: server: fixed test packet buffer was not being created 2024-02-26 19:41:32 +03:00
mittorn
373321ff00 ref/gl: do not set type on 1D textures on GLES (will fallback to 2D) 2024-02-26 16:08:37 +03:00
Alibek Omarov
a508467aac engine: client: silently ignore if server didn't sent local player info in delta at spawn
The bug happens somewhere in server, not sure where or how. Remove Host_Error so mods
can be played again.
2024-02-26 11:48:46 +03:00
Alibek Omarov
abbe993e80 3rdparty: gl4es: update 2024-02-26 11:20:04 +03:00
Alibek Omarov
c644e4d569 3rdparty: nanogl: update, fix link error with missing glTexEnvfv 2024-02-26 11:06:09 +03:00
Alibek Omarov
c200e008f1 wscript: disable gl-wes-v2 renderer from Android builds 2024-02-26 10:55:42 +03:00
Alibek Omarov
e95a2da6d0 engine: platform: sdl: slightly rework previous patch to not call SDL each frame and check for NULL pointers 2024-02-23 20:55:32 +03:00
Alibek Omarov
8afca1a79c engine: server: allow starting game from custom map 2024-02-23 20:54:32 +03:00
Alibek Omarov
827c9ca857 filesystem: restore original Xash behavior with unreferenced keys in gameinfo.txt/liblist.gam 2024-02-23 20:54:32 +03:00
Alibek Omarov
2416635ba3 common: validate extended surfaces size 2024-02-23 20:54:32 +03:00
Alibek Omarov
39eec89580 engine: increase elights limit up to 128 2024-02-23 20:54:32 +03:00
Sheridan Kane Rathbun
98d88266a6 engine: platform: sdl: fix incorrect mouse cursor positioning on high-dpi displays (#1623)
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
2024-02-23 20:54:17 +03:00
mittorn
0f3359fc05 ref_gl: do not apply overbright color if lightscale correction used 2024-02-22 21:02:34 +03:00
mittorn
6c77608c34 ref_gl: implement color-modulate overbrigths with gl_vbo using texture GL_COMBINE 2024-02-22 21:02:34 +03:00
Alibek Omarov
abdff6eff6 mainui: update 2024-02-22 15:43:49 +03:00
Alibek Omarov
95a75465c9 common: remove FORCEINLINE and NOINLINE macros, we don't use them in engine 2024-02-22 15:43:37 +03:00
Alibek Omarov
119926805f mainui: update 2024-02-21 03:39:11 +03:00
Alibek Omarov
f749b5cb4b 3rdparty: nanogl: update 2024-02-21 02:57:18 +03:00
Alibek Omarov
c29ad6b598 scripts: waifulib: compiler_optimizations: add option to use profiling 2024-02-21 02:57:07 +03:00
Alibek Omarov
4c5dfb963e engine: zone: few more tunings for realloc 2024-02-21 00:59:02 +03:00
Alibek Omarov
e11f9e05d4 engine: server: add GetNativeObject to server's PhysicsAPI 2024-02-19 17:49:37 +03:00
Alibek Omarov
5c8b5b3511 Documentation: extensions: add doc about native-object 2024-02-19 17:49:37 +03:00
Alibek Omarov
2ea7162287 engine: gameui: add GetNativeObject to extended menu API 2024-02-19 17:49:37 +03:00
Alibek Omarov
e62ab51842 engine: platforms: android: platforms aren't expected to get NULL or zero sized native object names anymore 2024-02-19 17:49:37 +03:00
Bohdan Shulyar
f1bc9b87b1 platform: android: port to SDL 2024-02-19 17:47:40 +03:00
Alibek Omarov
a9bddaac64 engine: platform: win32: do not call filesystem functions if filesystem_stdio was failed to load 2024-02-19 06:27:24 +03:00
Alibek Omarov
6cef6f6a75 engine: zone: refactoring 2024-02-19 06:13:54 +03:00
Alibek Omarov
25ea6ed500 scripts: waifulib: don't use relative path while creating ZIP file (so cwd might not be equal to sources path) 2024-02-19 05:00:12 +03:00
Alibek Omarov
3d5173f257 engine: zone: implement Mem_Realloc through standard realloc 2024-02-19 04:22:16 +03:00
Alibek Omarov
05ff0d6020 engine: cmd: remove unused global variable 2024-02-17 22:17:22 +03:00
Alibek Omarov
3cea12627e engine: client: add cl_trace_stufftext from old engine 2024-02-17 22:16:39 +03:00
Alibek Omarov
b59b7c1a8d engine: server: better error message for missing spawn functions 2024-02-17 22:15:41 +03:00
Alibek Omarov
dd2c369df3 engine: imagelib: fix integer overflow on huge images when calculating reflectivity 2024-02-17 22:14:27 +03:00
Andrey Akhmichin
8b79e49a0f engine: server: execute maps/<mapname>_unload.cfg on server deactivation. 2024-02-16 17:57:26 +03:00
Andrey Akhmichin
4ea6eba8f2 engine: server: execute maps/<mapname>_load.cfg before entities precaching. 2024-02-16 17:57:26 +03:00
Andrey Akhmichin
f649076bc3 engine: server: execute map change config file before entities precaching. 2024-02-16 17:57:26 +03:00
Andrey Akhmichin
8ecffa4663 engine: server: define new "disconcfgfile" cvar. 2024-02-16 17:57:26 +03:00
Andrey Akhmichin
e90b83849a engine: server: execute map change config file in singleplayer. 2024-02-16 17:57:26 +03:00
Andrey Akhmichin
d517b9717a engine: server: define new "_sv_override_scientist_mdl" cvar for Uplink's scientist model. 2024-02-16 17:57:26 +03:00
Bohdan Shulyar
67df4861ce add back mittorn's exit zone 2024-02-16 12:52:03 +02:00
Alibek Omarov
2c0d6e06be engine: server: return NULL in SV_ClientBy{Id,Name} if client array isn't allocated 2024-02-15 13:56:47 +03:00
Alibek Omarov
dec71850a1 engine: console: allow changing background filtering 2024-02-13 15:34:33 +03:00
Alibek Omarov
b1860972c6 engine: font: fix inverted check, fix potential division by zero 2024-02-13 15:33:51 +03:00
Alibek Omarov
1f4c9b67da engine: server: don't init or send voice chat in singleplayer 2024-02-13 15:09:26 +03:00
Velaron
4ad3e52407 Fix build again 2024-02-10 00:53:46 +02:00
Alibek Omarov
c2da125358 engine: client: as an experiment, let users override default font rendermode through hud_fontrender and con_fontrender cvars 2024-02-09 07:25:47 +03:00
Alibek Omarov
31fa990d44 engine: gamma: fix gamma changes not caught if gamma cvar was set during frame 2024-02-09 06:29:30 +03:00
Alibek Omarov
d3e60c7d84 engine: gamma: higher brightness limit for compatibility 2024-02-09 06:28:31 +03:00
Velaron
b5b2e322c2 Fix build 2024-02-08 23:50:09 +02:00
Alibek Omarov
e2424b4303 engine: server: clean up userinfo and fullupdate throttle on client connect 2024-02-07 23:27:02 +03:00
Alibek Omarov
240563cd1b engine: client: set r_lighting_modulate to 0.6 and save it to config for old Xash mods that use it internally 2024-02-07 23:22:27 +03:00
Alibek Omarov
d708cd58fb mainui: update 2024-02-07 23:22:27 +03:00
Alibek Omarov
491b503f96 engine: common: optimize COM_LoadFile/COM_LoadFileForMe removing double allocation 2024-02-07 23:22:27 +03:00
Alibek Omarov
636a2228f6 filesystem: add new API function LoadFileMalloc that returns a pointer that can be freed using standard free() 2024-02-07 23:22:27 +03:00
Alibek Omarov
bb03e2597c filesystem: allow to pass custom allocation functions to LoadFile 2024-02-07 23:22:27 +03:00
Alibek Omarov
21c828ee40 engine: sounds: remove extra logging 2024-02-05 15:57:59 +03:00
Alibek Omarov
132c9de142 engine: host: add the most important command line flag help string 2024-02-05 15:28:18 +03:00
Alibek Omarov
9d9507d77f engine: change mobility API license to Unlicense, as with build.h
See GitHub issue: https://github.com/FWGS/hlsdk-portable/issues/259

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
2024-02-05 15:01:03 +03:00
Alibek Omarov
7daa6c3451 engine: server: use soundlist to acquire random sounds for physics 2024-02-05 12:49:31 +03:00
Alibek Omarov
c8e1ffe0dd engine: client: use soundlist to acquire random sounds for temp entities 2024-02-05 12:49:31 +03:00
Alibek Omarov
b5f02324a6 engine: add basic sounds.lst implementation 2024-02-05 12:49:27 +03:00
Alibek Omarov
47f5dfdcfd common: define macros for color codes for easier access 2024-02-05 12:49:27 +03:00
Alibek Omarov
33da68b013 engine: client: move reseting gamma changed flag to the end of the frame for custom renderers 2024-02-05 03:41:15 +03:00
Alibek Omarov
618ec83c9d engine: client: don't trigger CheckGamma if there is no screenshot action 2024-02-05 03:40:14 +03:00
Alibek Omarov
85de61ebc8 engine: client: fix userid not being written to player info on userinfo change 2024-02-05 02:58:46 +03:00
Alibek Omarov
2feaae59f7 engine: client: bring back r_lighting_modulate, as a compatibility cvar 2024-02-02 13:52:17 +03:00
Alibek Omarov
2550d7fbd3 public: tests: remove linuxunkabi remnants 2024-02-01 02:54:22 +03:00
Alibek Omarov
565f717804 ref: add ref_null renderer that does nothing
This was sitting in my git stash for months. Let's publish it now.
2024-02-01 02:45:19 +03:00
Alibek Omarov
b56c83a2f9 Documentation: add a note about musl 2024-01-31 23:59:28 +03:00
Alibek Omarov
bf17996f72 public: remove linuxunkabi 2024-01-31 23:59:28 +03:00
Alibek Omarov
a3acb1c85b engine: gamma: validate gamma cvars in local games too 2024-01-30 17:55:36 +03:00
Alibek Omarov
d4d63301e0 mainui: update 2024-01-30 17:50:31 +03:00
Alibek Omarov
e9af0c9810 ref: gl: wscript: remove all libs dependencies from gles3compat, added by mistake 2024-01-30 17:40:59 +03:00
Alibek Omarov
131ad9c790 3rdparty: update submodules 2024-01-30 17:28:12 +03:00
Alibek Omarov
bfcaba54dc wscript: move werror flags into uselib 2024-01-30 17:24:17 +03:00
Alibek Omarov
f67736180b engine: client: allow nearest filtering for loading and pause icons 2024-01-29 05:59:29 +03:00
Alibek Omarov
725b7ea7f9 common: render_api: rename TF_ALLOW_NEAREST_TOGGLE to just TF_ALLOW_NEAREST, it's just shorter 2024-01-29 05:59:06 +03:00
Alibek Omarov
600d574376 ref: gl: make use of new TF_ALLOW_NEAREST_TOGGLE flag 2024-01-29 05:50:59 +03:00
Alibek Omarov
04f42df7d5 common: render_api: new flag TF_ALLOW_NEAREST_TOGGLE that allows toggling nearest filtering for TF_NOMIPMAP textures 2024-01-29 05:48:42 +03:00
Alibek Omarov
ab15662d78 ref: gl: fix toggling nearest filter on TF_NOMIPMAP textures 2024-01-29 05:48:08 +03:00
Alibek Omarov
072b0cef27 ref: gl: small refactoring on filter choosing for newly uploaded texture 2024-01-29 05:47:10 +03:00
Alibek Omarov
e274c62cfc ref: gl: use TextureFilteringEnabled to decide whether texture will have nearest filtering or linear 2024-01-29 05:44:14 +03:00
Alibek Omarov
a28d45fdb2 engine: console: fix TF_NEAREST missing from quake fixed font 2024-01-29 05:42:22 +03:00
Alibek Omarov
6ca5f7c6fb engine: client: request if font texture has nearest filtering from the renderer 2024-01-29 05:41:16 +03:00
Alibek Omarov
af316bff14 engine: client: add hud_scale_minimal_width to limit scaling factor and potentially avoid unsupported hud sprites resolutions 2024-01-29 04:58:07 +03:00
Alibek Omarov
c8945caefc engine: net_buffer: remove unused MSG_SeekToByte 2024-01-28 20:01:29 +03:00
Alibek Omarov
8c61a2f021 engine: server: cleanup server.h header from unused functions prototypes 2024-01-28 11:35:53 +03:00
Alibek Omarov
0b24810927 engine: client: clean up client.h from unused function prototypes, or move them to appropriate C file 2024-01-28 11:17:06 +03:00
Alibek Omarov
b3d8fb03bf engine: client: add generic handler for simple types of screenshots commands 2024-01-28 10:43:37 +03:00
Alibek Omarov
02c5890c2f ref: soft: cleanup after RefAPI changes, remove unused functions 2024-01-28 10:00:51 +03:00
Alibek Omarov
0579e40857 engine: server: remove unused DumpHashString function 2024-01-28 10:00:51 +03:00
Alibek Omarov
c77f290bc6 engine: remove Netsplit_SendLong, as we're not planning to support old protocol on server side 2024-01-28 10:00:51 +03:00
Alibek Omarov
7bf9407177 ref: gl: remove R_TextureRandomTiling, it's handled by R_TextureAnimation (random tiling as a feature still broken) 2024-01-28 10:00:51 +03:00
Alibek Omarov
b41fe076ae engine: server: exclude expired IP filters from check 2024-01-28 10:00:51 +03:00
Alibek Omarov
a7c422fde6 engine: platform: make Platform_SetTimer static inline to not fix unused-function 2024-01-28 10:00:51 +03:00
Alibek Omarov
568a394a40 wscript: enable -Wunused-functions 2024-01-28 10:00:51 +03:00
Alibek Omarov
2b6a550405 engine: clean up common.h header from unused function prototypes, or move them to appropriate header or C file 2024-01-28 10:00:17 +03:00
Alibek Omarov
7200f0da7e 3rdparty: gl-wes-v2: update 2024-01-28 09:55:18 +03:00
Alibek Omarov
d3c3c26618 ref: gl: vgl_shim: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
7152393089 ref: soft: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
661e60720d ref: gl: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
bf959da7ff engine: libmpg: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
75d476f9df engine: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
b077822f4d filesystem: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
6d3f188675 public: fix -Wmissing-prototypes 2024-01-28 09:55:18 +03:00
Alibek Omarov
0231f5e8ac wscript: warn about missing-prototypes by default for C 2024-01-28 09:55:18 +03:00
Alibek Omarov
901b35d4b1 ref: soft: rework @SNMetamorph's fix for avoiding crash when no world is set (like Customize menu with enabled 3D view) 2024-01-27 17:31:34 +03:00
Alibek Omarov
eaafd0ff13 ref: gl: rework @SNMetamorph's fix for avoiding crash when no world is set (like Customize menu with enabled 3D view) 2024-01-27 17:31:26 +03:00
Alibek Omarov
963d9b8f2a ref: soft: remove useless R_CountDynamicLights function 2024-01-27 17:16:01 +03:00
Alibek Omarov
5696c9c96a ref: gl: remove useless R_CountDynamicLights function 2024-01-27 17:15:57 +03:00
Alibek Omarov
862b9e68be engine: server: fix possible null pointer dereference 2024-01-25 16:21:55 +03:00
Alibek Omarov
2f2890cd11 engine: client: use PARM_TEX_FILTERING to figure out whether we should apply half-texel trick to HUD textures when scaling 2024-01-25 05:50:11 +03:00
Alibek Omarov
482aa840e7 ref: soft: add PARM_TEX_FILTERING handler (stub) 2024-01-25 05:47:12 +03:00
Alibek Omarov
4599983c8e ref: gl: add PARM_TEX_FILTERING handler 2024-01-25 05:46:54 +03:00
Alibek Omarov
11172838f2 engine: ref_api: add PARM_TEX_FILTERING into RefAPI to query if filtering is enabled for selected texture 2024-01-25 05:43:51 +03:00
Alibek Omarov
47bc50b8c6 engine: client: fix taking console color from colors.lst 2024-01-25 04:22:20 +03:00
Alibek Omarov
7c82766a5c readme: add sourcehut builds badge [skip ci] 2024-01-24 21:10:21 +03:00
Alibek Omarov
5d6cf62405 engine: client: voice: open microphone only after server sends svc_voiceinit to us and shutdown immediately after disconnect 2024-01-24 20:52:21 +03:00
Alibek Omarov
edc08e39ef common: move FORCEINLINE from port.h to xash3d_types.h, alongside other compiler-specific attributes 2024-01-24 20:51:34 +03:00
Alibek Omarov
a9846e765d waf: upgrade to latest waifu 2024-01-23 21:34:49 +03:00
Alibek Omarov
aa54309d5c engine: wscript: fix pthreads check by explicitly checking it in C mode 2024-01-23 21:23:23 +03:00
Alibek Omarov
443317bedf wscript: fix RPATH under OpenBSD 2024-01-23 21:03:10 +03:00
Alibek Omarov
ffd320507f ci: enable builds.sr.ht 2024-01-23 20:42:09 +03:00
Alibek Omarov
60df08c11c engine: crashhandler: fix build for NetBSD AMD64 2024-01-23 20:25:17 +03:00
Alibek Omarov
7d464df107 engine: platform: linux: define portability macro for sigevent (oh, glibc...) 2024-01-23 19:22:56 +03:00
Alibek Omarov
296f89acf9 engine: platform: linux: fix build with musl (and probably other libcs) using portability macro 2024-01-23 18:57:33 +03:00
mittorn
5f31417bae ref_gl: fix missing vboarray split transition on some maps 2024-01-19 21:28:49 +03:00
Alibek Omarov
150d98bd15 ref: gl: fix stuck single lightmap texture object when using VBO after updating lightmap 2024-01-19 09:57:11 +03:00
Alibek Omarov
f162fbd806 ref: gl: fix fog with enabled overbrights and no vbo 2024-01-19 06:19:42 +03:00
Alibek Omarov
7d8ea61ac2 ref: gl: move glBegin/glEnd outside of the loop in CL_DrawTracers 2024-01-17 02:46:38 +03:00
Alibek Omarov
40041e30eb engine: console: add cvar con_oldfont to toggle usage between fonts.wad fonts or gfx.wad legacy font 2024-01-15 18:11:08 +03:00
Alibek Omarov
a247e139bf engine: fix dedicated build 2024-01-15 02:08:30 +03:00
Alibek Omarov
00b2ca7f5a ref: gl: remove duplicates from gl_export.h 2024-01-15 02:08:30 +03:00
Alibek Omarov
e58007aab3 wscript: disable /showIncludes based msvcdeps for now, it causes issues with non-English locales 2024-01-14 13:36:49 +03:00
Alibek Omarov
dca862a838 engine: host: execute valid rc script if game was started from -game parameter using default launcher 2024-01-14 10:58:27 +03:00
Alibek Omarov
7e71e20714 engine: client: add cvar scr_drawversion to hide engine version in screenshots (sorry, Uncle Mike!) 2024-01-14 10:58:04 +03:00
Alibek Omarov
cee6862924 engine: client: try to prepend media/ if audio stream couldn't be opened 2024-01-14 10:58:04 +03:00
Alibek Omarov
a8cc68f6b9 ref: gl: fix ripple water is being blurry with gl_texture_nearest after startup 2024-01-14 10:56:58 +03:00
Alibek Omarov
2af0adb629 mainui: update 2024-01-13 05:51:39 +03:00
Alibek Omarov
628ac376ed engine: client: s_dsp: refactoring from hldsp 2024-01-13 05:29:43 +03:00
Alibek Omarov
251e6ac1dc engine: client: s_dsp: use Cvar_DirectSet 2024-01-13 05:29:12 +03:00
Alibek Omarov
9b6518376c engine: cvar: add Cvar_DirectSetValue function 2024-01-13 05:18:30 +03:00
Alibek Omarov
6c3fee7f27 engine: cvar: move common checks if cvar can be updated into generic function 2024-01-13 05:18:09 +03:00
Alibek Omarov
c111a59639 github: set 32-bit windows builds to vs2019, upgrade SDL2 2024-01-13 05:05:54 +03:00
Alibek Omarov
ba9bb70924 common: remove unused gamma definitions 2024-01-13 05:03:58 +03:00
Alibek Omarov
6acc97b0ef engine: client: restore my copyright on my DSP implementation from old engine branch 2024-01-13 00:56:03 +03:00
Alibek Omarov
cd681d4303 engine: replace anorms.h with compatible header from GPL WinQuake sources 2024-01-12 23:13:22 +03:00
Alibek Omarov
46f30e215c common: replace netadr.h with compatible definition from GPL Quake-2 sources 2024-01-12 23:09:38 +03:00
Alibek Omarov
2ae038c01c common: fix broken STATIC_ASSERT macro again 2024-01-12 23:00:56 +03:00
Alibek Omarov
aaa9fbd50f common: replace kbutton.h with compatible defintion from GPL WinQuake sources 2024-01-12 17:20:30 +03:00
Alibek Omarov
51d4716bcb engine: client: rewrite trimming silence at the beginning and ending of the VOX word from scratch 2024-01-12 03:27:05 +03:00
Alibek Omarov
045caacfee engine: client: drop skipping random 0.1 second of an ambient sound 2024-01-12 03:27:05 +03:00
Andrey Akhmichin
95a5c670a2 utils: mdldec: res: activities.txt: remove completely useless ACT_VM_* activities. 2024-01-10 14:38:01 +03:00
Andrey Akhmichin
30259e1573 Documentation: opensource-mods.md: update. 2024-01-10 14:37:52 +03:00
Bohdan Shulyar
8b884132b7 ci: fix missing libs on nswitch 2024-01-10 14:37:43 +03:00
Alibek Omarov
266f9a6bc6 engine: client: add support for parsing IPv6 server list 2024-01-09 16:59:06 +03:00
Alibek Omarov
58177d9251 mainui: update 2024-01-09 04:58:11 +03:00
Alibek Omarov
69e801d6b8 engine: fix bug where user stucks after loading map/save while being connected to remote server 2024-01-09 04:16:52 +03:00
Alibek Omarov
388cc3061f mainui: update 2024-01-09 03:55:28 +03:00
Alibek Omarov
c9d29b3955 ref: gl: fix overbrights with VBO 2024-01-09 03:55:07 +03:00
Alibek Omarov
371025dc8e engine: dedicated: add TextureToGamma stub for imagelib 2024-01-09 03:55:07 +03:00
Alibek Omarov
cf7a79bff3 ref: gl: particles aren't supposed to care about gamma 2024-01-09 03:55:07 +03:00
Alibek Omarov
55dfa1bf44 ref: soft: reorder applying light gamma 2024-01-09 03:55:07 +03:00
Alibek Omarov
519c8a032a ref: soft: adapt studio renderer to new gamma implementation 2024-01-09 03:55:07 +03:00
Alibek Omarov
c15822f375 ref: soft: don't depend on light gamma in recursive light point 2024-01-09 03:55:07 +03:00
Alibek Omarov
0e91deec19 ref: soft: remove unused scale (remnants of r_lightmap_modulate), use integer values for non-interpolated lightstyles 2024-01-09 03:55:07 +03:00
Alibek Omarov
87b204c661 ref: gl: remove unused scale (remnants of r_lightmap_modulate), use integer values for non-interpolated lightstyles 2024-01-09 03:55:07 +03:00
Alibek Omarov
caefa0b7b9 engine: remove cvar r_lighting_modulate, it's some unindentifiable legacy 2024-01-09 03:55:07 +03:00
Alibek Omarov
a311923d4e engine: imagelib: apply texgamma to palette (ideally should be applied only to BSP/WAD textures) 2024-01-09 03:55:07 +03:00
Alibek Omarov
ee4cb39f3e ref: gl: adapt alias renderer to new gamma implementation (untested) 2024-01-09 03:55:07 +03:00
Alibek Omarov
18436a70eb ref: gl: support overbrights, change the gamma applying order closer to the original renderer 2024-01-09 03:55:00 +03:00
Alibek Omarov
8298053e6a ref: gl: don't depend on lightgamma in recursive light point 2024-01-09 03:33:39 +03:00
Alibek Omarov
9304a0041d ref: gl: support kRenderFxLightMultiplier
* add undocumented kRenderFxLightMultiplier to const.h
2024-01-09 03:33:39 +03:00
Alibek Omarov
64f92003fa ref: gl: adapt studio lightning to new gamma
* more accurate SHADE_LAMBERT value (extracted from v_lambert1 global variable)
2024-01-09 03:33:39 +03:00
Alibek Omarov
be0a241244 engine: client: add tests for new gamma implementation 2024-01-09 03:33:39 +03:00
Alibek Omarov
df6546d5b1 engine: client: add new gamma implementation
* immediately expose it in RefAPI. Bump RefAPI to version 7.
* remove VID_StartupGamma, it's not used anymore
* remove stub lightgamma and direct cvars
* add a temporary check for v_direct and v_lightgamma default values
2024-01-09 03:33:24 +03:00
Alibek Omarov
a0c31120d9 ref: add R_GammaChanged function that engine calls on every gamma change 2024-01-07 03:35:23 +03:00
Alibek Omarov
c0757bd84c ref: gl: remove vid_gamma/vid_brightness changed cvar value check 2024-01-07 03:35:23 +03:00
Alibek Omarov
9fa32a9cf4 ref: soft: remove vid_gamma/vid_brightness changed cvar value check 2024-01-07 03:35:23 +03:00
Ruslan Piasetskyi
15bc09b06b engine: platform: linux: Add gettid definition for old systems
The gettid() library support was added in glibc 2.30. Earlier glibc
versions did not provide a wrapper for this system call, necessitating
the use of syscall(2).

Also, put _GNU_SOURCE definition in the guard to avoid the warning:
  ../engine/platform/linux/sys_linux.c:16: warning: "_GNU_SOURCE" redefined
   #define _GNU_SOURCE

  <command-line>: note: this is the location of the previous definition
2024-01-06 13:43:35 +03:00
Alibek Omarov
315aea1991 filesystem: support mods liblist.gam/gameinfo.txt with relative paths to game libs 2024-01-05 04:34:33 +03:00
Alibek Omarov
380422a6dc engine: client: refactor CL_AddEntityEffects, bring everything to GoldSrc behavior
Some effects are meant only for playeres, others only for normal entities
2024-01-05 04:10:45 +03:00
Alibek Omarov
be26ecf1c9 engine: client: don't spawn model effects for players, like GoldSrc 2024-01-05 04:09:20 +03:00
Alibek Omarov
d2bbe9dfd2 engine: client: don't spawn multiple model effects 2024-01-05 04:08:52 +03:00
Alibek Omarov
9c929c1405 engine: client: don't spawn particles if time is stopped 2024-01-05 02:59:47 +03:00
Alibek Omarov
9551240680 engine: host: fix -Werror=parentheses 2024-01-05 02:35:16 +03:00
Alibek Omarov
6605d0456c engine: host: force ENGINE_STEP_POSHISTORY_LERP for Counter-Strike and Condition Zero 2024-01-05 02:27:37 +03:00
Alibek Omarov
99e8f7b486 engine: host: fix warning about incompatible features bits 2024-01-05 02:26:25 +03:00
Alibek Omarov
5ac8f63741 ref: soft: replace skin texture num bound by a proper check, fixes wrong skin on flags in Adrenaline Gamer 2024-01-05 02:25:18 +03:00
Alibek Omarov
9d3949a948 ref: gl: replace skin texture num bound by a proper check, fixes wrong skin on flags in Adrenaline Gamer 2024-01-05 02:25:10 +03:00
Alibek Omarov
5bd1dd34b3 ci: disable freebsd-12 task 2024-01-04 22:15:08 +03:00
Alibek Omarov
6862b14e59 ref: soft: only draw MOVETYPE_FOLLOW studio model if it's parent is visible 2024-01-04 22:02:14 +03:00
Alibek Omarov
dc1d65f621 ref: gl: only draw MOVETYPE_FOLLOW studio model if it's parent is visible 2024-01-04 22:02:09 +03:00
Alibek Omarov
fba3a2b67f ref: soft: return NULL in GetEntityByIndex and ModelHandle 2024-01-04 21:47:03 +03:00
Alibek Omarov
b946c8455d ref: gl: return NULL in GetEntityByIndex and ModelHandle just in case 2024-01-04 21:46:44 +03:00
Alibek Omarov
c56e876043 engine: client: don't reset runfuncs for demoplayback 2024-01-04 06:11:15 +03:00
Alibek Omarov
9773d11464 engine: client: disable MOVETYPE_TOSS interpolation in old protocol, but keep animtime hack for them 2024-01-04 05:53:04 +03:00
Alibek Omarov
3c28b11754 engine: client: cl_demo: fix usercmd in demo playback
I have no explanation why this works but it kinda does?
2024-01-04 05:48:45 +03:00
Alibek Omarov
f2584dcb9d engine: host: better engine features print 2024-01-04 05:31:01 +03:00
Alibek Omarov
ce73838f1b engine: add a function that validates requested features bits 2024-01-04 05:30:18 +03:00
Alibek Omarov
49f972a7c9 engine: add new engine feature ENGINE_STEP_POSHISTORY_LERP that enables CStrike's MOVETYPE_STEP lerp based on position history 2024-01-04 05:05:03 +03:00
Alibek Omarov
1ae01d89de engine: client: correctly support ENGINE_COMPUTE_STUDIO_LERP feature flag without STUDIO_INTERPOLATION_FIX enabled 2024-01-04 03:35:16 +03:00
Alibek Omarov
8e54e18c8f engine: client: disable STUDIO_INTERPOLATION_FIX 2024-01-04 03:32:59 +03:00
Alibek Omarov
18136e5320 engine: client: implement HL25's cl_fixmodelinterpolationartifacts cvar 2024-01-04 03:32:36 +03:00
Alibek Omarov
a29f1899d3 engine: client: remove unused extrapolate variable in CL_PureOrigin 2024-01-03 19:06:46 +03:00
Alibek Omarov
0f804ffc30 engine: client: use extra precision for interpolation 2024-01-03 19:02:09 +03:00
Alibek Omarov
620a4b4894 engine: client: wrong check order, fix previous commit 2023-12-31 06:35:38 +03:00
Alibek Omarov
4cf87c2c23 engine: client: prevent memory corruption on old protocol when server didn't sent local player info in delta at spawn 2023-12-31 06:24:53 +03:00
Alibek Omarov
f031c31b77 engine: client: try another workaround for backwards animtime 2023-12-31 06:12:00 +03:00
Alibek Omarov
c2447d8634 engine: client: stupid hack to allow monsters interpolation on a very specific old protocol engine mod 2023-12-31 05:03:10 +03:00
Alibek Omarov
ae9c1d9f18 engine: remove single-binary option. Now platforms that don't need external launcher, shall set env.DISABLE_LAUNCHER 2023-12-30 23:45:17 +03:00
Alibek Omarov
0132eb6e44 ref: gl: restore usage of FWORLD_CUSTOM_SKYBOX flag, do direct checks instead of PARM check, remove unused tr.fCustomSkybox 2023-12-30 16:55:31 +03:00
Alibek Omarov
f12df54226 ref: soft: remove unused tr.fCustomSkybox 2023-12-30 16:54:56 +03:00
Alibek Omarov
d971055927 engine: move PARM_SKY_SPHERE handling out of engine to renderer, after all renderers might or might not support sky spheres 2023-12-30 16:54:37 +03:00
Alibek Omarov
6059538d77 ref: gl: use direct host.features instead of PARM_FEATURES 2023-12-30 16:41:51 +03:00
Alibek Omarov
17deba0606 ref: gl: use direct cl.paused instead of PARM_GAMEPAUSED 2023-12-30 16:41:39 +03:00
Alibek Omarov
82a2d272ad ref: gl: use direct host.features instead of PARM_FEATURES 2023-12-30 16:41:22 +03:00
Alibek Omarov
707a9228e1 engine: ref_api: draft RefAPI 6.
Remove timings from ref_globals_t struct

Remove R_UpdateRefState accordingly.

Remove unused PARMs

Remove reduntant functions
2023-12-30 16:36:13 +03:00
Alibek Omarov
59ddfb787f ref: soft: remove GetPredictedOrigin() call 2023-12-30 16:36:13 +03:00
Alibek Omarov
acdf1da995 ref: soft: remove GetMoveVars() call 2023-12-30 16:36:13 +03:00
Alibek Omarov
f1cdab91eb ref: soft: remove usage of PARM_VIEWENT_INDEX and PARM_PLAYER_INDEX 2023-12-30 16:36:13 +03:00
Alibek Omarov
05d5abe4db ref: soft: remove usage of PARM_MAX_CLIENTS 2023-12-30 16:36:13 +03:00
Alibek Omarov
44e017a410 ref: soft: convert to usage of ref_host_t to get real engine time 2023-12-30 16:36:13 +03:00
Alibek Omarov
64f3884f23 ref: soft: convert to usage of ref_client_t to get client time 2023-12-30 16:36:13 +03:00
Alibek Omarov
6386782674 ref: soft: acquire engine pointers 2023-12-30 16:36:13 +03:00
Alibek Omarov
8084687e50 ref: gl: remove GetPredictedOrigin call 2023-12-30 16:36:13 +03:00
Alibek Omarov
6c16de55c0 ref: gl: remove GetMoveVars() call 2023-12-30 16:36:13 +03:00
Alibek Omarov
537237ef62 ref: gl: remove usage of PARM_VIEWENT_INDEX and PARM_PLAYER_INDEX 2023-12-30 16:36:13 +03:00
Alibek Omarov
4dfc3f34cb ref: gl: remove usage of PARM_MAX_CLIENTS 2023-12-30 16:36:13 +03:00
Alibek Omarov
d22bbb4213 ref: gl: remove usage of PARM_WORLD_VERSION 2023-12-30 16:36:13 +03:00
Alibek Omarov
0e3b14e9a5 ref: gl: remove usage of PARM_NUMMODELS 2023-12-30 16:36:13 +03:00
Alibek Omarov
afb0540aa3 ref: gl: convert to usage of ref_host_t to get real engine time 2023-12-30 16:36:13 +03:00
Alibek Omarov
4d802d8901 ref: gl: convert to usage of ref_client_t to get client time 2023-12-30 16:36:13 +03:00
Alibek Omarov
6a4bf4965f ref: gl: acquire engine pointers 2023-12-30 16:36:13 +03:00
Alibek Omarov
a3c9538d12 engine: client: add support for new PARMs
Reorganize internal engine structs, carefully check structs compatibility before casting types
2023-12-30 16:36:13 +03:00
Alibek Omarov
632264809f engine: ref_api: add PARMs to get pointers to engine data like cl, host, world, etc. Partially expose cl and host. 2023-12-30 16:36:13 +03:00
Alibek Omarov
bcfabbe802 engine: do not save configs when we closing because of the errors 2023-12-28 22:42:12 +03:00
Alibek Omarov
c244cfc937 engine: do not save configs when we closing because of the errors 2023-12-28 22:40:10 +03:00
Andrey Akhmichin
520fc33394 utils: mdldec: fix wrong conditions. 2023-12-28 20:36:39 +03:00
Alibek Omarov
f705a7cd26 common: xash3d_types: another attempt to properly check static asserts availability 2023-12-28 17:32:07 +03:00
Alibek Omarov
65bfff69d0 engine: wscript: always require librt on Linux since we need it for Platform_SetTimer implementation 2023-12-27 04:14:19 +03:00
Alibek Omarov
9d8ba03f5e common: xash3d_types: fix static_assert macro 2023-12-27 03:10:41 +03:00
Alibek Omarov
778b8ede58 engine: platform: linux: add forgotten _GNU_SOURCE at the top of the file to enable gettid extension 2023-12-27 03:10:20 +03:00
Alibek Omarov
f8a1a2ed71 engine: platform: linux: add missing math.h include 2023-12-26 18:56:30 +03:00
mittorn
b4a7c266b5 platform/linux: implement debug timers and cl_maxframetime to catch very long frames on debugger 2023-12-25 14:22:20 +03:00
mittorn
a488f79852 ref_gl: workaround freezes on adreno with vbo on dlighted decals 2023-12-25 14:21:21 +03:00
Alibek Omarov
b290046503 ref: gl: remove hidden parm -gl-allow-vbo-dontuse needed to activate VBO renderer 2023-12-19 17:55:10 +03:00
Dmitry Toroshchin
e8409cee8b ref_gl: vbo: do not do zero-length drawcalls (fix glError on vivante) 2023-12-19 17:55:10 +03:00
mittorn
1d4d355b38 ref_gl: vbo: fix binding garbade texture after changelevel, fix wpoly counter 2023-12-19 17:55:10 +03:00
mittorn
dfe12535a5 ref_gl: vbo: disable R_TextureRandomTiling implementation until will be fixed 2023-12-19 17:55:10 +03:00
mittorn
74946100f1 ref_gl: fix not restoring static lightmap after decals 2023-12-19 17:55:10 +03:00
mittorn
9a1717915c ref_gl: vbo: apply a1batross's patch for uint index switch 2023-12-19 17:55:10 +03:00
mittorn
3691eb6e48 ref_gl: vbo: fix incorrect lightmap index, optimize loading maps with very big lightmap count, fix clouds drawing after VBO 2023-12-19 17:55:10 +03:00
mittorn
3bb7471fd3 ref_gl: vbo: fix lightmap0 processing, remove ilightmap 2023-12-19 17:55:10 +03:00
mittorn
74e09ddb12 ref_gl: change state management in vbo renderer 2023-12-19 17:55:10 +03:00
mittorn
6b73d056b2 ref_gl: vbo dlights refactiring 2023-12-19 17:55:10 +03:00
mittorn
3e7847551a ref_gl: add ability to skip uploading unused data (disabled) 2023-12-19 17:55:10 +03:00
mittorn
91d92935fa ref_gl: try avoid gpu locking on dlights in vbo renderer 2023-12-19 17:55:10 +03:00
mittorn
eff033298a ref_gl: disable singlepass detail renderer, use correct fog color multipliers in VBO 2023-12-19 17:55:10 +03:00
mittorn
3a8f4961bc ref_gl: fix rarely broken texturechain on some big maps 2023-12-19 17:55:10 +03:00
mittorn
b81f94518a ref_gl: fix out-by-one when all lightstyles are used. Also fix broken in this case in vbo after previous fix 2023-12-19 17:55:10 +03:00
Alibek Omarov
96f7f5457d engine: print all supported and enabled features 2023-12-17 17:51:15 +03:00
Alibek Omarov
498ec6b4f1 engine: client: print enabled features after server connect if it's not a local game 2023-12-17 17:44:05 +03:00
Alibek Omarov
607e62a1ae engine: client: sanitize legacy protocol supported engine features flags
Do not enable what can't be enabled in current protocol.
2023-12-17 17:44:05 +03:00
Alibek Omarov
d41a80bc2c engine: add mask to sanitize possible engine features bits 2023-12-17 17:43:51 +03:00
Alibek Omarov
643bec4071 engine: client: set max FPS when recording with fps_max 0 2023-12-16 22:02:26 +03:00
Alibek Omarov
a7e84230c3 ref: gl: use world version to enable large lightmaps for BSP2 automatically 2023-12-15 07:38:25 +03:00
Alibek Omarov
c96cf7e22d engine: expose world version through RefAPI 2023-12-15 07:38:07 +03:00
Alibek Omarov
46c61660cf engine: expose world BSP version through world global structure 2023-12-15 07:37:40 +03:00
Alibek Omarov
f6fecce52b wscript: do not recurse into ref_soft when BSP2 is enabled 2023-12-15 07:29:38 +03:00
Alibek Omarov
54a5947a3c engine: remove MSGBOX macro 2023-12-15 06:40:04 +03:00
Andrey Akhmichin
521bc675a2 utils: mdldec: smd.c: simplify proper bone rotation code. 2023-12-14 14:55:40 +03:00
Andrey Akhmichin
845cee2578 utils: mdldec: smd.c: prevent division by zero. 2023-12-14 14:54:49 +03:00
Alibek Omarov
93ceb0e4ed engine: client: split the sprites indices only when loading new sprite. Scan the whole array when searching.
Fixes incorrect sprite loading in XDM
2023-12-14 03:12:47 +03:00
Alibek Omarov
13aab4e59c engine: server: fix off-by-one error in Voice_Set/GetClientListening 2023-12-13 14:56:55 +03:00
Alibek Omarov
36c2f9e9f2 engine: refactor rcon redirect, don't make it depend on global object 2023-12-13 14:56:27 +03:00
Alibek Omarov
514da0ffa9 engine: host: do not depend on Sys_Sleep accuracy, instead allocate a timewindow that decrases with each skipped frame 2023-12-11 07:12:44 +03:00
Alibek Omarov
37b8d5da79 mainui: update 2023-12-11 07:12:30 +03:00
Alibek Omarov
b5d602d953 wscript: enable -Werror=alloc-size and -Walloc-zero 2023-12-11 07:11:40 +03:00
Alibek Omarov
c926fee13c filesystem: report an error when opening file was unsuccessful, with the exception for non-existent files 2023-12-11 07:10:51 +03:00
Alibek Omarov
a675806c91 engine: imagelib: img_ktx2: don't allow to load images with no mip levels 2023-12-11 07:06:12 +03:00
Alibek Omarov
683c4874f8 common: add ALLOC_CHECK macro that enables attribute alloc_size on GCC that allows to prevent suspicious allocation sizes 2023-12-09 19:00:25 +03:00
Alibek Omarov
20ced857b4 engine: client: use physents array when tracing physents =/ 2023-12-09 16:45:35 +03:00
Alibek Omarov
c6c86f9665 public: make hash case-insensitive again 2023-12-07 06:46:49 +03:00
Alibek Omarov
1e0107944f engine: make sys_timescale non-cheat, like host_framerate 2023-12-07 00:50:56 +03:00
Alibek Omarov
21797f9ac8 ref: gl: fix solor to color 2023-12-06 05:22:02 +03:00
mittorn
c800b34cd4 ref_api: add R_Flush method 2023-12-06 04:13:27 +03:00
Alibek Omarov
1612e2d669 engine: client: GetRefAPI now must return REF_API_VERSION to prevent possible issue when ref library wasn't recompiled on version bump 2023-12-06 04:13:27 +03:00
Alibek Omarov
26d229c8ca engine, ref: RefAPI 5. Simplify remap calls 2023-12-06 04:13:03 +03:00
Alibek Omarov
9c66e86be1 engine, ref: RefAPI 5. Remove unused calls 2023-12-06 04:13:03 +03:00
Alibek Omarov
7e9f87de2d engine, ref: eliminate calls to global arrays, instead store array pointers at renderer side 2023-12-06 04:13:03 +03:00
Alibek Omarov
67737446ac mainui: update 2023-12-06 04:12:33 +03:00
Andrey Akhmichin
dabed4f9eb utils: mdldec: add separate directories creation for sequences and textures. 2023-12-05 11:18:47 +03:00
Andrey Akhmichin
f9b6389248 utils: mdldec: create full destination path into "Kratisto's mdldec" maner. 2023-12-05 11:18:47 +03:00
Alibek Omarov
9ec1e259b4 engine: platform: sdl: unused variable cleanup 2023-12-05 10:48:47 +03:00
Alibek Omarov
0c2d480d89 engine: client: unused variables cleanup 2023-12-05 10:47:55 +03:00
Alibek Omarov
350d8ccb7b engine: common: cvar: unused variables cleanup 2023-12-05 10:46:26 +03:00
Alibek Omarov
0c512d0431 engine: server: unused variables cleanup 2023-12-05 10:46:03 +03:00
Alibek Omarov
3bf55c9ea4 filesystem: zip: hide CRC checks under common macro 2023-12-04 03:01:11 +03:00
Alibek Omarov
9994c57796 filesystem: fix updating gameinfo.txt from rodir 2023-12-04 03:00:51 +03:00
Alibek Omarov
3f724b6b17 filesystem: remove some really unused variables 2023-12-04 03:00:29 +03:00
Alibek Omarov
255773b4de ref: gl: remove useless calls to glGetString if we're running under GL4ES 2023-12-04 02:53:51 +03:00
Alibek Omarov
5b73a788da ref: gl: disable unused variable warning for GL functions defintions 2023-12-04 02:53:27 +03:00
Alibek Omarov
748b06a00e wscript: warn about unused variables 2023-12-04 02:53:07 +03:00
Alibek Omarov
273bccdc9a engine: nswitch: fix compiling by removing stdc++ from SDL2 dependencies as we link it later (#1519) 2023-12-02 20:25:51 +03:00
Alibek Omarov
f0a2362da3 engine: wscript: another try, link nswitch port using gcc and not g++ 2023-12-02 19:29:30 +03:00
Alibek Omarov
be8ade23e8 engine: wscript: add -nostdlib++ for nswitch so we avoid implicit linking to standard C++ library (we link it explicitly ourselves) 2023-12-02 19:21:44 +03:00
Alibek Omarov
6814908d80 scripts: gha: enable verbose build for nswitch port 2023-12-02 19:08:34 +03:00
Alibek Omarov
08dbfc45d3 ref: gl: refactor getting edge position, texture and lightmap coords 2023-12-02 18:02:18 +03:00
Alibek Omarov
89f9b3df68 public: make simple bbox functions inline 2023-12-02 18:01:57 +03:00
Alibek Omarov
40c9a2fb82 engine: make Mod_SampleSizeForFace accept const surface 2023-12-02 18:01:57 +03:00
Andrey Akhmichin
a34c22fb10 engine: client: add support for "mp3 playfile/loopfile" commands. 2023-12-02 01:10:38 +03:00
Alibek Omarov
e161ff0f7a mainui: update 2023-11-27 19:25:36 +03:00
Alibek Omarov
fee42eab5a mainui: update 2023-11-27 19:05:48 +03:00
Alibek Omarov
2d2e03f235 engine: server: reset edict in ParseSaveTables like GoldSrc does which fixes messed up entities in mods that have advanced save-restore system (thanks to vasiavasiavasia95 for figuring out this bug) 2023-11-27 18:42:50 +03:00
Alibek Omarov
4c3c3529e9 engine: network: rename length variable to something that makes sense. Add usage line to http_addcustomserver 2023-11-26 23:20:46 +03:00
Alibek Omarov
7051b844ff engine: network: set HTTP buffer to 8kb on all systems, without depending on random constant like BUFSIZ 2023-11-26 23:19:49 +03:00
Alibek Omarov
68377435c8 engine: server: remove legacy light -> light_level entity key rewrite 2023-11-26 02:23:52 +03:00
Henry Ford
652b1804a8 wscript: make libdl optional for systems that include it in libc 2023-11-25 14:29:52 +03:00
Henry Ford
e7e1677786 engine: common: comply with C89 in OpenBSD wai_getExecutablePath 2023-11-25 14:29:52 +03:00
Henry Ford
f330aac113 engine: common: dont inlcude ucontext.h on OpenBSD where it doesnt exist 2023-11-25 14:29:52 +03:00
Henry Ford
dbdd330cf7 wscript: try to find alloca in stdlib.h on platforms without alloca.h or malloc.h 2023-11-25 14:29:52 +03:00
Velaron
2e39432e04 Support hd background 2023-11-23 15:03:08 +02:00
Andrey Akhmichin
c448c7b0b1 utils: mdldec: avoid double ".smd" extension output. 2023-11-22 11:05:34 +03:00
Andrey Akhmichin
8d7b9c2f01 utils: mdldec: always write trailing slash for non-empty destination path. 2023-11-22 11:03:28 +03:00
Alibek Omarov
b6a235445a vgui_support: update submodule 2023-11-22 11:02:25 +03:00
Alibek Omarov
9fcd4baa87 engine: client: gameui: expose animated_title and hd_background flags to main menu API 2023-11-22 11:01:18 +03:00
Alibek Omarov
fb0102eb8e filesystem: add support for two new liblist.gam keys: animated_title and hd_background 2023-11-22 11:01:18 +03:00
Alibek Omarov
9c1afaa372 filesystem: fix noskills being written as nomodels in gameinfo.txt 2023-11-22 11:01:18 +03:00
Alibek Omarov
1d1a6badb5 filesystem: VFileSystem009: HL25 compatibility (one single new method) 2023-11-22 11:01:18 +03:00
Andrey Akhmichin
2d41c9cb15 utils: mdldec: texture.c: add Targa image format output support. 2023-11-22 10:56:57 +03:00
Alibek Omarov
722cbe1f02 filesystem: forgot to add defaults.h include 2023-11-20 18:52:05 +03:00
Alibek Omarov
8ac2c241c4 mainui: update 2023-11-20 17:33:40 +03:00
Alibek Omarov
dd11f73951 filesystem: respect DEFAULT_MAX_EDICTS value 2023-11-20 17:32:35 +03:00
Alibek Omarov
a443547d4d common: defaults: add default macro for default gameinfo max_edicts value 2023-11-20 17:32:19 +03:00
Andrey Akhmichin
7a795edeb5 utils: mdldec: better validation checks. 2023-11-20 00:19:14 +03:00
Andrey Akhmichin
a8cbfb8dda Documentation: opensource-mods.md: update link to cs16-client. 2023-11-20 00:15:26 +03:00
SNMetamorph
5216cccef4 engine: server: added singleplayer check for userinfo update 2023-11-20 00:14:30 +03:00
SNMetamorph
a87f399e68 engine: client: revert export for pfnSPR_Load and pfnSPR_Frames functions
This needed for native support GoldSrc Monitor utility.
2023-11-20 00:14:06 +03:00
Andrey Akhmichin
dd310ab851 ci: upgrade freebsd tasks. 2023-11-20 00:13:42 +03:00
Andrey Akhmichin
16cc0ca0fe ref: gl: gl2_shim: replace "malloc.h" header with ALLOCA_H macro. 2023-11-20 00:13:04 +03:00
Alibek Omarov
83d26ad233 engine: server: add sv_allow_autoaim cvar 2023-11-20 00:11:10 +03:00
Alibek Omarov
d1f9a8f2db mainui: updates for HL25 2023-11-19 23:43:46 +03:00
Alibek Omarov
a2e1071808 game_launch: force link libm on Linux to workaround HL25 bug
HL25 doesn't link libm probably because of toolchain updates, where
--Wl,--as-needed became the default.

hl_linux is linked to libm which is why they probably didn't noticed this bug.

Workaround until Valve fixes it: https://github.com/ValveSoftware/halflife/issues/3492
2023-11-19 23:43:46 +03:00
Alibek Omarov
0aa8a2891c engine: client: add gles3compat to renderers list 2023-11-03 17:03:27 +03:00
Alibek Omarov
c0ceab7513 wscript: enable ref_gles3compat for Android 2023-11-03 17:01:47 +03:00
Velaron
5c90e716cb engine: platform: android: refactoring 2023-11-03 16:40:06 +03:00
Velaron
0073225549 scripts: gha: Android deps and build scripts 2023-11-03 16:36:55 +03:00
Alibek Omarov
d03a64602b wscript: change defaults for Android 2023-11-03 16:34:21 +03:00
Alibek Omarov
d67a4234cc filesystem: android: simplify code, get getAssets method only once, remove unneeded casts and memsets (where Mem_Calloc is used) 2023-11-03 16:29:57 +03:00
Alibek Omarov
0d37244490 filesystem: add missing const to 2nd argument of stringlistappend 2023-11-03 16:23:52 +03:00
Velaron
6426919cb5 filesystem: add Android assets support 2023-11-03 16:23:03 +03:00
Alibek Omarov
0a0d63663a filesystem: link with libandroid 2023-11-03 16:22:59 +03:00
Alibek Omarov
71b06801ef engine: platform: android: remove dead code 2023-11-03 14:48:28 +03:00
Alibek Omarov
cfc7b35927 engine: client: don't leave the user without mouse cursor if they enabled m_ignore 2023-11-03 14:48:28 +03:00
Alibek Omarov
76564958d1 engine: host: hide -nativeegl for Android SDL builds 2023-11-03 14:48:28 +03:00
Alibek Omarov
a464c3dd66 scripts: waifulib: compiler_optimizations: rename release build type to humanrights with kept compatibility 2023-11-02 14:33:00 +03:00
Alibek Omarov
bd969f3594 wscript: fix system opus detection, it didn't compile due to nonnull argument 2023-11-01 01:35:39 +03:00
Alibek Omarov
fb87d7c0b3 readme: wording, add icon, add donate.md link [skip ci] 2023-10-31 21:54:23 +03:00
Alibek Omarov
a69fc87940 Documentation: donate: add sponsorship information 2023-10-31 21:54:23 +03:00
Alibek Omarov
e481e1d73e ref: gl: enable GL waves with r_ripple 2023-10-31 21:52:00 +03:00
Alibek Omarov
6c0eed1b2b ref: gl: allow viewing water textures in their full glory with enabled r_ripple 2 2023-10-31 21:52:00 +03:00
Alibek Omarov
a6c67fdf9f ref: gl: upload only part of texture we're using, i.e. 64x64 for 64x64, 128x128 for 128x128 2023-10-31 21:52:00 +03:00
Alibek Omarov
03f838e37e mainui: update 2023-10-31 21:52:00 +03:00
Alibek Omarov
e21fa4a910 engine: add cvar r_refdll_loaded to indicate currently loaded renderer (for menu options and etc) 2023-10-31 21:52:00 +03:00
Alibek Omarov
46889ed453 ref: gl: libc rand() does better job at randomizing 2023-10-31 21:52:00 +03:00
Alibek Omarov
882fcc152c ref: gl: always scale down texture to 64x64, like sw.dll does 2023-10-31 21:52:00 +03:00
Alibek Omarov
a41902bd46 engine: mod_bmodel: detect water textures by texture name like LoadSurfaces does 2023-10-31 21:52:00 +03:00
Alibek Omarov
a6af32dafd ref: gl: connect ripply water to others parts of renderer (init, reset, animation and rendering) 2023-10-31 21:52:00 +03:00
Alibek Omarov
d6dfb83be7 ref: gl: ripply water implementation (bugfixed version from my Quake-2 patches) 2023-10-31 21:52:00 +03:00
Alibek Omarov
597429cf41 engine, filesystem: unify GetNativeObject between all the APIs. Allow getting filesystem APIs through GetNativeObject 2023-10-31 21:25:11 +03:00
Alibek Omarov
5ea074a1fd engine: fix build issues pointed by @Velaron 2023-10-31 21:01:42 +03:00
Alibek Omarov
29c9393da3 wscript: enable faster builds with gccdeps/msvcdeps 2023-10-31 04:30:27 +03:00
Alibek Omarov
bf6829189e wscript: move XASH_BUILD_COMMIT definition to libpublic, as this is the only place where it's used, for faster builds 2023-10-31 04:30:27 +03:00
Alibek Omarov
a62a9429c9 engine: launcher: remove Windows code from single binary launcher, as Windows completely supports running from external launcher and don't need dedicated builds 2023-10-31 04:30:22 +03:00
mittorn
f2c080e736 gl2shim: fix broken matrix update when fog attribute enabled (32 bit shift overflow) 2023-10-30 22:34:34 +03:00
Alibek Omarov
ea55e78855 ref: _inline -> static 2023-10-29 23:38:43 +03:00
Alibek Omarov
f7c536b81c engine: server: allow loading maps from subdirectories as this is used by some Half-Life mods 2023-10-29 02:44:46 +03:00
Alibek Omarov
6c40104c66 public: better fix for ExtractFilePath 2023-10-28 19:31:17 +03:00
Alibek Omarov
4d7d592918 engine: mod_bmodel: completely get rid of global loadmodel pointer 2023-10-28 16:06:00 +03:00
Alibek Omarov
c5e91f299b engine: mod_studio: reduce dependency on global loadmodel pointer, make it private for brush model loader 2023-10-28 15:38:40 +03:00
Alibek Omarov
cff276db71 engine: client: mod_dbghulls: reduce dependency on global loadmodel pointer 2023-10-28 15:35:20 +03:00
Alibek Omarov
30d1492b93 engine: remove Set/GetCurrentLoadingModel from RefAPI 2023-10-28 15:22:21 +03:00
Alibek Omarov
f07eea5073 engine: server: allow server unloading for Win32 targets until we figure out the issues with MetaMod 2023-10-28 11:14:12 +03:00
Alibek Omarov
fe407fbe00 public: workaround when empty string is passed to COM_ExtractFilePath (should make safe COM_ExtractFilePath) 2023-10-28 11:06:18 +03:00
Alibek Omarov
78bc177e05 engine: server: remove unused host struct field 2023-10-28 11:06:18 +03:00
Alibek Omarov
8fb908e3d4 engine: server: disable SV_UnloadProgs, only call it when shutting down engine 2023-10-28 11:06:18 +03:00
Alibek Omarov
d8b261370a engine: common: do not probe server to collect cvars for game.cfg (CHECK THIS) 2023-10-28 11:06:18 +03:00
Alibek Omarov
a2c9ac5b1f engine: client: disable server DLL probe for GameUI, check it's existence instead 2023-10-28 11:06:18 +03:00
Alibek Omarov
7f9025e178 engine: server: sv_pmove: use model name for physent name to avoid crash when classname isn't initialized yet 2023-10-28 11:04:43 +03:00
Alibek Omarov
8647110a10 Revert "engine: wscript: move libasound uselib under linux condition, as the ALSA interface is only relevant for Linux"
This reverts commit 48e44f0057.
2023-10-28 10:10:03 +03:00
Alibek Omarov
48e44f0057 engine: wscript: move libasound uselib under linux condition, as the ALSA interface is only relevant for Linux 2023-10-27 17:03:04 +03:00
Alibek Omarov
e3934af7d1 wscript: always load cmakelists generation tool 2023-10-27 16:57:22 +03:00
Alibek Omarov
a5ee631191 engine: server: sv_game: disable searching closer to server library memory region for Android 2023-10-27 14:31:16 +03:00
Alibek Omarov
ce39255ef0 engine: host: set rootdir on Android SDL port 2023-10-27 14:25:16 +03:00
Alibek Omarov
5aac5d2a52 filesystem: VFileSystem009: add pathid support to RemoveFile method 2023-10-27 08:02:45 +03:00
Alibek Omarov
061b50404d engine: server: register dummy cvar sv_allow_dlfile for GoldSrc compatibility 2023-10-27 08:02:10 +03:00
Alibek Omarov
279cec5ae9 engine: rename cl/sv_allowdownload for GoldSrc compatibility 2023-10-27 07:25:09 +03:00
Alibek Omarov
83a5648335 filesystem: only allow setting true or false for boolean type keys in gameinfo/liblist.gam 2023-10-27 07:24:42 +03:00
Alibek Omarov
a8fc9a4c5a waf: update to latest waifu 2023-10-27 07:24:18 +03:00
Alibek Omarov
6f6ddbce28 engine: add argument -timedemo that makes engine run timedemo and exit 2023-10-27 03:49:00 +03:00
Alibek Omarov
4cb425d2bb engine: console: do not draw console and do not draw notify in timedemo 2023-10-27 03:47:52 +03:00
mittorn
bf5fd40d64 gl2shim: workaround empty rgb5/rgb8 textures 2023-10-26 23:08:02 +03:00
mittorn
6bc613bdb4 ref_gl: force gles2 on non-nanogl until we support gles1 directly 2023-10-26 23:07:39 +03:00
mittorn
a982562658 ref_gl: Fix missing DebugOutput functions on GLES 2023-10-26 23:07:22 +03:00
Alibek Omarov
96a9172e36 engine: platform: sdl: check that we're handling SDL errors according to it's documentation 2023-10-26 23:06:50 +03:00
Velaron
75e0eb8f7d android: move to gradle 2023-10-26 14:25:18 +03:00
Alibek Omarov
34d7664342 ref: gl: disable TGA flip for detail textures, GoldSrc ignores it, so we will too 2023-10-26 05:12:38 +03:00
Alibek Omarov
b0a79df86f ref: change r_traceglow to 0, as GoldSrc does 2023-10-26 04:59:01 +03:00
Alibek Omarov
9e107e900c engine: network: fix async NS resolve
If we're currently running NS resolving thread, any request would block.

Co-Authored-by: mittorn <mittorn@sibmail.com>
2023-10-24 18:11:31 +03:00
Alibek Omarov
8f819a2fde engine: platform: sdl: fix forgotten icon setup call 2023-10-23 00:31:30 +03:00
Alibek Omarov
3251b68df5 ref: gl: more simple search of GL func with alternative name (EXT, OES suffixes or no suffix) 2023-10-22 20:02:14 +03:00
Alibek Omarov
3ac8ad9484 engine: fixup endianness found by -Werror=strict-aliasing in old armv7hf compiler (d259421111) 2023-10-22 20:02:14 +03:00
Alibek Omarov
b9ca0d4563 engine: common: network: more simple IP address copying from sockaddr to netadr_t and back 2023-10-22 20:02:14 +03:00
mittorn
dcb3da53b0 engine/client: fallback to defaults in touch_reloadconfig if config not exist 2023-10-22 20:02:14 +03:00
mittorn
e68b19ed1a engine/client: handle touch config aspect ratio, try correctly handle touch aspect on resizeable windows 2023-10-22 20:02:14 +03:00
mittorn
14c7a84482 engine/client: always save touch config if it was resetted manually (helps after writing broken/empty config) 2023-10-22 20:02:14 +03:00
mittorn
c1d1aa6787 ref_gl: rewrite ARB workaround to check EXT/OES names, notify user that function found with different name 2023-10-22 20:02:14 +03:00
mittorn
bee81e9723 engine: Make SDL_GetBasePath error not fatal 2023-10-22 20:02:14 +03:00
mittorn
1bfb6c560a platform/sdl: add check for missing hint defines 2023-10-22 20:02:14 +03:00
mittorn
24d6f1788a platform/sdl: workaround ubuntu SDL2 bug preventing resolving any extensions on EGL 2023-10-22 20:02:14 +03:00
mittorn
fb95cc9a97 engine/client: respect m_ignore in mouse client code as grabbing window breaks touch input 2023-10-22 20:02:14 +03:00
mittorn
b949da291e engine: fix strict aliasing issues found by an old armv7hf compiler 2023-10-22 20:02:14 +03:00
Alibek Omarov
2ecbe5b67e engine: add testing master server at mentality.rip:27011 2023-10-22 19:39:58 +03:00
Alibek Omarov
4d7309b77d gitignore: add build dirs 2021-12-08 18:04:34 +03:00
Alibek Omarov
384cc8541e compile.sh: use clang bundled in NDK 2021-12-08 18:04:34 +03:00
Alibek Omarov
63bd4faa22 Update submodules 2021-12-08 18:04:34 +03:00
Bohdan Shulyar
acba3e8c7b android: proper escaping in gen-version.sh 2021-10-09 21:21:01 +03:00
Alibek Omarov
a4ec54551a android: fix ampersand, lt, gt in version generator script 2021-07-03 22:45:29 +03:00
Velaron
155e766276 android: update signature check 2021-04-04 21:56:15 +03:00
Velaron
59ef64c821 android: update certificate check 2021-04-04 21:56:15 +03:00
Alibek Omarov
9feaee3e28 android: bump API level to 29 (Android 10) to support allowAudioRecording manifest property. Could be also done with reflection but I don't want do reflection 2020-11-27 21:58:11 +03:00
nillerusr
5fd30876ab fix max_aspect 2020-10-29 21:35:26 +03:00
abasgames
8d1288373d Audio capture 2020-09-30 21:39:50 +03:00
Alibek Omarov
f487cf0763 Revert "waf/android: add dex output to aapt input"
This reverts commit c2840ce608.
2020-08-23 19:07:22 +03:00
Alibek Omarov
bea0f46d31 android: don't pause on foldables 2020-08-23 19:04:24 +03:00
Francisco Medina
a55282f2c8 l10n: Spanish: Translated using Weblate
Currently translated at 84.0% (58 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/es/
2020-07-22 15:26:38 +03:00
Francisco Medina
09764c65ae l10n: Spanish: Added translation using Weblate 2020-07-22 15:26:38 +03:00
Alperen
6f29e2ea12 l10n: Turkish: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/tr/
2020-07-22 15:26:38 +03:00
Alibek Omarov
2ed18ddded readme: add simple readme 2020-07-11 16:19:08 +03:00
mittorn
9f45a1e8cb XashService: fix crash on api26 2020-07-10 09:16:11 +07:00
mittorn
2e5fcd45bd XashActivity: enable navbar menu key 2020-07-10 06:54:32 +07:00
mittorn
2c8cf356f9 XashActivity: fix white navbar background 2020-07-10 06:53:31 +07:00
mittorn
8b6243d872 fwgslib: fix immersive mode check 2020-07-10 06:52:57 +07:00
mittorn
8082d2092f XashService: Icon does not exist before 23 2020-07-08 01:47:31 +07:00
mittorn
c2840ce608 waf/android: add dex output to aapt input 2020-07-08 01:46:19 +07:00
mittorn
addd2f76ef resources: copy mipmaps to drawable, ensure mipmap used on 19+ and xml icon on 26+ when possible 2020-07-08 01:03:18 +07:00
mittorn
d6c715c5c3 XashService: re-enable api21 notification code 2020-07-08 00:59:57 +07:00
mittorn
1e84082d81 AndroidManifest: fix exit button receiver name 2020-07-08 00:59:12 +07:00
mittorn
8602bd4e9e Refactor XashActivity, fix crash in XashService, add compat wrappers 2020-07-07 07:28:43 +07:00
mittorn
ac0e9b633d mipmap does not work on 4.2- 2020-07-07 07:26:25 +07:00
mittorn
d683f32a34 platform28 allows implicit cast Object to NotificationManager??? 2020-07-07 07:22:32 +07:00
mittorn
b92b13158b waf/android: prefer aapt, aapt2 has compatibility issues 2020-07-07 07:21:01 +07:00
Serkan Cık
dea0c2ce43 l10n: Italian: Translated using Weblate
Currently translated at 86.9% (60 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/it/
2020-06-06 00:10:16 +03:00
Adam Fullbuster
0ec21fa424 l10n: Italian: Translated using Weblate
Currently translated at 69.5% (48 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/it/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
0258055c1d l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Anonymous
9280d47766 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
63d6c2f1fd l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Anonymous
ad3ca3b304 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
1564dc4e8e l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Anonymous
7dbaf87cd4 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
5b0aed5035 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Anonymous
72f3fc9578 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
00a0959e45 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Bohdan Shulyar
f587f6ecd6 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Anonymous
2906ab7cd5 l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-06-06 00:10:16 +03:00
Emanuele Scherillo
2b30141bcc l10n: Italian: Added translation using Weblate 2020-06-06 00:10:16 +03:00
Максим
7bcce219ed l10n: Ukrainian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/uk/
2020-05-25 21:14:30 +03:00
Serkan Cık
5a7ea67a0e l10n: Turkish: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/tr/
2020-05-25 21:14:30 +03:00
Allysson Samuel Amorim Vaz Cunha
c04631dad5 l10n: Portuguese (Brazil): Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/pt_BR/
2020-05-25 21:14:30 +03:00
Serkan Cık
aca292da94 l10n: Turkish: Added translation using Weblate 2020-05-25 21:14:30 +03:00
Максим
f1b4b01029 l10n: Ukrainian: Added translation using Weblate 2020-05-25 21:14:30 +03:00
Allysson Samuel Amorim Vaz Cunha
5d737987bb l10n: Portuguese (Brazil): Added translation using Weblate 2020-05-25 21:14:30 +03:00
a1batross
f84dafb7fe l10n: Russian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/ru/
2020-05-06 02:39:28 +03:00
a1batross
dc6397e607 l10n: English: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS Android/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/en/
2020-05-06 02:37:35 +03:00
a1batross
a1f8416336 l10n: Russian: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS Android/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/ru/
2020-05-06 02:37:35 +03:00
a1batross
02f1a92a1b l10n: English: Translated using Weblate
Currently translated at 100.0% (69 of 69 strings)

Translation: Xash3D FWGS Android/Android translations
Translate-URL: https://l10n.mentality.rip/projects/xash3d-fwgs-android/android-translations/en/
2020-05-06 02:37:35 +03:00
Alibek Omarov
d5d3c6868e XashActivity: revert 59411a2 2019-12-23 05:48:30 +03:00
Alibek Omarov
b9028879fb XashService: refactor notification creating, add notification channels on Oreo, use native notification layout on >=21 2019-12-23 05:33:40 +03:00
Alibek Omarov
59411a214a XashActivity: refactor resizing code 2019-12-23 02:33:50 +03:00
Alibek Omarov
b69649c50e android: wscript: make Java code compatible with old Android devices 2019-12-04 01:16:34 +03:00
Alibek Omarov
dc13474729 android: use ImageView instead of drawableLeft 2019-12-04 01:15:20 +03:00
Alibek Omarov
7674964cc8 android: add forgotten permission, application options, bump version, rename ic_launcher_round to ic_launcher to make Android 7.x happy 2019-12-04 00:55:17 +03:00
Alibek Omarov
a8f3701e92 android: implement better way to get JNI libraries directory 2019-12-03 03:46:14 +03:00
Alibek Omarov
ad3157e940 submodules: update 2019-12-03 03:11:51 +03:00
Alibek Omarov
332f81553a android: revert to Java EGL management 2019-12-02 02:16:08 +03:00
Alibek Omarov
c22c227108 android: add adaptive icons for 26. Fix references to icons. 2019-12-01 16:20:06 +03:00
Alibek Omarov
e72b89a88b android: move icons to appropriate folder 2019-12-01 01:28:41 +03:00
Alibek Omarov
3369cca3e6 android: increase target API to Pie(GP requirements), implement requesting permissions 2019-11-29 19:42:48 +03:00
Alibek Omarov
906e6ece0b compile.sh: use host clang by default, enable aarch64 2019-11-29 17:04:04 +03:00
Alibek Omarov
4179464de1 submodules: update 2019-11-29 17:03:26 +03:00
Alibek Omarov
fe0661fde9 android: rename package for new engine 2019-11-28 23:06:56 +03:00
Alibek Omarov
76cd263c83 compile.sh: enable strip 2019-11-07 08:47:48 +03:00
Alibek Omarov
fa4c023961 compile.sh: allow to override API version 2019-11-07 07:08:06 +03:00
Alibek Omarov
e18d0976ef compile.sh: enable polly on host toolchain, as NDK doesn't have it... 2019-10-11 09:11:12 +03:00
Alibek Omarov
ae23528e04 compile.sh: fix checking variables, enable poly-opt for SDK and engine on release builds 2019-10-11 08:53:03 +03:00
Alibek Omarov
bee36ae6a8 waf: upgrade to latest waifu revision 2019-10-11 08:52:19 +03:00
Alibek Omarov
397dbcad51 submodules: update to latest revision 2019-10-11 08:51:53 +03:00
Alibek Omarov
4eb42bf73a compile.sh: spew config.log on error 2019-10-09 02:59:16 +03:00
Alibek Omarov
eb830889f9 compile.sh: allow TOOLCHAIN to be overriden 2019-10-09 01:51:14 +03:00
Alibek Omarov
98ba50c974 compile.sh: allow ARCHS to be overriden 2019-10-09 01:49:56 +03:00
Alibek Omarov
a692857fe8 compile.sh: use shared certificate by default even on release builds 2019-10-07 05:54:56 +03:00
Alibek Omarov
4fa711bfd3 compile.sh: fix build type selection 2019-10-07 05:35:45 +03:00
Alibek Omarov
8d9d9fd682 android: sign debug builds with debug key 2019-09-27 05:33:12 +03:00
Alibek Omarov
949c9e278b waifulib: android: refactoring, add support for apksigner 2019-09-27 05:32:52 +03:00
Alibek Omarov
74babbfe01 submodules: update 2019-09-21 03:54:00 +03:00
Alibek Omarov
e260228e90 submodules: update 2019-09-20 18:50:51 +03:00
Alibek Omarov
a0d0aac9da Update submodules 2019-09-11 20:44:46 +03:00
Alibek Omarov
6755c8ef7f waf: move to waifu 2019-09-10 14:46:52 +03:00
Alibek Omarov
b7d97bc21b compile.sh: enable building native code 2019-09-10 11:27:21 +06:00
Alibek Omarov
24a56795aa compile.sh: add termux support, disable native building temporarily 2019-08-28 01:18:26 +03:00
Alibek Omarov
2fd2d749dc android: wscript: enable android opt, set jni(commented out, as I can't test it now) 2019-08-28 01:17:39 +03:00
Alibek Omarov
84e158da79 waflib: android: apkjni packaging is optional now(activated by passing 'jni'), add aapt1 preliminary support 2019-08-28 01:16:34 +03:00
Alibek Omarov
31edf71985 submodules: update 2019-08-23 12:31:03 +03:00
Alibek Omarov
4f25b03c9c compile: check for symlinked source 2019-07-29 08:39:40 +03:00
Alibek Omarov
3da70aa4f7 compile: remove hardfp from defaults, remove static library hack, don't sign if USER isn't me :) 2019-07-29 08:06:16 +03:00
mittorn
74dd990f2f waflib: android: fix wrong --release for dx 2019-05-19 18:50:39 +07:00
Alibek Omarov
1aab248fa4 waflib: android: python 3 fix 2019-05-19 14:48:33 +03:00
Alibek Omarov
8582c505e9 XashActivity: remove java EGL code 2019-05-12 02:59:59 +03:00
Alibek Omarov
57cb127d73 waflib: android: use static version checks instead of try-catch, define which version has introduced d8 2019-05-11 18:58:22 +03:00
Alibek Omarov
af9a759e9a waflib: android: build-tools 27 support 2019-05-10 03:14:42 +03:00
Alibek Omarov
c7b1f28590 compile.sh: exit if waf has failed 2019-05-10 03:13:57 +03:00
Alibek Omarov
37c84ad909 compile.sh: add extras.pak generation(TODO: move to waf?) 2019-05-06 20:18:38 +03:00
Alibek Omarov
face262d32 engine: update 2019-05-06 19:26:54 +03:00
Alibek Omarov
c9716b87be waflib: android: implement appending native libraries, make dependency graph cleaner 2019-05-06 19:24:41 +03:00
Alibek Omarov
5ec762b69c compile.sh: add build types 2019-05-06 19:12:39 +03:00
Alibek Omarov
688fc87f48 XashActivity: remove gpgs_support 2019-05-06 19:12:25 +03:00
Alibek Omarov
0aaf624cd7 compile.sh: build also HLSDK. Add check if sources are symlinked, which is really handy in development 2019-05-06 04:24:42 +03:00
Alibek Omarov
64403a5cd8 submodules: add 2019-05-06 04:23:59 +03:00
Alibek Omarov
5efac59e8f android.mk: completely remove it, as we use waf everywhere now, add simple buildscript 2019-05-01 19:05:15 +03:00
Alibek Omarov
2eae8a02e5 nanogl: remove submodule, now it's direct dependency of engine 2019-04-27 12:09:59 +03:00
Alibek Omarov
0cfc3966c5 gpgs_support: drop Google Play Games services support, it wasn't used anyway by any game. We need another interface, probably intent-based. 2019-04-27 12:09:27 +03:00
Alibek Omarov
a56fe98dc5 waflib: android: cleanup 2019-04-25 04:37:28 +03:00
Alibek Omarov
586a03d431 gitignore: extend even more 2019-04-25 04:24:15 +03:00
Alibek Omarov
c175a1b949 waf: add android.py plugin that helps build APK file 2019-04-25 04:23:30 +03:00
Alibek Omarov
3937520d3e gitignore: add *.pyc 2019-04-25 04:22:08 +03:00
Alibek Omarov
4309604eca waf: deploy waf build system 2019-04-25 04:21:38 +03:00
Alibek Omarov
4360676f96 scripts: move scripts to android folder 2019-04-25 02:28:36 +03:00
Alibek Omarov
6ad205a619 fwgslib: certcheck: remove BuildConfig.java dependency 2019-04-15 23:55:59 +03:00
Alibek Omarov
24632c0e69 android: move all sources to android folder, remove ant build system 2019-04-15 23:52:47 +03:00
Night Owl
6d2d7a9d6d Fix broken link. Update version string. 2018-10-09 10:43:54 +05:00
a1batross
7e76089b76 Bump to 0.19.3 2018-09-28 18:54:07 +03:00
Night Owl
73cbe46ecb Fix typo. Add a missing newline character. 2018-09-28 18:11:44 +05:00
Alibek Omarov
385c557a60 Add privacy policy link on our website 2018-09-25 17:40:58 +03:00
mittorn
6058828a33 Decrease mMinHeight for cstrike to make minimal resolutions availiable 2018-07-25 00:24:47 +00:00
Alibek Omarov
cd11dd138e Update engine 2018-07-14 21:20:32 +03:00
mittorn
5b93c0651e Update extras again 2018-07-14 17:47:37 +07:00
Alibek Omarov
63026564c2 Update pak version. Update engine submodule 2018-07-14 01:24:05 +03:00
Alibek Omarov
f415ac379d An update is scheduled for 14th of July 2018-07-14 00:04:01 +03:00
Alibek Omarov
7b62f5af21 Update submodules 2018-07-14 00:00:39 +03:00
mittorn
bfef1cf301 Fix vibrator check 2018-06-06 01:37:58 +07:00
Night Owl
0f02f3472e Update README.md. 2018-05-24 22:56:46 +03:00
mittorn
2f8ab7174b Add android.max_aspect tag 2018-05-15 19:54:53 +07:00
mittorn
1b5e416988 Remove some magic numbers 2018-05-12 03:02:37 +07:00
mittorn
03105e096d Code clean, improve resolution selection 2018-05-12 02:56:17 +07:00
mittorn
3d19551172 Update submodules 2018-04-07 13:59:25 +07:00
mittorn
811de8d4e7 Fix possible page overflow 2018-04-07 13:53:14 +07:00
mittorn
0d1d899d7c Refactoring, fix theme 2018-04-07 13:52:57 +07:00
mittorn
72e3313c30 Remove gkitchy adjustViewBounds, add landscape hack 2018-04-07 13:52:38 +07:00
Alibek Omarov
b48d965111 Fix gamepads, move gamepad motion event source check before mouse 2018-04-07 03:48:37 +03:00
Alibek Omarov
08d2309986 Add FExactBitSet for checking bitmasks, but exact 2018-04-07 03:48:37 +03:00
mittorn
cc0bf4bc43 Fix constants in switch cases 2018-04-07 03:48:37 +03:00
mittorn
fbb5301075 Smooth page return 2018-04-07 03:48:37 +03:00
mittorn
47433059b5 Fix animation speed 2018-04-07 03:48:37 +03:00
mittorn
5aaa34dc7e Make title adaptive 2018-04-07 03:48:37 +03:00
mittorn
f68aa134a1 Use adaptive text size 2018-04-07 03:48:37 +03:00
mittorn
8577f3bd79 Implement PagedView 2018-04-07 03:48:37 +03:00
mittorn
8e441e2b96 Fix layout sizes 2018-04-07 03:48:37 +03:00
mittorn
2b0a4f552b Workaround strange getExternalFilesDir freeze 2018-04-07 03:48:37 +03:00
mittorn
aa3af3bf67 Fix html content and localization 2018-04-07 03:47:03 +03:00
mittorn
31573ccbeb Simple tutorial (without fragments, ViewPagers and vertical layout) 2018-04-07 03:47:03 +03:00
Alibek Omarov
9c086c503a Fix NPE in GetExternalFilesDir. Correct return value in gamepad code 2018-04-01 18:29:57 +03:00
Alibek Omarov
27b2fb55c2 Update submodules 2018-04-01 02:00:22 +03:00
Alibek Omarov
69081da566 Bump versionCode to 1096, as release is scheduled for 1 April 2018-03-23 22:20:08 +03:00
Alibek Omarov
2d04a3faa9 Fallback to external files dir, if writedir invalid(empty) 2018-03-23 22:20:08 +03:00
Alibek Omarov
300e65e200 Suggest converting to rodir, if write test has failed 2018-03-23 22:20:08 +03:00
Alibek Omarov
09a88e4cbc Merge pull request #163 from VladAndroidGamer/patch-3
Русский Readme
2018-03-22 01:03:40 +03:00
Владислав Сухов
ffa411b874 Russian Readme file 2018-03-21 14:47:56 +06:00
Владислав Сухов
cc25bb91bd Русский Readme 2018-03-21 14:44:20 +06:00
Alibek Omarov
a3e10ef9ac Update buildscript 2018-03-21 02:19:43 +03:00
Alibek Omarov
1c1cab6e30 Use monochrome special icon for status bar service. Add RoDir settings to the launcher. 2018-03-21 02:18:47 +03:00
Alibek Omarov
88873cad9d Fix untranslated button Finish 2018-03-14 00:27:31 +03:00
Alibek Omarov
48fe23b483 Merge pull request #162 from VladAndroidGamer/patch-2
Update pages.xml
2018-03-08 11:42:22 +03:00
Владислав Сухов
76f3b31eb4 Update pages.xml
Исправлены опечатки
2018-03-08 09:19:12 +06:00
Alibek Omarov
ea4929c7e7 Enable tutorial view by default 2018-03-01 23:51:34 +03:00
Alibek Omarov
00d5b652c1 Fix build 2018-03-01 23:45:29 +03:00
Alibek Omarov
df311e861d Russian translation of tutorial 2018-03-01 23:38:53 +03:00
Alibek Omarov
e7a6988811 Update pages.xml 2018-03-01 23:28:39 +03:00
Alibek Omarov
9c72a2ed05 All translation other than English and Russian was temporarily disabled, because they do not represent exact translation of English text anymore(missing translations, translation errors) 2018-03-01 22:14:52 +03:00
Alibek Omarov
ea085ae8d7 Update Russian translation 2018-03-01 22:12:34 +03:00
Alibek Omarov
4cf28bb6b8 Fix English strings 2018-03-01 22:11:55 +03:00
Alibek Omarov
4e58654c10 Remove hardcoded strings to proper translation 2018-03-01 21:50:13 +03:00
Alibek Omarov
57847a7dd3 Now all tutorial textures have same size. Add tutorial texture for fifth page 2018-03-01 20:50:46 +03:00
Alibek Omarov
a1af4dba99 Update engine 2018-02-15 19:24:55 +03:00
Alibek Omarov
96432c6ca9 Common sign key for all testing builds 2018-02-15 19:14:16 +03:00
Alibek Omarov
268f4a8ec2 Update submodules 2018-02-04 17:54:22 +03:00
Alibek Omarov
a80e3e3022 Fix wrong directory name in buildscript 2018-02-04 17:53:52 +03:00
Alibek Omarov
8e517beff8 Revise gamepad buttons IDs, fix wrong 2018-02-04 17:52:22 +03:00
Alibek Omarov
108dc1243f Add --no-undefined globally to Application.mk 2018-02-04 17:34:26 +03:00
Alibek Omarov
3b3d82e097 Fix tutorial back string 2018-02-04 17:10:56 +03:00
Alibek Omarov
94bdf0238a Twice decrease margins for notification 2018-02-04 17:08:07 +03:00
Alibek Omarov
41fc8e1672 Add build script from cs16client 2018-02-04 17:00:41 +03:00
Alibek Omarov
4d7018bfde Update russian translation. Get rid of untranslated strings in layouts. Remove build.sh script. 2018-02-04 17:00:16 +03:00
Alibek Omarov
0637008eec Set more proportional margins for notifications 2018-02-04 13:36:22 +03:00
Alibek Omarov
c658fe782d Reformat XashService.java 2018-02-04 13:32:57 +03:00
Alibek Omarov
94ec3df282 Update test AndroidManifest. Set version string to 0.19.1. 2018-02-04 12:54:14 +03:00
Alibek Omarov
90fa1c1fef Add graphics for page0 and page3, remove HTML tags from pages.xml. 2018-02-04 01:46:38 +03:00
Alibek Omarov
78e36a2eab Add @msayan's tutorial-view library, add support-v4 as dependency, add paged tutorial(WIP) 2018-01-30 23:19:07 +03:00
Alibek Omarov
88df5e4631 Update strings: set version to 0.19.1, add @nekonomicon to credits, add @msayan to credits for tutorial-view library, add Finish string 2018-01-30 23:16:18 +03:00
Alibek Omarov
124bedcc59 Fix tutorial pages 2018-01-30 21:37:15 +03:00
Alibek Omarov
92423c8108 Rename drawable files, fix build 2018-01-29 02:15:32 +03:00
Alibek Omarov
d7389e4511 Remove unneeded SUPPORT_WEBP=false from travis.yml, as we don't use SDL and SDL_image. Update travis-deploy.sh from engine repo 2018-01-29 01:58:52 +03:00
Alibek Omarov
b923b3d6b6 Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2018-01-29 01:14:15 +03:00
Alibek Omarov
b7b468ba14 Add pictures for first two tutorial pages 2018-01-29 01:13:55 +03:00
mittorn
20f95b2104 Fix detecting mouse as touchscreen, add PointerIcon support 2018-01-24 04:11:13 +07:00
mittorn
c5900d761f Update submodule 2018-01-24 00:10:57 +07:00
Alibek Omarov
a09abe4bcf Rewrite pages.xml for English 2018-01-12 14:18:54 +03:00
Alibek Omarov
85641c3e1d ShellExecute extension to open update page 2018-01-08 19:42:09 +03:00
Alibek Omarov
57ce27dfe7 Don't read symlink while checking game lib directory. It's non-portable. 2018-01-01 20:18:17 +03:00
Alibek Omarov
2eb6fbbc42 Don't start service, if we are closing for some reason 2018-01-01 20:17:24 +03:00
Alibek Omarov (a1batross)
37a4c921a6 Update nanogl 2017-11-20 04:22:14 +03:00
Alibek Omarov (a1batross)
6432a9f68d Android part of FWGS/xash3d@a3a1dab commit [skip ci] 2017-11-20 03:41:56 +03:00
Alibek Omarov (a1batross)
25608759e5 Implement ShellExecute for Android(java part) 2017-11-01 17:27:08 +03:00
Alibek Omarov (a1batross)
0213d3be89 Disable cert checking for ant debug builds 2017-11-01 17:26:41 +03:00
mittorn
8ec0283c06 Add WIP firstrun text (need rewrite) 2017-10-20 10:10:26 +07:00
mittorn
bd17310bad Update submodules 2017-10-20 10:09:35 +07:00
mittorn
67a296d304 Add firstrun dialog (WIP) 2017-10-02 04:14:26 +07:00
mittorn
2f4f36d407 Fix build 2017-10-01 23:52:23 +07:00
Alibek Omarov (a1batross)
828ede1e3a Add resolution change warning red text, add result resolution preview, make resolution custom fields appear in one line, make first use of FWGSLib, fix possible crash while activity is closed before engine thread was created 2017-09-30 02:29:55 +03:00
Alibek Omarov (a1batross)
1c02cfb443 Introduce FWGSLib: an utility library that contains userful shortcuts and hides Android and Java design flaws 2017-09-30 02:25:36 +03:00
Alibek Omarov (a1batross)
5885a6ccd4 Restrict too lower values to prevent possible client bugs 2017-09-28 23:40:33 +03:00
Alibek Omarov (a1batross)
be71073e93 Hide resolution settings, when resolution changing is not enabled. Fix crashes, when scale, width or height textboxes are filled with invalid data 2017-09-28 23:33:18 +03:00
Alibek Omarov (a1batross)
dcd92e8a57 Port fix for batch text removing from SDL2, fix twice text input on some T9/Swype-like keyboards 2017-09-28 21:57:40 +03:00
Alibek Omarov (a1batross)
a1e8f0e1df Grey-out select folder while loading 2017-09-28 21:01:46 +03:00
Alibek Omarov (a1batross)
d23797a244 Reformat XashActivity.java 2017-09-28 20:54:10 +03:00
Alibek Omarov (a1batross)
0c5d9a8146 Remove org.json submodule, as this is a part of public Android SDK 2017-09-28 16:57:30 +03:00
Alibek Omarov (a1batross)
51b53e0f2c Fix default build(test.version=0) 2017-09-28 16:57:30 +03:00
mittorn
691fbe8615 Fix missing : 2017-09-24 10:49:08 +00:00
mittorn
c25ebc4adc Use git credentials 2017-09-24 10:21:49 +00:00
mittorn
b8b44ff3e3 travis: Set android platform to 19 2017-09-24 06:58:38 +07:00
mittorn
16c91c4046 Install ant via apt 2017-09-24 06:48:25 +07:00
mittorn
8dbe38ebfe Add ant install to travis script 2017-09-24 06:37:00 +07:00
mittorn
a62975fe1f Add Ok button to about dialog 2017-09-24 06:28:01 +07:00
mittorn
00ff0ced07 Implement screen resolution changing 2017-09-24 06:26:51 +07:00
mittorn
b0099a2c5d Update submodules 2017-09-24 03:21:47 +07:00
mittorn
f0bd91fba7 Update nanogl 2017-08-17 20:45:08 +00:00
mittorn
2168912095 Fix outdated submodules 2017-07-23 15:15:46 +07:00
mittorn
efc472cf84 Hack legacy style to make more similar to modern 2017-07-23 04:01:21 +07:00
mittorn
1018169842 Make force-quit after engine wait timeout 2017-07-22 13:51:07 +07:00
mittorn
06359502e1 Add wait timeouts 2017-07-22 13:49:07 +07:00
EXL
0949e89c11 PR #143 improvements
Drop bad NullPointerException catching code
2017-06-24 18:19:54 +04:00
Alibek Omarov
c1da6335e4 Merge pull request #143 from EXL/fix_fpicker_crash
Fix crash in FPicker on Android OS >= 7.0
2017-06-23 08:31:06 +04:00
EXL
4e07206c98 Fix crash in FPicker on Android OS >= 7.0
Drop always 'false' condition
2017-06-23 09:58:36 +07:00
mittorn
426b088e16 Remove unuseful control key hack
It breaks ctrl-space on android 7+ and crashes on 2.3-
2017-06-22 02:20:33 +06:00
mittorn
0e3b544534 Update nanogl 2017-06-19 07:10:16 +00:00
mittorn
45b51451ab Update nanogl and engine 2017-06-18 20:22:42 +00:00
mittorn
9313824a5f Update engine 2017-04-30 12:06:44 +06:00
mittorn
6f5e809507 GDBSafe mode that disables some dangerous operations 2017-04-25 23:52:09 +00:00
mittorn
7c44e6451a Disable MouseMove debug message 2017-04-25 21:55:30 +00:00
mittorn
27ca283446 Fix false-detecting mouse 2017-04-05 22:03:19 +00:00
Alibek Omarov (a1batross)
4647feaf35 Update gitignore 2017-04-01 11:52:59 +03:00
Alibek Omarov (a1batross)
67c8527e2b Revert some submodules 2017-04-01 11:51:18 +03:00
Alibek Omarov (a1batross)
3b6365a048 Remove OPEN_DOCUMENT_TREE request, because it's still does not gives permission to use fopen() call. So, forbid unwritable SD cards at all. 2017-04-01 00:52:13 +03:00
Alibek Omarov (a1batross)
d216265519 Merge. 2017-04-01 00:19:08 +03:00
Alibek Omarov (a1batross)
ba38146726 Bump version. Update submodules 2017-04-01 00:06:18 +03:00
mittorn
17ce269513 Restore pointer action checks 2017-03-31 18:34:08 +00:00
mittorn
8fcb6ca128 Fix compatibility again 2017-03-30 23:32:27 +00:00
mittorn
58cd129055 Update engine 2017-03-30 23:14:56 +00:00
mittorn
236586eed5 Fix build 2017-03-30 21:39:08 +00:00
mittorn
f51e6ab1e2 Proper mouse handling on nvidia devices 2017-03-30 19:58:11 +00:00
mittorn
fbcf7758bf Mouse support (nvidia extension) 2017-03-30 00:25:51 +00:00
mittorn
99454bac95 Update projects 2017-03-29 20:01:18 +00:00
mittorn
a4745e06fc Android id support 2017-03-28 23:32:39 +00:00
mittorn
9613276658 Disable gnustl_static when not needed 2017-03-28 22:47:19 +00:00
mittorn
b3777bd7c0 Fix compatibility problems, add setTitle, setIcon 2017-03-26 22:11:27 +00:00
mittorn
fa43690519 Update deploy script again 2017-03-25 20:58:20 +00:00
mittorn
aaba1b6db9 Update deploy script 2017-03-24 22:28:49 +00:00
mittorn
5368a7f56b Xash3D background service (prevend unload) 2017-03-24 22:03:00 +00:00
Mars873
6d9056c74c update translation (#132) 2017-03-15 00:46:04 +03:00
Alibek Omarov (a1batross)
ea60581142 Try to implement write permission checking and requesting permissions on newer Android devices 2017-03-07 00:00:32 +03:00
Alibek Omarov (a1batross)
139972e5c8 Try to check write permissions before engine launch 2017-03-06 00:01:39 +03:00
Alibek Omarov (a1batross)
24dd05dd36 gpgs_support: fix build 2017-03-05 21:23:22 +03:00
Alibek Omarov (a1batross)
b028a18d16 Remove jnisetenv library, restore old engine initialization. New library: gpgs_support, which initialized Google Play Games in Google Play builds. (In opensource builds does nothing) 2017-03-04 17:13:47 +03:00
Alibek Omarov (a1batross)
e2faa06de2 Finally implement all onPause, onStop and onDestroy, move JoystickHandler to JoystickHandler.java 2017-03-04 16:02:54 +03:00
Alibek Omarov (a1batross)
3b5e5462b4 XashActivity: Better use onPause for saving configs only, as this method is unkillable. onStop will just stop engine. 2017-03-04 00:56:51 +03:00
Alibek Omarov (a1batross)
323e314714 XashActivity: implement proper engine thread quit 2017-03-04 00:21:29 +03:00
Alibek Omarov (a1batross)
7867a53895 XashActivity: fix initialization 2017-03-03 00:00:04 +03:00
Alibek Omarov (a1batross)
2e2fca08a3 setenv: fix attributes 2017-03-02 23:00:56 +03:00
Alibek Omarov (a1batross)
770c72d0c5 setenv: forgotten include 2017-03-02 22:46:56 +03:00
Alibek Omarov (a1batross)
66eacf4839 Move setenv from engine to split library to allow lazy engine library loading 2017-03-02 22:29:30 +03:00
Alibek Omarov (a1batross)
af63c6fd5b XashActivity: fix return value 2017-03-02 21:37:32 +03:00
Alibek Omarov (a1batross)
9c9f98623a Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2017-03-02 21:34:03 +03:00
Alibek Omarov (a1batross)
4bfd57037b XashActivity: move loadLibrary call after setting up all envvars. 2017-03-02 21:33:27 +03:00
Alibek Omarov
58deff4184 Merge pull request #124 from AICgmo/patch-3
Korean
2017-02-16 11:17:49 +03:00
AICgmo
ec8393eccb Update strings.xml 2017-02-16 14:13:56 +09:00
a1batross
dd1607f261 Fix crash if MotionEvent.getDevice() will return NULL in joystick backend. Add a checks to InitGL, just in case 2016-12-07 00:25:09 +03:00
AICgmo
4138aaf19f Korean
Korean Edit
2016-11-29 17:13:46 +09:00
mittorn
de21d49463 Update upload script again 2016-11-25 11:26:49 +00:00
mittorn
b58214bc26 Fix typo 2016-11-25 11:12:47 +06:00
mittorn
a95b345e33 Make curl silent 2016-11-25 11:01:08 +06:00
mittorn
9d94f5973b exit 0 in deploy script 2016-11-25 11:01:08 +06:00
mittorn
ceba3e90c6 Fix not showing .. when folder name too short 2016-11-25 11:12:31 +07:00
mittorn
a38603ebe1 Add github deploy script 2016-11-25 00:59:09 +06:00
mittorn
a9bb69cd32 Fix scripts again 2016-11-25 00:52:21 +06:00
mittorn
1a0700aafe Update submodules 2016-11-25 00:36:30 +06:00
mittorn
690275a0de Fix scripts 2016-11-24 20:08:03 +00:00
mittorn
b98df4df07 Update nanogl submodule 2016-11-24 19:46:17 +00:00
mittorn
fa91f6d279 ant needs property value 2016-11-24 13:31:15 +00:00
mittorn
3a4d5beabd AAPT has written by monkeys! 2016-11-24 13:14:47 +00:00
mittorn
ed66e84f71 Try fix stupid aapt 2016-11-24 13:05:59 +00:00
mittorn
d97cd43174 Try move condition to target block 2016-11-24 12:53:22 +00:00
mittorn
fae4e066e9 Ant is completely uneuseful without third-party libraries 2016-11-24 12:33:10 +00:00
mittorn
9c3ed99de2 Add if task def 2016-11-24 12:25:25 +00:00
mittorn
b0a4b00eb0 Conditional test version 2016-11-24 12:06:03 +00:00
mittorn
bf245a5439 Update travis-upload.sh 2016-11-24 14:21:13 +06:00
mittorn
ac3d861df7 Update travis-upload.sh 2016-11-24 14:57:36 +07:00
mittorn
2e9b4bf07c Try new upload script 2016-11-24 12:36:00 +06:00
mittorn
f3ec856995 Update build.xml 2016-11-23 14:22:11 +06:00
mittorn
4aa0439be4 Re-enable full build 2016-11-22 02:12:05 +06:00
mittorn
41ba97d426 Fix gen-config 2016-11-22 02:01:10 +06:00
mittorn
e759bf819a Ant travis test build 2016-11-22 01:34:50 +06:00
a1batross
e45165a958 Fix background of FPicker 2016-09-13 22:29:53 +03:00
a1batross
f7a298e8b7 Fix shorcut activity style 2016-09-13 22:26:39 +03:00
a1batross
3fb08631c4 Disable autoupdater in Google Play edition 2016-09-13 21:34:30 +03:00
a1batross
54166f6be4 Fix gen-config & gen-version scripts 2016-09-13 21:34:11 +03:00
a1batross
abf3e99896 Update gitignore. Move android-support-v4 to unused directory. It's used only in google play builds 2016-09-13 21:27:59 +03:00
a1batross
da3c921ea8 Fix build.sh 2016-09-13 21:08:39 +03:00
a1batross
19bae91be1 REmove pregenerated XashConfig, choose Legacy theme if sdk < 21 2016-09-13 21:06:41 +03:00
a1batross
58f8f87e61 Bump to 0.18.1. Really. 2016-09-13 20:42:30 +03:00
mittorn
4209dd9529 Update engine 2016-09-13 00:00:46 +00:00
mittorn
a207140613 Update repos 2016-09-12 00:58:28 +00:00
mittorn
34b12cdf8c Update branches 2016-09-11 08:38:16 +00:00
mittorn
7bdc2664d4 Bump pak version 2016-09-10 20:45:34 +00:00
mittorn
8de7adae11 Bump version 2016-09-10 20:44:41 +00:00
mittorn
006c301564 Config generator 2016-09-10 20:25:17 +00:00
a1batross
e917d13ce3 Add XashConfig(look TODO), replace checks in XashActivity 2016-09-06 20:42:07 +03:00
a1batross
f8f8e5c743 Match versionCode to engine's build number 2016-09-06 20:14:32 +03:00
a1batross
6f16759f6c Fix ignored gamepad button when event is not have gamepad or joystick source. 2016-09-06 20:14:11 +03:00
a1batross
05ff89f1a3 Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2016-09-04 00:17:29 +03:00
Alexey
6e3365a412 Fix pixelformat bit sizes (#111) 2016-08-23 17:32:43 +06:00
Alibek Omarov
1e8888b2a4 [skip ci] Fix build status readme link 2016-08-23 17:29:16 +06:00
mittorn
a5a6dfb0df Fix enter key in some keyboards 2016-08-13 20:31:00 +00:00
a1batross
c9febff75f Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2016-08-14 00:01:55 +06:00
mittorn
a5a51792dc Update hlsdk 2016-08-13 17:02:48 +00:00
a1batross
df1dbbdd09 Update submodules 2016-08-13 16:12:51 +06:00
mittorn
8d26578c33 Update test build script 2016-08-12 21:40:08 +00:00
mittorn
27c1257d97 Update branches 2016-08-12 21:28:05 +00:00
a1batross
da85d25a02 Update engine branch(again) 2016-08-13 00:37:07 +06:00
a1batross
667d410b9f Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2016-08-13 00:19:37 +06:00
mittorn
d00b27d447 Update branches 2016-08-12 19:36:50 +00:00
a1batross
5784a2116f Remove SDL2 from README 2016-08-13 00:19:18 +06:00
a1batross
016be4ab0f Resigning our public release isn't good ;) 2016-08-13 00:12:19 +06:00
a1batross
3cda974475 Fix build 2016-08-12 23:23:12 +06:00
mittorn
78f8a7279a Update engine 2016-08-12 16:11:40 +00:00
a1batross
f1813fed8a Merge branch 'master' of https://github.com/FWGS/xash3d-android-project 2016-08-12 22:08:07 +06:00
a1batross
adae21a549 New icons. Add xxxhdpi(192x192) icon. 2016-08-12 22:07:23 +06:00
mittorn
456e391c75 Update engine 2016-08-12 14:32:06 +00:00
mittorn
ebba9effb7 Refactor key events, send lost dpad events as keyboard 2016-08-12 14:30:42 +00:00
mittorn
12e6b7a9ab Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project 2016-08-12 13:16:55 +00:00
mittorn
172d3f9e88 Fix strings in resources 2016-08-12 08:23:10 +00:00
mittorn
e471a9d586 Remove SDL folder 2016-08-11 20:41:26 +00:00
mittorn
9a78494be9 Disable steam from AndroidManifest 2016-08-11 20:38:00 +00:00
mittorn
438d574714 Disable steam again 2016-08-11 20:35:33 +00:00
mittorn
dff2f20dbb Update branches 2016-08-11 20:25:05 +00:00
mittorn
1e3e1c574d Update build script 2016-08-11 20:18:08 +00:00
mittorn
b2d221e3df Update omp blacklist 2016-08-11 19:57:44 +00:00
a1batross
e8d0a3a5b6 Update submodules: engine, json and xash-extras 2016-08-11 23:35:41 +06:00
a1batross
6a3541f6d9 Invert look axes 2016-08-11 23:34:40 +06:00
mittorn
98898f852e Merge branch 'omp' 2016-08-11 07:44:30 +00:00
mittorn
5a2b0b1514 Remove SDL from gen-version.sh 2016-08-11 07:31:29 +00:00
a1batross
e76774ebe3 Update submodules 2016-08-11 12:29:43 +06:00
mittorn
2e11e1cd30 Ignore other configuration changes 2016-08-09 12:01:47 +00:00
mittorn
77e209f5ed Prevent crash on hardware keyboard connect 2016-08-09 11:28:22 +00:00
mittorn
2c73f5a0fa Prevent launch while extras in unpacking 2016-08-09 10:52:32 +00:00
mittorn
d35d54afa4 Fix keyboard/resize in immersive mode 2016-08-09 10:50:52 +00:00
a1batross
2e42e30f1c Update engine. Increase versionCode, so Google Play don't complain about updating Xash3D everytime. 2016-08-07 22:23:23 +06:00
mittorn
6f5ccd4239 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project into remove-sdl 2016-08-05 17:43:55 +00:00
mittorn
f44451e0f1 Fix compatibility 2016-08-05 17:43:46 +00:00
a1batross
4fc4454a74 [skip ci] Just disable XASH_SDL in debug buildscript 2016-08-05 19:53:14 +06:00
a1batross
100f89b0e7 Update engine 2016-08-05 19:48:06 +06:00
a1batross
2916a1020e Merge 'remove-sdl' branch into 'master' 2016-08-05 19:43:56 +06:00
a1batross
3192fd851d Update engine 2016-08-05 19:33:19 +06:00
a1batross
ce2e4767ad Swap yaw and pitch axes again 2016-08-05 19:31:42 +06:00
a1batross
8133cd9d01 Implement Immediate Mode(sticky) on 4.4 or higher 2016-08-05 19:17:12 +06:00
a1batross
e75f120cf7 Rework FPicker to use AsyncTask. Also change spaces to tabs. 2016-08-05 19:16:01 +06:00
a1batross
774ee7cf38 Update engine version. Update URLs in submodules 2016-08-05 15:22:27 +06:00
a1batross
f6f2aede91 Remove SDL2 submodule 2016-08-05 15:10:56 +06:00
mittorn
063dc599b9 Fallback to key event on gamepads 2016-08-01 19:11:37 +00:00
mittorn
0a35d46131 Forgot initialize handler 2016-08-01 16:08:41 +00:00
mittorn
ad5147a53f Joystick compatibility mode 2016-08-01 11:27:51 +00:00
mittorn
c02a3167ca Update submodules 2016-08-01 09:51:14 +00:00
mittorn
7dde5b83b1 Allow unaligned access 2016-08-01 09:42:30 +00:00
mittorn
7a10caf3df Fix build 2016-08-01 09:40:56 +00:00
mittorn
7db489df98 Bump versions 2016-08-01 09:28:06 +00:00
a1batross
d2b0860577 Swap pitch and yaw in joystick constants 2016-07-31 21:06:41 +06:00
a1batross
0af71adf39 Fix build, fix awful merge, add joystick backend 2016-07-28 00:12:01 +06:00
a1batross
4697cda8b0 Android joystick backend 2016-07-26 22:39:54 +06:00
a1batross
df0a0f2a64 Update autoupdater link 2016-07-26 18:01:17 +06:00
a1batross
106b193511 Autoupdater: add a checkbox for checking beta versions also 2016-07-26 17:54:29 +06:00
a1batross
1195c1b96b Merge autoupdate to remove-sdl 2016-07-26 17:07:01 +06:00
a1batross
e48b54d461 Merge branch 'remove-sdl' of https://github.com/SDLash3D/xash3d-android-project into remove-sdl 2016-07-26 16:56:57 +06:00
a1batross
1c4c10e97e SDLash3D->Flying With Gauss 2016-07-22 19:38:49 +06:00
mittorn
c4d3e4af20 New test icons 2016-07-02 22:50:31 +00:00
mittorn
d19f81fef1 Add switch for resize on keyboard 2016-07-02 22:31:25 +00:00
mittorn
e55c292c81 Update engine 2016-07-02 22:30:01 +00:00
mittorn
249bbf991a Update engine 2016-06-27 11:01:00 +00:00
mittorn
a7a1a2457c Update engine 2016-06-26 11:15:37 +00:00
mittorn
cc211aa82e Update branch 2016-06-13 20:09:45 +00:00
mittorn
530d68e43a Update branches 2016-06-12 20:44:39 +00:00
a1batross
276afa836b Merge branch 'remove-sdl' of https://github.com/SDLash3D/xash3d-android-project into remove-sdl 2016-06-11 20:06:40 +03:00
mittorn
1fde2ba0dd Update layout 2016-05-31 12:23:09 +00:00
mittorn
c52453ea1a Volume buttons 2016-05-31 09:03:38 +00:00
mittorn
cd1c47245a Update engine 2016-05-27 00:18:02 +00:00
a1batross
4ccca49099 Update all translations: update russian translation, remove untranslatable strings 2016-05-21 20:13:48 +03:00
a1batross
38ec856198 Fix new version checking 2016-05-21 20:13:18 +03:00
a1batross
9b2c616baa Add autoupdate checker 2016-05-20 23:46:35 +03:00
a1batross
e5c3122ba7 Lower android API 2016-05-20 23:46:11 +03:00
a1batross
64b30c4bd6 Fix warnings 2016-05-20 22:32:59 +03:00
a1batross
2ddcaf37b4 Add org.json package 2016-05-20 14:01:28 +03:00
a1batross
072781f21f Merge branch 'travis-new-path' into remove-sdl 2016-05-20 13:20:07 +03:00
mittorn
379266732e Merge remote-tracking branch 'origin/travis-new-path' into remove-sdl 2016-05-16 22:26:53 +00:00
mittorn
1333895aa6 Update engine 2016-05-16 22:24:23 +00:00
mittorn
fa1d58020b Update engine 2016-05-15 09:25:43 +00:00
Alibek Omarov
f1aa3d2832 Merge pull request #102 from DeicPro/master
Fix links on About dialog
2016-05-14 01:37:28 +03:00
mittorn
dab20204ce Update branches 2016-05-13 22:29:13 +00:00
a1batross
87a536ffc0 Adjust upload script 2016-05-14 01:19:07 +03:00
a1batross
77327d2c21 Fix script 2016-05-14 00:50:27 +03:00
a1batross
491d537384 Seems gen-version.sh generates invalid XML when commit message have characters like less- or greater-than signs 2016-05-14 00:43:37 +03:00
a1batross
8a599ee8e9 Forgot 'sh' >___< 2016-05-14 00:28:02 +03:00
a1batross
6f27a141a5 Mistype in script name >_< 2016-05-14 00:25:23 +03:00
a1batross
12115e1dd1 Rework Travis autobuilds 2016-05-14 00:10:39 +03:00
Deic
9e515756af remove useless arg 2016-05-13 22:51:21 +02:00
Deic
e5268bcf3f fix TextView on dialog
Links work now.
2016-05-13 22:49:45 +02:00
Deic
0c16521ff4 Merge pull request #1 from SDLash3D/master
merge
2016-05-13 22:42:18 +02:00
a1batross
9575c9a9b5 Fix build for Brazil Portuguese 2016-05-13 20:06:30 +03:00
mittorn
ff81e98bc2 Update branches 2016-05-13 14:56:35 +00:00
mittorn
b708774bcd Update branches 2016-05-12 22:43:28 +00:00
mittorn
7bcaa0db87 Disable EGL initialization, called from native now 2016-05-12 22:42:15 +00:00
Matheus Naldi
f4538c2eec Added translation for Brazilian Portuguese 2016-05-12 11:13:37 -03:00
mittorn
19c8340b5c Add default icon 2016-05-09 19:51:27 +00:00
mittorn
0735d551ff Implement messagebox and enable resize 2016-05-09 15:05:28 +00:00
mittorn
57f3f03236 Refactor code 2016-05-09 14:03:50 +00:00
mittorn
848b1f8ae6 Keyboard and vibration support 2016-05-08 22:57:35 +00:00
mittorn
aba773d1c0 Pixel format selection spinner 2016-05-08 08:57:07 +00:00
mittorn
3903f06abb Update branches 2016-05-08 08:12:05 +00:00
mittorn
e365040659 Fix screen orientation 2016-05-08 07:59:53 +00:00
mittorn
0211b8720f Update branches, enable openSLES 2016-05-07 22:37:15 +00:00
mittorn
2c8b1ee753 Improve EGL restore 2016-05-07 20:14:09 +00:00
aaa95945
71f1aa6a2d Create strings.xml (#99)
* Create strings.xml

Translate to Chinese!

* Update strings.xml
2016-05-07 19:07:59 +03:00
Deic
3736938bea Create strings.xml (#100)
Spanish language added.
2016-05-07 11:40:46 +03:00
mittorn
69b11fcf38 Implement EGL restore 2016-05-06 22:20:34 +00:00
Alibek Omarov
fe5b7dc7cf Update README.md 2016-05-07 01:50:36 +04:00
mittorn
5b0ee9679c Fix fullscreen 2016-05-06 16:49:42 +00:00
mittorn
441beea431 Fix install 2016-05-06 16:48:21 +00:00
mittorn
46a9d3fac6 Update travis 2016-05-06 15:12:19 +00:00
mittorn
aeee1419a2 Fix and rework launch 2016-05-06 14:58:09 +00:00
mittorn
126433c42c Android 1.5 support 2016-05-06 08:58:01 +00:00
mittorn
11a29ac213 Touch action filter, add keyboard code 2016-05-05 20:01:43 +00:00
mittorn
e33ceda57a Update touch code 2016-05-04 21:34:15 +00:00
mittorn
cd81aa82ea Improve launch, fix touch 2016-05-04 21:02:09 +00:00
mittorn
76cac2a352 Restore build without sdl (only graphics output supported) 2016-05-03 22:24:07 +00:00
mittorn
285c11522d Update branches 2016-05-02 21:37:39 +00:00
mittorn
bc1d9fed7f Fix NullPointerExveption 2016-05-01 13:05:28 +00:00
mittorn
80a1f6c4c8 Autodetect legacy/material 2016-05-01 12:53:36 +00:00
Solexid
156171d77a Update AndroidManifest.xml 2016-05-01 11:37:36 +03:00
Solexid
cc21b87045 Update project.properties 2016-05-01 11:05:12 +03:00
Solexid
19de6ce5ff Update AndroidManifest.xml 2016-05-01 11:02:23 +03:00
Solexid
4f1bc7d68a Icon for folder 2016-05-01 10:43:34 +03:00
Solexid
5ef65c1d5b Update FPicker.java 2016-05-01 10:42:14 +03:00
Solexid
9a98aeb958 Update activity_fpicker.xml 2016-05-01 03:37:23 +03:00
Solexid
6ebca5c330 Fix missing string. 2016-05-01 03:25:20 +03:00
Solexid
0cffe3afe9 Added button to launcher 2016-05-01 03:18:32 +03:00
Solexid
726eab44d9 Fpicker classes 2016-05-01 03:15:27 +03:00
Solexid
45bf7fa453 Added folderpicker layout files 2016-05-01 03:13:28 +03:00
Leo
4195f90e0f Added Persian (Farsi) langauge (#93)
* Create strings.xml

* Added Persian (Farsi) Language

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml
2016-04-29 22:47:04 +03:00
Solexid
8065092976 Illegal call fix 2016-04-29 22:01:59 +03:00
Solexid
631c9c46c0 Import miss 2016-04-29 21:43:56 +03:00
Solexid
4560bd68a0 Strings update 2016-04-29 21:32:26 +03:00
Solexid
a7993ad1c3 Added some java code for tabwork 2016-04-29 21:29:56 +03:00
Solexid
a0b0c6154f First step.Edited layout. 2016-04-29 21:22:34 +03:00
mittorn
a78c93a65a Remove cl_tent.c from omp list 2016-04-24 21:46:13 +00:00
mittorn
8459c0e644 Update branches 2016-04-23 21:31:36 +00:00
mittorn
7986e1631a Update branches 2016-04-22 19:22:27 +00:00
mittorn
d1e8dce81a Experimental opm support 2016-04-22 19:02:06 +00:00
THE-Swank
94b33a11bb Language support: 'Ukrainian' (#86) 2016-04-20 00:09:22 +03:00
Benjamin Stürmer
8c3772a9bf Language support: 'German' (#85) 2016-04-19 20:39:35 +03:00
fuzun
34ee7c1d0f Language fixes (#78) 2016-04-16 21:26:01 +03:00
Alibek Omarov
870c58490b Merge pull request #77 from fuzun/LangSupport
Language support: 'Turkish'
2016-04-16 13:14:33 +03:00
fuzun
880f085b24 Language support: 'Turkish'
Turkish language support.
2016-04-15 21:37:18 +03:00
mittorn
42bbdc2f3c Enable steamcmd in test manifest 2016-04-14 20:53:03 +00:00
mittorn
bb58bdeec9 enable steamcmd, fix steam mobile 2016-04-14 18:00:44 +06:00
mittorn
230c07cc98 Update branches 2016-04-07 17:27:54 +00:00
mittorn
b5950a2972 Fix SDL cflags 2016-04-07 17:25:37 +00:00
a1batross
b09068e655 Bump pak version and apk version 2016-04-02 19:37:09 +03:00
a1batross
c8432f81bb Update submodules 2016-04-02 19:30:03 +03:00
a1batross
2131dc7cfd Update PAK version 2016-03-31 18:25:47 +03:00
a1batross
52deb81710 Check for undefined reference in case 2016-03-31 17:48:04 +03:00
a1batross
5d1f77d324 Temporarily disable Steam support 2016-03-31 17:29:54 +03:00
a1batross
5b117fe69a Update engine 2016-03-31 16:34:17 +03:00
a1batross
14ba7328af Update submodules 2016-03-31 16:08:34 +03:00
mittorn
5a073557ad Update engine, use gravgun temporary 2016-03-27 12:58:05 +00:00
mittorn
0554a17f67 Update engine 2016-03-19 19:36:28 +00:00
mittorn
6edbd62ba1 Update engine 2016-03-15 16:26:34 +00:00
mittorn
2f5536c7b4 Prepare to 0.17-beta.2 2016-03-08 18:35:11 +00:00
mittorn
5b8d6c114c Update 2016-03-06 20:36:44 +00:00
mittorn
e18fcc1e15 Update hlsdk 2016-03-05 21:37:52 +00:00
mittorn
5aa12da666 Update engine 2016-03-05 21:35:52 +00:00
mittorn
498a1f4ac9 Update gen-version script 2016-03-02 08:06:16 +00:00
mittorn
e5a8d1c2c9 Update engine and client 2016-03-01 20:20:56 +00:00
mittorn
3d5374a452 Update engine 2016-03-01 07:20:49 +00:00
mittorn
7d77d01552 Revert code-clean branch 2016-02-29 20:33:10 +00:00
mittorn
2d47dcef2c Update engine 2016-02-29 20:28:25 +00:00
mittorn
4cdc7b93dd Switch to new hlsdk 2016-02-29 20:12:50 +00:00
mittorn
3794611567 Change OnDestroy behaviour 2016-02-28 21:12:07 +00:00
mittorn
8fa32c733c Fix typo 2016-02-28 21:11:40 +00:00
mittorn
19e710f22c Update test manifest 2016-02-28 21:01:15 +00:00
mittorn
3ef85a5863 Update repos 2016-02-28 20:34:14 +00:00
Mittorn
9a4468477d [steamcmd]Update layout, refactor code, fix minor bugs 2016-02-26 20:18:20 +00:00
Mittorn
0978b30e34 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project into steamcmd-wip 2016-02-26 18:04:54 +00:00
Mittorn
c6d419594a Add sikentKillAll, rename preload library 2016-02-26 18:03:44 +00:00
Mittorn
3112adc305 Forgot layout 2016-02-26 08:48:41 +00:00
Mittorn
b0f7475962 WIP steam downloader 2016-02-26 00:05:04 +00:00
a1batross
1ef511f476 Remove untranslatable marks from some strings, add korean translation from #61 2016-02-25 19:05:14 +03:00
mittorn
cbd1905d69 Disable exiting onDestroy as android may kill process while saving config 2016-02-14 19:41:42 +00:00
mittorn
86ac642258 Update engine 2016-02-08 20:22:51 +00:00
mittorn
2f9968742a Update engine 2016-02-06 13:50:12 +00:00
mittorn
f2a22f4017 Update engine 2016-02-06 12:48:00 +00:00
mittorn
963f53a6a4 Update engine to tesing branch 2016-02-04 20:09:12 +00:00
mittorn
bab2279029 Update engine 2016-01-31 11:18:53 +00:00
mittorn
ddfc6ee3cf Bump to 0.17 2016-01-30 21:24:52 +00:00
mittorn
67b7d97557 Update engine, extras 2016-01-30 16:26:37 +00:00
mittorn
2d5682958d Update engine 2016-01-30 15:38:13 +00:00
mittorn
8ce7db0ff0 Update submodule 2016-01-22 11:33:12 +00:00
mittorn
d58289ca78 Update submodule 2016-01-22 11:00:53 +00:00
mittorn
6a296232bc Fix makepak on travis, add tegra2 and armv5 builds 2016-01-22 09:09:43 +00:00
mittorn
2f11dd22ec thumb mode 2016-01-22 09:08:49 +00:00
mittorn
28702daccc Try fix gamepad keys 2016-01-22 08:28:38 +00:00
mittorn
eb1305dbd8 Update engine 2016-01-21 19:52:24 +00:00
mittorn
f70a1d626e Update submodules 2016-01-20 13:03:37 +00:00
mittorn
ee0d139844 Update engine 2016-01-19 20:21:16 +00:00
mittorn
9279cedba4 Update scripts 2016-01-18 17:07:52 +00:00
mittorn
c6533d40f9 Update gen-version.sh 2016-01-18 16:48:37 +00:00
mittorn
4cf64fb370 Update .travis.yml 2016-01-18 16:45:24 +00:00
mittorn
19fc0b3a36 Fix wrong repo uri 2016-01-18 16:41:57 +00:00
mittorn
aa327eae4b Update manifest 2016-01-18 16:41:12 +00:00
mittorn
53c109cda0 Update submodules 2016-01-18 16:36:41 +00:00
mittorn
7bb46ec007 Update xash-extras 2016-01-18 16:09:48 +00:00
a1batross
dafb85eca9 Update about dialog 2016-01-16 14:58:49 +03:00
a1batross
d513081356 Remove MobileTouchControls submodule 2016-01-16 14:17:30 +03:00
a1batross
1972cd8d5f Merge beloko-drop branch 2016-01-16 13:20:59 +03:00
mittorn
b09bc7d82f Add vibration permission to test manifest 2015-12-30 02:56:06 +06:00
a1batross
6306424102 Fix crash 2015-12-30 02:55:19 +06:00
a1batross
fd4695bfbe Add vibration support and swap next/prev weapon
Conflicts:
	assets/next_weap.png
	assets/prev_weap.png
	src/org/libsdl/app/SDLActivity.java
2015-12-30 02:53:07 +06:00
mittorn
38ab0d7325 Drop unneeded resources 2015-12-30 01:09:22 +06:00
mittorn
91cc1af64c Update java part. InstallReceiver, env, verbump 2015-12-30 00:58:35 +06:00
mittorn
34c0b256f6 Update pak version 2015-12-22 01:29:30 +06:00
mittorn
d2f80c14f9 Add xash-extras submodule 2015-12-22 01:28:15 +06:00
mittorn
3b74455dcb Shortcuts improvements 2015-12-20 18:52:09 +06:00
mittorn
073e43a5a4 Skip .git in pak 2015-12-20 17:39:19 +06:00
mittorn
bee8f590a3 Add pak utils 2015-12-20 17:19:32 +06:00
mittorn
cd89009d6b Initial beloko drop-out, add extras envs 2015-12-20 16:39:56 +06:00
mittorn
44279c195f PAK support 2015-12-18 02:34:09 +06:00
a1batross
39c4cfdf81 Fix crash 2015-12-09 00:45:19 +03:00
a1batross
7dfb65760d Add vibration support and swap next/prev weapon 2015-12-06 13:06:26 +03:00
a1batross
aa3e0b7416 Bump to version 0.16.1 2015-11-10 23:17:34 +03:00
a1batross
35cd2cbd63 Update submodules, use hlsdk-client now 2015-11-10 21:16:22 +03:00
Alibek Omarov
6331313d67 Merge pull request #47 from SDLash3D/temp
Launcher and shortcut improvements
2015-11-10 21:13:22 +03:00
mittorn
f8a0acd776 Improvements in launcher and shortcuts 2015-11-08 01:09:57 +06:00
a1batross
0e3e1d8af9 Remove unused line 2015-10-13 03:44:23 +07:00
a1batross
56c06d7c01 Update buildscripts and manifest(set debuggable to false) 2015-10-13 03:43:51 +07:00
a1batross
293805c657 Remove unused line 2015-10-10 22:37:58 +03:00
a1batross
19b2fb76f7 Update buildscripts and manifest(set debuggable to false) 2015-10-10 22:37:09 +03:00
a1batross
561c0d8264 Update submodules, again 2015-10-10 22:34:31 +03:00
a1batross
6c1f867b55 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project 2015-10-06 21:53:31 +03:00
a1batross
99ff4934c6 Update modules 2015-10-06 21:53:20 +03:00
Alibek Omarov
abf0f9df5e Merge pull request #40 from SDLash3D/temp
Update android project
2015-10-06 21:50:41 +03:00
Alibek Omarov
4322764fe2 Update .travis.yml 2015-10-04 12:24:31 +03:00
a1batross
ef278d80a2 0.16 is coming 2015-10-03 23:47:45 +03:00
a1batross
c613a1368d Update submodules 2015-10-03 23:47:14 +03:00
mittorn
30ba1d301b Android project version bump 2015-09-30 02:53:08 +07:00
mittorn
26e6eef233 Update version info, disable buggy fullscreen on 2.3 2015-09-23 00:44:39 +07:00
mittorn
19b5ac81a3 Add volume keys switch, fix recent bugs 2015-09-10 08:30:17 +07:00
a1batross
5bda511154 It's a minimal API when there is no errors in AndroidManifest. Also, with this it works on Android 2.3 2015-09-08 21:27:55 +03:00
mittorn
1f330cb1a8 Revert recent changes, do not unpack assets, disable path check 2015-09-08 00:59:55 +07:00
a1batross
1e2d82ee5d Update xash3d submodule 2015-09-06 14:50:44 +03:00
a1batross
e8d98a5d71 Move project to git-submodules 2015-09-06 12:45:59 +03:00
mittorn
f0fd46bb60 Change controls assets path, add path checks 2015-09-06 06:08:53 +07:00
mittorn
556a814f7c Disable wheapon wheel, enable mouse buttons 2015-09-06 05:15:06 +07:00
mittorn
98d60887b2 Fix icons in TouchControlsEditing 2015-09-05 02:14:52 +07:00
mittorn
82c24fc4cb Move controls assets and settings to gamedir/controls 2015-09-05 01:51:13 +07:00
mittorn
d1252c9a91 Check game.ico after icon.png 2015-09-04 21:06:00 +07:00
mittorn
2b65b71538 Allow start ShortcutActivity from launcher 2015-09-04 20:55:37 +07:00
mittorn
b4ead9c0ac try icon.png first 2015-09-04 19:38:05 +07:00
mittorn
1b894336fc Implement icon loading 2015-09-03 03:52:21 +07:00
mittorn
bf0a8bf50a Add scroll to see all launcher activity context 2015-09-03 03:51:26 +07:00
Alibek Omarov
fb70702f02 Merge pull request #20 from mittorn/master
Global config
2015-08-28 17:30:28 +03:00
mittorn
7b28ad7e28 Fix layout in holo 2015-08-27 02:27:14 +07:00
mittorn
d720e327c9 Global config 2015-08-27 01:46:46 +07:00
Alibek Omarov
b0140727cc Merge pull request #17 from SDLash3D/improve_build
Improve build
2015-08-24 00:55:00 +06:00
mittorn
29aec91121 Fix layout 2015-08-24 00:02:59 +07:00
mittorn
dba7d531e8 Fix yandex upload paths 2015-08-24 00:02:07 +07:00
mittorn
65f6fe58b7 Build three architectures 2015-08-22 07:53:18 +07:00
mittorn
2d9d05f00e Fix spaces, add time to yandex 2015-08-20 15:59:11 +07:00
mittorn
d7c89d1d9b Fir trailing spaces in version info, add date 2015-08-20 14:30:16 +07:00
mittorn
a22678fc46 Yet another try 2015-08-20 13:53:47 +07:00
mittorn
1dda4a0468 Another try 2015-08-20 13:38:55 +07:00
mittorn
38f4a7c144 Fix version information in holo theme 2015-08-20 13:13:01 +07:00
mittorn
a04843e766 Add git versions to about dialog 2015-08-20 12:28:00 +07:00
mittorn
09be317894 Upload to transfer.sh and disable non-arm build 2015-08-20 01:34:33 +07:00
mittorn
80621be0b1 Add overrides for NDK's setup.mk 2015-08-20 01:22:32 +07:00
mittorn
432432adc1 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project 2015-08-19 23:15:54 +07:00
mittorn
c2d7ae230c Handle all key events as keyboard 2015-08-19 22:09:14 +07:00
a1batross
6af532e3b3 Add about page, refactor LauncherActivity, remove unused strings and translations 2015-08-16 22:52:54 +06:00
mittorn
f0275dcc92 New intent filter 2015-08-15 04:38:05 +07:00
mittorn
b634582701 Some cosmetical changes 2015-08-13 01:43:09 +07:00
mittorn
545f14a8b6 Update Application.mk 2015-08-12 23:07:07 +07:00
a1batross
7dbe0f8c89 Use short hashsum 2015-08-11 22:33:24 +06:00
a1batross
01b11823c2 Add sending builded APK to YaDisk 2015-08-11 22:20:53 +06:00
a1batross
15cb862bc2 Update travis.yml 2015-08-11 21:37:38 +06:00
a1batross
e60adf229e Fix typo 2015-08-11 21:22:39 +06:00
a1batross
ed3a634474 Fix in git clone command 2015-08-11 21:11:30 +06:00
a1batross
fb5efe3001 Buildlog limit exceeeded 4Mb. Make it more quiet 2015-08-11 21:06:12 +06:00
a1batross
c73257d155 Another try make it build 2015-08-11 20:54:22 +06:00
a1batross
fd4c08fe76 Yet Another Update .travis.yml 2015-08-11 20:45:37 +06:00
a1batross
6285b271b8 Update travis.yml 2015-08-11 20:34:25 +06:00
a1batross
e840082cb1 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project 2015-08-11 20:00:39 +06:00
a1batross
8b92060588 Fix travis build 2015-08-11 20:00:23 +06:00
Alibek Omarov
cb07de4364 Update README.md 2015-08-11 19:56:50 +06:00
a1batross
253997f228 Silent NDK unpacking 2015-08-11 19:53:03 +06:00
a1batross
2680c60215 Add Travis badge 2015-08-11 19:47:06 +06:00
a1batross
2a465e2ee6 Add Travis CI support 2015-08-11 19:44:12 +06:00
Alibek Omarov
837c384e86 Merge pull request #14 from mittorn/android-test-0.15pre
Android test 0.15pre
2015-08-11 18:11:44 +06:00
mittorn
5b30cf5bc2 Add test build files 2015-07-26 23:26:07 +07:00
mittorn
e87ac3da81 Fix layout 2015-07-26 01:58:21 +06:00
mittorn
b20e90ea24 Add shortcut activity and library mods support 2015-07-26 01:30:00 +06:00
mittorn
fa72090ea1 Use shared prefs and setenv 2015-07-24 06:56:03 +06:00
mittorn
56670e9015 Update layout 2015-07-24 03:58:04 +06:00
Alibek Omarov
beb1dd4838 Merge pull request #6 from SDLash3D/sdl_macro
Sdl macro
2015-06-17 17:03:20 +06:00
mittorn
71a667effe Enable XASH_SDL by default 2015-06-16 22:45:30 +07:00
mittorn
7896fc7ea7 Add x86 optimisations and switch arm ABI to hard-float 2015-06-16 22:06:19 +07:00
mittorn
4c554937a0 Enable optimisations 2015-06-12 18:23:50 +07:00
mittorn
ec977e1307 Enable touch controls 2015-06-12 16:42:36 +07:00
mittorn
94f416ec20 Enable resize and get arguments in XashActivity 2015-06-12 14:32:47 +07:00
mittorn
f65e60703f New activity based on SDLActivity 2015-06-11 14:30:34 +07:00
Alibek Omarov
b47b51e804 Update README.md 2015-05-31 14:59:25 +06:00
Alibek Omarov
06a0f792ff Update README.md 2015-05-31 14:58:37 +06:00
Alibek Omarov
9051f59c57 v0.14.1 2015-05-26 21:51:28 +06:00
Alibek Omarov
e3333ab578 Fix installing on some devices 2015-05-26 21:51:08 +06:00
Alibek Omarov
2a3e142b7f Update version number to 0.14 2015-05-26 17:37:40 +06:00
Alibek Omarov
9fd3917216 Touch controls icon pack by @Nicknekit 2015-05-26 00:25:07 +06:00
Alibek Omarov
017797a668 Launcher (command line arguments) 2015-05-26 00:11:50 +06:00
mittorn
c9e93071c2 Add command line, fix typo, fix build with sdk13 2015-05-25 02:52:29 +07:00
mittorn
08f1b882c8 Merge branch 'master' of https://github.com/SDLash3D/xash3d-android-project 2015-05-25 00:25:47 +07:00
mittorn
39176afce4 Rework Makefiles, enable optimisations, fix links 2015-05-25 00:20:18 +07:00
Alibek Omarov
e6eba27bf5 Disable accelerometer 2015-05-24 14:26:44 +06:00
Alibek Omarov
fe836000cf Delete not needed file, now it compiles 2015-05-23 19:57:00 +06:00
Alibek Omarov
7615914e86 CRLF to LF on all files 2015-05-22 20:59:49 +06:00
Alibek Omarov
58295431a0 Merge pull request #2 from emileb/master
Touch screen additions
2015-05-22 20:41:01 +06:00
Emile Belanger
23f4f980ee Fixed backspace? 2015-05-20 18:00:28 +01:00
Emile Belanger
0bcc0db03f Fixes 2015-05-20 14:42:43 +01:00
Emile Belanger
6418df976c test 2015-05-19 17:56:53 +01:00
Emile Belanger
de3442951d Now uses touchcontrols for all input, no SDL 2015-05-19 17:54:29 +01:00
Emile Belanger
c9c7c268d0 Added Touchscreen control by Emile Belanger 2015-05-19 10:42:14 +01:00
Alibek Omarov
69974c6bf9 Merge pull request #1 from mittorn/master
Remove gamepad hack from SDLActivity
2015-04-30 14:56:44 +06:00
mittorn
ca61f79c07 Fix space with hardware keyboard 2015-04-30 02:46:17 +07:00
mittorn
2621404695 Clean keyboard code 2015-04-28 22:29:01 +00:00
mittorn
0e99d0f280 Merge pull request #1 from SDLash3D/master
Fix freeze after unlock
2015-04-26 19:30:25 +00:00
Alibek Omarov
a20e57ba59 Fix freeze after unlock 2015-04-26 21:04:15 +06:00
Alibek Omarov
fe39a90089 Parallel Make; set -gdwarf-3 for gdb 2015-04-17 20:17:05 +06:00
Alibek Omarov
3f42c7f914 Change version to 0.12 2015-04-17 20:16:02 +06:00
Alibek Omarov
68fb5fc4bc Disable not needed dependency: SDL_image 2015-04-17 20:15:44 +06:00
Alibek Omarov
f2dbcd9532 Change icon 2015-04-17 20:14:06 +06:00
Alibek Omarov
acbd370168 Add README 2015-04-04 22:27:09 +06:00
Alibek Omarov
6501b40644 First blood 2015-04-04 22:20:20 +06:00
525 changed files with 52467 additions and 32827 deletions

28
.builds/alpine.yml Normal file
View File

@@ -0,0 +1,28 @@
image: alpine/latest
packages:
- build-base
- sdl2-dev
- freetype-dev
- fontconfig-dev
- opus-dev
- bzip2-dev
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
./waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-alpine-amd64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-alpine-amd64.tar.bz2

31
.builds/debian-arm64.yml Normal file
View File

@@ -0,0 +1,31 @@
image: debian/sid
arch: amd64
packages:
- build-essential
- python-is-python3
- libsdl2-dev
- libfreetype-dev
- libfontconfig-dev
- libopus-dev
- libbz2-dev
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
./waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-debian-arm64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-debian-arm64.tar.bz2

30
.builds/debian.yml Normal file
View File

@@ -0,0 +1,30 @@
image: debian/sid
packages:
- build-essential
- python-is-python3
- libsdl2-dev
- libfreetype-dev
- libfontconfig-dev
- libopus-dev
- libbz2-dev
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
./waf configure -8 --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
./waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-debian-amd64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-debian-amd64.tar.bz2

30
.builds/freebsd.yml Normal file
View File

@@ -0,0 +1,30 @@
image: freebsd/latest
packages:
- lang/python
- devel/pkgconf
- devel/sdl20
- print/freetype2
- x11-fonts/fontconfig
- audio/opus
- archivers/bzip2
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
./waf configure --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
./waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-freebsd-amd64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-freebsd-amd64.tar.bz2

30
.builds/netbsd.yml Normal file
View File

@@ -0,0 +1,30 @@
image: netbsd/latest
packages:
- python311
- SDL2
- freetype2
- fontconfig
- libopus
- pkgconf
- bzip2
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
python3.11 waf configure --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
python3.11 waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-netbsd-amd64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-netbsd-amd64.tar.bz2

27
.builds/openbsd.yml Normal file
View File

@@ -0,0 +1,27 @@
image: openbsd/latest
packages:
- python3
- sdl2
- opus
- bzip2
sources:
- https://git.sr.ht/~a1batross/xash3d-fwgs
tasks:
- client: |
cd xash3d-fwgs
python3 waf configure --enable-tests --enable-engine-tests build install --destdir=bin
- server: |
cd xash3d-fwgs
python3 waf configure --reconfigure --dedicated build install --destdir=bin
- run-tests: |
cd xash3d-fwgs/bin
export SDL_VIDEODRIVER=wayland
./xash3d -runtests
./xash -runtests
rm -rf valve/gameinfo.txt test_*
- package: |
cd xash3d-fwgs/bin
tar -cjvf xash3d-fwgs-openbsd-amd64.tar.bz2 *
artifacts:
- xash3d-fwgs/bin/xash3d-fwgs-openbsd-amd64.tar.bz2

View File

@@ -1,34 +1,22 @@
task:
name: freebsd-12-amd64
freebsd_instance:
image_family: freebsd-12-3
setup_script:
- pkg update
- pkg install -y git sdl2 python fontconfig
- git submodule update --init --recursive
test_script:
- ./scripts/cirrus/build_freebsd.sh dedicated
- ./scripts/cirrus/build_freebsd.sh full
task:
name: freebsd-13-amd64
freebsd_instance:
image_family: freebsd-13-1
setup_script:
- pkg update
- pkg install -y git sdl2 python fontconfig
- git submodule update --init --recursive
test_script:
- ./scripts/cirrus/build_freebsd.sh dedicated
- ./scripts/cirrus/build_freebsd.sh full
task:
name: freebsd-14-amd64
freebsd_instance:
image_family: freebsd-14-0-snap
image_family: freebsd-14-2
setup_script:
- pkg update
- pkg install -y git sdl2 python fontconfig
- pkg install -y pkgconf git sdl2 python fontconfig libvorbis opusfile bzip2 libbacktrace
- git submodule update --init --recursive
test_script:
- ./scripts/cirrus/build_freebsd.sh dedicated
- ./scripts/cirrus/build_freebsd.sh full
task:
name: freebsd-15-amd64
freebsd_instance:
image_family: freebsd-15-0-snap
setup_script:
- pkg update
- pkg install -y pkgconf git sdl2 python fontconfig libvorbis opusfile bzip2 libbacktrace
- git submodule update --init --recursive
test_script:
- ./scripts/cirrus/build_freebsd.sh dedicated

View File

@@ -1,9 +1,365 @@
# EditorConfig is awesome: https://EditorConfig.org
# this file is just a suggestion, you might follow it, you might not
root = true
[*]
charset = latin1
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
[*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}]
# Visual C++ Formatting settings
cpp_indent_braces = false
cpp_indent_multi_line_relative_to = innermost_parenthesis
cpp_indent_within_parentheses = indent
cpp_indent_preserve_within_parentheses = true
cpp_indent_case_contents = true
cpp_indent_case_labels = false
cpp_indent_case_contents_when_block = false
cpp_indent_lambda_braces_when_parameter = true
cpp_indent_goto_labels = one_left
cpp_indent_preprocessor = leftmost_column
cpp_indent_access_specifiers = false
cpp_indent_namespace_contents = true
cpp_indent_preserve_comments = false
cpp_new_line_before_open_brace_namespace = new_line
cpp_new_line_before_open_brace_type = new_line
cpp_new_line_before_open_brace_function = new_line
cpp_new_line_before_open_brace_block = new_line
cpp_new_line_before_open_brace_lambda = new_line
cpp_new_line_scope_braces_on_separate_lines = true
cpp_new_line_close_brace_same_line_empty_type = false
cpp_new_line_close_brace_same_line_empty_function = false
cpp_new_line_before_catch = true
cpp_new_line_before_else = true
cpp_new_line_before_while_in_do_while = false
cpp_space_before_function_open_parenthesis = remove
cpp_space_within_parameter_list_parentheses = true
cpp_space_between_empty_parameter_list_parentheses = true
cpp_space_after_keywords_in_control_flow_statements = false
cpp_space_within_control_flow_statement_parentheses = true
cpp_space_before_lambda_open_parenthesis = false
cpp_space_within_cast_parentheses = false
cpp_space_after_cast_close_parenthesis = false
cpp_space_within_expression_parentheses = true
cpp_space_before_block_open_brace = true
cpp_space_between_empty_braces = true
cpp_space_before_initializer_list_open_brace = false
cpp_space_within_initializer_list_braces = true
cpp_space_preserve_in_initializer_list = true
cpp_space_before_open_square_bracket = false
cpp_space_within_square_brackets = false
cpp_space_before_empty_square_brackets = false
cpp_space_between_empty_square_brackets = false
cpp_space_group_square_brackets = true
cpp_space_within_lambda_brackets = false
cpp_space_between_empty_lambda_brackets = false
cpp_space_before_comma = false
cpp_space_after_comma = true
cpp_space_remove_around_member_operators = true
cpp_space_before_inheritance_colon = true
cpp_space_before_constructor_colon = true
cpp_space_remove_before_semicolon = true
cpp_space_after_semicolon = true
cpp_space_remove_around_unary_operator = true
cpp_space_around_binary_operator = insert
cpp_space_around_assignment_operator = insert
cpp_space_pointer_reference_alignment = right
cpp_space_around_ternary_operator = insert
cpp_use_unreal_engine_macro_formatting = true
cpp_wrap_preserve_blocks = one_liners
# IDEA settings
ij_c_add_brief_tag = false
ij_c_add_getter_prefix = true
ij_c_add_setter_prefix = true
ij_c_align_dictionary_pair_values = false
ij_c_align_group_field_declarations = false
ij_c_align_init_list_in_columns = true
ij_c_align_multiline_array_initializer_expression = false
ij_c_align_multiline_assignment = false
ij_c_align_multiline_binary_operation = false
ij_c_align_multiline_chained_methods = false
ij_c_align_multiline_for = true
ij_c_align_multiline_ternary_operation = false
ij_c_array_initializer_comma_on_next_line = false
ij_c_array_initializer_new_line_after_left_brace = false
ij_c_array_initializer_right_brace_on_new_line = false
ij_c_array_initializer_wrap = off
ij_c_assignment_wrap = off
ij_c_binary_operation_sign_on_next_line = false
ij_c_binary_operation_wrap = off
ij_c_blank_lines_after_class_header = 0
ij_c_blank_lines_after_imports = 1
ij_c_blank_lines_around_class = 1
ij_c_blank_lines_around_field = 0
ij_c_blank_lines_around_field_in_interface = 0
ij_c_blank_lines_around_method = 1
ij_c_blank_lines_around_method_in_interface = 1
ij_c_blank_lines_around_namespace = 0
ij_c_blank_lines_around_properties_in_declaration = 0
ij_c_blank_lines_around_properties_in_interface = 0
ij_c_blank_lines_before_imports = 1
ij_c_blank_lines_before_method_body = 0
ij_c_block_brace_placement = next_line
ij_c_block_brace_style = next_line
ij_c_block_comment_at_first_column = true
ij_c_catch_on_new_line = false
ij_c_class_brace_style = next_line
ij_c_class_constructor_init_list_align_multiline = true
ij_c_class_constructor_init_list_comma_on_next_line = false
ij_c_class_constructor_init_list_new_line_after_colon = never
ij_c_class_constructor_init_list_new_line_before_colon = if_long
ij_c_class_constructor_init_list_wrap = normal
ij_c_copy_is_deep = false
ij_c_create_interface_for_categories = true
ij_c_declare_generated_methods = true
ij_c_description_include_member_names = true
ij_c_discharged_short_ternary_operator = false
ij_c_do_not_add_breaks = false
ij_c_do_while_brace_force = never
ij_c_else_on_new_line = false
ij_c_enum_constants_comma_on_next_line = false
ij_c_enum_constants_wrap = off
ij_c_for_brace_force = never
ij_c_for_statement_new_line_after_left_paren = false
ij_c_for_statement_right_paren_on_new_line = false
ij_c_for_statement_wrap = off
ij_c_function_brace_placement = next_line
ij_c_function_call_arguments_align_multiline = true
ij_c_function_call_arguments_align_multiline_pars = false
ij_c_function_call_arguments_comma_on_next_line = false
ij_c_function_call_arguments_new_line_after_lpar = false
ij_c_function_call_arguments_new_line_before_rpar = false
ij_c_function_call_arguments_wrap = normal
ij_c_function_non_top_after_return_type_wrap = normal
ij_c_function_parameters_align_multiline = true
ij_c_function_parameters_align_multiline_pars = false
ij_c_function_parameters_comma_on_next_line = false
ij_c_function_parameters_new_line_after_lpar = false
ij_c_function_parameters_new_line_before_rpar = false
ij_c_function_parameters_wrap = normal
ij_c_function_top_after_return_type_wrap = normal
ij_c_generate_additional_eq_operators = true
ij_c_generate_additional_rel_operators = true
ij_c_generate_class_constructor = true
ij_c_generate_comparison_operators_use_std_tie = false
ij_c_generate_instance_variables_for_properties = ask
ij_c_generate_operators_as_members = true
ij_c_header_guard_style_pattern = ${PROJECT_NAME}_${FILE_NAME}_${EXT}
ij_c_if_brace_force = never
ij_c_in_line_short_ternary_operator = true
ij_c_indent_block_comment = true
ij_c_indent_c_struct_members = 4
ij_c_indent_case_from_switch = true
ij_c_indent_class_members = 4
ij_c_indent_directive_as_code = false
ij_c_indent_implementation_members = 0
ij_c_indent_inside_code_block = 4
ij_c_indent_interface_members = 0
ij_c_indent_interface_members_except_ivars_block = false
ij_c_indent_namespace_members = 4
ij_c_indent_preprocessor_directive = 0
ij_c_indent_visibility_keywords = 0
ij_c_insert_override = true
ij_c_insert_virtual_with_override = false
ij_c_introduce_auto_consts = false
ij_c_introduce_auto_vars = false
ij_c_introduce_const_params = false
ij_c_introduce_const_vars = false
ij_c_introduce_constexpr_consts = false
ij_c_introduce_generate_property = false
ij_c_introduce_generate_synthesize = true
ij_c_introduce_globals_to_header = true
ij_c_introduce_prop_to_private_category = false
ij_c_introduce_static_consts = true
ij_c_introduce_use_ns_types = false
ij_c_ivars_prefix = _
ij_c_ivars_suffix =
ij_c_keep_blank_lines_before_end = 2
ij_c_keep_blank_lines_before_right_brace = 2
ij_c_keep_blank_lines_in_code = 2
ij_c_keep_blank_lines_in_declarations = 2
ij_c_keep_case_expressions_in_one_line = false
ij_c_keep_control_statement_in_one_line = false
ij_c_keep_directive_at_first_column = true
ij_c_keep_first_column_comment = false
ij_c_keep_line_breaks = true
ij_c_keep_nested_namespaces_in_one_line = false
ij_c_keep_simple_blocks_in_one_line = false
ij_c_keep_simple_methods_in_one_line = false
ij_c_keep_structures_in_one_line = false
ij_c_lambda_capture_list_align_multiline = false
ij_c_lambda_capture_list_align_multiline_bracket = false
ij_c_lambda_capture_list_comma_on_next_line = false
ij_c_lambda_capture_list_new_line_after_lbracket = false
ij_c_lambda_capture_list_new_line_before_rbracket = false
ij_c_lambda_capture_list_wrap = off
ij_c_line_comment_add_space = false
ij_c_line_comment_at_first_column = true
ij_c_method_brace_placement = end_of_line
ij_c_method_call_arguments_align_by_colons = true
ij_c_method_call_arguments_align_multiline = false
ij_c_method_call_arguments_special_dictionary_pairs_treatment = true
ij_c_method_call_arguments_wrap = off
ij_c_method_call_chain_wrap = off
ij_c_method_parameters_align_by_colons = true
ij_c_method_parameters_align_multiline = false
ij_c_method_parameters_wrap = off
ij_c_namespace_brace_placement = next_line
ij_c_parentheses_expression_new_line_after_left_paren = false
ij_c_parentheses_expression_right_paren_on_new_line = false
ij_c_place_assignment_sign_on_next_line = false
ij_c_property_nonatomic = true
ij_c_put_ivars_to_implementation = true
ij_c_refactor_compatibility_aliases_and_classes = true
ij_c_refactor_properties_and_ivars = true
ij_c_release_style = ivar
ij_c_retain_object_parameters_in_constructor = true
ij_c_semicolon_after_method_signature = false
ij_c_shift_operation_align_multiline = true
ij_c_shift_operation_wrap = normal
ij_c_show_non_virtual_functions = false
ij_c_space_after_colon = true
ij_c_space_after_colon_in_foreach = true
ij_c_space_after_colon_in_selector = false
ij_c_space_after_comma = true
ij_c_space_after_cup_in_blocks = false
ij_c_space_after_dictionary_literal_colon = true
ij_c_space_after_for_semicolon = true
ij_c_space_after_init_list_colon = true
ij_c_space_after_method_parameter_type_parentheses = false
ij_c_space_after_method_return_type_parentheses = false
ij_c_space_after_pointer_in_declaration = false
ij_c_space_after_quest = true
ij_c_space_after_reference_in_declaration = false
ij_c_space_after_reference_in_rvalue = false
ij_c_space_after_structures_rbrace = true
ij_c_space_after_superclass_colon = true
ij_c_space_after_type_cast = false
ij_c_space_after_visibility_sign_in_method_declaration = true
ij_c_space_before_autorelease_pool_lbrace = true
ij_c_space_before_catch_keyword = true
ij_c_space_before_catch_left_brace = true
ij_c_space_before_catch_parentheses = false
ij_c_space_before_category_parentheses = true
ij_c_space_before_chained_send_message = true
ij_c_space_before_class_left_brace = true
ij_c_space_before_colon = true
ij_c_space_before_colon_in_foreach = true
ij_c_space_before_comma = false
ij_c_space_before_dictionary_literal_colon = true
ij_c_space_before_do_left_brace = true
ij_c_space_before_else_keyword = true
ij_c_space_before_else_left_brace = true
ij_c_space_before_export_lbrace = true
ij_c_space_before_for_left_brace = true
ij_c_space_before_for_parentheses = false
ij_c_space_before_for_semicolon = false
ij_c_space_before_if_left_brace = true
ij_c_space_before_if_parentheses = false
ij_c_space_before_init_list = false
ij_c_space_before_init_list_colon = true
ij_c_space_before_method_call_parentheses = false
ij_c_space_before_method_left_brace = true
ij_c_space_before_method_parentheses = false
ij_c_space_before_namespace_lbrace = true
ij_c_space_before_pointer_in_declaration = true
ij_c_space_before_property_attributes_parentheses = false
ij_c_space_before_protocols_brackets = true
ij_c_space_before_quest = true
ij_c_space_before_reference_in_declaration = true
ij_c_space_before_superclass_colon = true
ij_c_space_before_switch_left_brace = true
ij_c_space_before_switch_parentheses = false
ij_c_space_before_template_call_lt = false
ij_c_space_before_template_declaration_lt = true
ij_c_space_before_try_left_brace = true
ij_c_space_before_while_keyword = true
ij_c_space_before_while_left_brace = true
ij_c_space_before_while_parentheses = false
ij_c_space_between_adjacent_brackets = false
ij_c_space_between_operator_and_punctuator = false
ij_c_space_within_empty_array_initializer_braces = true
ij_c_spaces_around_additive_operators = true
ij_c_spaces_around_assignment_operators = true
ij_c_spaces_around_bitwise_operators = true
ij_c_spaces_around_equality_operators = true
ij_c_spaces_around_lambda_arrow = true
ij_c_spaces_around_logical_operators = true
ij_c_spaces_around_multiplicative_operators = true
ij_c_spaces_around_pm_operators = false
ij_c_spaces_around_relational_operators = true
ij_c_spaces_around_shift_operators = true
ij_c_spaces_around_unary_operator = false
ij_c_spaces_within_array_initializer_braces = true
ij_c_spaces_within_braces = false
ij_c_spaces_within_brackets = false
ij_c_spaces_within_cast_parentheses = false
ij_c_spaces_within_catch_parentheses = true
ij_c_spaces_within_category_parentheses = false
ij_c_spaces_within_empty_braces = false
ij_c_spaces_within_empty_function_call_parentheses = true
ij_c_spaces_within_empty_function_declaration_parentheses = true
ij_c_spaces_within_empty_lambda_capture_list_bracket = false
ij_c_spaces_within_empty_template_call_ltgt = false
ij_c_spaces_within_empty_template_declaration_ltgt = false
ij_c_spaces_within_for_parentheses = true
ij_c_spaces_within_function_call_parentheses = true
ij_c_spaces_within_function_declaration_parentheses = true
ij_c_spaces_within_if_parentheses = true
ij_c_spaces_within_lambda_capture_list_bracket = false
ij_c_spaces_within_method_parameter_type_parentheses = false
ij_c_spaces_within_method_return_type_parentheses = false
ij_c_spaces_within_parentheses = true
ij_c_spaces_within_property_attributes_parentheses = false
ij_c_spaces_within_protocols_brackets = false
ij_c_spaces_within_send_message_brackets = false
ij_c_spaces_within_structured_binding_list_bracket = false
ij_c_spaces_within_switch_parentheses = true
ij_c_spaces_within_template_call_ltgt = false
ij_c_spaces_within_template_declaration_ltgt = false
ij_c_spaces_within_template_double_gt = false
ij_c_spaces_within_while_parentheses = true
ij_c_special_else_if_treatment = true
ij_c_structured_binding_list_align_multiline = false
ij_c_structured_binding_list_align_multiline_bracket = false
ij_c_structured_binding_list_comma_on_next_line = false
ij_c_structured_binding_list_new_line_after_lbracket = false
ij_c_structured_binding_list_new_line_before_rbracket = false
ij_c_structured_binding_list_wrap = off
ij_c_superclass_list_after_colon = never
ij_c_superclass_list_align_multiline = true
ij_c_superclass_list_before_colon = if_long
ij_c_superclass_list_comma_on_next_line = false
ij_c_superclass_list_wrap = on_every_item
ij_c_tag_prefix_of_block_comment = at
ij_c_tag_prefix_of_line_comment = back_slash
ij_c_template_call_arguments_align_multiline = false
ij_c_template_call_arguments_align_multiline_pars = false
ij_c_template_call_arguments_comma_on_next_line = false
ij_c_template_call_arguments_new_line_after_lt = false
ij_c_template_call_arguments_new_line_before_gt = false
ij_c_template_call_arguments_wrap = off
ij_c_template_declaration_function_body_indent = false
ij_c_template_declaration_function_wrap = split_into_lines
ij_c_template_declaration_struct_body_indent = false
ij_c_template_declaration_struct_wrap = split_into_lines
ij_c_template_parameters_align_multiline = false
ij_c_template_parameters_align_multiline_pars = false
ij_c_template_parameters_comma_on_next_line = false
ij_c_template_parameters_new_line_after_lt = false
ij_c_template_parameters_new_line_before_gt = false
ij_c_template_parameters_wrap = off
ij_c_ternary_operation_signs_on_next_line = false
ij_c_ternary_operation_wrap = off
ij_c_type_qualifiers_placement = before
ij_c_use_modern_casts = true
ij_c_use_setters_in_constructor = true
ij_c_while_brace_force = never
ij_c_while_on_new_line = false
ij_c_wrap_property_declaration = off

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/donate.md

View File

@@ -21,17 +21,28 @@ jobs:
- os: ubuntu-20.04
targetos: linux
targetarch: i386
- os: ubuntu-20.04
targetos: linux
targetarch: arm64
cross: true
- os: ubuntu-20.04
targetos: linux
targetarch: armhf
cross: true
- os: ubuntu-20.04
targetos: linux
targetarch: riscv64
cross: true
- os: ubuntu-20.04
targetos: linux
targetarch: ppc64el
cross: true
# - os: ubuntu-aarch64-20.04
# targetos: linux
# targetarch: aarch64
# - os: ubuntu-20.04
# targetos: android
# targetarch: 32
# - os: ubuntu-20.04
# targetos: android
# targetarch: 64
- os: ubuntu-20.04
targetos: android
targetarch: multiarch
# - os: ubuntu-20.04
# targetos: motomagx
# targetarch: armv6
@@ -45,84 +56,86 @@ jobs:
- os: windows-latest
targetos: win32
targetarch: amd64
- os: windows-latest
- os: windows-2019 # always use the oldest possible for 32-bit because of older compilers, and better support of certain legacy OSes
targetos: win32
targetarch: i386
- os: macos-14 # arm64 as per github documentation
targetos: apple
targetarch: arm64
- os: macos-13 # x86 as per github documentation (will they fix it before they deprecate this version?..)
targetos: apple
targetarch: amd64
env:
SDL_VERSION: 2.28.1
SDL_VERSION: 2.30.12
GH_CPU_ARCH: ${{ matrix.targetarch }}
ANDROID_SDK_TOOLS_VER: 4333796
GH_CROSSCOMPILING: ${{ matrix.cross }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: bash scripts/gha/deps_${{ matrix.targetos }}.sh
- name: Build engine
env:
FWGS_PFX_PASSWORD: ${{ secrets.FWGS_PFX_PASSWORD }}
run: bash scripts/gha/build_${{ matrix.targetos }}.sh
- name: Upload engine (artifacts)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/*
flatpak:
name: "Flatpak"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- app: su.xash.Engine.Compat.i386
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build flatpak (Compat.i386)
uses: FWGS/flatpak-github-actions/flatpak-builder@v6.1
uses: FWGS/flatpak-github-actions/flatpak-builder@v6.3-fix
with:
bundle: ${{ matrix.app }}.flatpak
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
- name: Upload engine (artifacts)
uses: actions/upload-artifact@v3
with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/*
release:
name: "Upload releases"
runs-on: ubuntu-latest
needs: [build, flatpak]
if: ${{ github.event_name == 'push' }}
steps:
- name: Remove old release
uses: FWGS/delete-tag-and-release@v0.2.1-dev
with:
tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
delete_release: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch artifacts
uses: actions/download-artifact@v3.0.1
with:
path: artifacts/
- name: Repackage binaries and allow GitHub to process removed release for few seconds
- name: Remove old release, fetch artifacts, repackage binaries and upload new release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
run: |
cd artifacts/
for i in artifact-* su.xash.Engine.*; do
gh release delete "$RELEASE_TAG" \
--yes \
--cleanup-tag \
--repo "$GITHUB_REPOSITORY" || true
gh run download "$GITHUB_RUN_ID" \
--dir artifacts/ \
--repo "$GITHUB_REPOSITORY"
pushd artifacts/
echo "Found artifacts:"
ls
for i in $(find -mindepth 1 -maxdepth 1 -type d); do
mv "$i"/* .
rm -rf "$i"
done
ls -R .
cd ../
echo "Repackaged artifacts:"
ls -R
popd
sleep 20s
- name: Upload new release
uses: FWGS/action-gh-release@v0.1.15
with:
name: Xash3D FWGS Continuous ${{ github.ref_name }} Build
tag_name: ${{ github.ref_name == 'master' && 'continuous' || format('continuous-{0}', github.ref_name) }}
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
files: artifacts/*
draft: false
gh release create "$RELEASE_TAG" artifacts/* \
--title "Xash3D FWGS Continuous ${{ github.ref_name }} Build" \
--target $GITHUB_SHA \
--repo "$GITHUB_REPOSITORY" \
--prerelease

8
.gitignore vendored
View File

@@ -54,6 +54,11 @@ CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
CMakeLists.txt*
CMakeScripts
Testing
compile_commands.json
_deps
# makedepend
Makefile.dep
*.bak
@@ -337,3 +342,6 @@ enc_temp_folder/
# KDevelop4
*.kdev4
# ccls langauge server
.ccls-*

18
.gitmodules vendored
View File

@@ -19,3 +19,21 @@
[submodule "3rdparty/xash-extras"]
path = 3rdparty/extras/xash-extras
url = https://github.com/FWGS/xash-extras
[submodule "3rdparty/bzip2/bzip2"]
path = 3rdparty/bzip2/bzip2
url = https://gitlab.com/bzip2/bzip2
[submodule "3rdparty/MultiEmulator"]
path = 3rdparty/MultiEmulator
url = https://github.com/FWGS/MultiEmulator
[submodule "3rdparty/libogg/libogg"]
path = 3rdparty/libogg/libogg
url = https://gitlab.xiph.org/xiph/ogg.git
[submodule "3rdparty/vorbis/vorbis-src"]
path = 3rdparty/vorbis/vorbis-src
url = https://gitlab.xiph.org/xiph/vorbis.git
[submodule "3rdparty/opusfile/opusfile"]
path = 3rdparty/opusfile/opusfile
url = https://gitlab.xiph.org/xiph/opusfile.git
[submodule "3rdparty/libbacktrace/libbacktrace"]
path = 3rdparty/libbacktrace/libbacktrace
url = https://github.com/ianlancetaylor/libbacktrace

1
3rdparty/MultiEmulator vendored Submodule

Submodule 3rdparty/MultiEmulator added at 7e989e670e

1
3rdparty/bzip2/bzip2 vendored Submodule

Submodule 3rdparty/bzip2/bzip2 added at 66c46b8c94

27
3rdparty/bzip2/wscript vendored Normal file
View File

@@ -0,0 +1,27 @@
#! /usr/bin/env python
# encoding: utf-8
def options(opt):
pass
def configure(conf):
conf.define('_GNU_SOURCE', 1)
conf.define('BZ_NO_STDIO', 1)
if conf.env.DEST_OS == 'win32':
conf.define('BZ_LCCWIN32', 1)
else:
conf.define('BZ_UNIX', 1)
def build(bld):
bld(features = 'subst', source = 'bzip2/bz_version.h.in', target = 'bzip2/bz_version.h', BZ_VERSION='1.1.0-fwgs', name = 'bz_version')
bz_sources = ['bzip2/blocksort.c', 'bzip2/huffman.c', 'bzip2/crctable.c', 'bzip2/randtable.c', 'bzip2/compress.c', 'bzip2/decompress.c', 'bzip2/bzlib.c']
bld.stlib(
source = bz_sources,
target = 'bzip2',
use = 'bz_version',
includes = 'bzip2/',
export_includes = 'bzip2/'
)

View File

@@ -25,5 +25,4 @@ def build(bld):
name = 'extras.pk3',
files = srcdir.ant_glob('**/*'),
relative_to = srcdir,
compresslevel = 0,
install_path = install_path)

View File

@@ -16,9 +16,7 @@ def build(bld):
bld.stlib(source = gl4es_srcdir.ant_glob(['gl/*.c', 'gl/*/*.c', 'glx/hardext.c']),
target = 'gl4es',
features = 'c',
includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'],
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'EXTERNAL_GETPROCADDRESS=GL4ES_GetProcAddress', 'NO_LOADER', 'STATICLIB'],
defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'NO_LOADER', 'STATICLIB'],
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
subsystem = bld.env.MSVC_SUBSYSTEM,
export_includes = '.')

185
3rdparty/libbacktrace/wscript vendored Normal file
View File

@@ -0,0 +1,185 @@
#! /usr/bin/env python
# encoding: utf-8
from waflib import TaskGen
FRAGMENT_ATOMIC='''int i;
int main(void) {
__atomic_load_n(&i, __ATOMIC_ACQUIRE);
__atomic_store_n(&i, 1, __ATOMIC_RELEASE);
return 0;
}'''
FRAGMENT_SYNC='''int i;
int main (void) {
__sync_bool_compare_and_swap (&i, i, i);
__sync_lock_test_and_set (&i, 1);
__sync_lock_release (&i);
return 0;
}'''
FRAGMENT_GETPAGESIZE='''#include <unistd.h>
int main(void) { return getpagesize() }'''
FRAGMENT_GETEXECNAME='''#include <stdlib.h>
int main(void) { return getexecname() != 0 }'''
FRAGMENT_STRNLEN='''#include <string.h>
int main(int argc, char **argv) { return (int)strnlen(argv[0], 10); }'''
FRAGMENT_DL_ITERATE_PHDR='''#include <%s>
int main(void) { return dl_iterate_phdr(0, 0); }'''
FRAGMENT_FCNTL='''#include <fcntl.h>
int main(void) { return fcntl(0, 0, 0); }'''
FRAGMENT_GETIPINFO='''#include "unwind.h"
struct _Unwind_Context *context;
int ip_before_insn = 0;
int main(void) { return _Unwind_GetIPInfo(context, &ip_before_insn); }'''
FRAGMENT_LOADQUERY='''#include <sys/ldr.h>
#include <sys/debug.h>
int main(void) { return loadquery(0, 0, 0); }'''
FRAGMENT_KERN_PROC='''#include <sys/sysctl.h>
#if !defined(%s) || !defined(KERN_PROC_PATHNAME)
#error
#endif
int main(void) { return 0; }'''
FRAGMENT_LSTAT='''#include <sys/stat.h>
struct stat st;
int main(int argc, char **argv) { return lstat(argv[0], &st); }'''
FRAGMENT_READLINK='''#include <unistd.h>
char buf[100];
int main(int argc, char **argv) { return readlink(argv[0], buf, sizeof(buf)); }'''
def options(opt):
pass
def configure(conf):
# add unsupported platforms here
if conf.env.DEST_OS in ['nswitch', 'psvita', 'dos']:
conf.env.DISABLE_LIBBACKTRACE = True
return
# win32 has it's own dbghelp-based backtrace, that's why we ship PDBs
if conf.env.COMPILER_CC == 'msvc':
conf.env.DISABLE_LIBBACKTRACE = True
return
if not conf.path.find_dir('libbacktrace') or not conf.path.find_dir('libbacktrace/config'):
conf.fatal('Can\'t find libbacktrace submodule. Run `git submodule update --init --recursive`.')
return
if conf.env.DEST_SIZEOF_VOID_P == 8:
conf.define('BACKTRACE_ELF_SIZE', 64)
conf.define('BACKTRACE_XCOFF_SIZE', 64)
else:
conf.define('BACKTRACE_ELF_SIZE', 32)
conf.define('BACKTRACE_XCOFF_SIZE', 32)
conf.define('_ALL_SOURCE', 1)
conf.define('_GNU_SOURCE', 1)
conf.define('_POSIX_PTHREAD_SEMANTICS', 1)
conf.define('_TANDEM_SOURCE', 1)
conf.define('__EXTENSIONS__', 1)
conf.define('_DARWIN_USE_64_BIT_INODE', 1)
conf.define('_LARGE_FILES', 1)
conf.check_large_file(compiler='c', execute=False, mandatory=False) # sets _FILE_OFFSET_BITS
conf.env.CFLAGS_EXTRAFLAGS = conf.filter_cflags(['-funwind-tables', '-g'], [])
if conf.filter_cflags(['-frandom-seed=test'], []):
conf.env.HAVE_FRANDOM_SEED = True
def check_header(hdr):
return {'header_name':hdr, 'msg':'... %s header' % hdr, 'mandatory':False, 'id':hdr}
conf.multicheck(
check_header('dlfcn.h'),
check_header('inttypes.h'),
check_header('link.h'),
check_header('sys/link.h'),
check_header('mach-o/dyld.h'),
check_header('memory.h'),
check_header('stdint.h'),
check_header('stdlib.h'),
check_header('strings.h'),
check_header('string.h'),
check_header('sys/ldr.h'),
check_header('sys/mman.h'),
check_header('sys/stat.h'),
check_header('sys/types.h'),
check_header('tlhelp32.h'),
check_header('unistd.h'),
check_header('windows.h'),
{'fragment':FRAGMENT_ATOMIC, 'msg':'... __atomic extensions', 'define_name':'HAVE_ATOMIC_FUNCTIONS', 'mandatory':False},
{'fragment':FRAGMENT_SYNC, 'msg':'... __sync extensions', 'define_name':'HAVE_SYNC_FUNCTIONS', 'mandatory':False},
{'fragment':FRAGMENT_GETPAGESIZE, 'msg':'... getpagesize function', 'define_name':'HAVE_DECL_GETPAGESIZE', 'mandatory':False},
{'fragment':FRAGMENT_STRNLEN, 'msg':'... strnlen function', 'define_name':'HAVE_DECL_STRNLEN', 'mandatory':False},
{'fragment':FRAGMENT_DL_ITERATE_PHDR % 'link.h', 'msg':'... dl_iterate_phdr function in link.h', 'define_name':'HAVE_DL_ITERATE_PHDR', 'after_tests': ['link.h'], 'mandatory':False},
{'fragment':FRAGMENT_DL_ITERATE_PHDR % 'sys/link.h', 'msg':'... dl_iterate_phdr function in sys/link.h', 'define_name':'HAVE_DL_ITERATE_PHDR', 'after_tests': ['sys/link.h'], 'mandatory':False},
{'fragment':FRAGMENT_FCNTL,'msg':'... fnctl function', 'define_name':'HAVE_FCNTL', 'mandatory':False},
{'fragment':FRAGMENT_GETEXECNAME,'msg':'... getexecname function','define_name':'HAVE_GETEXECNAME', 'mandatory':False},
{'fragment':FRAGMENT_GETIPINFO, 'msg':'... _Unwind_GetIPInfo function', 'define_name':'HAVE_GETIPINFO', 'mandatory':False},
{'fragment':FRAGMENT_KERN_PROC % 'KERN_PROC', 'msg': '... KERN_PROC and KERN_PROC_PATHNAME defines', 'define_name':'HAVE_KERN_PROC', 'mandatory':False},
{'fragment':FRAGMENT_KERN_PROC % 'KERN_PROC_ARGS', 'msg': '... KERN_PROC_ARGS and KERN_PROC_PATHNAME defines', 'define_name':'HAVE_KERN_PROC_ARGS', 'mandatory':False},
{'fragment':FRAGMENT_LOADQUERY, 'msg': '... loadquery function', 'define_name':'HAVE_LOADQUERY', 'mandatory':False},
{'fragment':FRAGMENT_LSTAT, 'msg': '... lstat function', 'define_name':'HAVE_LSTAT', 'mandatory':False},
{'fragment':FRAGMENT_READLINK, 'msg': '... readlink function', 'define_name':'HAVE_READLINK', 'mandatory':False},
# {'lib':'lzma', 'define_name':'HAVE_LIBLZMA', 'uselib_store':'lzma', 'msg':'... lzma library', 'mandatory':False},
# {'lib':'z', 'define_name':'HAVE_ZLIB', 'uselib_store':'z', 'msg':'... zlib library', 'mandatory':False},
# {'lib':'zstd', 'define_name':'HAVE_ZSTD', 'uselib_store':'zstd', 'msg':'... zstd library', 'mandatory':False},
msg='Checking for in parallel'
)
conf.write_config_header()
conf.define('BACKTRACE_SUPPORTED', 1)
conf.define('BACKTRACE_USES_MALLOC', 0)
conf.define('BACKTRACE_SUPPORTS_THREADS', 1)
conf.define('BACKTRACE_SUPPORTS_DATA', conf.env.DEST_BINFMT in ['elf', 'mac-o'])
conf.write_config_header('backtrace-supported.h')
@TaskGen.feature('frandomseed')
@TaskGen.after_method('propagate_uselib_vars')
def process_frandom_seed(ctx):
tasks = getattr(ctx, 'compiled_tasks', [])
for task in tasks:
out = task.outputs[0]
task.env.CFLAGS = list(task.env.CFLAGS) # need a copy
task.env.CFLAGS += ['-frandom-seed=%s' % out.path_from(out.ctx.bldnode)]
def build(bld):
if bld.env.DISABLE_LIBBACKTRACE:
return
# we specifically only want mmap-based allocators because calling malloc is not safe from signal handlers
sources = ['atomic.c', 'dwarf.c', 'fileline.c', 'posix.c', 'print.c', 'sort.c', 'state.c', 'backtrace.c', 'simple.c', 'mmap.c', 'mmapio.c']
if bld.env.DEST_BINFMT == 'pe':
sources += ['pecoff.c']
elif bld.env.DEST_BINFMT == 'mac-o':
sources += ['macho.c']
elif bld.env.DEST_BINFMT == 'elf':
sources += ['elf.c']
else:
sources += ['unknown.c']
task = bld.stlib(
source = ['libbacktrace/' + i for i in sources],
target = 'backtrace',
features = 'frandomseed' if bld.env.HAVE_FRANDOM_SEED else '',
use = 'EXTRAFLAGS lzma z zstd',
includes = '. libbacktrace/',
export_defines = 'HAVE_LIBBACKTRACE=1',
export_includes = 'libbacktrace/'
)

1
3rdparty/libogg/libogg vendored Submodule

Submodule 3rdparty/libogg/libogg added at 7cf42ea17a

50
3rdparty/libogg/wscript vendored Normal file
View File

@@ -0,0 +1,50 @@
#! /usr/bin/env python
# encoding: utf-8
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('libogg') or not conf.path.find_dir('libogg/src'):
conf.fatal('Can\'t find libogg submodule. Run `git submodule update --init --recursive`.')
return
conf.env.INCLUDE_INTTYPES_H = 0
conf.env.INCLUDE_SYS_TYPES_H = 0
conf.env.INCLUDE_STDINT_H = 0
if conf.check_cc(header_name='inttypes.h', mandatory = False):
conf.env.INCLUDE_INTTYPES_H = 1
elif conf.check_cc(header_name='sys/types.h', mandatory = False):
conf.env.INCLUDE_SYS_TYPES_H = 1
elif conf.check_cc(header_name='stdint.h', mandatory = False):
conf.env.INCLUDE_STDINT_H = 1
def build(bld):
sources = bld.path.ant_glob([
'libogg/src/*.c'
])
bld(
features = 'subst',
name = 'libogg_config_types',
source = 'libogg/include/ogg/config_types.h.in',
target = 'libogg/include/ogg/config_types.h',
INCLUDE_INTTYPES_H = bld.env.INCLUDE_INTTYPES_H,
INCLUDE_SYS_TYPES_H = bld.env.INCLUDE_SYS_TYPES_H,
INCLUDE_STDINT_H = bld.env.INCLUDE_STDINT_H,
SIZE16 = 'int16_t',
USIZE16 = 'uint16_t',
SIZE32 = 'int32_t',
USIZE32 = 'uint32_t',
SIZE64 = 'int64_t',
USIZE64 = 'uint64_t'
)
bld.stlib(
source = sources,
target = 'ogg',
use = 'libogg_config_types',
includes = 'libogg/include/',
export_includes = 'libogg/include/'
)

32
3rdparty/opus/wscript vendored
View File

@@ -3,6 +3,26 @@
import os
FRAGMENT_VLA='''int main (int argc, char **argv) {
char a[argc];
a[sizeof( a ) - 1] = 0;
int N;
return a[0];
}'''
FRAGMENT_ALLOCA_H='''#include <alloca.h>
int main (void) {
int foo=10;
int * array = alloca(foo);
}'''
FRAGMENT_STDLIB_H='''#include <malloc.h>
#include <stdlib.h>
int main (void) {
int foo=10;
int * array = alloca(foo);
}'''
def options(opt):
pass
@@ -11,6 +31,15 @@ def configure(conf):
conf.fatal('Can\'t find opus submodule. Run `git submodule update --init --recursive`.')
return
# Check for C99 variable-size arrays, or alloca() as fallback
if conf.check_cc(fragment=FRAGMENT_VLA, msg = 'Checking for C99 VLA support', mandatory = False):
conf.define('VAR_ARRAYS', 1)
elif conf.check_cc(fragment=FRAGMENT_ALLOCA_H, msg = 'Checking for alloca in alloca.h header', mandatory = False):
conf.define('USE_ALLOCA', 1)
conf.define('HAVE_ALLOCA_H', 1)
elif conf.check_cc(fragmenmt=FRAGMENT_STDLIB_H, msg = 'Checking for alloca.h in stdlib.h', mandatory = False):
conf.define('USE_ALLOCA', 1)
# TODO: ARM/x86 intrinsics detection
# TODO: maybe call autotools/cmake/meson instead?
@@ -27,7 +56,7 @@ def build(bld):
'opus/celt/opus_custom_demo.c'
])
includes = ['opus/include/', 'opus/celt/', 'opus/silk/', 'opus/silk/float/']
defines = ['USE_ALLOCA', 'OPUS_BUILD', 'FLOAT_APPROX', 'PACKAGE_VERSION="1.3.1"', 'CUSTOM_MODES']
defines = ['OPUS_BUILD', 'FLOAT_APPROX', 'PACKAGE_VERSION="1.4.0"', 'CUSTOM_MODES']
bld.stlib(
source = sources,
@@ -35,6 +64,5 @@ def build(bld):
features = 'c',
includes = includes,
defines = defines,
subsystem = bld.env.MSVC_SUBSYSTEM,
export_includes = ['opus/include/']
)

1
3rdparty/opusfile/opusfile vendored Submodule

37
3rdparty/opusfile/wscript vendored Normal file
View File

@@ -0,0 +1,37 @@
#! /usr/bin/env python
# encoding: utf-8
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('opusfile') or not conf.path.find_dir('opusfile/src'):
conf.fatal('Can\'t find opusfile submodule. Run `git submodule update --init --recursive`.')
return
if conf.env.COMPILER_CC == 'msvc':
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
conf.define('_CRT_SECURE_NO_DEPRECATE', 1)
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
if conf.env.DEST_OS == 'android':
# HACKHACK: set it to 32 here because opusfile can't be built on Android SDK < 24
# with _FILE_OFFSET_BITS 64 (which it sets automatically in src/internal.h)
# we are not (????) relying on this part of the API, so it should be harmless
conf.define('_FILE_OFFSET_BITS', 32)
def build(bld):
sources = [
'opusfile/src/info.c',
'opusfile/src/internal.c',
'opusfile/src/opusfile.c',
'opusfile/src/stream.c'
]
bld.stlib(
source = sources,
target = 'opusfile',
includes = 'opusfile/include/',
use = 'ogg opus',
export_includes = 'opusfile/include/'
)

1
3rdparty/vorbis/vorbis-src vendored Submodule

71
3rdparty/vorbis/wscript vendored Normal file
View File

@@ -0,0 +1,71 @@
#! /usr/bin/env python
# encoding: utf-8
FRAGMENT_MEMORY_H='''#include <memory.h>
int main (void) {
return 0;
}'''
FRAGMENT_ALLOCA_H='''#include <alloca.h>
int main (void) {
int foo=10;
int * array = alloca(foo);
}'''
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('vorbis-src') or not conf.path.find_dir('vorbis-src/lib'):
conf.fatal('Can\'t find Vorbis submodule. Run `git submodule update --init --recursive`.')
return
if conf.check_cc(fragment=FRAGMENT_MEMORY_H, msg = 'Checking for memory.h header', mandatory = False):
conf.define('USE_MEMORY_H', 1)
conf.check_cc(fragment=FRAGMENT_ALLOCA_H, msg = 'Checking for alloca in alloca.h header', mandatory = False)
if conf.env.COMPILER_CC == 'msvc':
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
conf.define('_CRT_SECURE_NO_DEPRECATE', 1)
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
def build(bld):
libvorbis_sources = [
'vorbis-src/lib/mdct.c',
'vorbis-src/lib/smallft.c',
'vorbis-src/lib/block.c',
'vorbis-src/lib/envelope.c',
'vorbis-src/lib/window.c',
'vorbis-src/lib/lsp.c',
'vorbis-src/lib/lpc.c',
'vorbis-src/lib/analysis.c',
'vorbis-src/lib/synthesis.c',
'vorbis-src/lib/psy.c',
'vorbis-src/lib/info.c',
'vorbis-src/lib/floor1.c',
'vorbis-src/lib/floor0.c',
'vorbis-src/lib/res0.c',
'vorbis-src/lib/mapping0.c',
'vorbis-src/lib/registry.c',
'vorbis-src/lib/codebook.c',
'vorbis-src/lib/sharedbook.c',
'vorbis-src/lib/lookup.c',
'vorbis-src/lib/bitrate.c'
]
bld.stlib(
source = libvorbis_sources,
target = 'vorbis',
includes = 'vorbis-src/include/',
use = 'ogg',
export_includes = 'vorbis-src/include/'
)
bld.stlib(
source = 'vorbis-src/lib/vorbisfile.c',
target = 'vorbisfile',
includes = 'vorbis-src/include/',
use = 'vorbis',
export_includes = 'vorbis-src/include/'
)

View File

@@ -1,17 +1,18 @@
# Bug-compatibility in Xash3D FWGS
Xash3D FWGS has special mode for games that rely on original engine bugs.
In this mode, we emulate the behaviour of selected functions that may help running mods relying on engine bugs, but enabling them by default may break majority of other games.
Xash3D FWGS has special mode for games that rely on original engine bugs. In this mode, we emulate the behaviour of selected functions that may help running mods relying on engine bugs, but enabling them by default may break majority of other games.
At this time, we only have implemented GoldSrc bug-compatibility. It can be enabled with `-bugcomp` command line switch.
When `-bugcomp` is specified without argument, it enables everything. This behavior might be changed or removed in future versions.
When `-bugcomp` is specified with argument, it interpreted as flags separated with `+`. This way it's possible to combine multiple levels of bug-compatibility.
## GoldSrc bug-compatibility
### Emulated bugs
* `pfnPEntityOfEntIndex` in GoldSrc returns NULL for last player due to incorrect player index comparison
### Games and mods that require this
* Counter-Strike: Condition Zero - Deleted Scenes
| Flag | Description | Games that require this flag |
| ------- | ----------- | ---------------------------- |
| `peoei` | Reverts `pfnPEntityOfEntIndex` behavior to GoldSrc, where it returns NULL for last player due to incorrect player index comparison | * Counter-Strike: Condition Zero - Deleted Scenes |
| `gsmrf` | Rewrites message at the moment when Game DLL attempts to write an internal engine message, usually specific to GoldSrc protocol.<br>Right now only supports `svc_spawnstaticsound`, more messages added by request. | * MetaMod/AMXModX based mods |
| `sp_attn_none` | Makes sounds with attenuation zero spatialized, i.e. have a stereo effect. | Possibly, every game that was made for GoldSrc. |
| `get_game_dir_full` | Makes server return full path in server's `pfnGetGameDir` API function | Mods targetting engine before HL 1.1.1.1, according to MetaMod [documentation](http://metamod.org/engine_notes.html#GetGameDir) |

View File

@@ -5,5 +5,10 @@ This can be useful to test engine in Wine without using virtual machines or dual
0. Clone and install https://github.com/mstorsjo/msvc-wine (you can skip CMake part)
1. Set environment variable MSVC_WINE_PATH to the path to installed MSVC toolchain
2. Pre-load wine: `wineserver -k; wineserver -p; wine64 wineboot`
3. Run `./waf configure -T <build-type> --enable-wine-msvc --sdl2=../SDL2_VC`. Configuration step will take more time than usual.
3. Run `PKGCONFIG=/bin/false ./waf configure -T <build-type> --enable-wine-msvc --sdl2=../SDL2_VC`. Configuration step will take more time than usual.
4. .. other typical steps to build from console ...
> [!NOTE]
> Notice the usage of PKGCONFIG=/bin/false here. We're disabling pkg-config so we don't accidentally pull
> system-wide dependencies and force building them from source. In future builds we might set custom
> directory to pull dependencies from, like ffmpeg...

24
Documentation/donate.md Normal file
View File

@@ -0,0 +1,24 @@
# Developers donation page
On this page you can find links where you can support each developer individually, who has provided public sponsorship information.
### [a1batross](https://github.com/a1batross)
* Initial Xash3D SDL2/Linux port author, Xash3D FWGS engine maintainer, creator of non-commercial Flying With Gauss organization.
* Boosty page: https://boosty.to/a1ba
### [nekonomicon](https://github.com/nekonomicon)
* [hlsdk-portable](https://github.com/FWGS/hlsdk-portable), [mdldec](../utils/mdldec), [opensource-mods.md](opensource-mods.md) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=nekonomicon) (*BSD/clang port, PNG support, etc).
* Boosty page: https://boosty.to/nekonomicon
### [Velaron](https://github.com/Velaron)
* [cs16-client](https://github.com/Velaron/cs16-client) & [tf15-client](https://github.com/Velaron/tf15-client) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=Velaron) (Android port, voice chat, etc).
* BuyMeACoffee page: https://www.buymeacoffee.com/velaron
### [SNMetamorph](https://github.com/SNMetamorph)
* [PrimeXT](https://github.com/SNMetamorph/PrimeXT) & [GoldSrc Monitor](https://github.com/SNMetamorph/goldsrc-monitor) maintainer and Xash3D FWGS [contributor](https://github.com/FWGS/xash3d-fwgs/commits?author=SNMetamorph) (Windows port, voice chat, etc).
* BTC: `16GAzK3qei5AwBW7sggXp3yNcFHBtdpxXj`
* ETH (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`
* USDT (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`
* USDC (ERC20): `0xb580eeca9756e3881f9d6d026e28db28eb72a383`

View File

@@ -1,150 +0,0 @@
# There are few new commands availiable in xash3d fork:
## Commands:
### ent_create
Create entity with specified classname and key/values
`ent_create <classname> <key> <value> <key> <value> ...`
for example:
`ent_create monster_zombie targetname zomb1`
after creating entity, ent_last_xxx cvars are set to new entity and ent_last_cb called, look at ent_getvars description
### ent_fire
Make some actions on entity
`ent_fire <pattern> <command> <args>`
Availiavle commands:
* Set fields (Only set entity field, does not call any functions):
* health
* gravity
* movetype
* solid
* rendermode
* rendercolor (vector)
* renderfx
* renderamt
* hullmin (vector)
* hullmax (vector)
* Actions
* rename: set entity targetname
* settarget: set entity target (only targetnames)
* setmodel: set entity model (does not update)
* set: set key/value by server library
* See game FGD to get list.
* command takes two arguments
* touch: touch entity by current player.
* use: use entity by current player.
* movehere: place entity in player fov.
* drop2floor: place entity to nearest floor surface
* moveup: move entity to 25 units up
* moveup (value): move by y axis relatively to specified value
* Flags (Set/clear specified flag bit, arg is bit number):
* setflag
* clearflag
* setspawnflag
* clearspawnflag
### ent_info
Print information about entity by identificator
`ent_info <identificator>`
### ent_getvars
Set client cvars containing entity information (useful for [[Scripting]]) and call ent_last_cb
`ent_getvars <identificator>`
These cvars are set:
```
ent_last_name
ent_last_num
ent_last_inst
ent_last_origin
ent_last_class
```
### ent_list
Print short information about antities, filtered by pattern
`ent_list <pattern>`
## Syntax description
### \<identificator\>
* !cross: entity under aim
* Instance code: !\<number\>_\<seria\l>
* set by ent_getvars command
* Entity index
* targetname pattern
### \<pattern\>
Pattern is like identificator, but may filter many entities by classname
### (vector)
used by ent_fire command. vector means three float values, entered without quotes
### key/value
All entities parameters may be set by specifiing key and value strings.
Originally, this mechanizm is used in map/bsp format, but it can be used in enttools too.
Keys and values are passed to server library and processed by entity keyvalue function, setting edict and entity owns parameters.
If value contains spaces, it must be put in quotes:
`ent_fire !cross set origin "0 0 0"`
## Using with scripting
ent_create and ent_getvars commands are setting cvars on client
It can be used with ent_last_cb alias that is executed after setting cvars.
Simple example:
```
ent_create weapon_c4
alias ent_last_cb "ent_fire \$ent_last_inst use"
```
Use weapon_c4 after creating it.
Note that you cannot use many dfferent callbacks at the same time.
You can set entity name by by pattern and create special script, contatning all callbacks.
Example:
example.cfg
```
alias ent_last_cb exec entity_cb.cfg
ent create \<class\> targetname my_ent1_$name
ent_create \<class\> targetname my_ent2_$name
```
entity_cb.cfg
```
if $ent_last_name == my_ent1_$name
:(ent1 actions)
if $ent_last_name == my_ent2_$name
:(ent2 actions)
```
Note that scripting cannot be blocking. You cannot wait for server answer and continue. But you can use small scripts, connected with ent_last_cb command. The best usage is user interaction. You can add touch buttons to screen or call user command menu actions by callbacks.
## Server side
To enable entity tools on server, set sv_enttools_enable to 1
To change maximum number of entities, touched by ent_fire, change sv_enttools_maxfire to required number.
To enable actions on players, set sv_enttools_players to 1.
To enable entity tools for player by nickname, set sv_enttools_godplayer to nickname. Useful to temporary enable from rcon.
To prevent crash on some actions, set host_mapdesign_fatal to 0

View File

@@ -0,0 +1,21 @@
## Environment variables
#### Xash3D FWGS
The engine respects these environment variables:
| Variable | Type | Description |
| --------------------- | ---------- | ----------- |
| `XASH3D_GAME` | _string_ | Overrides default game directory. Ignored if `-game` command line argument is set |
| `XASH3D_BASEDIR` | _string_ | Sets path to base (root) directory, instead of current working directory |
| `XASH3D_RODIR` | _string_ | Sets path to read-only base (root) directory. Ignored if `-rodir` command line argument is set |
| `XASH3D_EXTRAS_PAK1` | _string_ | Archive file from specified path will be added to virtual filesystem search path in the lowest possible priority |
| `XASH3D_EXTRAS_PAK2` | _string_ | Similar to `XASH3D_EXTRAS_PAK1` but next to it in priority list |
Environment variables NOT listed in the table above are used internally, and aren't considered as stable interface.
#### mdldec
| Variable | Type | Description |
| --------------------- | ---------- | ----------- |
| `MDLDEC_ACT_PATH` | _string_ | If set, will read activities list from this path |

View File

@@ -0,0 +1,152 @@
# Entity tools
For some features described below, you need to enable [console scripting](https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/extensions/console-scripting.md) with command `cmd_scripting 1` in console.
To get more information about it, check another according page related to console scripting.
## Commands description
### ent_create
Create entity with specified classname and key/values.
`ent_create <classname> <key> <value> <key> <value> ...`
For example:
`ent_create monster_zombie targetname zomb1`
After creating entity, ent_last_xxx cvars are set to new entity and ent_last_cb called, look at ent_getvars description.
### ent_fire
Makes some actions on entity.
`ent_fire <pattern> <command> <args>`
#### Available commands:
Set fields (only set entity field, does not call any functions)
* health
* gravity
* movetype
* solid
* rendermode
* rendercolor (vector)
* renderfx
* renderamt
* hullmin (vector)
* hullmax (vector)
Actions
* rename: set entity targetname
* settarget: set entity target (only targetnames)
* setmodel: set entity model (does not update)
* set: set key/value by server library
* See game FGD to get list.
* command takes two arguments
* touch: touch entity by current player.
* use: use entity by current player.
* movehere: place entity in player fov.
* drop2floor: place entity to nearest floor surface
* moveup: move entity to 25 units up
* moveup (value): move by y axis relatively to specified value
Flags (set/clear specified flag bit, arg is bit number):
* setflag
* clearflag
* setspawnflag
* clearspawnflag
### ent_info
Print information about entity by identificator.
`ent_info <identificator>`
### ent_getvars
Set client cvars containing entity information (useful for [scripting](extensions/console-scripting.md)) and then calls ent_last_cb.
`ent_getvars <identificator>`
These cvars are set:
```
ent_last_name
ent_last_num
ent_last_inst
ent_last_origin
ent_last_class
```
### ent_list
Print short information about antities, filtered by pattern.
`ent_list <pattern>`
## Syntax description
#### \<identificator\>
* !cross: entity under aim
* !\<number\>_\<serial\>: instance code
* Set by ent_getvars command
* Entity index
* Targetname pattern
#### \<pattern\>
Pattern is like identificator, but may filter many entities by classname.
#### (vector)
Used by ent_fire command. vector means three float values, entered without quotes.
#### key/value
All entities parameters may be set by specifiing key and value strings.
Originally, this mechanizm is used in map/bsp format, but it can be used in enttools too.
Keys and values are passed to server library and processed by entity keyvalue function, setting edict and entity owns parameters.
If value contains spaces, it must be put in quotes:
`ent_fire !cross set origin "0 0 0"`
## Using with scripting
ent_create and ent_getvars commands are setting cvars on client
It can be used with ent_last_cb alias that is executed after setting cvars.
Simple example:
```
ent_create weapon_c4
alias ent_last_cb "ent_fire \$ent_last_inst use"
```
Use weapon_c4 after creating it.
Note that you cannot use many different callbacks at the same time.
You can set entity name by by pattern and create special script, contatning all callbacks.
Example:
> example.cfg
```
alias ent_last_cb exec entity_cb.cfg
ent create \<class\> targetname my_ent1_$name
ent_create \<class\> targetname my_ent2_$name
```
> entity_cb.cfg
```
if $ent_last_name == my_ent1_$name
:(ent1 actions)
if $ent_last_name == my_ent2_$name
:(ent2 actions)
```
Note that scripting cannot be blocking. You cannot wait for server answer and continue. But you can use small scripts, connected with ent_last_cb command. The best usage is user interaction. You can add touch buttons to screen or call user command menu actions by callbacks.
## Server side configuration
To enable entity tools on server, set sv_enttools_enable to 1
To change maximum number of entities, touched by ent_fire, change sv_enttools_maxfire to required number.

View File

@@ -0,0 +1,25 @@
# GetNativeObject API
To be able to use platform-specific features or get optional engine interfaces, we've added a simple call to MobilityAPI on client DLL and PhysicsAPI for server DLL and extended MenuAPI for menu DLL.
It's defined like this:
```
void *pfnGetNativeObject( const char *name );
```
#### Cross-platform objects
Only these objects are guaranteed to be available on all targets.
| Object name | Interface |
|-------------|-----------|
| `VFileSystem009` | Provides C++ interface to filesystem, binary-compatible with Valve's VFileSystem009. |
| `XashFileSystemXXX` | Provides C interface to filesystem. This interface is unstable and not recommended for generic use, outside of engine internals. For more info about current version look into `filesystem.h`. |
#### Android-specific objects
| Object name | Interface |
|-------------|-----------|
| `JNIEnv` | Allows interfacing with Java Native Interface. |
| `ActivityClass` | Returns JNI object for engine Android activity class. |

View File

@@ -0,0 +1,65 @@
# sounds.lst.md
Using sounds.lst located in scripts folder, modder can override some of the hardcoded sounds in temp entities and server physics.
File format:
```
<group name>
{
<path1>
<path2>
<path3>
}
<group2 name> <path with %d> <min number> <max number>
```
* Sounds can use any supported sound format (WAV or MP3).
* The path must be relative to the sounds/ folder in the game or base directory root, addon folder, or archive root.
* Groups can be empty or omitted from the file to load no sound.
* Groups can either list a set of files or specify a format string and a range.
* Anything after // will be considered a comment and ignored.
* Behavior is undefined if the group was listed multiple times.
Currently supported groups are:
|Group name|Usage|
|----------|-----|
|`BouncePlayerShell`|Used for BOUNCE_SHELL tempentity hitsound|
|`BounceWeaponShell`|Used for BOUCNE_SHOTSHELL tempentity hitsound|
|`BounceConcrete`|Used for BOUNCE_CONCRETE tempentity hitsound|
|`BounceGlass`|Used for BOUCNE_GLASS|
|`BounceMetal`|Used for BOUNCE_METAL|
|`BounceFlesh`|Used for BOUNCE_FLESH|
|`BounceWood`|Used for BOUNCE_WOOD|
|`Ricochet`|Used for BOUNCE_SHRAP and ricochet tempentities|
|`Explode`|Used for tempentity explosions|
|`EntityWaterEnter`|Used for entity entering water|
|`EntityWaterExit`|Used for entity exiting water|
|`PlayerWaterEnter`|Used for player entering water|
|`PlayerWaterExit`|Used for player exiting water|
## Example
This example is based on defaults sounds used in Half-Life:
```
BouncePlayerShell "player/pl_shell%d.wav" 1 3
BounceWeaponShell "weapons/sshell%d.wav" 1 3
BounceConcrete "debris/concrete%d.wav" 1 3
BounceGlass "debris/glass%d.wav" 1 4
BounceMetal "debris/metal%d.wav" 1 6
BounceFlesh "debris/flesh%d.wav" 1 7
BounceWood "debris/wood%d.wav" 1 4
Ricochet "weapons/ric%d.wav" 1 5
Explode "weapons/explode%d.wav" 3 5
EntityWaterEnter "player/pl_wade%d.wav" 1 4
EntityWaterExit "player/pl_wade%d.wav" 1 4
PlayerWaterEnter
{
"player/pl_wade1.wav"
}
PlayerWaterExit
{
"player/pl_wade2.wav"
}
```

View File

@@ -70,24 +70,31 @@ These strings are specific to Xash3D FWGS.
| Key | Type | Default value | Description |
| ----------------------- | ---------- | ------------------------ | ----------- |
| `animated_title` | boolean | 0 | Use animated title in main menu (WON Half-Life logo.avi imitation from Half-Life 25-th anniversary update)
| `autosave_aged_count` | integer | 2 | Auto saves limit used in saves rotation |
| `gamedll_linux` | string | Generated from `gamedll` | Game server DLL for 32-bit x86 Linux (see LibraryNaming.md for details) |
| `gamedll_osx` | string | Generated from `gamedll` | Game server DLL for 32-bit x86 macOS (see LibraryNaming.md for details) |
| `hd_background` | boolean | 0 | Use HD background for main menu (Half-Life 25-th anniversary update) |
| `internal_vgui_support` | boolean | 0 | Only for programmers! Required to be set as 1 for PrimeXT!<br>When set to 1, the engine will not load vgui_support DLL, as VGUI support is done (or intentionally ignored) on the game side. |
| `render_picbutton_text` | boolean | 0 | When set to 1, the UI will not use prerendered `btns_main.bmp` and dynamically render them instead |
| `quicksave_aged_count` | integer | 2 | Quick saves limit used in saves rotation |
| `demomap` | string | Empty string | The name of the demo chapter map (Half-Life Uplink) |
## Note on GoldSrc liblist.gam support
As Xash3D accidentally supports GoldSrc games, it also supports parsing liblist.gam.\
Xash3D will use this file if gameinfo.txt is absent, or if its modification timestamp is older than liblist.gam.
> [!NOTE]
> Starting from January 2025, Xash3D FWGS doesn't automatically generate gameinfo.txt from liblist.gam. The key conversion table still remains but if you wish to use gameinfo.txt instead of liblist.gam, you can execute `fs_make_gameinfo` in console.
For game creators who plan supporting only Xash3D, using this file is not recommended.
The table below defines conversion rules from liblist.gam to gameinfo.txt. Some keys' interpretation does differ from `gameinfo.txt`, in this case a note will be left. If `liblist.gam` key isn't present in this table, it's ignored.
| `liblist.gam` key | `gameinfo.txt` key | Note |
| ----------------- | ------------------ | ---- |
| `animated_title` | `animated_title` | |
| `edicts` | `max_edicts` | |
| `fallback_dir` | `fallback_dir` | |
| `game` | `title` | |
@@ -95,6 +102,7 @@ The table below defines conversion rules from liblist.gam to gameinfo.txt. Some
| `gamedll` | `gamedll` | |
| `gamedll_linux` | `gamedll_linux` | |
| `gamedll_osx` | `gamedll_osx` | |
| `hd_background` | `hd_background` | |
| `icon` | `icon` | |
| `mpentity` | `mp_entity` | |
| `mpfilter` | `mp_filter` | |

View File

@@ -0,0 +1,15 @@
# Support for GoldSrc network protocol
This feature is still work-in-progress, but for now it's available for all users, and we appreciate any bug-reports and contributions around it.
For connecting to GoldSrc-based servers, use this command:
```
connect ip:port gs
```
But keep in mind, there are requirement for server to be able to accept connections from Xash3D-based clients: it should use Reunion.
Without this requirement, you will just get "Steam validation rejected" error on connecting.
That is because proper authorization with Steam API is not implemented in engine yet (but we have plans on it).
Also, we encountered that some GoldSrc-based servers are recognizing Xash3D clients as "fake clients" and banning/kicking them. Maybe this problem will be
solved along with better compatibility with GoldSrc behavior, but may be not - we don't know logic behind this fake client checks.

View File

@@ -0,0 +1,40 @@
### HD (external) textures support
Xash3D supports loading texture replacements in TGA format for almost all types of models in the game, except alias models at this time.
Textures are expected to be located at:
* `modfolder/materials/<mapname>` - for a specific map
* `modfolder/materials/common` - common for all maps
* `modfolder/materials/decals` - for decals
* `modfolder/materials/models/<model>` - for models (texture name must match the internal texture name in the model)
Support for high-resolution textures is enabled setting `host_allow_materials` cvar to `1` or in the menu, in "Video options" section.
#### Xash3D FWGS additions
In addition to paths above, Xash3D FWGS checks following paths:
* `modfolder/materials/sprites/<sprite>` - for sprites, except HUD sprites
Also, to check which texture replacements are loaded successfully, failed or weren't found, a mod developer can set `host_allow_materials` cvar value to `2`. The engine will spew log at any developer level in the following format:
```
Looking for <replacement> replacement... <status code> (<path relative to mod directory>)
```
Status codes:
* `OK` - texture replacement file was found and loaded into GPU memory successfully
* `FAIL` - texture file was found but hasn't been parsed or loaded successfully. Refer to engine log for more details.
* `MISS` - texture file wasn't found
Example:
```
Looking for maps/bounce.bsp:!waterblue tex replacement...OK (materials/common/!waterblue.tga)
Looking for maps/bounce.bsp:!waterblue_luma tex replacement...MISS (not found)
Looking for {shot2 decal replacement...MISS (materials/decals/{shot2.tga)
Looking for {shot4 decal replacement...MISS (materials/decals/{shot4.tga)
Looking for {shot3 decal replacement...MISS (materials/decals/{shot3.tga)
Looking for models/gman tex replacement...FAIL (materials/models/gman/GMan_Case1.tga)
Looking for models/gman tex replacement...FAIL (materials/models/gman/inside_1.tga)
```

15
Documentation/musl.md Normal file
View File

@@ -0,0 +1,15 @@
# Xash3D FWGS on `musl`
Xash3D FWGS works on `musl` out of the box. However, the engine doesn't try to differentiate glibc and musl anymore. If you see error similar to:
```
Host_InitError: can't initialize cl_dlls/client.so: Error relocating valve/cl_dlls/client.so: __sprintf_chk: symbol not found
```
... or you know that the game you're running is linked against glibc, you can try using `libgcompat`, like this:
```
$ LD_PRELOAD=/lib/libgcompat.so.0 ./xash3d ...
```
It will automatically add the missing symbols that glibc binaries usually need. In the future we might automatically link engine against `libgcompat` for better compatibility with prebuilt or closed-source games, if there will be any use for this.

View File

@@ -0,0 +1,32 @@
# NAT bypass feature in Xash3D FWGS
Since IPv6 not as widespread as we would like, NAT (Network Address Translation) still being actively used by many internet service providers in an attempts to
mitigate IPv4 addresses exhaustion. In short, they uses one IPv4 address and doing some tricks with ports to represent many other users behind this address.
But this leads to a problem for users: they cannot accept direct
incoming connections anymore. This means that if you are behind provider's NAT and will try to setup Xash3D FWGS server - nobody will be able to connect to it,
and the server will not show up in servers public list.
## Is it possible to avoid this problem?
In most cases, it is possible to bypass NAT with UDP hole punching, and Xash3D FWGS uses this method too. But this method is not 100% guaranteed to work - it depends
on NAT configurations on both server and client side, and there is no way to control it.
First of all, server should not be behind symmetric NAT. You can check your NAT type on [this page](https://www.checkmynat.com/).
If you get "Symmetric NAT" result in this test, that means you cannot setup publicly available server with internet connection that you are using.
Here is more detailed scheme of different NAT types compatibility, it explains are users with different NAT types can connect to each other or not.
Client NAT type on rows, server NAT type on columns:
| *NAT Type* | Full Cone | Restricted Cone | Port Restricted Cone | Symmetric |
| -------------------- | --------- | --------------- | -------------------- | --------- |
| Full Cone | ✔️ | ✔️ | ✔️ | ✔️ |
| Restricted Cone | ✔️ | ✔️ | ✔️ | ✔️ |
| Port Restricted Cone | ✔️ | ✔️ | ✔️ | ❌ |
| Symmetric | ✔️ | ✔️ | ❌ | ❌ |
## How to use NAT bypass feature?
If you are starting server within the game, you need to enable option "*Use NAT Bypass instead of direct mode*" in bottom left corner of screen.
If you are starting dedicated server, you should add console variable `sv_nat 1` to server.cfg file, or add `+sv_nat 1` to server startup parameters.
If you need to connect to server behind NAT, there is separate tab named *NAT* for such servers in server browser. Note that it is useless to add NAT server to favorites,
or somehow trying manually to store it, because it has changing address and port.

View File

@@ -38,6 +38,12 @@ Uploaded to github by Oleg Cherkasky - https://github.com/gunrunners-paradise/Ct
## Deathmatch Classic
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/dmc
## Delta Particles
Available on ModDB - https://www.moddb.com/mods/half-life-delta/downloads/delta-particles-full-sources-maps-and-c-code
## Earth Special Forces
Alpha 2.0 - https://www.gamers-desire.de/details/2830
## ESHQ
Official github repository - https://github.com/adslbarxatov/xash3d-for-ESHQ
@@ -228,7 +234,7 @@ Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
## Counter Strike
Reverse-engineered code of client part by a1batross - https://github.com/FWGS/cs16-client/tree/v1.32
Reverse-engineered code of client part by a1batross - https://github.com/Velaron/cs16-client
Reverse-engineered code of server part by nagist - https://github.com/nagist/cs16nd
@@ -240,6 +246,8 @@ CSO-like Xash3D-based mod, CSMoE - https://github.com/MoeMod/CSMoE
## Crack-Life: Campaign Mode
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/crack_life
Reverse-engineered code: branch **clcampaign** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/clcampaign
## Escape from the Darkness
malortie's recreation - https://github.com/malortie/hl-eftd

View File

@@ -1,15 +1,15 @@
Xash3D FWGS is intended to be easily ported to specific platform, however main issue is maintaining such ports.
Xash3D FWGS is intended to be easily portable for various platforms, however main issue is maintaining such ports.
This page is about merged ports to main source tree and responsible for it developers.
For porting guidelines, look engine-porting-guide.md.
For porting guidelines, read engine-porting-guide.md.
Status:
* **Supported**: active, was confirmed to be fully functional.
* **Supported**: active, confirmed to be fully functional, gets built on CI.
* **Orphaned**: some work was done but not finished or actively tested due to lack of human resources.
* **In progress**: active, under development.
* **Old Engine**: port was for old engine fork
* **Not maintained**: lack of human resources
* **Deprecated**: not supported anymore
* **Old Engine**: port was for old engine fork.
* **Deprecated**: not supported anymore.
Table is sorted by status and platform.
@@ -17,17 +17,22 @@ Table is sorted by status and platform.
| -------- | ------ | ---------- | ----
| Android | Supported | @Velaron |
| *BSD | Supported | @nekonomicon |
| DOS4GW | Supported | @mittorn |
| GNU/Linux | Supported | @a1batross, @mittorn |
| Haiku | Supported | not maintained | Was added by #478 and #483
| macOS | Supported | @sofakng |
| MotoMAGX | Supported | @a1batross |
| PSVita | Supported | @fgsfdsfgs |
| Switch | Supported | @fgsfdsfgs |
| Windows | Supported | @a1batross, @SNMetamorph |
| DOS4GW | Orphaned | N/A | Haven't been confirmed to work for a very long time
| Haiku | Orphaned | N/A | Was added by #478 and #483
| IRIX | Orphaned | N/A | Undone, compiles but requires big endian port
| MotoMAGX | Orphaned | N/A | Should work but the compiler used for this platform is very unstable and easy to crash (it's GCC 3.4)
| SerenityOS | Orphaned | N/A | Works but not throughly tested
| Solaris | Orphaned | N/A | Works but not throughly tested
| WebAssembly System Interface | Orphaned | N/A | Undone, WASI is missing a lot of APIs we want to use
| Dreamcast | In progress | @maximqaxd | [GitHub Repository](https://github.com/maximqaxd/xash3d-fwgs_dc/)
| PSP | In progress | @Crow_bar, @Velaron | [GitHub Repository](https://github.com/Crow-bar/xash3d-fwgs)
| Wii | In progress | Collaborative effort | [GitHub Repository](https://github.com/saucesaft/xash3d-wii)
| Emscripten | Old Engine | not maintained |
| 3DS | Old Engine fork | not maintained | [GitHub Repository](https://github.com/masterfeizz/Xash3DS)
| Oculus Quest | Old Engine fork | @DrBeef | [GitHub Repository](https://github.com/DrBeef/Lambda1VR)
| iOS | Deprecated | not maintained | See GitHub issue #61
| Emscripten | Old Engine | N/A |
| 3DS | Old Engine fork | N/A | [GitHub Repository](https://github.com/masterfeizz/Xash3DS)
| Oculus Quest | Old Engine fork | N/A | [GitHub Repository](https://github.com/DrBeef/Lambda1VR)
| iOS | Deprecated | N/A | See GitHub issue #61

File diff suppressed because it is too large Load Diff

108
README.md
View File

@@ -1,62 +1,57 @@
# Xash3D FWGS Engine
[![GitHub Actions Status](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [![FreeBSD Build Status](https://img.shields.io/cirrus/github/FWGS/xash3d-fwgs?label=freebsd%20build)](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) [![Discord Server](https://img.shields.io/discord/355697768582610945.svg)](http://fwgsdiscord.mentality.rip/) \
[![Download Stable](https://img.shields.io/badge/download-stable-yellow)](https://github.com/FWGS/xash3d-fwgs/releases/latest) [![Download Testing](https://img.shields.io/badge/downloads-testing-orange)](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous)
# Xash3D FWGS Engine <img align="right" width="128" height="128" src="https://github.com/FWGS/xash3d-fwgs/raw/master/game_launch/icon-xash-material.png" alt="Xash3D FWGS icon" />
[![GitHub Actions Status](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/FWGS/xash3d-fwgs/actions/workflows/c-cpp.yml) [![FreeBSD Build Status](https://img.shields.io/cirrus/github/FWGS/xash3d-fwgs?label=freebsd%20build)](https://cirrus-ci.com/github/FWGS/xash3d-fwgs) \
[![Discord Server](https://img.shields.io/discord/355697768582610945?logo=Discord&label=International%20Discord%20chat)](http://fwgsdiscord.mentality.rip/) [![Russian speakers Telegram Chat](https://img.shields.io/badge/Russian_speakers_Telegram_chat-gray?logo=Telegram)](https://t.me/flyingwithgauss) \
[![Download Daily Build](https://img.shields.io/badge/downloads-testing-orange)](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous)
Xash3D FWGS is a fork of Xash3D Engine by Unkle Mike with extended features and crossplatform.
Xash3D ([pronounced](https://ipa-reader.com/?text=ks%C9%91%CA%82) `[ksɑʂ]`) FWGS is a game engine, aimed to provide compatibility with Half-Life Engine and extend it, as well as to give game developers well known workflow.
```
Xash3D is a game engine, aimed to provide compatibility with Half-Life Engine,
as well as to give game developers well known workflow and extend it.
Read more about Xash3D on ModDB: https://www.moddb.com/engines/xash3d-engine
```
Xash3D FWGS is a heavily modified fork of an original [Xash3D Engine](https://www.moddb.com/engines/xash3d-engine) by Unkle Mike.
## Donate
[![Donate to FWGS button](https://img.shields.io/badge/Donate_to_FWGS-%3C3-magenta)](Documentation/donate.md) \
If you like Xash3D FWGS, consider supporting individual engine maintainers. By supporting us, you help to continue developing this game engine further. The sponsorship links are available in [documentation](Documentation/donate.md).
## Fork features
* HLSDK 2.4 support.
* Crossplatform: supported x86 and ARM on Windows/Linux/BSD/Android. ([see docs for more info](Documentation/ports.md))
* Modern compilers support: say no more to MSVC6.
* Better multiplayer support: multiple master servers, headless dedicated server.
* Mobility API: allows better game integration on mobile devices(vibration, touch controls)
* Different input methods: touch, gamepad and classic mouse & keyboard.
* Steam Half-Life (HLSDK 2.5) support.
* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md).
* Better multiplayer: multiple master servers, headless dedicated server, voice chat, [GoldSrc protocol support](Documentation/goldsrc-protocol-support.md) and IPv6 support.
* Multiple renderers support: OpenGL, GLESv1, GLESv2 and Software.
* Advanced virtual filesystem: `.pk3` and `.pk3dir` support, compatibility with GoldSrc FS module, fast case-insensitivity emulation for crossplatform.
* Mobility API: better game integration on mobile devices (vibration, touch controls).
* Different input methods: touch and gamepad in addition to mouse & keyboard.
* TrueType font rendering, as a part of mainui_cpp.
* Multiple renderers support: OpenGL, GLESv1, GLESv2, Software.
* Voice support.
* External filesystem module like in GoldSrc engine.
* External vgui support module.
* PNG image format support.
* A set of small improvements, without broken compatibility.
## Planned fork features
* Virtual Reality support and game API.
* Vulkan renderer.
* External VGUI support module.
* PNG & KTX2 image format support.
* Ogg Vorbis (`.ogg`) & Ogg Opus (`.opus`) audio formats support.
* [A set of small improvements](Documentation/), without broken compatibility.
## Installation & Running
0) Get Xash3D FWGS binaries: you can use [testing](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous) build or you can compile engine from source code.
1) Copy engine binaries to some directory.
2) Copy `valve` directory from [Half-Life](https://store.steampowered.com/app/70/HalfLife/) to directory with engine binaries.
If your CPU is NOT x86 compatible or you're running 64-bit version of the engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable).
This repository contains our fork of HLSDK and restored source code for some of the mods. Not all of them, of course.
This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods.
You still needed to copy `valve` directory as all game resources located there.
3) Run the main executable (`xash3d.exe` or AppImage).
For additional info, run Xash3D with `-help` command line key.
## Contributing
* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html
* Issues are accepted in both English and Russian
* Before sending an issue, check if someone already reported your issue. Make sure you're following "How To Ask Questions The Smart Way" guide by Eric Steven Raymond. Read more: http://www.catb.org/~esr/faqs/smart-questions.html.
* Issues are accepted in both English and Russian.
* Before sending a PR, check if you followed our contribution guide in CONTRIBUTING.md file.
## Build instructions
We are using Waf build system. If you have some Waf-related questions, I recommend you to read https://waf.io/book/
We are using Waf build system. If you have some Waf-related questions, I recommend you to read [Waf Book](https://waf.io/book/).
NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using!
### Prerequisites
If your CPU is x86 compatible, we are building 32-bit code by default. This was done to maintain compatibility with Steam releases of Half-Life and based on it's engine games.
If your CPU is x86 compatible and you're on Windows or Linux, we are building 32-bit code by default. This was done to maintain compatibility with Steam releases of Half-Life and based on it's engine games.
Even if Xash3D FWGS does support targetting 64-bit, you can't load games without recompiling them from source code!
If your CPU is NOT x86 compatible or you decided build 64-bit version of engine, you may want to compile [Half-Life SDK](https://github.com/FWGS/hlsdk-portable).
This repository contains our fork of HLSDK and restored source code for some of the mods. Not all of them, of course.
This repository contains our fork of HLSDK and restored source code for Half-Life expansions and some mods.
#### Windows (Visual Studio)
* Install Visual Studio.
@@ -68,31 +63,40 @@ This repository contains our fork of HLSDK and restored source code for some of
#### GNU/Linux
##### Debian/Ubuntu
* Enable i386 on your system, if you're compiling 32-bit engine on amd64. If not, skip this
* Only for 32-bit engine on 64-bit x86 operating system:
* Enable i386 on your system: `$ sudo dpkg --add-architecture i386`.
* Install `aptitude` ([why?](https://github.com/FWGS/xash3d-fwgs/issues/1828#issuecomment-2415131759)): `$ sudo apt update && sudo apt upgrade && sudo apt install aptitude`
* Install development tools: `$ sudo aptitude --without-recommends install git build-essential gcc-multilib g++-multilib libsdl2-dev:i386 libfreetype-dev:i386 libopus-dev:i386 libbz2-dev:i386`.
* Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig`.
`$ sudo dpkg --add-architecture i386`
* Install development tools
* For 32-bit engine on amd64: \
`$ sudo apt install build-essential gcc-multilib g++-multilib python libsdl2-dev:i386 libfontconfig-dev:i386 libfreetype6-dev:i386`
* For everything else: \
`$ sudo apt install build-essential python libsdl2-dev libfontconfig-dev libfreetype6-dev`
* Clone this repostory:
`$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`
* For 64-bit engine on 64-bit x86 and other non-x86 systems:
* Install development tools: `$ sudo apt install git build-essential python libsdl2-dev libfreetype6-dev libopus-dev libbz2-dev`.
* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
##### RedHat/Fedora
* Only for 32-bit engine on 64-bit x86 operating system:
* Install development tools: `$ sudo dnf install git gcc gcc-c++ glibc-devel.i686 SDL2-devel.i686 opus-devel.i686 freetype-devel.i686 bzip2-devel.i686`.
* Set PKG_CONFIG_PATH environment variable to point at 32-bit libraries: `$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig`.
* For 64-bit engine on 64-bit x86 and other non-x86 systems:
* Install development tools: `$ sudo dnf install git gcc gcc-c++ SDL2-devel opus-devel freetype-devel bzip2-devel`.
* Clone this repostory: `$ git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
### Building
#### Windows (Visual Studio)
0) Open command line
0) Open command line.
1) Navigate to `xash3d-fwgs` directory.
2) Carefully examine which build options are available: `waf --help`
3) Configure build: `waf configure -T release --sdl2=c:/path/to/SDL2`
4) Compile: `waf build`
5) Install: `waf install --destdir=c:/path/to/any/output/directory`
2) (optional) Examine which build options are available: `waf --help`.
3) Configure build: `waf configure --sdl2=c:/path/to/SDL2`.
4) Compile: `waf build`.
5) Install: `waf install --destdir=c:/path/to/any/output/directory`.
#### Linux
If compiling 32-bit on amd64, you may need to supply `export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig` prior to running configure.
If compiling 32-bit on amd64, make sure `PKG_CONFIG_PATH` from the previous step is set correctly, prior to running configure.
0) Examine which build options are available: `./waf --help`
1) Configure build: `./waf configure -T release`
(You need to pass `-8` to compile 64-bit engine on 64-bit x86 processor)
2) Compile: `./waf build`
3) Install(optional): `./waf install --destdir=/path/to/any/output/directory`
0) (optional) Examine which build options are available: `./waf --help`.
1) Configure build: `./waf configure` (you need to pass `-8` to compile 64-bit engine on 64-bit x86 processor).
2) Compile: `./waf build`.
3) Install: `./waf install --destdir=/path/to/any/output/directory`.

14
android/.gitignore vendored Normal file
View File

@@ -0,0 +1,14 @@
.gradle/
build/
.externalNativeBuild
.cxx/
.idea/
local.properties
.project
.classpath
.gradle
.settings
release/
*.hprof
.vscode/
*.bak

View File

@@ -0,0 +1,60 @@
cmake_minimum_required(VERSION 3.6)
# Only used to build Android project
project(XASH_ANDROID)
# armeabi-v7a requires cpufeatures library
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()
find_package(PythonInterp 2.7 REQUIRED)
get_filename_component(C_COMPILER_ID ${CMAKE_C_COMPILER} NAME_WE)
get_filename_component(CXX_COMPILER_ID ${CMAKE_CXX_COMPILER} NAME_WE)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(BUILD_TYPE "debug")
else()
set(BUILD_TYPE "release")
list(APPEND WAF_EXTRA_ARGS --enable-poly-opt --enable-lto)
endif()
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
set(64BIT ON CACHE BOOL "" FORCE)
list(APPEND WAF_EXTRA_ARGS -8) # only required for x86 when testing this cmakelist under linux
endif()
set(CMAKE_VERBOSE_MAKEFILE ON)
set(WAF_CC "${CMAKE_C_COMPILER} --target=${CMAKE_C_COMPILER_TARGET}")
set(WAF_CXX "${CMAKE_CXX_COMPILER} --target=${CMAKE_CXX_COMPILER_TARGET}")
# not cleanest way to get upper directory
set(ENGINE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../")
execute_process(
COMMAND ${CMAKE_COMMAND} -E env
CC=${WAF_CC} CXX=${WAF_CXX}
AR=${CMAKE_AR} STRIP=${CMAKE_STRIP}
${PYTHON_EXECUTABLE} waf configure -T ${BUILD_TYPE} -o "${CMAKE_CURRENT_BINARY_DIR}/xash3d-fwgs" ${WAF_EXTRA_ARGS} cmake
--check-c-compiler=${C_COMPILER_ID} --check-cxx-compiler=${CXX_COMPILER_ID}
-s "${ENGINE_SOURCE_DIR}/SDL" --skip-sdl2-sanity-check --enable-bundled-deps
WORKING_DIRECTORY "${ENGINE_SOURCE_DIR}"
)
add_subdirectory("${ENGINE_SOURCE_DIR}/3rdparty/hlsdk-portable" hlsdk-portable)
# try to build minimal SDL. Enable features as we're gonna use them
set(SDL_RENDER OFF)
set(SDL_POWER OFF)
set(SDL_VULKAN OFF)
set(SDL_DISKAUDIO OFF)
set(SDL_DUMMYAUDIO OFF)
set(SDL_DUMMYVIDEO OFF)
set(SDL_VULKAN OFF)
set(SDL_OFFSCREEN OFF)
set(SDL_STATIC OFF)
add_subdirectory("${ENGINE_SOURCE_DIR}/3rdparty/SDL" SDL)
add_subdirectory("${ENGINE_SOURCE_DIR}/" xash3d-fwgs)
add_subdirectory("${ENGINE_SOURCE_DIR}/3rdparty/mainui" mainui)

View File

@@ -0,0 +1,130 @@
import java.time.LocalDateTime
import java.time.Month
import java.time.temporal.ChronoUnit
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "su.xash.engine"
ndkVersion = "27.2.12479018"
defaultConfig {
applicationId = "su.xash"
applicationIdSuffix = "engine"
versionName = "0.21"
versionCode = getBuildNum()
minSdk = 21
targetSdk = 34
compileSdk = 34
externalNativeBuild {
cmake {
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
arguments("-DANDROID_USE_LEGACY_TOOLCHAIN_FILE=OFF")
}
}
}
externalNativeBuild {
cmake {
version = "3.22.1"
path = file("CMakeLists.txt")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildTypes {
debug {
isMinifyEnabled = false
isShrinkResources = false
isDebuggable = true
applicationIdSuffix = ".test"
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
release {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
register("asan") {
initWith(getByName("debug"))
}
register("continuous") {
initWith(getByName("release"))
applicationIdSuffix = ".test"
}
}
sourceSets {
getByName("main") {
assets.srcDirs("../../3rdparty/extras/xash-extras", "../moddb")
java.srcDir("../../3rdparty/SDL/android-project/app/src/main/java")
}
}
lint {
abortOnError = false
}
buildFeatures {
viewBinding = true
buildConfig = true
}
androidResources {
noCompress += ""
}
packaging {
jniLibs {
useLegacyPackaging = true
keepDebugSymbols.add("**/*.so")
}
}
}
dependencies {
implementation("com.google.android.material:material:1.11.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.7.7")
implementation("androidx.navigation:navigation-ui-ktx:2.7.7")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.annotation:annotation:1.7.1")
implementation("androidx.fragment:fragment-ktx:1.6.2")
implementation("androidx.preference:preference-ktx:1.2.1")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
implementation("androidx.work:work-runtime-ktx:2.9.0")
// implementation "androidx.legacy:legacy-support-v4:1.0.0"
implementation("com.madgag.spongycastle:prov:1.58.0.0")
implementation("in.dragonbra:javasteam:1.2.0")
implementation("ch.acra:acra-http:5.11.2")
}
fun getBuildNum(): Int {
val now = LocalDateTime.now()
val releaseDate = LocalDateTime.of(2015, Month.APRIL, 1, 0, 0, 0)
val qBuildNum = releaseDate.until(now, ChronoUnit.DAYS)
val minuteOfDay = now.hour * 60 + now.minute
return (qBuildNum * 10000 + minuteOfDay).toInt()
}

89
android/app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,89 @@
-keep class su.xash.engine.XashActivity {
java.lang.String loadAndroidID();
java.lang.String getAndroidID();
void saveAndroidID(java.lang.String);
java.lang.String getCallingPackage();
java.lang.String[] getAssetsList(boolean, java.lang.String);
android.content.res.AssetManager getAssets(boolean);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLInputConnection {
void nativeCommitText(java.lang.String, int);
void nativeGenerateScancodeForUnichar(char);
}
-keep,includedescriptorclasses class org.libsdl.app.SDLActivity {
# for some reason these aren't compatible with allowoptimization modifier
boolean supportsRelativeMouse();
void setWindowStyle(boolean);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLActivity {
java.lang.String nativeGetHint(java.lang.String); # Java-side doesn't use this, so it gets minified, but C-side still tries to register it
boolean onNativeSoftReturnKey();
void onNativeKeyboardFocusLost();
boolean isScreenKeyboardShown();
android.util.DisplayMetrics getDisplayDPI();
java.lang.String clipboardGetText();
boolean clipboardHasText();
void clipboardSetText(java.lang.String);
int createCustomCursor(int[], int, int, int, int);
void destroyCustomCursor(int);
android.content.Context getContext();
boolean getManifestEnvironmentVariables();
android.view.Surface getNativeSurface();
void initTouch();
boolean isAndroidTV();
boolean isChromebook();
boolean isDeXMode();
boolean isTablet();
void manualBackButton();
int messageboxShowMessageBox(int, java.lang.String, java.lang.String, int[], int[], java.lang.String[], int[]);
void minimizeWindow();
int openURL(java.lang.String);
void requestPermission(java.lang.String, int);
int showToast(java.lang.String, int, int, int, int);
boolean sendMessage(int, int);
boolean setActivityTitle(java.lang.String);
boolean setCustomCursor(int);
void setOrientation(int, int, boolean, java.lang.String);
boolean setRelativeMouseEnabled(boolean);
boolean setSystemCursor(int);
boolean shouldMinimizeOnFocusLoss();
boolean showTextInput(int, int, int, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.HIDDeviceManager {
boolean initialize(boolean, boolean);
boolean openDevice(int);
int sendOutputReport(int, byte[]);
int sendFeatureReport(int, byte[]);
boolean getFeatureReport(int, byte[]);
void closeDevice(int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLAudioManager {
int[] getAudioOutputDevices();
int[] getAudioInputDevices();
int[] audioOpen(int, int, int, int, int);
void audioWriteFloatBuffer(float[]);
void audioWriteShortBuffer(short[]);
void audioWriteByteBuffer(byte[]);
void audioClose();
int[] captureOpen(int, int, int, int, int);
int captureReadFloatBuffer(float[], boolean);
int captureReadShortBuffer(short[], boolean);
int captureReadByteBuffer(byte[], boolean);
void captureClose();
void audioSetThreadPriority(boolean, int);
native int nativeSetupJNI();
native void removeAudioDevice(boolean, int);
native void addAudioDevice(boolean, int);
}
-keep,includedescriptorclasses,allowoptimization class org.libsdl.app.SDLControllerManager {
void pollInputDevices();
void pollHapticDevices();
void hapticRun(int, float, int);
void hapticStop(int);
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">Xash3D FWGS (Test)</string>
<string name="authority" translatable="false">su.xash.engine.test.documents</string>
</resources>

View File

@@ -0,0 +1,26 @@
#!/system/bin/sh
HERE=$(cd "$(dirname "$0")" && pwd)
cmd=$1
shift
# This must be called *before* `LD_PRELOAD` is set. Otherwise, if this is a 32-
# bit app running on a 64-bit device, the 64-bit getprop will fail to load
# because it will preload a 32-bit ASan runtime.
# https://github.com/android/ndk/issues/1744
os_version=$(getprop ro.build.version.sdk)
if [ "$os_version" -eq "27" ]; then
cmd="$cmd -Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable $@"
elif [ "$os_version" -eq "28" ]; then
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable $@"
else
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y $@"
fi
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
ASAN_LIB=$(ls "$HERE"/libclang_rt.asan-*-android.so)
if [ -f "$HERE/libc++_shared.so" ]; then
# Workaround for https://github.com/android-ndk/ndk/issues/988.
export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
else
export LD_PRELOAD="$ASAN_LIB"
fi
exec $cmd

View File

@@ -0,0 +1,26 @@
#!/system/bin/sh
HERE=$(cd "$(dirname "$0")" && pwd)
cmd=$1
shift
# This must be called *before* `LD_PRELOAD` is set. Otherwise, if this is a 32-
# bit app running on a 64-bit device, the 64-bit getprop will fail to load
# because it will preload a 32-bit ASan runtime.
# https://github.com/android/ndk/issues/1744
os_version=$(getprop ro.build.version.sdk)
if [ "$os_version" -eq "27" ]; then
cmd="$cmd -Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable $@"
elif [ "$os_version" -eq "28" ]; then
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable $@"
else
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y $@"
fi
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
ASAN_LIB=$(ls "$HERE"/libclang_rt.asan-*-android.so)
if [ -f "$HERE/libc++_shared.so" ]; then
# Workaround for https://github.com/android-ndk/ndk/issues/988.
export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
else
export LD_PRELOAD="$ASAN_LIB"
fi
exec $cmd

View File

@@ -0,0 +1,26 @@
#!/system/bin/sh
HERE=$(cd "$(dirname "$0")" && pwd)
cmd=$1
shift
# This must be called *before* `LD_PRELOAD` is set. Otherwise, if this is a 32-
# bit app running on a 64-bit device, the 64-bit getprop will fail to load
# because it will preload a 32-bit ASan runtime.
# https://github.com/android/ndk/issues/1744
os_version=$(getprop ro.build.version.sdk)
if [ "$os_version" -eq "27" ]; then
cmd="$cmd -Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable $@"
elif [ "$os_version" -eq "28" ]; then
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable $@"
else
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y $@"
fi
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
ASAN_LIB=$(ls "$HERE"/libclang_rt.asan-*-android.so)
if [ -f "$HERE/libc++_shared.so" ]; then
# Workaround for https://github.com/android-ndk/ndk/issues/988.
export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
else
export LD_PRELOAD="$ASAN_LIB"
fi
exec $cmd

View File

@@ -0,0 +1,26 @@
#!/system/bin/sh
HERE=$(cd "$(dirname "$0")" && pwd)
cmd=$1
shift
# This must be called *before* `LD_PRELOAD` is set. Otherwise, if this is a 32-
# bit app running on a 64-bit device, the 64-bit getprop will fail to load
# because it will preload a 32-bit ASan runtime.
# https://github.com/android/ndk/issues/1744
os_version=$(getprop ro.build.version.sdk)
if [ "$os_version" -eq "27" ]; then
cmd="$cmd -Xrunjdwp:transport=dt_android_adb,suspend=n,server=y -Xcompiler-option --debuggable $@"
elif [ "$os_version" -eq "28" ]; then
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y -Xcompiler-option --debuggable $@"
else
cmd="$cmd -XjdwpProvider:adbconnection -XjdwpOptions:suspend=n,server=y $@"
fi
export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1
ASAN_LIB=$(ls "$HERE"/libclang_rt.asan-*-android.so)
if [ -f "$HERE/libc++_shared.so" ]; then
# Workaround for https://github.com/android-ndk/ndk/issues/988.
export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so"
else
export LD_PRELOAD="$ASAN_LIB"
fi
exec $cmd

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">Xash3D FWGS (Test)</string>
<string name="authority" translatable="false">su.xash.engine.test.documents</string>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">Xash3D FWGS (Test)</string>
<string name="authority" translatable="false">su.xash.engine.test.documents</string>
</resources>

View File

@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:allowAudioPlaybackCapture="true"
android:installLocation="preferExternal"
tools:targetApi="q">
<!-- OpenGL ES 1.1 -->
<uses-feature android:glEsVersion="0x00010000" />
<!-- Touchscreen support -->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.gamepad"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events -->
<uses-feature
android:name="android.hardware.type.pc"
android:required="false" />
<!-- Audio recording support -->
<uses-feature
android:name="android.hardware.microphone"
android:required="false" />
<!-- Allow downloading to the external storage on Android 5.1 and older -->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<!-- Allow access to Bluetooth devices -->
<!-- Currently this is just for Steam Controller support and requires setting SDL_HINT_JOYSTICK_HIDAPI_STEAM -->
<uses-permission
android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Allow recording audio -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Allow internet access -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Dedicated server -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<application
android:name=".MainApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:theme="@style/Theme.App"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".XashActivity"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation|touchscreen"
android:exported="true"
android:launchMode="singleTask"
android:preferMinimalPostProcessing="true"
android:windowSoftInputMode="adjustResize"
tools:targetApi="r">
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
</activity>
<provider
android:name=".XashDocumentsProvider"
android:authorities="@string/authority"
android:exported="true"
android:grantUriPermissions="true"
android:permission="android.permission.MANAGE_DOCUMENTS">
<intent-filter>
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
</intent-filter>
</provider>
</application>
<queries>
<intent>
<action android:name="su.xash.engine.MOD" />
</intent>
</queries>
</manifest>

View File

@@ -0,0 +1,49 @@
package su.xash.engine;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.widget.FrameLayout;
public class AndroidBug5497Workaround {
// For more information, see https://code.google.com/p/android/issues/detail?id=5497
// To use this class, simply invoke assistActivity() on an Activity that already has its content view set.
public static void assistActivity(Activity activity) {
new AndroidBug5497Workaround(activity);
}
private View mChildOfContent;
private int usableHeightPrevious;
private FrameLayout.LayoutParams frameLayoutParams;
private AndroidBug5497Workaround(Activity activity) {
FrameLayout content = activity.findViewById(android.R.id.content);
mChildOfContent = content.getChildAt(0);
mChildOfContent.getViewTreeObserver().addOnGlobalLayoutListener(this::possiblyResizeChildOfContent);
frameLayoutParams = (FrameLayout.LayoutParams) mChildOfContent.getLayoutParams();
}
private void possiblyResizeChildOfContent() {
int usableHeightNow = computeUsableHeight();
if (usableHeightNow != usableHeightPrevious) {
int usableHeightSansKeyboard = mChildOfContent.getRootView().getHeight();
int heightDifference = usableHeightSansKeyboard - usableHeightNow;
if (heightDifference > (usableHeightSansKeyboard / 4)) {
// keyboard probably just became visible
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
} else {
// keyboard probably just became hidden
frameLayoutParams.height = usableHeightSansKeyboard;
}
mChildOfContent.requestLayout();
usableHeightPrevious = usableHeightNow;
}
}
private int computeUsableHeight() {
Rect r = new Rect();
mChildOfContent.getWindowVisibleDisplayFrame(r);
return (r.bottom - r.top);
}
}

View File

@@ -0,0 +1,4 @@
package su.xash.engine
class DedicatedActivity {
}

View File

@@ -0,0 +1,11 @@
package su.xash.engine
import android.app.Service
import android.content.Intent
import android.os.IBinder
class DedicatedService: Service() {
override fun onBind(intent: Intent?): IBinder? {
TODO("Not yet implemented")
}
}

View File

@@ -0,0 +1,35 @@
package su.xash.engine
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController
import su.xash.engine.databinding.ActivityMainBinding
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private lateinit var appBarConfiguration: AppBarConfiguration
private lateinit var navController: NavController
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
setSupportActionBar(binding.toolbar)
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragmentContainerView) as NavHostFragment
navController = navHostFragment.navController
appBarConfiguration = AppBarConfiguration(navController.graph)
setupActionBarWithNavController(navController, appBarConfiguration)
}
override fun onSupportNavigateUp(): Boolean {
return navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
}
}

View File

@@ -0,0 +1,28 @@
package su.xash.engine
import android.app.Application
import android.content.Context
import android.os.StrictMode
import org.acra.config.httpSender
import org.acra.data.StringFormat
import org.acra.ktx.initAcra
class MainApplication : Application() {
override fun attachBaseContext(base: Context?) {
super.attachBaseContext(base)
if (!BuildConfig.DEBUG) {
initAcra {
buildConfigClass = BuildConfig::class.java
reportFormat = StringFormat.JSON
httpSender {
uri = "http://bodis.pp.ua:5000/report"
}
}
} else {
// enable strict mode to detect memory leaks etc.
StrictMode.enableDefaults();
}
}
}

View File

@@ -0,0 +1,148 @@
package su.xash.engine;
import android.annotation.SuppressLint;
import android.content.pm.ActivityInfo;
import android.content.res.AssetManager;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings.Secure;
import android.util.Log;
import android.view.KeyEvent;
import android.view.WindowManager;
import org.libsdl.app.SDLActivity;
public class XashActivity extends SDLActivity {
private boolean mUseVolumeKeys;
private String mPackageName;
private static final String TAG = "XashActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
//getWindow().addFlags(WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES);
getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
}
AndroidBug5497Workaround.assistActivity(this);
}
@Override
public void onDestroy()
{
super.onDestroy();
// Now that we don't exit from native code, we need to exit here, resetting
// application state (actually global variables that we don't cleanup on exit)
//
// When the issue with global variables will be resolved, remove that exit() call
System.exit(0);
}
@Override
protected String[] getLibraries() {
return new String[]{"SDL2", "xash"};
}
@SuppressLint("HardwareIds")
private String getAndroidID() {
return Secure.getString(getContentResolver(), Secure.ANDROID_ID);
}
@SuppressLint("ApplySharedPref")
private void saveAndroidID(String id) {
getSharedPreferences("xash_preferences", MODE_PRIVATE).edit().putString("xash_id", id).commit();
}
private String loadAndroidID() {
return getSharedPreferences("xash_preferences", MODE_PRIVATE).getString("xash_id", "");
}
@Override
public String getCallingPackage() {
if (mPackageName != null) {
return mPackageName;
}
return super.getCallingPackage();
}
private AssetManager getAssets(boolean isEngine) {
AssetManager am = null;
if (isEngine) {
am = getAssets();
} else {
try {
am = getPackageManager().getResourcesForApplication(getCallingPackage()).getAssets();
} catch (Exception e) {
Log.e(TAG, "Unable to load mod assets!");
e.printStackTrace();
}
}
return am;
}
private String[] getAssetsList(boolean isEngine, String path) {
AssetManager am = getAssets(isEngine);
try {
return am.list(path);
} catch (Exception e) {
e.printStackTrace();
}
return new String[]{};
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (SDLActivity.mBrokenLibraries) {
return false;
}
int keyCode = event.getKeyCode();
if (!mUseVolumeKeys) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
keyCode == KeyEvent.KEYCODE_CAMERA ||
keyCode == KeyEvent.KEYCODE_ZOOM_IN ||
keyCode == KeyEvent.KEYCODE_ZOOM_OUT) {
return false;
}
}
return getWindow().superDispatchKeyEvent(event);
}
// TODO: REMOVE LATER, temporary launchers support?
@Override
protected String[] getArguments() {
String gamedir = getIntent().getStringExtra("gamedir");
if (gamedir == null) gamedir = "valve";
nativeSetenv("XASH3D_GAME", gamedir);
String gamelibdir = getIntent().getStringExtra("gamelibdir");
if (gamelibdir != null) nativeSetenv("XASH3D_GAMELIBDIR", gamelibdir);
String pakfile = getIntent().getStringExtra("pakfile");
if (pakfile != null) nativeSetenv("XASH3D_EXTRAS_PAK2", pakfile);
mUseVolumeKeys = getIntent().getBooleanExtra("usevolume", false);
mPackageName = getIntent().getStringExtra("package");
String[] env = getIntent().getStringArrayExtra("env");
if (env != null) {
for (int i = 0; i < env.length; i += 2)
nativeSetenv(env[i], env[i + 1]);
}
String argv = getIntent().getStringExtra("argv");
if (argv == null) argv = "-console -log";
return argv.split(" ");
}
}

View File

@@ -0,0 +1,253 @@
package su.xash.engine;
import android.annotation.TargetApi;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.graphics.Point;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.ParcelFileDescriptor;
import android.provider.DocumentsContract.Document;
import android.provider.DocumentsContract.Root;
import android.provider.DocumentsProvider;
import android.webkit.MimeTypeMap;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
@TargetApi(Build.VERSION_CODES.KITKAT)
public class XashDocumentsProvider extends DocumentsProvider {
private static final String ALL_MIME_TYPES = "*/*";
private File mRootDir;
private static final String TAG = "XashDocumentsProvider";
@Override
public boolean onCreate() {
mRootDir = getContext().getExternalFilesDir(null);
return true;
}
private static final String[] DEFAULT_ROOT_PROJECTION = new String[]{Root.COLUMN_ROOT_ID,
Root.COLUMN_MIME_TYPES,
Root.COLUMN_FLAGS,
Root.COLUMN_ICON,
Root.COLUMN_TITLE,
Root.COLUMN_SUMMARY,
Root.COLUMN_DOCUMENT_ID,
Root.COLUMN_AVAILABLE_BYTES};
private static final String[] DEFAULT_DOCUMENT_PROJECTION = new String[]{Document.COLUMN_DOCUMENT_ID,
Document.COLUMN_MIME_TYPE,
Document.COLUMN_DISPLAY_NAME,
Document.COLUMN_LAST_MODIFIED,
Document.COLUMN_FLAGS,
Document.COLUMN_SIZE};
@Override
public Cursor queryRoots(String[] projection) {
final MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_ROOT_PROJECTION);
final String appName = getContext().getString(R.string.app_name);
final String docId = getDocIdForFile(mRootDir);
int flags;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
flags = Root.FLAG_LOCAL_ONLY | Root.FLAG_SUPPORTS_CREATE | Root.FLAG_SUPPORTS_SEARCH;
} else {
flags = Root.FLAG_LOCAL_ONLY | Root.FLAG_SUPPORTS_CREATE | Root.FLAG_SUPPORTS_SEARCH | Root.FLAG_SUPPORTS_IS_CHILD;
}
final MatrixCursor.RowBuilder row = result.newRow();
row.add(Root.COLUMN_ROOT_ID, docId);
row.add(Root.COLUMN_DOCUMENT_ID, docId);
row.add(Root.COLUMN_SUMMARY, null);
row.add(Root.COLUMN_FLAGS, flags);
row.add(Root.COLUMN_TITLE, appName);
row.add(Root.COLUMN_MIME_TYPES, ALL_MIME_TYPES);
row.add(Root.COLUMN_AVAILABLE_BYTES, mRootDir.getFreeSpace());
row.add(Root.COLUMN_ICON, R.mipmap.ic_launcher);
return result;
}
@Override
public Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException {
final MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION);
includeFile(result, documentId, null);
return result;
}
@Override
public Cursor queryChildDocuments(String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException {
final MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION);
final File parent = getFileForDocId(parentDocumentId);
final File[] filesList = parent.listFiles();
if (filesList != null) {
for (File file : filesList) {
includeFile(result, null, file);
}
}
return result;
}
@Override
public ParcelFileDescriptor openDocument(final String documentId, String mode, CancellationSignal signal) throws FileNotFoundException {
final File file = getFileForDocId(documentId);
final int accessMode = ParcelFileDescriptor.parseMode(mode);
return ParcelFileDescriptor.open(file, accessMode);
}
@Override
public AssetFileDescriptor openDocumentThumbnail(String documentId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException {
final File file = getFileForDocId(documentId);
final ParcelFileDescriptor pfd = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
return new AssetFileDescriptor(pfd, 0, file.length());
}
@Override
public String createDocument(String parentDocumentId, String mimeType, String displayName) throws FileNotFoundException {
File newFile = new File(parentDocumentId, displayName);
int noConflictId = 1;
while (newFile.exists()) {
newFile = new File(parentDocumentId, displayName + " (" + noConflictId++ + ")");
}
try {
boolean succeeded;
if (Document.MIME_TYPE_DIR.equals(mimeType)) {
succeeded = newFile.mkdir();
} else {
succeeded = newFile.createNewFile();
}
if (!succeeded) {
throw new FileNotFoundException("Failed to create document with id " + newFile.getPath());
}
} catch (IOException e) {
throw new FileNotFoundException("Failed to create document with id " + newFile.getPath());
}
return newFile.getPath();
}
@Override
public void deleteDocument(String documentId) throws FileNotFoundException {
File file = getFileForDocId(documentId);
if (file.isDirectory()) {
if (!deleteDirectory(file)) {
throw new FileNotFoundException("Failed to delete document with id " + documentId);
}
} else if (!file.delete()) {
throw new FileNotFoundException("Failed to delete document with id " + documentId);
}
}
@Override
public String getDocumentType(String documentId) throws FileNotFoundException {
File file = getFileForDocId(documentId);
return getMimeType(file);
}
@Override
public boolean isChildDocument(String parentDocumentId, String documentId) {
return documentId.startsWith(parentDocumentId);
}
private static File getFileForDocId(String docId) throws FileNotFoundException {
final File f = new File(docId);
if (!f.exists()) throw new FileNotFoundException(f.getAbsolutePath() + " not found");
return f;
}
private static String getDocIdForFile(File file) {
return file.getAbsolutePath();
}
private static String getMimeType(File file) {
if (file.isDirectory()) {
return Document.MIME_TYPE_DIR;
} else {
final String name = file.getName();
final int lastDot = name.lastIndexOf('.');
if (lastDot >= 0) {
final String extension = name.substring(lastDot + 1).toLowerCase();
final String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
if (mime != null) return mime;
}
return "application/octet-stream";
}
}
private static boolean deleteDirectory(File dir) {
final File[] allContents = dir.listFiles();
if (allContents != null) {
for (File file : allContents) {
deleteDirectory(file);
}
}
return dir.delete();
}
private void includeFile(MatrixCursor result, String docId, File file) throws FileNotFoundException {
if (docId == null) {
docId = getDocIdForFile(file);
} else {
file = getFileForDocId(docId);
}
int flags = 0;
if (file.isDirectory()) {
if (file.canWrite()) {
flags |= Document.FLAG_DIR_SUPPORTS_CREATE;
}
} else if (file.canWrite()) {
flags |= Document.FLAG_SUPPORTS_WRITE;
}
File parentFile = file.getParentFile();
if (parentFile != null && parentFile.canWrite()) {
flags |= Document.FLAG_SUPPORTS_DELETE;
}
final String displayName = file.getName();
final String mimeType = getMimeType(file);
if (mimeType.startsWith("image/")) {
flags |= Document.FLAG_SUPPORTS_THUMBNAIL;
}
final MatrixCursor.RowBuilder row = result.newRow();
row.add(Document.COLUMN_DOCUMENT_ID, docId);
row.add(Document.COLUMN_DISPLAY_NAME, displayName);
row.add(Document.COLUMN_SIZE, file.length());
row.add(Document.COLUMN_MIME_TYPE, mimeType);
row.add(Document.COLUMN_LAST_MODIFIED, file.lastModified());
row.add(Document.COLUMN_FLAGS, flags);
row.add(Document.COLUMN_ICON, R.mipmap.ic_launcher);
}
}

View File

@@ -0,0 +1,77 @@
package su.xash.engine.adapters
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.findNavController
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import su.xash.engine.R
import su.xash.engine.databinding.CardGameBinding
import su.xash.engine.model.Game
import su.xash.engine.ui.library.LibraryViewModel
class GameAdapter(private val libraryViewModel: LibraryViewModel) :
ListAdapter<Game, GameAdapter.GameViewHolder>(DiffCallback()) {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): GameAdapter.GameViewHolder {
val binding = CardGameBinding.inflate(LayoutInflater.from(parent.context), parent, false)
return GameViewHolder(binding)
}
override fun onBindViewHolder(holder: GameAdapter.GameViewHolder, position: Int) {
return holder.bind(getItem(position))
}
private class DiffCallback : DiffUtil.ItemCallback<Game>() {
override fun areItemsTheSame(oldItem: Game, newItem: Game): Boolean {
return oldItem.basedir.name == newItem.basedir.name
}
override fun areContentsTheSame(oldItem: Game, newItem: Game): Boolean {
return oldItem.basedir.name == newItem.basedir.name && oldItem.installed == newItem.installed
}
}
inner class GameViewHolder(val binding: CardGameBinding) :
RecyclerView.ViewHolder(binding.root) {
fun bind(game: Game) {
binding.apply {
gameTitle.text = game.title
if (game.icon != null) {
gameIcon.setImageBitmap(game.icon)
} else {
gameIcon.visibility = View.GONE
}
if (game.cover != null) {
gameCover.setImageBitmap(game.cover)
} else {
gameCover.visibility = View.GONE
}
if (!game.installed) {
launchButton.visibility = View.GONE
settingsButton.visibility = View.GONE
progressIndicator.visibility = View.VISIBLE
return
}
settingsButton.setOnClickListener {
libraryViewModel.setSelectedGame(game)
it.findNavController()
.navigate(R.id.action_libraryFragment_to_gameSettingsFragment)
}
root.setOnClickListener { libraryViewModel.startEngine(it.context, game) }
launchButton.setOnClickListener {
libraryViewModel.startEngine(it.context, game)
}
}
}
}
}

View File

@@ -0,0 +1,89 @@
package su.xash.engine.model
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Canvas
import androidx.documentfile.provider.DocumentFile
import su.xash.engine.util.TGAReader
import java.util.Scanner
object BackgroundBitmap {
private const val BACKGROUND_ROWS = 3
private const val BACKGROUND_COLUMNS = 4
private const val BACKGROUND_WIDTH = 800
private const val BACKGROUND_HEIGHT = 600
fun createBackground(ctx: Context, file: DocumentFile): Bitmap {
var bitmap =
Bitmap.createBitmap(BACKGROUND_WIDTH, BACKGROUND_HEIGHT, Bitmap.Config.ARGB_8888)
var canvas = Canvas(bitmap)
var x: Int
var y = 0
var width: Int
var height = 0
var bgLayout = file.findFile("resource")?.findFile("HD_BackgroundLayout.txt")
if (bgLayout == null) {
bgLayout = file.findFile("resource")?.findFile("BackgroundLayout.txt")
}
if (bgLayout == null) {
val dir = file.findFile("resource")?.findFile("background")
for (i in 0 until BACKGROUND_ROWS) {
x = 0
for (j in 0 until BACKGROUND_COLUMNS) {
val filename = "${BACKGROUND_WIDTH}_${i + 1}_${'a' + j}_loading.tga"
val bmpFile = dir?.findFile(filename)
val bmpImage = loadTga(ctx, bmpFile!!)
canvas.drawBitmap(bmpImage, x.toFloat(), y.toFloat(), null)
x += bmpImage.width
height = bmpImage.height
}
y += height
}
return bitmap
}
ctx.contentResolver.openInputStream(bgLayout.uri).use { inputStream ->
Scanner(inputStream).use { scanner ->
while (scanner.hasNext()) {
when (val str = scanner.next()) {
"resolution" -> {
width = scanner.nextInt()
height = scanner.nextInt()
bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
canvas = Canvas(bitmap)
}
else -> {
var bmpFile = file
str.split("/").forEach { bmpFile = bmpFile.findFile(it)!! }
//skip
scanner.next()
x = scanner.nextInt()
y = scanner.nextInt()
val bmp = loadTga(ctx, bmpFile)
canvas.drawBitmap(bmp, x.toFloat(), y.toFloat(), null)
}
}
}
}
}
return bitmap
}
private fun loadTga(ctx: Context, file: DocumentFile): Bitmap {
ctx.contentResolver.openInputStream(file.uri).use {
val buffer = it?.readBytes()
val pixels = TGAReader.read(buffer, TGAReader.ARGB)
val width = TGAReader.getWidth(buffer)
val height = TGAReader.getHeight(buffer)
return Bitmap.createBitmap(pixels, 0, width, width, height, Bitmap.Config.ARGB_8888)
}
}
}

View File

@@ -0,0 +1,133 @@
package su.xash.engine.model
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.net.Uri
import android.provider.MediaStore
import androidx.documentfile.provider.DocumentFile
import su.xash.engine.XashActivity
class Game(val ctx: Context, val basedir: DocumentFile, var installed: Boolean = true) {
private var iconName = "game.ico"
var title = "Unknown Game"
var icon: Bitmap? = null
var cover: Bitmap? = null
private val pref = ctx.getSharedPreferences(basedir.name, Context.MODE_PRIVATE)
init {
basedir.findFile("gameinfo.txt")?.let {
parseGameInfo(it)
} ?: basedir.findFile("liblist.gam")?.let { parseGameInfo(it) }
basedir.findFile(iconName)
?.let { icon = MediaStore.Images.Media.getBitmap(ctx.contentResolver, it.uri) }
try {
cover = BackgroundBitmap.createBackground(ctx, basedir)
} catch (e: Exception) {
e.printStackTrace()
}
}
fun startEngine(ctx: Context) {
ctx.startActivity(Intent(ctx, XashActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
putExtra("gamedir", basedir.name)
putExtra("argv", pref.getString("arguments", "-console -log"))
putExtra("usevolume", pref.getBoolean("use_volume_buttons", false))
//.putExtra("gamelibdir", getGameLibDir(context))
//.putExtra("package", getPackageName()) }
})
}
private fun parseGameInfo(file: DocumentFile) {
ctx.contentResolver.openInputStream(file.uri).use { inputStream ->
inputStream?.bufferedReader().use { reader ->
reader?.forEachLine {
val tokens = it.split("\\s+".toRegex(), limit = 2)
if (tokens.size >= 2) {
val k = tokens[0]
val v = tokens[1].trim('"')
if (k == "title" || k == "game") title = v
if (k == "icon") iconName = v
}
}
}
}
}
private fun getPackageName(): String? {
// return if (mDbEntry != null) {
// mDbEntry.getPackageName()
// } else null
return null
}
private fun getGameLibDir(ctx: Context): String? {
val pkgName = getPackageName()
if (pkgName != null) {
val pkgInfo: PackageInfo = try {
ctx.packageManager.getPackageInfo(pkgName, 0)
} catch (e: PackageManager.NameNotFoundException) {
e.printStackTrace()
ctx.startActivity(
Intent(
Intent.ACTION_VIEW, Uri.parse("market://details?id=$pkgName")
).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
)
return null
}
return pkgInfo.applicationInfo.nativeLibraryDir
}
return ctx.applicationInfo.nativeLibraryDir
}
companion object {
fun getGames(ctx: Context, file: DocumentFile): List<Game> {
val games = mutableListOf<Game>()
if (checkIfGamedir(file)) {
games.add(Game(ctx, file))
} else {
file.listFiles().forEach {
if (it.isDirectory) {
if (checkIfGamedir(it)) {
games.add(Game(ctx, it))
}
}
}
}
return games
}
fun checkIfGamedir(file: DocumentFile): Boolean {
// exclude unfinished downloads
if (file.name?.startsWith('.') == true)
return false
file.findFile("liblist.gam")?.let { return true }
file.findFile("gameinfo.txt")?.let { return true }
return false
}
}
}
// Intent intent = new Intent("su.xash.engine.MOD");
// for (ResolveInfo info : context.getPackageManager()
// .queryIntentActivities(intent, PackageManager.GET_META_DATA)) {
// String packageName = info.activityInfo.applicationInfo.packageName;
// String gameDir = info.activityInfo.applicationInfo.metaData.getString(
// "su.xash.engine.gamedir");
// Log.d(TAG, "package = " + packageName + " gamedir = " + gameDir);
// }
//public void startEngine(Context context) {
// context.startActivity(new Intent(context, XashActivity.class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP).putExtra("gamedir", getGameDir()).putExtra("argv", getArguments()).putExtra("usevolume", getVolumeState()).putExtra("gamelibdir", getGameLibDir(context)).putExtra("package", getPackageName()));
//}

View File

@@ -0,0 +1,59 @@
package su.xash.engine.model
import org.json.JSONArray
import org.json.JSONObject
import java.io.InputStream
class ModDatabase(inputStream: InputStream) {
val entries = mutableListOf<Entry>()
companion object {
const val VERSION = 1
fun getFilename(): String {
return "v${VERSION}.json"
}
}
init {
inputStream.bufferedReader().use {
val jsonArray = JSONArray(it.readText())
for (i in 0..<jsonArray.length()) {
entries.add(Entry(jsonArray.getJSONObject(i)))
}
}
}
fun getByGameDir(gamedir: String): Entry? {
return entries.filter { it.gamedir.equals(gamedir) }.firstOrNull()
}
inner class Entry(jsonObject: JSONObject) {
var name: String? = null
var appid: Int? = null
var gamedir: String? = null
// TODO Depots
var pkgname: String? = null
init {
if (jsonObject.has("name")) {
name = jsonObject.getString("name");
}
if (jsonObject.has("app_id")) {
appid = jsonObject.getInt("app_id");
}
if (jsonObject.has("gamedir")) {
gamedir = jsonObject.getString("gamedir");
}
if (jsonObject.has("package_name")) {
pkgname = jsonObject.getString("package_name");
}
}
}
}

View File

@@ -0,0 +1,94 @@
package su.xash.engine.ui.library
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.core.view.MenuProvider
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import androidx.navigation.fragment.findNavController
import kotlinx.coroutines.launch
import su.xash.engine.R
import su.xash.engine.adapters.GameAdapter
import su.xash.engine.databinding.FragmentLibraryBinding
class LibraryFragment : Fragment(), MenuProvider {
private var _binding: FragmentLibraryBinding? = null
private val binding get() = _binding!!
private val libraryViewModel: LibraryViewModel by activityViewModels()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = FragmentLibraryBinding.inflate(inflater, container, false)
val adapter = GameAdapter(libraryViewModel)
binding.gamesList.adapter = adapter
requireActivity().addMenuProvider(this, viewLifecycleOwner, Lifecycle.State.RESUMED)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
binding.swipeRefresh.setOnRefreshListener { libraryViewModel.reloadGames(requireContext()) }
libraryViewModel.isReloading.observe(viewLifecycleOwner) {
binding.swipeRefresh.isRefreshing = it
}
libraryViewModel.installedGames.observe(viewLifecycleOwner) {
(binding.gamesList.adapter as GameAdapter).submitList(it)
}
libraryViewModel.workInfos.observe(viewLifecycleOwner) {
libraryViewModel.refreshDownloads(requireContext())
}
libraryViewModel.downloads.observe(viewLifecycleOwner) {
libraryViewModel.reloadGames(requireContext())
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
menuInflater.inflate(R.menu.menu_library, menu)
}
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
when (menuItem.itemId) {
R.id.action_browse -> {
startActivity(
Intent(Intent.ACTION_VIEW).setDataAndType(
null, "vnd.android.document/directory"
)
)
}
R.id.action_install -> {
findNavController().navigate(R.id.action_libraryFragment_to_setupFragment)
}
R.id.action_settings -> {
findNavController().navigate(R.id.action_libraryFragment_to_appSettingsFragment)
}
}
return false
}
}

View File

@@ -0,0 +1,127 @@
package su.xash.engine.ui.library
import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.viewModelScope
import androidx.preference.PreferenceManager
import androidx.work.Data
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.OutOfQuotaPolicy
import androidx.work.WorkInfo
import androidx.work.WorkManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import su.xash.engine.model.Game
import su.xash.engine.model.ModDatabase
import su.xash.engine.workers.FileCopyWorker
import su.xash.engine.workers.KEY_FILE_URI
import java.util.Locale
const val TAG_INSTALL = "TAG_INSTALL"
class LibraryViewModel(application: Application) : AndroidViewModel(application) {
val installedGames: LiveData<List<Game>> get() = _installedGames
private val _installedGames = MutableLiveData(emptyList<Game>())
val downloads: LiveData<List<Game>> get() = _downloads
private val _downloads = MutableLiveData(emptyList<Game>())
val isReloading: LiveData<Boolean> get() = _isReloading
private val _isReloading = MutableLiveData(false)
private val workManager = WorkManager.getInstance(application.applicationContext)
val workInfos: LiveData<List<WorkInfo>> = workManager.getWorkInfosByTagLiveData(TAG_INSTALL)
val selectedItem: LiveData<Game> get() = _selectedItem
private val _selectedItem = MutableLiveData<Game>()
val appPreferences = application.getSharedPreferences("app_preferences", Context.MODE_PRIVATE)
val modDb: ModDatabase
init {
modDb = application.assets.open(ModDatabase.getFilename()).use { ModDatabase(it) }
reloadGames(application.applicationContext)
}
fun reloadGames(ctx: Context) {
if (isReloading.value == true) {
return
}
_isReloading.value = true
viewModelScope.launch {
withContext(Dispatchers.IO) {
val games = mutableListOf<Game>()
val root = DocumentFile.fromFile(ctx.getExternalFilesDir(null)!!)
val installedGames = Game.getGames(ctx, root)
.filter { p -> _downloads.value?.any { p.basedir.name == it.basedir.name } == false }
games.addAll(installedGames)
downloads.value?.let { games.addAll(it) }
_installedGames.postValue(games)
_isReloading.postValue(false)
}
}
}
fun refreshDownloads(ctx: Context) {
viewModelScope.launch {
withContext(Dispatchers.IO) {
val games = mutableListOf<Game>()
workInfos.value?.filter {
it.state == WorkInfo.State.RUNNING && !it.progress.getString(FileCopyWorker.Input)
.isNullOrEmpty()
}?.forEach {
val uri = Uri.parse(it.progress.getString(FileCopyWorker.Input))
val file = DocumentFile.fromTreeUri(ctx, uri)
games.addAll(Game.getGames(ctx, file!!))
games.forEach { g -> g.installed = false }
}
_downloads.postValue(games)
}
}
}
fun installGame(uri: Uri) {
val data = Data.Builder().putString(KEY_FILE_URI, uri.toString()).build()
val request = OneTimeWorkRequestBuilder<FileCopyWorker>().run {
setInputData(data)
addTag(TAG_INSTALL)
build()
}
workManager.enqueue(request)
}
fun setSelectedGame(game: Game) {
_selectedItem.value = game
}
fun uninstallGame(game: Game) {
viewModelScope.launch {
withContext(Dispatchers.IO) {
game.installed = false
game.basedir.delete()
_installedGames.postValue(_installedGames.value)
}
}
}
fun startEngine(ctx: Context, game: Game) {
game.startEngine(ctx)
}
}

View File

@@ -0,0 +1,31 @@
package su.xash.engine.ui.settings
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import su.xash.engine.databinding.FragmentAppSettingsBinding
class AppSettingsFragment : Fragment() {
private var _binding: FragmentAppSettingsBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = FragmentAppSettingsBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
childFragmentManager.beginTransaction()
.add(binding.settingsFragment.id, AppSettingsPreferenceFragment()).commit();
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}

View File

@@ -0,0 +1,12 @@
package su.xash.engine.ui.settings
import android.os.Bundle
import androidx.preference.PreferenceFragmentCompat
import su.xash.engine.R
class AppSettingsPreferenceFragment() : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
preferenceManager.sharedPreferencesName = "app_preferences";
setPreferencesFromResource(R.xml.app_preferences, rootKey);
}
}

View File

@@ -0,0 +1,64 @@
package su.xash.engine.ui.settings
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.navigation.fragment.findNavController
import su.xash.engine.R
import su.xash.engine.databinding.FragmentGameSettingsBinding
import su.xash.engine.ui.library.LibraryViewModel
class GameSettingsFragment : Fragment() {
private var _binding: FragmentGameSettingsBinding? = null
private val binding get() = _binding!!
private val libraryViewModel: LibraryViewModel by activityViewModels()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = FragmentGameSettingsBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val game = libraryViewModel.selectedItem.value!!
binding.gameCard.apply {
gameTitle.text = game.title
if (game.icon != null) {
gameIcon.setImageBitmap(game.icon)
} else {
gameIcon.visibility = View.GONE
}
if (game.cover != null) {
gameCover.setImageBitmap(game.cover)
} else {
gameCover.visibility = View.GONE
}
buttonsContainer.visibility = View.GONE
}
childFragmentManager.beginTransaction()
.add(binding.settingsFragment.id, GameSettingsPreferenceFragment(game))
.commit();
binding.bottomNavigation.menu.findItem(R.id.action_uninstall).setOnMenuItemClickListener {
libraryViewModel.uninstallGame(game)
findNavController().popBackStack()
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}

View File

@@ -0,0 +1,40 @@
package su.xash.engine.ui.settings
import android.os.Bundle
import androidx.preference.ListPreference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreferenceCompat
import su.xash.engine.R
import su.xash.engine.model.Game
class GameSettingsPreferenceFragment(val game: Game) : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
preferenceManager.sharedPreferencesName = game.basedir.name;
setPreferencesFromResource(R.xml.game_preferences, rootKey);
val packageList = findPreference<ListPreference>("package_name")!!
packageList.entries = arrayOf(getString(R.string.app_name))
packageList.entryValues = arrayOf(requireContext().packageName)
if (packageList.value == null) {
packageList.setValueIndex(0);
}
val separatePackages = findPreference<SwitchPreferenceCompat>("separate_libraries")!!
val clientPackage = findPreference<ListPreference>("client_package")!!
val serverPackage = findPreference<ListPreference>("server_package")!!
separatePackages.setOnPreferenceChangeListener { _, newValue ->
if (newValue == true) {
packageList.isVisible = false
clientPackage.isVisible = true
serverPackage.isVisible = true
} else {
packageList.isVisible = true
clientPackage.isVisible = false
serverPackage.isVisible = false
}
true
}
}
}

View File

@@ -0,0 +1,48 @@
package su.xash.engine.ui.setup
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.viewpager2.adapter.FragmentStateAdapter
import su.xash.engine.databinding.FragmentSetupBinding
import su.xash.engine.ui.setup.pages.LocationPageFragment
import su.xash.engine.ui.setup.pages.WelcomePageFragment
class SetupFragment : Fragment() {
private var _binding: FragmentSetupBinding? = null
private val binding get() = _binding!!
private val setupViewModel: SetupViewModel by activityViewModels()
private lateinit var setupPageAdapter: SetupPageAdapter
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = FragmentSetupBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
setupPageAdapter = SetupPageAdapter(this)
binding.viewPager.isUserInputEnabled = false
binding.viewPager.adapter = setupPageAdapter
setupViewModel.pageNumber.observe(viewLifecycleOwner) {
binding.viewPager.setCurrentItem(it, true)
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}
class SetupPageAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {
val pages = listOf(WelcomePageFragment(), LocationPageFragment())
override fun getItemCount(): Int = 2
override fun createFragment(position: Int): Fragment = pages[position]
}

View File

@@ -0,0 +1,25 @@
package su.xash.engine.ui.setup
import android.app.Application
import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import su.xash.engine.MainApplication
import su.xash.engine.model.Game
class SetupViewModel(application: Application) : AndroidViewModel(application) {
val pageNumber: LiveData<Int> get() = _pageNumber
private val _pageNumber = MutableLiveData(0)
fun checkIfGameDir(uri: Uri): Boolean {
val ctx = getApplication<MainApplication>().applicationContext
val file = DocumentFile.fromTreeUri(ctx, uri)!!
return Game.checkIfGamedir(file)
}
fun setPageNumber(pos: Int) {
_pageNumber.value = pos
}
}

View File

@@ -0,0 +1,59 @@
package su.xash.engine.ui.setup.pages
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.activity.result.contract.ActivityResultContracts
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.navigation.fragment.findNavController
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import su.xash.engine.R
import su.xash.engine.databinding.PageLocationBinding
import su.xash.engine.ui.library.LibraryViewModel
import su.xash.engine.ui.setup.SetupViewModel
class LocationPageFragment : Fragment() {
private var _binding: PageLocationBinding? = null
private val binding get() = _binding!!
private val setupViewModel: SetupViewModel by activityViewModels()
private val libraryViewModel: LibraryViewModel by activityViewModels()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = PageLocationBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
binding.pageButton.setOnClickListener {
getGamesDirectory.launch(null)
}
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
private val getGamesDirectory =
registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) {
it?.let {
if (!setupViewModel.checkIfGameDir(it)) {
MaterialAlertDialogBuilder(requireContext()).apply {
setTitle(R.string.error)
setMessage(R.string.setup_location_empty)
setPositiveButton(R.string.ok) { dialog, _ -> dialog.dismiss() }
show()
}
} else {
requireContext().contentResolver.takePersistableUriPermission(it, Intent.FLAG_GRANT_READ_URI_PERMISSION)
libraryViewModel.installGame(it)
findNavController().navigate(R.id.action_setupFragment_to_libraryFragment)
}
}
}
}

View File

@@ -0,0 +1,35 @@
package su.xash.engine.ui.setup.pages
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import su.xash.engine.databinding.PageWelcomeBinding
import su.xash.engine.ui.setup.SetupViewModel
class WelcomePageFragment : Fragment() {
private var _binding: PageWelcomeBinding? = null
private val binding get() = _binding!!
private val setupViewModel: SetupViewModel by activityViewModels()
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
_binding = PageWelcomeBinding.inflate(inflater, container, false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
binding.pageButton.setOnClickListener {
setupViewModel.setPageNumber(1)
}
setupViewModel.setPageNumber(0)
}
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
}

View File

@@ -0,0 +1,589 @@
/**
* TGAReader.java
* <p>
* Copyright (c) 2014 Kenji Sasaki
* Released under the MIT license.
* https://github.com/npedotnet/TGAReader/blob/master/LICENSE
* <p>
* English document
* https://github.com/npedotnet/TGAReader/blob/master/README.md
* <p>
* Japanese document
* http://3dtech.jp/wiki/index.php?TGAReader
*/
package su.xash.engine.util;
import java.io.IOException;
public final class TGAReader {
public static final Order ARGB = new Order(16, 8, 0, 24);
public static final Order ABGR = new Order(0, 8, 16, 24);
public static int getWidth(byte[] buffer) {
return (buffer[12] & 0xFF) | (buffer[13] & 0xFF) << 8;
}
public static int getHeight(byte[] buffer) {
return (buffer[14] & 0xFF) | (buffer[15] & 0xFF) << 8;
}
public static int[] read(byte[] buffer, Order order) throws IOException {
// header
// int idFieldLength = buffer[0] & 0xFF;
// int colormapType = buffer[1] & 0xFF;
int type = buffer[2] & 0xFF;
int colormapOrigin = (buffer[3] & 0xFF) | (buffer[4] & 0xFF) << 8;
int colormapLength = (buffer[5] & 0xFF) | (buffer[6] & 0xFF) << 8;
int colormapDepth = buffer[7] & 0xFF;
// int originX = (buffer[8] & 0xFF) | (buffer[9] & 0xFF) << 8; // unsupported
// int originY = (buffer[10] & 0xFF) | (buffer[11] & 0xFF) << 8; // unsupported
int width = getWidth(buffer);
int height = getHeight(buffer);
int depth = buffer[16] & 0xFF;
int descriptor = buffer[17] & 0xFF;
int[] pixels;
// data
switch (type) {
case COLORMAP: {
int imageDataOffset = 18 + (colormapDepth / 8) * colormapLength;
pixels = createPixelsFromColormap(width, height, colormapDepth, buffer, imageDataOffset, buffer, colormapOrigin, descriptor, order);
}
break;
case RGB:
pixels = createPixelsFromRGB(width, height, depth, buffer, 18, descriptor, order);
break;
case GRAYSCALE:
pixels = createPixelsFromGrayscale(width, height, depth, buffer, 18, descriptor, order);
break;
case COLORMAP_RLE: {
int imageDataOffset = 18 + (colormapDepth / 8) * colormapLength;
byte[] decodeBuffer = decodeRLE(width, height, depth, buffer, imageDataOffset);
pixels = createPixelsFromColormap(width, height, colormapDepth, decodeBuffer, 0, buffer, colormapOrigin, descriptor, order);
}
break;
case RGB_RLE: {
byte[] decodeBuffer = decodeRLE(width, height, depth, buffer, 18);
pixels = createPixelsFromRGB(width, height, depth, decodeBuffer, 0, descriptor, order);
}
break;
case GRAYSCALE_RLE: {
byte[] decodeBuffer = decodeRLE(width, height, depth, buffer, 18);
pixels = createPixelsFromGrayscale(width, height, depth, decodeBuffer, 0, descriptor, order);
}
break;
default:
throw new IOException("Unsupported image type: " + type);
}
return pixels;
}
private static final int COLORMAP = 1;
private static final int RGB = 2;
private static final int GRAYSCALE = 3;
private static final int COLORMAP_RLE = 9;
private static final int RGB_RLE = 10;
private static final int GRAYSCALE_RLE = 11;
private static final int RIGHT_ORIGIN = 0x10;
private static final int UPPER_ORIGIN = 0x20;
private static byte[] decodeRLE(int width, int height, int depth, byte[] buffer, int offset) {
int elementCount = depth / 8;
byte[] elements = new byte[elementCount];
int decodeBufferLength = elementCount * width * height;
byte[] decodeBuffer = new byte[decodeBufferLength];
int decoded = 0;
while (decoded < decodeBufferLength) {
int packet = buffer[offset++] & 0xFF;
if ((packet & 0x80) != 0) { // RLE
for (int i = 0; i < elementCount; i++) {
elements[i] = buffer[offset++];
}
int count = (packet & 0x7F) + 1;
for (int i = 0; i < count; i++) {
for (int j = 0; j < elementCount; j++) {
decodeBuffer[decoded++] = elements[j];
}
}
} else { // RAW
int count = (packet + 1) * elementCount;
for (int i = 0; i < count; i++) {
decodeBuffer[decoded++] = buffer[offset++];
}
}
}
return decodeBuffer;
}
private static int[] createPixelsFromColormap(int width, int height, int depth, byte[] bytes, int offset, byte[] palette, int colormapOrigin, int descriptor, Order order) throws IOException {
int[] pixels;
int rs = order.redShift;
int gs = order.greenShift;
int bs = order.blueShift;
int as = order.alphaShift;
switch (depth) {
case 24:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 3 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * i + (width - j - 1)] = color;
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 3 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * (height - i - 1) + (width - j - 1)] = color;
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 3 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * i + j] = color;
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 3 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * (height - i - 1) + j] = color;
}
}
}
}
break;
case 32:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 4 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = palette[index + 3] & 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * i + (width - j - 1)] = color;
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 4 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = palette[index + 3] & 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * (height - i - 1) + (width - j - 1)] = color;
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 4 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = palette[index + 3] & 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * i + j] = color;
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int colormapIndex = bytes[offset + width * i + j] &
0xFF - colormapOrigin;
int color = 0xFFFFFFFF;
if (colormapIndex >= 0) {
int index = 4 * colormapIndex + 18;
int b = palette[index] & 0xFF;
int g = palette[index + 1] & 0xFF;
int r = palette[index + 2] & 0xFF;
int a = palette[index + 3] & 0xFF;
color = (r << rs) | (g << gs) | (b << bs) | (a << as);
}
pixels[width * (height - i - 1) + j] = color;
}
}
}
}
break;
default:
throw new IOException("Unsupported depth:" + depth);
}
return pixels;
}
private static int[] createPixelsFromRGB(int width, int height, int depth, byte[] bytes, int offset, int descriptor, Order order) throws IOException {
int[] pixels;
int rs = order.redShift;
int gs = order.greenShift;
int bs = order.blueShift;
int as = order.alphaShift;
switch (depth) {
case 24:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 3 * width * i + 3 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = 0xFF;
pixels[width * i + (width - j - 1)] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 3 * width * i + 3 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = 0xFF;
pixels[width * (height - i - 1) + (width - j - 1)] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 3 * width * i + 3 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = 0xFF;
pixels[width * i + j] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 3 * width * i + 3 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = 0xFF;
pixels[width * (height - i - 1) + j] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
}
}
break;
case 32:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 4 * width * i + 4 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = bytes[index + 3] & 0xFF;
pixels[width * i + (width - j - 1)] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 4 * width * i + 4 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = bytes[index + 3] & 0xFF;
pixels[width * (height - i - 1) + (width - j - 1)] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 4 * width * i + 4 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = bytes[index + 3] & 0xFF;
pixels[width * i + j] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int index = offset + 4 * width * i + 4 * j;
int b = bytes[index] & 0xFF;
int g = bytes[index + 1] & 0xFF;
int r = bytes[index + 2] & 0xFF;
int a = bytes[index + 3] & 0xFF;
pixels[width * (height - i - 1) + j] = (r << rs) |
(g << gs) |
(b << bs) |
(a << as);
}
}
}
}
break;
default:
throw new IOException("Unsupported depth:" + depth);
}
return pixels;
}
private static int[] createPixelsFromGrayscale(int width, int height, int depth, byte[] bytes, int offset, int descriptor, Order order) throws IOException {
int[] pixels;
int rs = order.redShift;
int gs = order.greenShift;
int bs = order.blueShift;
int as = order.alphaShift;
switch (depth) {
case 8:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + width * i + j] & 0xFF;
int a = 0xFF;
pixels[width * i + (width - j - 1)] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + width * i + j] & 0xFF;
int a = 0xFF;
pixels[width * (height - i - 1) + (width - j - 1)] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + width * i + j] & 0xFF;
int a = 0xFF;
pixels[width * i + j] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + width * i + j] & 0xFF;
int a = 0xFF;
pixels[width * (height - i - 1) + j] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
}
}
break;
case 16:
pixels = new int[width * height];
if ((descriptor & RIGHT_ORIGIN) != 0) {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + 2 * width * i + 2 * j] & 0xFF;
int a = bytes[offset + 2 * width * i + 2 * j + 1] & 0xFF;
pixels[width * i + (width - j - 1)] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
} else {
// LowerRight
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + 2 * width * i + 2 * j] & 0xFF;
int a = bytes[offset + 2 * width * i + 2 * j + 1] & 0xFF;
pixels[width * (height - i - 1) + (width - j - 1)] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
}
} else {
if ((descriptor & UPPER_ORIGIN) != 0) {
// UpperLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + 2 * width * i + 2 * j] & 0xFF;
int a = bytes[offset + 2 * width * i + 2 * j + 1] & 0xFF;
pixels[width * i + j] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
} else {
// LowerLeft
for (int i = 0; i < height; i++) {
for (int j = 0; j < width; j++) {
int e = bytes[offset + 2 * width * i + 2 * j] & 0xFF;
int a = bytes[offset + 2 * width * i + 2 * j + 1] & 0xFF;
pixels[width * (height - i - 1) + j] = (e << rs) |
(e << gs) |
(e << bs) |
(a << as);
}
}
}
}
break;
default:
throw new IOException("Unsupported depth:" + depth);
}
return pixels;
}
private TGAReader() {
}
public static final class Order {
Order(int redShift, int greenShift, int blueShift, int alphaShift) {
this.redShift = redShift;
this.greenShift = greenShift;
this.blueShift = blueShift;
this.alphaShift = alphaShift;
}
public int redShift;
public int greenShift;
public int blueShift;
public int alphaShift;
}
}

View File

@@ -0,0 +1,97 @@
package su.xash.engine.workers
import android.content.Context
import android.net.Uri
import androidx.documentfile.provider.DocumentFile
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import androidx.work.workDataOf
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
const val KEY_FILE_URI = "KEY_FILE_URI"
class FileCopyWorker(ctx: Context, params: WorkerParameters) : CoroutineWorker(ctx, params) {
companion object {
const val Input = "Input"
const val Progress = "Progress"
}
private var fileCount = 0
private var fileCopied = 0
override suspend fun doWork(): Result {
withContext(Dispatchers.IO) {
val fileUri = inputData.getString(KEY_FILE_URI)
setProgress(workDataOf(Input to fileUri))
val uri = Uri.parse(fileUri)
val source = DocumentFile.fromTreeUri(applicationContext, uri)
fileCount = source?.countDirFiles() ?: return@withContext Result.failure()
setProgress(workDataOf(Progress to 0f))
val gamedir = source.name!!
val externalFilesDir = DocumentFile.fromFile(applicationContext.getExternalFilesDir(null)!!)
// create a directory to store staged files
val target = externalFilesDir.createDirectory(".$gamedir")!!
source.copyDirTo(applicationContext, this@FileCopyWorker, target)
target.renameTo(gamedir)
setProgress(workDataOf(Progress to 1f))
}
return Result.success()
}
suspend fun fileCopied(count: Int) {
if(count == 0)
return
fileCopied += count
val percentage: Float = fileCopied.toFloat() / fileCount.toFloat();
setProgress(workDataOf(Progress to percentage))
}
}
fun DocumentFile.countDirFiles(): Int {
var count: Int = 0
listFiles().forEach {
if (it.isDirectory)
count += it.countDirFiles()
else
count++
}
return count
}
fun DocumentFile.copyFileTo(ctx: Context, file: DocumentFile) {
val outFile = file.createFile("application", name!!)!!
ctx.contentResolver.openOutputStream(outFile.uri).use { os ->
ctx.contentResolver.openInputStream(uri).use {
it?.copyTo(os!!)
}
}
}
suspend fun DocumentFile.copyDirTo(ctx: Context, worker: FileCopyWorker, dir: DocumentFile) {
var count: Int = 0
listFiles().forEach {
if (it.isDirectory) {
val outDir = dir.createDirectory(it.name!!)!!
it.copyDirTo(ctx, worker, outDir)
} else {
it.copyFileTo(ctx, dir)
count++
}
}
worker.fileCopied(count)
}

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM20,18L4,18L4,8h16v10z" />
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M21,10h-8.35C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H13l2,2l2,-2l2,2l4,-4.04L21,10zM7,15c-1.65,0 -3,-1.35 -3,-3c0,-1.65 1.35,-3 3,-3s3,1.35 3,3C10,13.65 8.65,15 7,15z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="#000000"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M8,5v14l11,-7z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z" />
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M20,4H4C2.89,4 2,4.9 2,6v12c0,1.1 0.89,2 2,2h16c1.1,0 2,-0.9 2,-2V6C22,4.9 21.11,4 20,4zM20,18H4V8h16V18zM18,17h-6v-2h6V17zM7.5,17l-1.41,-1.41L8.67,13l-2.59,-2.59L7.5,9l4,4L7.5,17z" />
</vector>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true">
<shape android:shape="rectangle">
<gradient android:endColor="#2D73FF" android:startColor="#06BFFF" />
<corners android:radius="4dp" />
</shape>
</item>
<item android:state_enabled="false">
<shape android:shape="rectangle">
<gradient android:endColor="#6D6D6D" android:startColor="#8F8F8F" />
<corners android:radius="4dp" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M12.004,2c-5.25,0 -9.556,4.05 -9.964,9.197l5.36,2.216c0.454,-0.31 1.002,-0.492 1.593,-0.492 0.053,0 0.104,0.003 0.157,0.005l2.384,-3.452v-0.049c0,-2.08 1.69,-3.77 3.77,-3.77 2.079,0 3.77,1.692 3.77,3.772s-1.692,3.771 -3.77,3.771h-0.087l-3.397,2.426c0,0.043 0.003,0.088 0.003,0.133 0,1.562 -1.262,2.83 -2.825,2.83 -1.362,0 -2.513,-0.978 -2.775,-2.273l-3.838,-1.589C3.573,18.922 7.427,22 12.005,22c5.522,0 9.998,-4.477 9.998,-10 0,-5.522 -4.477,-10 -9.999,-10zM7.078,16.667c0.218,0.452 0.595,0.832 1.094,1.041 1.081,0.45 2.328,-0.063 2.777,-1.145 0.22,-0.525 0.22,-1.1 0.004,-1.625 -0.215,-0.525 -0.625,-0.934 -1.147,-1.152 -0.52,-0.217 -1.075,-0.208 -1.565,-0.025l1.269,0.525c0.797,0.333 1.174,1.25 0.84,2.046 -0.33,0.797 -1.247,1.175 -2.044,0.843l-1.228,-0.508zM17.818,9.422c0,-1.385 -1.128,-2.512 -2.513,-2.512 -1.387,0 -2.512,1.127 -2.512,2.512 0,1.388 1.125,2.513 2.512,2.513 1.386,0 2.512,-1.125 2.512,-2.513zM15.31,7.53c1.04,0 1.888,0.845 1.888,1.888s-0.847,1.888 -1.888,1.888c-1.044,0 -1.888,-0.845 -1.888,-1.888s0.845,-1.888 1.888,-1.888z"/>
</vector>

View File

@@ -0,0 +1,33 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="295.46dp"
android:height="90.47dp"
android:viewportWidth="295.46"
android:viewportHeight="90.47">
<path
android:fillColor="#FF000000"
android:pathData="m45.08,1c-23.24,0 -42.28,17.92 -44.08,40.69l23.71,9.8c2.01,-1.37 4.44,-2.18 7.05,-2.18 0.23,0 0.47,0.01 0.7,0.02l10.54,-15.28c0,-0.07 0,-0.14 0,-0.22 0,-9.2 7.48,-16.68 16.68,-16.68 9.2,0 16.68,7.48 16.68,16.68s-7.48,16.68 -16.68,16.68c-0.13,0 -0.25,0 -0.38,-0.01l-15.04,10.73c0.01,0.19 0.01,0.39 0.01,0.59 0,6.91 -5.62,12.52 -12.52,12.52 -6.06,0 -11.13,-4.33 -12.28,-10.06l-16.96,-7.01c5.25,18.57 22.31,32.18 42.56,32.18 24.43,0 44.24,-19.81 44.24,-44.24 0,-24.43 -19.81,-44.24 -44.24,-44.24"/>
<path
android:fillColor="#FF000000"
android:pathData="m28.72,68.12 l-5.43,-2.24c0.96,2.01 2.63,3.68 4.84,4.61 4.78,1.99 10.3,-0.28 12.29,-5.06 0.96,-2.31 0.97,-4.87 0.01,-7.19 -0.95,-2.32 -2.76,-4.13 -5.07,-5.1 -2.3,-0.96 -4.76,-0.92 -6.93,-0.1l5.61,2.32c3.53,1.47 5.2,5.52 3.72,9.05 -1.47,3.53 -5.52,5.2 -9.05,3.72"/>
<path
android:fillColor="#FF000000"
android:pathData="m70.8,33.83c0,-6.13 -4.99,-11.12 -11.12,-11.12 -6.13,0 -11.12,4.99 -11.12,11.12 0,6.13 4.99,11.11 11.12,11.11 6.13,0 11.12,-4.99 11.12,-11.11m-19.45,-0.02c0,-4.61 3.74,-8.35 8.35,-8.35s8.35,3.74 8.35,8.35 -3.74,8.35 -8.35,8.35 -8.35,-3.74 -8.35,-8.35"/>
<path
android:fillColor="#FF000000"
android:pathData="m136.56,31.27 l-2.96,5.21c-2.28,-1.6 -5.38,-2.56 -8.08,-2.56 -3.09,0 -5,1.28 -5,3.57 0,2.78 3.39,3.43 8.44,5.24 5.42,1.92 8.54,4.17 8.54,9.14 0,6.79 -5.34,10.61 -13.02,10.61 -3.74,0 -8.26,-0.97 -11.73,-3.08l2.16,-5.78c2.82,1.49 6.19,2.37 9.2,2.37 4.05,0 5.98,-1.5 5.98,-3.7 0,-2.53 -2.94,-3.29 -7.68,-4.86 -5.4,-1.8 -9.15,-4.17 -9.15,-9.67 0,-6.2 4.96,-9.76 12.1,-9.76 4.98,0 8.98,1.58 11.2,3.26"/>
<path
android:fillColor="#FF000000"
android:pathData="m152.76,61.9v-27.34h-10.13v-5.99h27.21v5.99h-10.1v27.34z"/>
<path
android:fillColor="#FF000000"
android:pathData="m197.9,42.05v5.99h-13.36v7.82h15.5v6.04h-22.47v-33.33h22.47v5.97h-15.5v7.51z"/>
<path
android:fillColor="#FF000000"
android:pathData="m215.62,55.43 l-2.21,6.47h-7.32l12.49,-33.33h7.03l12.85,33.32h-7.56l-2.25,-6.47h-13.03zM222.07,36.52 L217.51,49.87h9.2z"/>
<path
android:fillColor="#FF000000"
android:pathData="m261.22,60.93 l-8.97,-19.3v20.27h-6.68v-33.33h6.67l11.2,24.06 10.8,-24.06h6.73v33.33h-6.68v-20.44l-9.12,19.47z"/>
<path
android:fillColor="#FF000000"
android:pathData="m294.46,32.78c0,2.86 -2.15,4.65 -4.61,4.65 -2.47,0 -4.62,-1.78 -4.62,-4.65 0,-2.86 2.15,-4.64 4.62,-4.64 2.46,0 4.61,1.77 4.61,4.64m-8.46,0c0,2.4 1.73,3.9 3.85,3.9 2.11,0 3.83,-1.5 3.83,-3.9 0,-2.4 -1.72,-3.88 -3.83,-3.88 -2.12,0 -3.85,1.5 -3.85,3.88m3.91,-2.37c1.2,0 1.6,0.63 1.6,1.32 0,0.63 -0.37,1.05 -0.82,1.26l1.07,2.01h-0.88l-0.9,-1.78h-0.93v1.78h-0.73v-4.58zM289.05,32.54h0.81c0.53,0 0.84,-0.33 0.84,-0.75 0,-0.42 -0.22,-0.69 -0.84,-0.69h-0.81v1.44z"/>
</vector>

Some files were not shown because too many files have changed in this diff Show More