Gleb Mazovetskiy
7b0558146e
Async load: Handle errors
1 year ago
Eric Robinson
6396af1ff5
Cleanup panel code (Part 2) ( #7421 )
2 years ago
Eric Robinson
8970eaa410
Cleanup panel code (Part 1) ( #7417 )
...
HPPer changed from 80 to 81. The globes have 81 rows of pixels that can be filled.
2 years ago
Gleb Mazovetskiy
e5881688f4
`text_render`: Replace optional args with struct
...
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.
With a struct, there is no need to specify the default values
for the args in between.
2 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
14540164a7
Remove utils/stdcompat/optional.hpp
3 years ago
Gleb Mazovetskiy
5bf0b8bc96
Add more missing <cstdint> includes
...
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
3 years ago
ephphatha
829d6b0d4a
address clang-format violations
3 years ago
ephphatha
2ce420425e
Remake talkbutton.clx as a sheet of two sprites
3 years ago
ephphatha
a9f9e2b451
Unroll loop for building alt button states to allow optimising talkbutton.clx
3 years ago
Gleb Mazovetskiy
c351acbf7e
Remove redundant devilutionx.mpq check
...
We now check it only once in `CheckArchivesUpToDate`.
We then use `LoadClx` instead of `LoadOptionalClx` throughout.
4 years ago
Gleb Mazovetskiy
d71a54dba8
Render main panel buttons as CLX
...
Converted with:
```
pcx2clx --num-sprites 3 data/talkbutton.pcx && rm data/talkbutton.pcx
```
Sizes:
```
Surface(63, 114) -> CLX 7296 -> 5336 -26.9%
Surface(53, 48) -> CLX 2688 -> 2324 -13.5%
```
4 years ago
Gleb Mazovetskiy
609b711d32
Render char panel as CLX
...
Converted with:
```
pcx2clx --num-sprites 6 data/panel8bucp.pcx && rm data/panel8bucp.pcx
```
Size: 112640 -> 93215 bytes, -17.2%
4 years ago
Gleb Mazovetskiy
17a97450bc
Convert assets to CLX
...
Converted using the following commands:
```
cd Packaging/resources/assets
pcx2clx --transparent-color 1 --num-sprites 256 fonts/*.pcx && rm fonts/*.pcx
pcx2clx --num-sprites 2 ui_art/dvl_but_sml.pcx && rm ui_art/dvl_but_sml.pcx
pcx2clx --transparent-color 1 data/hintbox.pcx data/hintboxbackground.pcx && rm data/hintbox.pcx data/hintboxbackground.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/hinticons.pcx && rm data/hinticons.pcx
pcx2clx --num-sprites 2 data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx && rm data/panel8buc.pcx data/dirtybuc.pcx data/dirtybucp.pcx
pcx2clx --transparent-color 1 data/healthbox.pcx && rm data/healthbox.pcx
pcx2clx --transparent-color 1 --num-sprites 6 data/resistance.pcx && rm data/resistance.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/monstertags.pcx && rm data/monstertags.pcx
pcx2clx --transparent-color 1 data/stash.pcx && rm data/stash.pcx
pcx2clx --transparent-color 1 --num-sprites 5 data/stashnavbtns.pcx && rm data/stashnavbtns.pcx
pcx2clx **/*.pcx && rm **/*.pcx
git checkout master -- ui_art/black_diablo.pcx ui_art/black_hellfire.pcx data/charbg.pcx data/talkbutton.pcx data/panel8bucp.pcx
rm ui_art/black_diablo.clx ui_art/black_hellfire.clx data/charbg.clx data/talkbutton.clx data/panel8bucp.clx
```
4 years ago
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.
4 years ago
Gleb Mazovetskiy
8ca71272b8
Load all CEL as CL2
...
Convert CEL files to CL2 at load time. CL2 format is more efficient and is about as fast to render.
CEL vs CL2 sizes, on dLvl 5: https://gist.github.com/glebm/9bbdd76962abcd4fd2405ecd3379af97
Memory:
* Peak memory (while loading): -300 KiB
* Memory in-game (dLvl5): -700 KiB
* RG99 binary size: -15 KiB (1333096 -> 1317192)
Performance on rg99:
* On average, -1 FPS in town.
* Same FPS in dungeon (20 FPS on dLvl 1).
4 years ago
obligaron
bc15bdf3a9
Remove PANEL_ defines and replace them with GetMainPanel()
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
Anders Jenbo
704a04ae4d
Add support for Unicode fonts
5 years ago
qndel
0569dba547
fix typos
5 years ago
Anders Jenbo
7771a08d03
Translatable mainpanel
5 years ago