Commit graph

4718 commits

Author SHA1 Message Date
Denis Pauk
84cc99d559 client: center chars in ttf font 2025-03-16 00:34:03 +02:00
Denis Pauk
d91c4253e8 client: use ttf fonts in menu 2025-03-15 21:28:32 +02:00
Denis Pauk
3578d4353d Merge remote-tracking branch 'yquake2/master' 2025-03-15 13:42:36 +02:00
Yamagi
d2efa1c9af Fix (potential) problematic use cases of qboolean.
Until 853f832 qboolean was always defined as an enum. Starting with
853f832 it may be defined as bool when building in C23 mode or any
newer standard. There are subtle behavioral differences between enum
and bool, fix these:

* The enum has int as underlying type, floats are cut down to the
  nearest int. Thus 0.5f becomes false. With bool everything which
  is not 0 becomes true. Gone through the code and made sure that
  there are no float to qboolean type conversions.
* Always use true and false, not something else like 1 and 0 or
  (when building under Windows) TRUE and FALSE.
* Fix some corner cases where integers >1 where missused as true.
  These should be noops.
* Fix `R_GreyscaledLight()` misusing qboolean for returning int.

Partly based upon yquake2/yquake2remaster@e3c8d26

Closes #1191
2025-03-15 11:50:37 +01:00
Yamagi
989c30e31d
Merge pull request #1192 from runlevel5/patch-1
Add header for strcasecmp()
2025-03-15 09:49:01 +01:00
Yamagi
27c412055e
Merge pull request #1190 from efliks/fix-build-failed-missing-limits
Fix missing limits header in SDL2 and SDL3 input modules
2025-03-15 09:48:44 +01:00
Denis Pauk
e3c8d26760 fix c23 warnings
https://github.com/yquake2/yquake2/issues/1191
2025-03-14 00:39:43 +02:00
efliks
294d162b06 Include limits in sdl3.c 2025-03-12 01:08:03 +01:00
Trung Lê
1ed01b3033
Add header for strcasecmp() 2025-03-11 23:33:32 +11:00
efliks
6d814f6c41 Fix missing limits header in SDL2 module 2025-03-09 12:54:20 +01:00
Denis Pauk
26624ab90f game: integrate to game code 2025-03-08 12:37:24 +02:00
Denis Pauk
be2fa70e4d Add jabot code
Based on:
  https://www.moddb.com/mods/jabotq2/downloads/jabot-q2-v09x-win32-and-linux

