12 Commits

Author SHA1 Message Date
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
ae388ef965
don't discard events in TXT_GetChar (#1621)
* keep only SDL_CONTROLLERDEVICEADDED and SDL_CONTROLLERDEVICEREMOVED
2024-03-29 09:26:58 +07: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
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
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
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
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