Gleb Mazovetskiy
720d210d95
utils/mpq* -> mpq/*
4 years ago
Gleb Mazovetskiy
23406b6fc5
Replace mpqapi.h with the MpqWriter class
...
This is a cleanup, heading in the direction of allowing us to reuse
some of the code between reading and writing MPQs.
4 years ago
Gleb Mazovetskiy
c3d2d7e3cb
Move LoggedFStream to its own file
4 years ago
Gleb Mazovetskiy
4ee81f805f
OpenDingux: Minor fixes
4 years ago
Gleb Mazovetskiy
63dd136e6a
Disable RLE compression for PCX surfaces
...
With 1.3.0, we switched from CEL to PCX for fonts.
This resulted in significant performance drops when rendering lots of
text, because SDL RLE implementation is not as optimized as our CEL
implementation.
Disabling RLE significantly reduces the performance drop.
The font surfaces are fairly small, so we do not lose out much on RAM.
The menu surfaces are also PCX, so the RAM usage there is
greater, but the game itself uses a lot more RAM than the menu anyway.
Thanks to @AJenbo for discovering the RLE flag as the root cause
of font rendering performance issues!
4 years ago
Gleb Mazovetskiy
e9a9daa794
DrawString: Stop allocating
...
Switch to a state-machine UTF-8 decoder from the branchless one.
This allows us to avoid copying the string on every `DrawString` call.
4 years ago
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG ( #3135 )
4 years ago
Gleb Mazovetskiy
3d308983a8
Migrate to libmpq
...
libmpq is a much simpler alternative to StormLib for reading MPQ archives.
We use our own fork of libmpq: https://github.com/diasurgical/libmpq
Impact:
* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
4 years ago
staphen
5e49d08ba5
Close SDL_RWops in LoadPNG()
4 years ago
staphen
b5d96665c9
Enable SDL1 build option for Windows
4 years ago
staphen
7782621ee4
Close SDL_RWops in LoadPNG()
4 years ago
Anders Jenbo
f1efc205ff
Add support for Romanian plural forms
4 years ago
qndel
8b0808bd4a
fix error spam
4 years ago
Gleb Mazovetskiy
a97ffd1640
Load MPQ file overrides without StormLib
...
Also logs the overrides in verbose mode.
4 years ago
Gleb Mazovetskiy
7d91bc461a
Improve asset file opening
...
Avoid wrapping asset files via StormLib, open them directly via SDL
instead.
4 years ago
Anders Jenbo
3b229a8275
Check for translation in the same place as they are loaded from
4 years ago
Gleb Mazovetskiy
3448eab2d3
Translations: Restore support for ".mo" files
...
Note that they now need to go into the "assets/" subdirectory of the
build directory.
4 years ago
Gleb Mazovetskiy
5e675dcd6a
Handle translations like other assets
...
Load translations from the MPQ or the assets directory, same as we do
with other DevilutionX assets.
4 years ago
Gleb Mazovetskiy
8e5b18378c
SDL1: Fix `SDL_RWsize` backport
...
Subtract start position from the end position instead of assuming the
end position is 0.
4 years ago
Anders Jenbo
b2b7f51ce0
Implement SDL_RWsize for SDL1.2
4 years ago
Anders Jenbo
8df5912dc6
Always use SDL wrapper for file access
4 years ago
Anders Jenbo
f77d0b3665
Close translation-file handler
4 years ago
Anders Jenbo
d88a8f401f
Fix parsing of translation file header
4 years ago
Anders Jenbo
dd5ec18ca7
Remove dead code from translation parser
4 years ago
Anders Jenbo
af046864de
Properly handle plural forms for Czech and Polish
4 years ago
ephphatha
a13cb6ec7e
Providing a basic template specialisation approach to using enums as flags only for certain types.
...
Now hopefully works with GCC 6?
4 years ago
Anders Jenbo
50c65abec0
Word wrap text in main menu dialogs
4 years ago
staphen
fd2f0e3f0d
Validate gamepad button count
4 years ago
obligaron
a532d0fc21
Introduce paths::AppPath
4 years ago
Bernd Stellwag
0e8ca7121f
change http links to https where possible
5 years ago
Gleb Mazovetskiy
0c694edaba
WordWrapString: Wrap on punctuation
...
Useful for Chinese and Japanese, which do not have spaces between words,
nor whitespace after punctuation.
5 years ago
Anders Jenbo
4dd8b121ec
Replace TTF with PCX font
5 years ago
Anders Jenbo
70cff81547
Implement backspace for UTF-8 strings
5 years ago
Anders Jenbo
958087ab86
Switch TTF render to UTF-8
5 years ago
Anders Jenbo
704a04ae4d
Add support for Unicode fonts
5 years ago
Anders Jenbo
671fdbd125
Implement contextural translation (pgettext)
...
Fixes #2369
Fixes #2790
5 years ago
Gleb Mazovetskiy
55b49bfea4
Simplify unique info window drawing
...
1. Use `BlitFrom` instead of a custom loop for drawing the divider line.
2. De-duplicate position calculation.
5 years ago
staphen
60492ef954
Add proper graphics for gamepad
5 years ago
Vladimir Olteanu
bcd7f89319
Have SDLWrap::AllocPalette allocate space for 256 colors by default
5 years ago
Vladimir Olteanu
3cb70f5042
Simplify SDLWrap with NonNull
5 years ago
Vladimir Olteanu
b87058a717
Error checking for GetOutputSurface
5 years ago
Vladimir Olteanu
d4d89077cd
Don't free PalSurface when it was obtained from SDL_GetVideoSurface
5 years ago
Vladimir Olteanu
4edafd2e37
Make RendererTextureSurface a SDLSurfaceUniquePtr
5 years ago
Vladimir Olteanu
aab7bf6e91
Make Palette a unique ptr
5 years ago
Vladimir Olteanu
d226885672
Introduce SDLWrap::AllocPalette
5 years ago
Vladimir Olteanu
4a9ebf1460
Use SDLUniquePtr
5 years ago
Vladimir Olteanu
cc9ea97e0f
Introduce SDLWrap::CreateTexture
5 years ago
Vladimir Olteanu
e9063c578f
Introduce SDLWrap::CreateRGBSurfaceWithFormatFrom
5 years ago
Vladimir Olteanu
b853559573
Make CreateFileStream return optional, rather than unique_ptr
5 years ago
Anders Jenbo
ce66aea070
Optimize masked Art blitting
5 years ago