Copyright 2001-2004 Pat AfterMoon
Copyright 2001 Steve Yeager
2025-03-08 12:10:09 +02:00
Denis Pauk
3e66c9d1fb server: fix send player name in multiplayer game 2025-03-06 23:49:44 +02:00
Denis Pauk
e8984c25f3 console overflow message cleanup 2025-03-06 00:40:53 +02:00
Denis Pauk
f833e24da6 Update readme 2025-03-02 23:06:51 +02:00
Denis Pauk
6755ecf590 gl4: add support of ttf fonts 2025-03-02 15:44:53 +02:00
Denis Pauk
7c768b7587 gl3: add support of ttf fonts 2025-03-02 15:19:40 +02:00
Denis Pauk
82ceca620b gl1, vk: share ttf font code 2025-03-02 12:07:16 +02:00
Denis Pauk
d0e8c83687 vk,gl1: improve font image generation
Change threshold of image transparncy.
2025-03-02 11:22:58 +02:00
Denis Pauk
0bbbf27b23 gl1: support ttf fonts 2025-03-02 00:53:30 +02:00
Denis Pauk
c1689345f4 Merge remote-tracking branch 'yquake2/master' 2025-03-01 22:27:13 +02:00
Yamagi
474dfcb524
Merge pull request #1186 from BjossiAlfreds/door-use-fix
Fixed doors not being usable with NULL activator
2025-03-01 16:51:58 +01:00
Yamagi
eb5a9a15d8 Rename CHAR_WIDTH to CHARACTER_WIDTH.
For some time glibc has defined a macro with the same name in limits.h.
Avoid the warning by renaming our macro.
2025-03-01 13:31:36 +01:00
Yamagi
853f832cbd Fix build with gcc in C23 mode.
I wonder why this didn't give at least a warning in C11 mode. The
pointer missmatched, regardless which C standard we are following.
2025-03-01 12:31:10 +01:00
Yamagi
049784f0df Use build-in bool type when building with C23. 2025-03-01 12:28:57 +01:00
Yamagi
b57de78150 Revert "Force C standard to gnu99 in cmake builds."
This was wrong. For yquake2 the Makefile hasn't forced a C standard
since commit 3a9b8de in 2023.
2025-03-01 12:18:52 +01:00
Denis Pauk
579af5515b refresh: share R_LoadConsoleChars 2025-02-28 00:15:05 +02:00
Denis Pauk
cebdb35774 vk: share next utf8 symbol function 2025-02-27 23:41:57 +02:00
Denis Pauk
05eee80292 client: fix utf8 strlen center print 2025-02-26 00:16:52 +02:00
Denis Pauk
125bfbb175 vk: add initial support of r_ttffont cvar 2025-02-24 23:38:50 +02:00
Denis Pauk
ac62a89259 client: renders add stb_truetype
```
wget https://raw.githubusercontent.com/NBickford-NV/stb/refs/heads/nbickford/all-fixes/stb_truetype.h -O src/client/refresh/files/stb_truetype.h
```
2025-02-24 23:29:57 +02:00
Denis Pauk
3cd8a93432 Merge remote-tracking branch 'yquake2/master' 2025-02-24 23:28:52 +02:00
BjossiAlfreds
23a3ee0cc5 Fixed doors not being usable with NULL activator 2025-02-24 14:26:45 +00:00
Yamagi
a4e23e6fd9 Force C standard to gnu99 in cmake builds.
The Makefiles forces gnu99 since ages. Additionally gcc15 started to
default to C23 and our code doesn't (yet) build with it.
2025-02-22 11:42:27 +01:00
Denis Pauk
21f0b33379 client: move DrawStringScaled implementation to renders
Unicode strings support step #3, #12
2025-02-16 23:56:23 +02:00
Denis Pauk
4ce6f058e6 maps: remove SURF_NODRAW for non BSPX maps
Improve c3638d6c9

Based on: https://github.com/Paril/q2pro/issues/132
2025-02-16 23:18:01 +02:00
Denis Pauk
67aeeacccb client: cleanup screen code
* make functions static
* remove unused remaining in SCR_DrawCenterString,

Remaining had 9999 as initial value, message has 1024 bytes buffer
size that is much smaller that remaining.
2025-02-16 22:43:42 +02:00
Denis Pauk
8f6f3b1e3f models: fix build warnings 2025-02-16 22:19:01 +02:00
Denis Pauk
4e46f83b32 8.42RR12: Version bump 2025-02-12 23:00:28 +02:00
Denis Pauk
5ca731d1f1 SiN: dynamic allocation of sub models list in .def 2025-02-11 23:29:32 +02:00
Denis Pauk
3ba7edd995 Anachronox: update MDA load code
Support select skin by tag.

Based on:
 * https://anachrodox.talonbrave.info/models/shaders.html
2025-02-10 01:02:56 +02:00
Denis Pauk
a33d6b091d Anachronox: cleanup ATD load code 2025-02-10 00:35:48 +02:00
Denis Pauk
3f74954db6 Merge remote-tracking branch 'yquake2/master' 2025-02-10 00:34:31 +02:00
Denis Pauk
3d3e7e9c98 soft: fix build with SDL3 2025-02-10 00:28:07 +02:00
Yamagi
404450d186 Add a CI build for Linux/aarch64.
It's called aarch64 instead of arm64 because that is what we are using
as internal architecture descriptor in savegames, etc.
2025-02-09 11:15:24 +01:00
Yamagi
b607eb4d42 Rename linux.yml to linux_amd64.yml in favor to upcoming aarch64 build. 2025-02-09 11:14:47 +01:00
Yamagi
ec18568bd7 Make clear that the Win64 build is SDL3 instead of SDL2. 2025-02-09 11:07:11 +01:00
Yamagi
4b18825805
Merge pull request #1184 from 0lvin/partial_fix_stb
sdl3: Fix memory leak in IN_Controller_Init
2025-02-09 11:06:08 +01:00
Yamagi
aa43b2df8c Update CI to use 4 CPUs on Linux and Windows. 2025-02-09 10:58:58 +01:00
Denis Pauk
971b2d1360 sdl3: Fix memory leak in IN_Controller_Init
Detected by ASAN=1
Build Win64-SDL3 as part of github actions
2025-02-09 00:58:00 +02:00