Alibek Omarov
8f207362a5
public: remove Q_sprintf, and patch all code that used it to use Q_snprintf instead
2 years ago
Alibek Omarov
824a34ee1e
engine: common: imgelib: fix declaration after statement in test code
2 years ago
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.
2 years ago
Andrey Akhmichin
9e9703e6de
engine: common: imagelib: replace va function calls.
2 years ago
fgsfds
25a1cb8ce7
Nintendo Switch support (again)
2 years ago
Alibek Omarov
aac0be1ab3
engine: imagelib: img_bmp: fully initialize local palette array
2 years ago
Alibek Omarov
49a65edfc3
engine: imagelib: img_quant: fix a bug in quantizer (thanks, @SNMetamorph for fix)
2 years ago
Alibek Omarov
ea3bfd969c
engine: imagelib: img_wad: dirty hack to fix black holes in console background images
2 years ago
Alibek Omarov
0e9106685b
engine: imagelib: img_png: fix Mem_Free on null ptr
2 years ago
Alibek Omarov
9b001987e9
engine: imagelib: fix crash when chunk length is more than file size
2 years ago
Alibek Omarov
21c898d796
engine: imagelib: validate player decal image size (max 512x512)
2 years ago
Alibek Omarov
e48b708fa6
engine: imagelib: img_png: validate image size through common engine function
2 years ago
Alibek Omarov
ccf7619ae5
engine: imagelib: refactor image loading function
2 years ago
Andrey Akhmichin
7bb994f7bc
engine: common: imagelib: img_png.c: fix wrong palette decoding.
2 years ago
Alibek Omarov
c61442e960
engine: imagelib: simplify string operation
2 years ago
SNMetamorph
49fc6143ab
engine: common: imagelib: fixed loading 32 bits per pixel BMP files
2 years ago
SNMetamorph
8717843333
engine: common: imagelib: fixed BMP files estimate size calculation with NPOT textures
2 years ago
SNMetamorph
f6d8996968
engine: common: imagelib: added missed BMP compression type macros
2 years ago
Andrey Akhmichin
d237114962
engine: common: imagelib: img_png.c: unroll loops.
2 years ago
Andrey Akhmichin
fd152e82e8
engine: common: imagelib: img_png.c: add support for indexed and grayscale PNG images.
2 years ago
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
2 years ago
Andrey Akhmichin
87ce35b32d
engine: common: imagelib: img_utils.c: change formats priority.
3 years ago
Alibek Omarov
36cec298c2
Revert "engine: common: imagelib: img_tga.c: fix broken tga flip."
...
This reverts commit 99de598ea4
.
3 years ago
Alibek Omarov
6199426e5e
Revert "engine: common: imagelib: img_tga.c: fix broken tga flip again."
...
This reverts commit e5720cf8b9
.
3 years ago
Andrey Akhmichin
e5720cf8b9
engine: common: imagelib: img_tga.c: fix broken tga flip again.
3 years ago
Andrey Akhmichin
99de598ea4
engine: common: imagelib: img_tga.c: fix broken tga flip.
3 years ago
SNMetamorph
cd2720ba81
engine: common: imagelib: fixed loading BMP files with v4/v5 headers
3 years ago
SNMetamorph
6473efa995
engine: added support for BC7 and BC6H compression formats of DDS textures
3 years ago
Alibek Omarov
5aa6bfee85
engine: first attempts on fuzzing the engine
3 years ago
Alibek Omarov
4f89288ccf
common: cleanup port.h
3 years ago
Alibek Omarov
e0efe0aa23
engine: remove emboss filter. There seems no real use for it.
3 years ago
Alibek Omarov
fe0da74e75
engine: fix build with tests on
3 years ago
Alibek Omarov
91ee9bd32a
engine: merge tests for imagelib
4 years ago
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)
4 years ago
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:]]\+$//' {} \+
```
4 years ago
Alibek Omarov
61fe9fd1fe
engine: fix some left shifts on signed integers
4 years ago
Andrey Akhmichin
c53985c0bc
engine: common: imagelib: img_tga.c: refactor Targa encoder.
4 years ago
Andrey Akhmichin
e69956c9ea
engine: common: imagelib: img_png.c: set IMAGE_HAS_ALPHA flag only for RGBA images.
5 years ago
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
5 years ago
Alibek Omarov
a641488b98
engine: imagelib: img_bmp: add paranoid checks for estimated file size to not exceed real buffer. Needs proper testing.
5 years ago
Alibek Omarov
46b0590e4e
engine: imagelib: refactor to use stdint.h definitions, use spaces for alignment instead of tabs
5 years ago
lewa_j
deb7591d1e
Fix SaveBMP
5 years ago
Andrey Akhmichin
248c8a745c
engine: common: imagelib: split imagelib.h.
5 years ago
Andrey Akhmichin
e96ea719d5
engine: common: imagelib: use rgba_t as RGBA palette type.
5 years ago
nillerusr
4021d7bf5c
imagelib: fix unaligned access
5 years ago
Andrey Akhmichin
e3b547c8a9
public: rename mathlib to xash3d_mathlib.
5 years ago
Andrey Akhmichin
01e2ea24da
engine: common: imagelib: img_png.c: add a missing return statement.
5 years ago
Andrey Akhmichin
f5783ae1df
engine: common: imagelib: img_tga.c: check pixel type before buffer allocation.
5 years ago
mittorn
2b90790071
network: add stub for systems without BSD sockets, WATTCP support
5 years ago
Alibek Omarov
0fe18ae6dc
engine: fix -Wmaybe-uninitialized
5 years ago