Commit Graph

1938 Commits

Author SHA1 Message Date
Alibek Omarov
652a946e09 ref_gl: update gl4es submodule 2021-01-29 03:33:36 +03:00
Alibek Omarov
d6d90f03a0 wscript: refactoring, split optimization flags selection and fpic control into standalone modules 2021-01-29 03:33:14 +03:00
Alibek Omarov
d7b3c7b681 engine: proper order for XASH_LOW_MEMORY definitions 2021-01-29 03:24:41 +03:00
Andrey Akhmichin
c158771f59 ref_gl: gl_rsurf.c: don't use asserts to prevent engine from stopping when vbo is disabled. 2021-01-17 23:11:59 +03:00
lewa_j
63c4b2748c platform: win32: sdl: Fix zombie processes after early Sys_Error on windows+sdl 2021-01-16 01:13:57 +03:00
Andrey Akhmichin
9bc3d6d315 utils: mdldec: better validity checks. 2021-01-10 02:31:19 +03:00
Andrey Akhmichin
1a59389261 utils: mdldec: STUDIO_NF_SMOOTH texture flag means "smooth" texrendermode. 2021-01-10 02:30:56 +03:00
Alexey
221a9bab54 Fix screenshots on gles1
> format must be either GL_RGBA or the value of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES.
2021-01-09 18:36:46 +03:00
a1batross
102fb8ec40 mainui: update submodule 2021-01-08 07:43:06 +03:00
a1batross
db89c4236a vgui-dev: update submodule 2021-01-08 07:42:57 +03:00
Alibek Omarov
b1048556c6 gitignore: fix waf ignores 2021-01-08 00:25:14 +03:00
Gleb Mazovetskiy
11194f339d game_launch: Add a --disable-menu-changegame build option
This option is useful when xash3d is launched externally by a script
that performs additional setup.
2021-01-07 22:27:21 +03:00
Gleb Mazovetskiy
c95e847890 Fix joystick trigger thresholds
They were negative by default but they should've been positive:

> a value ranging from -32768 to 32767. Triggers, however, range from 0 to 32767 (they never return a negative value).
https://wiki.libsdl.org/SDL_GameControllerGetAxis

This fixes LTRIGGER and RTRIGGER (L2/Zl and R2/Zr on most gamepads)
2021-01-07 17:37:37 +03:00
Gleb Mazovetskiy
4daa7c23a0 SDL2 GameController: Map axes to engine explicitly 2021-01-07 17:37:37 +03:00
Gleb Mazovetskiy
3e8e751dc7 GameController: Add separate D-Pad bindings
1. Adds separate D-Pad bindings so that they don't conflict with arrow
   keys on the keyboard.
2. Also adds some basic defaults for gamepad buttons.
2021-01-07 17:37:37 +03:00
Gleb Mazovetskiy
239474b01e .clang-format: SpaceBeforeParens: Never
This is more consistent with how xash3d formats its `if` and `switch` statements
2021-01-07 17:34:51 +03:00
Gleb Mazovetskiy
12b579bc34 Fix R_CollectRendererNames
Previously R_CollectRendererNames left gaps in the `ref` subarrays.
This caused `R_Init` to fail in some cases because it iterates between `0` and `ref.numRenderers`.
2021-01-07 17:34:34 +03:00
Gleb Mazovetskiy
6d614e028a Fix COM_LibraryError newline handling
1. Do not append a trailing newline to the result of COM_GetLibraryError.
2. Fix call sites.
2021-01-07 17:33:09 +03:00
Gleb Mazovetskiy
a234888d44 Remove DEFAULT_(ACCELERATED|SOFTWARE)_RENDERER
This is no longer needed as we now use DEFAULT_RENDERERS order priority
and only try to load the detected renderers.
2021-01-07 17:31:56 +03:00
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