Gleb Mazovetskiy
f22d1d0149
Remove uses of deprecated codecvt
...
codecvt is deprecated in C++17 and we don't really need all of its heavy
machinery for simply converting to UTF-8.
4 years ago
Gleb Mazovetskiy
9d2948c782
Loading screen: Free the background early
...
Frees the background after blitting it once in the loading screen.
This gives the game more RAM for the actual loading.
4 years ago
Gleb Mazovetskiy
ede7eab7e8
Fix `-wnarrowing` from `SDL_Rect` construction
4 years ago
Gleb Mazovetskiy
1fc8ecb6f6
Add fmt::runtime annotations for C++20 support
...
`fmt` requires non-contexpr format string arguments to be wrapped in
`fmt::runtime` in C++20.
4 years ago
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
4 years ago
staphen
421a7772b4
Fix error that produces broken character at end of UTF8 string
4 years ago
staphen
695851666e
Fix crash when switching to English
4 years ago
Gleb Mazovetskiy
99d490180c
Settings: Add Resampler
...
Makes the resampler algorithm configurable from the settings menu.
4 years ago
obligaron
d86c4e5d84
Introduce GetUIRectangle() to distinguish between UI and main panel
4 years ago
obligaron
5337bf1f6a
Initialize Viewport in CalculatePanelAreas
4 years ago
Gleb Mazovetskiy
85f0802f01
printInConsole: Add string_view support
...
Also print `\r\n` instead of `\n` on Windows.
4 years ago
ephphatha
7f15aa730d
Move definition of ghMainWnd to utils/display.cpp
...
This variable is controlled/set by the code in that file, this also lets other files have more specific/relevant includes instead of the monolith that is diablo.h
4 years ago
Gleb Mazovetskiy
978bae1a15
Add a helper for loading PCX as CEL from path
4 years ago
Gleb Mazovetskiy
7b98735878
Revert "An option to RLE-compress masked art"
...
This reverts commit c884f1a354 .
Superceded by `DEVILUTIONX_CONVERT_FONTS_TO_CEL`, which offers the same
RAM reduction but without slowdown.
4 years ago
Gleb Mazovetskiy
2b161e5535
An option to convert fonts to CEL in-memory
...
Reduced RAM usage by 200 KiB with no performance drop, perhaps even an
improvement.
4 years ago
Gleb Mazovetskiy
5eeaa76a75
Move PCX code to utils/pcx.cpp
4 years ago
widelec-BB
9fdebdce7a
Fix loading tranlations on big endian platforms
4 years ago
DakkJaniels
dad46e1905
Item special effect enum ( #4129 )
4 years ago
ephphatha
adba5c4441
Add hint to avoid bugprone-use-after-move warnings
...
Makes clang (and GCC) consider item.Clear() a reinitialisation of a moved variable - see https://clang.llvm.org/extra/clang-tidy/checks/bugprone-use-after-move.html#reinitialization
4 years ago
Gleb Mazovetskiy
4cdbd358dd
Audio: Use SDL resampler where available
4 years ago
Gleb Mazovetskiy
127615c33f
Fix conversion of C-string literal to `char*`
4 years ago
Gleb Mazovetskiy
7f695c2835
Use SoundSample for music
...
Unifies audio handling between sound effects and music.
4 years ago
Anders Jenbo
34201c7881
Do not set scaling hint with out a render
4 years ago
Anders Jenbo
ce5bd1df74
Show failing line in error messages
4 years ago
Anders Jenbo
122ec0ac9d
Fix crash when switching to English
4 years ago
Gleb Mazovetskiy
1d4a7fa3a2
Fix `SoundSample::DuplicateFrom` mp3
...
Fixes #4392
4 years ago
staphen
84475f29ae
[Windows] Recreate the whole window if the renderer would otherwise freeze
4 years ago
obligaron
c6c929a90c
Remove MpqDir and use PrefPath instead.
4 years ago
Gleb Mazovetskiy
5645456537
Support MP3 playback
4 years ago
Gleb Mazovetskiy
8138121e39
Fix endianness handling in language.cpp
4 years ago
ephphatha
93068de918
Address type conversion warnings in WordWrapString
4 years ago
Bubio
57d5fd0e62
Fix #4251 macOS mouse grab issue ( #4298 )
4 years ago
ephphatha
bdf075355c
Address c4244 warning in PointerOrValue
...
This triggers a bunch of warnings in MSVC because the conversion is potentially truncating, despite never being an issue in practice...
4 years ago
Gleb Mazovetskiy
a5a8aae368
Fix underflow in `BilinearScale32`
...
Fixes funky hardware cursor colors during fade transitions.
Refs #4206
4 years ago
Bubio
036171d7ca
Fixed issue #4217
...
DPI Scale is now included in the calculation.
4 years ago
Gleb Mazovetskiy
e627fc8f10
Fix alpha blending in `BilinearScale32`
...
Fixes #4206
4 years ago
Gleb Mazovetskiy
c884f1a354
An option to RLE-compress masked art
...
Saves about 200 KiB RAM in dungeon at a large performance cost.
Almost never a good idea, except for severely RAM-constrained devices (e.g. RG99).
4 years ago
Gleb Mazovetskiy
e2dbbb3d95
CelSprite: Unify width storage
...
Reduces the size of a CelSprite by taking advantage of the fact that
16-bit pointers are aligned, so the last bit is always 0.
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
Gleb Mazovetskiy
48ff656dc0
Load monster graphics into a single buffer
...
Follow-up to a5e1fa5bbe , which loaded
the missiles into a single buffer.
4 years ago
staphen
8d5b709749
Restore default Windows audio driver (WASAPI)
4 years ago
Anders Jenbo
d11eeaa9ec
Log uninplemented plural expressions ( #4017 )
4 years ago
Gleb Mazovetskiy
a5e1fa5bbe
Load missile frames into a single buffer
...
Previously, the memory for each frame was allocated separately.
Changes it to allocate a single buffer for all the frames.
This has the following advantages:
1. Less bookkeeping overhead in the allocator.
2. Less alignment overhead (allocator results are max-aligned by default).
We can follow this up with a similar treatment for other multi-file
animations.
4 years ago
Felipe Wannmacher
8efbcf2058
Xbox One/Series support ( #3946 )
4 years ago
ephphatha
6a1091ce09
Rename Korean/Romanian translation files so they are used in fallback resolution
4 years ago
Anders Jenbo
0c109cbfb1
[touch] Update interface scaling when switching fullscreen mode
4 years ago
Anders Jenbo
6b2481a76c
Touch support on all SDL2 platforms
4 years ago
Andrew James
e1d01aad7c
Replace en_US code with en when searching for user preferred languages ( #3859 )
4 years ago
Anders Jenbo
68e5805f1b
[touch] Adjust controller position after changing resolution
...
Fixes #3791
4 years ago
Anders Jenbo
cf9b5ae79d
Split up graphics settings initializers
4 years ago