Compare commits

..

3897 Commits

Author SHA1 Message Date
Alibek Omarov
b2273b1bce Revert "Revert ABI2, it wasn't meant to end up in master branch."
This reverts commit 950d210ec5.
2024-09-05 04:33:03 +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
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
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
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
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
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
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
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
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
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
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
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
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
Andrey Akhmichin
6634e0487c Documentation: opensource-mods.md: update. 2023-10-22 19:21:13 +03:00
Alibek Omarov
7d61b5317c engine: client: add random key to the query, so we can validate master server response 2023-10-22 18:16:42 +03:00
Alibek Omarov
201258dc9e engine: client: allow passing additional filter through internetservers command arguments 2023-10-22 17:58:28 +03:00
Alibek Omarov
0330569537 engine: client: remove master server queries from NetAPI, they are never used by mods 2023-10-22 17:49:52 +03:00
Alibek Omarov
a1ab84a2ca mainui: update 2023-10-22 17:38:44 +03:00
Alibek Omarov
2d79f3ef7a engine: common: sys_con: enable writing build commit, os and arch to the engine.log 2023-10-22 17:37:09 +03:00
Alibek Omarov
99a7e9ad87 wscript: enable -Werror=nonnull 2023-10-22 17:37:09 +03:00
Alibek Omarov
02b8037f33 common: xash3d_types: add NONNULL attribute 2023-10-22 17:37:09 +03:00
Andrey Akhmichin
fc55a685e3 utils: mdldec: small optimizations. 2023-10-22 16:00:01 +03:00
Alibek Omarov
b76a75d6b4 ref: gl: respect gl_texture_nearest value for skyboxes 2023-10-20 18:55:22 +03:00
Ivan Avdeev
a251600c8a engine: common: imagelib: add KTX2 support (#1455)
* engine: common: imagelib: add KTX2 support

Adds basic KTX2 support for a few compressed formats. KTX2 essentially
is a Vulkan-centric texture format that supports literally hundreds of
pixel formats.
For now only support for these is added:
- `VK_FORMAT_BC4_UNORM_BLOCK`
- `VK_FORMAT_BC4_SNORM_BLOCK`
- `VK_FORMAT_BC5_UNORM_BLOCK`
- `VK_FORMAT_BC5_SNORM_BLOCK`
- `VK_FORMAT_BC6H_UFLOAT_BLOCK`
- `VK_FORMAT_BC6H_SFLOAT_BLOCK`
- `VK_FORMAT_BC7_UNORM_BLOCK`
- `VK_FORMAT_BC7_SRGB_BLOCK`

Adding more formats is relatively straightforward:
- Copy format definition from `VkFormat` enum in `vulkan_core.h`
- Add a new definition into `pixformat_t` enum.
- Add format size calculation into `Image_ComputeSize()`

While we're at it, also adds a few new formats to DDS:
- BC4_UNORM -- PF_BC4_UNSIGNED
- BC4_SNORM -- PF_BC4_SIGNED
- BC5_UNORM -- PF_BC5_UNSIGNED
- BC5_SNORM -- PF_BC5_SIGNED
- BC7 is expanded into BC7_UNORM and BC7_SRGB

ref_gl and ref_soft code is updated where it made sense. But not tested
really. Support for these formats has been tested with ref_vk.

* address spaces-vs-parentheses formatting where noticed

* parenthesize sizeofs

* move ktx2.h to imagelib as img_ktx2.h; massage it a bit

* use SetBits() instead of |=

* remove stale TODO comments
2023-10-18 10:31:40 +03:00
Andrey Akhmichin
c551aefd77 utils: mdldec: add boneweights support. 2023-10-18 10:12:48 +03:00
Andrey Akhmichin
f343f0da41 utils: mdldec: return different errorcodes on error. 2023-10-16 09:36:26 +03:00
Andrey Akhmichin
6d318a4102 utils: mdldec: smd.c: replace loop with VectorMA. 2023-10-16 09:35:51 +03:00
mittorn
a2b992d865 ref_gl: fix codestyle 2023-10-16 06:47:55 +03:00
mittorn
ddf3f2ffdb gl2shim: Allow drawing huge QUADS sequences by splitting drawcalls on overflow 2023-10-16 06:47:55 +03:00
Alibek Omarov
2454e87509 ref_gl: gl2shim: refactoring, add missing spaces in parentheses and ternary ops, remove singleline multiple assignments, use bitset macros 2023-10-16 06:47:55 +03:00
mittorn
0dc44249a2 ref_gl: fix XASH_GL_STATIC build 2023-10-16 06:47:55 +03:00
mittorn
150cbfa4de ref_gl: do not trust REFAPI context version, get it from OpenGL anyway 2023-10-16 06:47:55 +03:00
mittorn
c0b068d81b ref_gl: add workarounds for detecting extensions correctly on gles1/gles2 without wrapper (swiftshader works now) 2023-10-16 06:47:55 +03:00
mittorn
fbc312b6cf gl2shim: remove float suffix in shaders, that makes glsl100 work in swiftshader 2023-10-16 06:47:55 +03:00
mittorn
342e0d3e2e gl2shim: add glsl100 support 2023-10-16 06:47:55 +03:00
mittorn
202b228691 gl2shim: correct allocation/cleanup 2023-10-16 06:47:55 +03:00
mittorn
c9c1286803 ref_gl: fix typo 2023-10-16 06:47:55 +03:00
mittorn
eab98b0eda gl2shim: dynamic extension checking and autoconfiguration 2023-10-16 06:47:55 +03:00
mittorn
35be80fc21 ref_gl: request gl1.1 if compatibility profile unavailiable, this fixes launching with GL <= 2.0, improve old version extension detection 2023-10-16 06:47:55 +03:00
mittorn
6041bb0a43 platform/sdl: fix safegl 2023-10-16 06:47:55 +03:00
mittorn
c7dd9d6437 ref_gl: init r_temppool before InitExtensions, fix extension string allocation 2023-10-16 06:47:55 +03:00
mittorn
d378878c91 gl2shim: try fix getting program link log 2023-10-16 06:47:55 +03:00
mittorn
4a2f8cafcd gl2shim: try fix errors in ViZual ZtudiO 2023-10-16 06:47:55 +03:00
mittorn
d254bac16b ref_gl: integrate gl2shim extensions 2023-10-16 06:47:55 +03:00
mittorn
e23b632ce5 ref_gl: add missing non-arb shader functions 2023-10-16 06:47:55 +03:00
mittorn
2f321b1471 ref_gl: implement minimum inclusion version for GL extensions, implement quering extensions on core profile 2023-10-16 06:47:55 +03:00
mittorn
0265e88d8f gl2shim: fix wrong color vertex 2023-10-16 06:47:55 +03:00
mittorn
4114d2f24d gl2shim: more refactoring 2023-10-16 06:47:55 +03:00
mittorn
8124035763 ref_gl: try fix psvita 2023-10-16 06:47:55 +03:00
mittorn
96127c6eb0 gl2shim: make shaders code more portable 2023-10-16 06:47:55 +03:00
mittorn
cf65a39b83 gl2shim: refactoring 2023-10-16 06:47:55 +03:00
mittorn
0341f96b70 gl2shim: use IBO for quads 2023-10-16 06:47:55 +03:00
mittorn
c95d91cfe3 gl2shim: limit begin-end chain length, cycle incremental buffers 2023-10-16 06:47:55 +03:00
mittorn
cbd10c6279 gl2shim: improve shader version handling, fix particle issues 2023-10-16 06:47:55 +03:00
mittorn
5df9e57743 gl2shim: support incremental non-persistent buffers for arrays 2023-10-16 06:47:55 +03:00
mittorn
c178022fb5 gl2shim: persistent incremental streaming buffers, buffer cycling support 2023-10-16 06:47:55 +03:00
mittorn
724c29d711 gl2shim: implement fallback vbo, glDrawRangeElements with non-vbo buffer works now on core contexts 2023-10-16 06:47:55 +03:00
mittorn
74a2dbeb91 gl2shim: batcher experiments (UGLY, DO NOT USE), fix bad shader bindings, Draw QUADS with TRIFAN when possible 2023-10-16 06:47:55 +03:00
mittorn
5d20d24ebc gl2shim: simple matrix invalidation, do not calculate MVP every drawcall 2023-10-16 06:47:55 +03:00
mittorn
0e2fc277c8 gl2shim: bind dummy VAO on DrawElements implementation on glcore, this generates GL Errors, but renders fine on mesa 2023-10-16 06:47:55 +03:00
mittorn
1505740b73 ref_gl: fix enabling multitexturing on GLES 2023-10-16 06:47:55 +03:00
mittorn
6bad07b39d gl2shim: support low (<130) shaders 2023-10-16 06:47:55 +03:00
mittorn
f85437dfc5 gl2shim: implement client arrays (not in glcore/vao mode), make studio/world array render work 2023-10-16 06:47:55 +03:00
mittorn
c765261db6 ref_gl: fix late studio cvars registration, enable DrawRangeElements in GLES contexts 2023-10-16 06:47:55 +03:00
mittorn
73087ead2d ref_gl: fix build with XASH_GL_STATIC, avoid using ARB shader extension on core context 2023-10-16 06:47:55 +03:00
mittorn
8c88e82709 gl2shim: support more GLSL versions 2023-10-16 06:47:55 +03:00
mittorn
40dd6e0234 gl2shim: Cleanup warnings, use APIENTRY declarations, stub unsupported functions 2023-10-16 06:47:55 +03:00
mittorn
eb23b226cc Workaround core context issues 2023-10-16 06:47:55 +03:00
mittorn
676526a518 ref_gl: fix creating core context, support core in gl2shim by creating dumb array object 2023-10-16 06:47:55 +03:00
mittorn
7e0bd86b65 ref_gl: allow enabling XASH_GLES without wrapper, add ref_gles3compat, wrap gles functions in gl2wrap when XASH_GLES enabled 2023-10-16 06:47:55 +03:00
mittorn
97489635af gl2shim: limited matrix support 2023-10-16 06:47:55 +03:00
mittorn
a9ea3976a7 ref_gl: introduce gl2_shim based on vgl_shim for future limited core/gles context support (SLOW, still needs ffp for matrix operations) 2023-10-16 06:47:55 +03:00
Alibek Omarov
5501ca927a engine: client: respect cl_allow_download and cl_download_ingame for legacy servers 2023-10-16 06:47:55 +03:00
Andrey Akhmichin
a19fb82d66 utils: mdldec: smd.c: add leading zero to number in sequence filenames. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
9d032e953f utils: mdldec: qc.c: avoid to use brackets with conclusions. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
38587151a9 utils: mdldec: qc.c: add missing refence meshes count. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
02d5bab04b utils: mdldec: qc.c: put every sequence property to separate line. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
d8f3e53b1f utils: mdldec: qc.c: add missing quotes. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
877ed8a92a utils: mdldec: qc.c: put every texture name to separate line. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
487a652aa8 utils: mdldec: qc.c: calculate sequence group size. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
64c5d141af utils: mdldec: qc.c: put controller name instead of index for mouth controller. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
16db8a8008 utils: mdldec: qc.c: put tabs where possible. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
b6b14da102 utils: mdldec: qc.c: reorder output. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
a575605c75 utils: mdldec: qc.c: always put $flags keyword with value. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
a205a3e878 utils: mdldec: qc.c: remove useless backward slashes from output. 2023-10-16 06:18:06 +03:00
Andrey Akhmichin
26ef3e274c utils: mdldec: smd.c: linear movement loss fix. 2023-10-14 17:38:48 +03:00
Alibek Omarov
33be1b7591 engine: client: let time flow in Xash demos 2023-10-14 15:11:26 +03:00
Alibek Omarov
de19d78571 ref: fix late registration of studio cvars (thanks, @mittorn) 2023-10-14 08:11:25 +03:00
mittorn
287381d5ca ref_gl: remove complete useless macro, enable VBO under option 2023-10-14 08:04:17 +03:00
Alibek Omarov
4acd0e5304 engine: platform: sdl: grab input only in true fullscreen mode 2023-10-11 16:49:49 +03:00
Alibek Omarov
cb1063c305 engine: platform: sdl: fix qboolean to window_mode_t conversions 2023-10-10 14:41:39 +03:00
Alibek Omarov
59bfc8c32f engine: platform: sdl: fix qboolean to window_mode_t conversions 2023-10-10 14:41:05 +03:00
Alibek Omarov
23494f4e20 mainui: update 2023-10-10 14:36:59 +03:00
Alibek Omarov
b58fbc0c94 engine: platform: linux: fix according to platform.h changes 2023-10-10 14:12:53 +03:00
Alibek Omarov
46f38c84b5 engine: platform: dos: fix according to platform.h changes 2023-10-10 14:12:42 +03:00
Alibek Omarov
99f290b622 engine: platform: sdl: support borderless mode, slight refactoring 2023-10-10 14:11:28 +03:00
Alibek Omarov
680ecfefab engine: platform: pass desired window mode through R_ChangeDisplaySettings 2023-10-10 14:11:06 +03:00
Alibek Omarov
7222c74000 engine: host: expose new -borderless flag in command line help 2023-10-10 14:09:05 +03:00
Alibek Omarov
1e43cb734b engine: client: add definitions for borderless fullscreen mode 2023-10-10 14:08:06 +03:00
Alibek Omarov
cb19fa2f6d engine: client: restore window maximized state after engine restart 2023-10-09 05:26:17 +03:00
Alibek Omarov
73fcb84b62 engine: client: console: remove unneeded return from Con_DrawConsoleLen 2023-10-09 05:24:58 +03:00
Alibek Omarov
3584d3d1a6 engine: client: yet another BloodStream fix, normalize input velocity vector 2023-10-09 05:24:29 +03:00
Alibek Omarov
e95139af94 engine: client: avoid unneeded comparisons in CL_UpdateFlashlight 2023-10-09 03:20:43 +03:00
Alibek Omarov
962f88d31b engine: client: use physents for flashlight tracing, as GoldSrc does 2023-10-08 01:52:42 +03:00
Alibek Omarov
a738b2a50b ref: restore missing PARM_TEX_MEMORY RenderAPI parameter 2023-10-06 19:24:02 +03:00
Alibek Omarov
34fa1b5ec8 engine: remove PORT_CLIENT, we should randomize client port by default, thus allowing easier connections from same IP address 2023-10-05 11:06:04 +03:00
Alibek Omarov
2fdd080eef mainui: update 2023-10-02 19:31:35 +03:00
Alibek Omarov
95f87e24ee ref: soft: do not register cl_righthand cvar 2023-09-29 13:45:24 +03:00
Alibek Omarov
bfe17fa241 Documentation: update ports list, remove old engine ports that has new engine alternatives, re-sort it by status and platform 2023-09-17 08:50:37 +03:00
sofakng
a94a5f1f29 Update port maintainer list (#1427)
* Update ports.md

* Update ports.md
2023-09-17 08:40:40 +03:00
Alibek Omarov
dc71456174 scripts: flatpak: upgrade to Freedesktop SDK 23.08 2023-09-15 22:32:52 +03:00
Alibek Omarov
c6b6938e14 wscript: fix RPATH usage on OSX (by @sofakng) 2023-09-15 20:35:51 +03:00
Alibek Omarov
2823a6d269 filesystem: VFileSystem009: just in case, always rewrite fs_api_t requested through CreateInterface export 2023-09-14 00:20:28 +03:00
Alibek Omarov
bee35a1873 engine: client: do not check screenshots in base directory to guess the name 2023-09-13 18:49:10 +03:00
Alibek Omarov
e4ae386964 engine: network: fix incorrect usage of qboolean, when it should be net_gai_state_t 2023-09-12 20:40:14 +03:00
Alibek Omarov
36831555b9 waf: upgrade to latest waifu 2023-09-12 19:23:30 +03:00
Alibek Omarov
8eef212726 ref: gl: fix compile 2023-09-11 21:22:53 +03:00
Velaron
1589defda1 ref: gl: don't create cl_righthand cvar 2023-09-08 15:52:07 +03:00
Velaron
df921d8664 some cleaner code 2023-09-08 15:52:07 +03:00
Velaron
f3949474b9 ref: gl: fix cl_righthand behaviour 2023-09-08 15:52:07 +03:00
Alibek Omarov
706ef65208 engine: client: make unprefixed important userinfo cvars filterable, so servers won't be able to change them, for security 2023-09-04 02:39:34 +03:00
Alibek Omarov
435b95fc5a engine: client: don't write download notify outside of window 2023-08-31 08:40:24 +03:00
Alibek Omarov
aeece35291 engine: soundlib: mp3: fix check for Unicode in ID3v2.4 TXXX tag 2023-08-30 22:57:39 +03:00
Emil Tomczyk
abd7f3dca3 engine: crashhandler: changed register names for NetBSD x86 (#1414)
Probably also needs change for x86_64
2023-08-30 18:53:41 +03:00
Alibek Omarov
1c9f333420 engine: server: fix attempting to free pool instead of an allocated memory 2023-08-30 18:52:44 +03:00
Alibek Omarov
75e5da071c engine: platform: win32: fix calculating RVAs for LLP64 2023-08-29 19:18:22 +03:00
Alibek Omarov
52bd923d9d engine: server: use generic host pool for temporary string allocation in case of PhysicAPI 2023-08-29 19:10:33 +03:00
Alibek Omarov
ab5a9eec53 engine: soundlib: snd_mp3: fix extra-format-args 2023-08-21 10:02:43 +03:00
Alibek Omarov
88916fdac4 engine: ref_api: remove dead XASH_TEXTURE4 definition 2023-08-21 10:02:18 +03:00
Alibek Omarov
22f60d50ac ref: gl: only enable/disable texture units in fixed-function pipeline rendering, in our case, low TMUs 2023-08-21 10:01:59 +03:00
Alibek Omarov
4ed562697b engine: soundlib: fix sizeof parameter in previous commit, I'm an idiot 2023-08-18 11:50:58 +03:00
Alibek Omarov
64166c7d82 engine: soundlib: fix slashes in Sound_GetApproxWavePlayLen, as it can be called from game DLL 2023-08-18 11:47:01 +03:00
Alibek Omarov
0df89bddeb engine: common: ipv6text: accept changes from upstream GameNetworkingSockets 2023-08-08 19:38:57 +03:00
Alibek Omarov
3168e5ccf0 wscript: add an option to request and accept any servers 2023-08-08 09:24:10 +03:00
Alibek Omarov
72fe214f49 engine: server: pre-process string before passing it to PhysicAPI AllocString, for compatibility with existing Xash3D games 2023-08-07 21:11:20 +03:00
Alibek Omarov
e1cbf96100 wscript: make stringop-overflow non-fatal 2023-08-07 19:45:03 +03:00
Alibek Omarov
1d6f695749 wscript: disable stringop-overflow for NSW to workaround buggy toolchain 2023-08-07 19:26:04 +03:00
Alibek Omarov
08a2d431da engine: client: cl_qparse: refactor quake baseline parser, so we don't call memset for nothing 2023-08-07 19:11:47 +03:00
Alibek Omarov
8bdb49516d filesystem: fix stringop-overflow 2023-08-06 00:44:32 +03:00
Alibek Omarov
e7f5cb6910 wscript: add stringop-overflow to our Werror list 2023-08-06 00:41:12 +03:00
Alibek Omarov
9968b192c3 engine: server: fix buffer overflow in invalid Q_strncpy call 2023-08-06 00:39:41 +03:00
Alibek Omarov
79f2c69963 engine: soundlib: missing newline in warning message about truncated WAV file 2023-08-05 04:05:23 +03:00
Alibek Omarov
2067667c9c engine: fix inverted check in DLL unloading in settings.scr parsing
Fixes: aee99f6094
2023-08-03 02:40:02 +03:00
Alibek Omarov
e017b9145f engine: common: cvar: fix buffer overflow in Cvar_ValidateString 2023-08-03 01:12:16 +03:00
Alibek Omarov
c1c27c5f18 engine: net_ws: fix printing multicast IPv6 address 2023-08-03 01:11:54 +03:00
Alibek Omarov
87a56a5fa1 engine: client: initialize netadr_t structure in LAN games scan 2023-08-03 01:11:31 +03:00
Alibek Omarov
aee99f6094 engine: don't release DLL that wasn't loaded during settings.scr parsing. This should be deleted as soon as possible! 2023-08-03 01:11:06 +03:00
Alibek Omarov
bf03f739bb engine: soundlib: snd_wav: take FindNextChunk fixes from FTEQW 2023-08-03 01:05:46 +03:00
Alibek Omarov
e23580c1de engine: remove czeror sequence parser
This file initially came from HLND, a Chinese GoldSrc recreation.
It turned out to be suspiciously close to the original version, down
to the comments and code style. We don't work with leaked sources here,
so remove it.

A proper parser should be reimplemented from ground-up, when we will
start working on CZDS support.
2023-07-26 19:40:03 +03:00
Alibek Omarov
e49848d090 github: bump SDL2 version to 2.28.1 2023-07-23 03:16:03 +03:00
Alibek Omarov
1bfc6e6705 filesystem: try to fix case of library filename in FindLibrary 2023-07-22 07:04:26 +03:00
Alibek Omarov
e7c41759fb Revert "filesystem: allow to reference game libraries in different case"
This reverts commit 43fde38d88.
2023-07-22 06:39:23 +03:00
Alibek Omarov
a07f81820c engine: client: ref_common: fix missing newline in Host_Error 2023-07-22 05:51:18 +03:00
Alibek Omarov
b39378a6da engine: common: fix warning about read-only cvar. In fact, we should force set them. 2023-07-22 05:50:38 +03:00
Alibek Omarov
5c6b9d3235 scripts: flatpak: set correct bindir for flatpak installation 2023-07-22 04:49:48 +03:00
Alibek Omarov
3d49ca25b3 scripts: flatpak: disable LTO for Flatpak for now, it causes linker errors 2023-07-22 00:23:03 +03:00
Alibek Omarov
43fde38d88 filesystem: allow to reference game libraries in different case 2023-07-22 00:19:37 +03:00
Alibek Omarov
6461fa5042 engine: client: make ref params static so client.dll can save address of it and don't trigger ASan 2023-07-17 05:52:45 +03:00
Alibek Omarov
788bc820c8 filesystem: automatically fixup directory name case for base directories 2023-07-17 05:52:06 +03:00
Alibek Omarov
36ff819daf engine: client: fix heap-buffer-overflow in remap when we switch model that have more remap textures than previous 2023-07-17 04:48:02 +03:00
Alibek Omarov
8905883225 utils: xar: add new utility called Xar that helps interacting with Xash3D FWGS archives using filesystem_stdio C API
The utility is not yet finalized, disable from wscript for now
2023-07-05 07:00:39 +03:00
Alibek Omarov
4031f5cb01 public: allow matching anything in matchpattern 2023-07-05 07:00:39 +03:00
Alibek Omarov
cd46ad19a3 filesystem: expose a special flag for archive mounter to skip included WADs 2023-07-05 07:00:39 +03:00
Alibek Omarov
6f7b1695d7 filesystem: expose archive mount generic function for Xar 2023-07-05 07:00:39 +03:00
Alibek Omarov
28a4b51939 Documentation: gameinfo: wording 2023-07-04 03:39:17 +03:00
Alibek Omarov
5e878aae89 mainui: upgrade 2023-07-03 02:25:31 +03:00
Alibek Omarov
7e05562c14 engine: platform: sdl: check SDL version in Platform_Vibrate 2023-07-03 02:18:49 +03:00
Alibek Omarov
777dd3a03c public: add definitions for PowerPC
This doesn't mean we have a port but at least it allows building for ppc64el
2023-07-03 01:40:47 +03:00
Alibek Omarov
9977cb20c0 Documentation: gameinfo: clarify internal_vgui_support is intended to be used only for developers and that it's required for PrimeXT 2023-07-02 08:14:26 +03:00
Alibek Omarov
5661766c79 Documentation: gameinfo: wording 2023-07-02 06:45:29 +03:00
Alibek Omarov
60d65d368a Documentation: add basic document on gameinfo.txt keys and liblist.gam conversion 2023-07-02 06:36:57 +03:00
Alibek Omarov
031594cc99 filesystem: update max_particles limits based on Unkle Mike's latest engine version 2023-07-02 06:36:35 +03:00
Alibek Omarov
d4bf57c7c2 filesystem: delete unused edicts key handler in liblist.gam parsing 2023-07-02 06:36:09 +03:00
Alibek Omarov
8e16c0e410 filesystem: simplify common parsing of type key for liblist.gam and gameinfo.txt 2023-07-02 06:35:34 +03:00
Alibek Omarov
d5f4b409e8 engine: server: sv_save: use new quicksave_aged_count and autosave_aged_count gameinfo.txt keys 2023-07-02 04:53:39 +03:00
Alibek Omarov
88c560aac4 filesystem: add two new gameinfo.txt keys quicksave_aged_count and autosave_aged_count that control the amount of quick/autosaves rotated 2023-07-02 04:53:16 +03:00
Alibek Omarov
c3a6cad0c1 filesystem: do not print error in FS_Delete if file doesn't exist 2023-07-02 04:49:33 +03:00
Alibek Omarov
a862446072 engine: client: restore cl_trace_events from old engine branch 2023-07-02 04:48:43 +03:00
Alibek Omarov
8d04ae8802 engine: client: fix appending extra .dem in record command 2023-07-02 02:44:25 +03:00
Alibek Omarov
0de0615eeb engine: client: implement map CRC32 checking on client side 2023-07-02 01:20:24 +03:00
Alibek Omarov
ea24b5f3ca engine: server: make CRC32_MapFile public 2023-07-02 01:19:38 +03:00
Alibek Omarov
eb7f19d3cf engine: server: properly remove remaining server operator commands 2023-07-02 01:19:21 +03:00
Alibek Omarov
ca134a85ee engine: client: make it more obvious that CL_InitEdicts depends on maxclients value 2023-06-30 02:51:47 +03:00
Alibek Omarov
00765f1ff2 engine: client: cl_parse_48: add a temporary hack to avoid the lag issues after changelevel on legacy servers 2023-06-30 02:35:36 +03:00
Alibek Omarov
013bfe5c34 engine: common: sys_con: always read from stdin when engine is in dedicated mode 2023-06-30 01:44:03 +03:00
Alibek Omarov
5f625bb6e1 wscript: remove option --enable-stdin-input, it's enabled by default in dedicated mode sys_con now 2023-06-30 01:43:26 +03:00
Alibek Omarov
547a862024 engine: client: split protocol 48 support to separate file 2023-06-29 04:09:36 +03:00
Alibek Omarov
6ea8d141d9 engine: common: net_encode: fix usage of new Delta_ClampIntegerField, minor fixes 2023-06-28 14:30:06 +03:00
Alibek Omarov
bdc2390d41 Revert "engine: common: net_encode: rewrite Delta_CompareField to be more efficient"
This reverts commit 82addf11bb.
2023-06-28 14:26:42 +03:00
Alibek Omarov
acc113309c Revert "engine: common: net_encode: fix Delta_CompareField to include integer clamping, in case if no updates happen in significant bits"
This reverts commit 6a7b330463.
2023-06-28 14:26:40 +03:00
Alibek Omarov
5afda72290 engine: common: net_encode: simplify Delta_ClampIntegerField 2023-06-28 05:07:53 +03:00
Alibek Omarov
6a7b330463 engine: common: net_encode: fix Delta_CompareField to include integer clamping, in case if no updates happen in significant bits 2023-06-28 04:47:12 +03:00
Alibek Omarov
f5b9826fd9 engine: common: net_encode: directly access delta description struct than searching for it every time 2023-06-27 19:56:32 +03:00
Alibek Omarov
82addf11bb engine: common: net_encode: rewrite Delta_CompareField to be more efficient 2023-06-27 18:06:24 +03:00
Alibek Omarov
aee5e46516 public: rewrite Q_strncpy with standard C functions, make it inlined to allow compiler remove unneeded checks
So far, passes all tests.
2023-06-27 17:30:09 +03:00
Alibek Omarov
40e248aa63 engine: common: remove unused tentlist_t definition 2023-06-27 17:30:09 +03:00
fgsfds
24ee3ae318 scripts: psvita: bump vitaGL version 2023-06-25 18:15:18 +03:00
fgsfds
f79aaf93f8 ref: gl: psvita: disable NPOT textures, they're broken again 2023-06-25 18:15:18 +03:00
Alibek Omarov
0d89849cab public: move some simple functions to mathlib header. Remove assembler version specific for MSVC6 2023-06-25 13:32:06 +03:00
Alibek Omarov
d962255ebe public: mathlib: remove unused RemapVal, ApproachVal 2023-06-25 13:25:51 +03:00
Alibek Omarov
21b47dff32 ref: gl: static-ize globals and functions in gl_warp 2023-06-25 13:17:46 +03:00
Alibek Omarov
1905782c41 3rdparty: vgui_support: update submodule 2023-06-23 06:10:27 +03:00
Alibek Omarov
b29b3d5859 wscript: clarify that higher versions of opus also accepted in a comment 2023-06-21 13:21:19 +03:00
Alibek Omarov
3533b0d284 wscript: check for opus 1.4, which fixes an assertion in custom modes decoder initialize 2023-06-21 13:19:03 +03:00
Alibek Omarov
7e06d049f5 engine: common: static-ize common.c functions, set GAME_EXPORT to API functions 2023-06-20 14:19:44 +03:00
Alibek Omarov
5a4c443c79 filesystem: fix regression in FS_LoadFile not skipping leading slashes
Earlier it used FS_Open which handles this, but because we don't call
that anymore, just skip it ourselves for compatibility.
2023-06-20 14:11:55 +03:00
Alibek Omarov
4bbd1e59a4 engine: server: static-ize world functions 2023-06-19 07:47:38 +03:00
Alibek Omarov
0809453b2c engine: server: static-ize sv_query functions 2023-06-19 07:39:00 +03:00
Alibek Omarov
8350d81c18 engine: server: static-ize sv_pmove functions 2023-06-19 07:38:18 +03:00
Alibek Omarov
57499dea33 engine: server: static-ize sv_phys functions, set GAME_EXPORT attribute for PhysicAPI functions 2023-06-19 07:32:22 +03:00
Alibek Omarov
6b223f1325 engine: server: static-ize functions in sv_game. Set GAME_EXPORT attribute to server GameAPI functions 2023-06-19 07:11:49 +03:00
Alibek Omarov
03a85e0caa engine: platform: psvita: add unused data to workaround bug in vita-elf-create (thanks @fgsfdsfgs) 2023-06-18 22:49:44 +03:00
Alibek Omarov
01ad3dda2a engine: server: escape rcon arguments before passing it to command buffer, also use more efficient concatenation 2023-06-18 04:44:28 +03:00
Alibek Omarov
2a05624615 engine: server: keep silence in case of unset or invalid rcon password 2023-06-18 04:30:21 +03:00
Alibek Omarov
f3ed9b21c0 scripts: add sample systemd service 2023-06-16 08:47:25 +03:00
Alibek Omarov
16c87ae2c9 engine: platform: reorganize UpdateStatusLine, make it shared but implemented only if platform has SetStatus. Implement SetStatus for systemd/Linux 2023-06-16 08:43:16 +03:00
Alibek Omarov
c16a10e6f3 engine: platform: refactor Platform_Init/Shutdown/GetNativeObject functions. They are now defined in the header, and call platform-specific functios that defined in platform code 2023-06-16 07:32:19 +03:00
Alibek Omarov
c7d748e8df engine: server: add sv_log_outofband cvar that controls whether connectionless packets should be printed or not 2023-06-16 07:19:17 +03:00
Alibek Omarov
0e16110c3a github: use ubuntu-latest for PSVita and NSwitch CI 2023-06-15 19:26:19 +03:00
Alibek Omarov
c966589a50 engine: server: static-ize few game API functions, set GAME_EXPORT attribute 2023-06-15 19:22:13 +03:00
Alibek Omarov
4c02c25506 engine: server: do not assert if SetFatPVS/PAS were called without active player
Fixes issues with POD-Bot based bots.
2023-06-15 19:17:34 +03:00
Alibek Omarov
a4997d0647 engine: server: port old engine's fullupdate ratelimit, but simplify it 2023-06-15 18:09:59 +03:00
Alibek Omarov
243c3cc80f engine: server: port old engine's userinfo penalty 2023-06-15 04:46:22 +03:00
Alibek Omarov
a8dbec56c3 mainui: update 2023-06-14 01:38:41 +03:00
Alibek Omarov
9c62fa901f engine: server: pregenerate CRC table and testpacket data 2023-06-14 00:35:07 +03:00
Alibek Omarov
996897e30e public: use standard uint32_t in place of dword 2023-06-13 06:57:24 +03:00
Alibek Omarov
93ee5b9446 public: crclib: simplify CRC32_ProcessByte 2023-06-13 06:57:24 +03:00
Alibek Omarov
c0c8119040 public: crclib: rework CRC32 code (thanks to @Mr0maks for implementation) 2023-06-13 06:57:24 +03:00
jeefo
61c75b9809 engine: server: log: use S_USAGE in logaddress for consistency with existing code 2023-06-11 16:28:36 +03:00
jeefo
868d10a842 engine: server: log: allow to disable logaddress without turning off logs completely 2023-06-11 16:28:36 +03:00
jeefo
699f3579fe engine: server: log: fix log off command not disabling logging to console (fixes #1340) 2023-06-11 16:28:36 +03:00
jeefo
873ce0ce48 engine: server: query: A2S_PLAYER response should contain bots and normal players 2023-06-11 14:14:59 +03:00
Alibek Omarov
450f77443d engine: client: ignore some out of band packets if we're not connecting to server 2023-06-11 07:06:01 +03:00
Alibek Omarov
278ff22ba9 engine: server: query: use common SV_GetPlayerCount, fix random styling issues 2023-06-10 02:47:52 +03:00
jeefo
d9ef1d4608 server: implement correct answers to TSourceEngineQuery server queries
* count bots as clients as in goldsrc
* handle source-style packets after xash's built-in packets to not interfere with them
2023-06-10 02:06:45 +03:00
Alibek Omarov
58df771c9e filesystem: implement .pk3dir convention 2023-06-08 22:58:24 +03:00
Alibek Omarov
a6ecc778fc filesystem: dir: fix FS_FixFileCase when empty string is passed. Always append slash to searchpath. 2023-06-08 22:58:24 +03:00
Alibek Omarov
37e890f326 filesystem: make fs_searchpaths completely private to the filesystem core 2023-06-08 22:30:45 +03:00
Alibek Omarov
0d6137ee40 filesystem: make generic archive loading functions (with the exception of WADs). Do not alter global searchpath from archives. 2023-06-08 22:14:30 +03:00
Alibek Omarov
653eb00cc6 filesystem: unify prototypes of archive opening functions 2023-06-08 20:02:48 +03:00
Alibek Omarov
b84aba68fa engine: platform: implement generic GetNativeObject for POSIX systems without SDL2 2023-06-07 04:07:53 +03:00
Alibek Omarov
1855fab80b filesystem: fix Platform_GetNativeObject macro definition 2023-06-06 17:46:38 +03:00
Alibek Omarov
23f1c43282 engine: common: net_buffer: use uint32_t in place of dword 2023-06-06 00:28:23 +03:00
Alibek Omarov
a7c76ac0bf engine: common: net_buffer: use stdint.h types in sizebuf_t reading/writing funcs 2023-06-06 00:26:54 +03:00
Alibek Omarov
26959cd280 engine: common: net_encode: use stdint.h types in Delta_CompareField 2023-06-06 00:20:56 +03:00
Alibek Omarov
1fdf6180e6 engine: platform: sdl: merge required SDL2 platform changes for new Android port from @Velaron's tree 2023-06-05 21:51:59 +03:00
Alibek Omarov
d2237fa144 engine: platform: android: merge new SDL2 based Android port from @Velaron's tree 2023-06-05 21:35:58 +03:00
Alibek Omarov
febdfacbd3 wscript: merge CMakeLists generating tool from Velaron's tree 2023-06-05 21:30:07 +03:00
Alibek Omarov
ef663a8790 engine: partially remove legacy Android port, in preparation of new port merge 2023-06-05 20:30:18 +03:00
Alibek Omarov
ba039b8e71 engine: drop XASH_DYNAMIC_DLADDR 2023-06-05 20:30:18 +03:00
Alibek Omarov
02ce80981c filesystem: update optional funcs interface, add platform-specific GetNativeObject call 2023-06-05 20:30:18 +03:00
Alibek Omarov
a40a325d3c 3rdparty: mainui: update 2023-06-03 03:54:49 +03:00
Alibek Omarov
85cc942a3c wscript: fix Sailfish misdetection 2023-06-02 06:35:51 +03:00
Alibek Omarov
a23e17c6d7 engine: platform: sdl: set QtWayland hints 2023-06-02 06:18:47 +03:00
Alibek Omarov
59412f3d92 public: define XASH_MOBILE_PLATFORM by XASH_SAILFISH (defined externally) 2023-06-02 06:18:17 +03:00
Alibek Omarov
0a15cc389d mainui: update 2023-06-02 06:17:14 +03:00
Alibek Omarov
13f8a02cdf wscript: better Sailfish/AuroraOS macros 2023-06-02 06:16:40 +03:00
Alibek Omarov
8caa2d142f scripts: sailfish: initial SailfishOS support 2023-06-02 05:37:13 +03:00
Alibek Omarov
3b8009917a 3rdparty: upgrade GL wrappers submodules 2023-06-02 04:10:24 +03:00
Alibek Omarov
e2e14945e4 contrib: delete outdated files 2023-06-02 00:28:31 +03:00
Alibek Omarov
16595bf2c0 ref: gl: fix r_showhull check 2023-05-29 14:42:16 +03:00
Alibek Omarov
f49a2bc8f3 engine: server: move pfnWriteString character replacement hack to the ALLOC_STRING, the same way as GoldSrc does 2023-05-29 14:40:54 +03:00
Alibek Omarov
d994c6df9a ref: a bit more verbosity if UserTracer color exceed limit 2023-05-27 22:06:33 +03:00
Alibek Omarov
3a57f26351 ref: gl: move ref_gl cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
7fd1534753 engine: common: cvar: remove unused CVAR_TO_BOOL macro 2023-05-27 21:52:58 +03:00
Alibek Omarov
bd52a9ec2d engine: platform: linux: move evdev_keydebug cvar to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
9e0d389d9e engine: server: moved server cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
8680757844 ref: soft: move ref_soft cvars to static allocation, remove dead cvars 2023-05-27 21:52:58 +03:00
Alibek Omarov
95a8d2f51f ref: soft: attempt to fix freeze in decals on software renderer 2023-05-27 21:52:58 +03:00
Alibek Omarov
70b26a13c2 engine: allow ref dlls to use convar_t 2023-05-27 21:52:58 +03:00
Alibek Omarov
6a1f96a2c6 engine: always unlink variables and commands BEFORE all pointers to them would be lost 2023-05-27 21:52:58 +03:00
Alibek Omarov
4ce2475602 engine: common: move network cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
e7ece41ba0 engine: common: move model cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
05579927a5 engine: client: sound: move dsp cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
2f5b359c99 engine: client: move tracer cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
214fc7e827 engine: common: move host cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
df173a83ed engine: client: move touch cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
3918bcd71c engine: client: move console cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
f19ed1c1c2 engine: client: move joystick cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
03ec2f603b engine: client: move netgraph cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
1ee01163b7 engine: client: move scrn cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
b1d60c248d engine: client: move main client cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
d9cbf1fa89 engine: client: move input cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
cd022bdac7 engine: client: move keys cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
5d7d5319fd engine: move ref cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
d4470402ee engine: move vid cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov
05560c7607 engine: always read and set vid_fullscreen value directly with it's object 2023-05-27 21:52:58 +03:00
Alibek Omarov
81c752da2b filesystem: wad: static-ize WAD functions 2023-05-27 20:51:00 +03:00
Alibek Omarov
fd2ad447a8 filesystem: zip: static-ize ZIP functions 2023-05-27 20:49:06 +03:00
Alibek Omarov
18d55c1de2 filesystem: zip: adapt to new interface 2023-05-27 20:48:48 +03:00
Alibek Omarov
d0d09c878f filesystem: wad: adapt to new interface 2023-05-27 20:47:49 +03:00
Alibek Omarov
e791d44dd8 filesystem: properly support compressed archives in FS_LoadFile 2023-05-27 20:46:48 +03:00
Alibek Omarov
152f6d154c filesystem: remove unused argument from FS_CheckNastyPath 2023-05-27 20:22:12 +03:00
Alibek Omarov
5627dbbf34 engine: server: greatly simplify pfnWriteString implementation, it shouldn't modify input string 2023-05-27 20:02:09 +03:00
Alibek Omarov
9cd9744407 filesystem: fix Windows build 2023-05-27 19:40:44 +03:00
Alibek Omarov
f13c285287 filesystem: verbose error printing in FS_SetCurrentDirectory, move error reporting from engine 2023-05-26 22:29:34 +03:00
Alibek Omarov
cca7744f1c filesystem: make some calls from API safe to use without initialize 2023-05-26 18:31:00 +03:00
Alibek Omarov
31ae22961b filesystem: add base test case to call ShutdownStdio without calling Init prior 2023-05-26 18:30:13 +03:00
Alibek Omarov
a3603f497d scripts: waifulib: compiler_optimizations: fix -march applying on x86_64 toolchains forced to compile in 32-bit mode 2023-05-24 04:30:28 +03:00
Alibek Omarov
d36cb62a2e mainui: update 2023-05-24 04:25:25 +03:00
Alibek Omarov
2ca6029e03 Revert "github: don't wait for flatpak build finish, it's broken for us anyway"
This reverts commit eb61bcf76a.
2023-05-24 04:24:55 +03:00
Alibek Omarov
dee5cae5f3 scripts: waifulib: compiler_optimizations: set pentium-m minimum cpu requirement for Intel 32-bits, like HLSDK 2023-05-24 04:19:08 +03:00
Alibek Omarov
ef4bc2acf2 scripts: flatpak: try to fix flatpak build on GitHub Actions 2023-05-24 04:18:33 +03:00
Alibek Omarov
eb61bcf76a github: don't wait for flatpak build finish, it's broken for us anyway 2023-05-24 03:52:38 +03:00
Alibek Omarov
cb43df43ef engine: common: cvar: do not check if cvar was registered in DirectSet when it has valid next pointer 2023-05-24 03:51:16 +03:00
Alibek Omarov
356f78ee81 engine: platform: sdl: fix possible buffer overrun in SDL port audio code 2023-05-24 03:49:13 +03:00
Alibek Omarov
275cd73ade engine: server: do not trigger speedhack detection for fakeclients 2023-05-24 00:36:54 +03:00
Velaron
bb1b9dad23 ref: gl: Goldsrc compatible fog implementation 2023-05-20 23:36:04 +03:00
Velaron
e27ac6b092 platform: win32: properly change icon 2023-05-20 23:32:19 +03:00
Alibek Omarov
7333ddc1d9 engine: client: move some RenderAPI GetParm queries to engine 2023-05-19 05:03:25 +03:00
Alibek Omarov
fbd7d8f58a engine: server: use sv_speedhack_kick cvar value as a number of speedhack warns before automatic kick
Thanks to @tyabus for suggestion
2023-05-19 04:49:29 +03:00
Alibek Omarov
3415185dde engine: server: implement simple anti-speedhack 2023-05-19 04:44:42 +03:00
Alibek Omarov
551ea71906 engine: server: make generic function to kick players with a reason 2023-05-19 04:44:42 +03:00
Alibek Omarov
1d965d7543 ref: gl: ignore GenTextures objects that fall into reserved space for skyboxes 2023-05-19 04:37:53 +03:00
Alibek Omarov
1d62df0e2d ref: gl: turn magic skybox numbers into defined macros 2023-05-19 04:36:05 +03:00
Alibek Omarov
b0f52236bc engine: platform: psvita: use _impure_ptr declaration from sys/reent.h 2023-05-17 17:45:17 +03:00
Alibek Omarov
7dcddc559c engine: platform: sdl: set PulseAudio role only on POSIX systems 2023-05-17 17:38:18 +03:00
Alibek Omarov
277bead9b7 ref: remove SetCullState function from StudioAPI. It does nothing on GoldSrc. 2023-05-17 17:23:35 +03:00
Alibek Omarov
d8093ec587 engine: platform: psvita: attempt to fix PSVita builds by exporting _impure_ptr 2023-05-17 17:17:25 +03:00
Alibek Omarov
323626c308 engine: platform: sdl: try to avoid random crash in SDL pulse audio driver 2023-05-17 05:02:12 +03:00
Alibek Omarov
68ff265e8d ref: gl: switch texture object allocation to GenTextures usage
This should fix most overlay programs but I only tested it on MangoHud
2023-05-16 23:47:05 +03:00
Alibek Omarov
a3ab04e0cb ref: gl: track current bound texture index in gl_textures array in separate glState field 2023-05-16 23:44:52 +03:00
Alibek Omarov
7d2bf93c72 engine: client: voice: do not reinitialize voice with same parameters 2023-05-15 17:48:15 +03:00
Alibek Omarov
04107d384e engine: client: fix incorrectly parsed timings for TE_TEXTMESSAGE 2023-05-15 02:11:44 +03:00
Alibek Omarov
3a0f1763fb engine: whereami: update from our downstream fork (only cosmetic changes) 2023-05-15 01:51:14 +03:00
Alibek Omarov
377dd9a255 engine: client: bring back NetAPI infostring options, as they conform to the API definitions 2023-05-14 12:24:40 +03:00
Alibek Omarov
8961e37d7c github: update flatpak-builder action to latest version 2023-05-14 12:10:39 +03:00
Alibek Omarov
de1e53311a engine: client: cl_game: static-ize engine functions in client API 2023-05-14 12:10:14 +03:00
Alibek Omarov
19582cdf11 engine: simplify force version drawing logic 2023-05-14 09:50:17 +03:00
Alibek Omarov
fa0e7e4369 scripts: enable LTO for Linux builds too 2023-05-14 09:49:39 +03:00
Alibek Omarov
2378331e47 wscript: enable -Werror=unsequenced, Clang's analogue of -Werror=sequence-point 2023-05-14 09:39:15 +03:00
Alibek Omarov
5549e7301c scripts: gha: win32: enable LTO by default 2023-05-14 09:36:46 +03:00
Alibek Omarov
5ab7d09a00 scripts: waifulib: compiler_optimizations: allow -fno-semantic-interposition for GCC (less overhead on PIC binaries) 2023-05-14 09:35:00 +03:00
Alibek Omarov
c54e1625d1 scripts: waifulib: compiler_optimizations: fixes for LTO 2023-05-14 09:34:29 +03:00
Alibek Omarov
d0127e5e14 filesystem: fix FS_GetDiskPath, it was broken since implementing caseinsensitive emulation, oops
Anyway, FS_GetFullDiskPath is a proper safe version that lacks this bug
2023-05-14 08:21:17 +03:00
Andrey Akhmichin
0f643f1f87 Documentation: opensource-mods.md: update link to "bubblemod". 2023-05-13 23:19:30 +03:00
Andrey Akhmichin
16eb12b1e0 Documentation: opensource-mods.md: add "HL: Rally". 2023-05-13 23:19:30 +03:00
Alibek Omarov
4856a3c084 Revert "engine: soundlib: wav: attempt to make FindNextChunk more safe"
This reverts commit 78e239d883.
2023-05-05 21:19:58 +03:00
Alibek Omarov
78e239d883 engine: soundlib: wav: attempt to make FindNextChunk more safe 2023-05-02 08:54:37 +03:00
Alibek Omarov
5a7b68fcc1 filesystem: add new export FS_GetFullDiskPath, similar to FS_GetDiskPath, but generates full path to the file, including searchpath 2023-05-02 08:52:54 +03:00
Alibek Omarov
c33a384975 engine: client: s_vox: do not crash in VOX if sentence wasn't sound in sequences 2023-05-02 08:51:53 +03:00
Alibek Omarov
5b582b744a engine: client: check if filesystem was initialized during client shutdown 2023-04-30 10:14:02 +03:00
Alibek Omarov
c96f8ba722 engine: client: in_joy: do not create cvar on shutdown 2023-04-30 10:14:02 +03:00
Alibek Omarov
9f92e2a1f7 engine: client: console: do not save history if nothing was executed in console 2023-04-30 10:14:02 +03:00
Alibek Omarov
710b234493 engine: add new pretty --help output 2023-04-30 10:14:02 +03:00
Alibek Omarov
75759530e3 engine: remove doublecolons from MSGBOX macros 2023-04-30 10:14:02 +03:00
Alibek Omarov
5162ab62fd engine: filesystem: do not crash if engine was shutdown before filesystem was loaded 2023-04-30 10:14:02 +03:00
Alibek Omarov
3e2a215c15 engine: client: in_joy: rename -nojoy to -noenginejoy to avoid conflict with client.dll's joystick support 2023-04-30 10:14:02 +03:00
Alibek Omarov
e2540bd446 filesystem: turn unused caseinsensitive argument in InitStdio into a reserved argument (set to true by default) 2023-04-30 10:14:02 +03:00
Alibek Omarov
07fd4f37ef engine: remove unused -caseinsensitive command line argument 2023-04-30 10:14:02 +03:00
Alibek Omarov
92b72a7d33 game_launch: add icons that were used for Android port 2023-04-30 00:56:28 +03:00
Alibek Omarov
cb3b16e2ec engine: client: implement v_dark in engine, instead of making it ref-specific 2023-04-28 16:52:22 +03:00
Alibek Omarov
bd3dc71f39 engine: server: refactor banid, explicitly does not allow ban using userid for now 2023-04-28 16:24:41 +03:00
Alibek Omarov
48176233bd public: move FOV calculating functions out of libpublic, as they are very specific to engine view 2023-04-26 05:22:34 +03:00
Alibek Omarov
a292d2fd53 platform: win32: replace Q_sprintf calls by Q_snprintf 2023-04-26 05:20:45 +03:00
Alibek Omarov
27aad9f4a0 ref: gl: add size argument to COM_Default/ReplaceExtension calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
71a3cedba8 filesystem: add size argument to COM_Default/ReplaceExtension calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
ec2951cf45 engine: add size argument to COM_Default/ReplaceExtension calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
ff436ae100 public: crtlib: add safe COM_DefaultExtension and COM_ReplaceExtension 2023-04-26 05:20:45 +03:00
Alibek Omarov
cfdfdd5c93 utils: mdldec: add size argument to COM_FileBase calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
8b96e7ca87 ref: add size argument to COM_FileBase calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
1603b8028c filesystem: add size argument to COM_FileBase calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
8c7db8499f engine: add size argument to COM_FileBase calls 2023-04-26 05:20:45 +03:00
Alibek Omarov
fbdd79644b public: test new COM_FileBase and compare it's results with old implementation (embedded into test itself) 2023-04-26 05:20:45 +03:00
Alibek Omarov
ac39090f6e public: crtlib: add safe COM_FileBase implementation 2023-04-26 05:20:45 +03:00
Alibek Omarov
8f207362a5 public: remove Q_sprintf, and patch all code that used it to use Q_snprintf instead 2023-04-26 05:20:45 +03:00
Alibek Omarov
b16fa8eddc public: remove Q_strcat and Q_strcpy, and patch the code that uses it 2023-04-26 05:20:45 +03:00
Alibek Omarov
2261b0dcab scripts: gha: set --disable-werror for building HLSDK 2023-04-25 13:10:12 +03:00
Alibek Omarov
9eb49fc673 scripts: gha: win32: finally use destdir instead of prefix on Windows 2023-04-25 13:05:34 +03:00
Alibek Omarov
c61c84ad4f Revert "wscript: check malloc.h first to make checks on Windows slightly faster"
This reverts commit 1464e1e2be.
2023-04-25 12:39:47 +03:00
Alibek Omarov
71c9fd2772 wscript: do not check for --prefix without --enable-packaging, as it's still valid to use 2023-04-25 03:01:35 +03:00
Alibek Omarov
1464e1e2be wscript: check malloc.h first to make checks on Windows slightly faster 2023-04-25 02:39:07 +03:00
Alibek Omarov
cf557d191a wscript: make prefix vs destdir installing more safe and predictable 2023-04-25 02:38:36 +03:00
Alibek Omarov
b72033eb74 engine: client: fix master server query through NetAPI 2023-04-23 22:05:11 +03:00
Alibek Omarov
cec903fd10 mainui: update 2023-04-23 18:44:17 +03:00
Alibek Omarov
b333edeefe public: crtlib: remove unused Q_strlwr macro 2023-04-23 18:31:08 +03:00
Alibek Omarov
76c7273600 utils: mdldec: remove usage of string functions with unspecified size 2023-04-23 18:30:44 +03:00
Alibek Omarov
096ee34f67 public: remove Q_vsprintf, replace by proper Q_vsnprintf proper calls
Fixes weird off by one error caused by glibc updates? I didn't tracked
what causes it exactly but replacing it seems to work. Anyway, we should
remove all 99999 hacks in libpublic.
2023-04-23 18:19:28 +03:00
Alibek Omarov
5b52a9a19f engine: protocol: increase MAX_LIGHTSTYLES from 64 to 256, protocol limit as it encoded as unsigned byte 2023-04-20 10:35:21 +03:00
Alibek Omarov
cacfff008f engine: common: enable autocomplete for mp3 command 2023-04-19 17:54:45 +03:00
Alibek Omarov
398cec626e engine: client: remove media/ prefix for CD tracks, add it while parsing cdaudio.txt for compatibility 2023-04-19 17:54:28 +03:00
Alibek Omarov
cadad6ce34 github: attempt to avoid release draft issue by sleeping for 20s 2023-04-19 16:32:21 +03:00
Alibek Omarov
588d080a63 github: migrate to softprops/action-gh-release to avoid drafts being randomly created (thanks @SNMetamorph) 2023-04-19 15:05:41 +03:00
Alibek Omarov
1affc36f06 engine: client: more accurate ScreenShake implementation, thanks @vasiavasiavasia95 for sharing it 2023-04-18 17:28:27 +03:00
Alibek Omarov
8d6ac3fad4 engine: common: net_encode: cosmetic changes, static-ize functions, move private macros 2023-04-18 05:16:57 +03:00
Alibek Omarov
0d5d30398b filesystem: VFileSystem009: refactoring 2023-04-18 04:50:47 +03:00
Alibek Omarov
eb0686fca1 filesystem: fix wrong data type for character in Gets and Ungetc 2023-04-18 04:47:55 +03:00
Alibek Omarov
41025c0049 engine: client: reset connection retries counter on changelevel
Fixes an issue when connection retry counter near the failure state
and the server changes level
2023-04-18 04:45:27 +03:00
Tim Schumacher
6518a5cf8b engine: whereami: Add SerenityOS 2023-04-17 19:30:11 +03:00
Alibek Omarov
49936120ca public: tests: add new test to check return values of Q_Architecture/PlatformStringByID and Q_buildnum 2023-04-17 19:11:16 +03:00
Alibek Omarov
e4a5b95e81 public: build: split Q_buildnum to separate function that calculates build number from arbitrary date string 2023-04-17 19:10:40 +03:00
Alibek Omarov
84fc8d4281 public: build: fix naming for 32-bit RISCV with double precision float ABI 2023-04-17 19:09:59 +03:00
Alibek Omarov
e9da3e2976 public: build: reorder enums by probability, rename ARCHITECTURE_ ABI macros to just ARCH_ for easier matching 2023-04-17 06:37:08 +03:00
Alibek Omarov
c1252b5642 scripts: waifulib: vgui: fix Logs aren't being imported 2023-04-17 06:36:58 +03:00
Alibek Omarov
7d54952422 3rdparty: vgui_support: update submodule 2023-04-17 05:22:02 +03:00
Alibek Omarov
b28d10f69f scripts: waifulib: split vgui_support VGUI detection to separate module 2023-04-17 05:20:22 +03:00
Alibek Omarov
6cb3b2f01a wscript: print modules help before engine common options 2023-04-17 05:19:56 +03:00
Alibek Omarov
248be5458f engine: common: hpak: do not print hashpak contents in quiet mode 2023-04-17 04:39:21 +03:00
Alibek Omarov
2e7306e96a engine: network: fix missing newline in IP port allocation error message 2023-04-17 04:37:16 +03:00
Alibek Omarov
558ded6d6a filesystem: tests: interface: use correct type for module on Win32 2023-04-15 04:58:29 +03:00
Alibek Omarov
c52dc69360 scripts: gha, cirrus: fix failing workflows because of --enable-fs-tests flag removal 2023-04-15 04:24:45 +03:00
Alibek Omarov
ba1648c689 mainui: update 2023-04-15 04:19:14 +03:00
Alibek Omarov
101a7a1240 engine: client: try to fix random crash in CL_ClearWorld when using legacy protocol 2023-04-15 04:08:40 +03:00
Alibek Omarov
25d6b2b069 engine: client: fix FlushEntityPacket message overflow on legacy servers 2023-04-15 04:08:40 +03:00
Alibek Omarov
f67b97e63c engine: common: mod_bmodel: remove useless copy before Q_strnlwr, as Q_strnlwr already copies string 2023-04-15 04:08:40 +03:00
Alibek Omarov
9a24cb8c96 engine: client: console: remove useless function Con_StringLength 2023-04-15 04:08:40 +03:00
Alibek Omarov
c157b7def3 filesystem: tests: interface: various fixes
* correctly check success variable value in CreateInterface
* get rid of C language quirks because this file is C++
* check that globals were filled
2023-04-15 04:08:12 +03:00
Alibek Omarov
de88aec958 filesystem: restore DarkPlaces contributors copyrights lost in filesystem_stdio
* Add Xash3D FWGS contributors copyrights
2023-04-15 02:39:38 +03:00
Alibek Omarov
7f31871b5a engine: common: zone: restore Id Software and Darkplaces copyrights, add Xash3D FWGS copyrights 2023-04-15 02:39:16 +03:00
Alibek Omarov
f55ef63e26 ref: optimize R_LightLambert function
* Quick exit if no local lights
* Try to minimize Q_min() checks by apply it on temp variables
* Cap final light values only once, after all local lights are calculated
2023-04-14 20:33:07 +03:00
Alibek Omarov
824a34ee1e engine: common: imgelib: fix declaration after statement in test code 2023-04-14 18:58:43 +03:00
Alibek Omarov
46e2ccd2bf filesystem: wscript: check interface test before everything else
It makes sense since we're using sequential execution here anyway
2023-04-13 20:07:58 +03:00
Alibek Omarov
339c08d89f public: add basic test for our strcpy, strcmp and strcat functions 2023-04-13 19:56:31 +03:00
Alibek Omarov
2db2375b4d waifu: upgrade to latest revision 2023-04-13 18:43:08 +03:00
Alibek Omarov
d86ab19351 wscript: refactoring, replace --enable-fs-tests with --enable-tests
* Run filesystem tests in sequential order, to avoid tests being run
before filesystem_stdio DLL is linked
* Include new interface test in filesystem
2023-04-13 18:40:27 +03:00
Alibek Omarov
db40d58208 filesystem: add test for probing all interfaces 2023-04-13 18:39:21 +03:00
Alibek Omarov
33ff7bbd61 scripts: waifulib: compiler_optimizations: set default build type to release
I think this will make configuration less confusing, also we're stable enough to be built
with optimizations and without debug information
2023-04-13 16:14:09 +03:00
Alibek Omarov
4d4162336a engine: common: mod_bmodel: apply code style fixes to match existing code, for consistency 2023-04-11 03:11:23 +03:00
Jonathan Poncelet
372514151d engine: common: mod_bmodel: Fixed default texture name check
REF_DEFAULT_TEXTURE defines the canonical name, so is used
instead of a string literal.
2023-04-11 01:41:20 +03:00
Jonathan Poncelet
6c9ce478a9 engine: common: mod_bmodel: Fixed Con_Printf warnings
Some formatting characters did not match up with their
values.
2023-04-11 01:41:20 +03:00
Jonathan Poncelet
78555ab125 engine: common: mod_bmodel: Tidied texture loading procedure 2023-04-11 01:41:20 +03:00
Andrey Akhmichin
f2c671d809 utils: mdldec: Fix typo. 2023-04-10 01:03:52 +03:00
Alibek Omarov
4bce193645 mainui: update 2023-04-03 06:45:05 +03:00
Alibek Omarov
129de871e3 engine: common: hpak: use statically allocated hpk_maxsize cvar because gamedll can re-register it for some reason 2023-04-03 06:22:55 +03:00
Alibek Omarov
c24a1fafc5 engine: add missing HPAK_CheckSize/Integrity calls 2023-04-03 06:04:48 +03:00
Alibek Omarov
cee3757e6f engine: common: hpak: add hpak deletion in validate function 2023-04-03 06:04:18 +03:00
Alibek Omarov
12ed092446 engine: client: register VGui surface cvars 2023-04-03 06:03:29 +03:00
Alibek Omarov
2fb19a0cfd public: matrixlib: cleanup unused functions 2023-04-03 05:14:59 +03:00
Alibek Omarov
79624fa400 ref: gl: cleanup unused functions 2023-04-03 05:09:33 +03:00
Alibek Omarov
550ced9c36 ref: gl: cleanup unused functions in frustum 2023-04-03 05:05:32 +03:00
Alibek Omarov
fd795d5612 ref: soft: cleanup unused functions 2023-04-03 04:57:41 +03:00
Alibek Omarov
dc0982932b engine: common: sequence: static-ize private functions 2023-04-03 04:33:19 +03:00
Alibek Omarov
5d387101b9 engine: client: remove unused Key_IsBind 2023-04-03 04:33:19 +03:00
Alibek Omarov
eef1e1868a engine: common: remove unused BaseCmd_Replace 2023-04-03 04:33:19 +03:00
Alibek Omarov
4005ef831a engine: common: remove unused IsBackgroundMap/Demo calls, remove unused gamma function 2023-04-03 04:33:19 +03:00
Alibek Omarov
b0c71c598f engine: common: remove unused Mod_AmbientLevels 2023-04-03 04:33:19 +03:00
Alibek Omarov
d7848b7b8d engine: client: efx: remove unused CL_FreeParticle 2023-04-03 04:33:19 +03:00
Alibek Omarov
9cdce1ce69 engine: network: remove unused MSG_Read/WriteBitFloat 2023-04-03 04:17:54 +03:00
Alibek Omarov
84edd9d0c4 engine: client: use ReadVec3Angles in svc_setangle, as server uses WriteVec3Angles 2023-04-03 04:17:02 +03:00
Alibek Omarov
d8355a651f engine: add missing Sequence_Init and Sequence_OnLevelLoad calls 2023-04-03 04:12:47 +03:00
Alibek Omarov
004ac8105e engine: common: identification: static-ize all functions 2023-04-03 04:04:25 +03:00
Alibek Omarov
2e8ab13242 engine: client: fix parsing svc_spawnentity on old protocol 2023-04-03 03:56:31 +03:00
Alibek Omarov
27d9fc0afe engine: client: sound: remove unused functions 2023-04-03 03:55:57 +03:00
Alibek Omarov
192d510924 engine: client: remove unused function CL_FreeEntity and everything that used it 2023-04-03 03:55:57 +03:00
Alibek Omarov
3614cfa878 engine: client: avi: remove unused function 2023-04-03 03:55:57 +03:00
Alibek Omarov
12efcf1c44 engine: network: remove some totally ununsed functions 2023-04-03 03:13:50 +03:00
Alibek Omarov
a8de11643c engine: platform: sdl: make GL_CreateContext and GL_DeleteContext functions static 2023-04-03 03:13:33 +03:00
Alibek Omarov
597027277c engine: server: remove some totally unused functions 2023-04-03 03:12:52 +03:00
Alibek Omarov
48988e66bd engine: client: fix missing HTTP_ResetProcessState call 2023-04-03 03:11:39 +03:00
Alibek Omarov
37e3cf7e86 public: crtlib: remove unused functions 2023-04-03 02:46:23 +03:00
Alibek Omarov
01e0542223 engine: server: move master announce logic to masterlist, keep unique heartbeat challenge and heartbeat timer for each master 2023-04-03 00:57:47 +03:00
Alibek Omarov
93a7ccd14f engine: network: add net_gai_state_t enum for NET_StringToAdrNB result value 2023-04-03 00:15:35 +03:00
Alibek Omarov
892e5c59eb engine: server: convert public_server cvar to static allocation 2023-04-02 22:48:47 +03:00
Alibek Omarov
c2992afb4a engine: network: make all HTTP commands and cvars restricted, except http_addcustomserver. Also zero http_useragent by default (it's autogenerated now) 2023-03-31 01:22:41 +03:00
Alibek Omarov
b99e7a6304 engine: network: include build info to default HTTP useragent 2023-03-31 01:16:17 +03:00
Alibek Omarov
8888b456df engine: client: cl_tent: rewrite R_Sprite_Explode to be closer to original function but support Xash extensions 2023-03-30 04:42:48 +03:00
Alibek Omarov
53987f47e2 engine: client: use alternative ease-in ease-out function in sound fade 2023-03-30 04:40:54 +03:00
Alibek Omarov
7cac1d290d scripts: gha: it's pretty safe to not do clean on Waf, since it's much better at tracking modified files 2023-03-29 00:22:47 +03:00
Alibek Omarov
55b048aab9 github: enable nswitch and psvita CI builds back, test if continuous tag gets correctly deleted 2023-03-29 00:05:40 +03:00
Alibek Omarov
881a7edb9f github: try to fix uploading release again 2023-03-28 23:54:49 +03:00
Alibek Omarov
6c62136f11 engine: client: avi: convert filename to wide characters before passing it into VFW API 2023-03-28 22:42:16 +03:00
Alibek Omarov
f34b35be5a engine: client: avi: re-attribute AVI support code by restoring original author copyright 2023-03-28 22:42:16 +03:00
Alibek Omarov
4b5ee87de1 engine: client: adapt to RefAPI 4 changes. Fix interpolation issue after reloading a save 2023-03-28 21:34:51 +03:00
Alibek Omarov
67903b55cc ref: soft: adapt to RefAPI 4 changes 2023-03-28 21:34:43 +03:00
Alibek Omarov
55bf0e8a53 ref: gl: adapt to RefAPI 4 changes 2023-03-28 20:45:26 +03:00
Alibek Omarov
f1487cf576 engine: ref_api: bump RefAPI version to 4, R_StudioEstimateFrame now has time argument 2023-03-28 20:42:18 +03:00
Alibek Omarov
29e32310cf github: update linux builds to ubuntu-20.04 2023-03-28 20:08:42 +03:00
Alibek Omarov
2ea549f250 github: update upload-release-action to 2.5.0, print outputs in repackage binaries step 2023-03-28 19:49:35 +03:00
SNMetamorph
b2ea8c9d18 engine: platform: win32: enabled attaching to existing console instead of creating new 2023-03-27 20:31:52 +03:00
Alibek Omarov
6e27926a10 engine: simplify XASH_USE_EVDEV macro usage by giving it's defined positive value 2023-03-27 17:28:19 +03:00
Alibek Omarov
96c30371b7 engine: client: better specify rawinput enabling condition on Win32 2023-03-27 17:22:48 +03:00
Alibek Omarov
9a42f4149f engine: client: disable enabling mouse cursor in key_message (typing in chat) 2023-03-27 17:22:48 +03:00
Alibek Omarov
dca4226e4b github: re-use PrimeXT's actions to upload artifacts to GitHub Releases 2023-03-27 06:01:19 +03:00
Alibek Omarov
b3c1c173a9 scripts: gha: exit if we can't move to a specified directory 2023-03-27 04:30:21 +03:00
Alibek Omarov
3e67445ef3 scripts: gha: psvita: fix building HLSDK, exit if we can't move to a directory 2023-03-27 04:27:55 +03:00
Alibek Omarov
127bd89b44 filesystem: remove unused watch.c file, added by mistake from inotify branch 2023-03-27 03:56:57 +03:00
SNMetamorph
3361e74f54 engine: client: console: fixed console scrolling on psvita platform 2023-03-27 03:52:51 +03:00
SNMetamorph
48e199bfa1 engine: common: enabled printing logs to stderr for psvita platform only in developer mode 2023-03-27 03:52:51 +03:00
SNMetamorph
575179dbf5 engine: client: added default dead zone values for psvita platform 2023-03-27 03:52:51 +03:00
SNMetamorph
e024a67436 engine: platform: psvita: fixed vrtld error reporting 2023-03-27 03:52:51 +03:00
SNMetamorph
e3103249f4 engine: platform: psvita: added developer mode button to launcher 2023-03-27 03:52:51 +03:00
SNMetamorph
0746cb5365 engine: platform: psvita: disabled back touch sensor 2023-03-27 03:52:51 +03:00
Alibek Omarov
fcda7517fe engine: common: soundlib: add support for MP3 looping through custom ID3v2.4.0 tagging 2023-03-27 03:51:42 +03:00
Alibek Omarov
2c77f4c566 engine: client: notify client.dll about local player in firstplayer mode for use in custom renderers 2023-03-27 03:47:42 +03:00
Alibek Omarov
1caa276531 engine: common: imagelib: fix loading cubemaps
Loop break was a bug that was added after refactoring imagelib loader.

In fact, it was mindlessly copypasted from old code, where same break was
used to quickly exit from inner format bruteforcing loop, than outer cubemap
loading loop.
2023-03-25 07:02:29 +03:00
Alibek Omarov
e673fe9a02 filesystem: only create readwrite directories if they look like a gamedirectory in rodir 2023-03-25 03:27:32 +03:00
Alibek Omarov
3ccbc7a28c engine: client: ref_common: r_refdll is not a VIDRESTART cvar 2023-03-24 18:03:06 +03:00
Alibek Omarov
8bb5ec5e26 ref: remove renderer description export, it's unused now 2023-03-24 02:54:14 +03:00
Alibek Omarov
35ff062407 wscript: restore NSwitch and PSVita specific link and compiler flags 2023-03-24 02:28:25 +03:00
Alibek Omarov
ec355a83d1 engine: client: ref_common: eliminate COM_FreeLibrary in renderer names query, hardcoding them instead 2023-03-24 01:52:14 +03:00
Alibek Omarov
182d8edb42 engine: wscript: define enabled renderers as macros 2023-03-24 01:50:53 +03:00
Alibek Omarov
762e4da7a0 wscript: generic refactoring
* Add RefDll class to aid in enabling renderers, creating help options, etc
* Fix optimization flags and werrors are being added twice
* Rewrite if not win32: if elif elif into a set of elifs
* Remove mandatory=True in checks, as it's a default option
2023-03-24 01:50:21 +03:00
Alibek Omarov
098c4c009b engine: platform: sdl: fix incorrect HICON cast in SetClassLongPtr call 2023-03-21 05:16:07 +03:00
Alibek Omarov
f8cf2c8953 scripts: continious_upload: retry if upload failed 2023-03-21 05:15:30 +03:00
Alibek Omarov
cc6838ec97 scripts: gha: psvita: try to fix vitaGL dependency fetching 2023-03-21 04:32:37 +03:00
Alibek Omarov
dca637d4bb engine: client: eliminate pfnServerCmd limit and, like GoldSrc, send our server command immediately to netchan 2023-03-21 04:25:32 +03:00
Alibek Omarov
3949422430 scripts: gha: psvita: fix HLSDK branches names, as all needed PSVita changes have been merged to hlsdk-portable 2023-03-20 18:14:51 +03:00
Alibek Omarov
2c8488f07a scripts: gha: psvita: disable SINGLE_THREADED_GC for vitaGL as it was fixed in upstream (thanks, @fgsfds) 2023-03-20 18:05:24 +03:00
Alibek Omarov
1df1fc32df scripts: gha: psvita: lock vitaGL revision, use --depth=1 in git clone 2023-03-20 18:05:24 +03:00
SNMetamorph
eac8c116a8 engine: server: sv_init: compiling error fix & minor cleanup 2023-03-20 16:29:43 +03:00
SNMetamorph
a03019f5e4 engine: server: sv_init: enabled handling sound resources specifically
This is for timely precaching on client side. Otherwise, files are being downloaded to client, but not precached immediatly after it, and therefore causing a late precaching of sound (obvious, this is bad)
2023-03-20 16:29:43 +03:00
SNMetamorph
714b4f45e4 engine: common: added COM_GetResourceTypeName function 2023-03-20 16:29:43 +03:00
SNMetamorph
68be8157ea engine: common: soundlib: added Sound_SupportedFileFormat function 2023-03-20 16:29:43 +03:00
Alibek Omarov
ea2a8b6785 3rdparty: update submodules (extras, mainui, opus) 2023-03-20 16:03:36 +03:00
Alibek Omarov
8c80d3b85d engine: common: cvar: add exception for cl_dodmusic cvar to fix Day of Defeat Beta 1.3 music issue 2023-03-18 20:34:30 +03:00
Alibek Omarov
33c0764e65 engine: common: system: fix inverted COM_CheckStringEmpty in Sys_GetCurrentUser for Vita
Thanks @fgsfdsfgs for pointing out
2023-03-17 17:29:40 +03:00
Alibek Omarov
d085c5a843 ref: gl: gl_cull: remove thirdperson check, as it handled in client instead 2023-03-15 06:29:29 +03:00
Alibek Omarov
4ada40e8a8 engine: client: check if we should discard local player entity before HUD_AddEntity call, allowing CL_IsThirdPerson hack used in MMod 2023-03-15 06:28:20 +03:00
Alibek Omarov
1630d87c0d engine: client: do not alter the state if invalid HANDLE was passed to pfnSPR_Set. Fixes Half-Life: MMod 2023-03-15 04:58:33 +03:00
Alibek Omarov
3a956a1ad3 engine: client: initialize variables in SPR_Width/Height/Frames functions, in case R_GetSpriteParms fails 2023-03-15 04:58:00 +03:00
Alibek Omarov
774ced312f wscript: enforce -Werror=strict-aliasing 2023-03-14 21:29:35 +03:00
Alibek Omarov
fec3d33dcf engine: client: cl_securedstub: fix strict aliasing in secured module initializing 2023-03-14 21:29:35 +03:00
Alibek Omarov
d4610e30fd engine: common: net_encode: fix strict aliasing by converting it to use float_bits_t union 2023-03-14 21:29:35 +03:00
Alibek Omarov
885cda971d engine: common: net_buffer: fix strict aliasing by converting it to use float_bits_t union 2023-03-14 21:29:35 +03:00
Alibek Omarov
ef0b227967 ref: gl: alias: fix strict aliasing by converting it to use float_bits_t union 2023-03-14 21:29:35 +03:00
Alibek Omarov
19a785a98a public: mathlib: convert rsqrt to use float_bits_t union 2023-03-14 21:29:35 +03:00
Alibek Omarov
b96bfcfe7a public: mathlib: convert FloatToHalf and HalfToFloat to use float_bits_t union 2023-03-14 21:29:35 +03:00
Alibek Omarov
412c635499 public: add float_bits_t union to access float as 32-bit signed or unsigned integer 2023-03-14 21:29:35 +03:00
Alibek Omarov
da5ec56567 engine: common: con_utils: fix const qualifier discard in Con_CheckName 2023-03-14 00:35:07 +03:00
Alibek Omarov
e664e80b27 engine: common: mod_bmodel: replace few more obvious va calls by temp buffer and Q_snprintf 2023-03-13 06:25:57 +03:00
Alibek Omarov
d177b6f528 engine: cvar: consolidate auto description for GLCONFIG cvars
Fix bug when GLCONFIG cvars didn't had it's respective CLIENTDLL or GAMEUIDLL flags
2023-03-13 06:22:54 +03:00
Alibek Omarov
2ef3d78d9f engine: client: netgraph: replace CL_DrawString with va calls by CL_DrawStringf 2023-03-13 06:16:17 +03:00
Alibek Omarov
5ea5e1167b engine: client: font: add CL_DrawStringf wrapper 2023-03-13 06:15:45 +03:00
Alibek Omarov
116a605248 engine: common: replace some obvious va uses by temp buffer and Q_snprintf or equivalent code 2023-03-13 06:08:36 +03:00
Alibek Omarov
9690fe9334 engine: client: replace some obvious va uses by temp buffer and Q_snprintf 2023-03-13 06:03:44 +03:00
Alibek Omarov
a81fa84321 engine: server: replace some obvious va uses to temp buffer and Q_snprintf 2023-03-13 06:00:38 +03:00
Alibek Omarov
5ef97ae99e engine: convert Info_SetValueForKey with va to Info_SetValueForKeyf 2023-03-13 05:37:45 +03:00
Alibek Omarov
d667845777 engine: convert Cbuf_AddText with va to Cbuf_AddTextf 2023-03-13 05:31:27 +03:00
Alibek Omarov
b12b2aaf79 engine: common: cmd: add Cbuf_AddTextf wrapper 2023-03-13 05:28:53 +03:00
Alibek Omarov
6b62f9c1b9 engine: convert Cvar_Get with va to Cvar_Getf 2023-03-13 05:19:32 +03:00
Alibek Omarov
ba1cf25314 engine: convert MSG_WriteString with va to MSG_WriteStringf 2023-03-13 05:13:52 +03:00
Alibek Omarov
fb2ba6a6e2 engine: common: net_buffer: add MSG_WriteStringf wrapper 2023-03-13 05:12:46 +03:00
Alibek Omarov
fb6e310eab public: move va() function back to engine, it's not recommended to use in shared modules 2023-03-13 02:44:59 +03:00
Alibek Omarov
bcbd1a59c6 engine: common: base_cmd: add a simple benchmark within basecmd_test command 2023-03-13 02:40:48 +03:00
Alibek Omarov
8e45a43ad2 engine: common: base_cmd: alphabetically order inserts for faster lookups 2023-03-13 02:39:54 +03:00
Alibek Omarov
115ed82c19 engine: common: base_cmd: static-ize internal fuctions 2023-03-13 02:39:02 +03:00
Alibek Omarov
5c1e06ae74 public: crclib: optimize COM_HashKey, implement typical djb hashing as this function is used for hashtables with string lookup 2023-03-13 02:37:19 +03:00
SNMetamorph
f9205825b6 engine: platform: sdl: fixed psvita & nswitch platform initializing 2023-03-12 16:09:20 +03:00
Andrey Akhmichin
9040c34f48 ref: gl: replace va function calls. 2023-03-11 17:56:05 +03:00
Andrey Akhmichin
9e9703e6de engine: common: imagelib: replace va function calls. 2023-03-11 17:37:16 +03:00
Andrey Akhmichin
6486533355 engine: platform: android: replace va function calls. 2023-03-11 16:29:55 +03:00
Andrey Akhmichin
34160151a4 filesystem: replace va function calls. 2023-03-11 16:28:54 +03:00
Andrey Akhmichin
daaaa324bd engine: platform: emscripten: replace va function calls. 2023-03-11 15:32:14 +03:00
Andrey Akhmichin
af5c74981b ref: soft: replace va function calls. 2023-03-11 15:31:17 +03:00
Andrey Akhmichin
249ce6bca1 engine: platform: win32: replace va function calls. 2023-03-11 15:30:56 +03:00
Andrey Akhmichin
b648c74815 engine: platform: posix: replace va function calls. 2023-03-11 15:30:29 +03:00
Andrey Akhmichin
a2d459ae84 engine: common: add printf-like version of Cvar_Get function. 2023-03-11 15:29:54 +03:00
Andrey Akhmichin
573781b45d engine: platform: sdl: replace va function calls. 2023-03-11 15:29:34 +03:00
Andrey Akhmichin
3299999f3d engine: common: add printf-like version of Info_SetValueForKey function. 2023-03-11 15:28:54 +03:00
Alibek Omarov
91be4f6521 engine: common: cmd: fix inverted check in apropos 2023-03-11 07:50:33 +03:00
fgsfds
f2f21b24a1 scripts: psvita: no need for fsigned-char either 2023-03-11 07:09:19 +03:00
fgsfds
9ef43a4794 scripts: psvita: no need to force GNU_SOURCE everywhere 2023-03-11 07:09:19 +03:00
fgsfds
fc02a69686 docs: add nswitch and psvita to ports.md 2023-03-11 07:09:19 +03:00
fgsfds
b10a0dc5c5 ci: psvita: build bshift libraries 2023-03-11 07:09:19 +03:00
fgsfds
e5f0d1557c docs: psvita: add install/build instructions 2023-03-11 07:09:19 +03:00
fgsfds
d8a3f4850a ci: psvita: libk is not required 2023-03-11 07:09:19 +03:00
fgsfds
882d957b5c ci: psvita: vdpm is in the current directory 2023-03-11 07:09:19 +03:00
fgsfds
afd1727898 ci: psvita: only download necessary packages 2023-03-11 07:09:19 +03:00
fgsfds
70a73e47a7 psvita: use crtlib where possible 2023-03-11 07:09:19 +03:00
fgsfds
fe3f15ad33 engine: input: psvita: reimplement OSK manually 2023-03-11 07:09:19 +03:00
fgsfds
66f625f840 engine: psvita: use a macro for ioctlsocket like on all other platforms 2023-03-11 07:09:19 +03:00
fgsfds
3e1833722f engine: psvita: check req in ioctlsocket() 2023-03-11 07:09:19 +03:00
fgsfds
4b8e11f561 engine: remove stray #if XASH_PSVITA 2023-03-11 07:09:19 +03:00
fgsfds
0d04c20578 ref: gl: psvita: skip deleting the shaders since glDeleteProgram can block for a long time 2023-03-11 07:09:19 +03:00
fgsfds
41c819f3d3 engine: psvita: keep old arguments in Sys_NewInstance 2023-03-11 07:09:19 +03:00
fgsfds
957154f097 scripts: psvita: move TITLEID and APPNAME to engine elf build arguments 2023-03-11 07:09:19 +03:00
fgsfds
fad506ef03 ref: gl: vgl_shim: remove normal support, it's not necessary 2023-03-11 07:09:19 +03:00
fgsfds
9150bbdfd8 ref: gl: psvita: remove the GL_CheckExtension hack 2023-03-11 07:09:19 +03:00
fgsfds
aa4e2f0ae4 ref: gl: psvita: use Cvar_FullSet to disable r_studio_drawelements 2023-03-11 07:09:19 +03:00
fgsfds
2bacc91922 ref: gl: move vgl_shim to ref/gl 2023-03-11 07:09:19 +03:00
fgsfds
458aa6d8b8 ci: psvita: copy the vpk as well 2023-03-11 07:09:19 +03:00
fgsfds
6963741020 ci: psvita: fix copypaste error 2023-03-11 07:09:19 +03:00
fgsfds
b55aa982b0 ci: psvita: vrtld uses cmake 2023-03-11 07:09:19 +03:00
fgsfds
492481eea8 ci: basic psvita scripts 2023-03-11 07:09:19 +03:00
fgsfds
76bff9cd4b ref: gl: psvita: fix long hang on shutdown 2023-03-11 07:09:19 +03:00
fgsfds
47a6be86b1 engine: psvita: export stpcpy 2023-03-11 07:09:18 +03:00
fgsfds
287688d985 engine: psvita: implement Sys_NewInstance 2023-03-11 07:09:18 +03:00
fgsfds
610d528042 engine: psvita: implement Sys_GetCurrentUser 2023-03-11 07:09:18 +03:00
fgsfds
89ec39821e ref: gl: psvita: add fog support; bump max verts to 32768 2023-03-11 07:09:18 +03:00
fgsfds
82cfd3ecc3 ref: gl: psvita: revert arrayverts change, it doesn't matter that much 2023-03-11 07:09:18 +03:00
fgsfds
5a3e3b3977 ref: gl: add immediate mode shim for psvita 2023-03-11 07:09:18 +03:00
fgsfds
9cf6e421cb ref: gl: psvita: force-enable NPOT textures 2023-03-11 07:09:18 +03:00
fgsfds
5c56b51044 engine: client: don't pop up OSK during loading screens on the PSVita either 2023-03-11 07:09:18 +03:00
fgsfds
577add56f1 filesystem: fs is non case sensitive on nswitch and psvita 2023-03-11 07:09:18 +03:00
fgsfds
adc5aa4659 psvita: don't default to -dev 255 2023-03-11 07:09:18 +03:00
fgsfds
5beed5ab29 engine: psvita: rebalance memory pools a bit 2023-03-11 07:09:18 +03:00
fgsfds
34dd52ca90 ref: gl: trust the GL_EXTENSIONS string on psvita 2023-03-11 07:09:18 +03:00
fgsfds
6304b51f32 psvita: fno-short-enums, make ref_gl function somewhat 2023-03-11 07:09:18 +03:00
fgsfds
97a7de3377 engine: server: remove duplicate registration for sv_autosave 2023-03-11 07:09:18 +03:00
fgsfds
7424b29e56 engine: initial psvita build support 2023-03-11 07:09:14 +03:00
Alibek Omarov
3c64d2ad80 public: build: don't confuse other libcs with built with glibc game libraries by specifying them into separate platform, like Android 2023-03-11 05:45:11 +03:00
Alibek Omarov
1274fa13c8 engine: common: cmd: slightly simplify apropos taking all arguments and checking for filtering symbols 2023-03-11 05:38:28 +03:00
Alibek Omarov
3765686077 public: make va() buffer size public 2023-03-11 05:28:17 +03:00
SNMetamorph
9fffd7a270 Documentation: added page about debugging mods using minidump files 2023-03-11 04:28:25 +03:00
SNMetamorph
e37c07f44f engine: crashhandler: added support for minidumps generation 2023-03-11 04:28:25 +03:00
SNMetamorph
214a3cce73 engine: host: added -minidumps startup parameter for win32 platform 2023-03-11 04:28:25 +03:00
Andrey Akhmichin
d738b07660 Documentation: mod-porting-guide.md: Update. 2023-03-11 04:22:30 +03:00
Alibek Omarov
48ca8f9a70 engine: server: fix call to non existent function, in this tree it's called IsMasterAdr 2023-03-02 17:36:56 +03:00
Alibek Omarov
c565b0a505 mainui: update 2023-03-02 17:35:50 +03:00
Alibek Omarov
474833a3bf engine: server: send heartbeats to master server if sv_nat is active, despite public cvar value 2023-03-01 15:57:30 +03:00
Alibek Omarov
602f23fbdf engine: server: check if we got info request from master server, that acts as a bridge for NAT servers 2023-03-01 15:57:30 +03:00
Alibek Omarov
7e9d46689c engine: client: fix multiline CenterPrint 2023-02-24 19:46:02 +03:00
Alibek Omarov
b6347d17c9 engine: client: sound: don't print sound/ twice in soundlist command 2023-02-19 12:25:03 +03:00
Alibek Omarov
8293bc91d4 engine: client: sound: fix PickDynamicChannel to correctly find channel with minimum time left 2023-02-18 03:37:20 +03:00
Alibek Omarov
fb0f184d6b engine: common: lib_common: fix offset by one UB 2023-02-17 22:51:56 +03:00
Alibek Omarov
58e95c7d6f engine: client: console: elinimate unneeded Sys_DoubleTime call in Con_DrawDebug 2023-02-17 22:50:42 +03:00
Alibek Omarov
7a5381e658 engine: common: mod_studio: fix uninitialized adj array 2023-02-17 22:50:12 +03:00
Alibek Omarov
375c06400c engine: server: avoid unaligned access in pfnMessageEnd 2023-02-17 22:48:56 +03:00
Alibek Omarov
e481c86ba2 engine: client: console: fix NXPrintf newlines, small refactoring 2023-02-15 05:53:39 +03:00
Alibek Omarov
21b9f07323 engine: platform: sdl: remove legacy XASH_NANOGL macro from vid code, it's only relevant for ref_gl 2023-02-14 18:52:51 +03:00
Alibek Omarov
0bff62e696 engine: sprite: migrate header to stdint.h, remove usage of enums in data structs for portability, add static sizeof checks 2023-02-14 18:29:27 +03:00
Alibek Omarov
858597832d engine: alias: migrate header to stdint.h, remove usage of enums in data structs for portability, add static sizeof checks 2023-02-14 18:29:18 +03:00
Alibek Omarov
9b0ac7cb32 common: add shared synctype_t definition header, borrowed from Quake's modelgen.h 2023-02-14 18:18:16 +03:00
Alibek Omarov
3c27384b6b filesystem: speedup fs_ext_path case in FS_FindFile 2023-02-13 06:49:52 +03:00
Alibek Omarov
1e8c26a527 filesystem: wad: fix loading WADs by absolute paths 2023-02-13 06:49:29 +03:00
Alibek Omarov
f4069de7f2 engine: move SlerpBones, CalcBonePosition/Quaternion from engine to libpublic 2023-02-13 05:23:13 +03:00
Alibek Omarov
e95161aa14 filesystem: fix ClearSearchPath 2023-02-12 17:09:53 +03:00
Alibek Omarov
0984368a31 engine: server: GoldSrc compliant pfnServerExecute(), don't execute config.cfg for server! 2023-02-11 07:22:04 +03:00
Alibek Omarov
f4961d9da7 engine: client: return empty string in pfnGetLevelName if no map is loaded yet 2023-02-11 06:50:46 +03:00
Alibek Omarov
f42a174482 engine: client: empty current map name in CL_ClearState 2023-02-11 06:45:20 +03:00
Alibek Omarov
13bf607031 engine: client: call VidInit early in svc_serverdata parsing, GoldSrc compatibility 2023-02-11 06:43:38 +03:00
Alibek Omarov
3cfdb1213b engine: client: consolidate modern and legacy protocol parsing functions, if possible 2023-02-11 06:06:21 +03:00
Alibek Omarov
d58105d64d scripts: flatpak: fix Half-Life directory detection 2023-02-11 03:56:40 +03:00
Alibek Omarov
1bdd844860 scripts: flatpak: minimize filesystem permissions, add Steam Flatpak data directory 2023-02-11 03:36:40 +03:00
Alibek Omarov
11f3d97cd7 scripts: flatpak: respect XDG data home in launcher script, add Steam Flatpak data directory 2023-02-11 03:36:40 +03:00
Alibek Omarov
fccf044976 engine: initialize network buffers used on player connect and after 2023-02-09 17:57:45 +03:00
Alibek Omarov
c23396f533 engine: client: keys: hardcode K_START_BUTTON as escape button, cancelselect doesn't exist anymore and many games seems to use this button for menu access, and back for pause 2023-02-09 06:32:14 +03:00
Alibek Omarov
33c9f7118b engine: platform: sdl: sanitize buttons/axes from SDL, add ABXY->BAYX swap for NSwitch 2023-02-09 06:31:19 +03:00
Alibek Omarov
c741ec223f engine: client: keys: reserve some more buttons as gamepad buttons according to latest SDL2 GameController header 2023-02-09 06:30:08 +03:00
Alibek Omarov
d6d98bd297 engine: platform: sdl: minor style changes 2023-02-09 05:59:34 +03:00
Alibek Omarov
5e1b5d89f7 engine: client: console: allow opening OSK and existing console with gamepads for all platforms 2023-02-09 05:58:54 +03:00
Alibek Omarov
a0edfd28b2 engine: common: host: use DEFAULT_ALLOWCONSOLE macro to set default console state 2023-02-09 05:56:11 +03:00
Alibek Omarov
555fd02407 defaults: reorganize platform default overrides, disable touch for nswitch 2023-02-09 05:55:35 +03:00
Alibek Omarov
f7f9cfecfc ci: nswitch: use waf install to copy build artifacts 2023-02-09 05:35:30 +03:00
Alibek Omarov
2aeee59a31 Merge remote-tracking branch 'fgsfds/switch_newer' 2023-02-09 05:18:06 +03:00
Alibek Omarov
12b8965a8c mainui: update 2023-02-08 20:01:06 +03:00
Alibek Omarov
b5b6b8b785 engine: network: fix some unitialized sockaddr_storage's 2023-02-08 20:00:51 +03:00
fgsfds
35e073ceff ci: nswitch: don't forget filesystem_stdio 2023-02-08 01:53:26 +01:00
fgsfds
b2cc96cf0d scripts: wscript: nswitch: do the libstdc++ hack right before build to not pollute the environment 2023-02-08 01:37:35 +01:00
fgsfds
f7489a3747 scripts: nswitch: it's arm64, not aarch64 2023-02-08 01:04:31 +01:00
fgsfds
0e7ebf6d44 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs into switch_newer 2023-02-08 00:56:20 +01:00
fgsfds
69607d7890 nswitch: do not link libstdc++ into dynamic libraries
instead only link it to the main executable with --whole-archive, letting the dynamic libs import anything they want from it
2023-02-08 00:52:48 +01:00
fgsfds
4e87eb068a engine: common: nswitch: use #if instead of #ifdef 2023-02-07 23:03:59 +01:00
Alibek Omarov
03a7c67731 public: build: revert arm64 renaming to aarch64, we shouldn't enforce naming changes without a reason 2023-02-08 00:03:15 +03:00
Alibek Omarov
5ba2449d10 engine: common: static-ify functions in mod_studio.c 2023-02-08 00:03:15 +03:00
fgsfds
0ee2fd8a8a ci: nswitch: do not dumb, 00 penalty 2023-02-07 20:52:23 +01:00
fgsfds
080b9b30a1 ci: nswitch: do not put the pkgtemp folder into the .7z 2023-02-07 20:45:42 +01:00
fgsfds
749ac5ed54 ci: nswitch: do not rely on dkp-pacman at all 2023-02-07 20:38:40 +01:00
fgsfds
6c8b9af6bb ci: nswitch: fix artifact packaging 2023-02-07 20:35:24 +01:00
fgsfds
07922c0239 ci: nswitch: actually set env vars properly 2023-02-07 20:26:24 +01:00
fgsfds
1a54ec92e0 github: ref name not required 2023-02-07 20:26:13 +01:00
fgsfds
663b574b8b github: checkout the switch_newer branch for now 2023-02-07 20:22:30 +01:00
fgsfds
430c51b71a ci: nswitch: there is no python-is-python3 where we're going 2023-02-07 20:14:11 +01:00
fgsfds
20bcd03f19 ci: nswitch: ...and set it to be the default python install 2023-02-07 20:07:48 +01:00
fgsfds
dab959fc32 ci: nswitch: the docker container is missing python, install it 2023-02-07 20:04:36 +01:00
fgsfds
eff75e5d50 ci: nswitch: the docker container is missing dkp-toolchain-vars, install it 2023-02-07 20:00:49 +01:00
fgsfds
d103f022b4 ci: nswitch: forgot run 2023-02-07 19:55:33 +01:00
fgsfds
72b8246969 ci: nswitch: attempt to use dkp's docker image
because they banned the ci server from accessing their pacman repo
2023-02-07 19:54:00 +01:00
fgsfds
030d05f018 ci: nswitch: make install with sudo 2023-02-07 18:38:18 +01:00
fgsfds
59cd5493e7 github: add nswitch build target 2023-02-07 18:35:08 +01:00
fgsfds
98a7f6fa3f ci: add nswitch build scripts 2023-02-07 18:34:58 +01:00
fgsfds
65095df124 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs into switch_newer 2023-02-07 17:15:01 +01:00
fgsfds
ee370ea007 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs into switch_newer 2023-02-07 17:14:47 +01:00
Alibek Omarov
05016f8639 engine: vgui: add EnableTextInput to the API 2023-02-06 16:42:09 +03:00
Alibek Omarov
12154de6f5 ref: soft: fix -Wsequence-point 2023-02-06 16:42:09 +03:00
Alibek Omarov
3fca567b81 wscript: few more warnings-as-errors 2023-02-06 16:42:09 +03:00
Alibek Omarov
634574f249 engine: platform: sdl: don't enable text mode with cursor??? 2023-02-06 00:29:14 +03:00
fgsfds
f782d444a8 engine: platform: posix: don't redefine _GNU_SOURCE 2023-02-06 00:05:41 +03:00
fgsfds
b68def2b9c engine: touch: only pop up touch keyboard on FINGERDOWN events 2023-02-06 00:05:32 +03:00
fgsfds
d944301a60 engine: client: add barebones gamepad controls to input fields 2023-02-06 00:05:28 +03:00
fgsfds
15ba932046 engine: server: add sv_autosave cvar
* a1ba: added FCVAR_PRIVILEGED just in case
2023-02-06 00:05:20 +03:00
fgsfds
b73c16c216 engine: net_ws: pass correct sockaddr lengths where needed 2023-02-05 23:51:48 +03:00
fgsfds
0ba4ef678c engine: net_ws: pass correct sockaddr lengths where needed 2023-02-05 03:39:32 +01:00
fgsfds
919d510f63 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs into switch_newer 2023-02-05 02:37:40 +01:00
fgsfds
6557ac7fb4 server: add sv_autosave cvar 2023-02-05 02:29:22 +01:00
Alibek Omarov
87c307f47e scripts: flatpak: install vgui 2023-02-05 04:27:58 +03:00
fgsfds
f3e50b5500 add barebones gamepad controls for input fields and console 2023-02-05 02:27:12 +01:00
fgsfds
705f252ed8 nswitch: don't automatically pop up OSK when opening console 2023-02-05 02:26:48 +01:00
fgsfds
cb28101732 touch: only pop up OSK on FINGERDOWN events 2023-02-05 02:26:17 +01:00
fgsfds
f87863b8bc nswitch: always enable console 2023-02-05 02:18:11 +01:00
fgsfds
25fb89f717 nswitch: don't redefine O_BINARY 2023-02-05 02:16:56 +01:00
fgsfds
36e7856b9c don't redefine _GNU_SOURCE 2023-02-05 02:16:38 +01:00
Alibek Omarov
34b0cdc125 scripts: flatpak: use relative paths as RoDir doesn't allow absolute paths for now 2023-02-05 04:13:45 +03:00
fgsfds
25a1cb8ce7 Nintendo Switch support (again) 2023-02-05 02:09:32 +01:00
Alibek Omarov
a610b1545b scripts: flatpak: check .local directory for steam library 2023-02-05 03:44:58 +03:00
Alibek Omarov
30b698067a scripts: flatpak: allow easy debugger attach 2023-02-05 03:25:07 +03:00
Alibek Omarov
f63f1a0dc6 scripts: flatpak: add another default Steam library path 2023-02-05 02:43:36 +03:00
Alibek Omarov
9cb867a7d4 filesystem: wad: print errno if wad can't be opened 2023-02-05 02:42:35 +03:00
Alibek Omarov
00ddd95c27 scripts: flatpak: try to add ourselves to desktop menu entries 2023-02-05 02:25:21 +03:00
Alibek Omarov
0ffd1b9ff1 github: try to enable building flatpak bundle 2023-02-05 00:40:08 +03:00
Alibek Omarov
2109d49aa3 ci: disable xash-extras fetching, it's a submodule now 2023-02-05 00:06:19 +03:00
Alibek Omarov
f910f4896c engine: client: font: finally add support for tab character in engine 2023-02-04 22:53:10 +03:00
Alibek Omarov
6eae3471cf engine: client: font: fix consecutive newlines skipped, add flag to reset color after a newline 2023-02-04 21:59:46 +03:00
Alibek Omarov
c0fa91bec9 engine: client: consolidate client and menu scissor functions 2023-02-04 21:24:19 +03:00
Alibek Omarov
ba6dd3c751 engine: client: font: fix another inverted check 2023-02-04 21:23:51 +03:00
Alibek Omarov
fd63018fb5 engine: client: make client string drawing functions ignore linefeeds 2023-02-04 20:58:33 +03:00
Alibek Omarov
2225915702 engine: client: font: fix CL_DrawStringLen 2023-02-04 20:54:17 +03:00
Alibek Omarov
d14e486721 engine: client: font: add special flag to ignore linefeeds when drawing strings 2023-02-04 20:53:52 +03:00
Alibek Omarov
82b6da493a wscript: enforce GCC suspicious sizeof operations warnings as errors 2023-02-03 18:51:50 +03:00
Alibek Omarov
bec0b36bb9 engine: client: font: fix colorcodes, don't reset Colo4ub, it will be reset by consequent draw calls anyway 2023-02-03 18:20:02 +03:00
Alibek Omarov
e2c2821191 engine: client: font: do not apply filtering hack when fonts aren't upscaled 2023-02-03 18:06:07 +03:00
Alibek Omarov
a19d34035d engine: client: font: do not use OpenFile on WADs >_< 2023-02-03 17:49:06 +03:00
Alibek Omarov
77ea03a62c engine: client: introduce bare-bones font manager and text drawing manager
* wire hud_fontscale so HUD font scaling can be used independently from
  hud_scale
* allow small optimizatinons, like optional UTF-8 decoding, or not calling
  SetRenderMode for each character
* even less copypasted code in text drawing between client code and console
* get rid of direct DrawCharacter calls when it can be just DrawString
* fix net_speeds, r_speeds with scaled console fonts
* try to fix MobilityAPI's pfnDrawCharacterScaled
* center keyboard keys in OSK code
2023-02-03 08:51:18 +03:00
Alibek Omarov
402a0f129d engine: platform: sdl: use SDL joystick rumble for Platform_Vibrate 2023-02-03 08:50:41 +03:00
Alibek Omarov
d7116afc92 engine: client: add hud_fontscale cvar to control HUD font scaling (not wired to any logic yet) 2023-02-02 04:57:53 +03:00
Alibek Omarov
d5fe491c14 engine: client: add a little auto-disconnect message in case of server timeout 2023-02-02 02:49:25 +03:00
Alibek Omarov
92138428c5 engine: touch: don't emulate touch and mouse through SDL2 (taken from @Velaron branch) 2023-02-01 06:42:31 +03:00
Alibek Omarov
f3ff942ea9 scripts: flatpak: add basic i386 flatpak script 2023-02-01 04:58:12 +03:00
Alibek Omarov
ced6e8869a ref: fix chrome texture being misaligned 2023-02-01 04:55:47 +03:00
Alibek Omarov
d7af50ea6c engine: ref: remove direction vectors from Ref API, renderers calculate them from viewangles to local data anyway 2023-01-31 07:18:23 +03:00
Alibek Omarov
f7d4e5a2ea engine: server: don't show GAMESAVED message in autosaves, small refactoring 2023-01-31 07:16:08 +03:00
Alibek Omarov
2e3788f23d engine: dedicated: add CL_HudMessage to dedicated stubs 2023-01-31 07:14:26 +03:00
Alibek Omarov
eaf9a9283a Revert "engine: network: do not read from uninitialized sockaddr storage"
This reverts commit 4f78ec01cf.
2023-01-31 04:33:27 +03:00
Alibek Omarov
ae66291272 scripts: compiler_optimizations: added MSan target 2023-01-31 04:28:08 +03:00
Alibek Omarov
4f78ec01cf engine: network: do not read from uninitialized sockaddr storage 2023-01-31 04:14:18 +03:00
Alibek Omarov
be084d5603 engine: crashhandler: fully initialize struct sigaction 2023-01-31 00:50:48 +03:00
Alibek Omarov
aac0be1ab3 engine: imagelib: img_bmp: fully initialize local palette array 2023-01-31 00:50:04 +03:00
Alibek Omarov
6282acc825 engine: client: simplify drawing loading or paused bar, fix position with hud_scale active 2023-01-30 23:17:53 +03:00
Alibek Omarov
39fd30a472 engine: client: fix HUD font loading 2023-01-27 19:07:26 +03:00
Alibek Omarov
279e391949 engine: sound: allow mouth move for CHAN_STREAM 2023-01-27 06:19:31 +03:00
Alibek Omarov
6df25392b8 engine: server: redirect special sounds, detected by leading asterisk, into CHAN_STREAM
In GoldSrc this magic symbol means that we should not override channel this
sound is playing on. Originally handled on client but for both static and dynamic sounds
so let's redirect channel on server side instead.
2023-01-27 06:19:31 +03:00
Alibek Omarov
327372e253 engine: client: call SND_ForceOpen/CloseMouth within SND_Open/CloseMouth to avoid copypasted code 2023-01-27 06:19:31 +03:00
Andrey Akhmichin
801dbaa387 engine: common: soundlib: libmpg: backport fix for CVE-2017-11126.
Original patch: https://www.mpg123.de/cgi-bin/scm/mpg123/trunk/src/libmpg123/layer3.c?view=patch&r1=4275&r2=4274
Same as: f246a0cdfd
2023-01-25 15:57:52 +03:00
Andrey Akhmichin
ffd5c2d3d0 engine: common: soundlib: libmpg: backport fix for CVE-2017-12839.
Original patch: https://www.mpg123.de/cgi-bin/scm/mpg123/trunk/src/libmpg123/getbits.h?view=patch&r1=2024&r2=4323
Same as: 8a5e21a2a2
2023-01-25 15:57:52 +03:00
Alibek Omarov
84c14b32ec engine: client: fix filtering errors by adjusting texcoords by half of a pixel
Remove useless wrapper functions and conversions
Don't scale texcoords and position if hud_scale is not active
2023-01-25 04:17:48 +03:00
Alibek Omarov
c481e52558 engine: client: consolidate variable and quake fixed width font loading functions 2023-01-25 02:38:18 +03:00
Alibek Omarov
b946ed4625 engine: platform: sdl: don't flood about closest display mode in case of no changes 2023-01-18 20:05:00 +03:00
Alibek Omarov
ef1572b15b engine: crashhandler: fix build on FreeBSD (and probably on NetBSD and OpenBSD) 2023-01-18 19:45:21 +03:00
Alibek Omarov
aaeb18f433 engine: inline version of MSG_BigShort 2023-01-18 19:29:27 +03:00
Alibek Omarov
dd1d86c289 engine: platform: sdl: check usable display rect before creating window 2023-01-18 19:28:16 +03:00
Alibek Omarov
16b162f7bb engine: vid: position window in center by default 2023-01-18 19:27:40 +03:00
Alibek Omarov
500ca54550 Revert "engine: get rid of MSG_BigShort, use htons instead, since network headers are always included"
This reverts commit a6475f530b.
2023-01-18 19:21:51 +03:00
Alibek Omarov
5313dc9475 engine: client: fix uninitialized fadeTotalEnd in screenfade parsing code 2023-01-16 09:21:30 +03:00
Alibek Omarov
9c0c1a802c filesystem: fix strict order of loading archives 2023-01-15 13:12:39 +03:00
Alibek Omarov
fbedbdca7d engine: client: fix fullscreen reapplied on window resize 2023-01-14 18:52:38 +03:00
Alibek Omarov
6232e288e1 engine: client: fool proof R_SaveVideoMode 2023-01-14 11:45:42 +03:00
Alibek Omarov
a6475f530b engine: get rid of MSG_BigShort, use htons instead, since network headers are always included 2023-01-14 10:58:04 +03:00
Alibek Omarov
de84df99f3 engine: fix functions returning void returning void value 2023-01-14 10:58:03 +03:00
Alibek Omarov
a5d5c1f60b wscript: cast-align is less effective than ubsan 2023-01-14 10:58:03 +03:00
Alibek Omarov
6ac3156a82 engine: fix discarded const pointer qualifier in PM_HullPointContents 2023-01-14 10:57:22 +03:00
Alibek Omarov
2705e77a4e ci: don't spew config.log when it's not needed, less verbosity 2023-01-14 10:06:32 +03:00
Alibek Omarov
a09aa31b7a github: comment out CI builds for MAGX and Android 2023-01-14 09:52:44 +03:00
Xav101
9466461ce0 engine: preliminary support for SGI IRIX (#1211)
* Added definitions for IRIX

* Patchset to get dedicated server to compile on IRIX.

* Cleaned up debug statements in wscript

* Potential bug in IRIX implementation of isnan? For now just use the portable macro.

* Include the platform port files in the build

* Temporary execution script for setting appropriate library search paths to the right locations in the build directory. This should probably get replaced with a more permanent script at some point which lives in the same directory as the normal xash binary, or be replaced by a solution that sets the rpath during config or modifies rpath during install.

* Clean up formatting and remove unneeded debugging statements

* Added GPL copyright notice and description

* Moved to irix platform folder and edited script

* Re-introduced _inline macro

* Replace spaces with tabs

Co-authored-by: Xav101 <xaviernye@msn.com>
2023-01-14 09:35:30 +03:00
Alibek Omarov
74ce7e9b10 ref: don't apply rendercolor to studio models where it's not needed 2023-01-13 15:25:58 +03:00
Alibek Omarov
10481a4ecc github: upgrade SDL2 2023-01-13 11:50:01 +03:00
Alibek Omarov
acd86ce490 engine: sound: select which to buffer raw channels will be painted to, choose stream buffer for voice 2023-01-13 08:50:33 +03:00
Alibek Omarov
1119a9ac22 engine: network: reenable DNS resolving in separate thread for Windows 2023-01-13 08:09:16 +03:00
Alibek Omarov
171c0c8d3b engine: common: zone: use stdint types 2023-01-12 04:04:53 +03:00
Alibek Omarov
9b5e0fef01 engine: common: zone: make Mem_Alloc return aligned addresses on ILP32, thanks Xav101 on Discord for heads up 2023-01-12 04:02:04 +03:00
Alibek Omarov
2f5e3b0aea mainui: update 2023-01-11 13:41:54 +03:00
Alibek Omarov
ca3b0e6246 Documentation: document the _i?86 quirk in library naming scheme 2023-01-10 04:59:28 +03:00
Alibek Omarov
eb0459a045 engine: strip Intel suffixes from server library name, but only on special platforms
Remove same code from filesystem, it's not what filesystem should do
2023-01-10 04:51:34 +03:00
Alibek Omarov
5d98e13fb8 public: add Q_ArcitectureStringByID function to get library naming compliant CPU and ABI string 2023-01-09 22:53:05 +03:00
Alibek Omarov
113904ea91 public: fix build 2023-01-09 22:47:54 +03:00
Alibek Omarov
1dc3cc2d57 public: add Q_PlatformStringByID function that returns library naming compliant string by platform identifier from buildenums 2023-01-09 08:06:58 +03:00
Alibek Omarov
15a5975abf public: build.h refactoring, removed XASH_MSVC, XASH_MINGW, as this header never intended to detect the compiler 2023-01-09 08:05:59 +03:00
Alibek Omarov
65debeb738 public: add header buildenums.h declaring all platforms, architectures and ABIs as integer constants. 2023-01-09 08:04:58 +03:00
Alibek Omarov
209a03a12a engine, public: prepare to removal of XASH_MSVC macro 2023-01-09 08:01:52 +03:00
Alibek Omarov
c28aeb2362 engine: make crashhandler implementation choice private to crashhandler code 2023-01-09 07:55:54 +03:00
Alibek Omarov
9152bbf106 engine: client: more accurate decompilation of CL_LerpPoint and ComputeInterpolationAmount 2023-01-07 11:08:32 +03:00
Alibek Omarov
40ba0238f8 engine: client: cosmetic changes in pmove code 2023-01-07 11:07:32 +03:00
Alibek Omarov
4a3efa511c engine: client: correctly decompiled version of CL_AdjustClock (with removed useless float-to-int operation) 2023-01-07 07:23:14 +03:00
Alibek Omarov
2479d28cd5 engine: remove useless pfnHullPointContents wrapper 2023-01-06 00:38:05 +03:00
Alibek Omarov
787d3bc5dd engine: share playermove ClearPhysEnts function 2023-01-06 00:28:24 +03:00
Alibek Omarov
0bec78a958 engine: client: make few function between pmove and client interface shared, remove unused CL_PointContents wrapper 2023-01-06 00:09:36 +03:00
Alibek Omarov
e305b81df0 engine: merge PM_TraceTexture into PM_TraceTexturePmove 2023-01-05 23:59:31 +03:00
Alibek Omarov
4cb109abe0 engine: make playermove funcs truly shared between client and server 2023-01-05 23:50:42 +03:00
Alibek Omarov
49a65edfc3 engine: imagelib: img_quant: fix a bug in quantizer (thanks, @SNMetamorph for fix) 2023-01-05 07:24:24 +03:00
Alibek Omarov
c6bfc82019 ref: soft: implement screenshots 2023-01-05 07:09:23 +03:00
Alibek Omarov
a4865fd2fc engine: client: fix ScreenFade FFADE_MODULATE rendering, more accurate alpha blending 2023-01-05 06:09:10 +03:00
Alibek Omarov
4bbd0cc404 ref: add new special rendermode that specifically used for modulate mode in engine's ScreenFade 2023-01-05 06:07:56 +03:00
Alibek Omarov
4684f174ee public: completely get rid of PATH_SEPARATOR macros 2023-01-05 06:06:07 +03:00
Alibek Omarov
34eb258cae filesystem: dir: remove PATH_SEPARATOR, fix return value when directory is caseinsensitive 2023-01-04 22:34:45 +03:00
Alibek Omarov
b4c0ccbede filesystem: fix _wstat usage under Windows, remove PATH_SEPARATOR usage, fix listdirectory 2023-01-04 22:33:59 +03:00
Alibek Omarov
51b5d7a41d engine: host: ensure we always have right slashes under Windows 2023-01-04 19:39:52 +03:00
Alibek Omarov
15846a8ea8 filesystem: use POSIX funcs for Windows too, where possible, apply wide char conversion for Sys functions 2023-01-04 18:10:33 +03:00
Alibek Omarov
e694081626 filesystem: dir: guarantee file existense in FS_FixFileCase for caseinsensitive directories 2023-01-04 18:09:00 +03:00
Alibek Omarov
cb9605430d filesystem: bump FS_API_VERSION (removed unused argument from SysFileExists) 2023-01-04 18:07:18 +03:00
Alibek Omarov
80507b2eca engine: mod_bmodel: fix const qualifier discard warning 2023-01-04 17:55:59 +03:00
Alibek Omarov
ed47346ef1 engine: crashhandler: fix _GNU_SOURCE redefined warning 2023-01-04 17:54:45 +03:00
Alibek Omarov
75ccd2283b public: fix Q_memmem counting haystack size incorrectly 2023-01-04 17:17:18 +03:00
Alibek Omarov
409edf5a70 filesystem: zip: use stdint types, use enum for errors 2023-01-04 17:15:40 +03:00
Alibek Omarov
d047dfc319 engine: add few lines in mod_bmodel back, got removed in previous commits accidentally 2023-01-03 18:26:18 +03:00
Alibek Omarov
13ed2742b2 engine: check for bsp30ext before trying to use extended clipnodes, fix 32-bit clipnodes check 2023-01-03 07:50:50 +03:00
Alibek Omarov
03a3fb83b6 filesystem: write extended fields to gameinfo.txt, as this function is used to write game info when using rodir 2023-01-03 07:34:05 +03:00
Alibek Omarov
df1c9a5029 engine: simplify blue shift swapped lump check, change TestBmodelLumps to avoid reading past mod buffer 2023-01-03 07:01:39 +03:00
Alibek Omarov
07e622f224 public: add generic implementation for Q_memmem 2023-01-03 06:58:58 +03:00
Alibek Omarov
aa3a0fa392 engine: server: increase infostring size in SV_Info allowing longer hostnames but try to cut off if it's even longer than that 2023-01-03 04:01:53 +03:00
Alibek Omarov
c1287b3950 engine: client: speed up reconnect for legacy servers 2023-01-03 03:19:46 +03:00
Alibek Omarov
e5763e2e9a filesystem: dir: check dir casesensitivity after dir entries list was properly initialized 2023-01-03 01:15:28 +03:00
Alibek Omarov
42a3c7b059 filesystem: dir: fix dir entry cache init in case of directory was empty previously 2023-01-03 00:24:57 +03:00
Alibek Omarov
e621c98602 engine: network: do not crash if one of v4 or v6 socket opening failed but crash if both. Fix hostport/clientport cvars usage 2022-12-30 02:06:15 +03:00
Alibek Omarov
eb7eb4acbc engine: client: cl_scrn: minor refactoring 2022-12-30 01:58:26 +03:00
Alibek Omarov
e5b32fe8ac engine: client: force nearest filter for HUD textures and sprites to avoid artifacts with hud_scale 2022-12-30 01:57:10 +03:00
Alibek Omarov
52061621ac engine: client: do not let client.dll overwrite usercmd that's was read from demo 2022-12-27 23:10:11 +03:00
Alibek Omarov
339711c3c7 filesystem: dir: check casefold directory flag 2022-12-27 02:31:46 +03:00
Alibek Omarov
256fe7ede9 scripts: make sure to test filesystem on CI 2022-12-27 02:31:46 +03:00
Alibek Omarov
2febe632c5 filesystem: add caseinsensitive emulation test 2022-12-27 02:31:46 +03:00
Alibek Omarov
c454e37064 filesystem: allow to init with NULL overrides 2022-12-27 02:31:46 +03:00
Alibek Omarov
fe1aba3561 filesystem: apply caseinsensitivity to file creation
Replace fs_writedir with fs_writepath, exposing current writeable searchpath.
Fix caseinsensitive FS_Search
Remove unused argument from listdirectory()
Minor optimizations and refactoring
2022-12-27 02:31:46 +03:00
Alibek Omarov
41aa867a21 engine: common: don't try to delete now non-existing config file after backing up 2022-12-27 02:31:46 +03:00
Alibek Omarov
b36ebc294f filesystem: dir: exit from loop immediately if directory is caseinsensitive 2022-12-27 02:31:46 +03:00
Alibek Omarov
3d71e5d111 filesystem: dir: fix merging existing cache with new directory entries 2022-12-27 02:31:46 +03:00
Alibek Omarov
ac59f25375 DO NOT MERGE filesystem: add naive FixFileCase 2022-12-27 02:31:46 +03:00
Alibek Omarov
3393e2d95c filesystem: implement directory entries caching, to avoid excessive directory listing syscalls to emulate case-insensitive filesystems
* simplify game directory initialization code
2022-12-27 02:31:46 +03:00
Alibek Omarov
e1ea3387ee common: rename PATH_SPLITTER to PATH_SEPARATOR, change it's type to character 2022-12-27 02:31:46 +03:00
Alibek Omarov
071638794a public: redefine Q_strpbrk to C standard version, add Q_strchrnul 2022-12-27 02:31:46 +03:00
Alibek Omarov
953dd3d1a7 wscript: tidy up checks, add check for GNU strchrnul 2022-12-27 02:31:46 +03:00
Andrey Akhmichin
12bb0ca44b engine: server: Fix broken description for saves. 2022-12-25 04:26:00 +03:00
MoeMod Server #2
499cd48e83 filesystem: fix lseek for mpg123 2022-12-24 22:02:58 +03:00
Andrey Akhmichin
444e08f59a engine: common: simplify strings operations. 2022-12-21 03:26:41 +03:00
Andrey Akhmichin
9450c08eec engine: server: simplify strings operations. 2022-12-21 03:26:11 +03:00
Alibek Omarov
18e68f1ab3 filesystem: fix missing cast 2022-12-20 16:34:23 +03:00
Andrey Akhmichin
7555fefc18 ref: gl: simplify strings operations. 2022-12-20 16:11:21 +03:00
Andrey Akhmichin
f4fb8b4ac2 engine: client: simplify strings operation. 2022-12-20 16:07:34 +03:00
Andrey Akhmichin
0d5cd89144 engine: client: Fix access to uninitialized variable. 2022-12-20 16:06:41 +03:00
Andrey Akhmichin
e273e09fc9 engine: platform: win32: simplify strings operations. 2022-12-20 16:06:25 +03:00
Alibek Omarov
327017421c engine: common: zone: redefine poolhandle_t back to pointer for 32-bit systems 2022-12-19 18:38:49 +03:00
Alibek Omarov
6e179346c9 common: redefine poolhandle_t back to pointer for 32-bit systems 2022-12-19 18:36:31 +03:00
Alibek Omarov
ee218f36e0 filesystem: pak: no need to free files ptr anymore 2022-12-17 00:25:20 +03:00
Alibek Omarov
f3400c983e engine: network: fix address comparator 2022-12-15 12:25:03 +03:00
Alibek Omarov
9397301a73 filesystem: remove excessive filename field from archive structs, use common in searchpath_t. Small optimizations for PAK 2022-12-15 04:06:38 +03:00
Alibek Omarov
f1ec612819 filesystem: hungry 2022-12-15 01:06:20 +03:00
Alibek Omarov
08f834cd82 filesystem: make all archive searchpath functions private 2022-12-15 00:59:52 +03:00
Alibek Omarov
48c17d08d9 filesystem: dir: move searchpath initialization to dir.c, make all DIR functions static 2022-12-15 00:52:09 +03:00
Alibek Omarov
f20fddee1c common: bspfile: add separate definitions for clipnodes limit for HLBSP and QBSP2 2022-12-15 00:42:40 +03:00
Alibek Omarov
754d55beef engine: common: fix for HLBSP extended clipnodes hack when BSP2 support is enabled 2022-12-13 11:34:42 +03:00
Alibek Omarov
cd813bbfbe engine: server: do not apply sound precache check for sentences, as they may start with 0 index 2022-12-13 11:12:08 +03:00
Alibek Omarov
07afbd64d4 engine: common: host: force set HOST_FRAME status for dedicated as it finished initializing 2022-12-13 10:54:06 +03:00
Alibek Omarov
af7d6f6fa8 engine: common: no point to allow if and else commands in unprivileged mode since scripting is available only for privileged 2022-12-12 08:18:00 +03:00
Alibek Omarov
cb0f513bf0 engine: common: allow cvar substituion in privileged mode only to prevent leaking sensitive data 2022-12-12 08:14:01 +03:00
Alibek Omarov
a3ef6c955c engine: don't double register rcon_password cvar 2022-12-12 08:13:24 +03:00
Alibek Omarov
60e7a7aa23 engine: server: set correct flags for rcon_ cvars on server 2022-12-12 08:05:55 +03:00
Alibek Omarov
e1431e1040 engine: server: add rcon_enable cvar to control whether server should accept remote commands 2022-12-12 08:02:56 +03:00
Alibek Omarov
b794f2fda0 mainui: update 2022-12-12 07:56:03 +03:00
Alibek Omarov
934d9ba69a filesystem: fix FS_GetDiskPath 2022-12-12 06:54:42 +03:00
Alibek Omarov
9e54ddfd55 engine: client: treat dem_unknown as no-op, until we find real cause of empty holes in demoheader 2022-12-12 06:31:54 +03:00
Alibek Omarov
a86a24d33d mainui: update 2022-12-12 06:30:47 +03:00
Alibek Omarov
fe9ed0ac9b engine: client: gameui: add new NET_CompareAdrSort function to menu API 2022-12-12 06:30:47 +03:00
Alibek Omarov
18c94b6ec4 engine: common: add network address comparator function 2022-12-12 06:30:47 +03:00
SNMetamorph
8fa0290e25 Documentation: extensions: added page about expanded common structures 2022-12-11 22:59:17 +03:00
SNMetamorph
080cd146dd common: com_model: changed common structs reserved fields type to intptr_t 2022-12-11 22:59:17 +03:00
SNMetamorph
b1d910a3a5 engine: client: fixed connection hang when all resources downloaded (fix #829) 2022-12-09 19:20:53 +03:00
SNMetamorph
840283d6e5 engine: netchan: fixed fragbufs very high memory usage 2022-12-09 19:20:53 +03:00
SNMetamorph
d72481e5ac engine: netchan: fixed downloading files output directory 2022-12-09 19:20:53 +03:00
SNMetamorph
dbe9309475 engine: netchan: fixed wrong compressed file size calculation 2022-12-09 19:20:53 +03:00
Alibek Omarov
9fa4de6ee8 mainui: update 2022-12-08 06:55:32 +03:00
Alibek Omarov
fd3c5e8384 ref: gl: VBO is disabled unless somebody picks it up and fixes memory corruption and other bugs 2022-12-08 06:50:12 +03:00
Alibek Omarov
d50ed1c087 engine: common: host: don't prepend # to command arguments when changing game to dedicated, it wasn't used and implement anymore 2022-12-08 05:44:17 +03:00
Alibek Omarov
e48133bf4b engine: server: fix sv_log output for enttools usage 2022-12-08 05:40:36 +03:00
Alibek Omarov
ea3bfd969c engine: imagelib: img_wad: dirty hack to fix black holes in console background images 2022-12-08 05:40:11 +03:00
Alibek Omarov
7469d6a248 engine: server: implement server-to-master challenge extension, to secure server from IP spoofing 2022-12-07 23:39:57 +03:00
Alibek Omarov
859f36afce engine: server: remove Master_Add call in ActivateServer, server will announce itself through heartbeat 2022-12-07 23:14:34 +03:00
Alibek Omarov
436a788ac8 engine: client: disable FPS counter by default 2022-12-07 21:54:23 +03:00
Velaron
5098e24806 engine: client: touch: fix empty list when opening touch buttons menu for the first time 2022-12-07 15:35:51 +03:00
Alibek Omarov
1d8acc16f1 engine: server: give master server a small time window to reply (by default 4000 ms, should be enough even when master server is overloaded) 2022-12-06 20:28:44 +03:00
Alibek Omarov
802c7a86a9 engine: platform: sdl: add pause and scrolllock handlers 2022-12-06 11:50:38 +03:00
Alibek Omarov
406eb828da ref: gl: disable underwater distortion by default, enable for Quake compatible mode only 2022-12-05 11:59:29 +03:00
Alibek Omarov
0e9106685b engine: imagelib: img_png: fix Mem_Free on null ptr 2022-12-05 06:13:04 +03:00
Alibek Omarov
9b001987e9 engine: imagelib: fix crash when chunk length is more than file size 2022-12-05 05:39:41 +03:00
Alibek Omarov
5c2c02c317 engine: common: custom: use IL_LOAD_PLAYER_DECAL flag when loading custom player decals 2022-12-05 04:56:07 +03:00
Alibek Omarov
21c898d796 engine: imagelib: validate player decal image size (max 512x512) 2022-12-05 04:55:24 +03:00
Alibek Omarov
e48b708fa6 engine: imagelib: img_png: validate image size through common engine function 2022-12-05 04:54:20 +03:00
Alibek Omarov
ccf7619ae5 engine: imagelib: refactor image loading function 2022-12-05 03:22:07 +03:00
Alibek Omarov
eabbd0061f mainui: update 2022-12-05 03:22:07 +03:00
Alibek Omarov
7d0d6b8e0d engine: common: host: implement adaptive sleeptime, log time to first time for debug purposes 2022-12-05 03:22:07 +03:00
Alibek Omarov
eb36fe0155 filesystem: fill searchpath DIR functions only if file was found in direct path 2022-12-05 03:22:07 +03:00
Alibek Omarov
9381a40506 filesystem: check only DLLs for encryption 2022-12-05 03:22:07 +03:00
SNMetamorph
a19270a0dc engine: client: max fragment size test retries increased to 3 2022-12-04 23:29:26 +03:00
SNMetamorph
c34ce2d9e1 engine: client: fixed max fragment size wrong calculation 2022-12-04 23:29:26 +03:00
SNMetamorph
58465c3727 engine: common: fixed dedicated server bug
The problem is server wasn't executing server.cfg if map specified in startup parameters
2022-12-04 23:29:26 +03:00
Andrey Akhmichin
177ed2c603 engine: common: simplify strings operations. 2022-12-04 22:37:45 +03:00
Andrey Akhmichin
7bb994f7bc engine: common: imagelib: img_png.c: fix wrong palette decoding. 2022-12-04 22:09:24 +03:00
Andrey Akhmichin
0c4f35e2d0 filesystem: simplify strings operations. 2022-12-04 22:08:06 +03:00
Andrey Akhmichin
3287501f97 engine: client: simplify strings operations. 2022-12-04 22:04:07 +03:00
Andrey Akhmichin
2454594a18 engine: server: simplify strings operations. 2022-12-04 22:03:48 +03:00
Alibek Omarov
4daab23e2d mainui: update 2022-12-04 05:31:02 +03:00
Alibek Omarov
51161004eb engine: common: simplify string operations 2022-12-04 05:26:22 +03:00
Alibek Omarov
6477f1656e filesystem: simplify string operation 2022-12-04 05:26:22 +03:00
Alibek Omarov
270e2a76a8 engine: soundlib: simplify string operation 2022-12-04 05:26:22 +03:00
Alibek Omarov
c61442e960 engine: imagelib: simplify string operation 2022-12-04 05:26:22 +03:00
Alibek Omarov
d0928af355 mainui: update to png-decals branch 2022-12-04 05:26:22 +03:00
Alibek Omarov
674093517e 3rdparty: update various submodules 2022-12-02 21:29:51 +03:00
Alibek Omarov
ebf3877cda engine: common: throw an error message into log in normal mode too! 2022-12-02 21:22:22 +03:00
Alibek Omarov
e97310c441 engine: common: net_ws: fix uninitialized family in IPSocket 2022-12-02 21:21:53 +03:00
Alibek Omarov
cbe3e608b6 engine: client: add cl_logoext cvar that's used by mainui to tell the engine which logo must be packed 2022-12-01 18:25:21 +03:00
Alibek Omarov
f30f23ba51 engine: common: validate and load PNG images in customization 2022-12-01 18:25:11 +03:00
Alibek Omarov
1ba117a8e9 engine: client: netgraph: fix few global-buffer-overflow errors 2022-12-01 18:23:52 +03:00
Alibek Omarov
d9a245dcb5 engine: reset cheat cvars on remote games 2022-12-01 02:44:01 +03:00
Alibek Omarov
9cbf5ab6a6 engine: client: streamline constructing master server scan request through common function 2022-12-01 01:51:07 +03:00
Alibek Omarov
c9e4e62474 engine: client: allow IPv6 in NetAPI 2022-12-01 00:35:05 +03:00
Alibek Omarov
aa6a1db0a9 engine: remove duplicate svc_strings definition 2022-12-01 00:34:33 +03:00
Alibek Omarov
e9d66be10a mainui: update 2022-11-29 13:30:06 +03:00
Alibek Omarov
8b6f12418e engine: common: make few network cvars privileged 2022-11-29 13:29:47 +03:00
Alibek Omarov
7013d447ca engine: client: get rid of s_registration_sequence, it was incorrect way to look for unused sounds. We're trying to rely on cl.servercount here 2022-11-28 07:54:24 +03:00
Alibek Omarov
93b2f535e2 engine: client: tune max commands/max backup commands values for legacy protocol 2022-11-27 18:26:53 +03:00
Alibek Omarov
591d572870 mainui: update 2022-11-27 06:02:42 +03:00
SNMetamorph
3ab749cc2e engine: client: cl_tent: fixed incorrect players spray textures update 2022-11-27 04:50:30 +03:00
SNMetamorph
084fac3606 engine: common: hpak: fixed rest of bugs in HPAK_AddLump 2022-11-27 04:50:30 +03:00
Alibek Omarov
f377461fdf engine: common: made a filter for a filter (lol), so it's possible to play selected games with cl_filterstuffcmd enabled 2022-11-27 04:45:03 +03:00
SNMetamorph
a2971ce939 filesystem: fixed uninitialized pointers in FS_FindFile when fs_ext_path enabled 2022-11-26 02:45:18 +03:00
SNMetamorph
65671d8788 engine: common: minor code fixes in hpak.c 2022-11-25 23:05:48 +03:00
Andrey Akhmichin
809d5f1aa8 engine: client: in_touch.c: add spray button. 2022-11-25 22:32:33 +03:00
SNMetamorph
49fc6143ab engine: common: imagelib: fixed loading 32 bits per pixel BMP files 2022-11-25 22:30:49 +03:00
SNMetamorph
8717843333 engine: common: imagelib: fixed BMP files estimate size calculation with NPOT textures 2022-11-25 22:30:49 +03:00
SNMetamorph
f6d8996968 engine: common: imagelib: added missed BMP compression type macros 2022-11-25 22:30:49 +03:00
Alibek Omarov
9389305072 engine: common: set cl_filterstuffcmd to 1 by default 2022-11-25 22:23:51 +03:00
Alibek Omarov
b6bd4bc6f8 engine: server: precisely set client connected time after they were spawned 2022-11-25 05:45:20 +03:00
Alibek Omarov
4c6fbafd20 mainui: update 2022-11-25 02:37:07 +03:00
Velaron
43c6175918 filesystem: dir.c: safer string operations 2022-11-24 03:19:21 +03:00
Velaron
fcd741e2b8 filesystem: fix FS_FixFileCase behavior 2022-11-24 03:19:15 +03:00
Velaron
89807250e5 filesystem: dir.c: optimize string operations 2022-11-24 03:19:10 +03:00
Velaron
24f7db19d8 filesystem: switch file operations to an interface 2022-11-24 03:19:05 +03:00
SNMetamorph
49d93c0e76 engine: common: custom: increased custom decal size limit to 128Kb, added wrong size warning 2022-11-22 17:59:41 +03:00
SNMetamorph
707c93c32c engine: common: hpak: all file operations made to use gamedir only 2022-11-22 17:59:41 +03:00
SNMetamorph
e204f05726 engine: client: fixed players spray textures not being updated 2022-11-22 17:59:41 +03:00
SNMetamorph
3bd8ad50d2 ref: gl: fixed crash when opening "Customize" menu 2022-11-21 22:52:27 +03:00
Andrey Akhmichin
3488d4e65f public: simplified strings operations. 2022-11-18 19:32:17 +03:00
Alibek Omarov
3da736a1eb engine: server: try to solve issue when server dll has no voice mgr 2022-11-17 21:06:15 +03:00
Alibek Omarov
e30c61c0e2 common: netadr: use static_assert macro 2022-11-17 19:44:47 +03:00
Alibek Omarov
64e97124c3 Merge master to ipv6 2022-11-17 19:34:46 +03:00
Alibek Omarov
46979419ae wscript: check Android's log library globally 2022-11-17 01:23:33 +03:00
Alibek Omarov
30d9b6d844 engine: platform: win32: fix compile 2022-11-17 01:20:01 +03:00
Alibek Omarov
88045ce3be ref: gl: link liblog for Android 2022-11-17 01:08:11 +03:00
Alibek Omarov
dd881d3da9 engine: server: remove duplicate function 2022-11-16 23:37:26 +03:00
Alibek Omarov
76d0608ee1 ref: fix beams end point 2022-11-16 22:54:07 +03:00
Alibek Omarov
a894ca60c6 engine: client: vgui: fix vgui viewport height being limited at 480 pixels 2022-11-16 22:05:31 +03:00
Alibek Omarov
023f6712f9 engine: client: always toggle mouse on when in console, menu or typing chat message 2022-11-16 21:14:48 +03:00
Alibek Omarov
42740149ac engine: client: fix mouse cursor being hidden in background map 2022-11-16 21:02:41 +03:00
Alibek Omarov
7b74015c4d engine: server: check if player can hear other before sending voicedata 2022-11-16 20:59:18 +03:00
Alibek Omarov
57c71efe53 Documentation: fix wrong envvar in windows xcompile instructions, better wording 2022-11-16 04:25:34 +03:00
Alibek Omarov
45de874598 wscript: always load msvc options 2022-11-16 04:20:02 +03:00
Alibek Omarov
aa702f0678 scripts: waifulib: xcompile: add msvc-wine support in cross-compile helper script 2022-11-16 04:19:46 +03:00
Alibek Omarov
927dccc71d Documentation: add simple instructions on how to cross-compile for Windows from normal operating systems 2022-11-16 04:19:07 +03:00
Alibek Omarov
c2a24fbbce engine: client: put internal vgui shutdown AFTER HUD_Shutdown, to simulate default, external behavior 2022-11-14 20:12:10 +03:00
SNMetamorph
ae94a6aeba engine: client: fixed client VGUI API shutdown 2022-11-14 20:09:20 +03:00
Alibek Omarov
e9da43666c engine: client: fix loading internal vgui (thx @SNMetamorph) 2022-11-14 20:08:01 +03:00
Alibek Omarov
d27dd68072 engine: client: vgui: rework loading VGUI and probing client for internal vgui support API 2022-11-12 16:35:18 +03:00
Alibek Omarov
b1ee27a3f3 filesystem: add new token internal_vgui_support to mark client dlls that have internal VGUI implementation(to support other UI systems) 2022-11-12 16:35:18 +03:00
SNMetamorph
32372654c2 engine: server: sv_client: fixed working ent_create command on XashXT/PrimeXT 2022-11-11 16:12:56 +03:00
Alibek Omarov
17d0b19f9e engine: use generic S_USAGE macro everywhere 2022-11-10 13:18:20 +03:00
Alibek Omarov
d13f7f06e4 engine: fix framerate being capped to 60FPS with vsync, remove vid_displayfrequency cvar. Never sleep with vsync or timedemo, for accuracy 2022-11-10 13:05:03 +03:00
Alibek Omarov
f469b56b93 engine: host: only sleep once between frames 2022-11-10 12:42:48 +03:00
Alibek Omarov
ef74f86ce2 Documentation: restore enttools docs from old engine wiki 2022-11-10 12:37:51 +03:00
Alibek Omarov
616cbdb1eb engine: client: change cl_cmdrate and cl_smoothtime default values to match GoldSrc 2022-11-10 12:11:16 +03:00
Alibek Omarov
0a49e69818 engine: introduce Sys_DebugBreak function to raise an exception for debugger 2022-11-10 12:10:48 +03:00
Alibek Omarov
adb8ec1da8 filesystem: try to normalize linux gamedll path for liblist.gam 2022-11-10 11:58:44 +03:00
SNMetamorph
5d73c6cb84 engine: server: backported enttools from old engine 2022-11-10 11:56:10 +03:00
SNMetamorph
afa1d429fe engine: client: backported enttool from old engine 2022-11-10 11:56:10 +03:00
SNMetamorph
d1309c3aeb engine: common: backported "set" command from old engine 2022-11-10 11:56:10 +03:00
SNMetamorph
b35cf6e30c engine: platform: update VGUI cursor state in Platform_SetCursorType 2022-11-08 06:39:09 +06:00
SNMetamorph
8cbe0e5b30 engine: client: vgui: added VGui_UpdateInternalCursorState function 2022-11-08 06:39:09 +06:00
Andrey Akhmichin
c1fe547925 public: update miniz to version 3.0.0 from upstream. 2022-11-06 12:35:04 +06:00
Andrey Akhmichin
1064b41ab2 readme: update. 2022-11-05 10:45:47 +06:00
Andrey Akhmichin
2a6c2e5db4 .github: workflows: update github actions. 2022-11-05 10:43:15 +06:00
Bien Pham
816337a7bb filesystem: set root directory as static
Counter-Strike uses COM_ExpandFileName to get
full path to filesystem_stdio. When reading liblist.gam,
the engine will clear the search path and the root search path
will be cleared. Set it as static so it will be excluded from clearing.
2022-11-02 18:07:25 +06:00
Andrey Akhmichin
d237114962 engine: common: imagelib: img_png.c: unroll loops. 2022-11-02 14:14:05 +06:00
Andrey Akhmichin
c1ca2c1a95 Documentation: opensource-mods.md: add "Oz Deathmatch". 2022-10-27 01:53:27 +06:00
SNMetamorph
44a43c2c09 engine: client: cl_parse: minor code fix in CL_ParseLegacyServerData 2022-10-27 00:52:16 +06:00
SNMetamorph
ee8098839e engine: common: pm_trace: fixed non portable code in PM_ConvertTrace 2022-10-27 00:52:16 +06:00
Alibek Omarov
305b2579eb engine: client: voice: fix crackling voice file input on low FPS 2022-10-19 01:08:39 +03:00
Alibek Omarov
1a09d297ee engine: minimize SetCursorType calls count 2022-10-13 14:49:48 +03:00
Alibek Omarov
d45e6e0ad1 engine: platform: sdl: SetCursorType shouldn't know about current game state 2022-10-13 14:07:48 +03:00
Alibek Omarov
2d2523df4a engine: client: touch: generalise touch emulation code
* fix doubleclicks and wheels in VGUI
2022-10-12 05:18:19 +03:00
Alibek Omarov
5a0fcfffb0 mainui: update 2022-10-10 13:09:01 +03:00
Alibek Omarov
f252161d90 readme: fix typo and wording 2022-10-04 15:14:54 +03:00
Alibek Omarov
e0216e2658 wscript: don't clean QtCreator files and reconfigure saved options
Cleanup imports
2022-10-04 03:02:49 +03:00
Alibek Omarov
0f2bb5720b wscript: respect --libdir argument with packaging enabled. Fix a typo in --disable-soft description 2022-10-02 22:28:53 +03:00
Alibek Omarov
0621e365ff mainui: update 2022-09-27 17:19:32 +03:00
Alibek Omarov
8ea455def7 mainui: update 2022-09-27 14:00:18 +03:00
Alibek Omarov
8cf822c426 mainui: update 2022-09-27 14:00:18 +03:00
Alibek Omarov
4a009c1c2c engine: client: touch: move copypasted code from export & writeconfig into separate function 2022-09-27 14:00:18 +03:00
Alibek Omarov
360dc4f7ed engine: try to make hashpaks more compatible between 32-bit and 64-bit platforms 2022-09-20 21:57:13 +03:00
Alibek Omarov
ffe43e1f22 scripts: waifulib: fix error reporting in zip.py 2022-09-20 21:56:25 +03:00
Alibek Omarov
a52d901f25 common: add STATIC_ASSERT macro
We're trying to guess if we have C11 static_assert defined in assert.h
otherwise use good ol' trick with negative array
2022-09-20 21:55:32 +03:00
Alibek Omarov
5bae2f06ad engine: platform: sdl: do not lock audio device, for some reason it sometimes causes problems although it shouldn't 2022-09-20 21:29:19 +03:00
Alibek Omarov
69b0954007 engine: change RenderAPI's RenderGetParm return type to intptr_t to insure compatibility with 64-bit 2022-09-20 18:06:19 +03:00
Alibek Omarov
0645402946 engine: fix crash when reading GoldSrc hashpaks 2022-09-19 06:03:01 +03:00
Владислав Сухов
c59b244d04 scripts: gha: fix path to vgui_support submodule 2022-09-17 15:55:40 +03:00
Alibek Omarov
5678d9a253 engine: server: support MAP_ANON synonym for MAP_ANONYMOUS, disable allocating string pool near server library for OSX 2022-09-12 08:42:50 +03:00
dettlaff
a520d245a6 wscript: fix typo in --enable-bundled-deps configure option 2022-09-12 07:18:24 +03:00
Alibek Omarov
b56f6fa330 scripts: waifulib: fix zipfile init for older Python 2022-09-11 02:50:52 +03:00
Alibek Omarov
f141869ce3 wscript: disable building extras.pk3 for Android 2022-09-11 02:22:26 +03:00
Alibek Omarov
807f3852bd scripts: gha: remove building extras.pak, as it's already being built 2022-09-11 02:20:36 +03:00
Alibek Omarov
084089b919 3rdparty: extras: build ZIP archive and install to engine default gamefolder 2022-09-11 02:13:23 +03:00
Alibek Omarov
f571a41cf3 wscript: allow to setup engine default gamedir during configure 2022-09-11 02:12:44 +03:00
Alibek Omarov
686a966ff7 wscript: now waf builds extras archive by itself, using Python standard library's zipfile 2022-09-11 01:39:29 +03:00
Alibek Omarov
c29eb458ea 3rdparty: add xash-extras submodule 2022-09-11 01:38:17 +03:00
Alibek Omarov
234c843f60 filesystem: integrate inotify for file changes 2022-09-10 22:55:07 +03:00
Alibek Omarov
7ed0499aa9 game_launch: wscript: fix Windows build 2022-09-10 22:52:52 +03:00
Alibek Omarov
401b145040 utils: mdldec: fix wscript to build 2022-09-10 22:52:52 +03:00
Alibek Omarov
3853ff5435 3rdparty: gl4es: add wscript to build 2022-09-10 22:52:52 +03:00
Alibek Omarov
744c6b2680 vgui_support: update submodule 2022-09-10 22:52:52 +03:00
Alibek Omarov
030a17fc58 mainui: update submodule 2022-09-10 22:52:52 +03:00
Alibek Omarov
b1e2e84a11 wscript: adapt main and ref_gl wscripts to new directory layout, add flag to build all renderers at once 2022-09-10 22:52:52 +03:00
Alibek Omarov
12a6088912 ref: gl: move GLES wrappers libraries to 3rdparty folder 2022-09-10 22:52:52 +03:00
Alibek Omarov
fe9f3f78a0 ref: soft: minimize dependency on internal engine headers 2022-09-10 22:52:52 +03:00
Alibek Omarov
327eb330ed ref: gl: minimize dependency on internal engine headers 2022-09-10 22:52:52 +03:00
Alibek Omarov
470121512a utils: mdldec: convert to include targets usage 2022-09-10 22:52:52 +03:00
Alibek Omarov
dedc144b8b ref: soft: convert to include targets usage 2022-09-10 22:52:52 +03:00
Alibek Omarov
6d37398fad ref: gl: convert to include targets usage 2022-09-10 22:52:52 +03:00
Alibek Omarov
3c8fe508f0 game_launch: convert to include targets usage 2022-09-10 22:52:52 +03:00
Alibek Omarov
8ffb3aac8a engine: wscript: add dummy engine_includes target that only exposes few internal Xash headers for renderers and utils use 2022-09-10 22:52:52 +03:00
Alibek Omarov
0ed9391969 filesystem: wscript: add dummy filesystem_includes target that only exposes public filesystem_stdio include paths 2022-09-10 22:52:52 +03:00
Alibek Omarov
e54289f811 public: wscript: add dummy sdk_includes target that only exposes standard HLSDK include paths 2022-09-10 22:52:52 +03:00
Alibek Omarov
17b091e5a9 wscript: adapt to new folder structure 2022-09-10 22:52:52 +03:00
Alibek Omarov
61c142e2db ref: move renderers into ref subdirectory 2022-09-10 22:52:52 +03:00
Alibek Omarov
7e664679a0 3rdparty: move mainui and vgui_support submodules into 3rdparty folder 2022-09-10 22:52:52 +03:00
Andrey Akhmichin
fd152e82e8 engine: common: imagelib: img_png.c: add support for indexed and grayscale PNG images. 2022-09-08 12:11:02 +03:00
Alibek Omarov
0c50e43663 engine: client: enable sound for TE_TAREXPLOSION, use same sound parameters as GoldSrc 2022-09-08 04:16:29 +03:00
Alibek Omarov
7a2ac4a9c0 engine: client: use generic particles code for blob particles (from tempentity code) only if Quake compatibility was enabled 2022-09-08 04:16:29 +03:00
Andrey Akhmichin
e6bb9d980d engine: client: in_touch.c: make touch buttons extention-independent. 2022-09-05 11:25:52 +03:00
Alibek Omarov
45cc7e5bcc 3rdparty: opus: update submodule 2022-08-31 19:51:52 +03:00
Alibek Omarov
4be4870982 engine: client: remove voice_codecinfo command, as Opus Custom don't give any encoder info, possibly an Opus bug 2022-08-31 19:50:31 +03:00
Alibek Omarov
19c2061831 wscript: define CUSTOM_MODES and try to link with export that only exists when CUSTOM_MODES was defined in build-time 2022-08-31 19:48:42 +03:00
Alibek Omarov
3a8c58d192 engine: platform: sdl: fix parentheses around IsAudioError macro 2022-08-31 07:13:02 +03:00
Alibek Omarov
24763f9b07 engine: server: request client to use Opus Custom codec 2022-08-31 06:54:58 +03:00
Alibek Omarov
0d7a2e7bad engine: platform: change capture API to allow locking/unlocking buffer to prevent race condition, use single function for pause 2022-08-31 06:50:06 +03:00
Alibek Omarov
82ab06efdd engine: client: voice: new version, move to Opus Custom codec
* Despite Opus Custom have strict requirements, it's more barebones, allowing us to use maximum
frame size and custom sample rate, without resampling
* Encode each frame size to network buffer, allowing smooth voice chat even in 10 FPS
* Fix possible buffer overruns, underruns and races with platform side
* Revise all usages of offset variables, samples vs bytes
2022-08-31 06:44:45 +03:00
Alibek Omarov
4110ee0928 wscript: require Opus Custom for build
Apparently, not all Linux distributions enable it. Anyway, we can build codec ourselves
2022-08-31 05:44:23 +03:00
Alibek Omarov
4b05cf4399 engine: client: better fix for notify debug messages, rely on host.allow_console variable to don't allow uninitialized console usage 2022-08-31 02:46:33 +03:00
Alibek Omarov
f29a9f5f58 ref_gl: use skybox names generated by CheckSkybox function, don't checking same file twice
Also fixes priority for skyboxes
2022-08-31 02:42:19 +03:00
Alibek Omarov
28001ea150 engine: client: enable notify messages in non-developer mode 2022-08-28 00:48:12 +03:00
Alibek Omarov
f633b3dbf6 engine: increase MAX_INIT_MSG to 192 kilobytes limit
* also avoid magic number in sv_client.c
2022-08-27 22:13:21 +03:00
Alibek Omarov
bebfa611fc mainui: update 2022-08-25 21:47:17 +03:00
Alibek Omarov
3e9f2df2bf engine: client: fix incorrect mark for ConsolePrint notifications 2022-08-25 21:21:22 +03:00
Alibek Omarov
fce8afabfb filesystem: allow acquiring C interface through CreateInterface export 2022-08-25 20:33:16 +03:00
Alibek Omarov
9d49985100 scripts: gha: build tarball for dedicated server 2022-08-25 19:40:27 +03:00
Alibek Omarov
a7d4cafe10 wscript: finally disable building opus for dedicated 2022-08-25 19:33:16 +03:00
Alibek Omarov
ca2a6635b6 engine: common: fix cmdlist and cvarlist to match the beginning of command or cvar 2022-08-25 19:22:06 +03:00
Alibek Omarov
7f1bb9b4a6 public: introduce Q_strnicmpext function
The goal is to provide both string compare with fixed length and simple pattern match
2022-08-25 19:21:47 +03:00
Alibek Omarov
7341a6b020 engine: client: add old GoldSrc feature where ConsolePrint could print to notification zone, similar to Con_NPrintf( 0, ... ) 2022-08-25 18:22:43 +03:00
Alibek Omarov
ac05acf6dc engine: network: I'm fucking blind 2022-08-23 20:04:59 +03:00
Alibek Omarov
3e1db432df engine: network: fix IPv4 private address checks according to RFC1918
Thanks to @Mr0maks for the fix
2022-08-23 19:15:50 +03:00
Alibek Omarov
3c682507e7 engine: client: voice: notify client.dll about localplayer twice, through special loopback index and normal index 2022-08-22 11:44:13 +03:00
SNMetamorph
e9ae6d08b5 engine: client: enable interpolation of local player angles 2022-08-22 10:24:15 +03:00
Alibek Omarov
f435a81c97 engine: soundlib: rewrite sfx resampler, fix possible crash if sfx is too long
- make same rate and same width resamples noop, as everything signed now
- minimize comparisons in loop body
2022-08-22 10:14:01 +03:00
Alibek Omarov
cb34c23844 common: increase MAX_MAP_MODELS to 1024, to match PrimeXT compilers 2022-08-21 17:27:48 +03:00
SNMetamorph
9f9141823a engine: added audio backend print to s_info command 2022-08-20 15:36:02 +03:00
Владислав Сухов
d3437c70bd engine: soundlib: fix wrong sample rate unit 2022-08-20 15:35:14 +03:00
Alibek Omarov
8630ef2c67 engine: client: voice: allow using inputfromfile when microphone isn't connected 2022-08-20 06:13:33 +03:00
Alibek Omarov
0b50678912 engine: client: voice: refactor, fix issues when missing mic disables voice chat, fix few possible crashes and memory leaks 2022-08-20 03:56:54 +03:00
Alibek Omarov
22ff45f5d0 engine: platform: add audio capture shutdown functions 2022-08-20 03:17:51 +03:00
Alibek Omarov
905bbf1515 engine: server: read full voicedata message even if voice is disabled server wide 2022-08-19 22:22:40 +03:00
Alibek Omarov
88c1b1400d gitignore: add enc_temp_folder by the request of @SNMetamorph 2022-08-19 22:18:22 +03:00
SNMetamorph
8e48a98d48 engine: client: voice: codec quality levels changed 2022-08-19 20:47:01 +03:00
SNMetamorph
76dbefb9ec engine: client: voice: fixed initialization checks 2022-08-19 20:47:01 +03:00
Alibek Omarov
327dcc0293 engine: client: voice: simplify code, simplify including voice.h, do not depend on opus headers globally
Autofix few code style mistakes
2022-08-19 05:52:53 +03:00
Alibek Omarov
e6c55107c7 wscript: fix game_launch not being included 2022-08-19 05:38:47 +03:00
Alibek Omarov
c5dbbea9ef engine: server: drop bots fake ping to zero 2022-08-19 04:33:41 +03:00
SNMetamorph
74707551ae engine: client: voice: fixed hanging voice status 2022-08-19 04:14:25 +03:00
SNMetamorph
2f5f5ef0a6 engine: client: voice: fixed sound playback from file 2022-08-19 04:14:25 +03:00
SNMetamorph
f7dc9d8e72 engine: client: voice: frame size increased to 40 msec 2022-08-19 04:14:25 +03:00
Alibek Omarov
238162bb79 wscript: move system opus detection to main wscript, so we can avoid including subproject 2022-08-19 04:03:53 +03:00
Alibek Omarov
1fda8753bd wscript: rework subproject filtering, use lambdas everywhere. Deprecate --ignore-projects flag, use Waf capability to select targets instead 2022-08-19 03:10:34 +03:00
SNMetamorph
a688bed79f engine: client: cl_parse: moved buffer to stack in CL_ParseVoiceData 2022-08-18 04:46:11 +03:00
SNMetamorph
b0ff51d5a0 engine: client: voice: changed bitrate units to kbps in voice_codecinfo 2022-08-18 04:46:11 +03:00
SNMetamorph
68f633e9cd wscript: fixed opus include path 2022-08-18 04:46:11 +03:00
SNMetamorph
a520af42e8 wscript: opus subproject set as mandatory 2022-08-18 04:46:11 +03:00
SNMetamorph
0a6885e02d engine: client: voice chat cvars set as privileged 2022-08-18 04:46:11 +03:00
SNMetamorph
aa5a509316 engine: client: voice: added GPL notice 2022-08-18 04:46:11 +03:00
SNMetamorph
97879430e9 engine: small code fixes related to voice chat 2022-08-18 04:46:11 +03:00
SNMetamorph
ae97eae42f engine: client: voice: implemented automatic gain control 2022-08-18 04:46:11 +03:00
SNMetamorph
c5d7e3c783 engine: client: fixed players voice state changing 2022-08-18 04:46:11 +03:00
SNMetamorph
9bcd36cc24 engine: voice code minor refactoring 2022-08-18 04:46:11 +03:00
SNMetamorph
c6881a425f engine: client: added support for variable voice chat quality 2022-08-18 04:46:11 +03:00
SNMetamorph
8d0209b122 engine: server: added support for variable voice chat quality 2022-08-18 04:46:11 +03:00
SNMetamorph
279894cfd4 engine: client: added console command voice_codecinfo 2022-08-18 04:46:11 +03:00
SNMetamorph
169ee14724 engine: client: disabled voice on legacy protocol servers 2022-08-18 04:46:11 +03:00
SNMetamorph
8866d5cfd6 engine: wscript: added Opus headers to include directories 2022-08-18 04:46:11 +03:00
SNMetamorph
3b9a7910d0 opus: fixed path to submodule 2022-08-18 04:46:11 +03:00
SNMetamorph
b5885d4107 3rdparty: opus: wscript: removed Opus demo sources from build 2022-08-18 04:46:11 +03:00
SNMetamorph
a254a342b1 engine: voice: minor code fixes 2022-08-18 04:46:11 +03:00
SNMetamorph
0db95d76a8 engine: wscript: removed opus from opt.load() 2022-08-18 04:46:11 +03:00
Alibek Omarov
69a9211fc9 engine: include voice.h globally 2022-08-18 04:46:11 +03:00
Alibek Omarov
44cd03f464 wscript: refactor opus wscript files, now it builds only if system package wasn't found 2022-08-18 04:46:11 +03:00
Velaron
9242a0a510 engine: update voice 2022-08-18 04:46:11 +03:00
Velaron
2b9e050f57 engine: voice support 2022-08-18 04:46:11 +03:00
Alibek Omarov
9d4fe707bb engine: client: carefully check legacy server response, check info string before passing it to UI 2022-08-17 21:52:54 +03:00
Alibek Omarov
0d2552c3f6 engine: server: prevent DoS through master server query 2022-08-17 21:23:08 +03:00
Alibek Omarov
b3c9637422 engine: server: send server info to all master servers 2022-08-17 21:18:16 +03:00
Alibek Omarov
01a3321d63 engine: client: only accept server list from master servers (thanks @tyabus for idea) 2022-08-17 21:17:51 +03:00
Alibek Omarov
5a5e72c424 engine: print current bug-compatibility level, if enabled 2022-08-17 14:44:03 +03:00
Alibek Omarov
b8dc7494eb engine: client: move timescale pitch apply to channel mixing 2022-08-16 00:03:44 +03:00
Alibek Omarov
532cd779a7 Documentation: document bug compatibility mode 2022-08-15 06:00:00 +03:00
Alibek Omarov
d202a6c572 engine: server: emulate pfnPEntityOfEntIndex bug only with explicitly enabled GoldSrc bug compatibility 2022-08-15 06:00:00 +03:00
Alibek Omarov
6e864e4f8f engine: introduce bug compatibility levels
* for now we only have GoldSrc bug compatibility, can be used for
  games that require precise GoldSrc behaviour, like CSCZDS
* enabled with -bugcomp command line
* added text in --help
2022-08-15 06:00:00 +03:00
Alibek Omarov
6ef76fe665 engine: server: fix bots are counted as real players 2022-08-13 22:46:20 +03:00
Alibek Omarov
314672d82c engine: client: fix invalid playerinfo being accessed by renderer 2022-08-13 01:29:45 +03:00
Alibek Omarov
1d558b33d6 engine: client: don't let set unsupported con_charset 2022-08-13 00:58:45 +03:00
Alibek Omarov
911385d019 engine: client: fix memory leak on player disconnect 2022-08-13 00:47:04 +03:00
SNMetamorph
5b97c2135a engine: server: fixed "wrong version" spamming in NAT bypass mode (fix #953) 2022-08-10 04:11:17 +03:00
Alibek Omarov
365f24e1fe waf.bat: use unicode charset
Fixes compiler messages in Russian
2022-08-09 13:47:38 +03:00
Alibek Omarov
7157c3b441 engine: platform: sdl: don't enable high dpi code for Apple
It seems enables HighDPI awareness but doesn't create HighDPI OpenGL context
It needs some plist magic to be enabled back again
2022-08-08 23:53:20 +03:00
Andrey Akhmichin
28d7f2eaa2 Documentation: not-supported-mod-list-and-reasons-why.md: update. 2022-08-07 22:49:04 +03:00
Alibek Omarov
0d449370e0 filesystem: fixes for GCC 3 2022-08-06 20:33:01 +03:00
Alibek Omarov
10ad1c3b38 filesystem: use correct flushing function for file descriptors on Win32 2022-08-06 20:19:42 +03:00
Alibek Omarov
90c566dde3 wscript: enable GCC's -Wmisleading-indentation 2022-08-06 20:17:42 +03:00
Alibek Omarov
33cbead4a4 filesystem: wscript: fix library name on Android 2022-08-06 20:17:41 +03:00
Alibek Omarov
d6dfeaeba7 engine: fix searching filesystem_stdio on mobile platforms 2022-08-06 20:16:56 +03:00
Alibek Omarov
bc00c6c54b vgui_support: update 2022-08-06 20:16:56 +03:00
Alibek Omarov
3d5aa7c20c engine: remove mistakingly placed NORETURN attributes 2022-08-05 18:05:40 +03:00
SNMetamorph
a5ba43ea39 engine: fixed vulnerability in NAT bypass mechanism 2022-08-02 18:01:28 +03:00
Alibek Omarov
3eb4862794 common: remove unneeded typedef for wad file type 2022-08-01 15:06:54 +03:00
Alibek Omarov
c025606739 engine: whereami: fix C89 in Android detection 2022-08-01 14:33:36 +03:00
Alibek Omarov
067e9be37a scripts: upgrade to Android NDK 25 2022-08-01 14:25:44 +03:00
Alibek Omarov
b7b9c611cf filesystem: wscript: disable RTTI and exceptions(useful on Android), we don't need it here. Link as C++ library. 2022-08-01 14:06:00 +03:00
Alibek Omarov
3c4eec62ae engine: let engine find the filesystem library, if it wasn't loaded yet 2022-08-01 13:25:51 +03:00
SNMetamorph
fd7dba74cd filesystem: fixed build for Windows 2022-08-01 12:54:26 +03:00
SNMetamorph
a8674c18df engine: platform: win32: fixed build for Windows 2022-08-01 12:54:26 +03:00
SNMetamorph
b26cd6cc94 wscript: added /Zc:__cplusplus compiler flag for MSVC 2022-08-01 12:54:26 +03:00
Alibek Omarov
55a29e6e6b filesystem: implement VFileSystem009 interface 2022-07-28 18:56:02 +03:00
Alibek Omarov
56d7c05b51 filesystem: generated VFileSystem009 from pdwtags output, removed unneeded in C++ this first argument 2022-07-28 18:56:02 +03:00
Alibek Omarov
5e4fc64430 filesystem: introduce new module, based on engine filesystem.
The goal is to share filesystem code between engine and
utilities and provide C++ VFileSystem interface in the future
2022-07-28 18:56:02 +03:00
Alibek Omarov
12ea6dcfd7 public: move build.c from engine to public library, in preparation of filesystem_stdio merge 2022-07-26 04:10:36 +03:00
Alibek Omarov
a41f8cb01b engine: move version strings to com_strings.h file, in preparation of filesystem_stdio branch merge 2022-07-26 04:07:52 +03:00
Alibek Omarov
a9c82dbe21 public: make crtlib linkable with C++ 2022-07-26 03:17:11 +03:00
Alibek Omarov
5350d88f57 public: crtlib: add quotation mark support for ParseFile, required for filesystem_stdio 2022-07-26 03:17:11 +03:00
Alibek Omarov
fc132e87f4 engine, game_launch: fix rpath usage 2022-07-26 02:54:20 +03:00
Alibek Omarov
c326853617 engine: server: restore original PEntityOfEntIndex function, but still bug-compatible with GoldSrc 2022-07-21 01:52:10 +03:00
Valery Klachkov
3ad60a0fa1 engine: fix uninitialized variable in demo parsing code, fix incorrect size counter in memory allocator 2022-07-16 16:59:41 +03:00
Alibek Omarov
772f4dcb60 scripts: gha: win32: fix build type from debug to release 2022-07-14 18:26:47 +03:00
Alibek Omarov
657a6af9dc mainui: update 2022-07-13 19:45:42 +03:00
Alibek Omarov
5e1f189db3 engine: platform: posix: use RTLD_NOW instead of lazy.
It actually was a misconception coming from old engine fork
We want to track unresolved symbols before library could be loaded

Also, disable "symbol not found" spam in FunctionFromName. Due to how
savefile mangling convert works and compatibility with GoldSrc saves,
this function is used to bruteforce possible symbol names.
2022-07-13 19:26:38 +03:00
Alibek Omarov
a2d11f670a engine, public: fix float precision issues in mathlib and monster navigation code 2022-07-13 19:26:38 +03:00
Andrey Akhmichin
5bf6f814ef Documentation: opensource-mods.md: update links. 2022-07-13 15:09:22 +03:00
a1batross
fc84cd2a0a engine: common: always show message box when we're in normal mode
Only dedicated server is expected to throw errors to console
2022-07-11 02:45:40 +03:00
a1batross
ab43486ee0 engine: client: don't segfault when client wasn't loaded 2022-07-11 02:43:26 +03:00
SNMetamorph
d8724f0be4 engine: common: net_ws: disabled read-only flag for ip cvar 2022-07-10 18:28:06 +03:00
SNMetamorph
fce3959d15 engine: server: added "c" command to SV_ConnectionlessPacket 2022-07-10 18:28:06 +03:00
SNMetamorph
36b0d47f5f engine: common: net_ws: fixed sockets reinitialization in NET_OpenIP 2022-07-10 18:28:06 +03:00
SNMetamorph
cf84ad12f1 engine: server: backported NAT bypass feature 2022-07-10 18:28:06 +03:00
SNMetamorph
ffe7114a47 engine: client: backported NAT bypass feature 2022-07-10 18:28:06 +03:00
SNMetamorph
6891ed8064 engine: common: net_ws: backported NAT bypass feature 2022-07-10 18:28:06 +03:00
SNMetamorph
8f91830997 engine: added changeport parameter for NET_Config 2022-07-10 18:28:06 +03:00
SNMetamorph
fbdfed84be engine: platform: sdl: fixed bug with unhidable mouse cursor in center of screen 2022-07-09 00:31:49 +03:00
Alibek Omarov
786c408f6e engine: client: fix sprites array size, it wasn't meant to be increased after previous commit 2022-07-01 14:12:32 +03:00
Alibek Omarov
6e031b518a engine: client: increase limit of client sprites, lower part of it can be used only for HUD sprites
higher part used for client sprites
map overview sprites are loaded as normal models

thus we have equal internal engine and hud sprite indices and it fixes compatibility issues
for mods like Half-Rats Parasomnia
2022-07-01 03:41:55 +03:00
Владислав Сухов
500dd0a82b Documentation: supported-mod-list: fix dead links
Restored some mods at Google Drive
2022-06-30 19:37:57 +03:00
Alibek Omarov
d562642e26 utils: mdldec: fix build on Windows, use GetFileAttributes instead of stat here 2022-06-30 18:33:09 +03:00
Andrey Akhmichin
cbcb90638b utils: mdldec: try to create user defined destination directory. 2022-06-30 18:13:46 +03:00
Владислав Сухов
8211acf4e0 Documentation: supported-mod-list: fix link for Lost in Black Mesa 2022-06-30 16:15:21 +03:00
Владислав Сухов
c4a25e0d70 Documentation: supported-mod-list: fix dead links
Renamed domains:
hl-lab.ru -> gamer-lab.com
planetphilip.com -> runthinkshootlive.com
2022-06-30 16:15:21 +03:00
SNMetamorph
3ec9977212 wscript: added parallel builds compiler flag for MSVC 2022-06-30 16:14:21 +03:00
Alibek Omarov
64eb0a694d engine: client: also drop loading plaque on toggleconsole, in case if it's stuck 2022-06-29 18:58:07 +03:00
Alibek Omarov
d46d62bf03 engine: client: drop loading plaque on second signon, remove servercount check 2022-06-29 18:57:10 +03:00
Alibek Omarov
95ed044fee engine: common: disable cl_filterstuffcmd by default 2022-06-29 18:14:53 +03:00
Alibek Omarov
3fe392b41f ref: fix processing indexed textures 2022-06-29 18:05:51 +03:00
Alibek Omarov
854bfb8673 wscript: woops, msvcrt don't actually have stristr 2022-06-29 04:02:57 +03:00
Alibek Omarov
fb43a5590f public: Q_strstr should return pointer to non-const data 2022-06-29 04:02:40 +03:00
Alibek Omarov
5d4f8373c4 common: fix usage of __has_builtin for old GCC releases 2022-06-29 03:53:36 +03:00
Alibek Omarov
ac9664c7ae mainui: update 2022-06-29 03:23:51 +03:00
Alibek Omarov
2905f951bd engine: menu_int: expose TF_EXPAND_SOURCE imagelib flag 2022-06-29 03:20:55 +03:00
Alibek Omarov
79dc090aae engine: platform: sdl: use SetClassLongPtr function to be compatible with 64-bit Windows API 2022-06-29 02:44:50 +03:00
Alibek Omarov
d52b07beac wscript: add stristr/strcasestr presense check 2022-06-29 02:43:09 +03:00
Alibek Omarov
12815bfbf2 public: remove naive implementations of standard function, add them with standard C with few extensions 2022-06-29 02:42:47 +03:00
Alibek Omarov
b9b8b0521b common: add unlikely()/likely() macros 2022-06-29 02:36:39 +03:00
Alibek Omarov
af8febabd1 engine: client: make temp entity buffer larger in case of long textmessages 2022-06-26 15:10:21 +03:00
Alibek Omarov
f0a856d9c8 engine: server: fix writing message size for engine messages, as it's expected to be 2-bytes 2022-06-26 15:05:06 +03:00
Alibek Omarov
85895c5311 engine: pmove: initialize trace argument in PM_TraceModel 2022-06-26 04:39:52 +03:00
Alibek Omarov
c076f4ff8e engine: common: add generic trace_t initialize function 2022-06-26 04:39:15 +03:00
Andrey Akhmichin
87ce35b32d engine: common: imagelib: img_utils.c: change formats priority. 2022-06-25 17:23:44 +03:00
Alibek Omarov
5285f51a26 engine: platform: sdl: fix loading ICO when it's in RoDir 2022-06-25 17:12:08 +03:00
Alibek Omarov
3e23634369 engine: platform: sdl: enable ICO support on Win64 2022-06-25 17:04:02 +03:00
Alibek Omarov
36cec298c2 Revert "engine: common: imagelib: img_tga.c: fix broken tga flip."
This reverts commit 99de598ea4.
2022-06-25 17:03:13 +03:00
Alibek Omarov
6199426e5e Revert "engine: common: imagelib: img_tga.c: fix broken tga flip again."
This reverts commit e5720cf8b9.
2022-06-25 17:03:12 +03:00
Alibek Omarov
4e295622be Revert "engine: platform: sdl: try to enable ICO icons for 64-bit Windows, ignore TGA flip attribute for icons"
This reverts commit 2182ba9630.
2022-06-25 17:03:11 +03:00
Alibek Omarov
2182ba9630 engine: platform: sdl: try to enable ICO icons for 64-bit Windows, ignore TGA flip attribute for icons 2022-06-24 19:15:28 +03:00
Andrey Akhmichin
e5720cf8b9 engine: common: imagelib: img_tga.c: fix broken tga flip again. 2022-06-24 14:18:30 +03:00
Andrey Akhmichin
6063ca2ad1 Documentation: opensource-mods: add Urbicide and Sewer. 2022-06-24 08:06:26 +03:00
Andrey Akhmichin
99de598ea4 engine: common: imagelib: img_tga.c: fix broken tga flip. 2022-06-24 07:38:21 +03:00
Jesse Buhagiar
b23d5ed354 Build: Add SerenityOS to list of compatible systems
This is required by the build system to spit out a library with
the correct name/platform.
2022-06-20 00:01:37 +03:00
Tim Schumacher
a1ce5faac2 Engine: Keep HTTP from endlessly formatting NaN values
For whatever reason, our progress count for HTTP downloads stays at 0.
This results in the engine calculating a NaN progress value many times
each frame, which results in a significant performance hit.
2022-06-20 00:01:37 +03:00
SNMetamorph
afaabe26a6 engine: client: cl_netgraph: fixed netgraph position calculation in center mode 2022-06-16 00:44:23 +04:00
SNMetamorph
a68afcc672 engine: client: cl_netgraph: added kilobytes per seconds unit to in/out fields 2022-06-16 00:42:57 +04:00
SNMetamorph
d4bb5423ae engine: client: cl_netgraph: set rendermode to transparent instead additive 2022-06-16 00:41:11 +04:00
SNMetamorph
ce8e5880e2 engine: client: cl_netgraph: added clamp for bars height 2022-06-16 00:39:48 +04:00
SNMetamorph
0cef18af86 engine: client: cl_netgraph: fixed uninitialized alpha in netcolors 2022-06-16 00:37:38 +04:00
Alibek Omarov
ad4d0cf00a vgui_support: update 2022-06-15 18:26:51 +03:00
Alibek Omarov
a6f12d3009 ref_gl: gl4es: update 2022-06-15 18:26:41 +03:00
Alibek Omarov
fa09854671 engine: client: deprecate and remove ChangeInstance menu call 2022-06-15 18:22:57 +03:00
Alibek Omarov
78d2cd848a mainui: update 2022-06-15 18:20:19 +03:00
Alibek Omarov
463997da51 engine: common: delete unused Mod_Handle function 2022-06-15 13:54:54 +03:00
SNMetamorph
fef0993f54 engine: client: cl_game: fixed hudGetModelByIndex function in client API (fix #518) 2022-06-15 13:53:53 +03:00
Alibek Omarov
2218126c75 engine: disable stdout output and flush on Windows, Wcon already does the job 2022-06-14 04:41:37 +03:00
Alibek Omarov
2388260848 engine: optimize colored output
* removed unneeded formatting for Android
* make generic function to output colorless and colorized strings
* disable color output on low memory devices to not waste CPU cycles on it
2022-06-14 04:23:09 +03:00
Alibek Omarov
40298cefb6 engine: client: don't save configs if shutdown was issued before client was initialized. Remove dead ucmd 2022-06-14 03:30:14 +03:00
Alibek Omarov
45bf927c74 engine: filesystem: avoid FS_SysFolderExists spam if stat returned ENOTDIR 2022-06-14 03:27:56 +03:00
Alibek Omarov
347c6d6a91 engine: common: don't output log to stdout on Win32 where it's done by Wcon. Better colorcode filtration 2022-06-14 03:27:21 +03:00
Alibek Omarov
ab6214142f public: remove custom str(r)chr functions 2022-06-14 03:23:46 +03:00
Velaron
402b38951d engine: better color code stripping 2022-06-13 23:36:13 +03:00
Velaron
6807cf5849 engine: fix build on android 2022-06-13 23:36:13 +03:00
Velaron
15dc25d2cd engine: rename Q_cleanstr to something more meaningful 2022-06-13 23:36:13 +03:00
Velaron
568c7fd917 engine: strip color codes when writing to log 2022-06-13 23:36:13 +03:00
Alibek Omarov
e5562a7b61 engine: whereami: fix C89 2022-06-13 04:33:12 +03:00
Alibek Omarov
ac308f7298 engine: platform: sdl: fix SDL1.2 build 2022-06-13 04:27:54 +03:00
Alibek Omarov
7a88379917 game_launch: fix win32 build 2022-06-13 04:21:57 +03:00
Alibek Omarov
e44718d531 engine: fix build 2022-06-13 04:17:02 +03:00
Alibek Omarov
e6a2c207de engine: implement change game with execv in-engine. For now it enabled for all platforms, will probably disabled selectively 2022-06-13 03:42:20 +03:00
Alibek Omarov
df83b155a1 game_launch: rip out execv code 2022-06-13 03:26:44 +03:00
Alibek Omarov
cc2c97cfad engine: include whereami library to detect current executable path, may be reworked later if needed 2022-06-13 03:07:37 +03:00
Alibek Omarov
c69ea00e79 wscript: better _FILE_OFFSET_BITS check, as suggested by @nekonomicon 2022-06-12 04:25:09 +03:00
Alibek Omarov
f63dd72260 scripts: gha: fix including vgui.dll 2022-06-12 04:16:41 +03:00
Alibek Omarov
5b0b917468 vgui_support: re-add as submodule 2022-06-12 04:15:41 +03:00
Alibek Omarov
b138a63502 vgui_support: remove it from the engine 2022-06-12 03:54:35 +03:00
Alibek Omarov
8eec5389fe game_launch: fix gamedir pointer being lost 2022-06-12 03:07:43 +03:00
Alibek Omarov
5524aaae1e engine: server: fix server dll leak when no map was loaded 2022-06-12 03:07:09 +03:00
Alibek Omarov
acffeb1dad wscript: enable gl4es for Android builds 2022-06-12 03:06:31 +03:00
Alibek Omarov
6c7d57e1eb engine: client: move vgui deinitialization out of CL_UnloadProgs. Delete cls.initialized check in CL_Shutdown, that used to shutdown various client-side subsystems that usually have needed checks by themselves 2022-06-12 03:06:03 +03:00
Alibek Omarov
7c9f5f8ab1 engine: remove LoadLibrary macros, to avoid possible misuse. Although macros moved to game_launch, it's part of it's own problem from now 2022-06-11 03:25:57 +03:00
Andrey Akhmichin
6b4f55c4bf engine: common: filesystem.c: do not load archives with zip extention again 2022-06-10 23:26:14 +03:00
Velaron
89335938c1 remove accidentally added submodule 2022-06-10 23:25:43 +03:00
Velaron
437630d26d platform: win32: remove forgotten code 2022-06-10 23:25:43 +03:00
Bohdan Shulyar
341c9dae39 paltform: win32: fix typo >_< 2022-06-10 23:25:43 +03:00
Velaron
c10b70cb61 game_launch: explicitly check for SDL2 on win32 platforms 2022-06-10 23:25:43 +03:00
Velaron
4c7bf1ff44 platform: win32: improve error reporting when loading DLLs and move custom DLL loader to a separate file 2022-06-10 23:25:43 +03:00
Alibek Omarov
f467d0c807 game_launch: fix Windows build (as suggested by @SNMetamorph) 2022-06-09 20:27:27 +03:00
Alibek Omarov
a717b7fc49 game_launch: declare environ variable, by standard it must be declared by user program 2022-06-09 14:44:04 +03:00
Alibek Omarov
07a9c4602d game_launch: change game with execve on supported platforms 2022-06-09 13:42:16 +03:00
Alibek Omarov
eeb170af22 engine: client: set failed status for vgui_support if we wasn't able to load one. Unload library in case of error 2022-06-09 13:41:37 +03:00
Alibek Omarov
c532c3032c engine: menu_int: hack to compile on MotoMAGX 2022-06-09 03:28:38 +03:00
Alibek Omarov
2b8b3e1993 engine: server: new IP filter, rewritten with IPv6 in mind 2022-06-09 03:10:02 +03:00
Alibek Omarov
b0a889d1a1 engine: bring back simple netadr_t, as we don't care about IPv4-to-IPv6 mapped addresses anymore 2022-06-09 03:10:02 +03:00
Alibek Omarov
bd1bfea695 engine: second iteration of IPv6 support
Made code smaller
Fixed problem where v6 and v4 socket can't use same port
Added support for v4-to-v6 mapped addresses, although it's kept unused
Probably final version
2022-06-09 03:10:02 +03:00
Alibek Omarov
a1299e1dfe common: third iteration of ipv6 netadr_t, now binary compatible with v4-to-v6 mapped addresses 2022-06-09 03:10:02 +03:00
Alibek Omarov
1a5a76a201 engine: common: minor fixes to ipv6text library 2022-06-09 03:10:02 +03:00
Alibek Omarov
b072b627a2 engine: enable getaddrinfo on Windows, fix build 2022-06-09 03:10:02 +03:00
Alibek Omarov
5d18c6d678 engine: fix declaration-after-statement 2022-06-09 03:10:02 +03:00
Alibek Omarov
59fba30a52 engine: IPv6 support
* v6 equivalent cvars
* hostname resolving for v6
* fix for nonblocking hostname resolve (inverted check)
* enabled by default, probably should be disabled for dedicated servers
2022-06-09 03:10:02 +03:00
Alibek Omarov
193cde83b6 engine: add IPv6 address parsing/printing library from GameNetworkingSockets 2022-06-09 03:10:02 +03:00
Alibek Omarov
12bfb8f795 common: another approach on netadr_t with better compatibility 2022-06-09 03:10:02 +03:00
Alibek Omarov
9ae72dbc47 common: update netadr_t structure to include IPv6 addresses 2022-06-09 03:10:02 +03:00
Alibek Omarov
ae6ad74994 update: mainui 2022-06-09 03:09:48 +03:00
Andrey Akhmichin
f417433f59 Documentation: opensource-mods.md: update 2022-06-03 19:54:45 +03:00
Andrey Akhmichin
080dc38f11 ci: upgrade freebsd tasks 2022-06-03 19:53:58 +03:00
Alibek Omarov
13f93412cd engine: platform: sdl: forgot to add an include, sorry\! 2022-06-02 03:01:58 +03:00
Alibek Omarov
ca975d0168 mainui: update 2022-05-30 22:44:52 +03:00
Alibek Omarov
b82d0bad7a engine: client: vgui: unload client DLLL if no vgui_support export was found 2022-05-30 22:41:28 +03:00
Alibek Omarov
d1de9e2802 engine: platform: sdl: proper cursors allocation and free 2022-05-30 03:33:03 +03:00
Alibek Omarov
efdf9e3599 scripts: gha: include activities.txt on win32 continious builds 2022-05-30 02:35:06 +03:00
Alibek Omarov
060835cf2f waf.bat: correctly parse reg query on Windows 10+, fallback only to py.exe wrapper 2022-05-29 19:22:48 +03:00
Alibek Omarov
74485f30d3 ref_gl: gl4es: update 2022-05-29 18:27:16 +03:00
Alibek Omarov
8dda35a128 mainui: update 2022-05-29 18:26:55 +03:00
Alibek Omarov
978ec27a57 waf: upgrade to temporary waifu branch with absolute path clang compilation database generator 2022-05-29 05:19:23 +03:00
Alibek Omarov
113f18cfb0 ref_soft: use correct types for pointer arithmetics 2022-05-29 04:23:07 +03:00
Alibek Omarov
6f36edfd16 engine: various const qualifier fixes 2022-05-29 04:22:43 +03:00
Alibek Omarov
5fb4edeb36 ref: simplify gldebug switchcase in output function, kinda fix const qualifiers 2022-05-29 04:00:19 +03:00
Alibek Omarov
dd29e705f8 engine: menu_int: add _format and NORETURN attributes to MenuAPI 2022-05-29 02:33:28 +03:00
Alibek Omarov
8445567ab4 engine: server: remove unused arguments passed to Con_Printf 2022-05-29 02:27:39 +03:00
Alibek Omarov
11d4cb0f1e engine: client: securedstub: cosmetic changes 2022-05-29 02:27:02 +03:00
Alibek Omarov
db48d0ded7 engine: server: fix useless double assignment 2022-05-29 01:59:15 +03:00
Alibek Omarov
86a777880f engine: common: mark AbortCurrentFrame as NORETURN, fix noreturn warnings 2022-05-29 01:58:56 +03:00
Alibek Omarov
0d195ee6fe engine: server: fix output of maps command 2022-05-29 01:29:51 +03:00
Alibek Omarov
5e4996b119 engine: server: fix bot count 2022-05-28 22:16:08 +03:00
Alibek Omarov
f25254369d engine: set useful format attribute for RefAPI, set Host_Error as NORETURN 2022-05-28 17:58:17 +03:00
Alibek Omarov
9ce8edcb38 public: moved compiler attributes to xash3d_types.h 2022-05-28 17:57:43 +03:00
Alibek Omarov
33d79ddb24 engine: server: fix possible array overruns 2022-05-25 17:57:47 +03:00
Alibek Omarov
52d1383f14 engine: client: fix various useless checks, unused variables & defines, double assignments and mistypings 2022-05-25 03:50:06 +03:00
Alibek Omarov
843c9abf9b engine: common: fix array underrun 2022-05-25 03:38:19 +03:00
Alibek Omarov
924e895753 engine: common: set Host_Error and Sys_Error as NORETURN 2022-05-25 03:38:02 +03:00
Alibek Omarov
ac40badaa5 engine: client: fix array overruns 2022-05-25 03:36:33 +03:00
Alibek Omarov
fd83b0dc17 waf: upgrade to latest waf 2022-05-25 01:40:10 +03:00
a1batross
5715023a0d ci: upgrade freebsd tasks 2022-05-21 03:14:41 +03:00
Alibek Omarov
51526948c0 engine: server: make PEntityOfEntIndex bug-compatible with GoldSrc
Add new undocumented GoldSrc eiface function, PEntityOfEntIndexAllEntities,
a bug-free version of PEntityOfEntIndex

Ref: https://github.com/ValveSoftware/halflife/issues/2272
2022-05-21 03:03:59 +03:00
Alibek Omarov
10ec32e264 waf: add Python 3.10 scan in batch script 2022-05-16 05:40:34 +03:00
Alibek Omarov
4fbd96d201 engine: common: filesystem: speed up directory existense check on POSIX by using stat() instead of opendir() 2022-05-09 07:45:51 +03:00
Alibek Omarov
81b01ac561 engine: common: remove NaN check, it's mostly useless on text data 2022-05-09 05:01:20 +03:00
Alibek Omarov
771c359ed0 engine: common: make blue-shift map detect more robust 2022-05-09 05:01:20 +03:00
SNMetamorph
d1a5c33bf1 engine: common: removed unused function Sys_SetClipboardData 2022-05-02 03:29:24 +03:00
SNMetamorph
641f0632ef engine: client: fixed compilation errors on Android 2022-05-02 03:29:24 +03:00
SNMetamorph
974f0787a4 vgui_support: added VGUI_TextInput callback stub 2022-05-02 03:29:24 +03:00
SNMetamorph
87ceb0f9cb engine: client: fixed checking client library for vgui_support interface export 2022-05-02 03:29:24 +03:00
SNMetamorph
cfcd58dd78 engine: client: extended VGUI API interface 2022-05-02 03:29:24 +03:00
SNMetamorph
8044d23e7f engine: platform: sdl: fixed Key_Event callback when text input enabled 2022-05-02 03:29:24 +03:00
SNMetamorph
b175d6d95f engine: client: fixed forced text input turn off in Key_EnableTextInput 2022-05-02 03:29:24 +03:00
SNMetamorph
d3e213aa1b engine: platform: added Platform_GetKeyModifiers 2022-05-02 03:29:24 +03:00
SNMetamorph
26e09c240a engine: platform: added Platform_SetCursorType 2022-05-02 03:29:24 +03:00
SNMetamorph
15eb6808c4 engine: platform: updated clipboard read/write functions 2022-05-02 03:29:24 +03:00
SNMetamorph
5402e1a259 ref_soft: fixed R_WorldToScreen behavior to match GoldSrc 2022-04-13 09:12:12 +03:00
SNMetamorph
74086cc4c1 ref_gl: fixed R_WorldToScreen behavior to match GoldSrc 2022-04-13 09:12:12 +03:00
SNMetamorph
9c85d114e7 engine: client: fixed TriWorldToScreen behavior to match GoldSrc 2022-04-13 09:12:12 +03:00
Alibek Omarov
81c4acab66 platform: sdl: fix right mouse button issuing wrong key code 2022-04-10 19:40:11 +03:00
SNMetamorph
6f2fda427e engine: keydefs: fixed mouse buttons code to match GoldSrc 2022-04-10 16:50:23 +03:00
SNMetamorph
09b7f22cee engine: cl_frame: fixed segfault in CL_UpdatePositions 2022-04-10 16:31:02 +03:00
Alibek Omarov
691a305f8e engine: common: reorder cmd_t fields to be compatible with GoldSrc 2022-04-09 19:38:22 +03:00
SNMetamorph
66dc20dc2d engine: platform: con_win: fixed console window visibility without developer mode (fix #818) 2022-04-08 14:18:38 +03:00
Alibek Omarov
92cfa2af48 ref_soft: light: fixed game crash in Customize multiplayer menu 2022-04-07 22:02:31 +03:00
SNMetamorph
9515cccb94 engine: client: cl_frame: fixed position history animtime for non-brush entities 2022-04-07 21:56:37 +03:00
SNMetamorph
a7d02b8268 ref_gl: gl_rlight: fixed game crash in Customize multiplayer menu 2022-04-07 21:56:37 +03:00
SNMetamorph
22815d2784 engine: server: sv_main: added status line for dedicated server console 2022-04-06 15:17:15 +03:00
SNMetamorph
95ee88720c engine: platform: win32: major refactoring of console code 2022-04-06 15:17:15 +03:00
SNMetamorph
58dbc1ba31 engine: system: disabled skipping color codes for Wcon_WinPrint 2022-04-06 15:17:15 +03:00
SNMetamorph
d7431783d4 engine: sv_save: added entity_state_t->startpos to save fields 2022-04-06 14:28:13 +03:00
Alibek Omarov
c8410f7e46 engine: server: don't issue an assert on invalid client names 2022-04-02 13:36:53 +03:00
a1batross
80e20cb55b Documentation: ports: update info about PSP port 2022-03-30 22:30:32 +03:00
Alibek Omarov
654bac83a5 scripts: do not upload branches as main continious prerelease 2022-03-20 06:38:46 +03:00
a1batross
fc7fb8b62d engine: masterlist: replace master server domain by mentality.rip
It is essentially the same as ms.xash.su but due to current situation, it is known to be blocked on some Ukrainian ISPs.

ms2.xash.su is retired for now.
2022-03-19 01:58:10 +03:00
SNMetamorph
65d624140e engine: filesystem: fixed FS_Search algorithm for ZIP files (fix #796) 2022-03-15 23:11:00 +03:00
SNMetamorph
cd2720ba81 engine: common: imagelib: fixed loading BMP files with v4/v5 headers 2022-03-13 01:50:30 +03:00
Alibek Omarov
d2f3b1974e github: disable cleanup for self-hosted runners because there are none 2022-03-11 14:05:53 +03:00
Alibek Omarov
91742d613d github: goodbye, aarch64 runner 2022-03-11 13:41:47 +03:00
Alibek Omarov
fba323cf1f engine: common: cosmetic changes to usage string generating code 2022-03-10 04:52:16 +03:00
Alibek Omarov
f67d0ffa5a engine: common: fix broken function name and strings after find&replace in socket code 2022-03-10 04:51:38 +03:00
Alibek Omarov
a6fbf5fb74 mainui: update 2022-03-09 08:16:28 +03:00
Alibek Omarov
df616b950d engine: add NET_AdrToString to menu extended API, upgrade mainui submodule 2022-03-08 07:00:36 +03:00
Alibek Omarov
37cf4da136 engine: client: switch to protocol info key in detecting old engine servers 2022-03-08 07:00:36 +03:00
Alibek Omarov
668d528e3b engine: client: delete unused function 2022-03-08 07:00:36 +03:00
Alibek Omarov
12da44a3d7 engine: server: send protocol version to distinguish old engine and new 2022-03-08 07:00:36 +03:00
SNMetamorph
51fcae8cec ref_gl: gl_image: added check for hardware support of BC6H/BC7 compression formats 2022-03-07 02:03:40 +03:00
SNMetamorph
6473efa995 engine: added support for BC7 and BC6H compression formats of DDS textures 2022-03-07 02:03:40 +03:00
SNMetamorph
cf7852832f ref_gl: gl_image: added support for BC7 and BC6H compression formats of DDS textures 2022-03-07 02:03:40 +03:00
SNMetamorph
29ad3de78a ref_gl: added support for GL_ARB_texture_compression_bptc extension 2022-03-07 02:03:40 +03:00
Alibek Omarov
8169c2a40b wscript: set rpath to current folder, LD_LIBRARY_PATH is unneeded anymore
Fix README and AppImage launch script accordingly
2022-03-03 05:57:51 +03:00
Alibek Omarov
85f99c723a engine: add sys_timescale implementation 2022-03-03 05:38:36 +03:00
SNMetamorph
edc171be04 engine: common: fixed lightmap shift again 2022-02-28 19:56:28 +03:00
SNMetamorph
9047fe2e74 ref_gl: gl_rsurf: fixed invalid lightmap texture coordinates in some cases 2022-02-28 16:54:28 +03:00
SNMetamorph
24ea8fba4b engine: common: fixed lightmap shifting caused by insufficent precision in Mod_CalcSurfaceExtents 2022-02-28 16:54:28 +03:00
Alibek Omarov
e07417aead engine: client: fix sentence word splitted by contents inside parentheses 2022-02-28 04:29:32 +03:00
Alibek Omarov
13b36e66b3 engine: client: workaround buggy position history times going backwards in interpolation code 2022-02-25 02:12:44 +03:00
Alibek Omarov
7821f425e7 engine: client: position history indexes can't be negative, use unsigned with them 2022-02-24 05:45:41 +03:00
Alibek Omarov
f0783ddee1 engine: client: fix comparing floats in interpolation code 2022-02-24 04:51:04 +03:00
Alibek Omarov
d4d39c66fb engine: client: fix double call to CL_ParametricMove 2022-02-24 02:49:10 +03:00
Alibek Omarov
a2d8a47376 engine: client: fix misplaced arguments in memcpy 2022-02-24 02:47:54 +03:00
Alibek Omarov
3f7773f83b engine: client: rewrite VOX subsystem, fix spaces being taken into sentences, add tests for parser, remove dead code 2022-02-22 09:40:15 +03:00
Alibek Omarov
18933e7981 engine: ensure all data was written to stdout when exiting 2022-02-22 09:40:15 +03:00
Andrey Akhmichin
9917cba8fc utils: mdldec: add fixed uv coords support. 2022-02-12 22:06:31 +03:00
Alibek Omarov
203afda053 engine: add render_picbutton_text flag to use mainui_cpp font renderer for rendering WON buttons 2022-02-10 02:53:35 +03:00
Alibek Omarov
6dbb694fdc wscript: define _FILE_OFFSET_BITS=64 on 32-bit systems if libc (presumably glibc) supports it 2022-02-01 19:42:38 +03:00
Alibek Omarov
0c26c24331 ref_gl: really disable VBO by default for now 2022-02-01 19:27:49 +03:00
Alibek Omarov
51635995a2 mainui: update to temporary branch with fixes until I finish picbutton text renderer 2022-02-01 19:26:26 +03:00
Bien Pham
988183a96a engine: implement support for secured client dlls 2022-02-01 05:56:54 +03:00
SNMetamorph
d8fd0b3dcb documentation: updated mainteiners list for Windows engine port 2022-01-30 01:27:22 +03:00
Alibek Omarov
a6b43fbfff engine: show additional errno string when log file cannot be opened 2022-01-29 03:04:54 +03:00
Alibek Omarov
61643585e0 engine: fix NULL ptr dereference when log file cannot be opened 2022-01-29 03:04:00 +03:00
Alibek Omarov
75e8a51058 ref_gl: disable VBO. Rename r_vbo to gl_vbo to ignore existing config values as it was enabled by default 2022-01-29 02:33:09 +03:00
Bien Pham
3a55b9cd67 engine: make pfnDrawString & pfnDrawStringReverse return width 2022-01-29 00:36:43 +03:00
Alibek Omarov
89baa633c8 engine: sdl: fix mouse activated when focus gained but not game is active 2022-01-28 01:20:14 +03:00
Alibek Omarov
1bf08cc2c3 engine: touch: fix button deletion 2022-01-27 17:10:50 +03:00
Alibek Omarov
36d757c74a engine: server: fix message trace output 2022-01-27 03:48:54 +03:00
Alibek Omarov
0891356ec5 ref_gl: use GoldSrc particle texture 2022-01-27 03:32:52 +03:00
Alibek Omarov
0fa1b4f944 engine: client: refactor tempentity parsing, make multipliers close to GoldSrc 2022-01-27 03:32:52 +03:00
Alibek Omarov
56103a90eb engine: client: limit token size in client dll parsefile to 1024 (GoldSrc value) 2022-01-27 03:32:52 +03:00
Alibek Omarov
2fa964e939 engine: server: restore sv_trace_messages from old engine 2022-01-27 03:32:52 +03:00
Alibek Omarov
0027678a56 engine: client: print which tempentity type was overflowed 2022-01-27 03:32:52 +03:00
Alibek Omarov
ffea7d9729 engine: add host_lowmemorymode cvar to indicate low memory mode level 2022-01-27 03:32:52 +03:00
Velaron
0e286f31c5 engine: client: fix DT_TIMEWINDOW_* signedness 2022-01-24 17:31:36 +03:00
Valery Klachkov
b9cec43e2c ref_soft: Fix crashes on 64bit
Just replace all long for unsigned long long :)
2022-01-16 14:26:15 +03:00
NightFox
bb84a3cb7f add /fsanitize=address for msvc (windows) when sanitize 2022-01-16 09:54:17 +03:00
Alibek Omarov
5aa6bfee85 engine: first attempts on fuzzing the engine 2022-01-15 06:24:57 +03:00
Alibek Omarov
204544f50f readme: update 2022-01-15 04:48:04 +03:00
Alibek Omarov
df4f21680c engine: client: apply local client effects only if it wasn't rejected by clientdll 2022-01-14 16:18:09 +03:00
Alibek Omarov
2c1b862654 engine: client: ignore EF_BRIGHTFIELD for local client
It must be OK, because GoldSrc don't call similar function for local client
instead adds only flashlight and muzzleflash effects.

By adding this check, behavior must be close enough
2022-01-14 16:16:13 +03:00
Alibek Omarov
ea5937bce0 engine: net_encode: remove naive clientdata/weapondata copy, only copy fields explicitly listed in deltalst 2022-01-14 14:46:52 +03:00
Alibek Omarov
6e4ab74694 engine: net_encode: split delta "no changes" copy into separate function 2022-01-14 14:33:13 +03:00
Alibek Omarov
2c74a633d0 mainui: update 2022-01-14 01:29:33 +03:00
Alibek Omarov
22e770e4d4 engine: client: disable viewsize without requested Quake compatibility 2022-01-14 01:18:22 +03:00
Alibek Omarov
1f26710bd0 engine: fix add command error messages 2022-01-14 01:06:52 +03:00
Alibek Omarov
96f35f76e1 engine: filesystem: fix creating directories with roDir 2022-01-14 00:42:24 +03:00
Alibek Omarov
fa37d153c8 engine: common: restrict alias/unalias and stuffcmds from executing by server 2022-01-14 00:26:26 +03:00
Alibek Omarov
aa5594d11f engine: client: don't let servers clear console 2022-01-14 00:03:05 +03:00
Alibek Omarov
6b332eabd2 scripts: gha: include extras in MAGX and Win32 builds too (Linux and Android already have it) 2022-01-13 18:31:12 +03:00
Alibek Omarov
13cf909b99 engine: filesystem: allow extras ZIPs 2022-01-13 18:22:06 +03:00
Alibek Omarov
606b5354e6 engine: filesystem: fix loading ZIP files 2022-01-13 17:46:54 +03:00
Alibek Omarov
e29dcb4125 engine: filesystem: accept ZIP files with zip extension, do not assert with NULL free in Zip_Close 2022-01-13 16:44:45 +03:00
Alibek Omarov
c3513b1615 engine: input: clean m_enginemouse leftovers, always enable SDL relative mouse mode for our input interface 2022-01-13 16:18:23 +03:00
Alibek Omarov
abbd0f92a4 engine: input: fix incorrect client notifying about mouse button states 2022-01-13 15:52:59 +03:00
Alibek Omarov
f9d0fba05f wscript: remove duplicated branches diagnostic for good 2022-01-04 09:01:08 +03:00
Alibek Omarov
1ffe050205 engine: print only command name in Unknown command message, rather than a full line 2022-01-04 09:01:08 +03:00
Alibek Omarov
a2f741fe8a engine: platform: sdl: try to fix 1.2 build 2022-01-04 08:39:11 +03:00
Alibek Omarov
d0a39ef492 engine: client: rework mouse input again, do what GoldSrc does, minimize SDL mouse calls 2022-01-04 08:39:11 +03:00
Alibek Omarov
f63d2d747f vgui: remove unneeded SDL calls, remove unused VGUI API function, fix mouse cursor visibility 2022-01-04 08:39:11 +03:00
Alibek Omarov
7e687b45bb engine: client always uses SDL (virtually) on non-Win32 platforms 2022-01-04 08:39:11 +03:00
Alibek Omarov
284eeea3c3 engine: client: rework mouse input, use IN_MouseEvent for clientdll, don't emit mouse events when mouse is visible or touch emulate is used 2022-01-04 08:39:11 +03:00
Alibek Omarov
01b2266b7e engine: net_encode: minor code style fix 2022-01-04 04:30:47 +03:00
Alibek Omarov
0714ab27b5 mainui: update 2022-01-04 04:29:27 +03:00
Alibek Omarov
4ae608913b console: fix Home and End buttons or equivalent hotkeys to always set start or end of input buffer 2022-01-04 03:01:59 +03:00
Alibek Omarov
295adcf222 engine: con_utils: don't also prepend backslash in autocompletion~ 2022-01-04 02:31:41 +03:00
Alibek Omarov
3351ecd754 console: ignore whitespace commands on history, ignore backslash 2022-01-04 02:31:07 +03:00
Alibek Omarov
ccf90beb7d public: crtlib: add Q_isspace function 2022-01-04 02:22:20 +03:00
Alibek Omarov
7fbbe9f015 github: ignore cleanup failure, run only on self-hosted 2022-01-04 02:20:13 +03:00
Alibek Omarov
46fd27eb14 console: remove prepending backslashes
This is a leftover from Quake, where the console and chat were
in fact same entity. Because Xash splits it, there is no need
in prepending backslashes to separate commands from chat messages
2022-01-04 02:14:34 +03:00
Alibek Omarov
f1a4d66d27 scripts: waifulib: remove nooptimize build type, use debug instead. Disable optimization for sanitize builds 2022-01-04 01:58:45 +03:00
Alibek Omarov
c619bb4af7 readme: update discord link 2022-01-03 23:21:31 +03:00
Alibek Omarov
210137c325 engine: increase model limit to the possible maximum without breaking the protocol 2022-01-03 23:07:33 +03:00
Alibek Omarov
d4d79573f6 github: try to cleanup work directory before running, useful for self-hosted runners 2022-01-03 21:13:02 +03:00
Alibek Omarov
b7a32f6843 scripts: gha: install deps on aarch64 2021-12-31 05:29:11 +03:00
Alibek Omarov
f1dabf13a1 github: try to add aarch64 runner 2021-12-31 05:25:20 +03:00
Alibek Omarov
947b94d29f engine: client: delete unused test data :) 2021-12-31 04:10:06 +03:00
Alibek Omarov
f007374866 engine: client: rewrite console history
Fix duplicate and empty lines saved into history
Fix backup copied too early
Add tests
2021-12-31 03:49:11 +03:00
Alibek Omarov
7cb06956c2 engine: platform: win32: fix compile 2021-12-28 00:16:06 +03:00
Alibek Omarov
ebfa8e6ffc engine: platform: android: fix compile 2021-12-27 03:19:50 +03:00
Alibek Omarov
7869aac2e5 wscript: add public to includes 2021-12-27 03:18:23 +03:00
Alibek Omarov
f3dfbc9219 mainui: update 2021-12-24 18:14:03 +03:00
Alibek Omarov
4f89288ccf common: cleanup port.h 2021-12-23 19:17:11 +03:00
Alibek Omarov
fb8791529e common: include build.h in xash3d_types.h 2021-12-23 18:46:40 +03:00
Alibek Omarov
f0feb1dfbf ref: remove predictable random tiling textures 2021-12-23 18:35:01 +03:00
Alibek Omarov
2df27e14a8 engine: client: make connect command available through stufftext, for future use 2021-12-23 01:25:03 +03:00
Alibek Omarov
764ef93984 common: add fs_size_t typedef, for read()/write() return value 2021-12-23 01:21:33 +03:00
Alibek Omarov
d8b3ab4dcc engine: filesystem: fix unused result warnings 2021-12-22 05:03:06 +03:00
Alibek Omarov
08e72bad35 engine: crashhandler: clean up code 2021-12-22 05:02:34 +03:00
Alibek Omarov
7e574ea42e engine: filesystem: do not create folders for files in rodir mode 2021-12-22 01:52:47 +03:00
Alibek Omarov
0963e05716 engine: restore lumps after swapping them for blue shift maps
Mod_TestBmodelLumps may modify srclumps data, which is essential for
brush model loader. BlueShift maps have swapped lumps for some reason
Restoring them to default is fix for now
2021-12-20 18:12:36 +03:00
Alibek Omarov
23e2f4d0cc wscript: fix install on Android 2021-12-18 03:46:21 +03:00
Alibek Omarov
ca3544d559 engine: server: don't assert for NULL player in FatPAS/PVS if we don't need it 2021-12-18 03:32:40 +03:00
Alibek Omarov
7a0a355baf github: grab artifacts by wildcard rather than a list 2021-12-17 04:38:23 +03:00
Alibek Omarov
f7bf081650 github: try to fix artifacts uploading (YAML is worst markup language) 2021-12-17 03:58:56 +03:00
Alibek Omarov
a4be009ce7 scripts: waifulib: disable stpcpy builtin for API level <21 2021-12-17 03:15:38 +03:00
Alibek Omarov
d3248aad66 scripts: waifulib: clean legacy Android definitions 2021-12-15 17:40:24 +03:00
Alibek Omarov
000c594596 scripts: waifulib: disable -no-canonical-prefixes for new NDKs 2021-12-15 17:37:31 +03:00
Alibek Omarov
960a8959d5 github: download ndk directly instead of sdkmanager because sdkmanager sucks and ships ndk 22 2021-12-14 23:23:52 +03:00
Alibek Omarov
2604ea39c5 github: try to upload artifacts 2021-12-14 23:17:04 +03:00
Alibek Omarov
dc186c3cba github: build android with NDK compiler 2021-12-14 23:03:31 +03:00
Alibek Omarov
f60112773f public: crtlib: include string.h for strlen 2021-12-10 01:13:08 +03:00
Alibek Omarov
37aa5b1e99 engine: gamma: use FBitSet 2021-12-08 20:28:30 +03:00
SNMetamorph
aa07dab8ab engine: added feature flag ENGINE_LINEAR_GAMMA_SPACE 2021-12-08 20:27:02 +03:00
Alibek Omarov
ac213c22ed ref: change some FCVAR_ARCHIVE to FCVAR_GLCONFIG to save in separate config 2021-12-08 17:58:16 +03:00
Alibek Omarov
e0efe0aa23 engine: remove emboss filter. There seems no real use for it. 2021-12-07 09:09:45 +03:00
Alibek Omarov
29bc0392ee scripts: compiler_optimizations: disable clang thread-safe statics 2021-12-07 09:03:51 +03:00
Alibek Omarov
054765232e waifulib: xcompile: add NDK 23 support 2021-12-07 09:03:20 +03:00
Alibek Omarov
89425e4bf2 mainui: update 2021-12-07 05:16:47 +03:00
Alibek Omarov
a777e7c80d engine, ref: add sprite and studio cvars to shared cvars list 2021-12-06 05:17:25 +03:00
Alibek Omarov
1350fd0b52 engine: ref: use right Cvar_Get function :) 2021-12-06 05:02:30 +03:00
Alibek Omarov
d7db48ce4b engine, ref: create shared cvars list, register them at engine side, make a generic macro to declare, define and get all pointers at ref side 2021-12-06 04:57:32 +03:00
Alibek Omarov
293482fbd5 engine: FCVAR_GLCONFIG are not readonly anymore. To make truly readonly cvar for renderer, one must apply FCVAR_READ_ONLY flag 2021-12-06 03:56:18 +03:00
Alibek Omarov
3771a1d6c5 public: replace our Q_strlen with standard strlen with nullptr check in macro 2021-12-03 09:44:51 +03:00
Alibek Omarov
07f1f7ded1 engine: launcher: use our Q_strncpy instead of standard strncpy 2021-12-03 09:41:58 +03:00
Alibek Omarov
1cac321c00 engine: enable filtered command buffer for dedicated to pass the tests 2021-12-03 09:41:23 +03:00
Alibek Omarov
aa7bfb4819 engine: check for non-standard alloca header 2021-12-03 09:22:40 +03:00
Alibek Omarov
0c18a06946 engine: sequence: use Q_strncpy instead of standard strcpy 2021-12-03 09:22:40 +03:00
Alibek Omarov
24edcf7d9e engine: swap lumps back after they were swapped for blue-shift maps 2021-11-29 16:28:42 +03:00
Alibek Omarov
ecddae8ee6 ref_gl, ref_soft: increase MAX_TEXTURES limit by 8192 2021-11-29 16:22:52 +03:00
Marc-Antoine Lortie
1ab49adbf2 Updated links in opensource-mods.md 2021-11-27 16:34:27 +03:00
Alibek Omarov
28b49e00e5 scripts: continious_upload: remove unused Travis CI support 2021-11-27 06:34:22 +03:00
Alibek Omarov
1e6be598e9 TravisCI is dead too\! 2021-11-27 06:27:52 +03:00
Alibek Omarov
155e15939b scripts: continious_upload: remove unused Artifactory support (JFrog is dead\!) 2021-11-27 06:25:35 +03:00
Alibek Omarov
3f014fde73 scripts: continious_upload: upload to original transfer.sh 2021-11-27 06:24:13 +03:00
Alibek Omarov
66db69862f cirrus: build all renderers available, remove unsupported -W flag for waf configure 2021-11-27 06:23:07 +03:00
Alibek Omarov
fc665527ae wscript: try to fix install on windows 2021-11-27 06:04:26 +03:00
Alibek Omarov
0c6b51fa0c waf: upgrade 2021-11-27 05:54:22 +03:00
Alibek Omarov
c00e77c02e engine: fix const qualifier discard 2021-11-27 05:27:45 +03:00
Alibek Omarov
25c0557f7f engine: platform: sdl: fix building with SDL1.2 2021-11-27 05:26:09 +03:00
Alibek Omarov
76ea3c39a0 ref_gl: disable multisample texture for gl4es too 2021-11-27 05:13:31 +03:00
Alibek Omarov
e67bd4811a ref_gl: fix gles1 and gles2 build 2021-11-25 19:02:09 +03:00
Alibek Omarov
7a215766c6 ref_gl: add missing define for glTexImage2DMultisample 2021-11-25 18:47:23 +03:00
Alibek Omarov
576f0a72c5 scripts: install with destdir option on CI 2021-11-25 16:57:02 +03:00
Alibek Omarov
55b4597390 readme: use --destdir option to install engine in selected folder 2021-11-25 16:56:37 +03:00
Alibek Omarov
c64b3db6b8 wscript: remove win-style-install option, introduce enable-packaging 2021-11-25 16:52:28 +03:00
Alibek Omarov
67e77ca099 wscript: move setting DOS options where they should be 2021-11-24 23:54:03 +03:00
SNMetamorph
f726793711 engine: client: cl_main: fixed compilation error 2021-11-23 13:10:39 +03:00
Alibek Omarov
1944f48516 engine: common: allow unlimited commands for unprivileged mode at this time to not break mods like GGM 2021-11-23 05:23:38 +03:00
Alibek Omarov
992bcd89ef engine: add cmd and cvar tests for privileged mode 2021-11-23 05:23:38 +03:00
Alibek Omarov
2356bc9905 engine: client: escape keybindings and rcon commands 2021-11-23 05:23:38 +03:00
Alibek Omarov
9159d406e3 engine: client: fix #673 2021-11-23 05:23:38 +03:00
Alibek Omarov
508eb7ab5f engine: restore command escaping 2021-11-23 05:23:38 +03:00
Alibek Omarov
1de1852409 engine: client: fix build after merging into one ParseCvarValue function 2021-11-23 05:23:38 +03:00
Alibek Omarov
664506f79e engine: client: touch security, add unprivileged for buttons added from server, force it and client flags 2021-11-23 05:23:38 +03:00
Alibek Omarov
06eb6838a9 engine: client: protect protected, privileged and server only cvars from server query 2021-11-23 05:23:38 +03:00
Alibek Omarov
f2a9f805b8 engine: client: redefine some cvars as filterable 2021-11-23 05:23:38 +03:00
Alibek Omarov
c6648a69ba engine: client: protect messagemode from command injection too 2021-11-23 05:23:38 +03:00
Alibek Omarov
3203d9a043 engine: client: wire Cbuf_AddFilteredText to svc_stufftext commands 2021-11-23 05:23:38 +03:00
Alibek Omarov
8599119c8d engine: add filterable flag support for cvars and cmds 2021-11-23 05:23:38 +03:00
Alibek Omarov
a3d6e7bcfe common: define FCVAR_FILTERABLE, change FCVAR_LATCH value (probably losing compatibility with XashXT and Paranoia 2) 2021-11-23 05:23:38 +03:00
Alibek Omarov
36702aafe7 engine: rename FCVAR_LOCALONLY and CMD_LOCALONLY into FCVAR_PRIVILEGED and CMD_PRIVILEGED 2021-11-23 05:23:38 +03:00
Alibek Omarov
b93938956e engine: allow exec command with config filenames whitelist 2021-11-23 05:23:38 +03:00
Alibek Omarov
c96f10d40b engine: client: restrict LOCALONLY cvars regardless of cl_filterstuffcmd value 2021-11-23 05:23:38 +03:00
Alibek Omarov
8a9231628e engine: restrict potentially harmful or related to user settings engine cvars 2021-11-23 05:23:38 +03:00
Alibek Omarov
66d66eb835 common: define FCVAR_LOCALONLY the same bit used in GoldSource, move FCVAR_MOVEVARS into internal engine flags 2021-11-23 05:23:38 +03:00
Alibek Omarov
9a4dec64f9 engine: describe protected and privileged cvars 2021-11-23 05:23:38 +03:00
Alibek Omarov
94dc74a37f engine: restrict potentially harmful engine commands 2021-11-23 05:23:38 +03:00
Alibek Omarov
b24c1a51d3 engine: try to mitigate outdated client.dll vulnerabilities 2021-11-23 05:23:38 +03:00
Alibek Omarov
c79a649d97 engine: client: implement pfnFilteredClientCmd 2021-11-23 05:23:38 +03:00
Alibek Omarov
f9d1d14848 engine: disable filtered command buffer for dedicated 2021-11-23 05:23:38 +03:00
Alibek Omarov
1a1d81de62 engine: add stuffcmd filtering, not wired to ClientCmd yet 2021-11-23 05:23:38 +03:00
SNMetamorph
6c9321e50c ref_gl: added multisample textures support 2021-11-23 05:17:19 +03:00
SNMetamorph
c366e25a10 ref_gl: cvar gl_wgl_msaa_samples renamed to gl_msaa_samples 2021-11-23 05:17:19 +03:00
Bohdan Shulyar
8ab97fbbf0 engine: client: Add svc_exec support (#671)
* Add svc_exec support

* engine: client: add gamedir check for svc_exec
2021-11-14 00:55:15 +03:00
Alibek Omarov
a5a66f6c3e ref_gl: update gl4es 2021-11-10 01:08:12 +03:00
Alibek Omarov
1c6604806c mainui: update 2021-11-10 01:08:00 +03:00
Alibek Omarov
39893609fd engine: touch: cosmetical touch code refactoring 2021-11-10 01:06:56 +03:00
Alibek Omarov
b9901bcb70 engine: client: forgot to register s_warn_late_precache cvar 2021-11-01 14:49:30 +06:00
Alibek Omarov
6571c78ed4 engine: client: hide late precache warning under s_warn_late_precache cvar
This warn is valid mostly for multiplayer games.
In singleplayer games, this is a false-positive as sentences are hot loaded
2021-10-31 21:06:54 +06:00
Alibek Omarov
d1e6063650 ref_gl: add close_gl4es, fix #258 2021-10-31 20:59:20 +06:00
Alibek Omarov
42db1faa51 ref: update ref_gl and ref_soft interface according to previous commit 2021-10-30 21:49:52 +06:00
Alibek Omarov
efc156fcf5 engine: ref_api: purposefully moved WorldToScreen to 2D functions from TriAPI, since WorldToScreen is expected to be simpler in-engine version rather than TriAPI one 2021-10-30 21:49:27 +06:00
Alibek Omarov
207675990e public: build: fix missing define value 2021-10-28 20:11:31 +03:00
Alibek Omarov
e8cd6e9d65 engine: build: add RISC-V support(based on @archanox patches), add MIPS64 support 2021-10-27 20:59:02 +03:00
Alibek Omarov
ab256e294e public: build: add RISC-V support(based on @archanox patches), add forcing endianness from build system 2021-10-27 20:33:21 +03:00
Alibek Omarov
d9fd6aa05c engine: server: restore log functionality from old engine. Thanks to @ValeTheVioletMote for initial patch. 2021-10-27 19:40:05 +03:00
Vale the Violet Mote
57382c7cea readme: Linux Build Extended Clarity (#659) 2021-10-26 17:48:04 +03:00
Владислав Сухов
1042291ad6 client: Don't change loading bar color
Don't change loading bar color (fix yellow loading bar in Half-Rats Parasomnia, it should be white)
2021-10-25 00:48:36 +06:00
Владислав Сухов
c9e4912a2a client: backport con_fontnum from old engine 2021-10-12 13:43:23 +03:00
Alibek Omarov
e5e1570aed public: redeclare ParseFile flags to be exactly same as in exported API headers 2021-10-08 17:31:32 +03:00
Alibek Omarov
621399c49b engine: add safe ParseFile to client MobilityAPI 2021-10-08 17:31:32 +03:00
Alibek Omarov
c3684109bf mainui: update 2021-10-08 17:31:32 +03:00
Alibek Omarov
f3fedbfdba engine: add safe ParseFile to menu extended API 2021-10-08 17:31:32 +03:00
Alibek Omarov
29a8bfb1dc engine: common: fix ParseFile calls 2021-10-08 17:31:32 +03:00
Alibek Omarov
004e190435 engine: common: test ParseFile length return value 2021-10-08 17:31:32 +03:00
Alibek Omarov
378c4f30f3 public: ParseFile drops const qualifier, return -1 length on overflow
As we usually put allocated data to ParseFile, we don't need const qualifier
2021-10-08 17:31:32 +03:00
Alibek Omarov
a8c877c841 engine: server: fix ParseFile calls 2021-10-08 17:31:32 +03:00
Alibek Omarov
8ce448cc77 ref_gl: fix ParseFile calls 2021-10-08 17:31:32 +03:00
Alibek Omarov
4ba95277b9 engine: client: fix ParseFile calls 2021-10-08 17:31:32 +03:00
Alibek Omarov
cce7c7d782 public: declare unsafe ParseFile as ParseFileLegacy 2021-10-08 17:31:32 +03:00
Alibek Omarov
9e5d5e0ea3 public: moved COM_ParseFileSafe to libpublic, added optional argument for length and overflow checking 2021-10-08 17:31:32 +03:00
Alibek Omarov
a235bec5f1 engine: introduce COM_ParseFileSafe, add tests 2021-10-08 17:31:32 +03:00
Alibek Omarov
a3a8acfe6c engine: sound: add DSP coeffecients table from Half-Life Alpha, minor fixes to DSP code 2021-10-04 05:43:35 +03:00
Alibek Omarov
9e4e9cab04 engine: restore optional upscaling depending on SOUND_DMA_SPEED value :) 2021-10-04 05:43:35 +03:00
SNMetamorph
e4ad8def0d engine: filesystem: fixed current directory changing for Windows 2021-10-03 12:28:59 +03:00
SNMetamorph
ec95948b69 engine: server: implemented instant game library loading 2021-10-03 04:38:05 +03:00
Alibek Omarov
ef6ff3cfa6 mainui: update 2021-10-03 04:26:56 +03:00
Alibek Omarov
7bcfce5a7a ref_gl: use GCC provided offsetof implementation 2021-10-03 04:26:40 +03:00
Alibek Omarov
08c04200fb engine: use GCC provided offsetof implementation 2021-10-03 04:26:22 +03:00
Alibek Omarov
8bbd0d5119 ci: let's have a copy of original uploadtool instead of unsafe curl | sh 2021-10-03 03:53:06 +03:00
Alibek Omarov
ade0fd4afa ci: stop generating vc2008 project files
If somebody needs them, they can revert this comment and send a PR
Or better use official msvs.py tool
2021-10-02 04:05:52 +03:00
Alibek Omarov
ed7ed818bb Add .gitattributes to enforce Git write normal human file endings and show pretty diffs for C and Python 2021-10-02 03:47:32 +03:00
Alibek Omarov
91f845c335 engine: client: fix paused icon drawn when levelshots are disabled 2021-09-30 16:43:21 +03:00
Alibek Omarov
81ef12be9e Revert "ci: adding pvs-studio checking"
This reverts commit bd4979f5b0.
2021-09-30 16:38:32 +03:00
Alibek Omarov
2aafe9df9f Revert "ci: try to create license file by ourselves"
This reverts commit dd90262db2.
2021-09-30 16:38:29 +03:00
Alibek Omarov
3b933eabf5 engine: make test assert failure more pretty 2021-09-30 15:59:14 +03:00
Alibek Omarov
f5ccf093d6 scripts: waifulib: fix build with sanitizers on 2021-09-30 15:58:50 +03:00
Alibek Omarov
fe0da74e75 engine: fix build with tests on 2021-09-30 15:58:32 +03:00
Alibek Omarov
2939ab8ea4 wscript: allow compiling with disabled warning-as-error 2021-09-06 00:04:27 +03:00
Alibek Omarov
dd90262db2 ci: try to create license file by ourselves 2021-08-27 18:48:48 +03:00
Alibek Omarov
4f8e4b5f64 mainui: update 2021-08-27 18:23:38 +03:00
Alibek Omarov
32068d8090 client: fix wrong paused icon 2021-08-27 18:09:07 +03:00
Alibek Omarov
bd4979f5b0 ci: adding pvs-studio checking 2021-08-27 17:55:33 +03:00
Alibek Omarov
a5e1e9646c mainui: update 2021-08-27 17:47:37 +03:00
Alibek Omarov
013918a371 console: redefine con_color as cvar 2021-08-27 17:05:02 +03:00
Владислав Сухов
1b20694a1c ci: Fix missing extras in android builds 2021-08-06 13:06:44 +03:00
SNMetamorph
2db6ad2c8a ref_gl: fixed GL_CheckForErrors doesn't print error message 2021-08-01 22:28:24 +03:00
SNMetamorph
8c351d9255 engine: client: made pfnSPR_Load and pfnSPR_Frames functions as exported 2021-07-31 13:47:43 +03:00
SNMetamorph
c4ef42009c engine: client: fixed height argument writing in Con_DrawStringLen 2021-07-31 01:23:56 +03:00
SNMetamorph
8d5426cdcd utils: mdldec: fix of masked_solid texture flag 2021-07-29 13:17:38 +03:00
Alibek Omarov
7b8ec0ad4b engine: server: fix another const qualifier lose 2021-07-20 17:09:16 +03:00
Alibek Omarov
901e52615b engine: fix Com_ParseFile call 2021-07-20 16:26:17 +03:00
Alibek Omarov
88ce5fd0b6 engine: modify NetAPI to follow const qualifiers 2021-07-20 16:10:32 +03:00
Alibek Omarov
588dede2a2 ref_soft: fix pointer-to-int casts 2021-07-20 16:03:35 +03:00
Alibek Omarov
0efc5e82ec engine: fix some const qualifier lose and pointer-to-int casts 2021-07-20 16:03:06 +03:00
Alibek Omarov
c3da9d8c8f mainui: update 2021-07-20 16:02:09 +03:00
Alibek Omarov
a547526e86 engine: fix some signed char cases 2021-07-20 15:18:55 +03:00
SNMetamorph
09d647182d engine: net_encode: equality comparisions replaced with Q_equal macros 2021-07-09 14:57:49 +03:00
SNMetamorph
af3c0686c5 engine: mathlib: added Q_equal macros 2021-07-09 14:57:49 +03:00
SNMetamorph
8b76ab93fb engine: net_encode: made delta more GoldSrc consistant 2021-07-09 14:57:49 +03:00
Vladimir
9ffc02b6e9 ref_gl: gl_triapi: fixed culling enum in TriCullFace (#522) 2021-07-09 14:55:31 +03:00
Alibek Omarov
5d307d603c Remove clang-format 2021-07-09 14:40:24 +03:00
Alibek Omarov
affc64c6da gha: don't install unneeded multilib packages for amd64 2021-07-03 23:18:14 +03:00
Alibek Omarov
e00c20b288 readme: better wording 2021-07-03 22:54:31 +03:00
Alibek Omarov #SupportRMS
dcf7ec2c3d readme: migrate to GitHub Actions & Releases 2021-07-03 20:26:16 +03:00
Alibek Omarov #SupportRMS
21a31ec81d ci: migrate to GitHub Actions
* travis: disable build, disable deploy, add free aarch64/ppc64le/s390x builds

* scripts: cleanup of old CI scripts

* scripts: now port to GitHub Actions

* actions: fix extras checkout

* github: remove codeql action, turned out not to be very useful

* github: remove quiet flag on wget

* github: are we allowed to use envvars?

* github: add needed dependencies for linux

* github: install wget for windows

* scripts: convert our CPU architecture naming into what AppImage uses

* github: run scripts with bash explicitly

* github: first try to upload to GitHub Releases, enable amd64 win32 builds

* Use our uploadtool fork

* ci: include android, motomagx build for gha, refactor cirrus and travis ci scripts

* gha: try to fix build

* travis: try to fix build

* gha: try to fix upload, fix win32 build

* gha: use curl instead of wget, as it's preinstalled for windows. Fix Android build

* gha: add llvm repository, install clang-12 for android

* gha: motomagx: fail fast

* gha: android: explicitly set clang-12 as compiler and llvm-strip-12 as strip

* waifulib: xcompile: respect environment variables when using host compiler for Android

* waifulib: xcompile: use correct environ dict

* gha: try to fix -fuse-ld=lld with clang-12

* waifulib: xcompile: fix typo

* scripts: xcompile: fix motomagx build

* mainui: upgrade

* gha: fix android build, last time

* engine: wscript: disable crashhandler for magx
2021-07-03 20:21:09 +03:00
Alibek Omarov
9287a0f5c5 wscript: add some more warnings as errors 2021-07-02 19:27:45 +03:00
Alibek Omarov
4723eb2586 public: crtlib: fix error in COM_SlashPathFix 2021-07-02 19:27:04 +03:00
Alibek Omarov
15ec6539e3 engine: filesystem: fix custom loader enabled by mistype 2021-07-02 19:26:01 +03:00
Nord1cWarr1or
8d793521c4 engine: keys: fix misleading comment
Update keys.c (#514)
2021-06-28 20:10:41 +03:00
Alibek Omarov
2147542e33 engine: all user libraries packed inside archives are now deprecated 2021-06-27 00:20:23 +03:00
Alibek Omarov
a0af256641 engine: library: fix saves on 64-bit Windows, compile custom loader only on x86 2021-06-27 00:03:39 +03:00
Alibek Omarov
21174dc9cf engine: library: fix missing return 2021-06-27 00:02:41 +03:00
Alibek Omarov
894726d699 engine: disable custom DLL loader for everything except 32-bit x86 2021-06-27 00:02:16 +03:00
Alibek Omarov
f8e6033ae6 engine: move TIMER_LINUX to TIMER_POSIX, enabling dedicated builds for FreeBSD and other *nix platforms 2021-06-26 00:19:49 +03:00
a1batross
4abe1a77f4 engine: filesystem: fix missing newline in debug message 2021-06-22 11:31:53 +03:00
Alibek Omarov #SupportRMS
79f3a6f60e engine: sound: code style fix 2021-06-22 00:49:22 +03:00
SNMetamorph
a2c83144c0 engine: sound: warn about late precached sounds in developer mode 2021-06-22 00:48:02 +03:00
Alibek Omarov
6e0d372504 engine: fix FunctionFromName on MSVC, fix memory leak 2021-06-21 10:20:29 +03:00
Alibek Omarov
91ee9bd32a engine: merge tests for imagelib 2021-06-20 20:26:22 +03:00
Alibek Omarov
6ea25b8194 engine: add simple unit-testing (v3?) 2021-06-20 19:59:16 +03:00
Alibek Omarov
5bc4359a2f engine: implement platform neutral saves, now we can load saves made in Linux on Windows and vice-versa 2021-06-20 19:59:16 +03:00
Alibek Omarov
17d3eaa590 engine: win32: remove normal win32 library loader, from now on every win32 port must port custom loader 2021-06-20 19:59:16 +03:00
SNMetamorph
6ceb101ba1 engine: client: correctly named values in net_speeds stats 2021-06-18 08:58:46 +03:00
SNMetamorph
f7f069a38b engine: client: added Host_Error for CL_EDICT_NUM (hotfix for issue #434) 2021-06-18 08:58:46 +03:00
Alibek Omarov
37c5dfa49f engine: generalize maps command and map command autocompletion 2021-06-18 00:05:34 +03:00
tyabus
0260a6c234 engine: server: backport maps command implementation from old engine 2021-06-18 00:05:34 +03:00
lilmayofuksu
2ad209b973 engine: server: updated TSource query to be more compatible with GoldSrc standard (#497)
Mark TSource queries as connectionless.
Only send Windows as the os if the engine was built on it.
2021-06-16 13:09:31 +03:00
Alibek Omarov #SupportRMS
e9712fc24f Documentation: rework ports.md
Add new Switch and Wii ports
Add DOS port
Mark everything merged to main tree as supported, otherwise leave as in progress
2021-06-15 19:00:12 +03:00
Alibek Omarov
eef52ea2d0 mainui: update 2021-06-14 21:15:34 +03:00
Alibek Omarov
8018f4a000 waf: update 2021-06-14 21:14:22 +03:00
Alibek Omarov
9d0c7338ab wscript: make win32 common libraries check faster 2021-06-14 01:13:28 +03:00
Barış
18d8ef287d engine: fix client can use kill command while not connected (#492) 2021-06-12 18:19:23 +03:00
Alibek Omarov
9b1fccd1fa engine: move Cbuf_Execute to ClientBegin stub for dedicated server, to avoid confusion 2021-06-08 01:08:06 +03:00
Alibek Omarov
32e96bdad1 engine: support legacy net protocol in demos 2021-06-08 01:04:18 +03:00
Alibek Omarov
c50f73b892 engine: fix brush model sound spatialization 2021-06-07 22:54:41 +03:00
exstrim401
a1c948e591 game_launch: add const to game var 2021-06-07 19:39:52 +03:00
exstrim401
db3e71bfcc engine: Removed unused Haiku variables 2021-06-07 19:39:52 +03:00
exstrim401
2b436dced0 engine: Remove XASH3D_MIRRORDIR
also make XASH3D_GAME for all platforms
2021-06-07 19:39:52 +03:00
exstrim401
a89f9fa181 engine: Haiku BeGameLauncher support 2021-06-07 19:39:52 +03:00
Alibek Omarov
6063149b93 engine: match DT_TIMEWINDOW_* behaviour to GoldSrc: it's always signed and it's more of an integer than float value 2021-06-07 17:31:54 +03:00
Alibek Omarov
a28d15e519 engine: match DT_TIMEWINDOW_* behaviour to GoldSrc: it's always signed and it's more of an integer than float value 2021-06-07 17:30:40 +03:00
Alibek Omarov
94959110f6 engine: fix typo, #488 2021-06-07 15:53:20 +03:00
Alibek Omarov
86be161677 ref_gl: add missing HACKS_RELATED_HLMODS define, lost after renderer split 2021-06-07 02:40:40 +03:00
Alibek Omarov
9313f7e80e engine: replace pool pointer by pool handle 2021-06-07 02:33:15 +03:00
Alibek Omarov
43f1137565 engine: use substring search for mpfilter 2021-06-07 02:23:44 +03:00
Alibek Omarov
ad4062969b engine: client: fix warnings in cl_pmove 2021-06-07 02:22:08 +03:00
Alibek Omarov
60c10333aa engine: client: fix sound not spatialized correctly, remove unused field from rawchan 2021-06-07 02:21:46 +03:00
Alibek Omarov
0f84ce40f0 engine: client: fix cl_smoothtime, don't smooth movements when running local server(singleplayer, listenserve, etc) 2021-06-06 16:22:04 +03:00
Alibek Omarov
3894edcb98 engine: client: enhance cl_showevents for reverse-engineering needs 2021-06-06 16:22:04 +03:00
Alibek Omarov
5b387ba36a engine: client: move Cbuf_Execute out of Host_InputFrame, cbuf will be executed always at ClientBegin. Fixes #482 2021-06-06 16:22:04 +03:00
Velaron
d011dccaab engine: client: remove redundant index check 2021-06-06 15:51:41 +03:00
exstrim401
b7922368bd engine: Haiku OS support (#478) 2021-06-05 10:54:37 +03:00
Alibek Omarov
947a615707 ref_gl: gl4es: update 2021-06-03 21:44:55 +03:00
Alibek Omarov
b2d93b7b55 mainui: update 2021-06-03 21:44:45 +03:00
Alibek Omarov
49a20a9ac5 engine: server: fix memleak after previous commit 2021-06-02 22:06:17 +03:00
Alibek Omarov
8966172ce0 engine: server: avoid crash if map entity doesn't have classname (tfc map flagwar for example) 2021-06-01 23:45:55 +03:00
Alibek Omarov
ddd48c420b engine: decrease instanced baseline index by minus one to avoid zero offset which interpreted as no baseline at all 2021-06-01 21:52:33 +03:00
Alibek Omarov
f31e9ae19e engine: server: fix bounds check in SV_GetFragmentSize 2021-06-01 18:35:38 +03:00
Alibek Omarov
4543008012 engine: server: declare sv_client_t::flags as unsigned 2021-06-01 17:58:33 +03:00
Alibek Omarov
d54a648792 engine: common: avoid sign bit loss in MSG_WriteBitLong 2021-06-01 17:57:54 +03:00
Alibek Omarov
13a3f22001 engine: client: netgraph: add in_graph kbutton support, staticify netgraph 2021-06-01 17:57:03 +03:00
SNMetamorph
75e80bc2ff engine: server: fixed cvars sv_max/minupdaterate, sv_max/minrate 2021-05-30 09:40:03 +03:00
SNMetamorph
386ae2067b engine: client: another interpolation fix 2021-05-30 09:40:03 +03:00
SNMetamorph
b289de26a6 engine: client: added cvar cl_nointerp for disabling interpolation 2021-05-30 09:40:03 +03:00
SNMetamorph
415f5baa1c engine: client: CL_LerpPoint hotfix 2021-05-30 09:40:03 +03:00
Bohdan Shulyar
3fdfbff09b readme: update discord invite (#458)
* readme: update discord invite

* readme: update discord invite
2021-05-29 21:32:20 +03:00
Alibek Omarov #SupportRMS
163225e180 travis: android: switch to mobile_hacks hlsdk 2021-05-26 18:18:22 +03:00
Andrey Akhmichin
1369c2029b Documentation: opensource-mods.md: add "Expanded Arsenal" and "ESHQ". 2021-05-18 23:25:08 +03:00
Velaron
4f31d7504a ref_api: fix remap info allocation (fixes #200) 2021-05-02 20:02:04 +03:00
Alibek Omarov
585955eb19 engine: filesystem: add an error message if we're trying to get a handle of a compressed file in ZIP archive 2021-05-02 01:20:18 +03:00
SNMetamorph
1a5b2576f7 wscript: added support for "Edit and Continue" MSVC feature 2021-04-30 16:12:08 +03:00
Bohdan Shulyar
ddc4d76668 engine: common: add quote symbol escaping support (#411) 2021-04-04 22:03:02 +03:00
Alibek Omarov
f5e400de69 server: fix wrong xashid key on server, it's uuid now 2021-03-28 01:57:40 +03:00
Alibek Omarov
9c8059ea96 engine: imagelib: add BGRA saving for PNG
Fix incorrect output, when input format has alpha but flags don't
have set IMAGE_HAS_ALPHA.
Flags are meant to control output format, but input format may be arbitrary,
as usually given by video driver(screenshots, etc)
2021-03-28 00:34:42 +03:00
Alibek Omarov
c62db950f1 server: implement rcon redirection, add redirect command from old engine 2021-03-27 23:46:57 +03:00
Alibek Omarov
9c9953bb60 server: fix some cvars being registered incorrectly or not registered at all 2021-03-27 23:23:37 +03:00
Alibek Omarov
acaf15c5d2 engine: increase MAX_LEGACY_SERVERS limit 2021-03-27 23:22:51 +03:00
Alibek Omarov #SupportRMS
25569db053 readme: clarify issue languages 2021-03-26 20:49:39 +03:00
Alibek Omarov #SupportRMS
a391038d27 travis: rename win32 build to xash3d-win32-vc.7z 2021-03-26 17:58:35 +03:00
Alibek Omarov #SupportRMS
9ea45a71f5 scripts: rename win32 build to xash3d-win32-vc.7z 2021-03-26 17:57:51 +03:00
nekonomicon
ea39836b88 Documentation: opensource-mods.md: add "Year of the Dragon" and "Overturn". (#375) 2021-03-26 02:16:26 +03:00
nekonomicon
bfa01f5b3b Documentation: opensource-mods.md: update. (#372) 2021-03-25 10:49:03 +03:00
Alibek Omarov
23974d24c3 engine: try to avoid broken -Werror=duplicated-branches for old GCCs 2 2021-03-24 19:11:17 +03:00
Alibek Omarov
868947cbb4 engine: try to avoid broken -Werror=duplicated-branches for old GCCs 2021-03-23 23:49:08 +03:00
a1batross
cb942d7e81 mainui: update 2021-03-15 14:05:52 +03:00
Vladimir
05cf8d0edc readme: improved installation instructions (#363) 2021-03-15 12:23:25 +03:00
Alibek Omarov
071f15b570 mainui: update 2021-03-15 03:44:44 +03:00
Alibek Omarov
e5a40fd745 server: fix password presence wasn't advertised to clients on info message #359 2021-03-15 03:40:46 +03:00
Alibek Omarov
f2ab4c0d0e engine: cfgscript: don't let scr vars overwrite existing variables
we don't use them for storing settings anyway
only for reference in UI
2021-03-15 03:39:20 +03:00
Alibek Omarov
0ba1a8e7bc engine: cfgscript: reduce copypasted code 2021-03-15 03:38:10 +03:00
Alibek Omarov
ed0ca2b2d2 engine: fix predicting oldbuttons 2021-03-12 00:10:51 +03:00
Alibek Omarov
26404315cb engine: filesystem: avoid unnecessary padding in private structs 2021-03-11 21:46:00 +03:00
Alibek Omarov
be1958473b engine: filesystem: fix liblistgam converting to gameinfo when rodir was enabled 2021-03-11 21:42:35 +03:00
Alibek Omarov
8b59875e93 mainui: update 2021-03-11 20:23:03 +03:00
Alibek Omarov
accacd54f5 waifulib: set debug builds to be built with -O0, gcc -Od is broken 2021-03-11 20:17:39 +03:00
Alibek Omarov
331a2046c8 engine: net: fix delta incorrect casts when field is signed 2021-03-10 21:51:21 +03:00
Alibek Omarov
c9f176f802 common: remove double defines 2021-03-10 21:49:09 +03:00
Alibek Omarov
523798857b engine: platform: fix opensles audio 2021-03-10 13:45:02 +03:00
Alibek Omarov
2edc8b16ae engine: platform: fix sdl audio 2021-03-10 13:44:25 +03:00
Alibek Omarov
29902f48d5 public: oops, fix broken crtlib 2021-03-10 13:38:36 +03:00
Alibek Omarov
d25a661701 public: moar int to size_t for string length 2021-03-10 13:18:23 +03:00
Alibek Omarov
a93d9ac71c engine: platform: simplify sound code
Remove SNDDMA_GetSoundtime, because it was mostly copypasted from one
platform code to another.
SNDDMA_GetDMAPos gets removed too, as we have dma.samplepos for that.
2021-03-10 00:16:13 +03:00
Alibek Omarov
c68af64fe5 engine: platform: fix access to uninitialized audio subsystem when -nosound was passed 2021-03-10 00:03:12 +03:00
Alibek Omarov
3d9a4560d5 client: make sound cvars statically allocated, to avoid access to invalid pointers in the future 2021-03-09 23:59:29 +03:00
Alibek Omarov
9120d40ce5 engine: redefine CVAR_DEFINE_AUTO through CVAR_DEFINE macro 2021-03-09 23:58:21 +03:00
Alibek Omarov
4db2aaffc4 client: port fix of spk/speak commands from old engine 2021-03-09 23:34:12 +03:00
Alibek Omarov
155eb1ba58 engine: fix various warnings 2021-03-07 03:40:01 +03:00
Alibek Omarov
efaf7ac622 engine: fix UB on MSG_BigShort 2021-03-07 03:39:16 +03:00
Alibek Omarov
6cc2205321 public: strlen must return size_t, not int 2021-03-07 03:38:54 +03:00
Alibek Omarov
0a818f3f3f client: add waveplaylen console command like in GoldSrc 2021-03-07 02:51:03 +03:00
Alibek Omarov
fe2c4af8c2 engine: soundlib: make Sound_GetApproxWavePlayLen behave like in GoldSrc 2021-03-07 02:49:40 +03:00
Alibek Omarov
3e7dd30fd7 engine: soundlib: use stdint definitions for WAV headers 2021-03-07 02:48:56 +03:00
Alibek Omarov
42f47f51b5 server: implement GetFileSize and GetApproxWavePlayLen from HLSDK 2.4 2021-03-07 02:46:38 +03:00
Alibek Omarov
aea9e8efa2 server: sv_validate_changelevel is deprecated now and disabled by default
If anyone wants this feature back, use +sv_validate_changelevel 1 in command line.
2021-03-07 02:20:30 +03:00
Alibek Omarov
a6cd67cc65 mainui: update submodule, fix #332 2021-03-07 02:01:36 +03:00
Alibek Omarov
585ae28dd2 server: fix some int <> unsigned int conversions 2021-03-07 02:00:46 +03:00
Alibek Omarov
4abac92891 wscript: try to fix tgmath detection on freebsd 2021-03-07 00:28:57 +03:00
Alibek Omarov
a813be7d54 client: add cl_showpos 2021-03-07 00:03:19 +03:00
Alibek Omarov
e77957bc81 client: decrease visibility of some cvars 2021-03-06 23:40:04 +03:00
Alibek Omarov
9b6f26c191 mdldec: build with CONSOLE subsystem on Win32 2021-03-05 17:59:54 +03:00
Alibek Omarov
385cc3f497 public: remote obsolete header 2021-03-05 16:09:59 +03:00
Alibek Omarov
c0db39594b scripts: enable building utils for PC platforms 2021-03-05 16:04:20 +03:00
Alibek Omarov
add4cf4232 mdldec: add wscript, disabled by default 2021-03-05 16:00:26 +03:00
Alibek Omarov
586d613a27 ref_soft: uncomment texture API functions implementations, they must be working now
Fixes #326 and probably some ref_soft crashes
2021-03-02 17:49:37 +03:00
Alibek Omarov
45334064b6 ref_gl: remove detail textures list generation leftovers 2021-03-01 21:53:43 +03:00
Alibek Omarov
ca84a1a10e engine: fix building with SDL older than 2.0.4 2021-03-01 21:48:31 +03:00
Alibek Omarov
14008703f6 wscript: fix tgmath check for old toolchails like GCW0 2021-03-01 21:46:58 +03:00
Alibek Omarov
58edfbc485 engine: move cvars that expected to exist by client.dll from render dll to engine
Fixes #316
2021-03-01 20:03:32 +03:00
Alibek Omarov
fa555c1f09 server: add hardcoded list of chapters for HL, BS and OF, same as GoldSrc
Fix incomplete comment in save file when server DLL provides SV_SaveGameComment.
Fix possible buffer overflow when reading comment from save file.
2021-03-01 19:53:17 +03:00
Andrey Akhmichin
75210b1ff6 engine: common: filesystem.c: add binary search for files from zip-archives. 2021-03-01 19:53:07 +03:00
Alibek Omarov
b278751834 waf: upgrade to waifu 1.1.0 2021-02-28 15:39:22 +03:00
a1batross
3b192ca490 engine: sdl: don't free NULL vidmodes 2021-02-27 00:08:42 +03:00
Alibek Omarov
12dd225db2 cirrus: fix freebsd 12 image 2021-02-26 18:33:26 +03:00
SNMetamorph
56d5f08128 platform: win32: fixed crashes in COM_CheckLibraryDirectDependency 2021-02-26 16:05:34 +03:00
Alibek Omarov
256284d76f wscript: refactor loading MSVC tools, apply @w23 hack for renaming DEST_CPU 2021-02-26 16:04:45 +03:00
Alibek Omarov
cf5ebd128c client: fix XASH_64BIT check 2021-02-26 16:04:45 +03:00
Ivan 'provod' Avdeev
5b597028fe make it reliably compile for amd64 on windows
This makes it possible to just pass `-8` to ./waf configure on Windows
and it will build 64-bit binaries. Yay I guess.

However, it's completely broken conceptually -- it ends up just brute
rewriting `conf.env.DEST_CPU` from `amd64` to `x86_64` at one particular
point in wscript. Why? Because many places in build system expect
`x86_64` as 64-bit DEST_CPU, especially breaking SDL2 lib detection.
Some of these are in waifu and patching that is beyond what I can hold
in my head right now.
Why that particular point? Because it DEST_CPU gets rewritten a few
times before that and no times after it seems.

This does not address `./waf msvs` VS project generation yet -- it will
still produce only Win32 platform that needs to be manually rewritten.

There's a mechanism for msvs extras to be passed a set of platforms, but
I've yet to make it work.
2021-02-26 16:04:45 +03:00
Ivan Avdeev
012d1fa8bd fix USE_MMAP usage
should fix CI failures
2021-02-26 16:04:45 +03:00
Ivan Avdeev
1b426b67e7 partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did
here makes sense or not.
But it compiles and runs (provided with hlsdk-xash3d amd64 build, which
is another story).

This omits necessary waf changes that are necessary to make a valid
64-bit build. Apparently it's not enough to just pass `-8` on Windows,
you also need to hack wscript to add `x64` target to MSVC. I'll do that
later when I figure out how.

This change is a precursor for RTX Vulkan effort --
VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit
nvidia drivers (no idea about AMD, pls send GPUs onegai).
2021-02-26 16:04:45 +03:00
SNMetamorph
8d50049db7 netgraph: fixed data usage graphs rendering 2021-02-20 14:22:20 +03:00
SNMetamorph
cba9fb1a07 vid_common: added vid_mode cvar for proper working VideoModes menu in game settings 2021-02-20 14:22:20 +03:00
SNMetamorph
932fc8e3c7 wscript: fixed MSVC optimization flag in debug mode 2021-02-20 14:22:20 +03:00
mittorn
5884cf88d3 crtlib: fix undefined behaviour when stripping extenstion from empty string 2021-02-14 21:33:41 +00:00
Skyrim-police
d2157fa28c Documentation: supported-mod-list: fix dead links 2021-02-12 04:21:57 +03:00
mittorn
6e43f9bdd0 waf: fix wrong message about 32-bit build 2021-02-12 00:05:41 +03:00
Gleb Mazovetskiy
d9ed654f04 bump gl4es
Build fix: d79ac6a6d7

A few rendering fixes:

* 1f52c84f5a
* d8a2dc35ee
2021-02-03 16:16:51 +03:00
Alibek Omarov
8090db2e75 netgraph: change netgraph buffer size for low memory mode 2021-02-01 10:06:55 +03:00
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
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
lewa_j
df7f8259a1 mainui: update 2020-08-24 20:27:08 +03:00
Alexey
fff71e449e Fix android travis build again 2020-08-24 19:08:38 +03:00
Alibek Omarov
d4003f9527 crashhandler: fix build 2020-08-23 20:33:17 +03:00
Alibek Omarov
9acd2f5d22 waf: upgrade waf 2020-08-23 19:02:15 +03:00
Alibek Omarov
d30605c09f engine: fixes for dedicated 2020-08-23 19:02:15 +03:00
Alibek Omarov
9ff6d44178 crashhandler: remove unknown arch error 2020-08-23 19:02:15 +03:00
Alibek Omarov
90b163dc1d waf: add more ignored files 2020-08-23 19:02:15 +03:00
Alibek Omarov
2d97126baf defaults: if no crashhandler was defined, fallback to null 2020-08-23 19:02:15 +03:00
Alibek Omarov
3f3160e220 readme: remove archlinux package, it's outdated and there is no one to update it 2020-08-14 15:58:23 +03:00
Andrey Akhmichin
065811cc46 engine: common: filesystem.c: do not load zip-archives with zip extension as bullet proof. 2020-07-27 18:59:50 +03:00
Andrey Akhmichin
e69956c9ea engine: common: imagelib: img_png.c: set IMAGE_HAS_ALPHA flag only for RGBA images. 2020-07-22 14:37:40 +03:00
mittorn
e96271a8a9 platform/android: make host.state actual in Android_UpdateSurface call 2020-07-12 05:16:08 +07:00
mittorn
f0c9aa1585 vid_android: workaround small output buffer 2020-07-10 09:51:00 +07:00
mittorn
ce269f8c6d ref_soft/glblit: fix wrong MapBuffer function in GLES3 2020-07-10 09:49:13 +07:00
mittorn
4515d3e3cb platform/android: implement native software blitter, fix lost context on resize, fix safegl 2020-07-08 08:48:46 +07:00
mittorn
c80da05e94 ref_gl: make renderer fallback possible 2020-07-08 08:46:07 +07:00
mittorn
bef873e1f8 platform/android: enable dynamic dladdr, fix build 2020-07-08 08:45:24 +07:00
mittorn
a5e3a74e93 waf/xcompile: gnu hash on android confuses old linkers 2020-07-08 02:40:43 +07:00
mittorn
d9290f2e03 gles1 and non-pbo fallbacks 2020-07-07 00:23:23 +07:00
mittorn
98ffbaf87a android: fix fallbacks 2020-07-07 00:22:01 +07:00
Alibek Omarov
1e1c0a9aa3 readme: fix #187 2020-06-23 16:21:43 +03:00
Alibek Omarov
9979d4feb7 readme: add a note about github's generated zip archives 2020-05-25 22:35:34 +03:00
Marc-Antoine Lortie
5f2d346b9b Fixed mod title in Open Source mods documentation.
In section 'Derived Work' under 'Half-Life: Induction', both links appear to link to projects related to 'Half-Life: Invasion'. The mod title was probably meant to be 'Half-Life: Invasion'.
2020-05-25 16:59:34 +03:00
Alibek Omarov
64a96b26ad wscript: disable treating uninitialized as error because it gives too much false-positives 2020-05-13 00:24:50 +03:00
Alibek Omarov
0db1a7743d engine: try to fix -Wmaybe-uninitialized that may be enabled with -Wuninitialized. Diagnostic is prone to false-positives, as compiler don't have enough data for this 2020-05-12 02:00:34 +03:00
Alibek Omarov
a641488b98 engine: imagelib: img_bmp: add paranoid checks for estimated file size to not exceed real buffer. Needs proper testing. 2020-05-11 03:02:13 +03:00
Alibek Omarov
371cfc1cce mainui: update 2020-05-11 02:28:18 +03:00
Alibek Omarov
46b0590e4e engine: imagelib: refactor to use stdint.h definitions, use spaces for alignment instead of tabs 2020-05-11 02:28:04 +03:00
Andrey Akhmichin
95393cde72 Documentation: add list of opensource mods 2020-05-08 16:00:50 +03:00
Alibek Omarov
ea6846e2f9 ci: run pkg update for freebsd 2020-05-03 15:17:53 +03:00
Alibek Omarov
9b22149509 engine: host: execute server.cfg right before main loop starts 2020-05-02 19:26:41 +03:00
Alibek Omarov
ce1fc386a2 engine: server: reformat SV_Init 2020-05-02 19:14:23 +03:00
Alibek Omarov
77bebe3000 engine: server: remove FCVAR_SERVER from gamedir cvar, set FCVAR_READ_ONLY instead. Seems it was used when Xash had hot change game, i.e. without restarting engine. 2020-05-02 19:08:43 +03:00
Alibek Omarov
9292d81052 ref_soft: remove leftover debug volatile 2020-05-02 19:07:56 +03:00
FOTMarut
e1985eeb4f ref_soft: de-duplicated symbols
- Compiles correctly with GCC 10 now
2020-05-02 18:57:37 +03:00
FOTMarut
53768c84d6 ref_gl: de-duplicate GL function definitions
- Used APIENTRY_LINKAGE in ref_gl to remove duplicate definitions of GL
  functions among translation units
- Fixes building ref_gl with -fno-common (GCC 10)
2020-05-02 18:57:37 +03:00
FOTMarut
3c2840f7d1 ref_gl: Added APIENTRY_LINKAGE macro
- Added APIENTRY_LINKAGE macro to specify linkage of GL functions inside
  ref_gl/gl_export.h
  Currently defaults to empty (-> auto)
2020-05-02 18:57:37 +03:00
Alibek Omarov
32f6f359a4 ref_soft: comment out useless line 2020-05-02 18:02:32 +03:00
Alibek Omarov
0428de6285 ref_soft: check if offsetof was defined before 2020-05-02 18:02:05 +03:00
Alibek Omarov
92f0bf54f1 wscript: enforce error on uninitialized variables 2020-05-02 18:01:44 +03:00
Alibek Omarov
8fcfde1e42 ref_soft: comment out useless code to make compiler happy about uninitialized variables 2020-05-02 18:01:30 +03:00
Alibek Omarov
e0dfc4c0b4 launcher: oops, enable NOCONHOST only for Win32 2020-04-30 20:48:33 +03:00
Alibek Omarov
80a806aaad engine: wscript: remove non-actual comment line about include dirs order 2020-04-25 21:28:20 +03:00
Alibek Omarov
762d57fd88 waf: upgrade to latest waifu version 2020-04-25 21:28:20 +03:00
Alibek Omarov
732cb925e5 launcher: use engine definitions, enable cocon_win by default, fix Com_LoadLibrary to COM_LoadLibrary, fix memory leak, fix incorrect argv 2020-04-25 21:28:19 +03:00
Alibek Omarov
f59a3ca417 defaults: use appropriate Win32 check macro 2020-04-25 21:28:19 +03:00
lewa_j
deb7591d1e Fix SaveBMP 2020-04-25 21:19:58 +03:00
Alibek Omarov
82c54b1b54 engine: disallow zero-width strings for getenv() 2020-04-19 13:02:51 +03:00
Alibek Omarov
8d942bcc86 xash3d_types: start refactoring engine to use stdint.h types 2020-04-19 13:02:51 +03:00
Alibek Omarov
c39d42cc62 avi: replace longs by ints 2020-04-19 13:02:51 +03:00
Aimless Wanderer
51a45d745e engine: userconfig.d support from old engine 2020-04-14 20:08:08 +03:00
Alibek Omarov
544fc63b6b ref_gl: nanogl: update 2020-03-30 00:48:31 +03:00
Alibek Omarov
e06518c594 engine: studio: fix signed left shift to unsigned left shift 2020-03-30 00:48:17 +03:00
Alibek Omarov
012a193685 wscript: check for stdint.h and use it, instead use pstdint.h 2020-03-30 00:46:58 +03:00
Alibek Omarov
dc2ab714f6 mpg123: backport some UB fixes from upstream 2020-03-30 00:46:39 +03:00
Alibek Omarov
4c6fd79f07 tgmath: remove including tgmath.h in everything that uses xash3d_mathlib, as it's included already 2020-03-30 00:42:10 +03:00
Alibek Omarov
293b42b9d4 public: add stdint.h implementation by Paul Hsich http://www.azillionmonkeys.com/qed/pstdint.h 2020-03-30 00:13:20 +03:00
Alibek Omarov
88ab42cc15 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs 2020-03-29 17:46:12 +03:00
Alibek Omarov
7429a6bc8a Add 'ref_soft/' from commit '9045657352c7dfd3622cdf2b69462ca33f4262ee'
git-subtree-dir: ref_soft
git-subtree-mainline: 89ca0dec5e
git-subtree-split: 9045657352
2020-03-29 17:45:00 +03:00
Alibek Omarov
89ca0dec5e platform: android: slightly more verbosity 2020-03-29 17:44:23 +03:00
Alibek Omarov
9045657352 ref_soft: sprite: fix to compile(copypasted from ref_gl) 2020-03-29 17:02:24 +03:00
Alibek Omarov
3984a58025 ref_soft: upgrade to latest RefAPI and libpublic 2020-03-29 17:01:45 +03:00
Alibek Omarov
237d6f8689 ref_soft: upgrade to latest RefAPI version 2020-03-29 16:58:27 +03:00
FOTMarut
79a7b7b1a3 engine: platform: sdl: Fix mousewheel in SDL2
- See issue 143
- Tested on SDL2
- Untested on SDL1.2
2020-03-29 11:27:08 +03:00
Alibek Omarov
b81345f063 ref_soft: add some cvars to GLCONFIG, so they would be saved into ref_soft.cfg and fix UB in cast 2020-03-28 21:56:08 +03:00
Andrey Akhmichin
87340ceca8 engine: server: fix godmode behavior. 2020-03-12 05:48:51 +06:00
Andrey Akhmichin
7a58813254 utils: add studio model decompiler. 2020-03-04 09:23:12 +03:00
Alibek Omarov
3d9c482eae host: add -help, fix #136 2020-03-04 08:55:22 +03:00
Alibek Omarov
5d97a293fe menu_int: add DoubleTime extension 2020-03-04 07:23:38 +03:00
Alibek Omarov
3c8ce640c4 Merge neko/mathlib into master 2020-03-04 05:38:30 +03:00
Alibek Omarov
efafd7c01c mainui: update 2020-03-04 05:26:29 +03:00
Alibek Omarov
fb165dfec1 Merge pull request #137 from nekonomicon/imagelib
engine: common: imagelib: split imagelib.h.
2020-03-03 07:12:30 +03:00
Andrey Akhmichin
248c8a745c engine: common: imagelib: split imagelib.h. 2020-03-03 05:03:15 +05:00
Alibek Omarov
7c47bfd0db Merge pull request #122 from nekonomicon/palette
engine: common: imagelib: use rgba_t as RGBA palette type.
2020-03-02 21:44:32 +03:00
Andrey Akhmichin
e96ea719d5 engine: common: imagelib: use rgba_t as RGBA palette type. 2020-03-02 15:07:54 +05:00
Alibek Omarov
17cf4bf402 scripts: travis: we're NOT moved to GitHub Releases 2020-02-28 09:13:33 +03:00
mittorn
04c17995a2 Merge pull request #132 from Velaron/xshlib-fix
scripts/xshlib: line endings fix
2020-02-25 19:44:25 +07:00
mittorn
4994a7ef6f ref_gl: fix build 2020-02-25 19:08:17 +07:00
Aimless Wanderer
e3d9ac4840 scripts/xshlib: line endings fix 2020-02-25 13:35:55 +02:00
mittorn
0c69f7649c ref_gl: add gl4es support 2020-02-25 12:59:04 +07:00
mittorn
84a3f6883d sdl: add EGL hint 2020-02-25 12:59:04 +07:00
mittorn
8f8c8e6614 ref: add export that returns GL_GetProcAddress for renderapi 2020-02-25 12:59:04 +07:00
mittorn
1b4f997951 renderapi: add glcore context and gl4es wrapper 2020-02-25 12:59:04 +07:00
Alibek Omarov
6e6185dba2 readme: wording 2020-02-25 01:43:45 +03:00
Alibek Omarov
1f134fdb72 readme: links to downloads to badges, fix testing build link 2020-02-25 01:37:54 +03:00
Alibek Omarov
64b001a505 Update README.md 2020-02-25 01:34:47 +03:00
Alibek Omarov
5f4d81866f cirrus: update freebsd images 2020-02-25 01:30:29 +03:00
Alibek Omarov
19303f7bd7 game_launch: fix Win32 main 2020-02-24 16:48:30 +03:00
mittorn
a967caa91f Merge pull request #125 from nekonomicon/crtlib
public: crtlib.c: reduce memory usage.
2020-02-18 03:52:36 +07:00
mittorn
3ce16227ba Merge pull request #123 from nekonomicon/tga
engine: common: imagelib: img_tga.c: check pixel type before buffer allocation.
2020-02-18 03:52:09 +07:00
mittorn
3e7351cb33 Merge pull request #127 from nillerusr/custom
imagelib: fix unaligned access
2020-02-18 03:51:13 +07:00
nillerusr
4021d7bf5c imagelib: fix unaligned access 2020-02-17 23:25:39 +03:00
mittorn
68472f90eb filesystem: disable XASH_REDUCE_FD where it not needed, fix null pointer deference 2020-02-14 21:48:26 +07:00
mittorn
7ad658ee3a wscript: increase stack size for owcc 2020-02-12 17:41:24 +07:00
mittorn
0ee5ff3aad waifulib/owcc: add -xx to ignore default includes 2020-02-12 17:39:42 +07:00
Andrey Akhmichin
9a0da3cd4f public: crtlib.c: reduce memory usage. 2020-02-12 14:40:19 +05:00
Andrey Akhmichin
e3b547c8a9 public: rename mathlib to xash3d_mathlib. 2020-02-12 14:32:26 +05:00
mittorn
e602ca1d66 public: synchronize build.h with hlsdk 2020-02-12 15:10:10 +07:00
Andrey Akhmichin
01e2ea24da engine: common: imagelib: img_png.c: add a missing return statement. 2020-02-11 17:06:41 +03:00
Andrey Akhmichin
f5783ae1df engine: common: imagelib: img_tga.c: check pixel type before buffer allocation. 2020-02-11 15:39:05 +05:00
mittorn
49445f0663 wscript: check for fPIC before removing 2020-02-09 01:00:45 +07:00
mittorn
27da2e10ff filesystem: fix const cast 2020-02-09 00:29:56 +07:00
mittorn
7d0e45b507 network: restore WSAsize_t define for win32 2020-02-08 23:59:43 +07:00
mittorn
9b40d91a9b wscript: do not enforce PIC with lib_static 2020-02-08 23:55:56 +07:00
mittorn
02c68c3a70 platform/sdl: add missing Platform_Shutdown 2020-02-08 23:48:52 +07:00
mittorn
a0d09c9954 lib_static: fix warnings 2020-02-08 23:39:35 +07:00
mittorn
c7e3eae9dd filesystem: fix wrong types 2020-02-08 23:38:45 +07:00
mittorn
70cc52e203 posix/sdl: fix build 2020-02-08 23:38:19 +07:00
mittorn
51849c6140 platform: DOS4GW port 2020-02-08 23:15:40 +07:00
mittorn
fe07c48431 port.h: split common and posix defines 2020-02-08 23:15:40 +07:00
mittorn
d8f20f3642 common: add DOS4GW platform 2020-02-08 23:15:40 +07:00
mittorn
828def3b25 waifulib: owcc tool 2020-02-08 23:15:40 +07:00
mittorn
97228a4249 lib_static: use functions for exports instead of globals 2020-02-08 23:15:40 +07:00
mittorn
3e3aff040e platform: add Platfrom_Init, Platform_Shutdown, Platform_MouseMove move platform-specific code from host.c 2020-02-08 23:15:40 +07:00
mittorn
adc718f4d5 public: add XASH_POSIX platform define 2020-02-08 23:15:40 +07:00
mittorn
22c148a39e filesystem: refactor zip/pak loading, partially fix reading files from zip, add option to reduce FD usage, remove dup() dependency 2020-02-08 23:15:40 +07:00
mittorn
70cddcb9ca client: fix assert when sprite exist, but not loadable 2020-02-08 23:15:40 +07:00
mittorn
2b90790071 network: add stub for systems without BSD sockets, WATTCP support 2020-02-08 23:15:40 +07:00
mittorn
070272489d library: fix saverestore offsets code from old engine 2020-02-08 23:15:40 +07:00
mittorn
538d8a6fb4 network: fix NET_MAX_FRAGMENT limit 2020-02-08 23:15:40 +07:00
mittorn
c8be38e75d mathlib: use tgmath in SinCos 2020-02-08 23:15:40 +07:00
mittorn
303a88730c server: fix crash when sorting entities on watcom libc 2020-02-08 23:15:40 +07:00
mittorn
26a1ba543f client: add some useful keys to Key_ToUpper 2020-02-08 23:15:40 +07:00
mittorn
2e2a716710 ref_api: fix remap code 2020-01-30 07:15:23 +07:00
mittorn
4c7e19adeb ref_soft: fix unaligned access 2020-01-25 21:57:49 +07:00
mittorn
59f053b1db ref_soft: fix Werrors 2020-01-25 15:54:56 +07:00
mittorn
dce35f453d wscript: fix build without DLLEMU 2020-01-19 08:28:37 +07:00
mittorn
3a416636f1 engine: mark GAME_EXPORT's 2020-01-19 08:15:54 +07:00
mittorn
bbd033c254 lib: restore dll loader support 2020-01-19 07:38:37 +07:00
mittorn
22dc5b7416 Merge branch 'lib' of https://github.com/FWGS/xash3d-fwgs 2020-01-18 07:15:45 +07:00
AimlessWanderer
40c73719c0 engine: remove useless defines 2020-01-12 03:56:53 +03:00
AimlessWanderer
022792709d engine: fix build 2020-01-12 03:56:53 +03:00
AimlessWanderer
b9ec7ac886 engine: fix dedicated server crash 2020-01-12 03:56:53 +03:00
Alibek Omarov
32eb42a92f wscript: don't error if uninitialized(old compilers like gcc5 have bad heuristics) 2019-12-24 03:56:07 +03:00
Alibek Omarov
5d8b770e6c engine: client: declare CL_Quit_f as noreturn 2019-12-24 02:57:08 +03:00
Alibek Omarov
0fe18ae6dc engine: fix -Wmaybe-uninitialized 2019-12-24 02:47:51 +03:00
Alibek Omarov
d0dbd185ad engine: android: fix enum-conversion 2019-12-23 06:55:00 +03:00
Alibek Omarov
e11a08064d engine: fix implicit-fallthrough, uninitialized, enum-conversation compiler diagnostics 2019-12-23 06:48:17 +03:00
Alibek Omarov
e424112020 engine: don't update screen when we're only in transition from STATE_RUNFRAME to something else 2019-12-23 06:32:39 +03:00
Alibek Omarov
4a56dfcd00 engine: fix extra zeros in %0 2019-12-23 06:29:20 +03:00
Alibek Omarov
6a8cd7090a mainui: update 2019-12-23 02:32:28 +03:00
Aimless-Wanderer
c57d8995c6 wscript: fix syntax
Same as https://github.com/FWGS/hlsdk-xash3d/pull/116
2019-12-10 14:32:52 +03:00
Alibek Omarov
da65cc99d9 travis: don't upload dead APKs [ci skip] 2019-12-03 04:00:11 +03:00
Alibek Omarov
7dde4c03a7 scripts: enable mobile_hacks HLSDK branch for MotoMAGX 2019-12-03 03:49:47 +03:00
Alibek Omarov
326a7d79f0 mainui: update 2019-12-03 03:47:28 +03:00
Alibek Omarov
dd3fcb6461 scripts: fix android travis build 2019-12-03 02:58:03 +03:00
Alibek Omarov
fa90dbbd5e wscript: fix sanitize build 2019-12-03 02:35:23 +03:00
Alibek Omarov
dd1daa5bff engine: correctly validate blueshift maps 2019-12-03 02:27:08 +03:00
Alibek Omarov
154dd5c9ae engine: console: temporarily disable updating screen when something is printed to console, because it can mess up with textures 2019-12-03 02:17:12 +03:00
Alibek Omarov
2ee7367567 scripts: don't symlink engine and hlsdk sources on Android as -sl 2019-12-02 02:15:25 +03:00
Alibek Omarov
3da10f28c4 engine: restored BShift maps support 2019-12-02 02:14:02 +03:00
Alibek Omarov
612e7560ae engine: client: fix r_showtextures 2019-12-02 02:13:41 +03:00
Alibek Omarov
fe362a1ab5 wscript: add incompatible-pointer-types only for C 2019-12-02 02:13:23 +03:00
Alibek Omarov
8399107826 engine: platform: android: remake video backend to use EGL through Java code 2019-12-02 01:01:39 +03:00
Alibek Omarov
077bc7323c engine: host: fix crash 2019-12-02 01:01:39 +03:00
Andrey Akhmichin
6f2b559c5a engine: common: cfgscript.c: change wrong variable type to fix compilation. 2019-12-01 17:30:48 +03:00
Alibek Omarov
fec0a6baf6 engine: platform: android: change package name 2019-12-01 02:17:51 +03:00
Alibek Omarov
ac75bdf2d4 ref_gl: update gl-wes-v2 submodule 2019-12-01 01:42:27 +03:00
Alibek Omarov
56859e03c3 travis: disable hardfp finally, it mostly useless with newer NDK updates 2019-11-29 14:44:24 +03:00
Alibek Omarov
959e10f720 mainui: update 2019-11-28 23:05:17 +03:00
Alibek Omarov
0991255534 engine: dedicated: fix dedicated build 2019-11-28 19:23:34 +03:00
Alibek Omarov
199d3fd422 contrib: remove my personal qtcreator project, as I'm using compile_commands.json support now 2019-11-28 19:21:53 +03:00
Alibek Omarov
c07109e69c engine: fix -Wincompatible-pointer-types, add it to Werror list 2019-11-28 19:18:50 +03:00
Alibek Omarov
08e7bb1bf4 engine: common: enable our own build number counter, move legacy to Q_buildnum_compat 2019-11-28 17:49:14 +03:00
Alibek Omarov
d0010cf9cb engine: don't call SCR_VidInit too soon 2019-11-28 17:43:06 +03:00
Alibek Omarov
ecd675926a engine: cvar: add null checks as these functions are passed to user's DLL 2019-11-26 02:48:16 +03:00
Alibek Omarov
0c3be639c5 engine: reliably tell client.dll about vid mode changes 2019-11-26 02:47:48 +03:00
Alibek Omarov
3a9801853d engine: client: detailed message if menu failed to load 2019-11-26 02:47:25 +03:00
Alibek Omarov
3907be3c8f mainui: update 2019-11-26 02:47:04 +03:00
Alibek Omarov
9421457b3a engine: big refactoring commit, instead of using platform-specific platform-specific macros, use appropriate macros set by public/build.h 2019-11-24 03:52:08 +03:00
Alibek Omarov
ac4a14ef6c engine: host: support DEFAULT_DEV macro 2019-11-24 03:02:12 +03:00
Alibek Omarov
c613118199 defaults: refactoring, remove XASH_FBDEV macro, remove dead macros(DEFAULT_CON_MAXFRAC and DEFAULT_SV_FORCESIMULATING) 2019-11-24 03:01:50 +03:00
Alibek Omarov
755db4d56b backends: reformat 2019-11-24 03:00:35 +03:00
Alibek Omarov
2e180d5548 Documentation: engine-porting-guide: finalize document 2019-11-24 02:31:48 +03:00
Alibek Omarov
bf9840c2a8 mainui: update 2019-11-24 02:12:27 +03:00
Alibek Omarov
f56887bde9 engine: fix rodir, now it always creates gamefolder in rwdir. Fixes #87 2019-11-24 02:12:17 +03:00
Alibek Omarov
23fe1c0985 engine: use appropriate path array length 2019-11-24 02:10:52 +03:00
Alibek Omarov
5266f17d56 Documentation: extensions: library-naming: proper line breaks and links to buildsystem integration for HLSDK 2019-11-20 19:58:43 +03:00
Alibek Omarov
744f75d4a3 engine: linux: simplify Platform_DoubleTime 2019-11-20 16:45:55 +03:00
mittorn
37435365e2 platform/posix: fix _GNU_SOURCE define in lib_posix 2019-11-18 23:48:49 +07:00
mittorn
94fc0febc7 fix some comments 2019-11-18 21:13:21 +07:00
mittorn
6f58ef2394 scripts/xshlib: code clean 2019-11-18 21:08:03 +07:00
mittorn
177f8ed653 platform: introduce lib backends, add static linking, wscript: add optional projects support, add static linking support, scripts: add xshlib for advanced linking options 2019-11-18 03:31:55 +07:00
Alibek Omarov
09203dc512 ref_gl: temporarily fix water drawing on GLES 2019-11-17 18:51:39 +03:00
Alibek Omarov
3c3d5d472e ref_gl: bring back glDrawRangeElements support 2019-11-17 18:51:03 +03:00
Alibek Omarov
4c6e64c89b mainui: update 2019-11-17 18:05:12 +03:00
Alibek Omarov
7afee98f99 engine: ref: check if refdll was initialized before freeing texture 2019-11-17 18:05:05 +03:00
Alibek Omarov
f562926aaa Documentation: Xash3D FWGS Engine porting guide, not finished 2019-11-15 17:25:24 +03:00
Alibek Omarov
b25c83edc4 Documentation: ports: define MotoMAGX port as supported 2019-11-15 17:23:55 +03:00
Alibek Omarov
c42b5e043d Documentation: input-interface: split Russian translation to new file 2019-11-15 14:48:29 +03:00
Alibek Omarov
1e5921d33f Documentation: move FWGS engine extensions to appropriate folder [ci skip] 2019-11-15 14:42:52 +03:00
Alibek Omarov
663344eeaa Create supported-mod-list.md [ci skip] 2019-11-15 14:38:04 +03:00
Alibek Omarov
e4e34cc835 Create input-interface.md [ci skip] 2019-11-15 14:08:40 +03:00
Alibek Omarov
b36fc0e2ae Create console-scripting.md [ci skip] 2019-11-15 14:07:35 +03:00
Alibek Omarov
924d6ada60 Create public-server-rules-and-recommendations.md [ci skip] 2019-11-15 14:06:26 +03:00
Alibek Omarov
8343cadd30 Create mod-porting-guide.md 2019-11-15 14:01:14 +03:00
Alibek Omarov
0636dc45bd engine: sdl: fix resizing event handling 2019-11-12 02:04:18 +03:00
Alibek Omarov
611ee64cd9 scripts: build_motomagx_engine: use waf install now, as HLSDK now supports library naming scheme 2019-11-11 04:14:18 +03:00
Alibek Omarov
5a17e7f425 build: add XASH_ARMvX defines(buildsystem integration), add oneliner to generate #undef list 2019-11-11 00:38:40 +03:00
Alibek Omarov
db39f0cc88 engine: client: combine loading or paused icon drawing 2019-11-08 01:28:01 +03:00
Alibek Omarov
3f48bce7da engine: client: fix #79 2019-11-08 01:09:55 +03:00
Alibek Omarov
936b491248 engine: dedicated: remove unused stub 2019-11-08 01:09:55 +03:00
Alibek Omarov
428e8ef427 engine: server: simplify game saving code, hide GL_FreeImage under XASH_DEDICATED macro 2019-11-08 01:09:55 +03:00
tyabus
934dffd273 engine: common: fix message formating 2019-11-07 23:26:11 +03:00
Andrey Akhmichin
0c34a5081c engine: client: make the code that generates screenshots and demos names simpler. 2019-11-07 23:12:34 +03:00
Alibek Omarov
f09682131f travis: fix magx deploy 2019-11-07 08:41:10 +03:00
Alibek Omarov
32ddc2a47f waifulib: xcompile: we need to disable builtins even on armeabi with host compiler and NDK r10e 2019-11-07 07:30:41 +03:00
Alibek Omarov
729f534614 waf: third msvc test 2019-11-07 07:19:08 +03:00
Alibek Omarov
6937d0c17e travis: fix unpacking r10e, add clang-9 2019-11-07 07:13:28 +03:00
Alibek Omarov
4dba8219ca waf: another msvc test 2019-11-07 07:05:31 +03:00
Alibek Omarov
f8b0ec8c4b wscript: tune-up options for magx 2019-11-07 06:56:07 +03:00
Alibek Omarov
ce20da28e1 travis: reorder tasks depending on their breakability. Use r10e for Android and host toolchain 2019-11-07 06:55:40 +03:00
Alibek Omarov
40ed87d8de waf: msvc test 2019-11-07 06:54:42 +03:00
Alibek Omarov
5bae732818 scripts: build ref_soft for magx 2019-11-07 05:15:45 +03:00
Alibek Omarov
08b3de08e7 wscript: use SINGLE_BINARY on motomagx 2019-11-07 05:07:28 +03:00
Alibek Omarov
a51c5d93fc Revert "game_launch: check for Platform_Main before Host_Main"
This reverts commit 6aa61657e0.
2019-11-07 05:06:51 +03:00
Alibek Omarov
55dbb2ca3f Revert "game_launch: fix start up"
This reverts commit a46e459124.
2019-11-07 05:06:43 +03:00
Alibek Omarov
4b930c7854 Revert "engine: platform: magx: add pre-init platform-specific hook"
This reverts commit 2958b14cc2.
2019-11-07 05:06:24 +03:00
Alibek Omarov
d68823708f scripts: include run.sh script for magx 2019-11-07 05:01:16 +03:00
Alibek Omarov
4b5d09a968 travis: rename build 2019-11-07 04:52:13 +03:00
Alibek Omarov
7e4a7ac23d wscript: workaround bug when CC_VERSION is not set for msvc 2019-11-07 04:49:49 +03:00
Alibek Omarov
62cdf2ae5b engine: input: hide SDL_ functions under XASH_SDL macro 2019-11-07 04:44:24 +03:00
Alibek Omarov
94c42160b7 travis: enable CI for motomagx 2019-11-07 02:46:04 +03:00
Alibek Omarov
18bbfebc5d mainui: update 2019-11-07 02:22:35 +03:00
Alibek Omarov
d18cb1f74c wscript: add special options for fast build type for gcc3 2019-11-07 02:20:17 +03:00
Alibek Omarov
2807841511 waf: update to latest waifu revision 2019-11-07 02:19:21 +03:00
Alibek Omarov
13ed8d4529 wscript: move motomagx options to root wscript, disable PIC for this old machine, set default options 2019-11-06 23:14:20 +03:00
Alibek Omarov
1ff06c2c1e mainui: update 2019-11-06 22:32:30 +03:00
Alibek Omarov
0cb591821a Merge sdl12-port into master 2019-11-06 22:29:04 +03:00
Alibek Omarov
8700f44175 public: unittest: use static everywhere to prevent collision when tests may be linked into engine 2019-11-05 11:35:39 +03:00
Alibek Omarov
6ba73a732a mainui: update 2019-11-05 11:23:56 +03:00
Alibek Omarov
4b97d8bcda public: add simple C89-compatible testing framework (wip) 2019-11-05 11:22:16 +03:00
Alibek Omarov
0dc6f1674f mainui: updatr 2019-11-05 09:50:01 +03:00
Alibek Omarov
6bc6f0dd70 scripts: run windows builds verbose 2019-11-05 09:41:58 +03:00
Alibek Omarov
39abd82e5d wscript: silence MSVC tgmath nonsense 2019-11-05 09:41:26 +03:00
Alibek Omarov
15924aebaa xash3d-fwgs: check if HAVE_TGMATH_H is set to positive value rather it's just defined 2019-11-05 01:41:35 +03:00
Alibek Omarov
b79c95d295 engine: wscript: fix typo, use pthreads.py tool 2019-11-05 01:40:06 +03:00
Alibek Omarov
453c0d890d engine: wscript: rename fbdev to enable-fbdev for great consistency, check definition instead of putting vars into env 2019-11-05 01:35:20 +03:00
Alibek Omarov
60f0f68e68 Merge remote-tracking branch 'origin/master' 2019-11-05 01:16:39 +03:00
Alibek Omarov
79adaa11e0 lowmemory: merge 2019-11-05 01:15:31 +03:00
Alibek Omarov
6819050d91 waf: upgrade to latest waifu revision 2019-11-05 01:15:03 +03:00
Alibek Omarov
d2740f78c1 wscript: refactoring, add waf_unit_test, disable -Wdouble-promotion, rename fast as fastnative and leave fast without -march=native for x-compiling 2019-11-05 01:01:33 +03:00
mittorn
d4efb55492 ref_soft: lowmemory: prevent redefines 2019-11-04 22:39:22 +07:00
mittorn
6953e829c4 lowmemory: prevent redefines 2019-11-04 22:34:08 +07:00
mittorn
ef270eb642 ref_soft: update ref api 2019-11-04 22:12:09 +07:00
mittorn
d1af73bfcb ref_soft: image: fix wrong alpha buffer 2019-11-04 22:11:11 +07:00
mittorn
1365020302 ref: add enum for screen rotation 2019-11-04 20:27:46 +07:00
mittorn
0e7013eeb0 lowmemory: tune XASH_LOW_MEMORY=1 not breaking multiplayer 2019-11-04 19:58:45 +07:00
mittorn
a3a0db447b ref_soft: draw: check screen bounds in Draw_Fill 2019-11-03 19:09:41 +07:00
Alibek Omarov
a46e459124 game_launch: fix start up 2019-11-02 08:56:07 +03:00
Alibek Omarov
dfed24c290 public: build: add new ARMv6 detect macro 2019-11-02 08:56:07 +03:00
Alibek Omarov
1f308a43c8 engine: fix build after lowmemory rebase 2019-11-02 08:56:07 +03:00
Alibek Omarov
2062e55c6a lowmemory: cut up netgraph buffers 2019-11-02 08:56:07 +03:00
Alibek Omarov
90038d2924 common: fix broken build 2019-11-02 08:56:07 +03:00
Alibek Omarov
9aff6ca633 engine: wscript: support building for MotoMAGX 2019-11-02 08:56:07 +03:00
Alibek Omarov
6aa61657e0 game_launch: check for Platform_Main before Host_Main 2019-11-02 08:56:07 +03:00
Alibek Omarov
2958b14cc2 engine: platform: magx: add pre-init platform-specific hook 2019-11-02 08:56:07 +03:00
Alibek Omarov
aa6674b032 engine: support compiling with gcc3 2019-11-02 08:56:07 +03:00
Alibek Omarov
7a7bca2991 engine: wscript: always add librt on linux if it was checked before 2019-11-02 08:56:07 +03:00
Alibek Omarov
7e9f90a09d public: fix detecting ARM on gcc3 2019-11-02 08:56:07 +03:00
Alibek Omarov
5e8373fa46 engine: slightly update RefAPI 2019-11-02 08:56:07 +03:00
Alibek Omarov
9d826016b0 engine: finish sdl1.2 port 2019-11-02 08:56:07 +03:00
Alibek Omarov
7f1dd248c2 backends: add XASH_MESSAGEBOX to specify messagebox platform implementation 2019-11-02 08:56:07 +03:00
Alibek Omarov
4d5e7c0557 platform: minify changes, use SDL_VERSION_ATLEAST macro(left unfinished) 2019-11-02 08:56:07 +03:00
Alibek Omarov
9e99a2bc37 engine: dirty sdl1.2 port 2019-11-02 08:56:07 +03:00
Alibek Omarov
8dafbaeda2 engine: platform: sdl: dirty wip sdl1.2 port 2019-11-02 08:56:07 +03:00
Alibek Omarov
ae35f15f15 engine: wscript: add option to build against sdl1.2 2019-11-02 08:56:07 +03:00
Alibek Omarov
0dd91ceda2 xash3d-fwgs: append missing new line at the end of file 2019-11-02 08:56:07 +03:00
mittorn
d6f8112860 gameinfo: add MIN_EDICTS constant instead of magic number 600, low it to 64 2019-11-02 12:46:11 +07:00
mittorn
3589537147 ref_soft: lowmemory: use ushort for r_leafkeys 2019-11-02 12:43:45 +07:00
Alibek Omarov
26b8a1fe1d ref_soft: blit: restore height for bpp 16 and 32 2019-11-02 04:44:37 +03:00
mittorn
a1db6c6a9b lowmemory: remove datagram limit 2019-11-01 13:49:53 +07:00
mittorn
271d15f989 client: prevent precache overflow 2019-11-01 13:41:30 +07:00
Aimless-Wanderer
00e5d42459 platform: android: fix macros 2019-10-31 18:42:34 +03:00
mittorn
291fdfac68 platform/evdev: add some keys, add keyevent debug 2019-10-31 13:22:58 +07:00
mittorn
5e31e3fad0 keys: rotation support 2019-10-31 13:22:58 +07:00
mittorn
609235b4f1 ref_soft: fix texcoords on image blitting 2019-10-31 01:52:38 +07:00
mittorn
b3ad557dd2 ref_soft: update api, display rotation support 2019-10-31 01:43:40 +07:00
mittorn
7f6395fa7d ref: display transformation API 2019-10-31 01:36:07 +07:00
Alibek Omarov
aee9f454fc Documentation: update ports.md, include @masterfeizz 3DS port, add new ports, stabilize ARM and Android ports although we aren't released yet 2019-10-30 17:10:55 +03:00
Alibek Omarov
e3c3b05396 engine: platform: android: don't check if XASH_ENGLIBDIR and XASH_GAMELIBDIR are null. Load library by direct path if PATH_SPLITTER was found. Partially fixes #74 2019-10-30 16:55:00 +03:00
Alibek Omarov
6e637456ef platform: define platform-specific posix-compatible library loaders as macros to reduce macros hell in lib_posix.c 2019-10-30 16:46:18 +03:00
mittorn
9c7c279a5b ref_soft: XASH_LOW_MEMORY 2019-10-29 13:16:16 +07:00
mittorn
5e5ffec67d lowmemory: tweak some protocol limits for HL1, restore bit counts (maybe even restore multiplayer compatibility) 2019-10-29 11:35:02 +07:00
mittorn
06cadacb59 lowmemory: cut resources array for legacy mode, only related to downloads 2019-10-29 11:32:32 +07:00
mittorn
cb8e0a50bc lowmemory: reduce MAX_QPATH 2019-10-29 11:30:57 +07:00
mittorn
b3a5283517 lowmemory: rename waf options 2019-10-28 12:31:29 +07:00
mittorn
5348046109 lowmemory: increase decals limit 2019-10-28 12:29:44 +07:00
mittorn
57d48b64eb keys: add OSK 2019-10-28 12:28:52 +07:00
mittorn
5145b1956c zone; revert removing clean check 2019-10-28 12:25:20 +07:00
mittorn
bb48e5209e console: fix wrong line width on start, remove some hard-coded sizes 2019-10-28 12:14:19 +07:00
mittorn
37cba10c14 lowmemory: fix sentences 2019-10-28 12:07:15 +07:00
Alibek Omarov
1decb1c7fb xash3d-fwgs: append missing new line at the end of file 2019-10-27 22:29:03 +03:00
mittorn
ba1347a8ce wscript: add options for low memory, async ns resolve and swap allocator 2019-10-26 12:12:59 +07:00
mittorn
feb01b270e zone, platform: add swap allocator 2019-10-26 12:10:50 +07:00
mittorn
114a256675 Implement XASH_LOW_MEMORY, memory-reduced configuration 2019-10-26 07:06:26 +07:00
mittorn
2897e5f17e input: fix evdev macro 2019-10-26 06:53:24 +07:00
mittorn
6723758edc platform/alsa: fix case when buffer size is POT, improve latency, calculate sample count 2019-10-26 05:49:23 +07:00
mittorn
23956a0b82 platform: alsa support 2019-10-25 09:04:52 +07:00
Alibek Omarov
93a43ae9a5 mainui: update 2019-10-24 12:45:27 +03:00
Alibek Omarov
8905e7cbb7 wscript: fix stdin input wasn't enabled for dedicated. Fix single-binary help string 2019-10-23 20:47:49 +03:00
iZarif
bf8b87c29d engine: client/common: fix a few more format warnings 2019-10-22 17:56:08 +03:00
mittorn
803c396fa2 platform: new fbdev bakend, move in_evdev to bakends 2019-10-22 01:42:02 +07:00
Alibek Omarov
0933261898 wscript: oops, remove trailing colon 2019-10-18 16:46:54 +03:00
Alibek Omarov
e93d362391 wscript: explicitly undefine HAVE_TGMATH_H if tests are failed 2019-10-18 16:46:54 +03:00
Alibek Omarov
2b13de80bf wscript: check if tgmath actually compiles, should fix building under freebsd 2019-10-18 16:46:54 +03:00
Alibek Omarov
2c67f4cb39 wscript: fix wrong object method call 2019-10-18 16:46:54 +03:00
Alibek Omarov
4705683ebc wscript: conf.define instead of directly appending to DEFINES 2019-10-18 16:46:54 +03:00
Alibek Omarov
78baf568ae engine: more double promotion fixes 2019-10-18 16:46:54 +03:00
Alibek Omarov
1218f4aeb6 ref_gl: explicitly cast literals to floats 2019-10-18 16:46:54 +03:00
Alibek Omarov
531c6cc375 engine: server: explicitly cast literals to floats 2019-10-18 16:46:54 +03:00
Alibek Omarov
edf3fcd398 engine: common: explicitly cast literals to floats, include tgmath when needed 2019-10-18 16:46:54 +03:00
Alibek Omarov
c67f065d90 engine: client: explicitly cast literals to floats 2019-10-18 16:46:54 +03:00
Alibek Omarov
148846c02d common: explicitly cast literals to floats 2019-10-18 16:46:54 +03:00
Alibek Omarov
8afb2dbdec wscript: better tgmath check, make double-promotion not an error 2019-10-18 16:46:54 +03:00
Alibek Omarov
14be566401 public: include tgmath in mathlib.h, so macros will be used inside Vector macros 2019-10-18 16:46:54 +03:00
Alibek Omarov
0577ecbccf public: initial fix of double promotion 2019-10-18 16:46:54 +03:00
Alibek Omarov
880dd2546f engine: client: fix wrong type in DSP 2019-10-18 08:11:05 +03:00
Alibek Omarov
c2063c869d engine: client: fix demoplayback type from qboolean to int(can exceed false and true) 2019-10-18 08:04:00 +03:00
Alibek Omarov
49a133514a ref_gl: fix wrong type 2019-10-18 07:51:11 +03:00
Alibek Omarov
94dc801150 scripts: remove single-binary for xashds, as it already set implicitly. 2019-10-18 07:45:05 +03:00
Alibek Omarov
fe118e9683 ci: disable dedicated build for freebsd at now 2019-10-18 07:36:03 +03:00
Alibek Omarov
e0d993a5a8 public: fix tautological-compare 2019-10-18 07:23:34 +03:00
Alibek Omarov
cf35943f51 scripts: build_freebsd_engine: remove building SDL2, as it will be installed from ports, use /bin/sh as interpreter 2019-10-18 07:13:48 +03:00
Alibek Omarov
cd715178d2 scripts: set executable flags when needed 2019-10-18 07:05:16 +03:00
Alibek Omarov
869b684536 wscript: remove multicheck for win32 libs, remove sdl2 checking from main wscript 2019-10-18 06:35:05 +03:00
Alibek Omarov
bc56ce754b wscript: move C only flags from common flags, correct multicheck again 2019-10-18 06:20:27 +03:00
Alibek Omarov
32897450fc wscript: declare uselib_store for multicheck 2019-10-18 05:41:56 +03:00
Alibek Omarov
e0e9942bd5 waifulib: remove modules that now part of waifu distribution 2019-10-18 05:14:01 +03:00
Alibek Omarov
fdbd1c5658 wscript: check win32 libraries in parallel 2019-10-18 05:11:18 +03:00
Alibek Omarov
eaf983c054 wscript: remove BIT32_ALLOW 2019-10-18 05:06:10 +03:00
Alibek Omarov
e11eeb24fc waf: upgrade to waifu 1.0.0 2019-10-18 05:05:29 +03:00
Alibek Omarov
6dcd8c3af8 travis: fix amd64 linux build 2019-10-18 05:05:11 +03:00
Alibek Omarov
d68eab6b65 ci: autoconfirm for pkg installg 2019-10-16 02:35:35 +03:00
Alibek Omarov
8ec6eaa49a ci: try to install needed dependencies for freebsd 2019-10-16 02:27:24 +03:00
Alibek Omarov
a38f561d7c ci: use SDL2 zip source archive 2019-10-16 02:18:12 +03:00
Alibek Omarov
cb404b2730 cI: borrow image names from rust-lang/libc 2019-10-16 02:11:26 +03:00
Alibek Omarov
83d3c02e53 ci: add Cirrus CI support with FreeBSD 2019-10-16 02:09:47 +03:00
mittorn
f376d5d59c ref_soft: glblit: gles3 pbo+fbo blitter 2019-10-13 03:52:47 +07:00
mittorn
2493659b23 ref_soft: glblit: change projection scale 2019-10-12 22:36:21 +07:00
mittorn
e1efacb399 ref_soft: glblit: GLES1 blitter 2019-10-12 14:11:55 +07:00
mittorn
05d793c34b ref_soft: glblit: refactor 2019-10-12 04:18:05 +07:00
mittorn
86867dcbe3 ref_soft: restore fallback gl1 blitter (force enable with -glblit) 2019-10-12 04:05:23 +07:00
Alibek Omarov
8be58bcd21 engine: android: fix EGL context create error condition 2019-10-11 17:36:56 +03:00
Alibek Omarov
06e38b45c8 engine: android: don't throw host error when initializing software renderer on Android 2019-10-11 11:53:52 +03:00
Alibek Omarov
d3dd671759 engine: android: quick hack to load libraries on aarch64 until we don't symlinking lib folder 2019-10-11 11:50:21 +03:00
Alibek Omarov
e0b8c338a8 engine: ref: more verbose refdll loading 2019-10-11 11:46:59 +03:00
Alibek Omarov
ee363ebb74 waifulib: fix including system includes 2019-10-11 10:04:32 +03:00
Alibek Omarov
e4bb3ecd12 travis: use r20 for softfp build 2019-10-11 09:38:44 +03:00
Alibek Omarov
d05bfb55c5 travis: forgot to upload softfp test 2019-10-11 09:22:28 +03:00
Alibek Omarov
9c26983136 travis: enable softfp build with poly opt 2019-10-11 09:16:21 +03:00
Alibek Omarov
fa622168a0 engine: fix style, disable XASH_USE_SELECT 2019-10-11 08:51:30 +03:00
Alibek Omarov
eff814b148 engine: ref: remove redutant continue, return false in case of failed renderer initialization 2019-10-11 07:57:59 +03:00
Alibek Omarov
11c373a183 waf: upgrade to latest waifu 2019-10-11 07:40:40 +03:00
Alibek Omarov
898b697b70 engine: ref: allow to set r_refdll or -ref with ref_ prefix 2019-10-11 05:36:17 +03:00
Alibek Omarov
6d8026cd81 engine: ref: fix spamming in console when getting human readable renderer names 2019-10-11 05:11:45 +03:00
Alibek Omarov
1e7abdc144 wscript: fix ref_gl linking 2019-10-11 04:21:35 +03:00
Alibek Omarov
ff1b28244b engine: client: port ui_renderworld from old engine 2019-10-11 04:12:52 +03:00
Alibek Omarov
7782fa09ac wscript: refactor cflags appending, add optional polyhedral optimizations 2019-10-11 04:12:07 +03:00
Alibek Omarov
ae624801ac wscript: proper default showing in help 2019-10-11 03:46:17 +03:00
Alibek Omarov
8889bda261 wscript: use ConfigurationContext.define instead of appending to env['DEFINES'] 2019-10-11 03:42:20 +03:00
Alibek Omarov
c8eac04e9b ref_soft: fix double promotion 2019-10-10 06:23:57 +03:00
Alibek Omarov
a5fa4df37c ref_gl: fix wrong texture resampling condition 2019-10-10 06:02:26 +03:00
Alibek Omarov
d96dcfba59 ref_soft: fix different warnings 2019-10-10 05:55:44 +03:00
Alibek Omarov
690a317f4f ref_soft: fix style errors 2019-10-10 05:32:20 +03:00
Alibek Omarov
9c4a0d2397 ref_soft: context: upgrade to latest RefAPI 2019-10-10 05:32:01 +03:00
Alibek Omarov
2183240221 waifulib: xcompile: fix aarch64 binary installation 2019-10-09 05:52:43 +03:00
Alibek Omarov
33800954ec travis: fix mistyped ARCHS for Android 64 2019-10-09 05:21:09 +03:00
Alibek Omarov
67cb5a4dde travis: fix mistyped ARCHS 2019-10-09 04:47:11 +03:00
Alibek Omarov
9fd7e333df travis: another blind try to fix r10e unpack 2019-10-09 04:37:38 +03:00
Alibek Omarov
a9628cc0f0 travis: install lld-8 also 2019-10-09 04:10:34 +03:00
Alibek Omarov
f33de46508 travis: verbose 7z x for r10e ndk 2019-10-09 04:08:34 +03:00
Alibek Omarov
595d452c23 travis: s/p7zip/p7zip-full/g 2019-10-09 04:00:13 +03:00
Alibek Omarov
911e670be6 travis: install p7zip to be able to unpack r10e ndk 2019-10-09 03:51:58 +03:00
Alibek Omarov
9ea973dad6 waifulib: xcompile: fix C++ with host toolchain 2019-10-09 03:48:51 +03:00
Alibek Omarov
fcdd45341c travis: switch to clang-8 for android host build 2019-10-09 02:52:59 +03:00
Alibek Omarov
53d2d10932 travis: add Android 64 and Android hardfp experimental builds 2019-10-09 02:34:30 +03:00
Wei Mingzhi
88772a1c34 engine: GetGameDir should return gamedir only. Add proper stub functions for some engine APIs. 2019-10-07 16:08:10 +03:00
Alibek Omarov
1c21590e96 travis: set android autobuilds as release to have high optimization 2019-10-06 09:23:14 +03:00
Alibek Omarov
d2a8cfe614 Revert "engine: client: implement connectionprogress partially"
This reverts commit cb417a3d51.

This commit breaks demo playback. Figure out why, then revert it back.
2019-10-06 07:45:32 +03:00
Alibek Omarov
39ff3b199a wscript: fix LTO check scope 2019-10-06 06:58:45 +03:00
Alibek Omarov
ddf070b63d ref_gl: fix build 2019-10-06 06:55:16 +03:00
iZarif
4c559a4a08 wscript: add --enable-lto option 2019-10-06 06:10:06 +03:00
Alibek Omarov
fa16c49246 readme: sligthly update contributing guidelines 2019-10-06 03:49:46 +03:00
Alibek Omarov
d382f6886d engine: fix build 2019-10-05 04:02:25 +03:00
Alibek Omarov
02e111c5e1 waifulib: xcompile: fix clang detection 2019-10-05 03:35:11 +03:00
Alibek Omarov
73516eea4c ref_gl: update glwesv2 submodule 2019-10-05 03:34:52 +03:00
Alibek Omarov
6e2dbd4e1c engine: android: get rid of VLA 2019-10-05 03:33:13 +03:00
Alibek Omarov
67cdbef833 engine: fix signed char in studio 2019-10-05 03:33:00 +03:00
Alibek Omarov
d6bb72f772 engine: dedicated: fix old-style-definitions 2019-10-05 03:17:38 +03:00
Alibek Omarov
e6dd4882cc wscript: more paranoic Werrors 2019-10-05 03:06:51 +03:00
Alibek Omarov
cb62e65f9f public: fix implicit fallthrough 2019-10-05 02:49:04 +03:00
Alibek Omarov
cb5e282af4 engine: sequence: fix condition 2019-10-05 02:22:46 +03:00
Alibek Omarov
b175d8a0cb engine: net_encode: due to bug in GCC <9, disable duplicated-branches here 2019-10-05 02:22:10 +03:00
Alibek Omarov
fbb88a55cb engine: linux: fix C89 2019-10-05 02:10:46 +03:00
Alibek Omarov
f3a40ac794 engine: cfgscript: fix userinfo cvars wrong dump to config 2019-10-05 02:10:09 +03:00
Alibek Omarov
dc207a449c engine: fix -Werror=strict-prototypes 2019-10-05 02:09:45 +03:00
Alibek Omarov
5a8de90918 waifulib: xcompile: light refactoring 2019-10-05 01:16:20 +03:00
Alibek Omarov
2d6b770e7c waifulib: xcompile: allow building with host Clang and NDK r10e sysroot 2019-10-04 22:21:11 +03:00
Aimless Wanderer
409eee3bb4 engine: fix gameinfo parsing 2019-10-04 11:58:14 +03:00
Alibek Omarov
ac5bb86301 travis: nah, I don't have wish to experiment with yaml trash 2019-09-29 19:02:11 +03:00
Alibek Omarov
530d376c44 travis: push newengine branch at deploy higher 2019-09-29 18:43:53 +03:00
Alibek Omarov
b777ba9549 scripts: comment out github releases deployment until github fixes itself 2019-09-29 18:39:33 +03:00
Alibek Omarov
bc39b707d4 Revert github repository deploy removal 2019-09-29 18:38:31 +03:00
mittorn
cb0791c915 http: do not continue after HTTP_Free, fix potential buffer overflow 2019-09-29 01:42:17 +07:00
mittorn
03c73f56d2 waf: add linkflags before filtering cflags 2019-09-29 01:42:17 +07:00
Alibek Omarov
94d0c78913 ref_gl: update gles2 wrapper 2019-09-28 21:17:16 +03:00
mittorn
34463dcddc ref_gl: fix glConfig.max_texture_units when GL_MAX_TEXTURE_UNITS_ARB query not supported 2019-09-28 21:13:38 +07:00
mittorn
da11da97ad android: enable touch support 2019-09-28 20:09:26 +07:00
mittorn
c0043a5467 touch: implement wheel 2019-09-28 19:35:30 +07:00
mittorn
7770b1a82b input: improve touch emulation 2019-09-28 19:33:57 +07:00
mittorn
faf592adb4 waf: filter_cflags does not work with msvc 2019-09-28 04:59:09 +07:00
mittorn
0aa57854ca waf: fix unwanted required_flags modification 2019-09-28 04:36:08 +07:00
mittorn
fd8c1becec waifulib: gcc-6 support for android 2019-09-28 04:26:19 +07:00
mittorn
0afc3d83c6 android: add stub for Platform_PreCreateMove 2019-09-28 04:26:19 +07:00
mittorn
d633fe5deb waf: add cflags detection, make some warning flags optional 2019-09-28 04:26:19 +07:00
Alibek Omarov
5040cb83d0 engine: win32: lib: oops, fix wrong sizeof 2019-09-27 17:02:04 +03:00
Alibek Omarov
2b385ff1f4 engine: win32: lib: try to fix crash when checking dependencies 2019-09-27 16:56:20 +03:00
Alibek Omarov
cd5028eed1 ci: move signing to android project, don't call it here 2019-09-27 05:35:16 +03:00
mittorn
3ce014d5f5 ci: sign apk and fix filename 2019-09-27 02:58:17 +07:00
mittorn
75aaf1c66d ci: try fix upload 2019-09-27 02:47:44 +07:00
mittorn
26401a4fbf ci: enable android build upload 2019-09-27 02:33:00 +07:00
mittorn
dba757f0c2 touch: fix wrong dx/dy sign 2019-09-27 02:25:38 +07:00
mittorn
7f3ee9ca71 input: merge touch support again. Fix m_ignore, fix EngineAppendMove 2019-09-27 02:19:03 +07:00
mittorn
9a1414505a imagelib: support for 16-bit transparent tga 2019-09-27 02:12:35 +07:00
Alibek Omarov
13c1e807ad engine: s_mouth: fix another signed char 2019-09-25 04:10:47 +03:00
Alibek Omarov
6e95e19589 submodules: update 2019-09-25 04:09:48 +03:00
Alibek Omarov
8f47596ad0 waifulib: xcompile: append SONAME to shared libraries, experimental support for host compiling with NDK r10e(don't work), replace exceptions with fatal messages 2019-09-21 03:52:47 +03:00
Alibek Omarov
4f4c63b1dd waifulib: xcompile: enhance compiling using host clang, refactoring 2019-09-20 18:49:37 +03:00
Alibek Omarov
66323fe9ca waifulib: xcompile: preserve order of MACROS_TO_DESTOS, add -stdlib=libstdc++ to use system provided C++ standard library 2019-09-20 16:30:17 +03:00
Alibek Omarov
16e60bbb5f waifulib: xcompile: use llvm-strip on host 2019-09-19 18:18:42 +03:00
Alibek Omarov
0389d2495f waifulib: strip_on_install: add changed bytes counter 2019-09-19 18:18:25 +03:00
Alibek Omarov
4049c54511 engine: android: fix video backend not compiled 2019-09-19 18:17:56 +03:00
Alibek Omarov
e8006c3253 engine: move ShellExecute to client, as it cannot be used in dedicated 2019-09-19 17:09:18 +03:00
Alibek Omarov
07aa9595c0 engine: android: allow building dedicated on Android 2019-09-19 17:09:18 +03:00
Alibek Omarov
b91e97ca53 wscript: remove DEST_OS2 2019-09-19 17:09:18 +03:00
Alibek Omarov
cd0f7af38a waifulib: xcompile: get rid of DEST_OS2 2019-09-19 17:09:18 +03:00
Alibek Omarov
ac1bf4a9f8 waifulib: strip_on_install: fix typo 2019-09-12 17:00:08 +03:00
Alibek Omarov
af0046f401 waifulib: strip_on_install: don't strip on PE and unknown binaries [ci skip] 2019-09-11 20:37:47 +03:00
Alibek Omarov
43575b485d wscript: add an option to not strip binaries 2019-09-11 20:26:34 +03:00
Alibek Omarov
67c6cfce71 waf: strip installed binaries to reduce size 2019-09-11 18:47:44 +03:00
Alibek Omarov
5986874be2 wscript: enable clang_compilation_database in options 2019-09-10 10:30:03 +03:00
Alibek Omarov
cf17b4f63c waf: update binary waf 2019-09-10 10:27:42 +03:00
Alibek Omarov
d1ac48b2a1 waifulib: allow compiling using host clang and NDK sysroots, thus enabling building engine from any environment that has clang(termux as example) 2019-09-10 11:24:11 +06:00
Alibek Omarov
3032ce3bee engine: android: fix building dlsym_weak on latest NDK 2019-09-10 11:15:48 +06:00
Alibek Omarov
ba69f9e62a travis: comment osx autobuilds #61 2019-08-10 14:47:35 +03:00
Alibek Omarov
8323df240b engine: implement menu extensions to allow choosing renderers from GUI 2019-08-09 04:44:50 +03:00
Alibek Omarov
a1ae770f70 engine: ref: add optional export to determine actual human readable renderer name 2019-08-09 03:39:24 +03:00
Alibek Omarov
56938344b8 engine: win32: include shellapi.h 2019-08-09 03:07:56 +03:00
Alibek Omarov
a862e641f1 game_launch: fix build on windows 2019-08-09 02:59:40 +03:00
Alibek Omarov
00b9ac676e engine: win32: fix inconsistent dll linkage 2019-08-09 02:51:15 +03:00
Alibek Omarov
8bb6aa2c51 engine: don't include windows headers, as they globally included by port.h already 2019-08-09 02:46:29 +03:00
Alibek Omarov
505392c2f8 imagelib: png: include correct winsock 2019-08-09 02:35:53 +03:00
Alibek Omarov
37f9c25212 port: include winsock2 explicitly, so winsock1 would not be included with windows.h 2019-08-09 02:28:28 +03:00
Alibek Omarov
ee2c1ad8fa engine: net_ws: include engine headers first 2019-08-08 16:09:32 +03:00
Alibek Omarov
7771356e66 engine: net_ws: fix dedicated build 2019-08-08 07:33:47 +03:00
Alibek Omarov
cb417a3d51 engine: client: implement connectionprogress partially 2019-08-08 07:19:08 +03:00
Alibek Omarov
01dcb52b4c mainui: update submodule, add connectionprogress calls to engine 2019-08-08 07:18:02 +03:00
Alibek Omarov
24adb6e3e0 ref_gl: update wrappers 2019-08-08 05:57:33 +03:00
Alibek Omarov
d992f8525b ref_gl: enable VBO for GLES targets, slightly refactor extensions checking, fix UB when initializing glwes 2019-08-08 05:53:34 +03:00
Alibek Omarov
7be094b563 sdl: vid: prevent infinite recursion if SDL failed create window with selected GL attributes 2019-08-03 19:01:35 +03:00
Alibek Omarov
386a68e334 engine: fix wrong function called on closing socket on Win32 2019-07-30 18:41:24 +03:00
Alibek Omarov
ca57c8424d filesystem: follow C89 2019-07-30 18:20:54 +03:00
Jonathan Poncelet
214f53b8a7 SV_DropClient: Prevented transmission to fake clients 2019-07-30 15:46:10 +03:00
Alibek Omarov
143310bdb7 travis: android: make it more quiet 2019-07-29 08:31:38 +03:00
Alibek Omarov
dc8b8ccab3 travis: android: accept all licenses 2019-07-29 08:27:11 +03:00
Alibek Omarov
e3c095a3fa travis: specify android version 2019-07-29 08:20:05 +03:00
Alibek Omarov
61f49938e5 travis: build for android, not publish until touch controls are not done 2019-07-29 08:10:04 +03:00
Alibek Omarov
d697421d81 scripts: waifulib: add ndk r20 support 2019-07-29 06:54:05 +03:00
Alibek Omarov
f71619d541 public: build: fix wrong hardfp abi detection 2019-07-29 06:53:42 +03:00
Alibek Omarov
0eb1d4c7c0 engine: build: fix armhf compiling 2019-07-29 06:53:18 +03:00
Alibek Omarov
5cfe9ef181 ref_gl: update gles1 and gles2 wrappers 2019-07-29 05:35:34 +03:00
Alibek Omarov
d790292829 engine: replace CFG_END macro with function, add saving support for R_GetConfigName 2019-07-28 00:27:35 +03:00
Alibek Omarov
fce0ef6ad2 ref_gl: change gl_round_down flag, remove executing configs, implement GetConfigName call 2019-07-28 00:26:56 +03:00
Alibek Omarov
f9269dcc1c engine: ref: implement executing renderer config before creating context from engine and video config before loading refdll, update api, add r_refdll cvar to video.cfg 2019-07-28 00:23:22 +03:00
Alibek Omarov
4b163e6d30 engine: hide FCVAR_RENDERINFO from renderdll, remove OpenGLConfigHack from engine functions, add GetConfigName to renderdll functions 2019-07-28 00:13:40 +03:00
Alibek Omarov
147c702f2f defaults: specify two default renderers, one is accelerated, second is software 2019-07-28 00:10:55 +03:00
Alibek Omarov
b1f23f9ff6 engine: patch dedicated to build 2019-07-27 15:40:57 +03:00
Alibek Omarov
53eb569216 scripts: fix linux build again 2019-07-27 15:33:03 +03:00
Alibek Omarov
7c8105247c scripts: allow building dedicated, rename appimage to lower-case, fix warnings found by shellcheck 2019-07-27 14:49:01 +03:00
Alibek Omarov
35ae421ac1 wscript: add shortened option for win-style-install 2019-07-27 14:34:59 +03:00
Alibek Omarov
e3e161f281 scripts: explicitly name appimage 2019-07-27 13:49:37 +03:00
Alibek Omarov
8f9800eb3c ref: move R_DrawTree from refdll to engine, implement using ref's triapi 2019-07-27 13:27:40 +03:00
Alibek Omarov
a5593963c5 scripts: fix amd64 build 2019-07-26 17:25:46 +03:00
Alibek Omarov
e308281b0b engine: fix buffer overflow in COM_ParseFile 2019-07-26 17:24:09 +03:00
Alibek Omarov
0ce8d92f27 wscript: ease debugging with sanitizers under Clang 2019-07-26 17:10:47 +03:00
Alibek Omarov
938a9f372f engine: add stub function for new undocumented function in clientdll api 2019-07-26 14:51:21 +03:00
Alibek Omarov
a0514c242b travis: fix-up arch name from amd64 to x86_64 2019-07-25 20:11:25 +03:00
Alibek Omarov
b96eb14cf7 travis: restore accidentally removed zlib for i686 build 2019-07-25 20:10:05 +03:00
Alibek Omarov
1636d36dc2 travis: try to fix linux builds #2 2019-07-25 04:56:59 +03:00
Alibek Omarov
9bb2870e38 travis: try to fix travis 2019-07-21 12:40:47 +03:00
Alibek Omarov
d9545e5e78 cl_game: fix missing } 2019-07-20 05:09:24 +03:00
Alibek Omarov
827105405f travis: enable building and publishing for AMD64. Use at your own risk! 2019-07-20 05:07:22 +03:00
Alibek Omarov
2f8fec6b70 Remove trailing spaces, convert mistakenly put spaces to tabs. The most useful commit ever. 2019-07-19 20:23:08 +03:00
Alibek Omarov
20ecfcd8e0 mainui: update 2019-07-19 17:24:25 +03:00
Alibek Omarov
b539ed5a3d engine: remove write_to_clipboard, as there was no way to enable it for a long time and no one even asked for this 2019-07-19 17:24:25 +03:00
Alibek Omarov
4eab7d6503 engine: fix build 2019-07-19 17:17:12 +03:00
Alibek Omarov
8a4239d48d wscript: disallow -Wparentheses 2019-07-13 23:26:19 +03:00
Alibek Omarov
cedc1e0eb2 engine: soundlib: show mpg123 errors in console 2019-07-13 23:25:55 +03:00
Alibek Omarov
4beba75159 engine: fix various compiler warnings 2019-07-13 23:25:03 +03:00
Alibek Omarov
a0cbac4fc7 engine: server: use generic SV_RejectConnection instead of directly sending errormsg 2019-07-13 20:59:43 +03:00
Alibek Omarov
9662ab106f engine: client: implement errormsg, secure client by checking server IP address we're connected to 2019-07-13 20:54:16 +03:00
Alibek Omarov
4e4a9827b1 defaults: remove dead macro 2019-07-13 19:49:27 +03:00
Alibek Omarov
04ee7c3a55 engine: fix build 2019-07-12 22:43:58 +03:00
Alibek Omarov
a85a856215 engine: implement connection warning dialog showing up, update menu 2019-07-12 22:42:13 +03:00
Alibek Omarov
9e30fc253f engine: gameui: add new extended API and declare old engine menu extensions deprecated 2019-07-12 22:42:13 +03:00
Alibek Omarov
b2895770b8 platform: remove unneeded argument from SNDDMA_Init 2019-07-12 22:42:13 +03:00
Jonathan Poncelet
37255354d4 Various: Fixed obscure crashes on Mac
There were a couple of out-of-range/post-free accesses going on, which caused the Mac
build to crash when optimisations were turned on.
2019-07-12 18:18:42 +03:00
Alibek Omarov
661b53d0b3 mainui: update to fix build 2019-07-11 20:55:07 +03:00
Alibek Omarov
56e256fc86 mainui: update 2019-07-11 04:00:42 +03:00
Alibek Omarov
1f7dfecf89 platform: posix: library: properly use directpath argument 2019-07-11 04:00:25 +03:00
Alibek Omarov
6f121b90c1 public: wscript: skip installation 2019-07-11 03:59:56 +03:00
Alibek Omarov
2d48e73f9d ref_gl: fix compiler warning, most useful commit 2019-07-11 03:59:39 +03:00
Alibek Omarov
58a747e8ac wscript: proper activation of sanitizer on Clang 2019-07-11 03:59:20 +03:00
Alibek Omarov
3bf5f19446 keys: fix default binding of ESC button after unbindall command 2019-07-11 03:57:09 +03:00
Alibek Omarov
da4062ede9 engine: cmd: add apropos command from old engine 2019-07-09 16:36:34 +03:00
Alibek Omarov
e700a7498e engine: move matchpattern from old engine 2019-07-09 16:36:15 +03:00
Alibek Omarov
6f27d05361 travis: ignore continuous branches [ci skip] 2019-07-09 16:04:45 +03:00
Alibek Omarov
baefab7e3d travis: remove repository deployment 2019-07-09 15:43:30 +03:00
Alibek Omarov
7dda1c28f4 engine: console: add missing hpk commands autocomplete 2019-07-09 15:23:55 +03:00
Alibek Omarov
364c96f45c engine: console: sort output in commmand autocomplete for bind 2019-07-09 15:11:50 +03:00
Alibek Omarov
7aa163f713 engine: console: implement autocomplete for any arg count, add autocomplete for bind for both keys and commands 2019-07-09 15:08:00 +03:00
Alibek Omarov
62fb743a20 engine: sound: clear leftovers from previous commit 2019-07-09 13:24:24 +03:00
Alibek Omarov
40211efa9a engine: sound: remove s_cull and s_phs, because they never worked. It's better to write our own occluder in future or use any opensource library 2019-07-09 13:17:10 +03:00
Alibek Omarov
be98a228a7 wscript: enforce hidden visibility 2019-07-09 04:53:25 +03:00
Alibek Omarov
1f7171462b vgui_support: properly EXPORT main entry point 2019-07-09 04:53:05 +03:00
Alibek Omarov
511d728337 ref_gl: remove unused static function 2019-07-09 04:52:40 +03:00
Alibek Omarov
61b39f4257 mainui: update 2019-07-09 03:48:09 +03:00
Alibek Omarov
3e4bd20919 engine: client: implement sending input devices list to server, using protinfo 2019-07-09 03:48:09 +03:00
Alibek Omarov
7d10660b87 engine: keys: give gamepad keys names 2019-07-09 03:48:09 +03:00
Alibek Omarov
6aa4765c3e engine: input: implement input devices collecting 2019-07-09 03:48:09 +03:00
Alibek Omarov
fa68108907 engine: input: adapt gamepad code for new engine, remove gamepad ids, as it was never used and probably will never be, small optimizations 2019-07-09 03:48:09 +03:00
Alibek Omarov
771c09226e ref_gl: patched to compile 2019-07-09 03:48:09 +03:00
Alibek Omarov
8d0ea1d03e wscript: disallow int-conversion 2019-07-09 03:48:09 +03:00
Andrey Akhmichin
83953c7fb3 Port ip filter and partially useragent from old engine. 2019-07-09 03:48:09 +03:00
Alibek Omarov
8b94443ba2 scripts: travis: make PRs succeed, add a note about moving to GitHub Releases 2019-07-08 19:10:49 +03:00
Alibek Omarov
5e8d3acc51 engine: build: fix ARM64 macro 2019-07-08 19:10:49 +03:00
Alibek Omarov
d347096396 engine: sound: allow cubic sound interpolation 2019-07-07 02:48:19 +03:00
Alibek Omarov
54920f13df engine: rename library naming function, as it returns a full path and not just library name 2019-07-07 02:47:45 +03:00
Alibek Omarov
d01a33814c readme: wording 2019-07-07 02:46:16 +03:00
Alibek Omarov
efd2e434b4 engine: fix build on non-x86 archs 2019-07-07 00:20:38 +03:00
Alibek Omarov
2202e13a61 ref_gl: fix #52 2019-07-07 00:17:03 +03:00
Alibek Omarov
7702a7a8d0 wscript: force /MT for msvc explicitly 2019-07-07 00:15:52 +03:00
Alibek Omarov
8320f0598f Merge 4529 update 2019-07-02 23:44:42 +03:00
Alibek Omarov
165c1622f8 mainui: update 2019-07-01 05:51:19 +03:00
Alibek Omarov
b8c0d7f59e port: clean-up old port header 2019-07-01 05:50:54 +03:00
Alibek Omarov
6197ba8af6 engine: ref: remove redutant LoadLibrary call 2019-07-01 05:50:31 +03:00
Alibek Omarov
89a3fd6323 engine: make use of platform-unique library naming scheme 2019-07-01 05:50:04 +03:00
Alibek Omarov
ec18dd9535 engine: implement platform-unique library naming 2019-07-01 05:48:53 +03:00
Alibek Omarov
bb4c73b25c engine: build: lower case operating system names 2019-07-01 05:47:38 +03:00
Alibek Omarov
90e0c070ac engine: network: refactor net_ws.c since winsock2 is linked directly to engine DLL, correct some signness 2019-07-01 04:03:18 +03:00
Alibek Omarov
83b7f795c1 travis: missed an OSX upload script 2019-07-01 00:51:25 +03:00
Alibek Omarov
0366035237 travis: add github releases uploader (#47) 2019-07-01 00:40:52 +03:00
Alibek Omarov
a8f7b4fc5c win32: lib: remove unused variable, fix error message may be not printed 2019-06-30 17:26:57 +03:00
Alibek Omarov
f2d588574c sdl: vid: fix engine window being restored immediately after being maximized 2019-06-30 16:19:34 +03:00
Alibek Omarov
0579ecd30f engine: check if client.dll linked to SDL2.dll (#37) 2019-06-29 23:56:50 +03:00
Alibek Omarov
b5d9bf5dc8 engine: add a function to determine if library has direct dependency on chosen DLL(Win32 only) 2019-06-29 23:25:50 +03:00
Alibek Omarov
413882a8d5 sdl: fix typos 2019-06-29 23:25:00 +03:00
Alibek Omarov
c92f8f71a7 sdl: vid: allow to build with earlier versions of SDL2 2019-06-29 22:59:13 +03:00
Alibek Omarov
a378379ac5 engine: network: link to Winsock2 directly 2019-06-29 22:01:32 +03:00
Alibek Omarov
bcb4c9a722 Merge remote-tracking branch 'nekonomicon/png' 2019-06-29 20:41:53 +03:00
Alibek Omarov
eb22ff53c4 sdl: vid: fix washed out screen on Windows and probably other platforms(#50) 2019-06-29 20:40:23 +03:00
Alibek Omarov
b1406e8ecd waf: fix multiprocess compilation with msvc 2019-06-26 16:41:58 +03:00
Night Owl
4eee187f1b engine: common: imagelib: add simple decoder/encoder for 8-bit RGB/RGBA PNG images. 2019-06-22 16:06:44 +05:00
Alibek Omarov
76a8fe4873 engine: use build.h for printing architecture and operating system, also implement architecture names from library naming scheme proposal (#39) 2019-06-21 17:25:43 +03:00
Alibek Omarov
f010e2be12 public: build: add a header that defines some build-time information, like target OS or platform 2019-06-21 17:20:57 +03:00
Alibek Omarov
7484c51490 appimage: fix packaging 2019-06-17 18:29:31 +03:00
Alibek Omarov
96c4044a6c appimage: use APPDIR enviroment variable to determine application directory 2019-06-17 15:45:28 +03:00
Alibek Omarov
3d9a97348e readme: update 2019-06-17 09:09:15 +03:00
Alibek Omarov
81b6c1c333 Documentation: move pages from GitHub Wiki here, GitHub Wiki now will be disabled 2019-06-17 09:05:20 +03:00
Alibek Omarov
a62cb2a93f readme: add note for debian/ubuntu prerequisites, add vgui-dev as submodule, update mainui 2019-06-17 09:04:39 +03:00
Alibek Omarov
e9f26fe29d port: don't define XASH_64BIT, as it defined by waf 2019-06-17 08:37:51 +03:00
Alibek Omarov
3ae7ecaeb3 engine: patched to compile, moved gl_clear to engine 2019-06-17 08:37:34 +03:00
Alibek Omarov
75e690791d vgui_support: wscript: don't test if current platform supports VGUI if one of checks has failed already 2019-06-17 08:21:56 +03:00
Alibek Omarov
f2c927906f Merge 4511 update 2019-06-17 07:36:46 +03:00
Alibek Omarov
61751cc306 readme: fix url to development builds 2019-06-13 01:25:21 +03:00
Alibek Omarov
ba11b849ed wscript: disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP 2019-06-13 00:49:27 +03:00
Alibek Omarov
014a09e222 appimage: fix AppRun shell-script POSIX compatibility 2019-06-12 22:14:12 +03:00
Alibek Omarov
b535c24edb editorconfig: initial add 2019-06-11 03:07:02 +03:00
Alibek Omarov
8d2bea03e0 filesystem: disable netpath code
This code was used in ancient approach, where executables and game files may have different path.
And this code was working only on Win32 with case-insensitive `getenv()`
2019-06-10 00:21:41 +03:00
mittorn
497ae6d269 Remove optimizations on mingw until game exports is marked 2019-06-08 20:36:29 +07:00
Alibek Omarov
e7eeba1de0 waf: update 2019-06-07 02:21:22 +03:00
Jonathan Poncelet
d14ce5ac39 SV_LoadProgs: Fixed potential memory leak if function failed (#46)
SV_LoadProgs: Fixed potential memory leak if function failed
2019-06-06 15:02:22 +03:00
Alibek Omarov
76dae35955 ref: remove COM_HashKey API call 2019-06-06 04:34:28 +03:00
Alibek Omarov
70d45f23de public: crclib now is part of public library 2019-06-06 04:33:57 +03:00
Alibek Omarov
9735dedf2f contrib: generate me an IDE project instead of updating it manually everytime 2019-06-06 04:02:06 +03:00
Alibek Omarov
a8cc5b7cef waf: update to 2.0.17, rename module dir to waifulib, remove some modules, as they moved to waf binary itself(see waifu project) 2019-06-06 03:26:45 +03:00
Alibek Omarov
003bbea358 engine: common: remove unneeded REF_DLL ifdef, keep #error anyway 2019-06-06 01:28:59 +03:00
Alibek Omarov
5be28ce93d readme: multirenderer is supported, so move it from planned 2019-06-03 16:53:23 +03:00
Alibek Omarov
647b2658d1 mainui: update 2019-06-02 12:28:10 +03:00
Alibek Omarov
85240f0145 filesystem: zip: use miniz header only library instead of zlib, add miniz generated header(stripped ZIP reading/writing code) 2019-06-02 12:27:58 +03:00
Alibek Omarov
9119635ed3 engine: wscript: fix broken wscript after revert, oops 2019-06-02 12:26:58 +03:00
Alibek Omarov
ab16867f6b Revert "wscript: add zlib library"
This reverts commit 9b68b0c1e2.
2019-06-02 11:22:18 +03:00
Mr0maks
73cf465ce4 Merge https://github.com/FWGS/xash3d-fwgs 2019-06-01 21:06:34 +05:00
Andrey Akhmichin
37181e410f waflib: fix wrong identation. 2019-06-01 18:59:24 +03:00
Alibek Omarov
1ffc593993 wscript: check for 64-bit only for Win/Linux/Mac and only on amd64
It's useless to force 32-bit code for everything, as GoldSrc exists only for Intel CPUs and Windows, Linux or OSX
2019-05-31 02:59:45 +03:00
Mr0maks
8ef383a4d3 wscript: fix spaces 2019-05-30 22:18:53 +05:00
Mr0maks
3023c8a72b Merge branch 'master' into master 2019-05-30 21:25:56 +05:00
Mr0maks
9b68b0c1e2 wscript: add zlib library 2019-05-30 09:38:53 +05:00
Mr0maks
01a33dcf7e filesystem: zip: remove 'big' block 2019-05-30 00:51:52 +05:00
Alibek Omarov
4000654deb engine: port: disable ARCH_SUFFIX set to "64" for 64-bit platforms, it would replaced with new library naming scheme in near future 2019-05-29 19:53:48 +03:00
Alibek Omarov
90ff7f24b3 sdl: vid: fix building with older SDL2 2019-05-29 18:41:43 +03:00
Mr0maks
b42f020ad5 filesystem: zip: warning else zip file is empty 2019-05-29 20:04:14 +05:00
Mr0maks
6422005716 filesystem: zip: remove commented code 2019-05-29 13:05:19 +05:00
Mr0maks
efc9048b43 filesystem: zip: zlib error code 2019-05-29 13:01:33 +05:00
Mr0maks
12bc507156 filesystem: zip: working unpack code 2019-05-28 18:51:44 +05:00
Mr0maks
f9a7ffa5e8 filesystem: zip: remove malloc 2019-05-28 15:04:08 +05:00
Alibek Omarov
b9a2f58e23 mainui: update 2019-05-28 04:15:44 +03:00
Alibek Omarov
b146f495fc Add gl-wes-v2 and nanogl submodules 2019-05-28 04:15:23 +03:00
Alibek Omarov
4a1f441151 waflib: xcompile: Android NDK r19c support 2019-05-28 04:13:19 +03:00
Alibek Omarov
94ec8cb997 wscript: add -fPIC for static libraries globally 2019-05-28 04:12:02 +03:00
Alibek Omarov
621e33fde2 engine: wscript: define XASH_64BIT on non-32 bits targets 2019-05-28 04:10:22 +03:00
Alibek Omarov
db72378806 engine: android: fix building custom dlsym with NDK r19c, clean-up 2019-05-28 04:09:47 +03:00
Alibek Omarov
d596f4ea52 engine: android: vid: fix building with NDK r19c 2019-05-28 03:55:54 +03:00
Alibek Omarov
6f2016db06 engine: imagelib: bmp: fix unaligned access 2019-05-28 03:55:22 +03:00
Alibek Omarov
27e742df12 engine: crclib: fix unaligned access 2019-05-28 03:55:04 +03:00
Alibek Omarov
86d823b877 engine: client: fix demo playback on ARM 2019-05-28 03:45:02 +03:00
Alibek Omarov
82697ca2a9 waflib: force_32bit: fix wrong DEST_SIZEOF_VOID_P when 64-bit build is allowed 2019-05-28 03:44:46 +03:00
Alibek Omarov
4606a18b25 wscript: add useful flags for clang also 2019-05-28 00:30:52 +03:00
Alibek Omarov
9145589414 waflib: xcompile: fix hardfp linking 2019-05-28 00:29:26 +03:00
Alibek Omarov
1d78d7c720 filesystem: fix even more char signness 2019-05-27 23:27:20 +03:00
Mr0maks
1cc2ec9095 filesystem: zip: codestyle 2 2019-05-27 23:02:38 +05:00
Mr0maks
5cf4e34607 filesystem: zip: codestyle 2019-05-27 20:44:14 +05:00
Mr0maks
b32de42ab7 filesystem: zip: fix memory leak (not freed info) 2019-05-26 23:04:17 +05:00
Mr0maks
b04a48f126 filesystem: zip: remove XASH_ZLIB macro 2019-05-26 20:12:41 +05:00
Mr0maks
3c0a34926a filesystem: zip: pk3 support 2019-05-26 00:38:21 +05:00
Mr0maks
039b42868d filesystem: zip: add FS_AddFileToZip 2019-05-25 23:24:34 +05:00
Mr0maks
671c247381 Merge branch 'master' of https://github.com/FWGS/xash3d-fwgs 2019-05-25 22:54:42 +05:00
Alibek Omarov
9048c108c4 engine: fix char default signness 2019-05-25 03:12:17 +03:00
Alibek Omarov
b797e0af1a Merge 4483 update 2019-05-25 02:44:24 +03:00
Mr0maks
85b5b4e965 filesystem: add support for zip files 2019-05-24 21:13:03 +05:00
Alibek Omarov
74062fab12 waf.bat: fix strange ERRORLEVEL bug 2019-05-23 22:28:35 +03:00
Alibek Omarov
67ce4cfbef travis: windows: die if waf has failed 2019-05-23 22:13:00 +03:00
Alibek Omarov
fe464af3ff ref_gl: fix msvc build 2019-05-23 22:10:35 +03:00
Alibek Omarov
45b091028b travis: comment mingw build until it's not stable 2019-05-23 22:01:06 +03:00
Alibek Omarov
00619d5795 travis: remove allow_failures, looks like it was copypasted from somewhere by mistake 2019-05-23 21:56:47 +03:00
mittorn
a2cba95a3a ref_soft: Merge pull request #1 from a1batross/master
update to latest API version
2019-05-13 01:17:47 +07:00
Alibek Omarov
fd962869e6 ref_soft: update to latest API version 2019-05-12 18:05:03 +03:00
Alibek Omarov
2e953bd1a9 ref_api: remove GL_OnContextCreated, remove return value of GL_RenderFrame 2019-05-12 18:02:59 +03:00
Alibek Omarov
57f9e7dda6 sdl: vid: fix forgotten return, slightly refactor SW_UnlockBuffer 2019-05-12 17:49:20 +03:00
Alibek Omarov
d14ce61520 engine: no return type for RenderFrame 2019-05-12 03:09:40 +03:00
Alibek Omarov
5af6506d86 engine: ensure that we loading same client library 2019-05-12 03:08:51 +03:00
Alibek Omarov
e9e4a1296d engine: android: fix possible crash in custom dlsym 2019-05-12 03:07:28 +03:00
Alibek Omarov
85c2126775 engine: android: implement egl context management 2019-05-12 03:06:55 +03:00
Alibek Omarov
a1391f3d0b engine: ref_api: comment unused opengl attributes 2019-05-12 03:06:01 +03:00
Alibek Omarov
bb8ba4225c ref_gl: show r_info after loading extensions, add GL_GetProcAddress call 2019-05-12 03:04:26 +03:00
Alibek Omarov
7d3e8c0a57 wscript: error on return-type, some android related changes 2019-05-12 03:03:34 +03:00
Alibek Omarov
55c3040db1 ref_gl: fix unaligned access in sprites 2019-05-12 03:02:01 +03:00
Alibek Omarov
90e4fbed31 port.h: temporarily disable hardfp postfix 2019-05-12 03:00:50 +03:00
Alibek Omarov
4819790272 engine: console: fix invalid REF_GET_PARM call 2019-05-11 18:52:32 +03:00
Alibek Omarov
f904ba53e2 wscript: fix typo 2019-05-06 19:25:10 +03:00
Alibek Omarov
e06b7412ac engine: wscript: don't build external launcher for Android and disable main() 2019-05-06 04:40:46 +03:00
Alibek Omarov
dec1b8dfb4 waflib: xcompile: even if hardfloat ABI is selected, force architecture name as armeabi-v7a, as armeabi-v7a-hard is completely virtual. Move options defines to main wscript 2019-05-06 04:11:12 +03:00
Alibek Omarov
c9b5332d16 waflib: subproject: preserve IGNORED_SUBDIRS between contexts, fix broken logic 2019-05-05 00:22:03 +03:00
Alibek Omarov
fe14a360b4 engine: fix fs_offset_t/size_t conversion, const qualifiers 2019-05-02 19:12:23 +03:00
Alibek Omarov
ab7a67464b engine: fix long<->int conversion UBs 2019-05-02 19:05:09 +03:00
Alibek Omarov
29a48cb34c sdl: vid: fix disabling vsync when loading a level 2019-05-02 18:07:27 +03:00
Alibek Omarov
3fef353291 android: initial port 2019-05-02 18:07:03 +03:00
Alibek Omarov
1a700fd06b platform: move MSGBOX implementation to platform backends 2019-05-01 19:44:48 +03:00
Alibek Omarov
e3e2f3afe5 platform: move Sys_ShellExecute implementation to platform backends 2019-05-01 19:21:47 +03:00
Alibek Omarov
87f380b90c waflib: xcompile: define both __ANDROID__ and ANDROID for compatibility 2019-05-01 19:03:23 +03:00
Alibek Omarov
3ebb4d0ea3 waflib: xcompile: check arch, configure 'M' uselib to m_hard on hardfp, remove linker select 2019-05-01 01:58:27 +03:00
Alibek Omarov
d4b4a4a864 waflib: xcompile: add support for ANDROID_NDK environment variable, as well as ANDROID_NDK_HOME. Fix help message. 2019-04-27 13:01:05 +03:00
mittorn
7663da80c3 ref_soft: Setup viewport 2019-04-17 07:17:43 +07:00
mittorn
bd6532fae4 wscript: Add shared lib flags to public 2019-04-17 06:42:34 +07:00
mittorn
25235b5296 ref_gl: remove Mod_SetCurrentLoadingModel call 2019-04-17 06:42:34 +07:00
mittorn
103077b686 ref_soft: clean unused variables 2019-04-17 06:34:01 +07:00
mittorn
fbef500fb3 ref_soft: Fix division by zero 2019-04-17 06:15:24 +07:00
mittorn
37ee9752e1 ref_soft: Update ref interface 2019-04-17 06:11:11 +07:00
Alibek Omarov
2c17af4850 engine: ref: fix possible null dereference, if client doesn't export studio renderer 2019-04-16 23:39:37 +03:00
Alibek Omarov
7d8b63fd88 ref: get rid of R_IncrementSpeedsCounter 2019-04-15 02:17:43 +03:00
Alibek Omarov
5be982cc72 ref: remove shared textures enum, instead use hardcoded texture names 2019-04-15 01:43:43 +03:00
Alibek Omarov
2d968cf328 ref: remove unused GL_BuildLightmaps export 2019-04-15 01:20:15 +03:00
Alibek Omarov
4d9563ea03 ref: make api thinner by removing IsNormalPass and moving CL_FxBlend to refdll 2019-04-15 01:19:05 +03:00
mittorn
a6572dd042 ref_soft: fix crash on map restart again 2019-04-15 04:59:05 +07:00
Alibek Omarov
d62a12dd9a ref: allow to use shortened name when specifying -ref in command line 2019-04-14 22:04:32 +03:00
mittorn
8a99d64139 ref_soft: fix blocksize 2019-04-14 06:20:22 +07:00
Alibek Omarov
99478ba9bd sdl: vid: fix unitialized variables, better warning report 2019-04-13 21:49:01 +03:00
mittorn
1c0262a8c4 ref_soft: Partial world luxels support 2019-04-14 00:58:14 +07:00
Alibek Omarov
211d3c5213 sdl: vid: refactor context creation, fix crash on exit on REF_SOFTWARE 2019-04-13 20:34:32 +03:00
Alibek Omarov
20c7c36996 ref_gl: remove dead WGL extensions 2019-04-13 19:39:49 +03:00
Alibek Omarov
228dab5965 ref_gl: move GLES and GL_STATIC defintions to gl_export.h. Add REF_GL_KEEP_MANGLED_FUNCTIONS, to keep use pgl instead of re-defining everything to gl. Used in conjuction with GL_STATIC 2019-04-13 19:39:22 +03:00
Alibek Omarov
4b955a320b ref_gl: allow gldebug for GL_STATIC. Rewrite extension querying for GLES. Allow gldebug for GLES(using GL_KHR_debug). ref_gles1 through nanogl now works 2019-04-13 19:38:41 +03:00
mittorn
ee67d350e3 ref_soft: Fix world unload. Improve lightmap sample detection 2019-04-13 20:50:27 +07:00
mittorn
60e3a78221 ref_soft: Implement texture free 2019-04-13 20:49:07 +07:00
mittorn
b2105a113c ref_soft: extended bsp support 2019-04-13 19:15:26 +07:00
mittorn
c293a7a26d ref_soft: update wscript 2019-04-13 19:14:07 +07:00
mittorn
d5911b33b1 msvc8 support 2019-04-12 14:33:57 +07:00
mittorn
f1638b09c5 waf: implement 'reconfigure' module 2019-04-12 02:45:23 +07:00
mittorn
741fcfb202 Add new build types, fix gcc colors 2019-04-12 00:19:40 +07:00
mittorn
54d54b1457 waf: fix python3 2019-04-12 00:19:12 +07:00
mittorn
d5b6ccb3e2 ref: REF_SOFTWARE support with SDL_Surface/SDL_Renderer 2019-04-11 22:19:08 +07:00
Alibek Omarov
6448964c37 vgui_support: remove miniutl submodule 2019-04-11 01:51:54 +03:00
Alibek Omarov
46378e3738 ref_gl: fix build 2019-04-11 01:41:52 +03:00
Alibek Omarov
b2038e76d3 waflib: subproject: carefully restore previous enviroment in configuration context 2019-04-11 01:38:00 +03:00
Alibek Omarov
eb650b71ad waflib: subproject: restore environment in build context 2019-04-11 01:32:19 +03:00
Alibek Omarov
968994bba5 ref_gl: add an option to disable ref_gl building 2019-04-11 01:26:33 +03:00
Alibek Omarov
3c1c13850e vgui_support: remove utl dependency, by porting new vgui support code from original engine, remove dead function definitions, remove dead vgui_main.h header from engine 2019-04-11 01:12:52 +03:00
Alibek Omarov
459f4a9788 scripts: waflib: introduce new waf plugin -- subproject, which makes easier use of standalone envs for each subdirectory 2019-04-11 00:15:48 +03:00
Alibek Omarov
d17fdea884 waflib: remove get_subproject_name function 2019-04-11 00:13:59 +03:00
mittorn
b20efff57c msdev: add line breaks to lines 2019-04-10 01:55:43 +03:00
mittorn
36159e6622 msdev: convert solution to list 2019-04-10 01:55:43 +03:00
mittorn
c953ba0852 msdev: add line breaks to solution 2019-04-10 01:55:43 +03:00
mittorn
b38ef43260 msdev: include solution file 2019-04-10 01:55:43 +03:00
mittorn
fea2395a80 msdev: fix 2019-04-10 01:55:43 +03:00
mittorn
ffaab11da9 msdev: add relative library paths 2019-04-10 01:55:43 +03:00
mittorn
f6b3603934 msdev: fix 2019-04-10 01:55:43 +03:00
mittorn
9421963b29 msdev: print abspath 2019-04-10 01:55:43 +03:00
mittorn
239c13da28 msdev: remove printing bld.root 2019-04-10 01:55:43 +03:00
mittorn
eb6f67ed07 msdev: print include paths 2019-04-10 01:55:43 +03:00
mittorn
c206e72f7b msdev: fix 2019-04-10 01:55:43 +03:00
mittorn
79e6ebbe23 msdev: fix 2019-04-10 01:55:43 +03:00
mittorn
d4638a9cf4 msdev: find relative include path 2019-04-10 01:55:43 +03:00
mittorn
7ccc9b0795 Revert "waf: try relative SDL2 path"
This reverts commit 50f0ae5234.
2019-04-10 01:55:43 +03:00
mittorn
6c1d911193 waf: try relative SDL2 path 2019-04-10 01:55:43 +03:00
Alibek Omarov
9587aacee3 mainui: update 2019-04-10 01:55:24 +03:00
Alibek Omarov
777562aea8 Revert "Revert "scripts: try to avoid race condition when MSVC writes to same pdb file in multiple threads""
This reverts commit a40d64d3a6.
2019-04-08 21:46:59 +03:00
Alibek Omarov
a40d64d3a6 Revert "scripts: try to avoid race condition when MSVC writes to same pdb file in multiple threads"
This reverts commit d87dd2a60a.
2019-04-08 21:36:48 +03:00
Alibek Omarov
7704d9b2ef wscript: add /FS to avoid race condition on PDB file(second try) 2019-04-08 21:34:41 +03:00
Alibek Omarov
d87dd2a60a scripts: try to avoid race condition when MSVC writes to same pdb file in multiple threads 2019-04-08 21:31:57 +03:00
mittorn
6403a265de Try fix python encoding again 2019-04-08 21:16:29 +03:00
mittorn
3fa4a36983 wscript: specifiy psapi version on win32 2019-04-08 21:15:05 +03:00
Alibek Omarov
8b16c30fb8 wscript: always optimize on MSVC(temporary) and always generate PDB using /Zi 2019-04-08 21:10:36 +03:00
Alibek Omarov
20a177c783 wscript: enable msvs.py, as it's handy for those who can actually install Python 2019-04-08 21:09:23 +03:00
Alibek Omarov
0840d9ec25 scripts: fix deploying vc2008 solution and empty vc2008 folder 2019-04-08 21:09:23 +03:00
Alibek Omarov
4124e01d65 scripts: enable deploying vc2008 project 2019-04-08 21:09:21 +03:00
Alibek Omarov
129325f3a4 scripts: waflib: add msdev.py tool by Michel Mooij, patched to support uselib, separate envs and so 2019-04-08 21:08:52 +03:00
Alibek Omarov
9cd22a98bd wscript: fix mistyped msvc flag 2019-04-08 21:08:50 +03:00
Alibek Omarov
6a6d21ed32 vgui_support: wscript: don't continue configuration if vgui_supoport can't be built 2019-04-08 21:08:17 +03:00
Alibek Omarov
041315da44 scripts: use waf install to generate packages 2019-04-08 21:08:15 +03:00
Alibek Omarov
aa30661c26 vgui_support: wscript: disable build on mingw 2019-04-08 21:07:02 +03:00
Alibek Omarov
031bac8d13 wscript: move msvc.py initialization BEFORE compiler_c, so we can set compiler with --msvc_version command line switch 2019-04-08 21:07:02 +03:00
mittorn
4dae13d7bc ref_soft: Add GAME_EXPORT to exports 2019-04-08 05:09:02 +07:00
mittorn
5140bb8d7f ref_soft: Use Q_memprint to report cache size 2019-04-07 22:29:48 +07:00
mittorn
320a3b0834 ref_soft: Fix cache flush on reconnect, fix division by zero in decals 2019-04-07 22:10:41 +07:00
mittorn
79405c7cc9 ref_soft: Fix polyset bounds checking 2019-04-07 15:52:27 +07:00
mittorn
99fa5d0252 ref_soft: Another bound check implementation (todo: compare) 2019-04-06 15:55:00 +07:00
mittorn
b584e89d90 ref_soft: add bounds checking in triangle render 2019-04-06 14:40:08 +07:00
mittorn
7f1491f884 ref_soft: Try fix crash on changelevel 2019-04-05 15:56:05 +07:00
Alibek Omarov
0cf1e3b1da ref: add REF_D3D placeholder for compatibiltiy(not planned anyway) 2019-04-04 23:13:55 +03:00
Alibek Omarov
441795943b ref_gl: move gl specific defines out from defaults.h, remove VIDEO_DONTCARE hack, automatically set XASH_GLES if wrapper is set 2019-04-04 23:13:17 +03:00
Alibek Omarov
a9cf3357c7 ref: move GLES driver hint to SetAttribute as we don't choose GLES renderer in compile-time anymore 2019-04-04 22:43:33 +03:00
mittorn
9fbb8a8201 ref_soft: Add alpha test for brushes to all rendermodes 2019-04-04 10:51:31 +07:00
mittorn
4aa5778606 ref_soft: Alpha support for additive/glow 2019-04-04 10:37:41 +07:00
mittorn
338b404055 ref_soft: clamp alpha values 2019-04-04 10:27:18 +07:00
mittorn
500ff629bf ref_soft: decrease alpha to make water visible again 2019-04-04 10:01:11 +07:00
mittorn
033a947631 ref_soft: set minor bits in alpha map to make it more accurate 2019-04-04 09:38:17 +07:00
mittorn
c08c35df69 ref_soft: FillRGBA, FillRGBABlend 2019-04-04 04:44:06 +07:00
mittorn
cefe42fd66 ref_soft: Fix R_NewMap, prevent crashes on changelevel/restart 2019-04-04 02:56:29 +07:00
mittorn
e0cd5edddb ref_soft: Ignore non-horizontal water planes 2019-04-04 02:38:57 +07:00
mittorn
ebd1da2730 ref_soft: Transform dlights for entitites 2019-04-04 02:00:24 +07:00
mittorn
4bbcd5daef ref_soft: Use r_math, this will fix beamfollow and glow sprites 2019-04-04 01:32:06 +07:00
mittorn
8d88ecb951 ref_soft: Remove more unused globals/functions 2019-04-04 00:29:35 +07:00
mittorn
b5e1382232 ref_soft: Merge some globals 2019-04-04 00:12:57 +07:00
mittorn
8f5c72c510 ref_soft: Add macro to disable texture filter preventing slowdown on cvar checking 2019-04-03 23:24:10 +07:00
mittorn
c52453faa3 ref_soft: Remove r_poly 2019-04-03 23:01:25 +07:00
mittorn
8c9aa2588c ref_soft: Fix studio rendermodes, add additive brush rendermode 2019-04-03 22:55:46 +07:00
mittorn
d03d29f6f5 ref_soft: Fix transparency in API 2019-04-03 22:21:08 +07:00
mittorn
77f8da275a ref_soft: Extend edge drawing with zbuffer support, draw transparent brushes with it 2019-04-03 22:20:33 +07:00
Alibek Omarov
84761e62ff Merge pull request #34 from x6herbius/netcode-reduce-failures
Prevented net send errors from triggering an entire host error
2019-04-01 23:04:00 +03:00
Jonathan Poncelet
60a1c4f0cc Prevented net send errors from triggering an entire host error 2019-04-01 20:17:13 +01:00
mittorn
0c6c0003b1 ref_soft: Bound texcoords again, disable drawing spans on FloorDivMod overflow 2019-04-01 02:42:13 +07:00
mittorn
1c49d76fb7 ref_soft: Fix some integer overflows 2019-04-01 01:55:37 +07:00
mittorn
714084bf5b ref_soft: Fix hang on big texcoords 2019-03-31 20:57:29 +07:00
mittorn
2efdf56317 ref_soft: fix particles 2019-03-31 19:07:55 +07:00
mittorn
7fc09da482 ref_soft: TriAPI texturing, rendermodes 2019-03-31 18:00:25 +07:00
mittorn
d315a838bd ref_soft: invalidata all caches on dlight rebuild 2019-03-31 03:44:57 +07:00
mittorn
6879c1f097 ref_soft: Remove R_ConcatTransform, try fix transparent bmodels origin 2019-03-31 03:18:03 +07:00
mittorn
25860f6263 ref_soft: remove some unused globals 2019-03-31 02:05:08 +07:00
mittorn
c52d4b7998 ref_soft: Restore lightmap gamma calculation 2019-03-30 21:16:14 +07:00
mittorn
0c62967d8a ref_soft: re-enable lightstyles for LightPoint 2019-03-30 21:04:14 +07:00
mittorn
f34db62940 ref_soft: Add sprite, EFX 2019-03-30 20:24:58 +07:00
Alibek Omarov
77b23eec9f ref_gl: add options for linking-in nanogl and glwes(thus getting GLES1 and GLES2 renderers) and static gl 2019-03-30 03:10:43 +03:00
Alibek Omarov
f4bcea6182 ref_gl: don't use dxt on gles 2019-03-30 03:09:07 +03:00
Alibek Omarov
ea6a86a83d ref_gl: bring back GL_STATIC option 2019-03-30 03:08:44 +03:00
Alibek Omarov
47879942bb ref_gl: remove dead extensions from GLES code 2019-03-30 03:07:52 +03:00
Alibek Omarov
6c006e087d common: don't use SDL headers and types in refdll, if for some reason dll wants it 2019-03-30 03:06:23 +03:00
Alibek Omarov
8385563bef engine: fix possible crash during exit 2019-03-30 01:29:40 +03:00
Alibek Omarov
f9f96552b7 travis: move mingw engine build to standalone VM 2019-03-30 01:29:40 +03:00
mittorn
b0ed8a5ba3 ref_soft: Fix some UB 2019-03-30 04:50:18 +07:00
mittorn
ca3913cd88 fix windows build 2019-03-30 00:43:49 +03:00
Alibek Omarov
8b07916598 scripts: travis: fix deployment, finally 2019-03-29 23:57:44 +03:00
Alibek Omarov
5f122a7435 travis: experiment to move apt addons under stage 2019-03-29 23:49:33 +03:00
Alibek Omarov
50c656df94 scripts: travis: fix upload to yadisk 2019-03-29 23:48:34 +03:00
Alibek Omarov
5436658ce7 scripts: travis: accept everything when installing python from choco 2019-03-29 23:40:25 +03:00
Alibek Omarov
d7ea40d850 scripts: remove waf jobs, as waf smart enough to get CPU number, fix upload archive name for osx, install newer python in windows 2019-03-29 23:32:06 +03:00
Alibek Omarov
184ca6517c travis: oops, forgot to set OSes 2019-03-29 23:22:47 +03:00
Alibek Omarov
f4c36f49db travis: another try to fix matrices 2019-03-29 23:21:40 +03:00
Alibek Omarov
ae26783902 scripts: travis: yet another workaround for mingw... 2019-03-29 23:11:39 +03:00
Alibek Omarov
45fdd74dd2 travis: fix matrices 2019-03-29 23:11:20 +03:00
Alibek Omarov
880a9651d8 scripts: travis: use stages, use yandex disk as temporary place for build artifacts 2019-03-29 22:51:31 +03:00
mittorn
95ff769020 ref_soft: Add option to disable slow brush transparency 2019-03-30 02:41:36 +07:00
mittorn
9b158f5926 ref_soft: Studio alpha blending 2019-03-30 01:34:57 +07:00
mittorn
29c2169012 ref_soft: improve alpha map 2019-03-29 21:37:21 +07:00
Alibek Omarov
db30358d06 travis: fix osx archive name, remove unneeded envvars on osx, try to fix windows python 2019-03-29 06:08:41 +03:00
Alibek Omarov
ebbe22b09a travis: force newer python for windows 2019-03-29 05:52:55 +03:00
Alibek Omarov
752dd13c04 scripts: travis: uncomment osx packaging 2019-03-29 05:44:36 +03:00
Alibek Omarov
469a080000 travis: add windows, test commit up 2019-03-29 05:42:20 +03:00
Alibek Omarov
efc12f1045 scripts: travis: test windows scripts 2019-03-29 05:39:41 +03:00
Alibek Omarov
becb58223a scripts: travis: rewrite deploy script with commit up support 2019-03-29 05:26:01 +03:00
mittorn
56ef16b0f9 ref_soft: enable stiple alpha by default, cache conveyors 2019-03-29 03:52:08 +07:00
mittorn
eeda097603 ref_soft: Fix water 2019-03-29 02:13:45 +07:00
mittorn
77e296ffef ref_soft: Add r_poly, transparent brushes support 2019-03-29 02:02:54 +07:00
Alibek Omarov
f48335f2f2 ref: get rid of fov in globals, add RenderFrame wrapper, which correctly initialize shared global values 2019-03-28 18:17:58 +03:00
Alibek Omarov
8b5926f9b1 ref_gl: fix alpha in menu (and anywhere else where triColor4ub is used) 2019-03-28 18:17:58 +03:00
mittorn
72d5dfed34 ref_soft: Fill sky, enable turb code (not working correctly) 2019-03-28 03:42:28 +07:00
mittorn
7f8caf1634 ref_soft: Fix crash on glowshell, tune decals blending 2019-03-28 02:33:49 +07:00
mittorn
1871f39b2b ref_soft: Decals support 2019-03-28 02:05:19 +07:00
mittorn
6eae7acd34 ref_soft: lightstyle support 2019-03-27 21:34:37 +07:00
mittorn
36a5247181 ref_soft: bmodel dlights (ignore transform) 2019-03-27 21:16:33 +07:00
mittorn
153b8cbcc3 ref_soft: Xash3D lightmaps and dynamic lighting (world only) 2019-03-27 21:09:44 +07:00
mittorn
44a8ede94d ref_soft: Re-enable lightvec calculation 2019-03-27 20:17:58 +07:00
mittorn
529bb53d52 ref_soft: Static quake-based lightmap (does not work with extended bsp) 2019-03-27 19:57:37 +07:00
mittorn
b35415637b ref_soft: colormap support, basic studiomodel lighting 2019-03-27 17:53:42 +07:00
mittorn
35e42a2295 ref_soft: Viewmodel support 2019-03-26 22:57:34 +07:00
Alibek Omarov
0b13bf393f vgui_support: wscript: set default vgui-dev repo path, check OS in configuration stage 2019-03-26 16:28:40 +03:00
Alibek Omarov
58b5e1a9df wscript: introduce shortened frequently used configuration options 2019-03-26 16:26:02 +03:00
mittorn
dbabb861f2 ref_soft: studiomodel texturing, finally fix TRIANGLE_STRIP 2019-03-26 16:39:16 +07:00
mittorn
224bf07930 ref_soft: Fix TRIANGLE_STRIP draw 2019-03-26 06:01:20 +07:00
mittorn
870ae030ca ref_soft: Simple triapi and studio rendering (flat fill only) 2019-03-26 05:53:00 +07:00
mittorn
9ba39f65b3 ref_soft: Triangle drawing 2019-03-26 03:12:35 +07:00
mittorn
3d8fe065b5 ref_soft: Fix windows build 2019-03-25 21:18:47 +07:00
mittorn
513381a322 ref_soft: Flush caches and clear textures on newmap correctly 2019-03-25 11:59:25 +07:00
mittorn
c36f415793 ref_soft: Do not clip submodels with negative topnode content (fix crash on some maps) 2019-03-25 11:46:37 +07:00
Alibek Omarov
17f719558c wscript: move build env setup to main wscript 2019-03-25 01:25:44 +03:00
mittorn
3617e8e7a1 ref_soft: REF_SOFTWARE, resize support 2019-03-25 03:34:30 +07:00
Alibek Omarov
70abee3e28 Merge pull request #32 from iZarif/cf749c8c
vgui_support/wscript fix indentation
2019-03-24 19:14:21 +03:00
iZarif
37defbbd14 vgui_support/wscript fix indentation 2019-03-24 20:00:49 +04:00
mittorn
65cf77c32b ref_soft: declare r_bsp.c functions 2019-03-24 02:03:29 +07:00
mittorn
e0ce5640d1 ref_soft: Separate buffer for transparent textures 2019-03-23 18:49:27 +07:00
mittorn
e7f369a765 ref_soft: Fix breaking server vis, transparent texture decoding 2019-03-23 14:50:53 +07:00
mittorn
58429bbc79 ref_soft: submodel drawing 2019-03-23 13:49:55 +07:00
mittorn
5fc39662ec ref_soft: Increase limits again, this will fix some HL maps 2019-03-23 05:43:41 +07:00
mittorn
4c73f026b2 ref_soft: Fix render setup 2019-03-23 05:39:45 +07:00
mittorn
932ad73441 ref_soft: Add OpenMP for blit and 2d draw 2019-03-23 03:25:57 +07:00
mittorn
bf0d694c71 ref_soft: mipmap support 2019-03-23 02:37:56 +07:00
mittorn
a2e689aba3 ref_soft: Fix crash on x86 2019-03-23 01:19:15 +07:00
mittorn
c82eb39d54 ref_soft: Skip sky and transparent surfaces (increase FPS) 2019-03-23 00:49:46 +07:00
mittorn
a00256a61c ref_soft: Update API 2019-03-23 00:46:57 +07:00
mittorn
842a15ee45 ref_soft: Merge kernel texture filter 2019-03-22 23:58:43 +07:00
mittorn
e7785c9ccb ref_soft: Make it draw something, screen settings still wrong 2019-03-22 23:40:27 +07:00
Alibek Omarov
62f04137a5 engine: hide ref calls under Host_IsDedicated checks, replace ref function ptr checks by \!Host_IsDedicated 2019-03-22 18:41:57 +03:00
Alibek Omarov
5f849c4823 engine: bring back XASH_USE_SELECT. I need somehow disable this only on my work PC 2019-03-22 18:29:42 +03:00
Alibek Omarov
b09242e41c engine: fix dedicated check 2019-03-22 18:26:44 +03:00
Alibek Omarov
1538bc609d vgui_support: wscript: automatically disable vgui_support build on unsupported CPU type 2019-03-22 18:22:49 +03:00
Alibek Omarov
26616314f8 engine: add initial support for MCST Elbrus 2019-03-22 18:21:47 +03:00
Alibek Omarov
1483b21f00 Merge branch '0.20-renderdll' 2019-03-22 18:19:13 +03:00
Alibek Omarov
743c5ca8d5 engine: make dedicated work again 2019-03-22 16:47:52 +03:00
Alibek Omarov
92b89936b3 ref: make API thinner by moving simple calls into EngineGetParm(RenderGetParm with ref extensions), fix some UBs 2019-03-22 16:36:46 +03:00
mittorn
2b521ee201 ref_soft: Copy world renderer from zq/q2, does not render anything now 2019-03-22 19:33:14 +07:00
Alibek Omarov
8abbef8dbd scripts: try to workaround mingw bug by adding sse2 2019-03-21 17:47:16 +03:00
Alibek Omarov
59f3b63e0a ref_gl: wscript: fix libm linking 2019-03-21 17:31:18 +03:00
Alibek Omarov
6a6f341c07 Merge pull request #22 from FWGS/netsplit
Extended netsplit, network extensions
2019-03-21 17:23:49 +03:00
mittorn
ce27aad67b ref_soft: Fix alpha blending, optimize blitting 2019-03-21 17:56:42 +07:00
mittorn
6784b9062e ref_soft: hide color loops to macro 2019-03-20 21:55:04 +07:00
mittorn
f23ecc6895 ref_soft: Implement rendermodes, colors, alpha textures/blending 2019-03-20 21:44:21 +07:00
mittorn
ae6b460f35 ref_soft: Implement internal color tables 2019-03-20 15:26:53 +07:00
Alibek Omarov
402a596415 ref: add EXPORT to GetRefAPI, so MSVC will create *.lib file and not confuse waf or dynamic linker 2019-03-20 02:42:44 +03:00
Alibek Omarov
52eb84d34b mainui: update 2019-03-20 02:41:44 +03:00
Alibek Omarov
f3a2f46fb3 wscript: remove libm linking to static public, it's useless. Correct include path order 2019-03-20 02:40:47 +03:00
Alibek Omarov
4880ca3ca2 engine: move EXPORT definition to xash3d_types 2019-03-20 02:38:37 +03:00
Alibek Omarov
121c72c9e0 Merge origin/master into ref_dll 2019-03-20 02:38:13 +03:00
Alibek Omarov
e20e114643 miniutl: update 2019-03-20 01:21:10 +03:00
Alibek Omarov
7e08104631 ref_gl: fixes for MSVC 2019-03-20 01:20:58 +03:00
Alibek Omarov
7aa7f4dbbd engine: fix broken win32 types after moving more definitions to xash3d_types.h 2019-03-20 01:18:26 +03:00
Alibek Omarov
fb6fd61cd9 public: initial moving some common code into static public library, that can be linked to any engine part 2019-03-20 01:17:46 +03:00
mittorn
1ca28badad ref_soft: initial 2D drawing implementation 2019-03-20 04:29:25 +07:00
mittorn
34da3e0ccd ref: clear draw entities when clearing edicts 2019-03-18 00:56:38 +07:00
mittorn
0a22040c6e Fix SpriteTexture 2019-03-17 23:41:11 +07:00
mittorn
c55b7dcda7 ref: simplify efx api, move efrags to engine 2019-03-17 23:14:53 +07:00
mittorn
78f8932313 Fill client RenderAPI 2019-03-17 21:58:26 +07:00
mittorn
f00181223f Remove duplicate R_ClearScene 2019-03-17 21:56:29 +07:00
mittorn
bf2f829382 Disable Mod_ClearUserData in SV_UnloadProgs (it is still called on restart) 2019-03-17 21:26:38 +07:00
mittorn
297ca08e81 ref: replace model (un)loading by Mod_ProcessRenderData 2019-03-17 21:19:24 +07:00
mittorn
8339096ad8 ref: Improve model unloading, fix texture leak 2019-03-17 18:26:57 +07:00
mittorn
3d39d78e53 ref: fix hud sprites 2019-03-16 19:21:32 +07:00
mittorn
00ce909fc8 Setup renderer time 2019-03-16 18:51:30 +07:00
mittorn
aabf5f5621 ref: remove convar_t from renderer, disable engine-related definitions in mod_local 2019-03-16 18:15:05 +07:00
mittorn
9c6352ec57 ref: move tracer color cvars to ref 2019-03-16 17:49:07 +07:00
mittorn
7382fc7c49 mobility: add stub for touch (hlsdk-xash3d compatibility 2019-03-16 17:48:12 +07:00
mittorn
5fa9632ec0 fix studiomodel textures 2019-03-16 17:24:32 +07:00
mittorn
db78726656 ref: implement ASSERT macro 2019-03-16 17:23:41 +07:00
mittorn
57320c0c25 ref: get rid of vidState, add GL_SwapBuffers to engine exports 2019-03-16 11:58:44 +07:00
mittorn
31ab710485 Fix sprite loading 2019-03-16 11:27:15 +07:00
mittorn
4247af8fa8 Reduce engine dependencies. crtlib/mathlib/matrixlib now can be built standalone 2019-03-16 11:18:43 +07:00
Alibek Omarov
e5000742f1 ref: context creating prototype, not working yet 2019-03-16 05:15:32 +03:00
Alibek Omarov
971f9b6de5 ref: fix compiling errors 2019-03-16 04:24:27 +03:00
Alibek Omarov
199ebfed48 ref: implement engine ref API 2019-03-16 04:17:56 +03:00
Alibek Omarov
97aba69ed0 ref: implement API interface for ref_gl, get rid of RenderAPI, RenderInterface and vgui_support API references 2019-03-15 21:23:59 +03:00
Alibek Omarov
234507b7f1 ref: fix all undefined references 2019-03-11 17:37:58 +03:00
Alibek Omarov
d0d5fd1a3f ref: fix some undefined references, compile-in mathlib and crtlib to refdll 2019-03-06 17:14:25 +03:00
Alibek Omarov
e7234bada2 ref: now it compiles, not linking yet. ref_api header moved to engine/ to clarify, that it's sort of engine internals 2019-03-06 16:23:33 +03:00
Alibek Omarov
94cbb4e1e0 wscript: fix wrong dedicated skip subproject check 2019-03-03 03:38:02 +03:00
mittorn
437ba6d7a2 ref:Fix some clgame, world and renderapi usages, import renderapi funcs from engine 2019-02-27 06:23:03 +07:00
Alibek Omarov
574f03c139 ref: initial engine to ref API draft, not compiling, work in progress [ci skip] 2019-02-24 18:45:44 +03:00
Alibek Omarov
c3abec5127 readme: add missed newlines 2019-02-24 01:11:23 +03:00
Alibek Omarov
a69bda0b9b readme: add note about commit tags 2019-02-24 01:09:35 +03:00
mittorn
576b78799e readme: fix links 2019-02-24 05:47:57 +07:00
Gianluca Boiano
faee030740 Updated instructions for Arch Linux 2019-02-24 00:19:52 +03:00
mittorn
8b5c5826a8 legacymode: prevent dropping from server when fps too high 2019-02-24 02:48:53 +07:00
Alibek Omarov
e193ac2c04 ref: more @mittorn's changes on RefAPI 2019-02-23 21:49:46 +03:00
Alibek Omarov
ee4744e7cd Merge pull request #25 from M0Rf30/master
fixed taberror: inconsistent use of tabs and spaces in indentation
2019-02-23 19:22:08 +03:00
Gianluca Boiano
142a38f3dc fixed taberror: inconsistent use of tabs and spaces in indentation 2019-02-23 15:51:03 +01:00
Alibek Omarov
e50b91b559 Update note on 64-bit engine [ci skip] 2019-02-23 13:46:16 +03:00
Alibek Omarov
2bf2b95b3a Correct & simplify CONTRIBUTING.md 2019-02-23 13:46:16 +03:00
Alibek Omarov
94cfe1217a Create CONTRIBUTING.md 2019-02-23 13:46:16 +03:00
Alibek Omarov
dbb4b2c1f9 Fix some mistypes [ci skip] 2019-02-23 13:46:16 +03:00
Alibek Omarov
6ede01ea05 Fix italic to bold [ci skip] 2019-02-23 13:46:16 +03:00
Alibek Omarov
2ecfa20f94 Fix formatting [ci skip] 2019-02-23 13:46:16 +03:00
Alibek Omarov
48808e4ede Update readme [ci skip] 2019-02-23 13:46:16 +03:00
Alibek Omarov
955dde6d5f Create README.md 2019-02-23 13:46:16 +03:00
mittorn
7299ee9f11 Try fix mingw linking 2019-02-23 18:32:49 +07:00
Alibek Omarov
5e17b4bf17 wscript: remove useless option type specifier 2019-02-19 17:55:45 +03:00
Alibek Omarov
2c17dce25b wscript: check for dedicated or singlebinary before recurse into subdirectory, add a chance to skip some subprojects on configuration stage 2019-02-19 17:49:09 +03:00
Alibek Omarov
1b372115a5 wscript: move options to subgroups, reorder option plugins loading 2019-02-19 16:33:14 +03:00
Alibek Omarov
99bd7c81da ref: render code moved out of engine, doesn't compile, first API prototype 2019-02-18 21:25:26 +03:00
mittorn
2b1ed2b20a Merge branch 'master' into netsplit 2019-02-08 07:59:52 +00:00
mittorn
f7c60ea9d1 vbo: Fix return value 2019-02-07 04:58:18 +07:00
mittorn
119b458b0f vbo: optimize buffer usage, fix some rendermodes 2019-02-07 04:35:42 +07:00
mittorn
d913ef0fc4 Port r_studio_drawelements render 2019-02-07 02:36:34 +07:00
mittorn
bccc0e63d5 Port VBO world renderer 2019-02-07 00:40:38 +07:00
mittorn
23d0f33ad1 Refactor extension detection, add VBO detection 2019-02-07 00:36:15 +07:00
mittorn
ddd17fe238 client: clear usermessages 2019-02-05 01:28:39 +07:00
mittorn
b1e3fa5f4d http: fix uninitialized progress value 2019-02-05 01:11:12 +07:00
mittorn
e99ca5947b legacymode: resource list support 2019-02-05 01:10:26 +07:00
mittorn
932cf03a29 mainui: update 2019-02-04 23:54:12 +07:00
mittorn
c09190f66e legacymode: add legacy infokey for legacy servers 2019-02-04 23:53:46 +07:00
mittorn
1d9b5d4611 http: remove unneeded platform-depended macros 2019-02-03 16:37:58 +07:00
mittorn
e05c1ed912 HTTP download support 2019-02-02 05:15:59 +07:00
mittorn
7b36796f41 Merge pull request #20 from x6herbius/improve-logging
Made various log messages more informative
2019-02-01 05:59:35 +00:00
Jonathan Poncelet
69bb25bb18 Updated a couple of messages as per pull request 2019-01-31 13:31:27 +00:00
Alibek Omarov
398d6007be Merge branch 'master' into resource 2019-01-30 22:14:13 +03:00
Alibek Omarov
4d63eb4413 sv_game: fix pfnSetModel theoretically may ignore precached models 2019-01-30 21:55:53 +03:00
Alibek Omarov
8770bdc694 keys: allow autorepeat for menu and console for any keys 2019-01-30 21:47:05 +03:00
Alibek Omarov
74f935d94f common: fix COM_IsSafeFileToDownload extension check 2019-01-30 21:39:50 +03:00
Alibek Omarov
cd30812607 sv_frame: fakeclients must be kicked on changelevel(GoldSrc compatibity) (port from Old Engine #b5b493) 2019-01-30 20:09:43 +03:00
mittorn
8b30a7631d Merge branch 'master' into resource 2019-01-30 13:38:36 +00:00
mittorn
a169f93b9f legacymode: fix netsplit settings 2019-01-30 18:56:52 +07:00
mittorn
f786ea65f5 Fix default splitsize 2019-01-30 18:41:45 +07:00
mittorn
b578d44ea2 Fix NET_EXT_SPLITSIZE console reporting 2019-01-30 16:15:57 +07:00
mittorn
40574d9be0 Network extensions 2019-01-30 16:06:32 +07:00
mittorn
7bb8124b69 legacymode: Mark old netsplit extension legacy, fix magic number 2019-01-30 15:14:43 +07:00
mittorn
2b1d4f4377 Fix zero maxsize for reliable 2019-01-30 14:48:43 +07:00
mittorn
31a53f4842 Fix cl_dlmax bounds 2019-01-30 14:11:49 +07:00
mittorn
f3468c0321 Fix Netchan_Setup arguments 2019-01-30 14:04:29 +07:00
mittorn
23af5dcaf1 In-game fragment size setting 2019-01-30 13:56:08 +07:00
mittorn
097974bde2 Check cl_dlmax sizes on client 2019-01-30 13:38:32 +07:00
mittorn
a97d8c119b network: enable new netsplit, netsplit size settings 2019-01-30 03:44:48 +07:00
mittorn
480ef0a468 legacymode: add netsplit support (incoming only) 2019-01-29 19:01:21 +07:00
mittorn
f044a59984 Port old netsplit implementation 2019-01-29 17:29:31 +07:00
mittorn
f3ae5159cb Add endian conversion macros 2019-01-29 17:27:36 +07:00
mittorn
52fca4ac0c legacymode: send identification 2019-01-29 17:00:40 +07:00
mittorn
98bf05b948 identification: fix network device detection 2019-01-29 16:38:19 +07:00
mittorn
bbd4c1315e legacymode: implement clc_userinfo 2019-01-29 02:33:30 +07:00
Jonathan Poncelet
35869586c9 Made various log messages more informative 2019-01-28 18:32:29 +00:00
mittorn
ed049ea539 Implement --single-binary and --stdin-input options 2019-01-28 14:09:06 +00:00
Alibek Omarov
6ba406be7d legacymode: some codestyle fixes 2019-01-27 03:02:16 +03:00
Alibek Omarov
860d3be42d demo: draw recording message a bit higher 2019-01-27 02:42:28 +03:00
Alibek Omarov
0801922466 cvar: don't change cvars without FCVAR_GLCONFIG variable during opengl.cfg reading 2019-01-27 02:27:12 +03:00
Alibek Omarov
103a2fccaa sdl: vid: rework safegl option 2019-01-27 02:26:23 +03:00
Alibek Omarov
cb7820b45b mainui: update 2019-01-26 23:54:11 +03:00
mittorn
1a6fd72d19 legacymode: fix choke counter 2019-01-27 02:48:09 +07:00
mittorn
5e65df3c2a legacymode: fix numFields for movevars_t 2019-01-27 02:47:43 +07:00
mittorn
b534422aed Clean delta when getting delta from server 2019-01-27 02:06:21 +07:00
mittorn
1866c00789 legacymode: fix dedicated server build 2019-01-26 17:53:38 +00:00
Alibek Omarov
1162e5a65b legacymode: retry connecting using legacy protocol automatically 2019-01-26 20:47:19 +03:00
Alibek Omarov
5da11291a2 legacymode: support server scanning 2019-01-26 18:54:23 +03:00
Alibek Omarov
042d2e436c mainui: update 2019-01-26 14:31:02 +03:00
Alibek Omarov
2da65ab122 Update submodules 2019-01-26 14:31:02 +03:00
Alibek Omarov
8c668b29c6 mainui: update 2019-01-26 14:31:02 +03:00
Alibek Omarov
75643895ef vgui_support: switch to free miniutl 2019-01-26 14:31:02 +03:00
mittorn
6a02a571c1 Legacy protocol compatibility (cl_legacymode) 2019-01-25 20:54:05 +07:00
mittorn
1e5f12a0ae Fix crash on broken model 2019-01-25 20:54:05 +07:00
Alibek Omarov
a297a0b5ad wscript: fix git commit hash 2019-01-13 16:46:50 +03:00
Alibek Omarov
9da413b2cc waf: add clang compilation database support 2019-01-13 16:46:12 +03:00
Alibek Omarov
0ca0dc9731 travis: fix packaging mingw build 2019-01-13 18:26:00 +05:00
Alibek Omarov
7205f2d4fa sound: sdl: use SDL_setenv for crossplatform 2019-01-13 18:19:35 +05:00
Alibek Omarov
196c311113 wcon: fix implicit declaration 2019-01-12 03:13:03 +03:00
Alibek Omarov
0409107ee2 scripts: appimage: fix generating extras.pak 2019-01-12 03:01:50 +03:00
Alibek Omarov
c8035c1adf host: fix implicit declaration on Win32 builds 2019-01-12 02:53:41 +03:00
Alibek Omarov
5fda638edf host: fix compiling error 2019-01-12 02:48:56 +03:00
Alibek Omarov
ed05519c60 host: rearrange conditionals in Host_CalcFPS for better readability 2019-01-11 23:20:35 +03:00
Alibek Omarov
ac77bab967 sound: opensles: same fix applied for OpenSLES/Android backend 2019-01-07 04:17:40 +03:00
Alibek Omarov
9935e2c8d3 sound: sdl: set pulseaudio environment variables regardless of target OS, because PA is crossplatform 2019-01-07 04:09:55 +03:00
Alibek Omarov
80fc7209ed sound: move related function declarations to platform header. Remove unused. 2019-01-07 04:07:06 +03:00
Alibek Omarov
908082097f wscript: error on implicit function declaration by default on any build type. Remove redutant Options import. 2019-01-07 03:59:56 +03:00
iZarif
245533defa wscript: SUBDIRS loop refactor 2018-12-30 20:39:17 +03:00
Alibek Omarov
b8c4c31e02 Merge 4344 update 2018-12-30 01:51:02 +03:00
Alibek Omarov
626df3673c Fix missing newline after exec userconfig.cfg 2018-12-25 06:12:01 +03:00
Alibek Omarov
3a288ffe4a Merge pull request #12 from Slipyx/misc
Add the 'sleeptime' cvar and behavior from the 'Old Engine'.
2018-12-23 16:32:48 +03:00
Josh K
422e511aac Added the 'sleeptime' cvar and behavior from the 'Old Engine'. 2018-12-23 07:32:13 -05:00
Alibek Omarov
621cdba53c engine: android: restore OpenSL ES audio 2018-12-20 10:22:04 +03:00
Alibek Omarov
e7ddc6d6c5 engine: android: restore dlsym hack for old Android(<5.0) 2018-12-20 10:15:44 +03:00
Alibek Omarov
b1a06baf83 wscript: link -llog on Android 2018-12-20 10:15:08 +03:00
Alibek Omarov
c3c0954613 mainui: update 2018-12-20 10:14:45 +03:00
Alibek Omarov
463a339a09 wscript: initial support for building on Android 2018-12-20 09:48:22 +03:00
Alibek Omarov
71cae6b02b waflib: add xcompile helper plugin intended to integrate with platform SDKs, like Android NDK 2018-12-20 09:44:51 +03:00
Alibek Omarov
ccac3e9cfc wscript: try to fix linking vgui on osx 2018-12-19 07:12:45 +03:00
Alibek Omarov
aac44ef866 waflib: try to fix sdl2 searching on osx again 2018-12-19 06:57:54 +03:00
Alibek Omarov
5d6d6c766e scripts: sdl2: fix finding sdl2 on osx 2018-12-17 03:11:41 +03:00
Alibek Omarov
28e6dec4b0 scripts: osx: fix path to SDL2 framework 2018-12-17 02:59:57 +03:00
Alibek Omarov
e2606cf97f scripts: stop executing script and print config.log, if waf was failed. 2018-12-17 02:53:00 +03:00
Alibek Omarov
cfea381c84 vgui_support: wscript: fix finding VGUI on osx, simplify sanity check 2018-12-17 02:36:14 +03:00
Alibek Omarov
bd7e2fe88d wscript: use no-undefined only on gcc 2018-12-17 02:35:37 +03:00
Alibek Omarov
30c32b0088 waflib: sdl2: fix finding sdl2 on osx 2018-12-17 02:34:49 +03:00
Alibek Omarov
95ce9fc00f wscript: explicitly set language when checking library 2018-12-16 17:10:01 +03:00
Alibek Omarov
a580e98f28 waflib: force_32bit: try to fix passing additional flags to generate 32bit code on MacOSX 2018-12-16 17:01:12 +03:00
Alibek Omarov
2072f5c276 scripts: fix travis scripts after refactoring wscript 2018-12-13 18:44:13 +03:00
Alibek Omarov
28c47a5c86 scripts: fix travis scripts after refactoring wscripts 2018-12-13 18:43:33 +03:00
Alibek Omarov
08dd632d87 wscript: fix git version definition 2018-12-13 08:13:27 +03:00
Alibek Omarov
bbde1394e1 wscript: move some code to our waflib, remove --no-gcc-colors, as newer GCC colorize output automatically, so there is no need in -fdisagnostic-colors=aloways flag, move common win32 libraries check here, better output for subprojects 2018-12-13 08:08:33 +03:00
Alibek Omarov
ede52d7808 mainui: update 2018-12-13 08:05:56 +03:00
Alibek Omarov
9ce9fa8cb5 vgui_support: wscript: refactor, use shared get_subproject_name, rename no-vgui to disable-vgui to follow automake-style convention, add vGUI library sanity check 2018-12-13 08:05:31 +03:00
Alibek Omarov
6debd84a2e game_launch: wscript: refactor, use shared get_subproject_name 2018-12-13 08:03:51 +03:00
Alibek Omarov
62995b0769 engine: wscript: refactor, use sdl2.py to get configure SDL2, use shared get_subproject_name 2018-12-13 08:03:26 +03:00
Alibek Omarov
ec50c4571c waflib: add some waf plugins by FWGS 2018-12-13 08:00:22 +03:00
Alibek Omarov
09938b978b gitignore: allow waflib directory, hide pyc and pycache 2018-12-13 07:48:51 +03:00
Alibek Omarov
6eb327eac2 scripts: enable verbose build, fix including SDL2 2018-12-13 03:25:46 +03:00
Alibek Omarov
cbb8db0089 travis: add mingw build deployment 2018-12-12 04:50:24 +03:00
Alibek Omarov
154ef82719 scripts: add mingw build archive creation 2018-12-12 04:49:11 +03:00
Alibek Omarov
ec80b0884f travis: deploy at least appimage now 2018-12-12 04:33:36 +03:00
Alibek Omarov
6a78b4ed1f scripts: fix appimagetool warning 2018-12-12 04:33:18 +03:00
Alibek Omarov
239c6759cb scripts: add travis deploy script 2018-12-12 04:32:58 +03:00
Alibek Omarov
017714f3a0 scripts: give build_appimage.sh +x 2018-12-12 04:24:47 +03:00
Alibek Omarov
16aa5a78fe travis: building appimage requires libfuse2 library 2018-12-12 04:21:10 +03:00
Alibek Omarov
baa94e2064 mainui: update 2018-12-12 04:19:47 +03:00
Alibek Omarov
f9b13472b5 scripts: autobuild appimage on travis 2018-12-12 04:19:17 +03:00
Alibek Omarov
2922267ae1 scripts: add xash-extras to travis common deps 2018-12-12 04:18:58 +03:00
Alibek Omarov
3c4e75f1b2 scripts: add script building AppImage based on portable build for Linux 2018-12-12 04:18:09 +03:00
Alibek Omarov
130a7b3c42 scripts: move makepak.py from android project repo to engine main repo, port to python3, replace spaces by tabs 2018-12-12 04:16:23 +03:00
mittorn
17b0c23f2e Show engine arch in version 2018-12-06 04:28:19 +07:00
mittorn
4b58b0b168 Fix console background aspect ratio 2018-12-06 03:00:39 +07:00
mittorn
298393b653 Initial amd64 port 2018-12-05 23:57:05 +07:00
mittorn
aed53c4fda Do not spam in console if vsync not availiable 2018-12-05 23:56:41 +07:00
a1batross
7ad7af76dd render: register r_showtree cvar 2018-11-30 22:56:20 +03:00
a1batross
0964fb11e4 sdl: partially fix maximizing window on Windows 2018-11-29 21:43:51 +03:00
a1batross
f173ce11f7 console: fix version drawn all the time which engine runs 2018-11-29 20:43:53 +03:00
a1batross
3046c9e68e gitignore: update 2018-11-29 20:24:39 +03:00
a1batross
137836348b client: fix GetCenterWindow engine call 2018-11-29 20:24:25 +03:00
a1batross
05eab0b5b0 system: fix win32 build 2018-11-29 19:48:16 +03:00
Alibek Omarov
a1edbaced4 mainui: update submodule 2018-11-29 01:54:45 +03:00
Alibek Omarov
3fe737058f buildinfo: add host_ver cvar 2018-11-29 01:54:25 +03:00
Alibek Omarov
9c3e8f7e48 buildinfo: remove XASH_RELEASE 2018-11-29 01:54:09 +03:00
Alibek Omarov
dcf64c6b33 Fix build, update menu 2018-11-27 16:38:22 +03:00
Alibek Omarov
b9945d62a3 Apply 4312 update 2018-11-27 16:15:24 +03:00
Alibek Omarov
776d1cb52c wscript: try to fix windres searching for game_launch, fix osx 32 bit compiling 2018-11-19 01:58:40 +03:00
Alibek Omarov
81e142936d wscript: use lower-case win32 libraries names for crosscompiling from Linux 2018-11-19 00:46:29 +03:00
Alibek Omarov
a6fba0cb96 travis: scripts: try to fix mingw and osx build 2018-11-18 23:16:12 +03:00
Alibek Omarov
1b9bfd8906 platform: sdl: fix compiling 2018-11-18 23:04:47 +03:00
Alibek Omarov
e9d988f5d6 wscript: spaces to tabs 2018-11-18 23:04:30 +03:00
Alibek Omarov
7852192fc4 wscript: replace include/SDL by include/SDL2 2018-11-18 22:56:30 +03:00
Alibek Omarov
4db01487ba travis: scripts: install python for osx 2018-11-18 22:55:47 +03:00
Alibek Omarov
7b806add63 wscript: fix SDL2 include path 2018-11-18 22:48:52 +03:00
Alibek Omarov
d3c310628f travis: scripts: enable stb font renderer for linux 2018-11-18 22:41:16 +03:00
Alibek Omarov
62af116654 travis: scripts: set SDL2 prefix 2018-11-18 22:37:06 +03:00
Alibek Omarov
2b085cb69e game_launch: remove SDL for simplicity 2018-11-18 22:34:16 +03:00
Alibek Omarov
27ee4337fe travis: fix building sdl2, fix libpath in wscript 2018-11-18 18:52:57 +03:00
Alibek Omarov
f0297fc448 travis: initial support 2018-11-18 18:33:32 +03:00
Alibek Omarov
d74743ac1d mainui: update 2018-11-18 18:19:45 +03:00
Alibek Omarov
28471aee97 cl_game: get rid of int* to float* conversion 2018-11-18 18:19:31 +03:00
Alibek Omarov
deb537c1bb common: fix NULL redefine(do we really need NULL definition?) 2018-11-18 17:52:01 +03:00
Alibek Omarov
9d93eca572 platform: linux: fix descriptor leak 2018-11-18 17:50:15 +03:00
Alibek Omarov
66d1a632a7 net_ws: fix possible garabe in return value due to uninitialized value 2018-11-18 17:14:38 +03:00
Alibek Omarov
847be54457 wscript: refactor adding compiler flags, remove --release flag, instead add mandatory --build-type flag 2018-11-18 17:02:40 +03:00
Alibek Omarov
9d156b4285 crclib: md5: fix memset call 2018-11-17 01:40:35 +03:00
Alibek Omarov
edde871eb5 console: fix console font scale for Quake I fonts, fix drawing arrows in console for Quake I 2018-11-17 01:26:57 +03:00
Alibek Omarov
7c772d6bfd engine: rework timer stuff, move to platform. Move debugger present checks to platform 2018-11-16 16:32:16 +03:00
Alibek Omarov
f0d0861160 PhysicAPI: fix callback list initialization 2018-11-16 15:34:33 +03:00
Alibek Omarov
1ef0b44a41 filesystem: allow setting extras.pak by env-var for everyone 2018-11-16 15:34:02 +03:00
Alibek Omarov
25d8a94c1c engine: fix implicit declaration, remove dead MsgDev now, fix const modifier loss in host.c 2018-11-16 15:25:04 +03:00
Alibek Omarov
b60b3f7d18 GameUI: avoid const modifier loss 2018-11-16 15:12:43 +03:00
Alibek Omarov
b1db062fbc Merge pull request #3 from nekonomicon/bsd
*BSD-related fixes.
2018-11-05 18:25:05 +03:00
Night Owl
d4e5e609af Do not break video subsystem initialization. 2018-11-05 15:39:00 +05:00
Night Owl
f36d1f5621 Use execv instead of execve, because environ symbol breaks compilation with -Wl,--no-undefined flag under FreeBSD via Waf. 2018-11-05 15:39:00 +05:00
Night Owl
f350683e83 wscript: avoid linuxisms and gccisms. 2018-11-05 15:38:48 +05:00
Alibek Omarov
3c5f7de747 vgui_support: wscript: forgot to set MSVC_SUBSYSTEM for WinXP compatibility 2018-11-02 01:35:45 +03:00
Alibek Omarov
d81288d281 wscript: remove no-download-deps, autodownloading of dependencies not done yet 2018-11-02 01:35:10 +03:00
Alibek Omarov
d18708acf5 keys: fix indentation 2018-11-02 01:09:09 +03:00
Alibek Omarov
18353d9ae6 net_ws: allow to set custom IP address, use Q_strncpy instead of Q_strcpy 2018-11-02 01:06:23 +03:00
Alibek Omarov
ef39f9c9cf engine: dedicated: fix build 2018-11-01 23:31:16 +03:00
Alibek Omarov
a03aa3ddb3 Merge 4281 update 2018-10-28 00:39:29 +03:00
Alibek Omarov
c09aff8bd7 mainui: update 2018-10-27 23:29:10 +03:00
Alibek Omarov
70518a873c update my Qt Creator project 2018-10-27 23:28:29 +03:00
Alibek Omarov
95e64f3997 vgui: remove dead vgui_surf.cpp file 2018-10-27 23:28:29 +03:00
Alibek Omarov
2fab2d9f7e wscript: update 2018-10-27 23:28:29 +03:00
Alibek Omarov
de838ec5e8 rename backend files for great justice and consistency 2018-10-27 23:28:29 +03:00
Alibek Omarov
90d2434bb0 platform: add Set/GetClipboardText calls. Remove unneeded SDL_SetHint call on Android, because Android does not use SDL anymore 2018-10-27 23:28:29 +03:00
Alibek Omarov
96e0167e47 platform: add GetMousePos, SetMousePos calls, fix typo 2018-10-27 23:28:29 +03:00
a1batross
68ed732928 win_con: fix version in title, change title for dedicated server 2018-10-24 20:55:00 +03:00
a1batross
c603abfebf crashhandler: fix developer mode check 2018-10-24 20:18:06 +03:00
a1batross
85960b2c90 wscript: enable DBGHELP for Win32 2018-10-24 20:17:44 +03:00
a1batross
ca501c0378 wscript: add possibility to select windows subsystem during link, add define to use WinXP SDK. This commit forces WinXP compability on latest Visual Studio 2018-10-24 20:12:32 +03:00
Alibek Omarov
e9e364f054 wscript: move sdl path to root wscript 2018-10-22 01:01:22 +03:00
Alibek Omarov
7c9af89620 input: remove unneeded joy_found extern 2018-10-22 00:36:58 +03:00
Alibek Omarov
f4567b2c9d sound: make snd_mute_losefocus accessible outside 2018-10-22 00:36:38 +03:00
Alibek Omarov
7390d11505 platform_sdl: adapt SDL backend code to new platform backends system 2018-10-22 00:28:24 +03:00
Alibek Omarov
960e46c564 engine: adapt engine code to new platform backends system 2018-10-22 00:27:52 +03:00
Alibek Omarov
265f79fc72 platform: add GetNativeObject call 2018-10-22 00:21:05 +03:00
Alibek Omarov
a5258bea65 library: move win32 definitions to win_lib.c 2018-10-22 00:13:56 +03:00
Alibek Omarov
25f07ddb97 platform: introduce common header for platform-dependent functions. To keep clean code and engine platform-agnostic, now including headers from platform folder, except this one, is strictly prohibited. 2018-10-21 23:52:14 +03:00
Alibek Omarov
6ba7781a61 input: various fixes: fix mistyped pitch/yaw, replace SDL_GetMouseState by SDL_GetRelativeMouseState, fix disabling mouse with -nomouse argument 2018-10-21 22:13:58 +03:00
Alibek Omarov
23a7dce3be mainui: update 2018-10-21 22:06:17 +03:00
Alibek Omarov
880d3de53a input: move evdev under m_ignore 2018-10-21 22:04:24 +03:00
Alibek Omarov
5af7a19b40 Rename contib to contrib 2018-10-21 14:17:36 +03:00
Alibek Omarov
da094fa04e input: provide a common function for collecting input from different sources 2018-10-11 00:04:23 +03:00
Alibek Omarov
bff9ca8438 console: fix double printed console messages on Win32 2018-10-10 23:43:03 +03:00
Alibek Omarov
e50d22bce7 mainui: update 2018-10-10 23:38:58 +03:00
Alibek Omarov
216b4f4147 vid_sdl: fix incorrect video modes list length 2018-10-10 23:36:34 +03:00
Alibek Omarov
4ced29ee8f vid_common: fix window_center_x/y initialization 2018-10-10 20:22:11 +03:00
Alibek Omarov
844b3a39a7 vid_sdl: fix GL_UpdateContext, fix window created outside screen if positions were negative 2018-10-10 20:01:54 +03:00
Alibek Omarov
9e618ce3e1 cmd: base_cmd: fix inconsistency between linked list and hash map 2018-10-10 00:42:06 +03:00
Alibek Omarov
abda3b52ab game_launch: remove two different names for engine DLLs 2018-10-10 00:41:18 +03:00
Alibek Omarov
649f32a185 wscript: fix install 2018-10-08 22:39:33 +03:00
Alibek Omarov
8710922a61 waf: update 2018-10-08 22:39:33 +03:00
Alibek Omarov
8ea5536b42 wscript: fix win32 build 2018-10-08 22:39:33 +03:00
Alibek Omarov
48d1aa5115 engine: fix warnings 2018-10-06 03:42:09 +03:00
Alibek Omarov
eafe5d6c68 mainui: update 2018-10-06 03:30:38 +03:00
Alibek Omarov
f1d9034546 GameUI: fix menu APIs loading order 2018-10-06 03:28:40 +03:00
mittorn
b0c077ccf8 Persistent console history 2018-10-04 18:10:12 +07:00
mittorn
a0f0eca77c Backup console input when using history 2018-10-04 16:38:39 +07:00
mittorn
e74513556a Fix gcc colors 2018-10-04 16:09:03 +07:00
mittorn
891c984c56 Port some config changes 2018-10-04 16:08:49 +07:00
mittorn
491188a0f3 Merge branch 'original' 2018-10-04 14:27:14 +07:00
mittorn
9dadc0de93 Make vgui build dependence optional as it does not have opensource license 2018-10-04 12:28:25 +07:00
mittorn
1dedf0e208 Fix tab in wscript 2018-10-04 12:15:05 +07:00
Alibek Omarov
e123499e23 Fix build 2018-07-12 23:22:06 +03:00
Alibek Omarov
7601a4cd29 Revert 64257ef to not break C++ header compability 2018-07-12 23:13:30 +03:00
Alibek Omarov
c8b78b4124 Update mainui 2018-07-10 23:05:57 +03:00
Alibek Omarov
fdb2055b62 Add RoDir support 2018-07-10 23:03:27 +03:00
Alibek Omarov
2c0a03704c Update mainui. Add --enable-bsp2 switch into wscript 2018-07-10 17:29:05 +03:00
Alibek Omarov
2edbcb996d Merge 4150 update. Fix some mistypings. Rename CL_IsQuakeCompatible to Host_IsQuakeCompatible, as it may be used in whole engine and even in dedicated builds. IN_RecalcCenter was not added, window center positions should be updated by backends. 2018-06-19 16:59:53 +03:00
Alibek Omarov
76e01f490c Update mainui. Make VGUI search message more friendly. Update gitignore 2018-06-19 16:17:27 +03:00
Alibek Omarov
f23029efe0 Refactoring wscript. Add execute flag on waf 2018-06-17 14:30:59 +03:00
Alibek Omarov
e70dea54c0 Add waf itself(with included wurf and msvs.py) and waf.bat launcher for Windows 2018-06-14 21:23:38 +03:00
Alibek Omarov
ca28332c6c Use msvs.py to generate Visual Studio project. Add debug flags for Visual Studio 2018-06-14 21:22:17 +03:00
Alibek Omarov
f15e2c2dcf Move command autocomplete to common engine files, as it used by Wcon and may be used by curses console in future 2018-06-14 21:19:04 +03:00
Alibek Omarov
572705bc08 MSVC & Win32 wscript fixes 2018-06-14 20:34:51 +03:00
Alibek Omarov
473810fc0c MSVC & Win32 related fixes 2018-06-14 20:32:40 +03:00
Alibek Omarov
d0ff201da2 Fix dedicated compiling errors 2018-06-14 20:31:46 +03:00
Alibek Omarov
b5c621ae36 Fix mainui submodule 2018-06-14 19:27:06 +03:00
Alibek Omarov
7cdead7bac Merge 4143 update 2018-06-12 12:18:14 +03:00
Alibek Omarov
f26ac52102 Merge 4140 update 2018-06-11 14:04:50 +03:00
Alibek Omarov
5d48708615 Forgot to add cvars into basecmd. Add basecmd_test to check is basecmd valid 2018-06-01 22:11:22 +03:00
Alibek Omarov
0561ac2076 Add basecmd from old engine. Add basecmd_stats command 2018-06-01 21:28:25 +03:00
Alibek Omarov
ae5257c654 Add masterlist from engine. Use non-blocking network name resolution 2018-06-01 20:44:16 +03:00
Alibek Omarov
5a449a56ea Port restricted cmds and cvars from old engine. TODO: implement better stufftext filter 2018-06-01 19:57:54 +03:00
Alibek Omarov
69549787bc net_ws refactoring, fix minor bugs 2018-06-01 19:29:47 +03:00
Alibek Omarov
0db8d95bc9 Update mainui. Add possibility to install engine ignoring *nix file hierarchy in wscript. Fix debugging. 2018-05-29 01:02:32 +03:00
Alibek Omarov
236c16e35f Update QtCreator project 2018-05-29 00:58:45 +03:00
Alibek Omarov
79d8bc2cdd Get rid of accidentally added CMakeLists 2018-05-29 00:20:07 +03:00
Alibek Omarov
fac536f8c4 Add mainui_cpp. Use appropriate message in vgui_support's wscript. 2018-05-28 23:47:38 +03:00
Alibek Omarov
aa5d52cebc Change libxashmenu to libmenu to keep same names between different OSes 2018-05-28 23:44:52 +03:00
Alibek Omarov
7e372645da Add my personal IDE settings to contrib. Add QtCreator generated files to gitignore. 2018-05-28 23:13:50 +03:00
Alibek Omarov
0c058f2eca Add waf buildscripts, add updated game_launch 2018-05-28 23:13:50 +03:00
Alibek Omarov
d9320f964e Crashhandler refactoring for POSIX systems. Shows engine version now. 2018-05-28 23:13:50 +03:00
Alibek Omarov
b29adf752c Merge pull request #1 from lewa-j/master
Fix MinGW build
2018-05-13 23:39:36 +03:00
lewa_j
43b746d2f8 Fix MinGW build 2018-05-13 23:25:51 +03:00
mittorn
817206815d reslist.txt support 2018-05-05 02:24:55 +07:00
mittorn
37aa201ed7 Fix memory leak 2018-05-05 01:20:46 +07:00
mittorn
d3a0146b5a Fix sound downloading 2018-05-05 00:12:30 +07:00
mittorn
30771fefa6 Forbid download not precached files 2018-05-05 00:01:32 +07:00
mittorn
6ae44d7577 Fix downloading models with zero res->ucFlags 2018-05-04 23:16:47 +07:00
mittorn
42b4e456a2 Fix log 2018-05-03 23:51:23 +07:00
mittorn
290b9cae0b Restore utf-8 support 2018-05-03 23:31:03 +07:00
Alibek Omarov
ec6bfa2421 Let server physics simulate even when there is no players(GoldSrc behaviour) 2018-05-03 17:53:49 +03:00
Alibek Omarov
46a3e729db Fix collision being calculated on unlagged value for both players and bots. 2018-05-03 17:43:26 +03:00
Alibek Omarov
5ca7bb5f12 Fix noise index for not sine beams 2018-05-03 17:42:21 +03:00
Alibek Omarov
86dfaf9930 Fix too loud entities in multiplayer 2018-05-03 17:41:39 +03:00
Alibek Omarov
7d37ff33aa Fix high CPU load on Linux 2018-05-01 21:52:17 +03:00
Alibek Omarov
415e517107 Library loader refactoring. Not tested for platforms other than Linux 2018-05-01 21:52:00 +03:00
Alibek Omarov
0b0ec876a5 Oops, this isn't supposed to be commited 2018-05-01 17:53:25 +03:00
Alibek Omarov
34f6f6d539 Fix implicit declaration on dedicated 2018-05-01 17:37:25 +03:00
Alibek Omarov
0681209114 Remove useless host.type set, replace HOST_DEDICATED checks by Host_IsDedicated 2018-05-01 17:30:33 +03:00
Alibek Omarov
becd0eba03 Possibility to use dedicated version with SDL(it's used only by internal timer) 2018-05-01 17:30:33 +03:00
mittorn
063eb151c4 waf options for dedicated server and 64-bits 2018-05-01 03:04:30 +07:00
Alibek Omarov
3f2a8f7704 Remove vid_mode. VID_GetModeString now returns only supported modes from SDL2 2018-04-29 09:21:23 +03:00
Alibek Omarov
c8b83385df Add waf related files to gitignore. Restore cl_trace_messages 2018-04-29 04:25:41 +03:00
mittorn
ac1c8594b7 Add waf build script and legacy makefile to contrib 2018-04-28 23:32:55 +00:00
mittorn
0c903c1e56 Fix dedicated server build 2018-04-26 14:11:01 +00:00
Alibek Omarov
dcc19aeafb Merge 4097 2018-04-26 03:23:00 +03:00
Alibek Omarov
faf15df62f Correct max_particles clamping 2018-04-26 02:53:24 +03:00
Alibek Omarov
a3c90248a7 Remove unneeded argument in SDLash_KeyEvent. Remove copypasted code 2018-04-26 02:52:49 +03:00
Alibek Omarov
78365d2bc6 Add new two functions to Menu API 2018-04-24 05:54:57 +03:00
Alibek Omarov
176b31b4a2 Fix wrong max edicts clamp. Add game_dll_linux and game_dll_osx to gameinfo.txt. Fix crash in R_ChangeVideoSettings 2018-04-24 05:50:10 +03:00
Alibek Omarov
efe8ddf151 Fix missing const-qualifiers in engine code. Fix qboolean/int mixing in interface implementations(int is preferred). Replace long by int in COM_RandomLong. 2018-04-23 23:07:54 +03:00
Alibek Omarov
e1f80fba3d Add forgotten const-qualifiers in interface headers. Remove unneeded PM headers 2018-04-23 23:06:18 +03:00
Alibek Omarov
fd649905ea Fix some format warnings 2018-04-23 21:49:37 +03:00
Alibek Omarov
bd4988e588 More _format() attribute 2018-04-23 21:37:35 +03:00
Alibek Omarov
4ef527a92d Print version by _sv_build_info server command 2018-04-23 21:36:59 +03:00
Alibek Omarov
e8d13cd0d5 Rebrand from Xash3D to Xash3D FWGS. Add _format() attrubute to print-like functions 2018-04-23 21:36:33 +03:00
Alibek Omarov
501985be48 Remove accidentally left debug 2018-04-22 17:19:54 +03:00
Alibek Omarov
ebe3a203ba Always fragment upload data, this fixes some cases when upload must be fragmented, but download test shown no fragmentation requirement 2018-04-22 17:17:35 +03:00
Alibek Omarov
63513ec475 Small refactoring of EnableTextInput 2018-04-22 14:01:56 +03:00
Alibek Omarov
545b781934 Restore hud_utf8 2018-04-22 14:01:22 +03:00
Alibek Omarov
0d035746d5 Remove lowercase-ing in listdirectory() 2018-04-22 13:10:16 +03:00
Alibek Omarov
ec41db7ef8 Prepend USE_SELECT and COLORIZE_CONSOLE with XASH_ 2018-04-22 13:07:40 +03:00
Alibek Omarov
362217935f Don't increase server library reference counter, free it pfnCheckGameDll 2018-04-22 13:01:06 +03:00
mittorn
8704c07e4b Merge branch 'original' 2018-04-21 13:44:06 +00:00
mittorn
7d1df4c097 Add string.h, fix decals with unsigned char 2018-04-21 13:39:55 +00:00
Alibek Omarov
2c755778f4 Deprecate secure parameter 2018-04-21 11:16:33 +03:00
Alibek Omarov
9ab3300b76 Rename allow_console to developer in menu_int.h. Define NEW_ENGINE_INTERFACE. 2018-04-21 11:16:11 +03:00
Alibek Omarov
535b00d98f Fix GameInfo parsing 2018-04-21 02:51:14 +03:00
Alibek Omarov
de35262a3b Fix network send packet 2018-04-21 02:50:50 +03:00
Alibek Omarov
314a6deba9 Remove gamedir[] from engine-side gameinfo_t 2018-04-21 01:22:00 +03:00
Alibek Omarov
d3990e03e6 Add text input mode calls where they should be. Disable text input mode at initialization 2018-04-21 00:37:16 +03:00
Alibek Omarov
cec7bf8488 Fix server library sanity checking 2018-04-21 00:36:14 +03:00
Alibek Omarov
32aa9a9f54 Implement Mobility API support. Add missing IN_TouchShutdown and Joy_Shutdown calls. Don't save video and opengl configs if engine crashed. 2018-04-21 00:13:20 +03:00
Alibek Omarov
b7622e6009 Fix implicit function declaration. Fix struct declaration in parameter list 2018-04-21 00:05:08 +03:00
Alibek Omarov
fd1f0e685a Restore con_fontscale functionality 2018-04-21 00:03:59 +03:00
Alibek Omarov
a015d6b915 Revert fork's hud_scale behaviour 2018-04-21 00:03:19 +03:00
mittorn
7350be6e7f Fix build after update 2018-04-20 21:48:12 +00:00
mittorn
926b909f3d Merge branch 'original' 2018-04-20 12:38:53 +00:00
mittorn
c1076f43f7 Update client engine interface 2018-04-19 21:51:17 +00:00
mittorn
af7123f7dd Merge branch 'original' (except gldebug, msaa) 2018-04-19 20:47:41 +00:00
Alibek Omarov
5d13112e25 Dedicated build 2018-04-18 18:32:30 +03:00
Alibek Omarov
40094f2867 Move client-only parts to client 2018-04-18 18:10:32 +03:00
Alibek Omarov
6db7c191eb Add fork's mobility_int.h(no support yet, just header) 2018-04-17 03:57:21 +03:00
Alibek Omarov
a2e2dd5bdf Add libmpg source 2018-04-17 03:57:04 +03:00
Alibek Omarov
7fdabb73a8 Add identification support from fork 2018-04-17 03:56:49 +03:00
Alibek Omarov
86337db5b3 Use fork's keydefs.h 2018-04-17 03:56:13 +03:00
Alibek Omarov
8e3c748f12 Adapt vgui_support support to newer engine 2018-04-17 03:56:01 +03:00
Alibek Omarov
b825e584f3 Replace GL_TEXTURE by XASH_TEXTURE because it's used internally by GL.h 2018-04-17 03:55:36 +03:00
Alibek Omarov
13fe097318 Merge fork's unicode changes(partial) 2018-04-17 03:54:07 +03:00
Alibek Omarov
5af7eb6c18 Add support for TextAPI in menu 2018-04-17 03:53:18 +03:00
Alibek Omarov
be4b885254 Merge common SDL port changes 2018-04-17 03:53:01 +03:00
Alibek Omarov
b70fab5384 Add Sys_GetIntFromCmdLine 2018-04-17 03:49:30 +03:00
Alibek Omarov
92c321848d Adapt input code to newer engine 2018-04-17 03:48:02 +03:00
Alibek Omarov
2de6d00a82 Update filesystem. Use fork's gameinfo/liblistgam parser, use PATH_SPLITTER to avoid errors 2018-04-17 03:46:30 +03:00
Alibek Omarov
5744aa8d9e Add SDL sound backend 2018-04-17 03:44:53 +03:00
Alibek Omarov
fc7ed1ab75 Add SDL video backend 2018-04-17 03:44:17 +03:00
Alibek Omarov
7c9b724531 Implement dynamic library loading and symbol resolving 2018-04-17 03:43:27 +03:00
Alibek Omarov
64257ef428 Avoid some struct declaration in parameter list 2018-04-14 04:26:12 +03:00
Alibek Omarov
4a0add4063 Move Win32 console into separate file(second commit), hide Win32 console code under _WIN32 macro. Add some fork-specific macros. Add sys_con.c for generic log file implementation. 2018-04-14 04:08:28 +03:00
Alibek Omarov
45c0eaa26c Move Win32 console and library loader to platform/win32 folder. 2018-04-14 03:31:43 +03:00
Alibek Omarov
15096aa15a net_ws port. Port non-blocking NS resolution also. 2018-04-14 03:27:52 +03:00
Alibek Omarov
36f756feeb Avoid some struct declarations inside paramater list, it makes even GCC7 confusing 2018-04-14 02:51:00 +03:00
Alibek Omarov
4d4a7d49d5 mathlib.c port 2018-04-14 02:45:48 +03:00
Alibek Omarov
4189af8b50 Engine input port. Incomplete integration of touch, gamepad, evdev input 2018-04-14 02:42:41 +03:00
Alibek Omarov
990d526a07 Add crashhandler.c file 2018-04-14 01:50:19 +03:00
Alibek Omarov
5a1b03ac20 Integrate FWGS vgui_support 2018-04-14 01:49:14 +03:00
Alibek Omarov
158db1c454 img_bmp.c port 2018-04-14 01:26:52 +03:00
Alibek Omarov
7ace83eeab Add Sys_Warn 2018-04-14 01:26:25 +03:00
Alibek Omarov
b940a62f02 host.c port 2018-04-13 21:28:46 +03:00
Alibek Omarov
d564a062ce Filesystem port 2018-04-13 20:44:39 +03:00
Alibek Omarov
7671365c92 Rename _alloca back to alloca 2018-04-13 20:22:12 +03:00
Alibek Omarov
f7a58ec04d Remove MSVC-specific try-except for C in Q_vsnprintf 2018-04-13 20:14:20 +03:00
Alibek Omarov
8e508cf065 Remove WGL function pointers, remove HDC 2018-04-13 20:13:54 +03:00
Alibek Omarov
e5b0473e4a Fix conflicting types on NXPrintf function family 2018-04-13 20:08:50 +03:00
Alibek Omarov
136123eeb3 SV_BroadcastPrintf already defined in common.h. Remove definition from server.h. 2018-04-13 19:58:47 +03:00
Alibek Omarov
32b07cda86 Add kbutton.h, fix includes 2018-04-13 19:58:17 +03:00
Alibek Omarov
25325e6150 Port common.h and system.h. Add backends.h, defaults.h, port.h, xash3d_types.h from fork 2018-04-13 19:56:43 +03:00
Alibek Omarov
a639b72e90 AVI stub for non-Windows 2018-04-13 19:42:17 +03:00
Alibek Omarov
08984bd549 Rename features.h to enginefeatures.h because this name used internally by glibc 2018-04-13 19:26:48 +03:00
Alibek Omarov
bf08a8261b Add .gitignore 2018-04-13 19:25:39 +03:00
529 changed files with 132194 additions and 37191 deletions

27
.builds/alpine.yml Normal file
View File

@@ -0,0 +1,27 @@
image: alpine/latest
packages:
- build-base
- sdl2-dev
- freetype-dev
- fontconfig-dev
- opus-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

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

@@ -0,0 +1,30 @@
image: debian/sid
arch: amd64
packages:
- build-essential
- python-is-python3
- libsdl2-dev
- libfreetype-dev
- libfontconfig-dev
- libopus-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

29
.builds/debian.yml Normal file
View File

@@ -0,0 +1,29 @@
image: debian/sid
packages:
- build-essential
- python-is-python3
- libsdl2-dev
- libfreetype-dev
- libfontconfig-dev
- libopus-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

29
.builds/freebsd.yml Normal file
View File

@@ -0,0 +1,29 @@
image: freebsd/latest
packages:
- lang/python
- devel/pkgconf
- devel/sdl20
- print/freetype2
- x11-fonts/fontconfig
- audio/opus
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

29
.builds/netbsd.yml Normal file
View File

@@ -0,0 +1,29 @@
image: netbsd/latest
packages:
- python311
- SDL2
- freetype2
- fontconfig
- libopus
- pkgconf
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

26
.builds/openbsd.yml Normal file
View File

@@ -0,0 +1,26 @@
image: openbsd/latest
packages:
- python3
- sdl2
- opus
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

23
.cirrus.yml Normal file
View File

@@ -0,0 +1,23 @@
task:
name: freebsd-14-amd64
freebsd_instance:
image_family: freebsd-14-0
setup_script:
- pkg update
- pkg install -y pkgconf git sdl2 python fontconfig opus
- 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 opus
- git submodule update --init --recursive
test_script:
- ./scripts/cirrus/build_freebsd.sh dedicated
- ./scripts/cirrus/build_freebsd.sh full

365
.editorconfig Normal file
View File

@@ -0,0 +1,365 @@
# this file is just a suggestion, you might follow it, you might not
root = true
[*]
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

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
*.c text eol=lf diff=cpp
*.h text eol=lf diff=cpp
wscript text eol=lf diff=python

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

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

124
.github/workflows/c-cpp.yml vendored Normal file
View File

@@ -0,0 +1,124 @@
name: Build & Deploy Engine
on: [push, pull_request]
jobs:
# cleanup:
# runs-on: self-hosted
# steps:
# - name: Cleanup
# run: rm -rf .* || true
build:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
# Linux build specifically want oldest Ubuntu as possible
# to be crossdistribution compatible, otherwise use ubuntu-latest
- os: ubuntu-20.04
targetos: linux
targetarch: amd64
- os: ubuntu-20.04
targetos: linux
targetarch: i386
# - os: ubuntu-aarch64-20.04
# targetos: linux
# targetarch: aarch64
- os: ubuntu-20.04
targetos: android
targetarch: multiarch
# - os: ubuntu-20.04
# targetos: motomagx
# targetarch: armv6
- os: ubuntu-latest
targetos: nswitch
targetarch: arm64
- os: ubuntu-latest
targetos: psvita
targetarch: armv7hf
- os: windows-latest
targetos: win32
targetarch: amd64
- 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 # in GitHub documentation, it's an ARM64 machine
targetos: apple
targetarch: arm64
- os: macos-12 # in GitHub documentation, it's an x86 machine
targetos: apple
targetarch: amd64
env:
SDL_VERSION: 2.30.3
GH_CPU_ARCH: ${{ matrix.targetarch }}
steps:
- name: Checkout
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@v4
with:
name: artifact-${{ matrix.targetos }}-${{ matrix.targetarch }}
path: artifacts/*
flatpak:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- app: su.xash.Engine.Compat.i386
container:
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build flatpak (Compat.i386)
uses: FWGS/flatpak-github-actions/flatpak-builder@v6.3
with:
bundle: ${{ matrix.app }}.flatpak
manifest-path: scripts/flatpak/${{ matrix.app }}.yml
release:
name: "Upload releases"
runs-on: ubuntu-latest
needs: [build, flatpak]
if: ${{ github.event_name == 'push' }}
steps:
- 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: |
gh release delete "$RELEASE_TAG" \
--yes \
--cleanup-tag \
--repo "$GITHUB_REPOSITORY" || true
sleep 20s
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
echo "Repackaged artifacts:"
ls -R
popd
sleep 20s
gh release create "$RELEASE_TAG" artifacts/* \
--title "Xash3D FWGS Continuous ${{ github.ref_name }} Build" \
--target $GITHUB_SHA \
--repo "$GITHUB_REPOSITORY" \
--prerelease

344
.gitignore vendored Normal file
View File

@@ -0,0 +1,344 @@
# Binaries
*.o
*.so
*.a
*.framework
# Other
*.save
# Qt Creator for some reason creates *.user.$version files, so exclude it too
*.user*
*~
### Xcode ###
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### CMake ###
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
CMakeLists.txt*
CMakeScripts
Testing
compile_commands.json
_deps
# makedepend
Makefile.dep
*.bak
ALL_BUILD.*
INSTALL.*
ZERO_CHECK.*
CMakeLists.txt
# Visual Studio
*.obj
*.dll
*.exp
*.lib
*.suo
*.sdf
Debug/
Release/
ipch/
*.opensdf
# Use CMake for generating projects
*.vcxproj.filters
*.vcxproj
*.sln
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# PVS Studio for Linux output
*.cl.cfg
# Kate
*.kate-swp
*.swp
# QtCreator
build-*
# Android
*.apk
*.config
*.creator
*.includes
*.files
# Waf
build_current
*waf-*/
*waf3-*/
.lock-waf*
*.lastbuildstate
*.unsuccessfulbuild
__pycache__
*.pyc
# MSVC projects
*.vcproj
*.sln
*.vcxproj
# Visual Studio Code
.vscode/*
*.code-workspace
.history/*
.cache/*
enc_temp_folder/
# KDevelop4
*.kdev4

21
.gitmodules vendored Normal file
View File

@@ -0,0 +1,21 @@
[submodule "mainui"]
path = 3rdparty/mainui
url = https://github.com/FWGS/mainui_cpp
[submodule "ref_gl/nanogl"]
path = 3rdparty/nanogl
url = https://github.com/FWGS/nanogl
[submodule "ref_gl/gl-wes-v2"]
path = 3rdparty/gl-wes-v2
url = https://github.com/FWGS/gl-wes-v2
[submodule "ref_gl/gl4es"]
path = 3rdparty/gl4es/gl4es
url = https://github.com/ptitSeb/gl4es
[submodule "vgui_support"]
path = 3rdparty/vgui_support
url = https://github.com/FWGS/vgui_support
[submodule "opus"]
path = 3rdparty/opus/opus
url = https://github.com/xiph/opus
[submodule "3rdparty/xash-extras"]
path = 3rdparty/extras/xash-extras
url = https://github.com/FWGS/xash-extras

29
3rdparty/extras/wscript vendored Normal file
View File

@@ -0,0 +1,29 @@
#! /usr/bin/env python
# encoding: utf-8
import os
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('xash-extras'):
conf.fatal('Can\'t find xash-extras submodule.')
return
conf.load('zip')
def build(bld):
srcdir = bld.path.find_dir('xash-extras')
if bld.env.DEST_OS in ['android']:
install_path = bld.env.PREFIX
else:
install_path = os.path.join(bld.env.SHAREDIR, bld.env.GAMEDIR)
bld(features='zip',
name = 'extras.pk3',
files = srcdir.ant_glob('**/*'),
relative_to = srcdir,
compresslevel = 0,
install_path = install_path)

1
3rdparty/extras/xash-extras vendored Submodule

1
3rdparty/gl-wes-v2 vendored Submodule

Submodule 3rdparty/gl-wes-v2 added at 2d9b5afe10

1
3rdparty/gl4es/gl4es vendored Submodule

Submodule 3rdparty/gl4es/gl4es added at e39434a2b1

24
3rdparty/gl4es/wscript vendored Normal file
View File

@@ -0,0 +1,24 @@
#! /usr/bin/env python
# encoding: utf-8
import os
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('gl4es') or not conf.path.find_dir('gl4es/src'):
conf.fatal('Can\'t find gl4es submodule. Run `git submodule update --init --recursive`.')
return
def build(bld):
gl4es_srcdir = bld.path.find_node('gl4es/src')
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', 'NO_LOADER', 'STATICLIB'],
cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'],
subsystem = bld.env.MSVC_SUBSYSTEM,
export_includes = '.')

1
3rdparty/mainui vendored Submodule

Submodule 3rdparty/mainui added at b7edbaf2de

1
3rdparty/nanogl vendored Submodule

Submodule 3rdparty/nanogl added at e75792de03

1
3rdparty/opus/opus vendored Submodule

Submodule 3rdparty/opus/opus added at 8cf872a186

40
3rdparty/opus/wscript vendored Normal file
View File

@@ -0,0 +1,40 @@
#! /usr/bin/env python
# encoding: utf-8
import os
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('opus') or not conf.path.find_dir('opus/src'):
conf.fatal('Can\'t find opus submodule. Run `git submodule update --init --recursive`.')
return
# TODO: ARM/x86 intrinsics detection
# TODO: maybe call autotools/cmake/meson instead?
def build(bld):
sources = bld.path.ant_glob([
'opus/src/*.c',
'opus/celt/*.c',
'opus/silk/*.c',
'opus/silk/float/*.c'
], excl = [
'opus/src/repacketizer_demo.c',
'opus/src/opus_demo.c',
'opus/src/opus_compare.c',
'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']
bld.stlib(
source = sources,
target = 'opus',
features = 'c',
includes = includes,
defines = defines,
subsystem = bld.env.MSVC_SUBSYSTEM,
export_includes = ['opus/include/']
)

1
3rdparty/vgui_support vendored Submodule

Submodule 3rdparty/vgui_support added at 7276993f3f

47
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,47 @@
## If you are reporting bugs
1. Check you are using latest version. You can build latest Xash3D FWGS for yourself, look to README.md.
2. Check open issues is your bug is already reported and closed issues if it reported and fixed. Don't send bug if it's already reported.
3. Re-run engine with `-dev 2 -log` arguments, reproduce bug and post engine.log which can be found in your working directory.
3. Describe steps to reproduce bug.
4. Describe which OS and architecture you are using.
6. Attach screenshot if it will help clarify the situation.
## If you are contributing code
### Which branch?
* We recommend using `master` branch.
### Third-party libraries
* Philosophy of any Xash Project by Uncle Mike: don't be bloated. We follow it too.
* Adding new library is allowed only if there is a REAL reason to use it. It's will be nice, if you will leave a possibility to remove new dependency at build-time.
* Adding new dependencies for Waf Build System is not welcomed.
### Portability level
* Xash3D have it's own crt library. It's recommended to use it. It most cases it's just a wrappers around standart C library.
* If your feature need platform-specific code, move it to `engine/platform` and try to implement to every supported OS and every supported compiler or at least leave a stubs.
* You must put it under appopriate macro. It's a rule: Xash3D FWGS must compile everywhere. For list of platforms we support, refer to public/build.h file.
### Code style
* This project uses mixed Quake's and HLSDK's C/C++ code style convention.
* In short:
* Use spaces in parenthesis.
* Only tabs for indentation.
* Any brace must have it's own line.
* Short blocks, if statements and loops on single line are allowed.
* Avoid magic numbers.
* While macros are powerful, it's better to avoid overusing them.
* If you unsure, try to mimic code style from anywhere else of engine source code.
* **ANY** commit message should start from declaring a tags, in format:
`tag: added some bugs`
`tag: subtag: fixed some features`
Tags can be any: subsystem, simple feature name or even just a filename, without extension.
Just keep them always same, it helps keep history clean and commit messages short.

View File

@@ -0,0 +1,16 @@
# 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.
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
| 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. Right now only supports `svc_spawnstaticsound`, more messages added by request. | * MetaMod/AMXModX based mods |

View File

@@ -0,0 +1,9 @@
# Cross-compiling for Windows with Wine
This can be useful to test engine in Wine without using virtual machines or dual-booting to Windows.
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.
4. .. other typical steps to build from console ...

View File

@@ -0,0 +1,10 @@
# Debugging your mod using minidump files (Windows only)
Minidump files is awesome instrument for debugging your mod after it's being released, or for catch specific crashes which are presented only in one specific configuration, but doesn't happens in other configurations or even on developer machine. It contains a lot of information useful for debugging, and therefore it size is not so small: around hundreds or even thousands of megabytes. But this is not a problem, since minidump files compresses very effectively using common algorithms.
There are short algorithm, explaining how to use this debugging instrument:
1. User starts your mod with `-minidumps` startup parameter
2. Finally, crash happened on user's machine, and minidump file being written. This file has `.mdmp` extension and located in same folder, where mod folder located
3. User packs this minidump file to .zip/.7z archive, and somehow sends it to developer
4. Developer just opens minidump file in Visual Studio, then a virtual debugging session is opened and now reasons of crash is pretty easy to detect: you can see call stack, local function variables and global variables, information about exception and a lot of other information
You can find more information about minidumps in this [awesome article](https://learn.microsoft.com/en-us/windows/win32/dxtecharts/crash-dump-analysis?source=recommendations#writing-a-minidump).

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

@@ -0,0 +1,71 @@
## Abstract
Before start, I would recommend you to compile and run engine for already supported and well-spread platform, such as GNU/Linux or Windows. Hack it, get familiar with engine.
One beauties of Xash3D FWGS Engine is it modularity, so game logic, UI and renderers are located in platform-independent libraries. Every library is loaded at run time and may or may be not optional. For example, if your platform doesn't have OpenGL of any kind, you can skip it and use our software renderer! Of course, there is no real reason to run game engine, if you don't have game logic of any kind, so the minimal build of Xash3D FWGS is headless dedicated server.
Historically, Xash3D Engine was even more modular(see github.com/a1batross/Xash3D_ancient), but we thought that to fulfill our crossplatform needs we will keep all platform-specific stuff in the engine itself and libraries must import or expose platform-independent APIs.
Ok, get to the point!
## Porting guidelines
It will not be a complete tutorial as covering everything in one article is probably just impossible. Instead, I will give you hints on how engine can be ported, how to get your port to upstreamed and how you should maintain your port.
0) Get to know your platform. Maybe I asked for this lately, but you MUST KNOW YOUR PLATFORM, i.e. what's this capable of.
The one of unsupported configurations at this time is when platform can't load dynamic libraries(`*.so` or DLLs). We can't help you as supporting full-static ports are violating the GPL license in various ways.
The other yet unsupported configuration is the big endian.
1) Setup toolchain. For dirty port, you can write Makefile for yourself, engine is written that way, so **it doesn't relies** on any generated data or any special processing. But I recommend you to use Waf anyway, it's better integrated to engine and self-documentable. Also, I will cover only our Waf build options.
2) Open `public/build.h` file. Add appropriate checks for your operating system and/or CPU architecture. It shouldn't be hard.
Also, you'll need to build [Half-Life SDK](https://github.com/FWGS/hlsdk-xash3d/). It has same `public/build.h` so reflect changes into it. Note that to be compatible with HLSDK proprietary license, it's relicensed as public domain under [Unlicense](https://unlicense.org).
We have a library naming scheme that allows us and game creators to distribute binaries for different platforms in one archive. Read `Documentation/extensions/library-naming.md` for more information.
In short, you need to call your platform in unique way. For engine side it's done in `engine/common/build.c` file in engine source code, for HLSDK side it's done in `cmake/LibraryNaming.cmake` and `scripts/waifulib/library-naming.py` files in HLSDK source code.
You can use [predef project wiki](https://sourceforge.net/p/predef/wiki/Home/) for reference.
2) Look at the `engine/platform` directory. We usually try to have all platform-specific stuff inside this folder.
* Functions that must be available on your platform are declared in `platform.h` header. Most of them aren't used in headless dedicated build, but I will cover that later.
* The POSIX-compliant(for *nix operating systems) goes into `posix` subdirectory.
* The SDL-specific code goes into `sdl` subdirectory. Note that even I said before that platform-specific code is in `platform` directory, SDL obviously isn't a __platform__, so you can met checks for XASH_SDL inside whole engine, usually in input.
* Custom SWAP implementation for *nix-based systems is in `swap` subdirectory. It's used when hardware may not have enough memory and you can't add swap memory. I will cover that later
It relies on a fact that systems with paged memory will load pages into RAM and move unused to mmap()-ed by custom swap area.
That allowed to run game engine on music player with MIPS CPU, Linux without SWAP support and
* Other folders as `win32`, `android`, `linux` and so on are self-descriptive.
3) As proof of concept, you can try to test that network features and dynamic library loading are implemented correctly. Build a dedicated server with XASH_DEDICATED or `--dedicated` passed to `waf configure`.
Start a server and try to connect to it from PC. If everything is fine, then you can move to next step.
If you get out of memory issues, you can try Low Memory Mode, it's enabled with `--low-memory-mode=N` passed to `waf configure` where N is 1 or 2. Low Memory Mode 1 means that we will NOT break a network compatibility. 2 is deeper and doesn't guarantee protocol compatibility and available multiplayer. Of course, with Low Memory Mode 2 you can't test your port dedicated server.
If you got anything compiling, it's nice time to make a commit. Commit your changes into git and push them somewhere(GitHub, GitLab or what you prefer), so you will not lose them accidentally.
4) Here is most interesting, building the client part.
There are three possible situations for you, by increasing difficulty.
1. Do you have SDL2 for your platform? If yes, go ahead and compile engine with client part enabled.
2. Do you have SDL1.2 for your platform? If yes, try to compile it, but SDL1.2 support is very limited and not tested well.
3. You don't have SDL and you can't port it for some reason by yourself or SDL port just don't stable for your platform? Then you need to implement an engine backend.
How to implement engine backend? Well, we have a backends system that was introduced in Old Engine. It's simply two files: backends.h and defaults.h in `common` folder in repository root. You will need to add a macros for your backends in `backends.h` and define a logic in `defaults.h`. We have already have some, check them out, as they may be handy for you.
Once you did it, go back to `platform` directory and open `platform.h` headers. Create new subdirectory in `platform` folder and start implementing missing platform-specific backends one by one. I can't explain this as for obvious reasons it's too specific. You can use macros you defined before in `build.h` to check that you're compiling for your platform and `backends.h` macros to check if platform-specific backend must be enabled.
As you finished, compile engine, fix errors and commit your changes and push to repository.
Remember, if something doesn't work and you can't figure out why, you can join our Discord server at discord.me/fwgs. Ping me (@a1batross) or other engine developer and attach link to your repository, so we can discuss and help you in porting.

View File

@@ -0,0 +1,150 @@
# 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,68 @@
## Console variables
Console variables (or CVars) are present in all quake-based games.
By default, it is settings, created by engine, server or client libraries.
But you can use `set` command to define variables even if they are not created by the engine.
For example, you can set cvar before it is registered in code.
`set defaultmap crossfire`
This works even in server.cfg before server cvars initialization and the engine will reuse its value on cvar creation
## Aliases
An alias allows to define new commands.
`alias wnext "invnext;wait;wait;+attack;wait;-attack"`
You can hook any command by adding an alias to it and unaliasing it, when you want to use original command.
```
alias invnext1 "unalias invnext;wnext;alias invnext invnext1"
alias invnext invnext1
```
## Scripting extensions
This is an extensions of Xash3D FWGS(merged to original Xash3D since build 3887), that can be enabled by cmd_scripting cvar.
Enabling scripting: `cmd_scripting 1`
This is an archive cvar and it will be saved.
### CVar substitution
You can substitute cvar value to any command by adding \$ symbol:
`echo $sv_cheats`
### Condition checking
Allows checking cvar values.
```
if <value1> <operator> <value2>
:<action1>
:if <value3>
::<action2>
:<action3>
else
:<action4>
```
* Values are any string or numeric values (for example, substituted cvars).
* Operator is = (or ==), \!=, \<, \>, \<=, \>=. == is same to =.
* If single value specified, condition is true when value is non-zero
Example:
```
if $sv_cheats == 1
:echo Cheats enabled, adding cheat menu
:exec cheatmenu.cfg
else
:echo Please enable cheats to use this!
```

View File

@@ -0,0 +1,8 @@
# Expanded structures that used by engine and mods
To make porting and developing mods on 64-bit platforms less painful, we decided to expand size of several structures.
This information important in case you are using codebase like XashXT, Paranoia 2: Savior and want to compile your mod for platform with 64-bit pointer size: you should replace old definitions with new ones, otherwise your mod will not work with Xash3D FWGS (typically, it's just crashing when starting map).
| Structure name | Locates in file | Original size on 64-bit | Current size on 64-bit |
|----------------|-----------------|-------------------------|------------------------|
|`mfaceinfo_t` | `common/com_model.h` | 176 bytes | 304 bytes |
|`decal_s` | `common/com_model.h` | 72 bytes | 88 bytes |
|`mextrasurf_t` | `common/com_model.h` | 376 bytes | 504 bytes |

View File

@@ -0,0 +1,48 @@
## Цель
На текущий момент клиенты имеют некоторые части платформозависимого кода внутри себя. Это плохо, т.к. мы не можем использовать одинаковые функции (если не перепишем почти половину кода SDL) на разных платформах.
## Клиентская часть
* Клиент будет иметь возможность полностью реализовать touch-ввод. Отрисовка может быть произведена через HUD.
* Клиент получит простые события движения и обзора от движка
### Клиентская реализация
#### Клиент будет экспортировать некоторые функции движку (опционально):
* `int IN_ClientTouchEvent ( int fingerID, float x, float y, float dx, float dy );`
Вернёт 1 если касание активно, иначе 0.
* `void IN_ClientMoveEvent ( float forwardmove, float sidemove );`
Клиент будет накапливать значения величин для команд движения перед созданием команд и очищать их при CreateMove.
* `void IN_ClientLookEvent ( float relyaw, float relpitch );`
Клиент будет вращать камерой когда нужно, прямо как в реализации мыши
## Движковая часть
* Движок будет управлять событиями платформы и вызывать клиентские функции
* Движок реализует стандартную систему взгляда и движения если её нет в клиенте
### Движковая реализация
#### События касания
Перед вызовом ClientMove движок обязан получить события о касании.
Если из клиента экспортирована функция IN_ClientTouchEvent, событие будет отправлено клиенту.
Иначе, движок будет рисовать свой touch-интерфейс.
#### Другие события
Интерфейс прикосновений и код джойстика в движке будут генерировать следующие два типа событий:
* События движения (функция IN_ClientMoveEvent)
* События просмотра (функция IN_ClientLookEvent)
Если клиент экспортирует эти функции, события будут отправляться клиенту перед CreateMove
Иначе события просмотра будут происходить перед CreateMove, но после MoveEvent. Они будут применены к генерируемым командам

View File

@@ -0,0 +1,48 @@
## Purpose
Clients have different platform-depended input code now.
It is bad because we cannot use same functions (if we won't rewrite almost half of SDL) on different platforms.
## Client part
* Client will have ability to fully implement touch input. Drawing may be done by HUD.
* Client will receive basic motion and look events from engine
### Client implementation
#### Client will optionally export some functions to Engine:
* `int IN_ClientTouchEvent ( int fingerID, float x, float y, float dx, float dy );`
Return 1 if touch is active, 0 otherwise.
* `void IN_ClientMoveEvent ( float forwardmove, float sidemove );`
Client wil accumulate move values before creating commands and flush it on CreateMove.
* `void IN_ClientLookEvent ( float relyaw, float relpitch );`
Client will rotate camera when needed as in mouse implementation
## Engine part
* Engine will handle platform events and call client functions.
* Engine will implement fallback look and movement system when client interface not present
### Engine implementation
#### Touch events
Before calling ClientMove engine must get touch events.
If client exported IN_ClientTouchEvent, event will be sent to client.
Otherwise engine will draw own touch interface.
#### Other events
Engine touch interface and joystick support code will generate two types of events:
* Move events (IN_ClientMoveEvent function)
* Look events (IN_ClientLookEvent function)
If client exported these functions, events will be sent to client before CreateMove
Otherwise Look Event will be processed before CreateMove, but MoveEvent after. It will be applied to generated command

View File

@@ -0,0 +1,44 @@
I propose a new library naming scheme, which will allow to distribute mods and games in single archive to different operating systems and CPUs:
Legend:
* $os -- Q_buildos() return value, in lower case.
* $arch -- Q_buildarch() return value, in lower case.
* $ext -- OS-specific extension: dll, so, dylib, etc.
The scheme will be:
1. Client library:
* ```client.$ext``` for **Win/Lin/Mac** with **x86**.
* ```client_$arch.$ext``` for **Win/Lin/Mac** with **NON-x86**.
* ```client_$os_$arch.$ext``` for everything else.
2. Menu library:
* ```menu.$ext``` for **Win/Lin/Mac** with **x86**.
* ```menu_$arch.$ext``` for **Win/Lin/Mac** with **NON-x86**.
* ```menu_$os_$arch.$ext``` for everything else.
3. Server library:
* On **Win/Lin/Mac** with **x86**, it **MUST** use the raw gamedll name for corresponding OS field from `gameinfo.txt`.
* On **Win/Lin/Mac** with **NON-x86**, it **MUST** use the raw gamedll name for corresponding OS field from `gameinfo.txt`, but append ```_$arch``` before file extension. Like: ```hl_amd64.so``` or ```cs_e2k.so```.
* On everything else, it must use gamedll name from ```gamedll_linux``` field, but append ```_$os_$arch``` before file extension. Like: ```hl_haiku_amd64.so``` or ```cs_freebsd_armhf.so```.
Why ```gamedll_linux``` and not ```gamedll```? Because it looks more logic that way, most operating systems are *nix-like and share code with Linux, rather than Windows.
4. Refresh library: not needed, as RefAPI is not stable and it's not intended to distribute with mods.
For any libraries distributed **with** engine, naming scheme should be used more convenient for OS port.
Issue #0. Inconsistency between ABI and Q_buildarch.\
Resolution: Change Q_buildarch return value to use Debian-styled architectures list: https://www.debian.org/ports/, which includes a special naming for big/little-endian and hard/soft-float ARM.
Issue #1: Build-system integration.\
Resolution: implemented as [LibraryNaming.cmake](https://github.com/FWGS/hlsdk-portable/blob/master/cmake/LibraryNaming.cmake) and [library_naming.py](https://github.com/FWGS/hlsdk-portable/blob/master/scripts/waifulib/library_naming.py) extensions, see
Issue #2(related to #0): Which ARM flavours we actually need to handle?\
Resolution: Little-endian only, as there is no known big-endian ARM platforms in the wild.
Architecture is coded this way:
* ```armvxy```, where `x` is ARM instruction set level and `y` is hard-float ABI presence: `hf` where hard float ABI used, otherwise `l`.
Issue #3: Some mods (like The Specialists, Tyrian, ...) already apply suffixes _i386, _i686 to the gamedll path:\
Resolution: On x86 on **Win/Lin/Mac**, don't change anything. Otherwise, strip the _i?86 part and follow the usual scheme.
See discussion: https://github.com/FWGS/xash3d-fwgs/issues/39

View File

@@ -0,0 +1,22 @@
## Looping MP3 extension
It is now possible to loop MP3 file in Xash3D FWGS by adding a custom text tag with `LOOP_START` or `LOOPSTART` in description and time point (in raw samples) in value.
### Example with foobar2000
1. Open Foobar2000
2. Add your .mp3 file to playlist
3. Right click to newly added file and select Properties
4. In Metadata tab, at the bottom of the table, select "+add new"
5. In newly added line replace `<60>input field name<6D>` with `LOOP_START` (without any symbols).
6. Press Tab and enter loop time point in raw samples. For example, `0` will replay sound file from beginning to end indefinitely.
### Possible alternatives
1. Classic WAV files looping. HQ WAV files can take too much disk space, and recommended software supporting cue points is paid, outdated and can't run on modern systems. (Although there is alternative that's proven to work with idTech-based engines called LoopAuditioneer.)
2. Vorbis looping through comment. Engine doesn't support Vorbis but this extension was highly inspired by this hack.
### Known bugs and limitations
1. At this time using MP3 as SFX requires complete decoding. This can cause noticeable stutters, so keep MP3 file length in mind.
2. We deliberately only support modern ID3v2.3 and ID3v2.4 tags. Using ID3v1 is not possible.

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"
}
```

117
Documentation/gameinfo.md Normal file
View File

@@ -0,0 +1,117 @@
# Game definition and information file
gameinfo.txt is an essential part of any Xash3D based game. It allows basic customization for games creators, like setting game title, DLL paths, etc.
This document defines gameinfo.txt syntax, supported keys and liblist.gam conversion rules for the latest version of the engine. Note for engine developers, keep this document in sync with an implementation.
## gameinfo.txt syntax
* gameinfo.txt is a simple list of keys and values, separated by newline.
* You can add single line comments using double slashes (//).
* Keys can accept integer, float, string or boolean values.
* Boolean keys use 0 as false and 1 as true value.
* To have spaces in string values, you must enclose them in double quotes. Then, to have double quotes, you must escape it with backslash, and to have a backslash you need to use double backslashes.
The example:
```
// this is a comment :)
// this is another comment
some_integer_key 123
this_is_float_key 13.37 // optional comment
enable_feature 1 // boolean, 1 to enable, 0 to disable
example_string_key string_value
example_spaces "string with spaces"
example_title "Fate\\Stay Night" // engine will parse it as Fate\Stay Night
```
## gameinfo.txt keys
This is a list of all gameinfo.txt keys supported by the engine. Be aware that the engine will silently skip all unrecognized keys.
| Key | Type | Default value | Description |
| ---------------- | ---------- | --------------- | ----------- |
| `ambient0` | string | Empty string | Automatic ambient sound |
| `ambient1` | string | Empty string | Automatic ambient sound |
| `ambient2` | string | Empty string | Automatic ambient sound |
| `ambient3` | string | Empty string | Automatic ambient sound |
| `basedir` | string | `valve` | Game base directory, used to share assets between games |
| `date` | string | Empty string | Game release date. Unused. |
| `dllpath` | string | `cl_dlls` | Game DLL path. Engine will search custom DLLs (client or menu, for example) in this directory, except `gamedll`, see below. |
| `fallback_dir` | string | Empty string | Additional game base directory |
| `gamedir` | string | Current gamedir | Game directory, ignored in FWGS, as game directory is defined by the game directory name |
| `gamedll` | string | `dlls/hl.dll` | Game server DLL for 32-bit x86 Windows (see LibraryNaming.md for details) |
| `gamemode` | string | Empty string | Game type. When set to `singleplayer_only` or `multiplayer_only` marks the game as SP or MP only respectively, hiding the option in game UI. Omitting this key or using custom values mark the game as both MP and SP compatible. |
| `icon` | string | `game.ico` | Game icon. Engine will automatically append .ico and may automatically switch to .tga icon as well |
| `max_beams` | integer | 128 | Beams limit, 64 min, 512 max |
| `max_edicts` | integer | 900 | Entities limit, 600 min, 8192 max (protocol limit). In FWGS, minimum is 64. |
| `max_particles` | integer | 4096 | Particles limit, 1024 min, 131072 max |
| `max_tempents` | integer | 500 | Temporary entities limit. 300 min, 2048 max |
| `mp_entity` | string | `info_player_deathmatch` | Entity used to mark maps as multiplayer |
| `mp_filter` | string | Empty string | When set, used to filter multiplayer maps instead of `mp_entity`.<br>If the map name starts with the same characters as this filter, it's considered a multiplayer map |
| `nomodels` | boolean | 0 | When set to 1, disallows changing player model in UI |
| `noskills` | boolean | 0 | When set to 1, disallows selection of game difficulty |
| `secure` | boolean | 0 | When set to 1, original Unkle Mike's engine will completely disable developer mode. FWGS ignores but preserves this value for compatibility. |
| `size` | integer | 0 | Game directory size in bytes, used in Change Game dialog only |
| `startmap` | string | `c0a0` | The name of the map used in new game |
| `sp_entity` | string | `info_player_start` | Entity used to mark map as single player. Used in map validation |
| `title` | string | `New Game` | Game title, used in window title, default server name, etc. |
| `trainmap` | string | `t0a0` | The name of the training map (Hazard Course) |
| `type` | string | Empty string | Game type, used in Change Game UI. |
| `url_info` | string | Empty string | Game homepage URL, used in Change Game UI |
| `url_update` | string | Empty string | Game updates URL, used in Settings UI |
| `version` | float | 1.0 | Game version, used in Change Game dialog and in server info |
## FWGS-specific gameinfo.txt keys
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.
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` | |
| `gamedir` | `gamedir` | |
| `gamedll` | `gamedll` | |
| `gamedll_linux` | `gamedll_linux` | |
| `gamedll_osx` | `gamedll_osx` | |
| `hd_background` | `hd_background` | |
| `icon` | `icon` | |
| `mpentity` | `mp_entity` | |
| `mpfilter` | `mp_filter` | |
| `nomodels` | `nomodels` | |
| `secure` | `secure` | In GoldSrc it's used to mark the multiplayer game as anti-cheat enabled.<br>Original Xash3D misinterprets its value for disallowing console and developer mode.<br>FWGS ignores this key but preserves for compatibility. |
| `startmap` | `startmap` | |
| `size` | `size` | |
| `trainingmap` | `trainmap` | |
| `trainmap` | `trainmap` | |
| `type` | `type` & `gamemode`| In `liblist.gam` this key works as both `type` and `gamemode`.<br>If value is `singleplayer_only` or `multiplayer_only` the game is marked as SP or MP only, and `gameinfo.txt` type set to `Single` or `Multiplayer`.<br>Any custom value will mark the game as both SP and MP compatible, and type is set to whatever custom value. |
| `url_dl` | `url_update` | |
| `url_info` | `url_info` | |
| `version` | `version` | |

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)
```

View File

@@ -0,0 +1,110 @@
# Self-made port
## Compatibility with RISC architectures
### Unaligned access
Unaligned access on **i386** causes only performance penalty, but on **RISC** it can cause unstable work.
For HLSDK at least you need such patches in util.cpp:
- https://github.com/FWGS/halflife/commit/7bfefe86e35d67867ae7af830ac1fc38f2908360
- https://github.com/FWGS/hlsdk-portable/commit/617d75545f2ecb9b2d46cc30728dc37c9eb6d35e
### Signed chars
`char` type defined as **signed** for **x86** and as **unsigned** for **arm**.
And sometimes such difference can break logic.
As a solution you can use `signed char` type in code directly or use `-fsigned-char` option for gcc/clang compilers.
For HLSDK at least you need such [fix](https://github.com/FWGS/hlsdk-portable/commit/1ca34fcb4381682bd517612b530db22a1354a795) in nodes.cpp/.h.
## Compatibility with 64bit architectures
You need list of patches for Studio Model Render, MAKE_STRING macro and nodes:
- https://github.com/FWGS/hlsdk-portable/commit/d287ed446332e615ab5fb25ca81b99fa14d18a73
- https://github.com/FWGS/hlsdk-portable/commit/3bce17e3a04f8af10a927a07ceb8ab0f09152ec4
- https://github.com/FWGS/hlsdk-portable/commit/9ebfc981773ec4c7a89ffe52d9c249e1fbef9634
- https://github.com/FWGS/hlsdk-portable/commit/00833188dab87ef5746286479ba5aeb9d83b4a0c
- https://github.com/FWGS/hlsdk-portable/commit/4661b5c1a5245b27a5532745c11e44b5540e4172
- https://github.com/FWGS/hlsdk-portable/commit/2b61380146b1d58a8c465f0e312c061b12bda115
- https://github.com/FWGS/hlsdk-portable/commit/8ef6cb2427ee16a763103bd3f315f38e2f01cfe2
## Mobility API
Xash3D FWGS has special extended interface in `mobility_int.h` which adds some new features like vibration on mobile platforms.
## Porting server-side code
Original valve's server code was compatible with linux and gcc 2.x.
Newer gcc versions have restriction which breaks build.
Now, to make it building with gcc 4.x+ or clang, you need to do following:
* Go to cbase.h and redefine macros as following
```
#define SetThink( a ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (&a)
#define SetTouch( a ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
#define SetUse( a ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (&a)
#define SetBlocked( a ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (&a)
#define ResetThink( ) m_pfnThink = static_cast <void (CBaseEntity::*)(void)> (NULL)
#define ResetTouch( ) m_pfnTouch = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (NULL)
#define ResetUse( ) m_pfnUse = static_cast <void (CBaseEntity::*)( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )> (NULL)
#define ResetBlocked( ) m_pfnBlocked = static_cast <void (CBaseEntity::*)(CBaseEntity *)> (NULL)
...
#define SetMoveDone( a ) m_pfnCallWhenMoveDone = static_cast <void (CBaseToggle::*)(void)> (&a)
```
* Replace all SetThink(NULL), SetTouch(NULL), setUse(NULL) and SetBlocked(NULL) by ResetThink(), ResetTouch(), ResetUse() and ResetBlocked()
* Sometimes you may need to add #include <ctype.h> if functions tolower or isspace are missing
## Porting client-side code
* Redefine all DLLEXPORT defines as empty field (Place it under _WIN32 macro if you want to keep windows compatibility).
* Remove hud_servers.cpp and Servers_Init/Servers_Shutdown from hud.cpp.
* Fix CAPS filenames in includes (like STDIO.H, replace by stdio.h).
* Replace broken macros as DECLARE_MESSAGE, DECLARE_COMMAND by fixed examples from our hlsdk-portable port (cl_util.h).
* Add ctype.h where is needed (tolower, isspace functions).
* Add string.h where is needed (memcpy, strcpy, etc).
* Use in_defs.h from hlsdk-portable.
* Add input_xash3d.cpp from hlsdk-portable project to fix input.
Now your client should be able to build and work correctly.
# Porting mod to hlsdk-portable
Look at changes which was made.
If there are not too much changes (for example, only some weapons was added), add these changes in hlsdk-portable.
You can use diff with original HLSDK and apply it as patch to hlsdk-portable.
```
NOTE: Many an old mods was made on HLSDK 2.0-2.1 and some rare mods on HLSDK 1.0.
So you need to have different versions of HLSDK to make diffs.
Plus different Spirit of Half-Life versions if mod was made on it.
Also, weapons in old HLSDK versions does not use client weapon prediction system and you may be need to port standart half-life weapons to server side.
```
Files must have same line endings (use dos2unix on all files).
We recommend to enable ignoring space changes in diff.
Move all new files to separate directories.
# Possible replacements for non-portable external dependencies
1. If mod uses **fmod.dll** or **base.dll** to play mp3/ogg on client-side or to precache sounds on server-side, you can replace it with:
- [pfnPrimeMusicStream](https://github.com/FWGS/hlsdk-portable/blob/master/engine/cdll_int.h#L293=) engine callback;
- [miniaudio](https://github.com/mackron/miniaudio);
- [phonon](https://community.kde.org/Phonon).
2. If mod uses **OpenGL**, porting code to Xash3D render interface is recommended.
3. If mod uses **cg.dll**, you can try to port code to [NVFX](https://github.com/tlorach/nvFX).
4. If mod uses detours, comment code or try to find replacement somehow by yourself.
# Additional recommendations
1. If mod uses STL, you can replace it with [MiniUTL](https://github.com/FWGS/MiniUTL).
2. Avoid to use dynamic casts to make small size binaries.
3. Avoid to use exceptions to make small size binaries.
# Writing build scripts
Use wscript/CMakeLists.txt files from hlsdk-portable as build scripts example.
Get .c and .cpp file lists from Visual Studio project.
Add missing include dirs.

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,11 @@
# Not supported mods and reasons why
|Name |Version |Why not working |What was made for that
|---- |------- |--------------- |----------------------
|Blue Shift |The latest steam release |Uses vgui2 library which xash3d does not support |Recreated source code here: https://github.com/FWGS/hlsdk-xash3d/tree/bshift
|Counter Strike |1.6(The latest steam release) |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|Counter Strike: Condition Zero |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|Counter Strike: Condition Zero - Deleted scenes |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|Day of Defeat |The latest steam release |Uses vgui2 library which xash3d does not support |Some work on vgui2 support was made here: https://github.com/FWGS/xash3d/tree/vinterface
|Sven-Coop |5.0+ |Uses custom GoldSrc engine |

View File

@@ -0,0 +1,380 @@
Source code of this mods is available for modders and porters in public access.
# Original Work
## Absolute Zero
Official gitlab repository - https://gitlab.com/Cobalt-57/half-life-absolute-zero/
## Adrenaline Gamer
Official github repository by Martin \"Bullet\" Webrant - https://github.com/martinwebrant/agmod
## Arrangement
Mirrored on github - https://github.com/JoelTroch/am_src_30jan2011
## Arrangemode: Rebirth
Mirrored on github - https://github.com/JoelTroch/am_src_rebirth
## Battle Grounds
Mirrored on github - https://github.com/nekonomicon/BattleGrounds
## Bubblemod
Download page on official site(WM snapshot) - [http://www.bubblemod.org/dl_default.php](https://web.archive.org/web/20130717133158/http://www.bubblemod.org/dl_default.php)
Mirrored on github - https://github.com/HLSources/BubbleMod
## Chicken Fortress
Official github repository - https://github.com/CKFDevPowered/CKF3Alpha
## Cold Ice
Version 1.9 is available on ModDB - https://www.moddb.com/mods/cold-ice/downloads/cold-ice-sdk
Version 1.9 mirrored on github - https://github.com/solidi/hl-mods/tree/master/ci
## Cold Ice Ressurection
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/cir
## Cthulhu
Uploaded to github by Oleg Cherkasky - https://github.com/gunrunners-paradise/Cthulhu-HLmod-SDK
## Deathmatch Classic
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/dmc
## ESHQ
Official github repository - https://github.com/adslbarxatov/xash3d-for-ESHQ
## Flat-Life
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/Half-Life_2D_(Flat-Life)
## Gang Wars
Mirrored on github - https://github.com/nekonomicon/gw1.45src
## Go-mod
Versions 2.0 and 3.0, available in mod archives on ModDB - https://www.moddb.com/mods/go-mod/downloads
Version 3.0, mirrored on github - https://github.com/nekonomicon/Go-mod30
## GT mod
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/GT_mod_(Polnie_ishodniki)
## Half-Life: Advanced Deathmatch
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/hla
## Half-Life: Decay
Mirrored on github(PC Port) - https://github.com/hoaxer/Half-Life-Decay
## Half-Life: Echoes
Available on ModDB - https://www.moddb.com/mods/half-life-echoes
## Half-Life: Expanded Arsenal
Available on ModDB - https://www.moddb.com/mods/half-life-expanded-arsenal
## Half-Life: Gravgun mod
Branch **gravgun** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/gravgun
## Half-Life: Invasion
Official github repository - https://github.com/jlecorre/hlinvasion
## Half-Life: Pong
Mirrored on github - https://github.com/solidi/hl-mods/tree/master/pong
## Half-Life: Quest Mode
Available on cs-mapping.com.ua - https://old.cs-mapping.com.ua/forum/showthread.php?t=38030
## Half-Life: Top-Down
Official gitlab repository - https://gitlab.com/Sockman/hltopdown
## Half-Life: Update
Official github repository - https://github.com/Fograin/hl-subsmod-ex
## Half-Life: Rally
Official gitlab repository - https://gitlab.com/hlrally/src
## Half-Life: Weapon Edition
Available on ModDB - https://www.moddb.com/mods/half-life-weapon-edition/downloads/half-life-weapon-edition-1508-alpha-open-src
## Half-Life: Year of the Dragon
Available on ModDB - https://www.moddb.com/mods/year-of-the-dragon
## Half-Nuked
Available on ModDB - https://www.moddb.com/mods/half-nuked/downloads/half-nuked-src
## Half-Payne
Official github repository - https://github.com/suXinjke/HalfPayne
## Half-Quake
Official github repository - https://github.com/muddasheep/hqtrilogy
## Half-Rats: Parasomnia
Official github repository - https://github.com/HeathGames/half_rats_parasomnia_src
## Half-Screwed
Official github repository - https://github.com/desukuran/half-screwed
## Headcrab Frenzy
Version 1.3 on ModDB - https://www.moddb.com/mods/headcrab-frenzy/downloads/headcrab-frenzy-13-beta-source-code
## Heart of Evil
Mirrored on github - https://github.com/nekonomicon/HeartOfEvil
## Ingram Chillin' Mod
Official SourceForge repository - https://sourceforge.net/projects/icm-hl/
## MechMod
Official github repository - https://github.com/vermagav/mechmod
## Mortal Combat Forever
Available on GamerLab - http://gamer-lab.com/eng/code_mods_goldsrc/Mortal_Combat_Forever_(Polnie_ishodniki)
## Natural Selection
Official github repository - https://github.com/unknownworlds/NS
## Overturn
Available in mod archive on ModDB - https://www.moddb.com/mods/overturn
## Oz Deathmatch
Mirrored on github - https://github.com/nekonomicon/OZDM
## Paranoia
Available on ModDB - https://www.moddb.com/mods/paranoia/downloads/paranoia-toolkit
## Paranoia 2: The Savior
Prealpha, mirrored on github - https://github.com/a1batross/Paranoia2_ancient
Version 1.51, mirrored on github - https://github.com/a1batross/Paranoia2_original
## Raven City
*Unfinished mod*
Was found on HLFX - http://hlfx.ru/forum/showthread.php?s=2c892dfc52f72be52a89c3f52a397cd0&threadid=1819&postid=44674#post44674
## Ricochet
Available in Valve's Half-Life repository - https://github.com/ValveSoftware/halflife/tree/master/ricochet
## Spirit of Half-Life
[Logic&Trick's](https://github.com/LogicAndTrick) mirror - https://files.logic-and-trick.com/#/Half-Life/Mods/Spirit%20of%20Half-Life
## The Wastes
Version 1.5: mirrored on code.idtech.space - https://code.idtech.space/vera/halflife-thewastes-sdk
## Threewave CTF
*Unfinished mod by Valve Software*
Available in Valve's Half-Life repository with Deathmatch Classic sources - https://github.com/ValveSoftware/halflife/tree/master/dmc
## Trinity Render
Available on ModDB - https://www.moddb.com/mods/half-life-episode-two/downloads/trinity-rendering-engine-v308f
## Tyrian: Ground Assault
Available on ModDB - https://www.moddb.com/mods/tyriangroundassault/downloads/tyrianga-v1-0-src
## Wasteland
Mirrored on code.idtech.space - https://code.idtech.space/vera/halflife-wasteland-sdk
## Wizard Wars
Download page on official site - http://www.thothie.com/ww/
## XashXT
Mirrored on github - https://github.com/a1batross/XashXT_original
## Xen-Warrior
*Source code is a part of Spirit of Half-Life 1.0-1.2 under XENWARRIOR macro*
[Logic&Trick's](https://github.com/LogicAndTrick) mirror - https://files.logic-and-trick.com/#/Half-Life/Mods/Spirit%20of%20Half-Life
## Zombie-X
Available in mod archive on ModDB - https://www.moddb.com/mods/zombie-x-10-final/downloads/zombie-x-10-dle-beta6-last-version
## ZXC
Available on ModDB - https://www.moddb.com/mods/zxc-mod-133/downloads/zxc-mod-136-final
Mirrored on github - https://github.com/ZXCmod/ZXCmod
# Reimplementation
## Absolute Redemption
Branch **redempt** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/redempt
## Adrenaline Gamer
OpenAG by YaLTeR - https://github.com/YaLTeR/OpenAG
## Afraid of Monsters
malortie's recreation - https://github.com/malortie/hl-aom
Branch **aom** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aom
## Afraid of Monsters: Director's cut
Reverse-engineered code: branch **aomdc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aomdc
## Azure Sheep
malortie's recreation - https://github.com/malortie/hl-asheep
Reverse-engineered code: branch **asheep** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/asheep
## Big Lolly
malortie's recreation - https://github.com/malortie/hl-biglolly
Branch **biglolly** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/biglolly
## Black Ops
malortie's recreation - https://github.com/malortie/hl-blackops
Branch **blackops** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/blackops
## Bloody Pizza: Vendetta
Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/caseclosed
## Case Closed
Branch **caseclosed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/caseclosed
## Cleaner's Adventures
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/Velaron/cs16-client
Reverse-engineered code of server part by nagist - https://github.com/nagist/cs16nd
Reverse-engineered code of server part by s1lentq - https://github.com/s1lentq/ReGameDLL_CS
## Counter Strike Online
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
Reverse-engineered code: branch **eftd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/eftd
## Half-Life: Black Guard
*This mod uses dlls from Cleaner's Adventures*
Branch **CAd** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/CAd
## Half-Life: Blue Shift
Unkle Mike's recreation - https://hlfx.ru/forum/showthread.php?s=&threadid=5253
Reverse-engineered code: branch **bshift** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/bshift
## Half-Life: Induction
Branch **induction** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/induction
## Half-Life: Opposing Force
Recreation by lostgamer aka nillerusr - https://github.com/LostGamerHL/hlsdk-xash3d
Reverse-engineered code: clean branch **opfor** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/opfor
Spirit of Half Life: Opposing-Force Edition - https://github.com/Hammermaps-DEV/SOHL-V1.9-Opposing-Force-Edition
## Half-Life: Rebellion
Reverse-engineered code: branch **rebellion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/rebellion
## Half-Life: Urbicide
Branch **hl_urbicide** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hl_urbicide
## Half-Life: Visitors
malortie's recreation - https://github.com/malortie/hl-visitors
Reverse-engineered code: branch **visitors** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/visitors
## Half-Secret
Branch **half-secret** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-secret
## Night at the Office
malortie's recreation - https://github.com/malortie/hl-nato
Branch **noffice** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/noffice
## Poke 646
malortie's recreation - https://github.com/malortie/hl-poke646
Reverse-engineered code: branch **poke646** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646
## Poke 646: Vendetta
malortie's recreation - https://github.com/malortie/hl-poke646-vendetta
Reverse-engineered code: branch **poke646_vendetta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/poke646_vendetta
## Residual Life
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
## Residual Point
Reverse-engineered code: branch **residual_point** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/residual_point
## Sewer Beta
Branch **sewer_beta** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sewer_beta
## Team Fortress Classic
Reverse-engineered code by Velaron - https://github.com/Velaron/tf15-client
## The Gate
malortie's recreation - https://github.com/malortie/hl-thegate
Reverse-engineered code: branch **thegate** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/thegate
## They Hunger
malortie's recreation - https://github.com/malortie/hl-theyhunger
Reverse-engineered code: branch **theyhunger** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/theyhunger
They Hunger: Tactical - https://www.moddb.com/mods/they-hunger-tactical/downloads/tht-source-code-documentation
## Times of Troubles
malortie's recreation - https://github.com/malortie/hl-tot
Branch **tot** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/tot
# Derived work
## Adrenaline Gamer
Branch **aghl** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/aghl
## Bubblemod
Branch **bubblemod** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/bubblemod
## Deathmatch Classic
Deathmatch Classic: Adrenaline Gamer Edition - https://github.com/martinwebrant/agmod/tree/master/src/dmc
Deathmatch Quaked - https://www.moddb.com/games/deathmatch-classic/downloads/dmq2
Branch **dmc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/dmc
## Half-Life: Echoes
Branch **echoes** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/echoes
## Half-Life: Invasion
Port to HLSDK 2.4 by malortie - https://github.com/malortie/hl-invasion
Port to Linux by fmoraw - https://github.com/fmoraw/hlinvasion
Branch **invasion** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/invasion
## Half-Life: Top-Down
Branch **hltopdown** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/hltopdown
## Half-Screwed
Branch **half-screwed** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/half-screwed
## Natural Selection
Port to Linux - https://github.com/fmoraw/NS
## Spirit of Half-Life
Version 1.2: branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
## Swiss Cheese Halloween 2002
Just more playable version by malortie - https://github.com/malortie/hl-shall
Branch **halloween** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/halloween
## The Wastes
Version 1.5: Port to Linux - https://git.mentality.rip/a1batross/halflife-thewastes-sdk
## Threewave CTF
Branch **dmc** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/dmc
## Xen-Warrior
Branch **sohl1.2** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/sohl1.2
## Zombie-X
Branch **zombie-x** in hlsdk-portable - https://github.com/FWGS/hlsdk-portable/tree/zombie-x

33
Documentation/ports.md Normal file
View File

@@ -0,0 +1,33 @@
Xash3D FWGS is intended to be easily ported to specific platform, 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.
Status:
* **Supported**: active, was confirmed to be fully functional.
* **In progress**: active, under development.
* **Old Engine**: port was for old engine fork
* **Not maintained**: lack of human resources
* **Deprecated**: not supported anymore
Table is sorted by status and platform.
| Platform | Status | Maintainer | Note
| -------- | ------ | ---------- | ----
| 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 |
| 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

49
Documentation/psvita.md Normal file
View File

@@ -0,0 +1,49 @@
## PlayStation Vita port
### Prerequisites
1. Make sure your PSVita is [set up to run homebrew applications](https://vita.hacks.guide/).
2. Install [kubridge](https://github.com/TheOfficialFloW/kubridge/releases/) by copying `kubridge.suprx` to your taiHEN plugins folder (usually `ux0:/tai`) and add it to your `config.txt`, for example:
```
*KERNEL
ux0:tai/kubridge.skprx
```
3. Install `libshacccg.suprx` by following [this guide](https://cimmerian.gitbook.io/vita-troubleshooting-guide/shader-compiler/extract-libshacccg.suprx).
### Installation
1. If you have an old vitaXash3D install, remove it.
2. Get `xash3d-fwgs-psvita.7z` from the latest [automatic build](https://github.com/FWGS/xash3d-fwgs/releases/tag/continuous).
3. Install `xash.vpk` from the 7z archive onto your PSVita.
4. Copy the `data` directory from the 7z archive to the root of your PSVita's SD card.
5. Copy the valve folder and any other mod folders from your Half-Life install to `ux0:/data/xash3d/` (you can use other mountpoints instead of `ux0`). **Do not overwrite anything.**
### Build instructions
1. Install [VitaSDK](https://vitasdk.org/).
2. Build and install [vitaGL](https://github.com/Rinnegatamante/vitaGL):
```
git clone https://github.com/Rinnegatamante/vitaGL.git
make -C vitaGL NO_TEX_COMBINER=1 HAVE_UNFLIPPED_FBOS=1 HAVE_PTHREAD=1 SINGLE_THREADED_GC=1 MATH_SPEEDHACK=1 DRAW_SPEEDHACK=1 HAVE_CUSTOM_HEAP=1 -j2 install
```
3. Build and install [vita-rtld](https://github.com/fgsfdsfgs/vita-rtld):
```
git clone https://github.com/fgsfdsfgs/vita-rtld.git && cd vita-rtld
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2 install
```
4. Build and install [this SDL2 fork](https://github.com/Northfear/SDL) with vitaGL integration:
```
git clone https://github.com/Northfear/SDL.git && cd SDL
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${VITASDK}/share/vita.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVIDEO_VITA_VGL=ON ..
make -j2 install
```
5. Use `waf`:
```
./waf configure -T release --psvita
./waf build
```
6. Copy all the resulting `.so` files into a single folder:
```
./waf install --destdir=xash3d
```
7. `xash.vpk` is located in `build/engine/`.

View File

@@ -0,0 +1,15 @@
As online community is growing, we don't want to keep bad or invalid servers on the Internet Games list. It's a common rules for all Xash3D server owners who are using default master server.
1. Breaking master server or clients is prohibited in any way. If you found a serious bug, contact us at contact 'at' fwgs.ru or post an issue at GitHub.
2. Changing settings, exploiting vulnerabilities of clients is prohibited in any way. If you found a serious bug, contact us at contact 'at' fwgs.ru or post an issue at GitHub.
2. Agressive advertisement and spam on other servers is prohibited in any way.
3. If your server is require downloading custom content, it should be available for everyone. Recommended way to deliver custom content is FastDL.
4. It's recommended to keep your server is up-to-date. You may use our public Debian/Ubuntu/Arch Linux [repository](https://github.com/FWGS/xash3d/wiki/How-to-set-up-a-Xash3D-Dedicated-Server-on-Debian-or-Ubuntu) to simplify updating process.
Just follow these rules to not get banned on our master server. Good luck, have fun!

File diff suppressed because it is too large Load Diff

92
README.md Normal file
View File

@@ -0,0 +1,92 @@
# 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" />
[![builds.sr.ht status](https://builds.sr.ht/~a1batross/xash3d-fwgs.svg)](https://builds.sr.ht/~a1batross/xash3d-fwgs?) [![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 (pronounced `[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 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
* Steam Half-Life (HLSDK 2.4) support.
* Crossplatform and modern compilers support: supports Windows, Linux, BSD & Android on x86 & ARM and [many more](Documentation/ports.md).
* Better multiplayer support: multiple master servers, headless dedicated server, voice chat 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.
* External VGUI support module.
* PNG & KTX2 image format 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 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 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/
NOTE: NEVER USE GitHub's ZIP ARCHIVES. GitHub doesn't include external dependencies we're using!
### Prerequisites
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 Half-Life expansions and some mods.
#### Windows (Visual Studio)
* Install Visual Studio.
* Install latest [Python](https://python.org) **OR** run `cinst python.install` if you have Chocolatey.
* Install latest [Git](https://git-scm.com/download/win) **OR** run `cinst git.install` if you have Chocolatey.
* Download [SDL2](https://libsdl.org/download-2.0.php) development package for Visual Studio.
* Clone this repository: `git clone --recursive https://github.com/FWGS/xash3d-fwgs`.
* Make sure you have at least 12GB of free space to store all build-time dependencies: ~10GB for Visual Studio, 300 MB for Git, 100 MB for Python and other.
#### GNU/Linux
##### Debian/Ubuntu
* Enable i386 on your system, if you're compiling 32-bit engine on amd64. If not, skip this
`$ 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`
### Building
#### Windows (Visual Studio)
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`
#### 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.
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`

53
common/backends.h Normal file
View File

@@ -0,0 +1,53 @@
/*
backends.h - backend macro definitions
Copyright (C) 2016 Mittorn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef BACKENDS_H
#define BACKENDS_H
// video backends (XASH_VIDEO)
#define VIDEO_NULL 0
#define VIDEO_SDL 1
#define VIDEO_FBDEV 3
#define VIDEO_DOS 4
// audio backends (XASH_SOUND)
#define SOUND_NULL 0
#define SOUND_SDL 1
#define SOUND_ALSA 3
// input (XASH_INPUT)
#define INPUT_NULL 0
#define INPUT_SDL 1
#define INPUT_EVDEV 3
// timer (XASH_TIMER)
#define TIMER_NULL 0 // not used
#define TIMER_SDL 1
#define TIMER_POSIX 2
#define TIMER_WIN32 3
#define TIMER_DOS 4
// messageboxes (XASH_MESSAGEBOX)
#define MSGBOX_STDERR 0
#define MSGBOX_SDL 1
#define MSGBOX_WIN32 3
#define MSGBOX_NSWITCH 4
// library loading (XASH_LIB)
#define LIB_NULL 0
#define LIB_POSIX 1
#define LIB_WIN32 2
#define LIB_STATIC 3
#endif /* BACKENDS_H */

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -57,4 +57,4 @@ struct beam_s
struct particle_s *particles;
};
#endif//BEAMDEF_H
#endif//BEAMDEF_H

View File

@@ -48,7 +48,7 @@ BRUSH MODELS
#define SURF_PLANEBACK BIT( 1 ) // plane should be negated
#define SURF_DRAWSKY BIT( 2 ) // sky surface
#define SURF_DRAWTURB_QUADS BIT( 3 ) // all subidivided polygons are quads
#define SURF_DRAWTURB_QUADS BIT( 3 ) // all subidivided polygons are quads
#define SURF_DRAWTURB BIT( 4 ) // warp surface
#define SURF_DRAWTILED BIT( 5 ) // face without lighmap
#define SURF_CONVEYOR BIT( 6 ) // scrolled texture (was SURF_DRAWBACKGROUND)
@@ -61,23 +61,27 @@ BRUSH MODELS
#define LS_UNUSED 0xFE
#define LS_NONE 0xFF
#define MAX_MAP_CLIPNODES_HLBSP 32767
#define MAX_MAP_CLIPNODES_BSP2 524288
// these limis not using by modelloader but only for displaying 'mapstats' correctly
#ifdef SUPPORT_BSP2_FORMAT
#define MAX_MAP_MODELS 2048 // embedded models
#define MAX_MAP_ENTSTRING 0x200000 // 2 Mb should be enough
#define MAX_MAP_PLANES 131072 // can be increased without problems
#define MAX_MAP_NODES 262144 // can be increased without problems
#define MAX_MAP_CLIPNODES 524288 // can be increased without problems
#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_BSP2 // can be increased without problems
#define MAX_MAP_LEAFS 131072 // CRITICAL STUFF to run ad_sepulcher!!!
#define MAX_MAP_VERTS 524288 // can be increased without problems
#define MAX_MAP_FACES 262144 // can be increased without problems
#define MAX_MAP_MARKSURFACES 524288 // can be increased without problems
#else
#define MAX_MAP_MODELS 768 // embedded models
// increased to match PrimeXT compilers
#define MAX_MAP_MODELS 1024 // embedded models
#define MAX_MAP_ENTSTRING 0x100000 // 1 Mb should be enough
#define MAX_MAP_PLANES 65536 // can be increased without problems
#define MAX_MAP_NODES 32767 // because negative shorts are leafs
#define MAX_MAP_CLIPNODES 32767 // because negative shorts are contents
#define MAX_MAP_CLIPNODES MAX_MAP_CLIPNODES_HLBSP // because negative shorts are contents
#define MAX_MAP_LEAFS 32767 // signed short limit
#define MAX_MAP_VERTS 65535 // unsigned short limit
#define MAX_MAP_FACES 65535 // unsigned short limit
@@ -166,7 +170,7 @@ typedef struct
{
int id; // must be little endian XASH
int version;
dlump_t lumps[EXTRA_LUMPS];
dlump_t lumps[EXTRA_LUMPS];
} dextrahdr_t;
typedef struct
@@ -321,4 +325,4 @@ typedef struct
int lightofs; // start of [numstyles*surfsize] samples
} dface32_t;
#endif//BSPFILE_H
#endif//BSPFILE_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -33,7 +33,7 @@ typedef struct
typedef struct
{
float prevanimtime;
float prevanimtime;
float sequencetime;
byte prevseqblending[2];
vec3_t prevorigin;
@@ -102,4 +102,4 @@ struct cl_entity_s
colorVec cvFloorColor;
};
#endif//CL_ENTITY_H
#endif//CL_ENTITY_H

134
common/com_image.h Normal file
View File

@@ -0,0 +1,134 @@
#pragma once
/*
========================================================================
internal image format
typically expanded to rgba buffer
NOTE: number at end of pixelformat name it's a total bitscount e.g. PF_RGB_24 == PF_RGB_888
========================================================================
*/
#define ImageRAW( type ) (type == PF_RGBA_32 || type == PF_BGRA_32 || type == PF_RGB_24 || type == PF_BGR_24 || type == PF_LUMINANCE)
#define ImageCompressed( type ) \
( type == PF_DXT1 \
|| type == PF_DXT3 \
|| type == PF_DXT5 \
|| type == PF_ATI2 \
|| type == PF_BC4_SIGNED \
|| type == PF_BC4_UNSIGNED \
|| type == PF_BC5_SIGNED \
|| type == PF_BC5_UNSIGNED \
|| type == PF_BC6H_SIGNED \
|| type == PF_BC6H_UNSIGNED \
|| type == PF_BC7_UNORM \
|| type == PF_BC7_SRGB \
|| type == PF_KTX2_RAW )
typedef enum
{
PF_UNKNOWN = 0,
PF_INDEXED_24, // inflated palette (768 bytes)
PF_INDEXED_32, // deflated palette (1024 bytes)
PF_RGBA_32, // normal rgba buffer
PF_BGRA_32, // big endian RGBA (MacOS)
PF_RGB_24, // uncompressed dds or another 24-bit image
PF_BGR_24, // big-endian RGB (MacOS)
PF_LUMINANCE,
PF_DXT1, // s3tc DXT1/BC1 format
PF_DXT3, // s3tc DXT3/BC2 format
PF_DXT5, // s3tc DXT5/BC3 format
PF_ATI2, // latc ATI2N/BC5 format
PF_BC4_SIGNED,
PF_BC4_UNSIGNED,
PF_BC5_SIGNED,
PF_BC5_UNSIGNED,
PF_BC6H_SIGNED, // bptc BC6H signed FP16 format
PF_BC6H_UNSIGNED, // bptc BC6H unsigned FP16 format
PF_BC7_UNORM, // bptc BC7 format
PF_BC7_SRGB,
PF_KTX2_RAW, // Raw KTX2 data, used for yet unsupported KTX2 subformats
PF_TOTALCOUNT, // must be last
} pixformat_t;
typedef struct bpc_desc_s
{
int format; // pixelformat
char name[16]; // used for debug
uint glFormat; // RGBA format
int bpp; // channels (e.g. rgb = 3, rgba = 4)
} bpc_desc_t;
// imagelib global settings
typedef enum
{
IL_USE_LERPING = BIT(0), // lerping images during resample
IL_KEEP_8BIT = BIT(1), // don't expand paletted images
IL_ALLOW_OVERWRITE = BIT(2), // allow to overwrite stored images
IL_DONTFLIP_TGA = BIT(3), // Steam background completely ignore tga attribute 0x20 (stupid lammers!)
IL_DDS_HARDWARE = BIT(4), // DXT compression is support
IL_LOAD_DECAL = BIT(5), // special mode for load gradient decals
IL_OVERVIEW = BIT(6), // overview required some unque operations
IL_LOAD_PLAYER_DECAL = BIT(7), // special mode for player decals
IL_KTX2_RAW = BIT(8), // renderer can consume raw KTX2 files (e.g. ref_vk)
} ilFlags_t;
// goes into rgbdata_t->encode
#define DXT_ENCODE_DEFAULT 0 // don't use custom encoders
#define DXT_ENCODE_COLOR_YCoCg 0x1A01 // make sure that value dosn't collide with anything
#define DXT_ENCODE_ALPHA_1BIT 0x1A02 // normal 1-bit alpha
#define DXT_ENCODE_ALPHA_8BIT 0x1A03 // normal 8-bit alpha
#define DXT_ENCODE_ALPHA_SDF 0x1A04 // signed distance field
#define DXT_ENCODE_NORMAL_AG_ORTHO 0x1A05 // orthographic projection
#define DXT_ENCODE_NORMAL_AG_STEREO 0x1A06 // stereographic projection
#define DXT_ENCODE_NORMAL_AG_PARABOLOID 0x1A07 // paraboloid projection
#define DXT_ENCODE_NORMAL_AG_QUARTIC 0x1A08 // newton method
#define DXT_ENCODE_NORMAL_AG_AZIMUTHAL 0x1A09 // Lambert Azimuthal Equal-Area
// rgbdata output flags
typedef enum
{
// rgbdata->flags
IMAGE_CUBEMAP = BIT(0), // it's 6-sides cubemap buffer
IMAGE_HAS_ALPHA = BIT(1), // image contain alpha-channel
IMAGE_HAS_COLOR = BIT(2), // image contain RGB-channel
IMAGE_COLORINDEX = BIT(3), // all colors in palette is gradients of last color (decals)
IMAGE_HAS_LUMA = BIT(4), // image has luma pixels (q1-style maps)
IMAGE_SKYBOX = BIT(5), // only used by FS_SaveImage - for write right suffixes
IMAGE_QUAKESKY = BIT(6), // it's a quake sky double layered clouds (so keep it as 8 bit)
IMAGE_DDS_FORMAT = BIT(7), // a hint for GL loader
IMAGE_MULTILAYER = BIT(8), // to differentiate from 3D texture
IMAGE_ONEBIT_ALPHA = BIT(9), // binary alpha
IMAGE_QUAKEPAL = BIT(10), // image has quake1 palette
// Image_Process manipulation flags
IMAGE_FLIP_X = BIT(16), // flip the image by width
IMAGE_FLIP_Y = BIT(17), // flip the image by height
IMAGE_ROT_90 = BIT(18), // flip from upper left corner to down right corner
IMAGE_ROT180 = IMAGE_FLIP_X|IMAGE_FLIP_Y,
IMAGE_ROT270 = IMAGE_FLIP_X|IMAGE_FLIP_Y|IMAGE_ROT_90,
// reserved
IMAGE_RESAMPLE = BIT(20), // resample image to specified dims
// reserved
// reserved
IMAGE_FORCE_RGBA = BIT(23), // force image to RGBA buffer
IMAGE_MAKE_LUMA = BIT(24), // create luma texture from indexed
IMAGE_QUANTIZE = BIT(25), // make indexed image from 24 or 32- bit image
IMAGE_LIGHTGAMMA = BIT(26), // apply gamma for image
IMAGE_REMAP = BIT(27), // interpret width and height as top and bottom color
} imgFlags_t;
typedef struct rgbdata_s
{
word width; // image width
word height; // image height
word depth; // image depth
uint type; // compression type
uint flags; // misc image flags
word encode; // DXT may have custom encoder, that will be decoded in GLSL-side
byte numMips; // mipmap count
byte *palette; // palette if present
byte *buffer; // image buffer
rgba_t fogParams; // some water textures in hl1 has info about fog color and alpha
size_t size; // for bounds checking
} rgbdata_t;

View File

@@ -16,11 +16,9 @@ GNU General Public License for more details.
#ifndef COM_MODEL_H
#define COM_MODEL_H
#include "xash3d_types.h"
#include "bspfile.h" // we need some declarations from it
typedef vec_t vec2_t[2];
typedef vec_t vec4_t[4];
/*
==============================================================================
@@ -34,16 +32,17 @@ typedef vec_t vec4_t[4];
#define MIPLEVELS 4
#define VERTEXSIZE 7
#define MAXLIGHTMAPS 4
#define MAXLIGHTMAPS 4 // max light styles per face
#define MAXDYNLIGHTS 8 // maximum dynamic lights per one pixel
#define NUM_AMBIENTS 4 // automatic ambient sounds
// model types
typedef enum
{
mod_bad = -1,
mod_brush,
mod_sprite,
mod_alias,
mod_brush,
mod_sprite,
mod_alias,
mod_studio
} modtype_t;
@@ -94,7 +93,7 @@ typedef struct texture_s
struct texture_s *alternate_anims; // bmodels in frame 1 use these
unsigned short fb_texturenum; // auto-luma texturenum
unsigned short dt_texturenum; // detail-texture binding
unsigned int unused[3]; // reserved
unsigned int unused[3]; // reserved
} texture_t;
typedef struct
@@ -106,7 +105,7 @@ typedef struct
vec3_t mins, maxs; // terrain bounds (fill by user)
int reserved[32]; // just for future expansions or mod-makers
intptr_t reserved[32]; // just for future expansions or mod-makers
} mfaceinfo_t;
typedef struct
@@ -128,14 +127,23 @@ typedef struct
int flags; // sky or slime, no lightmap or 256 subdivision
} mtexinfo_t;
typedef struct glpoly_s
// a1ba: changed size to avoid undefined behavior. Check your allocations if you take this header!
// For example:
// before: malloc( sizeof( glpoly_t ) + ( numverts - 4 ) * VERTEXSIZE * sizeof( float ))
// after (C): malloc( sizeof( glpoly_t ) + numverts * VERTEXSIZE * sizeof( float ))
// after (C++): malloc( sizeof( glpoly_t ) + ( numverts - 1 ) * VERTEXSIZE * sizeof( float ))
typedef struct glpoly2_s
{
struct glpoly_s *next;
struct glpoly_s *chain;
struct glpoly2_s *next;
struct glpoly2_s *chain;
int numverts;
int flags; // for SURF_UNDERWATER
float verts[4][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
} glpoly_t;
#ifdef __cplusplus
float verts[1][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
#else
float verts[][VERTEXSIZE]; // variable sized (xyz s1t1 s2t2)
#endif
} glpoly2_t;
typedef struct mnode_s
{
@@ -148,7 +156,7 @@ typedef struct mnode_s
// node specific
mplane_t *plane;
struct mnode_s *children[2];
struct mnode_s *children[2];
#ifdef SUPPORT_BSP2_FORMAT
int firstsurface;
int numsurfaces;
@@ -167,15 +175,15 @@ struct decal_s
decal_t *pnext; // linked list for each surface
msurface_t *psurface; // Surface id for persistence / unlinking
float dx; // local texture coordinates
float dy; //
float dy; //
float scale; // Pixel scale
short texture; // Decal texture
short flags; // Decal flags FDECAL_*
short entityIndex; // Entity this is attached to
// Xash3D specific
vec3_t position; // location of the decal center in world space.
glpoly_t *polys; // precomputed decal vertices
int reserved[4]; // just for future expansions or mod-makers
glpoly2_t *polys; // precomputed decal vertices
intptr_t reserved[4]; // just for future expansions or mod-makers
};
typedef struct mleaf_s
@@ -229,10 +237,10 @@ typedef struct mextrasurf_s
unsigned short numverts; // world->vertexes[]
int firstvertex; // fisrt look up in tr.tbn_vectors[], then acess to world->vertexes[]
int reserved[32]; // just for future expansions or mod-makers
intptr_t reserved[32]; // just for future expansions or mod-makers
} mextrasurf_t;
typedef struct msurface_s
struct msurface_s
{
int visframe; // should be drawn when node is crossed
@@ -247,7 +255,7 @@ typedef struct msurface_s
int light_s, light_t; // gl lightmap coordinates
glpoly_t *polys; // multiple if warped
glpoly2_t *polys; // multiple if warped
struct msurface_s *texturechain;
mtexinfo_t *texinfo;
@@ -264,7 +272,7 @@ typedef struct msurface_s
color24 *samples; // note: this is the actual lightmap data for this surface
decal_t *pdecals;
} msurface_t;
};
typedef struct hull_s
{
@@ -292,7 +300,7 @@ typedef struct model_s
// shared modelinfo
modtype_t type; // model type
int numframes; // sprite's framecount
byte *mempool; // private mempool (was synctype)
poolhandle_t mempool; // private mempool (was synctype)
int flags; // hl compatibility
//
@@ -300,7 +308,7 @@ typedef struct model_s
//
vec3_t mins, maxs; // bounding box at angles '0 0 0'
float radius;
// brush model
int firstmodelsurface;
int nummodelsurfaces;
@@ -387,7 +395,7 @@ typedef struct player_info_s
int bottomcolor;
// last frame rendered
int renderframe;
int renderframe;
// Gait frame estimation
int gaitsequence;
@@ -489,7 +497,8 @@ typedef struct
int flags;
float size;
int reserved[8]; // VBO offsets
const trivertex_t **pposeverts; // only valid during loading, used to build GL mesh
intptr_t reserved[7]; // VBO offsets
int numposes;
int poseverts;
@@ -504,4 +513,38 @@ typedef struct
maliasframedesc_t frames[1]; // variable sized
} aliashdr_t;
#endif//COM_MODEL_H
// remapping info
#define SUIT_HUE_START 192
#define SUIT_HUE_END 223
#define PLATE_HUE_START 160
#define PLATE_HUE_END 191
#define SHIRT_HUE_START 16
#define SHIRT_HUE_END 32
#define PANTS_HUE_START 96
#define PANTS_HUE_END 112
// 1/32 epsilon to keep floating point happy
#define DIST_EPSILON (1.0f / 32.0f)
#define FRAC_EPSILON (1.0f / 1024.0f)
#define BACKFACE_EPSILON 0.01f
#define MAX_BOX_LEAFS 256
#define ANIM_CYCLE 2
#define MOD_FRAMES 20
#define MAX_DEMOS 32
#define MAX_MOVIES 8
#define MAX_CDTRACKS 32
#define MAX_CLIENT_SPRITES 512 // SpriteTextures (0-256 hud, 256-512 client)
#define MAX_REQUESTS 64
STATIC_CHECK_SIZEOF( mextrasurf_t, 324, 496 );
STATIC_CHECK_SIZEOF( decal_t, 60, 88 );
STATIC_CHECK_SIZEOF( mfaceinfo_t, 176, 304 );
#endif//COM_MODEL_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -22,4 +22,4 @@ typedef struct con_nprint_s
float color[3]; // RGB colors ( 0.0 -> 1.0 scale )
} con_nprint_t;
#endif//CON_NPRINT_H
#endif//CON_NPRINT_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -14,51 +14,54 @@
****/
#ifndef CONST_H
#define CONST_H
#include <stddef.h> // ptrdiff_t
//
// Constants shared by the engine and dlls
// This header file included by engine files and DLL files.
// Most came from server.h
// edict->flags
#define FL_FLY (1<<0) // Changes the SV_Movestep() behavior to not need to be on ground
#define FL_SWIM (1<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
#define FL_CONVEYOR (1<<2)
#define FL_CLIENT (1<<3)
#define FL_INWATER (1<<4)
#define FL_MONSTER (1<<5)
#define FL_GODMODE (1<<6)
#define FL_NOTARGET (1<<7)
#define FL_SKIPLOCALHOST (1<<8) // Don't send entity to local host, it's predicting this entity itself
#define FL_ONGROUND (1<<9) // At rest / on the ground
#define FL_PARTIALGROUND (1<<10) // not all corners are valid
#define FL_WATERJUMP (1<<11) // player jumping out of water
#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera
#define FL_FAKECLIENT (1<<13) // JAC: fake client, simulated server side; don't send network messages to them
#define FL_DUCKING (1<<14) // Player flag -- Player is fully crouched
#define FL_FLOAT (1<<15) // Apply floating force to this entity when in water
#define FL_GRAPHED (1<<16) // worldgraph has this ent listed as something that blocks a connection
#define FL_FLY (1U<<0) // Changes the SV_Movestep() behavior to not need to be on ground
#define FL_SWIM (1U<<1) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
#define FL_CONVEYOR (1U<<2)
#define FL_CLIENT (1U<<3)
#define FL_INWATER (1U<<4)
#define FL_MONSTER (1U<<5)
#define FL_GODMODE (1U<<6)
#define FL_NOTARGET (1U<<7)
#define FL_SKIPLOCALHOST (1U<<8) // Don't send entity to local host, it's predicting this entity itself
#define FL_ONGROUND (1U<<9) // At rest / on the ground
#define FL_PARTIALGROUND (1U<<10) // not all corners are valid
#define FL_WATERJUMP (1U<<11) // player jumping out of water
#define FL_FROZEN (1U<<12) // Player is frozen for 3rd person camera
#define FL_FAKECLIENT (1U<<13) // JAC: fake client, simulated server side; don't send network messages to them
#define FL_DUCKING (1U<<14) // Player flag -- Player is fully crouched
#define FL_FLOAT (1U<<15) // Apply floating force to this entity when in water
#define FL_GRAPHED (1U<<16) // worldgraph has this ent listed as something that blocks a connection
// UNDONE: Do we need these?
#define FL_IMMUNE_WATER (1<<17)
#define FL_IMMUNE_SLIME (1<<18)
#define FL_IMMUNE_LAVA (1<<19)
#define FL_IMMUNE_WATER (1U<<17)
#define FL_IMMUNE_SLIME (1U<<18)
#define FL_IMMUNE_LAVA (1U<<19)
#define FL_PROXY (1<<20) // This is a spectator proxy
#define FL_ALWAYSTHINK (1<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
#define FL_BASEVELOCITY (1<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum)
#define FL_MONSTERCLIP (1<<23) // Only collide in with monsters who have FL_MONSTERCLIP set
#define FL_ONTRAIN (1<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
#define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
#define FL_SPECTATOR (1<<26) // This client is a spectator, don't run touch functions, etc.
#define FL_LASERDOT (1<<27) // Predicted laser spot from rocket launcher
#define FL_PROXY (1U<<20) // This is a spectator proxy
#define FL_ALWAYSTHINK (1U<<21) // Brush model flag -- call think every frame regardless of nextthink - ltime (for constantly changing velocity/path)
#define FL_BASEVELOCITY (1U<<22) // Base velocity has been applied this frame (used to convert base velocity into momentum)
#define FL_MONSTERCLIP (1U<<23) // Only collide in with monsters who have FL_MONSTERCLIP set
#define FL_ONTRAIN (1U<<24) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
#define FL_WORLDBRUSH (1U<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
#define FL_SPECTATOR (1U<<26) // This client is a spectator, don't run touch functions, etc.
#define FL_LASERDOT (1U<<27) // Predicted laser spot from rocket launcher
#define FL_CUSTOMENTITY (1<<29) // This is a custom entity
#define FL_KILLME (1<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
#define FL_DORMANT (1<<31) // Entity is dormant, no updates to client
#define FL_CUSTOMENTITY (1U<<29) // This is a custom entity
#define FL_KILLME (1U<<30) // This entity is marked for death -- This allows the engine to kill ents at the appropriate time
#define FL_DORMANT (1U<<31) // Entity is dormant, no updates to client
// Goes into globalvars_t.trace_flags
#define FTRACE_SIMPLEBOX (1<<0) // Traceline with a simple box
#define FTRACE_IGNORE_GLASS (1<<1) // traceline will be ignored entities with rendermode != kRenderNormal
#define FTRACE_SIMPLEBOX (1U<<0) // Traceline with a simple box
#define FTRACE_IGNORE_GLASS (1U<<1) // traceline will be ignored entities with rendermode != kRenderNormal
// walkmove modes
#define WALKMOVE_NORMAL 0 // normal walkmove
@@ -114,50 +117,50 @@
#define EF_LIGHT 64 // rocket flare glow sprite
#define EF_NODRAW 128 // don't draw entity
#define EF_WATERSIDES (1<<26) // Do not remove sides for func_water entity
#define EF_FULLBRIGHT (1<<27) // Just get fullbright
#define EF_NOSHADOW (1<<28) // ignore shadow for this entity
#define EF_MERGE_VISIBILITY (1<<29) // this entity allowed to merge vis (e.g. env_sky or portal camera)
#define EF_REQUEST_PHS (1<<30) // This entity requested phs bitvector instead of pvsbitvector in AddToFullPack calls
#define EF_WATERSIDES (1U<<26) // Do not remove sides for func_water entity
#define EF_FULLBRIGHT (1U<<27) // Just get fullbright
#define EF_NOSHADOW (1U<<28) // ignore shadow for this entity
#define EF_MERGE_VISIBILITY (1U<<29) // this entity allowed to merge vis (e.g. env_sky or portal camera)
#define EF_REQUEST_PHS (1U<<30) // This entity requested phs bitvector instead of pvsbitvector in AddToFullPack calls
// g-cont. one reserved bit here for me
// entity flags
#define EFLAG_SLERP 1 // do studio interpolation of this entity
//
// temp entity events
//
#define TE_BEAMPOINTS 0 // beam effect between two points
// coord coord coord (start position)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// coord coord coord (start position)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_BEAMENTPOINT 1 // beam effect between point and entity
// short (start entity)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// short (start entity)
// coord coord coord (end position)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_GUNSHOT 2 // particle effect plus ricochet sound
// coord coord coord (position)
// coord coord coord (position)
#define TE_EXPLOSION 3 // additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
// coord coord coord (position)
// coord coord coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (framerate)
@@ -173,54 +176,54 @@
#define TE_EXPLFLAG_ROTATE 32 // rotate the sprite randomly
#define TE_TAREXPLOSION 4 // Quake1 "tarbaby" explosion with sound
// coord coord coord (position)
// coord coord coord (position)
#define TE_SMOKE 5 // alphablend sprite, move vertically 30 pps
// coord coord coord (position)
// coord coord coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (framerate)
#define TE_TRACER 6 // tracer effect from point to point
// coord, coord, coord (start)
// coord, coord, coord (start)
// coord, coord, coord (end)
#define TE_LIGHTNING 7 // TE_BEAMPOINTS with simplified parameters
// coord, coord, coord (start)
// coord, coord, coord (end)
// byte (life in 0.1's)
// byte (width in 0.1's)
// coord, coord, coord (start)
// coord, coord, coord (end)
// byte (life in 0.1's)
// byte (width in 0.1's)
// byte (amplitude in 0.01's)
// short (sprite model index)
#define TE_BEAMENTS 8
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
#define TE_BEAMENTS 8
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_SPARKS 9 // 8 random tracers with gravity, ricochet sprite
// coord coord coord (position)
// coord coord coord (position)
#define TE_LAVASPLASH 10 // Quake1 lava splash
// coord coord coord (position)
// coord coord coord (position)
#define TE_TELEPORT 11 // Quake1 teleport splash
// coord coord coord (position)
// coord coord coord (position)
#define TE_EXPLOSION2 12 // Quake1 colormaped (base palette) particle explosion with sound
// coord coord coord (position)
// coord coord coord (position)
// byte (starting color)
// byte (num colors)
#define TE_BSPDECAL 13 // Decal from the .BSP file
#define TE_BSPDECAL 13 // Decal from the .BSP file
// coord, coord, coord (x,y,z), decal position (center of texture in world)
// short (texture index of precached decal texture name)
// short (entity index)
@@ -230,67 +233,67 @@
// coord, coord, coord (position)
// byte (radius)
// byte (count)
// byte (life in 0.1's)
// byte (life in 0.1's)
#define TE_SPRITETRAIL 15 // line of moving glow sprites with gravity, fadeout, and collisions
// coord, coord, coord (start)
// coord, coord, coord (end)
// coord, coord, coord (start)
// coord, coord, coord (end)
// short (sprite index)
// byte (count)
// byte (life in 0.1's)
// byte (scale in 0.1's)
// byte (life in 0.1's)
// byte (scale in 0.1's)
// byte (velocity along vector in 10's)
// byte (randomness of velocity in 10's)
#define TE_BEAM 16 // obsolete
#define TE_SPRITE 17 // additive sprite, plays 1 cycle
// coord, coord, coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// coord, coord, coord (position)
// short (sprite index)
// byte (scale in 0.1's)
// byte (brightness)
#define TE_BEAMSPRITE 18 // A beam with a sprite at the end
// coord, coord, coord (start position)
// coord, coord, coord (end position)
// short (beam sprite index)
// short (end sprite index)
// coord, coord, coord (start position)
// coord, coord, coord (end position)
// short (beam sprite index)
// short (end sprite index)
#define TE_BEAMTORUS 19 // screen aligned beam ring, expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_BEAMDISK 20 // disk that expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_BEAMCYLINDER 21 // cylinder that expands to max radius over lifetime
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// coord coord coord (center position)
// coord coord coord (axis and radius)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
@@ -298,30 +301,30 @@
#define TE_BEAMFOLLOW 22 // create a line of decaying beam segments until entity stops moving
// short (entity:attachment to follow)
// short (sprite index)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte,byte,byte (color)
// byte (brightness)
#define TE_GLOWSPRITE 23
#define TE_GLOWSPRITE 23
// coord, coord, coord (pos) short (model index) byte (scale / 10)
#define TE_BEAMRING 24 // connect a beam ring to two entities
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// short (start entity)
// short (end entity)
// short (sprite index)
// byte (starting frame)
// byte (frame rate in 0.1's)
// byte (life in 0.1's)
// byte (line width in 0.1's)
// byte (noise amplitude in 0.01's)
// byte,byte,byte (color)
// byte (brightness)
// byte (scroll speed in 0.1's)
#define TE_STREAK_SPLASH 25 // oriented shower of tracers
// coord coord coord (start position)
// coord coord coord (direction vector)
// coord coord coord (start position)
// coord coord coord (direction vector)
// byte (color)
// short (count)
// short (base speed)
@@ -330,15 +333,15 @@
#define TE_BEAMHOSE 26 // obsolete
#define TE_DLIGHT 27 // dynamic light, effect world, minor entity effect
// coord, coord, coord (pos)
// byte (radius in 10's)
// coord, coord, coord (pos)
// byte (radius in 10's)
// byte byte byte (color)
// byte (life in 10's)
// byte (decay rate in 10's)
#define TE_ELIGHT 28 // point entity light, no world effect
// short (entity:attachment to follow)
// coord coord coord (initial position)
// coord coord coord (initial position)
// coord (radius)
// byte byte byte (color)
// byte (life in 0.1's)
@@ -374,8 +377,8 @@
#define TE_LARGEFUNNEL 100
// coord coord coord (funnel position)
// short (sprite index)
// short (flags)
// short (sprite index)
// short (flags)
#define TE_BLOODSTREAM 101 // particle spray
// coord coord coord (start position)
@@ -404,7 +407,7 @@
// byte (density)
#define TE_MODEL 106 // create a moving model that bounces and makes a sound when it hits
// coord, coord, coord (position)
// coord, coord, coord (position)
// coord, coord, coord (velocity)
// angle (initial yaw)
// short (model index)
@@ -441,7 +444,7 @@
// byte (speed)
// byte (noise)
#define TE_ARMOR_RICOCHET 111 // quick spark sprite, client ricochet sound.
#define TE_ARMOR_RICOCHET 111 // quick spark sprite, client ricochet sound.
// coord, coord, coord (position)
// byte (scale in 0.1's)
@@ -529,7 +532,7 @@
#define TEFIRE_FLAG_SOMEFLOAT 2 // some of the sprites will drift upwards. (50% chance)
#define TEFIRE_FLAG_LOOP 4 // if set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
#define TEFIRE_FLAG_ALPHA 8 // if set, sprite is rendered alpha blended at 50% else, opaque
#define TEFIRE_FLAG_PLANAR 16 // if set, all fire sprites have same initial Z instead of randomly filling a cube.
#define TEFIRE_FLAG_PLANAR 16 // if set, all fire sprites have same initial Z instead of randomly filling a cube.
#define TEFIRE_FLAG_ADDITIVE 32 // if set, sprite is rendered as additive
#define TE_PLAYERATTACHMENT 124 // attaches a TENT to a player (this is a high-priority tent)
@@ -606,13 +609,6 @@
#define CONTENT_GRAVITY_FLYFIELD -18
#define CONTENT_FOG -19
#define CONTENT_EMPTY -1
#define CONTENT_SOLID -2
#define CONTENT_WATER -3
#define CONTENT_SLIME -4
#define CONTENT_LAVA -5
#define CONTENT_SKY -6
// channels
#define CHAN_AUTO 0
#define CHAN_WEAPON 1
@@ -620,7 +616,7 @@
#define CHAN_ITEM 3
#define CHAN_BODY 4
#define CHAN_STREAM 5 // allocate stream channel from the static or dynamic area
#define CHAN_STATIC 6 // allocate channel from the static area
#define CHAN_STATIC 6 // allocate channel from the static area
#define CHAN_NETWORKVOICE_BASE 7 // voice data coming across the network
#define CHAN_NETWORKVOICE_END 500 // network voice data reserves slots (CHAN_NETWORKVOICE_BASE through CHAN_NETWORKVOICE_END).
@@ -628,7 +624,7 @@
#define ATTN_NONE 0
#define ATTN_NORM (float)0.8
#define ATTN_IDLE (float)2
#define ATTN_STATIC (float)1.25
#define ATTN_STATIC (float)1.25
// pitch values
#define PITCH_NORM 100 // non-pitch shifted
@@ -647,22 +643,22 @@
#define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains
// buttons
#define IN_ATTACK (1<<0)
#define IN_JUMP (1<<1)
#define IN_DUCK (1<<2)
#define IN_FORWARD (1<<3)
#define IN_BACK (1<<4)
#define IN_USE (1<<5)
#define IN_CANCEL (1<<6)
#define IN_LEFT (1<<7)
#define IN_RIGHT (1<<8)
#define IN_MOVELEFT (1<<9)
#define IN_MOVERIGHT (1<<10)
#define IN_ATTACK2 (1<<11)
#define IN_RUN (1<<12)
#define IN_RELOAD (1<<13)
#define IN_ALT1 (1<<14)
#define IN_SCORE (1<<15) // Used by client.dll for when scoreboard is held down
#define IN_ATTACK (1U<<0)
#define IN_JUMP (1U<<1)
#define IN_DUCK (1U<<2)
#define IN_FORWARD (1U<<3)
#define IN_BACK (1U<<4)
#define IN_USE (1U<<5)
#define IN_CANCEL (1U<<6)
#define IN_LEFT (1U<<7)
#define IN_RIGHT (1U<<8)
#define IN_MOVELEFT (1U<<9)
#define IN_MOVERIGHT (1U<<10)
#define IN_ATTACK2 (1U<<11)
#define IN_RUN (1U<<12)
#define IN_RELOAD (1U<<13)
#define IN_ALT1 (1U<<14)
#define IN_SCORE (1U<<15) // Used by client.dll for when scoreboard is held down
// Break Model Defines
#define BREAK_TYPEMASK 0x4F
@@ -691,8 +687,8 @@
#define TE_BOUNCE_SHOTSHELL 2
// Rendering constants
enum
{
enum
{
kRenderNormal, // src
kRenderTransColor, // c*a+dest*(1-a)
kRenderTransTexture, // src*a+dest*(1-a)
@@ -701,21 +697,21 @@ enum
kRenderTransAdd, // src*a+dest
};
enum
{
kRenderFxNone = 0,
kRenderFxPulseSlow,
kRenderFxPulseFast,
kRenderFxPulseSlowWide,
kRenderFxPulseFastWide,
kRenderFxFadeSlow,
kRenderFxFadeFast,
kRenderFxSolidSlow,
kRenderFxSolidFast,
kRenderFxStrobeSlow,
kRenderFxStrobeFast,
kRenderFxStrobeFaster,
kRenderFxFlickerSlow,
enum
{
kRenderFxNone = 0,
kRenderFxPulseSlow,
kRenderFxPulseFast,
kRenderFxPulseSlowWide,
kRenderFxPulseFastWide,
kRenderFxFadeSlow,
kRenderFxFadeFast,
kRenderFxSolidSlow,
kRenderFxSolidFast,
kRenderFxStrobeSlow,
kRenderFxStrobeFast,
kRenderFxStrobeFaster,
kRenderFxFlickerSlow,
kRenderFxFlickerFast,
kRenderFxNoDissipation,
kRenderFxDistort, // Distort/scale/translate flicker
@@ -724,24 +720,15 @@ enum
kRenderFxExplode, // Scale up really big!
kRenderFxGlowShell, // Glowing Shell
kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
kRenderFxLightMultiplier,
};
typedef int func_t;
typedef int string_t;
typedef ptrdiff_t string_t;
typedef unsigned char byte;
typedef unsigned short word;
#define Q_isspace( ch ) (ch < 32 || ch > 255)
#undef true
#undef false
#ifndef __cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;
#endif
#include "xash3d_types.h"
typedef struct
{
@@ -778,4 +765,4 @@ typedef struct
int hitgroup; // 0 == generic, non zero is specific body part
} trace_t;
#endif//CONST_H
#endif//CONST_H

View File

@@ -1,45 +1,122 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
#ifndef CVARDEF_H
#define CVARDEF_H
/*
cvardef.h - quake cvar definition
Copyright (C) 1997-2001 Id Software, Inc.
Copyright (C) 2024 Alibek Omarov
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc
#define FCVAR_USERINFO (1<<1) // changes the client's info string
#define FCVAR_SERVER (1<<2) // notifies players when changed
#define FCVAR_EXTDLL (1<<3) // defined by external DLL
#define FCVAR_CLIENTDLL (1<<4) // defined by the client dll
#define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value
#define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server.
#define FCVAR_PRINTABLEONLY (1<<7) // This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ).
#define FCVAR_UNLOGGED (1<<8) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
#define FCVAR_NOEXTRAWHITEPACE (1<<9) // strip trailing/leading white space from this cvar
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
#define FCVAR_MOVEVARS (1<<10) // this cvar is a part of movevars_t struct that shared between client and server
#define FCVAR_LATCH (1<<11) // notify client what this cvar will be applied only after server restart (but don't does more nothing)
#define FCVAR_GLCONFIG (1<<12) // write it into opengl.cfg
#define FCVAR_CHANGED (1<<13) // set each time the cvar is changed
#define FCVAR_GAMEUIDLL (1<<14) // defined by the menu DLL
#define FCVAR_CHEAT (1<<15) // can not be changed if cheats are disabled
typedef struct cvar_s
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef CVAR
#define CVAR
#include STDINT_H
#include "xash3d_types.h"
/*
cvar_t variables are used to hold scalar or string variables that can be changed
or displayed at the console or prog code as well as accessed directly
in C code.
The user can access cvars from the console in three ways:
r_draworder prints the current value
r_draworder 0 sets the current value to 0
set r_draworder 0 as above, but creates the cvar if not present
Cvars are restricted from having the same names as commands to keep this
interface from being ambiguous.
The are also occasionally used to communicated information between different
modules of the program.
*/
enum
{
char *name;
char *string;
int flags;
float value;
struct cvar_s *next;
} cvar_t;
// GoldSrc compatibility flags
FCVAR_ARCHIVE = 1 << 0, // set to cause it to be saved to vars.rc
FCVAR_USERINFO = 1 << 1, // added to userinfo when changed
FCVAR_SERVER = 1 << 2, // added to serverinfo when changed, will notify clients by default
FCVAR_EXTDLL = 1 << 3, // defined by server.dll
FCVAR_CLIENTDLL = 1 << 4, // defined by client.dll
FCVAR_PROTECTED = 1 << 5, // private server cvar
FCVAR_SPONLY = 1 << 6, // can be set only in singleplayer
FCVAR_PRINTABLEONLY = 1 << 7, // only allows printable characters
FCVAR_UNLOGGED = 1 << 8, // disables notifying client about server cvar change
FCVAR_NOEXTRAWHITESPACE = 1 << 9, // removes space characters from the beginning and the end of the string
FCVAR_PRIVILEGED = 1 << 10, // only available in privileged mode
FCVAR_FILTERABLE = 1 << 11, // treated as privileged if cl_filterstuffcmd is 1, otherwise ignored
#endif//CVARDEF_H
// Xash3D public flags
// FCVAR_LATCH = 1 << 11, // deprecated Xash3D flag, conflicts with FCVAR_FILTERABLE. Use another FCVAR_LATCH!
FCVAR_GLCONFIG = 1 << 12, // set to cause it to be saved to <renderer>.cfg (see RefAPI)
FCVAR_CHANGED = 1 << 13, // set each time the cvar changed
FCVAR_GAMEUIDLL = 1 << 14, // defined by menu.dll
FCVAR_CHEAT = 1 << 15, // cannot be changed if sv_cheats is 0
#if REF_DLL || ENGINE_DLL // Xash3D internal flags, MUST NOT be used outside of engine
FCVAR_RENDERINFO = 1 << 16, // set to cause it to be saved to video.cfg
FCVAR_READ_ONLY = 1 << 17, // display only, cannot be set by user at all
FCVAR_EXTENDED = 1 << 18, // extended cvar structure
FCVAR_ALLOCATED = 1 << 19, // allocated by the engine, must be freed with Mem_Free
FCVAR_VIDRESTART = 1 << 20, // triggers video subsystem to recreate/modify window parameters
FCVAR_TEMPORARY = 1 << 21, // only used to temporarly hold some value, can be unlinked
FCVAR_MOVEVARS = 1 << 22, // access to movevars_t structure, synchornized between client and server
FCVAR_USER_CREATED = 1 << 23, // created by a set command
FCVAR_REFDLL = 1 << 29, // (Xash3D FWGS internal flag) defined by the renderer DLL
#endif // REF_DLL || ENGINE_DLL
FCVAR_LATCH = 1 << 30, // (Xash3D FWGS public flag, was FCVAR_FILTERABLE in Xash3D) save changes until server restart
};
struct cvar_s {
char *name;
char *string;
uint32_t flags;
float value;
struct cvar_s *next;
};
typedef struct cvar_s cvar_t;
STATIC_CHECK_SIZEOF( struct cvar_s, 20, 32 );
#if REF_DLL || ENGINE_DLL // Xash3D internal cvar format, MUST NOT be used outside of engine
struct convar_s {
char *name;
char *string;
uint32_t flags;
float value;
struct convar_s *next;
char *desc;
char *def_string;
};
typedef struct convar_s convar_t;
#if XASH_64BIT
#define CVAR_SENTINEL (uintptr_t)0xDEADBEEFDEADBEEF
#else
#define CVAR_SENTINEL (uintptr_t)0xDEADBEEF
#endif
#define CVAR_CHECK_SENTINEL( cv ) ((uintptr_t)(cv)->next == CVAR_SENTINEL)
#define CVAR_DEFINE( cv, cvname, cvstr, cvflags, cvdesc ) \
convar_t cv = { (char*)cvname, (char*)cvstr, cvflags, 0.0f, (void *)CVAR_SENTINEL, (char*)cvdesc, NULL }
#define CVAR_DEFINE_AUTO( cv, cvstr, cvflags, cvdesc ) CVAR_DEFINE( cv, #cv, cvstr, cvflags, cvdesc )
#endif // REF_DLL || ENGINE_DLL
#endif // CVAR

196
common/defaults.h Normal file
View File

@@ -0,0 +1,196 @@
/*
defaults.h - set up default configuration
Copyright (C) 2016 Mittorn
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef DEFAULTS_H
#define DEFAULTS_H
#include "backends.h"
#include "build.h"
/*
===================================================================
SETUP BACKENDS DEFINITIONS
===================================================================
*/
#if !XASH_DEDICATED
#if XASH_SDL
// we are building using libSDL
#ifndef XASH_VIDEO
#define XASH_VIDEO VIDEO_SDL
#endif // XASH_VIDEO
#ifndef XASH_INPUT
#define XASH_INPUT INPUT_SDL
#endif // XASH_INPUT
#ifndef XASH_SOUND
#define XASH_SOUND SOUND_SDL
#endif // XASH_SOUND
#if XASH_SDL == 2
#ifndef XASH_TIMER
#define XASH_TIMER TIMER_SDL
#endif // XASH_TIMER
#ifndef XASH_MESSAGEBOX
#if !XASH_NSWITCH // SDL2 messageboxes not available
#define XASH_MESSAGEBOX MSGBOX_SDL
#endif
#endif // XASH_MESSAGEBOX
#endif
#elif XASH_LINUX
// we are building for Linux without SDL2, can draw only to framebuffer yet
#ifndef XASH_VIDEO
#define XASH_VIDEO VIDEO_FBDEV
#endif // XASH_VIDEO
#ifndef XASH_INPUT
#define XASH_INPUT INPUT_EVDEV
#endif // XASH_INPUT
#ifndef XASH_SOUND
#define XASH_SOUND SOUND_ALSA
#endif // XASH_SOUND
#define XASH_USE_EVDEV 1
#elif XASH_DOS4GW
#ifndef XASH_VIDEO
#define XASH_VIDEO VIDEO_DOS
#endif
#ifndef XASH_TIMER
#define XASH_TIMER TIMER_DOS
#endif
// usually only 10-20 fds availiable
#define XASH_REDUCE_FD
#endif
#endif // XASH_DEDICATED
//
// select messagebox implementation
//
#ifndef XASH_MESSAGEBOX
#if XASH_WIN32
#define XASH_MESSAGEBOX MSGBOX_WIN32
#elif XASH_NSWITCH
#define XASH_MESSAGEBOX MSGBOX_NSWITCH
#else // !XASH_WIN32
#define XASH_MESSAGEBOX MSGBOX_STDERR
#endif // !XASH_WIN32
#endif // XASH_MESSAGEBOX
//
// no timer - no xash
//
#ifndef XASH_TIMER
#if XASH_WIN32
#define XASH_TIMER TIMER_WIN32
#else // !XASH_WIN32
#define XASH_TIMER TIMER_POSIX
#endif // !XASH_WIN32
#endif
#ifdef XASH_STATIC_LIBS
#define XASH_LIB LIB_STATIC
#define XASH_INTERNAL_GAMELIBS
#define XASH_ALLOW_SAVERESTORE_OFFSETS
#elif XASH_WIN32
#define XASH_LIB LIB_WIN32
#elif XASH_POSIX
#define XASH_LIB LIB_POSIX
#endif
//
// fallback to NULL
//
#ifndef XASH_VIDEO
#define XASH_VIDEO VIDEO_NULL
#endif // XASH_VIDEO
#ifndef XASH_SOUND
#define XASH_SOUND SOUND_NULL
#endif // XASH_SOUND
#ifndef XASH_INPUT
#define XASH_INPUT INPUT_NULL
#endif // XASH_INPUT
/*
=========================================================================
Default build-depended cvar and constant values
=========================================================================
*/
// Platform overrides
#if XASH_NSWITCH
#define DEFAULT_TOUCH_ENABLE "0"
#define DEFAULT_M_IGNORE "1"
#define DEFAULT_MODE_WIDTH 1280
#define DEFAULT_MODE_HEIGHT 720
#define DEFAULT_ALLOWCONSOLE 1
#elif XASH_PSVITA
#define DEFAULT_TOUCH_ENABLE "0"
#define DEFAULT_M_IGNORE "1"
#define DEFAULT_MODE_WIDTH 960
#define DEFAULT_MODE_HEIGHT 544
#define DEFAULT_ALLOWCONSOLE 1
#elif XASH_ANDROID
#define DEFAULT_TOUCH_ENABLE "1"
#elif XASH_MOBILE_PLATFORM
#define DEFAULT_TOUCH_ENABLE "1"
#define DEFAULT_M_IGNORE "1"
#endif // !XASH_MOBILE_PLATFORM && !XASH_NSWITCH
#if XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
// this means that libraries are provided with engine, but not in game data
// You need add library loading code to library.c when adding new platform
#define XASH_INTERNAL_GAMELIBS
#endif // XASH_ANDROID || XASH_IOS || XASH_EMSCRIPTEN
// Defaults
#ifndef DEFAULT_TOUCH_ENABLE
#define DEFAULT_TOUCH_ENABLE "0"
#endif // DEFAULT_TOUCH_ENABLE
#ifndef DEFAULT_M_IGNORE
#define DEFAULT_M_IGNORE "0"
#endif // DEFAULT_M_IGNORE
#ifndef DEFAULT_JOY_DEADZONE
#define DEFAULT_JOY_DEADZONE "4096"
#endif // DEFAULT_JOY_DEADZONE
#ifndef DEFAULT_DEV
#define DEFAULT_DEV 0
#endif // DEFAULT_DEV
#ifndef DEFAULT_ALLOWCONSOLE
#define DEFAULT_ALLOWCONSOLE 0
#endif // DEFAULT_ALLOWCONSOLE
#ifndef DEFAULT_FULLSCREEN
#define DEFAULT_FULLSCREEN "1" // must be a string
#endif // DEFAULT_FULLSCREEN
#ifndef DEFAULT_MAX_EDICTS
#define DEFAULT_MAX_EDICTS 1200 // was 900 before HL25
#endif // DEFAULT_MAX_EDICTS
#endif // DEFAULTS_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -24,4 +24,4 @@ typedef struct demo_api_s
void (*WriteBuffer)( int size, unsigned char *buffer );
} demo_api_t;
#endif//DEMO_API_H
#endif//DEMO_API_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -28,4 +28,4 @@ typedef struct dlight_s
qboolean dark; // subtracts light instead of adding
} dlight_t;
#endif//DLIGHT_H
#endif//DLIGHT_H

View File

@@ -1,5 +1,5 @@
/*
features.h - engine features that can be enabled by mod-maker request
enginefeatures.h - engine features that can be enabled by mod-maker request
Copyright (C) 2012 Uncle Mike
This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@ GNU General Public License for more details.
#define FEATURES_H
// list of engine features that can be enabled through callback SV_CheckFeatures
#define ENGINE_WRITE_LARGE_COORD (1<<0) // replace standard message WRITE_COORD with big message for support more than 8192 units in world
#define ENGINE_WRITE_LARGE_COORD (1<<0) // replace standard message WRITE_COORD with big message for support more than 8192 units in world
#define ENGINE_QUAKE_COMPATIBLE (1<<1) // make engine compatible with quake (flags and effects)
#define ENGINE_LOAD_DELUXEDATA (1<<2) // loading deluxemap for map (if present)
#define ENGINE_PHYSICS_PUSHER_EXT (1<<3) // enable sets of improvements for MOVETYPE_PUSH physics
@@ -25,5 +25,22 @@ GNU General Public License for more details.
#define ENGINE_COMPENSATE_QUAKE_BUG (1<<5) // compensate stupid quake bug (inverse pitch) for mods where this bug is fixed
#define ENGINE_IMPROVED_LINETRACE (1<<6) // new traceline that tracing through alphatextures
#define ENGINE_COMPUTE_STUDIO_LERP (1<<7) // enable MOVETYPE_STEP lerping back in engine
#define ENGINE_LINEAR_GAMMA_SPACE (1<<8) // disable influence of gamma/brightness cvars to textures/lightmaps, for mods with custom renderer
#endif//FEATURES_H
#define ENGINE_DISABLE_HDTEXTURES (1U<<30) // disable support of HD-textures in case custom renderer have separate way to load them
#define ENGINE_STEP_POSHISTORY_LERP (1U<<31) // enable MOVETYPE_STEP interpolation based on position history. Incompatible with ENGINE_COMPUTE_STUDIO_LERP!
// adjust the mask when features will be added or removed
#define ENGINE_FEATURES_MASK \
( ENGINE_WRITE_LARGE_COORD \
| ENGINE_QUAKE_COMPATIBLE \
| ENGINE_LOAD_DELUXEDATA \
| ENGINE_PHYSICS_PUSHER_EXT \
| ENGINE_LARGE_LIGHTMAPS \
| ENGINE_COMPENSATE_QUAKE_BUG \
| ENGINE_IMPROVED_LINETRACE \
| ENGINE_COMPUTE_STUDIO_LERP \
| ENGINE_LINEAR_GAMMA_SPACE \
| ENGINE_STEP_POSHISTORY_LERP )
#endif//FEATURES_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -19,7 +19,7 @@
#define ENTITY_NORMAL (1<<0)
#define ENTITY_BEAM (1<<1)
// Entity state is used for the baseline and for delta compression of a packet of
// Entity state is used for the baseline and for delta compression of a packet of
// entities that is sent to a client.
typedef struct entity_state_s entity_state_t;
@@ -28,7 +28,7 @@ struct entity_state_s
// Fields which are filled in by routines outside of delta compression
int entityType;
// Index into cl_entities array for this entity.
int number;
int number;
float msg_time;
// Message number last time the player/entity state was updated.
@@ -63,36 +63,36 @@ struct entity_state_s
vec3_t velocity;
// Send bbox down to client for use during prediction.
vec3_t mins;
vec3_t mins;
vec3_t maxs;
int aiment;
// If owned by a player, the index of that player ( for projectiles ).
int owner;
int owner;
// Friction, for prediction.
float friction;
float friction;
// Gravity multiplier
float gravity;
float gravity;
// PLAYER SPECIFIC
int team;
int playerclass;
int health;
qboolean spectator;
qboolean spectator;
int weaponmodel;
int gaitsequence;
// If standing on conveyor, e.g.
vec3_t basevelocity;
vec3_t basevelocity;
// Use the crouched hull, or the regular player hull.
int usehull;
int usehull;
// Latched buttons last time state updated.
int oldbuttons;
int oldbuttons;
// -1 = in air, else pmove entity number
int onground;
int onground;
int iStepLeft;
// How fast we are falling
float flFallVelocity;
float flFallVelocity;
float fov;
int weaponanim;
@@ -135,7 +135,7 @@ typedef struct clientdata_s
int bInDuck;
int weapons; // remove?
int flTimeStepSound;
int flDuckTime;
int flSwimTime;
@@ -152,7 +152,7 @@ typedef struct clientdata_s
int ammo_cells;
int ammo_rockets;
float m_flNextAttack;
int tfstate;
int pushmsec;
int deadflag;
@@ -185,4 +185,4 @@ typedef struct local_state_s
weapon_data_t weapondata[MAX_LOCAL_WEAPONS];
} local_state_t;
#endif//ENTITY_STATE_H
#endif//ENTITY_STATE_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -22,4 +22,4 @@
#define ET_BEAM 3
#define ET_FRAGMENTED 4 // BMODEL or SPRITE that was split across BSP nodes
#endif//ENTITY_TYPES_H
#endif//ENTITY_TYPES_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -55,4 +55,4 @@ typedef struct event_api_s
void ( *EV_PopTraceBounds)( void );
} event_api_t;
#endif//EVENT_API_H
#endif//EVENT_API_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -44,4 +44,4 @@ typedef struct event_args_s
int bparam2;
} event_args_t;
#endif//EVENT_ARGS_H
#endif//EVENT_ARGS_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -17,13 +17,13 @@
#define EVENT_FLAGS_H
// Skip local host for event send.
#define FEV_NOTHOST (1<<0)
#define FEV_NOTHOST (1<<0)
// Send the event reliably. You must specify the origin and angles and use
// PLAYBACK_EVENT_FULL for this to work correctly on the server for anything
// that depends on the event origin/angles. I.e., the origin/angles are not
// taken from the invoking edict for reliable events.
#define FEV_RELIABLE (1<<1)
#define FEV_RELIABLE (1<<1)
// Don't restrict to PAS/PVS, send this event to _everybody_ on the server ( useful for stopping CHAN_STATIC
// sounds started by client event when client is not in PVS anymore ( hwguy in TFC e.g. ).
@@ -42,4 +42,4 @@
// Only issue event client side ( from shared code )
#define FEV_CLIENT (1<<6)
#endif//EVENT_FLAGS_H
#endif//EVENT_FLAGS_H

View File

@@ -18,6 +18,9 @@ GNU General Public License for more details.
#define GFL_NOMODELS (1<<0)
#define GFL_NOSKILLS (1<<1)
#define GFL_RENDER_PICBUTTON_TEXT (1<<2)
#define GFL_HD_BACKGROUND (1<<3)
#define GFL_ANIMATED_TITLE (1<<4)
/*
========================================================================
@@ -27,7 +30,7 @@ GAMEINFO stuff
internal shared gameinfo structure (readonly for engine parts)
========================================================================
*/
typedef struct
typedef struct GAMEINFO_s
{
// filesystem info
char gamefolder[64]; // used for change game '-game x'
@@ -47,4 +50,48 @@ typedef struct
int gamemode;
} GAMEINFO;
#endif//GAMEINFO_H
/*
========================================================================
Extended GameInfo struct introduced in Xash3D FWGS
GAMEINFO can't be reliably extended, as nor engine, nor menu can't be
sure about struct size. By adding struct versioning, we can check the
presense for extra fields.
========================================================================
*/
#define GAMEINFO_VERSION 2
typedef enum gametype_e
{
GAME_NORMAL,
GAME_SINGLEPLAYER_ONLY,
GAME_MULTIPLAYER_ONLY,
} gametype_t;
typedef struct gameinfo2_s
{
int gi_version; // should be set to desired struct version, e.g. GAMEINFO_VERSION
// filesystem info
char gamefolder[64]; // used for change game
char startmap[64]; // map to start singleplayer game from
char trainmap[64]; // map to start hazardous course from (if specified)
char demomap[64]; // map to start demo chapter from (if specified)
char title[64]; // game title
char iconpath[64]; // path to game icon
char version[16]; // game version (optional)
uint32_t flags; // gameinfo flags, extended to fit more flags
// mod info
char game_url[256]; // link to a developer's site
char update_url[256]; // link to updates page
char type[64]; // single, toolkit, multiplayer, etc
char date[64]; // release date
uint64_t size; // size in bytes
gametype_t gamemode;
} gameinfo2_t;
#endif//GAMEINFO_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -23,7 +23,7 @@
// sub commands of svc_hltv:
#define HLTV_ACTIVE 0 // tells client that he's an spectator and will get director commands
#define HLTV_STATUS 1 // send status infos about proxy
#define HLTV_STATUS 1 // send status infos about proxy
#define HLTV_LISTEN 2 // tell client to listen to a multicast stream
// sub commands of svc_director:
@@ -45,7 +45,7 @@
// HLTV_EVENT event flags
#define DRC_FLAG_PRIO_MASK 0x0F // priorities between 0 and 15 (15 most important)
#define DRC_FLAG_SIDE (1<<4) //
#define DRC_FLAG_SIDE (1<<4) //
#define DRC_FLAG_DRAMATIC (1<<5) // is a dramatic scene
#define DRC_FLAG_SLOWMOTION (1<<6) // would look good in SloMo
#define DRC_FLAG_FACEPLAYER (1<<7) // player is doning something (reload/defuse bomb etc)
@@ -56,4 +56,4 @@
#define MAX_DIRECTOR_CMD_PARAMETERS 4
#define MAX_DIRECTOR_CMD_STRING 128
#endif//HLTV_H
#endif//HLTV_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -26,13 +26,13 @@ typedef enum
typedef struct IVoiceTweak_s
{
// These turn voice tweak mode on and off. While in voice tweak mode, the user's voice is echoed back
// without sending to the server.
// without sending to the server.
int (*StartVoiceTweakMode)( void ); // Returns 0 on error.
void (*EndVoiceTweakMode)( void );
// Get/set control values.
void (*SetControlFloat)( VoiceTweakControl iControl, float value );
float (*GetControlFloat)( VoiceTweakControl iControl );
} IVoiceTweak;
#endif//IVOICETWEAK_H
#endif//IVOICETWEAK_H

35
common/kbutton.h Normal file
View File

@@ -0,0 +1,35 @@
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef KBUTTON_H
#define KBUTTON_H
// a1ba: copied from WinQuake/client.h
//
// cl_input
//
typedef struct
{
int down[2]; // key nums holding it down
int state; // low bit is down state
} kbutton_t;
STATIC_CHECK_SIZEOF( kbutton_t, 12, 12 );
#endif // KBUTTON_H

View File

@@ -26,4 +26,4 @@ typedef struct
float time; // local time is gurantee what new style begins from the start, not mid or end of the sequence
} lightstyle_t;
#endif//LIGHTSTYLE_H
#endif//LIGHTSTYLE_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -27,13 +27,16 @@
// Set this flag for things like broadcast requests, etc. where the engine should not
// kill the request hook after receiving the first response
#define FNETAPI_MULTIPLE_RESPONSE ( 1<<0 )
#define FNETAPI_LEGACY_PROTOCOL ( 1<<1 ) // xash3d-fwgs extension
struct net_response_s;
typedef void (*net_api_response_func_t) ( struct net_response_s *response );
#define NET_SUCCESS ( 0 )
#define NET_ERROR_TIMEOUT ( 1<<0 )
#define NET_ERROR_PROTO_UNSUPPORTED ( 1<<1 )
#define NET_ERROR_UNDEFINED ( 1<<2 )
#define NET_ERROR_FORBIDDEN ( 1<<3 ) // xash3d-fwgs extension
typedef struct net_adrlist_s
{
@@ -63,7 +66,7 @@ typedef struct net_response_s
typedef struct net_status_s
{
// Connected to remote server? 1 == yes, 0 otherwise
int connected;
int connected;
// Client's IP address
netadr_t local_address;
// Address of remote server
@@ -86,7 +89,7 @@ typedef struct net_api_s
void (*SendRequest)( int context, int request, int flags, double timeout, struct netadr_s *remote_address, net_api_response_func_t response );
void (*CancelRequest)( int context );
void (*CancelAllRequests)( void );
char *(*AdrToString)( struct netadr_s *a );
const char *(*AdrToString)( struct netadr_s *a );
int ( *CompareAdr)( struct netadr_s *a, struct netadr_s *b );
int ( *StringToAdr)( char *s, struct netadr_s *a );
const char *(*ValueForKey)( const char *s, const char *key );
@@ -94,4 +97,4 @@ typedef struct net_api_s
void (*SetValueForKey)( char *s, const char *key, const char *value, int maxsize );
} net_api_t;
#endif//NET_APIH
#endif//NET_APIH

View File

@@ -1,37 +1,74 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
/*
Copyright (C) 1997-2001 Id Software, Inc.
#ifndef NETADR_H
#define NETADR_H
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
typedef enum
{
NA_UNUSED,
NA_LOOPBACK,
NA_BROADCAST,
NA_IP,
NA_IPX,
NA_BROADCAST_IPX
} netadrtype_t;
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
typedef struct netadr_s
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef NET_ADR_H
#define NET_ADR_H
#include STDINT_H
// net.h -- quake's interface to the networking layer
// a1ba: copied from Quake-2/qcommon/qcommon.h and modified to support IPv6
#define PORT_ANY -1
typedef enum {NA_LOOPBACK = 1, NA_BROADCAST, NA_IP, NA_IPX, NA_BROADCAST_IPX, NA_IP6, NA_MULTICAST_IP6} netadrtype_t;
/*
Original Quake-2 structure:
typedef struct
{
netadrtype_t type;
unsigned char ip[4];
unsigned char ipx[10];
byte ip[4];
byte ipx[10];
unsigned short port;
} netadr_t;
*/
#endif//NETADR_H
#pragma pack( push, 1 )
typedef struct netadr_s
{
union
{
// IPv6 struct
struct
{
uint16_t type6;
uint8_t ip6[16];
};
struct
{
uint32_t type; // must be netadrtype_t but will break with short enums
union
{
uint8_t ip[4];
uint32_t ip4; // for easier conversions
};
uint8_t ipx[10];
};
};
uint16_t port;
} netadr_t;
#pragma pack( pop )
STATIC_CHECK_SIZEOF( netadr_t, 20, 20 );
#endif // NET_ADR_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -18,7 +18,7 @@
typedef enum
{
pt_static,
pt_static,
pt_grav,
pt_slowgrav,
pt_fire,
@@ -45,9 +45,9 @@ typedef struct particle_s
// for pt_clientcusttom, we'll call this function each frame
void (*callback)( struct particle_s *particle, float frametime );
// For deathfunc, etc.
unsigned char context;
} particle_t;
#endif//PARTICLEDEF_H
#endif//PARTICLEDEF_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -33,9 +33,9 @@ struct pmtrace_s
vec3_t endpos; // final position
pmplane_t plane; // surface normal at impact
int ent; // entity at impact
vec3_t deltavelocity; // Change in player's velocity caused by impact.
vec3_t deltavelocity; // Change in player's velocity caused by impact.
// Only run on server.
int hitgroup;
};
#endif//PM_TRACE_H
#endif//PM_TRACE_H

93
common/port.h Normal file
View File

@@ -0,0 +1,93 @@
/*
port.h -- Portability Layer for Windows types
Copyright (C) 2015 Alibek Omarov
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#pragma once
#ifndef PORT_H
#define PORT_H
#include "build.h"
#if !XASH_WIN32
#if XASH_APPLE
#include <sys/syslimits.h>
#define OS_LIB_EXT "dylib"
#define OPEN_COMMAND "open"
#else
#define OS_LIB_EXT "so"
#define OPEN_COMMAND "xdg-open"
#endif
#define OS_LIB_PREFIX "lib"
#define VGUI_SUPPORT_DLL "libvgui_support." OS_LIB_EXT
// Windows-specific
#define __cdecl
#define __stdcall
#define _inline static inline
#if XASH_POSIX
#include <unistd.h>
#if XASH_NSWITCH
#define SOLDER_LIBDL_COMPAT
#include <solder.h>
#elif XASH_PSVITA
#define VRTLD_LIBDL_COMPAT
#include <vrtld.h>
#define O_BINARY 0
#else
#include <dlfcn.h>
#define HAVE_DUP
#define O_BINARY 0
#endif
#define O_TEXT 0
#define _mkdir( x ) mkdir( x, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH )
#endif
typedef void* HANDLE;
typedef void* HINSTANCE;
typedef struct tagPOINT
{
int x, y;
} POINT;
#else // WIN32
#define open _open
#define read _read
#define alloca _alloca
#define HSPRITE WINAPI_HSPRITE
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#include <windows.h>
#undef HSPRITE
#define OS_LIB_PREFIX ""
#define OS_LIB_EXT "dll"
#define VGUI_SUPPORT_DLL "../vgui_support." OS_LIB_EXT
#define HAVE_DUP
#endif //WIN32
#ifndef XASH_LOW_MEMORY
#define XASH_LOW_MEMORY 0
#endif
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#if defined XASH_SDL && !defined REF_DLL
#include <SDL.h>
#endif
#endif // PORT_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -35,4 +35,4 @@ typedef struct qfont_s
byte data[4];
} qfont_t;
#endif//QFONT_H
#endif//QFONT_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -17,7 +17,7 @@
#define R_EFX_H
// particle_t
#if !defined( PARTICLEDEFH )
#if !defined( PARTICLEDEFH )
#include "particledef.h"
#endif
@@ -56,6 +56,8 @@ color24 gTracerColors[] =
};
*/
#define TRACER_COLORINDEX_DEFAULT 4
// Temporary entity array
#define TENTPRIORITY_LOW 0
#define TENTPRIORITY_HIGH 1
@@ -75,7 +77,7 @@ color24 gTracerColors[] =
#define FTENT_SPIRAL 0x00000400
#define FTENT_SPRCYCLE 0x00000800
#define FTENT_COLLIDEALL 0x00001000 // will collide with world and slideboxes
#define FTENT_PERSIST 0x00002000 // tent is not removed when unable to draw
#define FTENT_PERSIST 0x00002000 // tent is not removed when unable to draw
#define FTENT_COLLIDEKILL 0x00004000 // tent is removed upon collision with anything
#define FTENT_PLYRATTACHMENT 0x00008000 // tent is attached to a player (owner)
#define FTENT_SPRANIMATELOOP 0x00010000 // animating sprite doesn't die when last frame is displayed
@@ -84,7 +86,7 @@ color24 gTracerColors[] =
#define FTENT_CLIENTCUSTOM 0x00080000 // Must specify callback. Callback function is responsible for killing tempent and updating fields ( unless other flags specify how to do things )
#define FTENT_SCALE 0x00100000 // An experiment
typedef struct tempent_s TEMPENTITY;
struct pmtrace_s;
typedef struct tempent_s
{
int flags;
@@ -98,11 +100,11 @@ typedef struct tempent_s
int hitSound;
void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr );
void (*callback)( struct tempent_s *ent, float frametime, float currenttime );
TEMPENTITY *next;
struct tempent_s *next;
int priority;
short clientIndex; // if attached, this is the index of the client to stick to
// if COLLIDEALL, this is the index of the client to ignore
// TENTS with FTENT_PLYRATTACHMENT MUST set the clientindex!
// TENTS with FTENT_PLYRATTACHMENT MUST set the clientindex!
vec3_t tentOffset; // if attached, client origin + tentOffset = tent origin.
cl_entity_t entity;
@@ -117,58 +119,58 @@ typedef struct efx_api_s efx_api_t;
struct efx_api_s
{
particle_t *(*R_AllocParticle)( void (*callback)( struct particle_s *particle, float frametime ));
void (*R_BlobExplosion)( float *org );
void (*R_Blood)( float *org, float *dir, int pcolor, int speed );
void (*R_BloodSprite)( float *org, int colorindex, int modelIndex, int modelIndex2, float size );
void (*R_BloodStream)( float *org, float *dir, int pcolor, int speed );
void (*R_BreakModel)( float *pos, float *size, float *dir, float random, float life, int count, int modelIndex, char flags );
void (*R_Bubbles)( float *mins, float *maxs, float height, int modelIndex, int count, float speed );
void (*R_BubbleTrail)( float *start, float *end, float height, int modelIndex, int count, float speed );
void (*R_BulletImpactParticles)( float *pos );
void (*R_BlobExplosion)( const float *org );
void (*R_Blood)( const float *org, const float *dir, int pcolor, int speed );
void (*R_BloodSprite)( const float *org, int colorindex, int modelIndex, int modelIndex2, float size );
void (*R_BloodStream)( const float *org, const float *dir, int pcolor, int speed );
void (*R_BreakModel)( const float *pos, const float *size, const float *dir, float random, float life, int count, int modelIndex, char flags );
void (*R_Bubbles)( const float *mins, const float *maxs, float height, int modelIndex, int count, float speed );
void (*R_BubbleTrail)( const float *start, const float *end, float height, int modelIndex, int count, float speed );
void (*R_BulletImpactParticles)( const float *pos );
void (*R_EntityParticles)( struct cl_entity_s *ent );
void (*R_Explosion)( float *pos, int model, float scale, float framerate, int flags );
void (*R_FizzEffect)( struct cl_entity_s *pent, int modelIndex, int density );
void (*R_FireField)( float *org, int radius, int modelIndex, int count, int flags, float life );
void (*R_FlickerParticles)( float *org );
void (*R_FunnelSprite)( float *org, int modelIndex, int reverse );
void (*R_Implosion)( float *end, float radius, int count, float life );
void (*R_LargeFunnel)( float *org, int reverse );
void (*R_LavaSplash)( float *org );
void (*R_MultiGunshot)( float *org, float *dir, float *noise, int count, int decalCount, int *decalIndices );
void (*R_MuzzleFlash)( float *pos1, int type );
void (*R_ParticleBox)( float *mins, float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_ParticleBurst)( float *pos, int size, int color, float life );
void (*R_ParticleExplosion)( float *org );
void (*R_ParticleExplosion2)( float *org, int colorStart, int colorLength );
void (*R_ParticleLine)( float *start, float *end, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_FlickerParticles)( const float *org );
void (*R_FunnelSprite)( const float *org, int modelIndex, int reverse );
void (*R_Implosion)( const float *end, float radius, int count, float life );
void (*R_LargeFunnel)( const float *org, int reverse );
void (*R_LavaSplash)( const float *org );
void (*R_MultiGunshot)( const float *org, const float *dir, const float *noise, int count, int decalCount, int *decalIndices );
void (*R_MuzzleFlash)( const float *pos1, int type );
void (*R_ParticleBox)( const float *mins, const float *maxs, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_ParticleBurst)( const float *pos, int size, int color, float life );
void (*R_ParticleExplosion)( const float *org );
void (*R_ParticleExplosion2)( const float *org, int colorStart, int colorLength );
void (*R_ParticleLine)( const float *start, const float *end, unsigned char r, unsigned char g, unsigned char b, float life );
void (*R_PlayerSprites)( int client, int modelIndex, int count, int size );
void (*R_Projectile)( float *origin, float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
void (*R_RicochetSound)( float *pos );
void (*R_RicochetSprite)( float *pos, struct model_s *pmodel, float duration, float scale );
void (*R_RocketFlare)( float *pos );
void (*R_Projectile)( const float *origin, const float *velocity, int modelIndex, int life, int owner, void (*hitcallback)( struct tempent_s *ent, struct pmtrace_s *ptr ) );
void (*R_RicochetSound)( const float *pos );
void (*R_RicochetSprite)( const float *pos, struct model_s *pmodel, float duration, float scale );
void (*R_RocketFlare)( const float *pos );
void (*R_RocketTrail)( float *start, float *end, int type );
void (*R_RunParticleEffect)( float *org, float *dir, int color, int count );
void (*R_ShowLine)( float *start, float *end );
void (*R_SparkEffect)( float *pos, int count, int velocityMin, int velocityMax );
void (*R_SparkShower)( float *pos );
void (*R_SparkStreaks)( float *pos, int count, int velocityMin, int velocityMax );
void (*R_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
void (*R_RunParticleEffect)( const float *org, const float *dir, int color, int count );
void (*R_ShowLine)( const float *start, const float *end );
void (*R_SparkEffect)( const float *pos, int count, int velocityMin, int velocityMax );
void (*R_SparkShower)( const float *pos );
void (*R_SparkStreaks)( const float *pos, int count, int velocityMin, int velocityMax );
void (*R_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int spread, int rendermode );
void (*R_Sprite_Explode)( TEMPENTITY *pTemp, float scale, int flags );
void (*R_Sprite_Smoke)( TEMPENTITY *pTemp, float scale );
void (*R_Sprite_Spray)( float *pos, float *dir, int modelIndex, int count, int speed, int iRand );
void (*R_Sprite_Spray)( const float *pos, const float *dir, int modelIndex, int count, int speed, int iRand );
void (*R_Sprite_Trail)( int type, float *start, float *end, int modelIndex, int count, float life, float size, float amplitude, int renderamt, float speed );
void (*R_Sprite_WallPuff)( TEMPENTITY *pTemp, float scale );
void (*R_StreakSplash)( float *pos, float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
void (*R_TracerEffect)( float *start, float *end );
void (*R_StreakSplash)( const float *pos, const float *dir, int color, int count, float speed, int velocityMin, int velocityMax );
void (*R_TracerEffect)( const float *start, const float *end );
void (*R_UserTracerParticle)( float *org, float *vel, float life, int colorIndex, float length, unsigned char deathcontext, void (*deathfunc)( struct particle_s *particle ));
particle_t *(*R_TracerParticles)( float *org, float *vel, float life );
void (*R_TeleportSplash)( float *org );
void (*R_TempSphereModel)( float *pos, float speed, float life, int count, int modelIndex );
TEMPENTITY *(*R_TempModel)( float *pos, float *dir, float *angles, float life, int modelIndex, int soundtype );
TEMPENTITY *(*R_DefaultSprite)( float *pos, int spriteIndex, float framerate );
TEMPENTITY *(*R_TempSprite)( float *pos, float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
void (*R_TeleportSplash)( const float *org );
void (*R_TempSphereModel)( const float *pos, float speed, float life, int count, int modelIndex );
TEMPENTITY *(*R_TempModel)( const float *pos, const float *dir, const float *angles, float life, int modelIndex, int soundtype );
TEMPENTITY *(*R_DefaultSprite)( const float *pos, int spriteIndex, float framerate );
TEMPENTITY *(*R_TempSprite)( float *pos, const float *dir, float scale, int modelIndex, int rendermode, int renderfx, float a, float life, int flags );
int (*Draw_DecalIndex)( int id );
int (*Draw_DecalIndexFromName)( char *name );
int (*Draw_DecalIndexFromName)( const char *name );
void (*R_DecalShoot)( int textureIndex, int entity, int modelIndex, float *position, int flags );
void (*R_AttachTentToPlayer)( int client, int modelIndex, float zoffset, float life );
void (*R_KillAttachedTents)( int client );
@@ -182,14 +184,14 @@ struct efx_api_s
BEAM *(*R_BeamRing)( int startEnt, int endEnt, int modelIndex, float life, float width, float amplitude, float brightness, float speed, int startFrame, float framerate, float r, float g, float b );
dlight_t *(*CL_AllocDlight)( int key );
dlight_t *(*CL_AllocElight)( int key );
TEMPENTITY *(*CL_TempEntAlloc)( float *org, struct model_s *model );
TEMPENTITY *(*CL_TempEntAllocNoModel)( float *org );
TEMPENTITY *(*CL_TempEntAllocHigh)( float *org, struct model_s *model );
TEMPENTITY *(*CL_TentEntAllocCustom)( float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
TEMPENTITY *(*CL_TempEntAlloc)( const float *org, struct model_s *model );
TEMPENTITY *(*CL_TempEntAllocNoModel)( const float *org );
TEMPENTITY *(*CL_TempEntAllocHigh)( const float *org, struct model_s *model );
TEMPENTITY *(*CL_TentEntAllocCustom)( const float *origin, struct model_s *model, int high, void (*callback)( struct tempent_s *ent, float frametime, float currenttime ));
void (*R_GetPackedColor)( short *packed, short color );
short (*R_LookupColor)( unsigned char r, unsigned char g, unsigned char b );
void (*R_DecalRemoveAll)( int textureIndex ); // textureIndex points to the decal index in the array, not the actual texture index.
void (*R_FireCustomDecal)( int textureIndex, int entity, int modelIndex, float *position, int flags, float scale );
};
#endif//R_EFX_H
#endif//R_EFX_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -26,7 +26,7 @@ typedef struct engine_studio_api_s
// Check to see if pointer is in the cache
void *( *Cache_Check )( struct cache_user_s *c );
// Load file into cache ( can be swapped out on demand )
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
// Retrieve model pointer for the named model
struct model_s *( *Mod_ForName )( const char *name, int crash_if_missing );
// Retrieve pointer to studio model data block from a model
@@ -103,7 +103,7 @@ typedef struct engine_studio_api_s
// True if using D3D/OpenGL
int ( *IsHardware )( void );
// Only called by hardware interface
void ( *GL_StudioDrawShadow )( void );
void ( *GL_SetRenderMode )( int mode );
@@ -120,7 +120,7 @@ typedef struct server_studio_api_s
// Check to see if pointer is in the cache
void *( *Cache_Check )( struct cache_user_s *c );
// Load file into cache ( can be swapped out on demand )
void ( *LoadCacheFile )( char *path, struct cache_user_s *cu );
void ( *LoadCacheFile )( const char *path, struct cache_user_s *cu );
// Retrieve pointer to studio model data block from a model
void *( *Mod_Extradata )( struct model_s *mod );
} server_studio_api_t;
@@ -140,7 +140,7 @@ typedef struct sv_blending_interface_s
{
int version;
void ( *SV_StudioSetupBones )( struct model_s *pModel,
void ( *SV_StudioSetupBones )( struct model_s *pModel,
float frame,
int sequence,
const vec3_t angles,
@@ -151,4 +151,4 @@ typedef struct sv_blending_interface_s
const edict_t *pEdict );
} sv_blending_interface_t;
#endif//R_STUDIOINT_H
#endif//R_STUDIOINT_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -25,7 +25,7 @@ typedef struct ref_params_s
vec3_t forward;
vec3_t right;
vec3_t up;
// Client frametime;
float frametime;
// Client time
@@ -54,7 +54,7 @@ typedef struct ref_params_s
int viewentity;
int playernum;
int max_entities;
int demoplayback;
int demoplayback;
int hardware;
int smoothing;
@@ -102,4 +102,4 @@ typedef struct ref_viewpass_s
int flags; // if !=0 nothing is drawn by the engine except clientDraw functions
} ref_viewpass_t;
#endif//REF_PARAMS_H
#endif//REF_PARAMS_H

View File

@@ -82,7 +82,7 @@ typedef enum
TF_KEEP_SOURCE = (1<<1), // some images keep source
TF_NOFLIP_TGA = (1<<2), // Steam background completely ignore tga attribute 0x20
TF_EXPAND_SOURCE = (1<<3), // Don't keep source as 8-bit expand to RGBA
TF_ALLOW_EMBOSS = (1<<4), // Allow emboss-mapping for this image
// reserved
TF_RECTANGLE = (1<<5), // this is GL_TEXTURE_RECTANGLE
TF_CUBEMAP = (1<<6), // it's cubemap texture
TF_DEPTHMAP = (1<<7), // custom texture filter used
@@ -107,19 +107,24 @@ typedef enum
TF_ARB_FLOAT = (1<<26), // float textures
TF_NOCOMPARE = (1<<27), // disable comparing for depth textures
TF_ARB_16BIT = (1<<28), // keep image as 16-bit (not 24)
TF_MULTISAMPLE = (1<<29), // multisampling texture
TF_ALLOW_NEAREST = (1<<30), // allows toggling nearest filtering for TF_NOMIPMAP textures
} texFlags_t;
typedef enum
{
CONTEXT_TYPE_GL = 0,
CONTEXT_TYPE_GL = 0, // compatibility profile
CONTEXT_TYPE_GLES_1_X,
CONTEXT_TYPE_GLES_2_X
CONTEXT_TYPE_GLES_2_X,
CONTEXT_TYPE_GL_CORE
} gl_context_type_t;
typedef enum
{
GLES_WRAPPER_NONE = 0, // native GLES
GLES_WRAPPER_NONE = 0, // native GL
GLES_WRAPPER_NANOGL, // used on GLES platforms
GLES_WRAPPER_WES, // used on GLES platforms
GLES_WRAPPER_GL4ES, // used on GLES platforms
} gles_wrapper_t;
// 30 bytes here
@@ -129,7 +134,7 @@ typedef struct modelstate_s
short frame; // 10 bits multiple by 4, should be enough
byte blending[2];
byte controller[4];
byte poseparam[16];
byte poseparam[16];
byte body;
byte skin;
short scale; // model scale (multiplied by 16)
@@ -152,13 +157,15 @@ typedef struct decallist_s
modelstate_t studio_state; // studio decals only
} decallist_t;
struct ref_viewpass_s;
typedef struct render_api_s
{
// Get renderer info (doesn't changes engine state at all)
int (*RenderGetParm)( int parm, int arg ); // generic
intptr_t (*RenderGetParm)( int parm, int arg ); // generic
void (*GetDetailScaleForTexture)( int texture, float *xScale, float *yScale );
void (*GetExtraParmsForTexture)( int texture, byte *red, byte *green, byte *blue, byte *alpha );
lightstyle_t* (*GetLightStyle)( int number );
lightstyle_t* (*GetLightStyle)( int number );
dlight_t* (*GetDynamicLight)( int number );
dlight_t* (*GetEntityLight)( int number );
byte (*LightToTexGamma)( byte color ); // software gamma support
@@ -175,9 +182,9 @@ typedef struct render_api_s
const char* (*GL_TextureName)( unsigned int texnum );
const byte* (*GL_TextureData)( unsigned int texnum ); // may be NULL
int (*GL_LoadTexture)( const char *name, const byte *buf, size_t size, int flags );
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, int flags );
int (*GL_CreateTexture)( const char *name, int width, int height, const void *buffer, texFlags_t flags );
int (*GL_LoadTextureArray)( const char **names, int flags );
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, int flags );
int (*GL_CreateTextureArray)( const char *name, int width, int height, int depth, const void *buffer, texFlags_t flags );
void (*GL_FreeTexture)( unsigned int texnum );
// Decals manipulating (draw & remove)
@@ -187,9 +194,9 @@ typedef struct render_api_s
// AVIkit support
void *(*AVI_LoadVideo)( const char *filename, qboolean load_audio );
int (*AVI_GetVideoInfo)( void *Avi, long *xres, long *yres, float *duration );
long (*AVI_GetVideoFrameNumber)( void *Avi, float time );
byte *(*AVI_GetVideoFrame)( void *Avi, long frame );
int (*AVI_GetVideoInfo)( void *Avi, int *xres, int *yres, float *duration ); // a1ba: changed longs to int
int (*AVI_GetVideoFrameNumber)( void *Avi, float time );
byte *(*AVI_GetVideoFrame)( void *Avi, int frame );
void (*AVI_UploadRawFrame)( int texture, int cols, int rows, int width, int height, const byte *data );
void (*AVI_FreeVideo)( void *Avi );
int (*AVI_IsActive)( void *Avi );
@@ -219,23 +226,24 @@ typedef struct render_api_s
struct mstudiotex_s *( *StudioGetTexture )( struct cl_entity_s *e );
const struct ref_overview_s *( *GetOverviewParms )( void );
const char *( *GetFileByIndex )( int fileindex );
int (*pfnSaveFile)( const char *filename, const void *data, long len );
int (*pfnSaveFile)( const char *filename, const void *data, int len );
void (*R_Reserved0)( void );
// static allocations
void *(*pfnMemAlloc)( size_t cb, const char *filename, const int fileline );
void *(*pfnMemAlloc)( size_t cb, const char *filename, const int fileline ) ALLOC_CHECK( 1 );
void (*pfnMemFree)( void *mem, const char *filename, const int fileline );
// engine utils (not related with render API but placed here)
char **(*pfnGetFilesList)( const char *pattern, int *numFiles, int gamedironly );
unsigned long (*pfnFileBufferCRC32)( const void *buffer, const int length );
unsigned int (*pfnFileBufferCRC32)( const void *buffer, const int length );
int (*COM_CompareFileTime)( const char *filename1, const char *filename2, int *iCompare );
void (*Host_Error)( const char *error, ... ); // cause Host Error
void* ( *pfnGetModel )( int modelindex );
float (*pfnTime)( void ); // Sys_DoubleTime
void (*Cvar_Set)( char *name, char *value );
void (*Cvar_Set)( const char *name, const char *value );
void (*S_FadeMusicVolume)( float fadePercent ); // fade background track (0-100 percents)
void (*SetRandomSeed)( long lSeed ); // set custom seed for RANDOM_FLOAT\RANDOM_LONG for predictable random
// a1ba: changed long to int
void (*SetRandomSeed)( int lSeed ); // set custom seed for RANDOM_FLOAT\RANDOM_LONG for predictable random
// ONLY ADD NEW FUNCTIONS TO THE END OF THIS STRUCT. INTERFACE VERSION IS FROZEN AT 37
} render_api_t;
@@ -254,7 +262,7 @@ typedef struct render_interface_s
// clear decals by engine request (e.g. for demo recording or vid_restart)
void (*R_ClearStudioDecals)( void );
// grab r_speeds message
qboolean (*R_SpeedsMessage)( char *out, size_t size );
qboolean (*R_SpeedsMessage)( char *out, size_t size );
// alloc or destroy model custom data
void (*Mod_ProcessUserData)( struct model_s *mod, qboolean create, const byte *buffer );
// alloc or destroy entity custom data
@@ -269,4 +277,4 @@ typedef struct render_interface_s
void (*CL_UpdateLatchedVars)( struct cl_entity_s *e, qboolean reset );
} render_interface_t;
#endif//RENDER_API_H
#endif//RENDER_API_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -26,4 +26,4 @@ typedef struct screenfade_s
int fadeFlags; // Fading flags
} screenfade_t;
#endif//SCREENFADE_H
#endif//SCREENFADE_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -12,16 +12,26 @@
* without written permission from Valve LLC.
*
****/
#pragma once
#ifndef STUDIO_EVENT_H
#define STUDIO_EVENT_H
#define MAXEVENTSTRING 64
typedef struct mstudioevent_s
{
int frame;
int event;
int type;
char options[64];
// the frame at which this animation event occurs
int32_t frame;
// the script event type
int32_t event;
// was "type"
int32_t unused;
// options
// could be path to sound WAVE files
char options[MAXEVENTSTRING];
} mstudioevent_t;
#endif//STUDIO_EVENT_H
#endif // STUDIO_EVENT_H

24
common/synctype.h Normal file
View File

@@ -0,0 +1,24 @@
/*
synctype.h -- shared synctype_t definition
Copyright (C) 1996-1997 Id Software, Inc.
Copyright (C) 2023 Alibek Omarov
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef SYNCTYPE_H
#define SYNCTYPE_H
typedef enum {ST_SYNC=0, ST_RAND } synctype_t;
#endif

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -16,7 +16,7 @@
#ifndef TRIANGLEAPI_H
#define TRIANGLEAPI_H
typedef enum
typedef enum
{
TRI_FRONT = 0,
TRI_NONE = 1,
@@ -44,14 +44,14 @@ typedef struct triangleapi_s
void (*Color4f)( float r, float g, float b, float a );
void (*Color4ub)( unsigned char r, unsigned char g, unsigned char b, unsigned char a );
void (*TexCoord2f)( float u, float v );
void (*Vertex3fv)( float *worldPnt );
void (*Vertex3fv)( const float *worldPnt );
void (*Vertex3f)( float x, float y, float z );
void (*Brightness)( float brightness );
void (*CullFace)( TRICULLSTYLE style );
void (*CullFace)( TRICULLSTYLE style );
int (*SpriteTexture)( struct model_s *pSpriteModel, int frame );
int (*WorldToScreen)( float *world, float *screen ); // Returns 1 if it's z clipped
int (*WorldToScreen)( const float *world, float *screen ); // Returns 1 if it's z clipped
void (*Fog)( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b.
void (*ScreenToWorld)( float *screen, float *world );
void (*ScreenToWorld)( const float *screen, float *world );
void (*GetMatrix)( const int pname, float *matrix );
int (*BoxInPVS)( float *mins, float *maxs );
void (*LightAtPoint)( float *pos, float *value );
@@ -59,4 +59,4 @@ typedef struct triangleapi_s
void (*FogParams)( float flDensity, int iFogSkybox );
} triangleapi_t;
#endif//TRIANGLEAPI_H
#endif//TRIANGLEAPI_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -36,4 +36,4 @@ typedef struct usercmd_s
vec3_t impact_position;
} usercmd_t;
#endif//USERCMD_H
#endif//USERCMD_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -83,4 +83,4 @@ typedef struct mip_s
unsigned int offsets[4]; // four mip maps stored
} mip_t;
#endif//WADFILE_H
#endif//WADFILE_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -47,4 +47,4 @@ typedef struct weapon_data_s
float fuser4;
} weapon_data_t;
#endif//WEAPONINFO_H
#endif//WEAPONINFO_H

View File

@@ -21,4 +21,4 @@ typedef struct wrect_s
int left, right, top, bottom;
} wrect_t;
#endif//WRECT_H
#endif//WRECT_H

224
common/xash3d_types.h Normal file
View File

@@ -0,0 +1,224 @@
// basic typedefs
#ifndef XASH_TYPES_H
#define XASH_TYPES_H
#include "build.h"
#if XASH_IRIX
#include <port.h>
#endif
#if XASH_WIN32
#include <wchar.h> // off_t
#endif // _WIN32
#include <sys/types.h> // off_t
#include STDINT_H
#include <assert.h>
typedef unsigned char byte;
typedef int sound_t;
typedef float vec_t;
typedef vec_t vec2_t[2];
typedef vec_t vec3_t[3];
typedef vec_t vec4_t[4];
typedef vec_t quat_t[4];
typedef byte rgba_t[4]; // unsigned byte colorpack
typedef byte rgb_t[3]; // unsigned byte colorpack
typedef vec_t matrix3x4[3][4];
typedef vec_t matrix4x4[4][4];
typedef uint32_t poolhandle_t;
#undef true
#undef false
#ifndef __cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;
#endif
typedef uint64_t longtime_t;
#define MAX_STRING 256 // generic string
#define MAX_INFO_STRING 256 // infostrings are transmitted across network
#define MAX_SERVERINFO_STRING 512 // server handles too many settings. expand to 1024?
#define MAX_LOCALINFO_STRING 32768 // localinfo used on server and not sended to the clients
#define MAX_SYSPATH 1024 // system filepath
#define MAX_VA_STRING 1024 // string length returned by va()
#define MAX_PRINT_MSG 8192 // how many symbols can handle single call of Con_Printf or Con_DPrintf
#define MAX_TOKEN 2048 // parse token length
#define MAX_MODS 512 // environment games that engine can keep visible
#define MAX_USERMSG_LENGTH 2048 // don't modify it's relies on a client-side definitions
#define BIT( n ) ( 1U << ( n ))
#define BIT64( n ) ( 1ULL << ( n ))
#define SetBits( iBitVector, bits ) ((iBitVector) = (iBitVector) | (bits))
#define ClearBits( iBitVector, bits ) ((iBitVector) = (iBitVector) & ~(bits))
#define FBitSet( iBitVector, bit ) ((iBitVector) & (bit))
#ifndef __cplusplus
#ifdef NULL
#undef NULL
#endif
#define NULL ((void *)0)
#endif
// color strings
#define IsColorString( p ) ( p && *( p ) == '^' && *(( p ) + 1) && *(( p ) + 1) >= '0' && *(( p ) + 1 ) <= '9' )
#define ColorIndex( c ) ((( c ) - '0' ) & 7 )
#if defined( __GNUC__ )
#if defined( __i386__ )
#define EXPORT __attribute__(( visibility( "default" ), force_align_arg_pointer ))
#define GAME_EXPORT __attribute(( force_align_arg_pointer ))
#else
#define EXPORT __attribute__(( visibility ( "default" )))
#define GAME_EXPORT
#endif
#define NORETURN __attribute__(( noreturn ))
#define NONNULL __attribute__(( nonnull ))
#define _format( x ) __attribute__(( format( printf, x, x + 1 )))
#define ALLOC_CHECK( x ) __attribute__(( alloc_size( x )))
#define NO_ASAN __attribute__(( no_sanitize( "address" )))
#define RENAME_SYMBOL( x ) asm( x )
#else
#if defined( _MSC_VER )
#define EXPORT __declspec( dllexport )
#define NO_ASAN __declspec( no_sanitize_address )
#else
#define EXPORT
#define NO_ASAN
#endif
#define GAME_EXPORT
#define NORETURN
#define NONNULL
#define _format( x )
#define ALLOC_CHECK( x )
#define RENAME_SYMBOL( x )
#endif
#if __GNUC__ >= 3
#define unlikely( x ) __builtin_expect( x, 0 )
#define likely( x ) __builtin_expect( x, 1 )
#elif defined( __has_builtin )
#if __has_builtin( __builtin_expect ) // this must be after defined() check
#define unlikely( x ) __builtin_expect( x, 0 )
#define likely( x ) __builtin_expect( x, 1 )
#endif
#endif
#if !defined( unlikely ) || !defined( likely )
#define unlikely( x ) ( x )
#define likely( x ) ( x )
#endif
#if __STDC_VERSION__ >= 202311L || __cplusplus >= 201103L // C23 or C++ static_assert is a keyword
#define STATIC_ASSERT_( ignore, x, y ) static_assert( x, y )
#define STATIC_ASSERT static_assert
#elif __STDC_VERSION__ >= 201112L // in C11 it's _Static_assert
#define STATIC_ASSERT_( ignore, x, y ) _Static_assert( x, y )
#define STATIC_ASSERT _Static_assert
#else
#define STATIC_ASSERT_( id, x, y ) extern int id[( x ) ? 1 : -1]
// need these to correctly expand the line macro
#define STATIC_ASSERT_3( line, x, y ) STATIC_ASSERT_( static_assert_ ## line, x, y )
#define STATIC_ASSERT_2( line, x, y ) STATIC_ASSERT_3( line, x, y )
#define STATIC_ASSERT( x, y ) STATIC_ASSERT_2( __LINE__, x, y )
#endif
// at least, statically check size of some public structures
#if XASH_64BIT
#define STATIC_CHECK_SIZEOF( type, size32, size64 ) \
STATIC_ASSERT( sizeof( type ) == size64, #type " unexpected size" )
#else
#define STATIC_CHECK_SIZEOF( type, size32, size64 ) \
STATIC_ASSERT( sizeof( type ) == size32, #type " unexpected size" )
#endif
#if !defined( __cplusplus ) && __STDC_VERSION__ >= 199101L // not C++ and C99 or newer
#define XASH_RESTRICT restrict
#elif _MSC_VER || __GNUC__ || __clang__ // compiler-specific extensions
#define XASH_RESTRICT __restrict
#else
#define XASH_RESTRICT // nothing
#endif
#ifdef XASH_BIG_ENDIAN
#define LittleLong(x) (((int)(((x)&255)<<24)) + ((int)((((x)>>8)&255)<<16)) + ((int)(((x)>>16)&255)<<8) + (((x) >> 24)&255))
#define LittleLongSW(x) (x = LittleLong(x) )
#define LittleShort(x) ((short)( (((short)(x) >> 8) & 255) + (((short)(x) & 255) << 8)))
#define LittleShortSW(x) (x = LittleShort(x) )
_inline float LittleFloat( float f )
{
union
{
float f;
unsigned char b[4];
} dat1, dat2;
dat1.f = f;
dat2.b[0] = dat1.b[3];
dat2.b[1] = dat1.b[2];
dat2.b[2] = dat1.b[1];
dat2.b[3] = dat1.b[0];
return dat2.f;
}
#else
#define LittleLong(x) (x)
#define LittleLongSW(x)
#define LittleShort(x) (x)
#define LittleShortSW(x)
#define LittleFloat(x) (x)
#endif
typedef unsigned int dword;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef char string[MAX_STRING];
typedef struct file_s file_t; // normal file
typedef struct stream_s stream_t; // sound stream for background music playing
typedef off_t fs_offset_t;
#if XASH_WIN32
typedef int fs_size_t; // return type of _read, _write funcs
#else /* !XASH_WIN32 */
typedef ssize_t fs_size_t;
#endif /* !XASH_WIN32 */
typedef struct dllfunc_s
{
const char *name;
void **func;
} dllfunc_t;
typedef struct dll_info_s
{
const char *name; // name of library
const dllfunc_t *fcts; // list of dll exports
qboolean crash; // crash if dll not found
void *link; // hinstance of loading library
} dll_info_t;
typedef void (*setpair_t)( const char *key, const void *value, const void *buffer, void *numpairs );
typedef void *(*pfnCreateInterface_t)( const char *, int * );
// config strings are a general means of communication from
// the server to all connected clients.
// each config string can be at most CS_SIZE characters.
#if XASH_LOW_MEMORY == 0
#define MAX_QPATH 64 // max length of a game pathname
#elif XASH_LOW_MEMORY == 2
#define MAX_QPATH 32 // should be enough for singleplayer
#elif XASH_LOW_MEMORY == 1
#define MAX_QPATH 48
#endif
#define MAX_OSPATH 260 // max length of a filesystem pathname
#define CS_SIZE 64 // size of one config string
#define CS_TIME 16 // size of time string
#endif // XASH_TYPES_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -16,6 +16,10 @@
#ifndef ALIAS_H
#define ALIAS_H
#include "build.h"
#include STDINT_H
#include "synctype.h"
/*
==============================================================================
@@ -39,16 +43,6 @@ Alias models are position independent, so the cache manager can move them.
#define ALIAS_TRACER2 0x0040 // orange split trail + rotate
#define ALIAS_TRACER3 0x0080 // purple trail
// must match definition in sprite.h
#ifndef SYNCTYPE_T
#define SYNCTYPE_T
typedef enum
{
ST_SYNC = 0,
ST_RAND
} synctype_t;
#endif
typedef enum
{
ALIAS_SINGLE = 0,
@@ -63,36 +57,42 @@ typedef enum
typedef struct
{
int ident;
int version;
int32_t ident;
int32_t version;
vec3_t scale;
vec3_t scale_origin;
float boundingradius;
vec3_t eyeposition;
int numskins;
int skinwidth;
int skinheight;
int numverts;
int numtris;
int numframes;
synctype_t synctype;
int flags;
int32_t numskins;
int32_t skinwidth;
int32_t skinheight;
int32_t numverts;
int32_t numtris;
int32_t numframes;
uint32_t synctype; // was synctype_t
int32_t flags;
float size;
} daliashdr_t;
STATIC_CHECK_SIZEOF( daliashdr_t, 84, 84 );
typedef struct
{
int onseam;
int s;
int t;
int32_t onseam;
int32_t s;
int32_t t;
} stvert_t;
STATIC_CHECK_SIZEOF( stvert_t, 12, 12 );
typedef struct dtriangle_s
{
int facesfront;
int vertindex[3];
int32_t facesfront;
int32_t vertindex[3];
} dtriangle_t;
STATIC_CHECK_SIZEOF( dtriangle_t, 16, 16 );
#define DT_FACES_FRONT 0x0010
#define ALIAS_ONSEAM 0x0020
@@ -103,36 +103,50 @@ typedef struct
char name[16]; // frame name from grabbing
} daliasframe_t;
STATIC_CHECK_SIZEOF( daliasframe_t, 24, 24 );
typedef struct
{
int numframes;
int32_t numframes;
trivertex_t bboxmin; // lightnormal isn't used
trivertex_t bboxmax; // lightnormal isn't used
} daliasgroup_t;
STATIC_CHECK_SIZEOF( daliasgroup_t, 12, 12 );
typedef struct
{
int numskins;
int32_t numskins;
} daliasskingroup_t;
STATIC_CHECK_SIZEOF( daliasskingroup_t, 4, 4 );
typedef struct
{
float interval;
} daliasinterval_t;
STATIC_CHECK_SIZEOF( daliasinterval_t, 4, 4 );
typedef struct
{
float interval;
} daliasskininterval_t;
STATIC_CHECK_SIZEOF( daliasskininterval_t, 4, 4 );
typedef struct
{
aliasframetype_t type;
uint32_t type; // was aliasframetype_t
} daliasframetype_t;
STATIC_CHECK_SIZEOF( daliasframetype_t, 4, 4 );
typedef struct
{
aliasskintype_t type;
uint32_t type; // was aliasskintype_t
} daliasskintype_t;
#endif//ALIAS_H
STATIC_CHECK_SIZEOF( daliasskintype_t, 4, 4 );
#endif//ALIAS_H

View File

@@ -1,18 +1,22 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
/*
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
{-0.525731, 0.000000, 0.850651},
{-0.442863, 0.238856, 0.864188},
{-0.295242, 0.000000, 0.955423},

View File

@@ -15,6 +15,14 @@ GNU General Public License for more details.
#ifndef CDLL_EXP_H
#define CDLL_EXP_H
struct tempent_s;
struct usercmd_s;
struct physent_s;
struct playermove_s;
struct mstudioevent_s;
struct engine_studio_api_s;
struct r_studio_interface_s;
// NOTE: ordering is important!
typedef struct cldll_func_s
{
@@ -62,6 +70,10 @@ typedef struct cldll_func_s
// Xash3D extension
int (*pfnGetRenderInterface)( int version, render_api_t *renderfuncs, render_interface_t *callback );
void (*pfnClipMoveToEntity)( struct physent_s *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
// Xash3D FWGS extension
int (*pfnTouchEvent)( int type, int fingerID, float x, float y, float dx, float dy );
void (*pfnMoveEvent)( float forwardmove, float sidemove );
void (*pfnLookEvent)( float relyaw, float relpitch );
} cldll_func_t;
#endif//CDLL_EXP_H
#endif//CDLL_EXP_H

View File

@@ -1,9 +1,9 @@
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
@@ -15,7 +15,7 @@
//
// cdll_int.h
//
// 4-23-98
// 4-23-98
// JOHN: client dll interface declarations
//
@@ -27,6 +27,16 @@ extern "C" {
#endif
#include "const.h"
#include <stdint.h>
#define MAX_ALIAS_NAME 32
typedef struct cmdalias_s
{
struct cmdalias_s *next;
char name[MAX_ALIAS_NAME];
char *value;
} cmdalias_t;
// this file is included by both the engine and the client-dll,
// so make sure engine declarations aren't done twice
@@ -96,8 +106,14 @@ typedef struct hud_player_info_s
char *model;
short topcolor;
short bottomcolor;
uint64_t m_nSteamID;
} hud_player_info_t;
struct screenfade_s;
struct tagPOINT;
struct event_args_s;
typedef struct cl_enginefuncs_s
{
// sprite handlers
@@ -119,20 +135,20 @@ typedef struct cl_enginefuncs_s
void (*pfnSetCrosshair)( HSPRITE hspr, wrect_t rc, int r, int g, int b );
// cvar handlers
struct cvar_s *(*pfnRegisterVariable)( char *szName, char *szValue, int flags );
float (*pfnGetCvarFloat)( char *szName );
char* (*pfnGetCvarString)( char *szName );
struct cvar_s *(*pfnRegisterVariable)( const char *szName, const char *szValue, int flags );
float (*pfnGetCvarFloat)( const char *szName );
const char* (*pfnGetCvarString)( const char *szName );
// command handlers
int (*pfnAddCommand)( char *cmd_name, void (*function)(void) );
int (*pfnHookUserMsg)( char *szMsgName, pfnUserMsgHook pfn );
int (*pfnServerCmd)( char *szCmdString );
int (*pfnClientCmd)( char *szCmdString );
int (*pfnAddCommand)( const char *cmd_name, void (*function)(void) );
int (*pfnHookUserMsg)( const char *szMsgName, pfnUserMsgHook pfn );
int (*pfnServerCmd)( const char *szCmdString );
int (*pfnClientCmd)( const char *szCmdString );
void (*pfnGetPlayerInfo)( int ent_num, hud_player_info_t *pinfo );
// sound handlers
void (*pfnPlaySoundByName)( char *szSound, float volume );
void (*pfnPlaySoundByName)( const char *szSound, float volume );
void (*pfnPlaySoundByIndex)( int iSound, float volume );
// vector helpers
@@ -154,14 +170,14 @@ typedef struct cl_enginefuncs_s
void (*GetViewAngles)( float * );
void (*SetViewAngles)( float * );
int (*GetMaxClients)( void );
void (*Cvar_SetValue)( char *cvar, float value );
void (*Cvar_SetValue)( const char *cvar, float value );
int (*Cmd_Argc)( void );
char *(*Cmd_Argv)( int arg );
void (*Con_Printf)( char *fmt, ... );
void (*Con_DPrintf)( char *fmt, ... );
void (*Con_NPrintf)( int pos, char *fmt, ... );
void (*Con_NXPrintf)( struct con_nprint_s *info, char *fmt, ... );
int (*Cmd_Argc)( void );
const char *(*Cmd_Argv)( int arg );
void (*Con_Printf)( const char *fmt, ... );
void (*Con_DPrintf)( const char *fmt, ... );
void (*Con_NPrintf)( int pos, const char *fmt, ... );
void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... );
const char* (*PhysInfo_ValueForKey)( const char *key );
const char* (*ServerInfo_ValueForKey)( const char *key );
@@ -180,8 +196,8 @@ typedef struct cl_enginefuncs_s
void (*V_CalcShake)( void );
void (*V_ApplyShake)( float *origin, float *angles, float factor );
int (*PM_PointContents)( float *point, int *truecontents );
int (*PM_WaterEntity)( float *p );
int (*PM_PointContents)( const float *point, int *truecontents );
int (*PM_WaterEntity)( const float *p );
struct pmtrace_s *(*PM_TraceLine)( float *start, float *end, int flags, int usehull, int ignore_pe );
struct model_s *(*CL_LoadModel)( const char *modelname, int *index );
@@ -189,35 +205,36 @@ typedef struct cl_enginefuncs_s
const struct model_s* (*GetSpritePointer)( HSPRITE hSprite );
void (*pfnPlaySoundByNameAtLocation)( char *szSound, float volume, float *origin );
unsigned short (*pfnPrecacheEvent)( int type, const char* psz );
void (*pfnPlaybackEvent)( int flags, const struct edict_s *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2 );
void (*pfnWeaponAnim)( int iAnim, int body );
float (*pfnRandomFloat)( float flLow, float flHigh );
long (*pfnRandomLong)( long lLow, long lHigh );
void (*pfnHookEvent)( char *name, void ( *pfnEvent )( struct event_args_s *args ));
int (*Con_IsVisible) ();
float (*pfnRandomFloat)( float flLow, float flHigh );
int (*pfnRandomLong)( int lLow, int lHigh );
void (*pfnHookEvent)( const char *name, void ( *pfnEvent )( struct event_args_s *args ));
int (*Con_IsVisible) ( void );
const char *(*pfnGetGameDirectory)( void );
struct cvar_s *(*pfnGetCvarPointer)( const char *szName );
const char *(*Key_LookupBinding)( const char *pBinding );
const char *(*pfnGetLevelName)( void );
void (*pfnGetScreenFade)( struct screenfade_s *fade );
void (*pfnSetScreenFade)( struct screenfade_s *fade );
void* (*VGui_GetPanel)( );
void* (*VGui_GetPanel)( void );
void (*VGui_ViewportPaintBackground)( int extents[4] );
byte* (*COM_LoadFile)( char *path, int usehunk, int *pLength );
byte* (*COM_LoadFile)( const char *path, int usehunk, int *pLength );
char* (*COM_ParseFile)( char *data, char *token );
void (*COM_FreeFile)( void *buffer );
struct triangleapi_s *pTriAPI;
struct efx_api_s *pEfxAPI;
struct event_api_s *pEventAPI;
struct event_api_s *pEventAPI;
struct demo_api_s *pDemoAPI;
struct net_api_s *pNetAPI;
struct IVoiceTweak_s *pVoiceTweak;
// returns 1 if the client is a spectator only (connected to a proxy), 0 otherwise or 2 if in dev_overview mode
// returns 1 if the client is a spectator only (connected to a proxy), 0 otherwise or 2 if in dev_overview mode
int (*IsSpectateOnly)( void );
struct model_s *(*LoadMapSprite)( const char *filename );
@@ -248,39 +265,47 @@ typedef struct cl_enginefuncs_s
void (*pfnGetMousePos)( struct tagPOINT *ppt );
void (*pfnSetMousePos)( int x, int y );
void (*pfnSetMouseEnable)( qboolean fEnable );
void (*pfnUnused1)( void );
void (*pfnUnused2)( void );
void (*pfnUnused3)( void );
void (*pfnUnused4)( void );
float (*pfnGetClientOldTime)( void );
float (*pfnGetGravity)( void );
struct model_s*(*pfnGetModelByIndex)( int index );
void (*pfnUnused5)( void );
void (*pfnUnused6)( void );
void (*pfnUnused7)( void );
void (*pfnUnused8)( void );
void (*pfnUnused9)( void );
void (*pfnUnused10)( void );
void (*pfnUnused11)( void );
void (*pfnUnused12)( void );
const char*(*LocalPlayerInfo_ValueForKey)( const char* key );
void (*pfnUnused13)( void );
void (*pfnUnused14)( void );
void (*pfnUnused15)( void );
void (*pfnUnused16)( void );
void (*Cvar_Set)( char *name, char *value );
void (*pfnUnused17)( void );
void (*pfnUnused18)( void );
void (*pfnUnused19)( void );
double (*pfnSys_FloatTime)( void );
void (*pfnUnused20)( void );
void (*pfnUnused21)( void );
void (*pfnUnused22)( void );
void (*pfnUnused23)( void );
void (*pfnFillRGBABlend)( int x, int y, int width, int height, int r, int g, int b, int a );
int (*pfnGetAppID)( void );
void (*pfnUnused24)( void );
void (*pfnUnused25)( void );
// undocumented interface starts here
struct cvar_s* (*pfnGetFirstCvarPtr)( void );
void* (*pfnGetFirstCmdFunctionHandle)( void );
void* (*pfnGetNextCmdFunctionHandle)( void *cmdhandle );
const char* (*pfnGetCmdFunctionName)( void *cmdhandle );
float (*pfnGetClientOldTime)( void );
float (*pfnGetGravity)( void );
struct model_s* (*pfnGetModelByIndex)( int index );
void (*pfnSetFilterMode)( int mode ); // same as gl_texsort in original Quake
void (*pfnSetFilterColor)( float red, float green, float blue );
void (*pfnSetFilterBrightness)( float brightness );
void *(*pfnSequenceGet)( const char *fileName, const char *entryName );
void (*pfnSPR_DrawGeneric)( int frame, int x, int y, const wrect_t *prc, int blendsrc, int blenddst, int width, int height );
void *(*pfnSequencePickSentence)( const char *groupName, int pickMethod, int *entryPicked );
int (*pfnDrawString)( int x, int y, const char *str, int r, int g, int b );
int (*pfnDrawStringReverse)( int x, int y, const char *str, int r, int g, int b );
const char *(*LocalPlayerInfo_ValueForKey)( const char* key );
int (*pfnVGUI2DrawCharacter)( int x, int y, int ch, unsigned int font );
int (*pfnVGUI2DrawCharacterAdditive)( int x, int y, int ch, int r, int g, int b, unsigned int font );
unsigned int (*pfnGetApproxWavePlayLen)( const char *filename );
void* (*GetCareerGameUI)( void ); // g-cont. !!!! potential crash-point!
void (*Cvar_Set)( const char *name, const char *value );
int (*pfnIsPlayingCareerMatch)( void );
void (*pfnPlaySoundVoiceByName)( char *szSound, float volume, int pitch );
void (*pfnPrimeMusicStream)( char *filename, int looping );
double (*pfnSys_FloatTime)( void );
// decay funcs
void (*pfnProcessTutorMessageDecayBuffer)( int *buffer, int buflen );
void (*pfnConstructTutorMessageDecayBuffer)( int *buffer, int buflen );
void (*pfnResetTutorMessageDecayData)( void );
void (*pfnPlaySoundByNameAtPitch)( char *szSound, float volume, int pitch );
void (*pfnFillRGBABlend)( int x, int y, int width, int height, int r, int g, int b, int a );
int (*pfnGetAppID)( void );
cmdalias_t *(*pfnGetAliases)( void );
void (*pfnVguiWrap2_GetMouseDelta)( int *x, int *y );
// added in 2019 update, not documented yet
int (*pfnFilteredClientCmd)( const char *cmd );
} cl_enginefunc_t;
#define CLDLL_INTERFACE_VERSION 7
@@ -289,4 +314,4 @@ typedef struct cl_enginefuncs_s
}
#endif
#endif//CDLL_INT_H
#endif//CDLL_INT_H

37
engine/client/avi/avi.h Normal file
View File

@@ -0,0 +1,37 @@
/*
avi.h -- common avi support header
Copyright (C) 2018 a1batross, Uncle Mike
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef AVI_H
#define AVI_H
//
// avikit.c
//
typedef struct movie_state_s movie_state_t;
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time );
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame );
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration );
qboolean AVI_GetAudioInfo( movie_state_t *Avi, wavdata_t *snd_info );
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length );
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet );
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio );
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time );
void AVI_CloseVideo( movie_state_t *Avi );
qboolean AVI_IsActive( movie_state_t *Avi );
void AVI_FreeVideo( movie_state_t *Avi );
movie_state_t *AVI_GetState( int num );
qboolean AVI_Initailize( void );
void AVI_Shutdown( void );
#endif // AVI_H

View File

@@ -0,0 +1,90 @@
/*
avi_stub.c - playing AVI files (stub)
Copyright (C) 2018 a1batross
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#include "build.h"
#if !XASH_WIN32
#include "common.h"
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
{
return 0;
}
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame )
{
return NULL;
}
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration )
{
return false;
}
qboolean AVI_GetAudioInfo( movie_state_t *Avi, wavdata_t *snd_info )
{
return false;
}
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length )
{
return 0;
}
void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audio, int quiet )
{
;
}
movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio )
{
return NULL;
}
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
{
return 0;
}
void AVI_CloseVideo( movie_state_t *Avi )
{
;
}
qboolean AVI_IsActive( movie_state_t *Avi )
{
return false;
}
void AVI_FreeVideo( movie_state_t *Avi )
{
;
}
movie_state_t *AVI_GetState( int num )
{
return NULL;
}
qboolean AVI_Initailize( void )
{
return false;
}
void AVI_Shutdown( void )
{
;
}
#endif // WIN32

View File

@@ -1,5 +1,6 @@
/*
avikit.c - playing AVI files (based on original AVIKit code)
avi_win.c - playing AVI files (based on original AVIKit code, Win32 version)
Copyright (c) 2003-2004, Ruari O'Sullivan
Copyright (C) 2010 Uncle Mike
This program is free software: you can redistribute it and/or modify
@@ -13,9 +14,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#include "build.h"
#if XASH_WIN32
#include "common.h"
#include "client.h"
#include "gl_local.h"
#include <vfw.h> // video for windows
// msvfw32.dll exports
@@ -58,14 +60,14 @@ dll_info_t msacm_dll = { "msacm32.dll", msacm_funcs, false };
static int (_stdcall *pAVIStreamInfo)( PAVISTREAM pavi, AVISTREAMINFO *psi, LONG lSize );
static int (_stdcall *pAVIStreamRead)( PAVISTREAM pavi, LONG lStart, LONG lSamples, void *lpBuffer, LONG cbBuffer, LONG *plBytes, LONG *plSamples );
static PGETFRAME (_stdcall *pAVIStreamGetFrameOpen)( PAVISTREAM pavi, LPBITMAPINFOHEADER lpbiWanted );
static long (_stdcall *pAVIStreamTimeToSample)( PAVISTREAM pavi, LONG lTime );
static int (_stdcall *pAVIStreamTimeToSample)( PAVISTREAM pavi, LONG lTime );
static void* (_stdcall *pAVIStreamGetFrame)( PGETFRAME pg, LONG lPos );
static int (_stdcall *pAVIStreamGetFrameClose)( PGETFRAME pg );
static dword (_stdcall *pAVIStreamRelease)( PAVISTREAM pavi );
static int (_stdcall *pAVIFileOpen)( PAVIFILE *ppfile, LPCSTR szFile, UINT uMode, LPCLSID lpHandler );
static int (_stdcall *pAVIFileOpenW)( PAVIFILE *ppfile, LPCWSTR szFile, UINT uMode, LPCLSID lpHandler );
static int (_stdcall *pAVIFileGetStream)( PAVIFILE pfile, PAVISTREAM *ppavi, DWORD fccType, LONG lParam );
static int (_stdcall *pAVIStreamReadFormat)( PAVISTREAM pavi, LONG lPos,LPVOID lpFormat, LONG *lpcbFormat );
static long (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
static int (_stdcall *pAVIStreamStart)( PAVISTREAM pavi );
static dword (_stdcall *pAVIFileRelease)( PAVIFILE pfile );
static void (_stdcall *pAVIFileInit)( void );
static void (_stdcall *pAVIFileExit)( void );
@@ -75,7 +77,7 @@ static dllfunc_t avifile_funcs[] =
{ "AVIFileExit", (void **) &pAVIFileExit },
{ "AVIFileGetStream", (void **) &pAVIFileGetStream },
{ "AVIFileInit", (void **) &pAVIFileInit },
{ "AVIFileOpenA", (void **) &pAVIFileOpen },
{ "AVIFileOpenW", (void **) &pAVIFileOpenW },
{ "AVIFileRelease", (void **) &pAVIFileRelease },
{ "AVIStreamGetFrame", (void **) &pAVIStreamGetFrame },
{ "AVIStreamGetFrameClose", (void **) &pAVIStreamGetFrameClose },
@@ -90,7 +92,7 @@ static dllfunc_t avifile_funcs[] =
};
dll_info_t avifile_dll = { "avifil32.dll", avifile_funcs, false };
typedef struct movie_state_s
{
qboolean active;
@@ -99,17 +101,17 @@ typedef struct movie_state_s
PAVIFILE pfile; // avi file pointer
PAVISTREAM video_stream; // video stream pointer
PGETFRAME video_getframe; // pointer to getframe object for video stream
long video_frames; // total frames
long video_xres; // video stream resolution
long video_yres;
int video_frames; // total frames
int video_xres; // video stream resolution
int video_yres;
float video_fps; // video stream fps
PAVISTREAM audio_stream; // audio stream pointer
WAVEFORMAT *audio_header; // audio stream header
long audio_header_size; // WAVEFORMAT is returned for PCM data; WAVEFORMATEX for others
long audio_codec; // WAVE_FORMAT_PCM is oldstyle: anything else needs conversion
long audio_length; // in converted samples
long audio_bytes_per_sample; // guess.
int audio_header_size; // WAVEFORMAT is returned for PCM data; WAVEFORMATEX for others
int audio_codec; // WAVE_FORMAT_PCM is oldstyle: anything else needs conversion
int audio_length; // in converted samples
int audio_bytes_per_sample; // guess.
// compressed audio specific data
dword cpa_blockalign; // block size to read
@@ -251,7 +253,7 @@ qboolean AVI_ACMConvertAudio( movie_state_t *Avi )
return true;
}
qboolean AVI_GetVideoInfo( movie_state_t *Avi, long *xres, long *yres, float *duration )
qboolean AVI_GetVideoInfo( movie_state_t *Avi, int *xres, int *yres, float *duration )
{
if( !Avi->active )
return false;
@@ -269,7 +271,7 @@ qboolean AVI_GetVideoInfo( movie_state_t *Avi, long *xres, long *yres, float *du
}
// returns a unique frame identifier
long AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
int AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
{
if( !Avi->active )
return 0;
@@ -277,15 +279,7 @@ long AVI_GetVideoFrameNumber( movie_state_t *Avi, float time )
return (time * Avi->video_fps);
}
long AVI_GetVideoFrameCount( movie_state_t *Avi )
{
if( !Avi->active )
return 0;
return Avi->video_frames;
}
long AVI_TimeToSoundPosition( movie_state_t *Avi, long time )
int AVI_TimeToSoundPosition( movie_state_t *Avi, int time )
{
if( !Avi->active || !Avi->audio_stream )
return 0;
@@ -295,7 +289,7 @@ long AVI_TimeToSoundPosition( movie_state_t *Avi, long time )
}
// gets the raw frame data
byte *AVI_GetVideoFrame( movie_state_t *Avi, long frame )
byte *AVI_GetVideoFrame( movie_state_t *Avi, int frame )
{
LPBITMAPINFOHEADER frame_info;
byte *frame_raw;
@@ -382,9 +376,9 @@ qboolean AVI_SeekPosition( movie_state_t *Avi, dword offset )
}
// get a chunk of audio from the stream (in bytes)
long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long length )
int AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, int offset, int length )
{
long result = 0;
int result = 0;
int i;
// zero data past the end of the file
@@ -392,7 +386,7 @@ long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long l
{
if( offset <= Avi->audio_length )
{
long remaining_length = Avi->audio_length - offset;
int remaining_length = Avi->audio_length - offset;
AVI_GetAudioChunk( Avi, audiodata, offset, remaining_length );
@@ -422,12 +416,12 @@ long AVI_GetAudioChunk( movie_state_t *Avi, char *audiodata, long offset, long l
result = 0;
// seek to correct chunk and all that stuff
if( !AVI_SeekPosition( Avi, offset ))
if( !AVI_SeekPosition( Avi, offset ))
return 0; // don't continue if we're waiting for the play pointer to catch up
while( length > 0 )
{
long blockread = Avi->cpa_conversion_header.cbDstLengthUsed - Avi->cpa_blockpos;
int blockread = Avi->cpa_conversion_header.cbDstLengthUsed - Avi->cpa_blockpos;
if( blockread <= 0 ) // read next
{
@@ -490,8 +484,9 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
{
BITMAPINFOHEADER bmih;
AVISTREAMINFO stream_info;
long opened_streams = 0;
int opened_streams = 0;
LONG hr;
wchar_t pathBuffer[MAX_PATH];
// default state: non-working.
Avi->active = false;
@@ -500,8 +495,15 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
// can't load Video For Windows :-(
if( !avi_initialized ) return;
// convert to wide char
if( MultiByteToWideChar( CP_UTF8, 0, filename, -1, pathBuffer, ARRAYSIZE( pathBuffer )) <= 0 )
{
Con_DPrintf( S_ERROR "filename buffer limit exceeded\n" );
return;
}
// load the AVI
hr = pAVIFileOpen( &Avi->pfile, filename, OF_SHARE_DENY_WRITE, 0L );
hr = pAVIFileOpenW( &Avi->pfile, pathBuffer, OF_SHARE_DENY_WRITE, 0L );
if( hr != 0 ) // error opening AVI:
{
@@ -534,7 +536,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
Avi->video_stream = Avi->audio_stream = NULL;
// open the streams until a stream is not available.
// open the streams until a stream is not available.
while( 1 )
{
PAVISTREAM stream = NULL;
@@ -557,7 +559,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
}
else if( stream_info.fccType == streamtypeAUDIO && Avi->audio_stream == NULL && load_audio )
{
long size;
int size;
Avi->audio_stream = stream;
@@ -570,7 +572,7 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
Avi->audio_codec = Avi->audio_header->wFormatTag;
// length of converted audio in samples
Avi->audio_length = (long)((float)stream_info.dwLength / Avi->audio_header->nAvgBytesPerSec );
Avi->audio_length = (int)((float)stream_info.dwLength / Avi->audio_header->nAvgBytesPerSec );
Avi->audio_length *= Avi->audio_header->nSamplesPerSec;
if( Avi->audio_codec != WAVE_FORMAT_PCM )
@@ -584,17 +586,17 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
}
else Avi->audio_bytes_per_sample = Avi->audio_header->nBlockAlign;
Avi->audio_length *= Avi->audio_bytes_per_sample;
}
}
else
{
pAVIStreamRelease( stream );
}
}
// display error message-stream not found.
// display error message-stream not found.
if( Avi->video_stream == NULL )
{
if( Avi->pfile ) // if file is open, close it
if( Avi->pfile ) // if file is open, close it
pAVIFileRelease( Avi->pfile );
if( !Avi->quiet )
Con_DPrintf( S_ERROR "couldn't find a valid video stream.\n" );
@@ -612,9 +614,9 @@ void AVI_OpenVideo( movie_state_t *Avi, const char *filename, qboolean load_audi
}
bmih.biSize = sizeof( BITMAPINFOHEADER );
bmih.biPlanes = 1;
bmih.biPlanes = 1;
bmih.biBitCount = 32;
bmih.biCompression = BI_RGB;
bmih.biCompression = BI_RGB;
bmih.biWidth = Avi->video_xres;
bmih.biHeight = -Avi->video_yres; // invert height to flip image upside down
@@ -656,7 +658,7 @@ movie_state_t *AVI_LoadVideo( const char *filename, qboolean load_audio )
// open cinematic
Q_snprintf( path, sizeof( path ), "media/%s", filename );
COM_DefaultExtension( path, ".avi" );
COM_DefaultExtension( path, ".avi", sizeof( path ));
fullpath = FS_GetDiskPath( path, false );
if( FS_FileExists( path, false ) && !fullpath )
@@ -729,4 +731,5 @@ void AVI_Shutdown( void )
Sys_FreeLibrary( &msvfw_dll );
Sys_FreeLibrary( &msacm_dll );
avi_initialized = false;
}
}
#endif // _WIN32

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