10 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 8f6e9810d0 SDL3: Make text_render_integration_test build
Adds support for just enough SDL3 to make `text_render_integration_test`
work.
2025-10-05 20:17:47 +01:00
Gleb Mazovetskiy d3248e969a Untangle more dependencies
This allows us to make `clx_render_benchmark` and
`text_render_integration_test` standalone.
2025-07-20 14:11:36 +01:00
Gleb Mazovetskiy dd76f17e4b Rename endian.hpp to endian_read.hpp
Following #7620, which split the write functions into a separate header.
2025-01-08 17:38:36 +09:00
Gleb Mazovetskiy 19ccf7ce88 Split endian_write from endian
Only `endian_write` functions require SDL, splitting them out
will allow us to clean up the dependencies a bit.
2025-01-08 09:50:10 +09:00
Gleb Mazovetskiy aa751ff538 Reduce CLX header size from 10 to 6
We remain compatible with the 10-byte header size,
and actually now support any header size.
2024-10-12 21:49:49 +01:00
Gleb Mazovetskiy 74755c8be7 Remove utils/stdcompat/cstddef.hpp 2023-08-14 01:54:29 +01:00
Gleb Mazovetskiy d8cd147ac7 Re-encode CL2 on load
Original Blizzard encoder is slightly less optimal than our encoder.

While size in RAM in less of a concern for the non-`UNPACKED_MPQS`
build, smaller files are faster to render.

Savings for unpacked and minified MPQs:
* diabdat.mpq: 918,311 bytes.
* hellfire.mpq: 313,882 bytes.

Example player graphics (note that only a few are loaded at any given time for single player):
* diabdat/plrgfx/warrior/: 366,564 bytes.

Example monster graphics savings:

* diabdat/monsters/skelbow: 5,391 bytes.

Based on the implementation from https://github.com/diasurgical/devilutionx-graphics-tools/pull/6
2023-07-13 01:44:16 +01:00
Gleb Mazovetskiy 9db80ef5d7 Assets: Load files directly for UNPACKED_MPQS
When using `UNPACKED_MPQS`, avoid all the SDL machinery for reading
files.

This is beneficial not only due to reduced indirection but also because
we can test for the file's existence and get the file size without
opening it, which is much faster.
2022-11-22 02:44:25 +01:00
Gleb Mazovetskiy ef46d99ccc Unify CLX pixel encoding code 2022-08-04 15:16:00 +02:00
Gleb Mazovetskiy 961866e1c4 CLX: A new graphics format
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.

This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.

Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
2022-08-03 02:38:55 +02:00