Commit Graph

1319 Commits

Author SHA1 Message Date
Gleb Mazovetskiy 5e0a0765ce Trim all trailing whitespace
The `.editorconfig` file in this repo is configured to trim all trailing
whitespace regardless of whether the line is modified.

Trims all trailing whitespace in the repository to make the codebase easier
to work with in editors that respect `.editorconfig`.

`git blame` becomes less useful on these lines but it already isn't very useful.

Commands:

```
find . -type f -name '*.h' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.c' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
```
2021-01-04 20:55:10 +03:00
Gleb Mazovetskiy 3af742f103 in_touch.c: Fix -Wpointer-to-int-cast 2021-01-02 18:01:53 +03:00
Gleb Mazovetskiy 9452a389a5 SDL GameController: Hotplug and multiple gamepads
1. Process events from all game controllers.
2. Support controller hotplug.
2021-01-02 18:00:36 +03:00
Alibek Omarov 766ef84af4 engine: ref: try to bruteforce all available renderers if we're failed to load requested one 2021-01-02 17:59:53 +03:00
Gleb Mazovetskiy 5b8d504817 Add .clang-format
Based on
725fd84b5b/.clang-format
with the following changes:

1. Uncomments `BasedOnStyle: WebKit` to be explicit.
2. Adds:

       AlignConsecutiveDeclarations: true
       AlignConsecutiveMacros: true
2021-01-02 17:56:58 +03:00
Alibek Omarov 61fe9fd1fe engine: fix some left shifts on signed integers 2021-01-02 05:01:51 +03:00
Gleb Mazovetskiy 33ba1f25f3 sys_linux.c: Increase buffer size for /proc/self/status
Fixes #263
2021-01-02 04:21:01 +03:00
Gleb Mazovetskiy 2106eef4b2 system.c: Fix `Sys_Warn/Error` text buffer sizes
This was using the wrong define
E.g. `-dev 2 -help` output did not fit into it
2021-01-02 03:43:17 +03:00
Gleb Mazovetskiy 23998ef720 makepak.py: Skip all filenames starting with .
This makes it much simpler to define a buildroot package for xash-extras
buildroot places various buildroot-internal dot files in the package build directory
2020-12-30 14:40:32 +03:00
Andrey Akhmichin 1332381e2d engine: server: simplified strings operations. 2020-12-29 20:20:25 +03:00
Gleb Mazovetskiy 7f98998765 ref_gl/gl4es: bump
To get this bugfix: 221fa1e67a
2020-12-29 03:25:57 +03:00
Andrey Akhmichin 5aef09ce5d engine: client: simplified strings operations. 2020-12-29 01:07:00 +03:00
Gleb Mazovetskiy 69e15e9c7b gl4es: Fix `so` name and add to renderer collector
1. `libref_gles2_gl4es.so` -> `libref_gl4es.so` because this is what's
    passed to `R_LoadRenderer`.

2. Add `gl4es` to `DEFAULT_RENDERERS` so that `R_CollectRendererNames`
   finds it.
2020-12-29 00:44:42 +03:00
Andrey Akhmichin 9e1170fc56 Documentation: add list of non-supported mods. 2020-12-29 00:43:50 +03:00
Gleb Mazovetskiy 5a36a26dd1 Fix SDL_GAMECONTROLLER handling
1. Do not disable SDL_JOYSTICK events. Disabling these events causes
   game controller events to be disabled as well. Instead, filter these events out.

2. Fix button mapping (it was off by one).
2020-12-28 16:11:19 +03:00
Gleb Mazovetskiy a92b310e0e Add gl4es submodule
Fixes #248
2020-12-28 16:11:04 +03:00
Gleb Mazovetskiy b40344f1f0 travis: unzip quietly
Helps avoid the following error message:

> The job exceeded the maximum log length, and has been terminated.

