27 Commits

Author SHA1 Message Date
ceski
7530deae79
Free/destroy SDL video resources on shutdown (#2259)
* Rename `disable_endoom` to `fast_exit`

* Rename `D_AllowQuitSound` to `D_QuitSoundEnabled`

* Add separate `D_EndDoomEnabled` function

* Move all ENDOOM checks to `D_AllowEndDoom`

* Free/destroy SDL video resources on shutdown

* Simplify
2025-05-07 22:13:18 -07:00
Roman Fomin
6afcfb206e
fix sdl2_compat build (#2173) 2025-01-31 12:13:57 +07:00
ceski
f19b16b2ae
Fix ENDOOM aspect ratio (#2006) 2024-11-09 08:20:48 -08:00
Roman Fomin
477fc429bf
linter fixes (#1719)
* use cpp-linter action

* fix header files

* disable clang-analyzer-valist checks

* remove unused values

* the value is never read from `scale`
2024-06-21 14:12:28 +07:00
Roman Fomin
1f957567a6
use compile_commands.json for Cppcheck (#1716)
* suppress memleak warnings only for u_scanner.c
2024-05-29 18:07:46 +07:00
Roman Fomin
26ce44b216
remove extern from *.c files (#1686) 2024-05-13 16:43:07 +07:00
Roman Fomin
ae388ef965
don't discard events in TXT_GetChar (#1621)
* keep only SDL_CONTROLLERDEVICEADDED and SDL_CONTROLLERDEVICEREMOVED
2024-03-29 09:26:58 +07:00
Fabian Greffrath
5de216d785
apply the non-amigaos4 specific parts of the AmigaOS4 patch (#1369)
* apply the non-amigaos4 specific parts of the AmigaOS4 patch

* move SDL_Quit() to the end of StartGame()

* replace atexit() with I_AtExit()
2024-01-04 17:41:55 +01:00
Roman Fomin
28a88c41dc
fix mouse controls in textscreen windows (#966)
SDL_RenderSetLogicalSize() automatically centers it
2023-04-02 07:47:25 +02:00
Fabian Greffrath
0daf278ce4 update copyright information for textscreen fonts 2023-03-21 11:08:23 +01:00
Fabian Greffrath
fc24be131c
render textscreen content to an upscaled intermediate texture (#944)
* render textscreen content to an upscaled intermediate texture

* scale upscaled texture only to double framebuffer size

Could you please repeat your tests with this one @liPillON ?

* only create intermediate texture for normal font, increase scaling factor to 4

* remove small and large font

* get rid of the highdpi_font, always initialize renderer with SDL_WINDOW_ALLOW_HIGHDPI

Why is this even optional?
2023-03-19 10:12:38 +01:00
Roman Fomin
a98de6d71f
textscreen updates (#872)
* Resizable textscreen windows.

* Increase the default window size to 800x600.

* Correct aspect ratio in textscreen windows.

* Remove aspect ratio correction.
2023-01-13 19:21:09 +07:00
Fabian Greffrath
36060400fa sort source files alphabetically in CMakeLists.txt files 2023-01-05 09:57:52 +01:00
Roman Fomin
eb4851dd63 fix clang-cl warnings
This is for clang in MSVC emulation mode (it's ABI compatible)
2022-12-31 14:12:35 +07:00
Fabian Greffrath
4418590510
require a C99 capable compiler (#727)
* require a C99 capable compiler

* explicitly initialize the 200 extra sounds of DEHEXTRA

* replace Long64 and ULong64 by their stdint counterparts
2022-09-11 09:09:04 +02:00
Roman Fomin
000bcd5e72
implement M_getenv for compatibility with non-Latin paths on Windows (#667)
* implement M_getenv for compatibility with non-Latin paths on Windows

* use regular wcslen

SDL_wcslen is undocumented

* fix memory leak

* cache the `wenv == NULL` case
2022-07-18 21:07:33 +07:00
Fabian Greffrath
bd62ffe056
fix gcc-12 -O3 compiler warnings (#608)
* fix gcc-12 -O3 compiler warnings

Fixes #607

* do not free stdlib malloc'ed zone memory blocks
2022-06-21 15:55:13 +02:00
Fabian Greffrath
8e2ae605a8
rename Source/ directory to src/ (#598)
* rename Source/ directory to src/

* adjust cppcheck directories
2022-06-13 12:09:42 +02:00
Roman Fomin
eec7053de3 fix gcc warnings 2022-06-02 23:37:33 +07:00
Roman Fomin
6b3c9a549a use one version of doomkeys.h 2022-06-02 23:30:11 +07:00
Roman Fomin
f99ae8ab05 implement multiplayer setup (based on Chocolate Doom) 2022-06-02 21:28:08 +07:00
Roman Fomin
30c99dd1a5
old compilers support (#400)
* better support of C89 standart

* VC6 fixes

* __pragma attribute works for _MSC_VER > 1400

* use intptr_t for char*

* C89 has no designated initializers

* correct _MSC_VER versions

* fix check

* add stdint.h for old MSVC versions

Taken from https://github.com/mattn/gntp-send/blob/master/include/msinttypes/stdint.h

* add stdint.h to miniz.h

* make packaging work without Python

* fix window_position initialization

* replace PACKED_STRUCT with i_packed_start.h i_packed_end.h

Thus, we do not use variadic macros from C99.

* undo cmake install changes

* fix icon for VC6

* remove DESCRIPTION and HOMEPAGE_URL from project()

* remove i_packed_start.h and i_packed_end.h

* whitespace fixes

* rename PACKEDPREFIX->PACKED_PREFIX and PACKEDATTR->PACKED_SUFFIX

* MINGW check doesn't work this early

* add check for minimum cmake version for MINGW targets
2021-12-29 08:41:30 +01:00
Fabian Greffrath
bd071429d9 initialize TXT_SDLWindow 2021-12-10 10:43:55 +01:00
Fabian Greffrath
8cc369dadf cosmetics 2021-12-10 10:38:23 +01:00
Fabian Greffrath
393a45492f
reuse existing renderer in TXT_Init() (#375)
instead of destroying it and creating a new one.

Fixes a crash on exit when ENDOOM is enabled.

Fixes #372, thanks @hackneyed-one.
2021-12-10 09:55:51 +01:00
Roman Fomin
2217e75e1c
integrate net_gui module from Chocolate Doom (#365)
* integrate net_gui

* fix SDL_INIT_VIDEO

* remove CheckSHA1Sums()

* fix format warning

* remove unused code

* fix net_gui exit
2021-12-07 14:49:07 +01:00
Roman Fomin
19d3ab0ae8
add ENDOOM support (from Chocolate Doom) (#184)
* add libtextscreen

* add doomkeys.h

* fix format string warnings

* delete all files unnecessary for ENDOOM

* add ENDOOM support

* show ENDOOM screen in the same window as the game

* add PWADs only option, add comments

* change PWADs->PWAD
2021-11-04 08:54:49 +01:00