(e.g. https://travis-ci.org/github/FWGS/xash3d-fwgs/jobs/751744736)
2020-12-28 13:09:01 +03:00
Gleb Mazovetskiy 36b32cad0f Fix 2 instances of void* pointer arithmetic
Partially reverts 341e440c07

Let's see if this fixes the windows build on travis
2020-12-28 13:08:18 +03:00
mittorn 7b127c23f5 client: fix vgui leaving text input move enabled (breaks CTRL in SDL2) 2020-12-13 10:11:32 +03:00
Alibek Omarov 9acedb3408 travis: restore unzipping file 2020-11-29 19:45:05 +03:00
Andrey Akhmichin 5f54582692 ref_gl: simplified strings operations. 2020-11-29 13:46:48 +03:00
Andrey Akhmichin 63d8794902 ref_soft: r_image.c: remove duplicated Q_strlen() call. 2020-11-29 13:33:50 +03:00
Alibek Omarov ede9e5095d
travis: fix getting android deps 2020-11-28 23:22:57 +03:00
Andrey Akhmichin abd9778ef3 engine: common: simplified strings operations. 2020-11-28 23:20:14 +03:00
Andrey Akhmichin 299e3fe957 utils: mdldec: small update. 2020-11-28 23:18:30 +03:00
Alibek Omarov 3e7e251828 codeql: try to fix analysis tool 2020-11-28 01:34:26 +03:00
Alibek Omarov f2120672d0 travis: update android sdk level 2020-11-28 01:30:55 +03:00
Alibek Omarov d3ab2023ae travis: combine downloading zip file and unpacking it 2020-11-28 01:30:55 +03:00
Andrey Akhmichin cdcd139171 engine: studio.h: rename unused fields as "unused".
engine: studio.h: add assimp-like comments.
2020-11-27 22:06:05 +03:00
Andrey Akhmichin 88e1780c68 engine: studio.h: use vec_t instead of float. 2020-11-27 22:06:05 +03:00
Andrey Akhmichin 68e10d7b53 engine: studio.h: use C99 types. 2020-11-27 22:06:05 +03:00
Andrey Akhmichin 378b655cd2 engine: studio.h: add Paranoia 2: The Savior structures and macros. 2020-11-27 22:06:05 +03:00
Alibek Omarov b7fa48a1eb cirrus: try to fix freebsd 11.4 ci build 2020-11-27 21:59:41 +03:00
Alibek Omarov eb652d53ac public: fix compiling 2020-11-22 19:08:51 +03:00
Andrey Akhmichin c53985c0bc engine: common: imagelib: img_tga.c: refactor Targa encoder. 2020-11-18 18:54:25 +05:00
mittorn f60c398f32 scripts/xcompile/android: add ability to specify HOST_TOOLCHAIN and override hard-coded one 2020-11-18 12:34:38 +03:00
mittorn bb387cfe4b ref_gl/gl4es: fix android build 2020-11-18 12:19:52 +03:00
mittorn 341e440c07 public,sprites: fix -Wcast-align, disable -Werror for it 2020-11-18 12:15:54 +03:00
Aydar Zarifullin e6b9b67825 add codeql-analysis.yml 2020-10-07 23:50:13 +03:00
Alibek Omarov 9c6183e6a0 wscript: add some more alignment related diagnostics 2020-09-29 15:42:43 +03:00
Alibek Omarov 2aaa6c6e04 public: build: add ARMv8 32-bit support, in case of someone actually uses it 2020-09-28 16:17:08 +03:00
Alibek Omarov 80a5c53cb2 engine: client: move ref state updating into standalone function 2020-09-14 14:33:43 +03:00
Agent Agrimar e4a71afe63 engine: client: update the ref state before R_NewMap is called
This fixes fades that occur at the beginning of a map being a tad screwy as a result of the ref state not being updated with fresh values, which only happens when a frame is being rendered (loading happens to prevent that).
2020-09-14 14:33:18 +03:00
Andrey Akhmichin 23ea7ecbcc public: optimize MD5_Print function. 2020-09-14 14:28:47 +03:00
Logan 5cdb35f508 Pass cl.viewentity into S_StartSound for pfnPlaySoundByNameAtLocation
This fixes a minor bug where sounds played via pfnPlaySoundByNameAtLocation (mainly from viewmodel animations e.g. MP5) would be left where it was emitted in the world, rather than following the local player as it does in Goldsrc.
2020-09-11 22:10:32 +03:00
Velaron 03668116d7 platform: win32: COM_CheckLibraryDirectDependency fixes 2020-09-03 22:04:13 +03:00
Velaron f3d8a2bcb0 client: vgui: don't fail if client path not given 2020-09-03 19:22:22 +03:00
Velaron 09ae961221 remove platform-specific macros 2020-08-24 21:22:02 +03:00
Velaron d015e97eae engine: client: m_rawinput support on windows 2020-08-24 21:22:02 +03:00
Velaron b4aecfbf23 engine: move some input code 2020-08-24 21:22:02 +03:00