Gleb Mazovetskiy
3b03dd33cc
🧹 LoadRndLvlPal: Minor cleanup
5 years ago
Anders Jenbo
bfc510fb23
Clean up automap.cpp
5 years ago
Gleb Mazovetskiy
ff7fdd2848
🐞 Fix spellbook rendering crash in hellfire
...
Fixes a bug introduced in #1796
Frame numbers are 1-based and there are 6, not 5 frames there.
5 years ago
Gleb Mazovetskiy
987ab2533b
🐞 Synchronize SFileReadFile access
...
StormLib read function is not thread-safe: https://github.com/ladislav-zezula/StormLib/issues/175
5 years ago
thebigMuh
24f32a1d53
Fix sound volume/panning attenuation ( #1789 )
...
* Fixing volume adjustment and scaling
5 years ago
Anders Jenbo
3f891a4333
🌐 Correctly handle two more plural translation
5 years ago
Gleb Mazovetskiy
9980b77d23
🐞 ClearDuplicateSounds: Also lock the mutex
5 years ago
Anders Jenbo
23cec61f15
🎨 Mark Points returned by GetTargetPosition as const
5 years ago
Anders Jenbo
bab52c0237
♻️ Clean up CreateDoorType
...
Apply early returns
5 years ago
Anders Jenbo
72bed0709c
♻️ Remove some magic numbers form appfat
5 years ago
Anders Jenbo
654a2b8834
♻️ Clean up automap code
...
Use Point for x,y pairs. Make helpers for drawing door and squares
5 years ago
Gleb Mazovetskiy
559229dea1
🐞 Duplicate sounds: Fix data race
...
This fixes a data race by deleting the sound exactly when it finishes
playing.
Previously, a data race could happen in
`CleanupFinishedDuplicateSounds`, where the sound would be destroyed
while Aulib was reading from its buffer.
5 years ago
Gleb Mazovetskiy
58b805cf47
🐞 Fix data race in PushAulibDecoder
...
Fixes #1832
5 years ago
Jmgr
4fad8023ff
Fix fmt issue with a nullptr controller mapping
5 years ago
Anders Jenbo
5b474b4781
Enable warnings for MSVC builds
...
Also, fix warnings related to DVL_PRINTF_ATTRIBUTE
5 years ago
Gleb Mazovetskiy
0bfc147b78
🧹 Remove `DiabloAllocPtr` and friends ( #1824 )
5 years ago
Jonathan Mercier-Ganady
4274cc6f1f
Log format errors as critical and call app_fatal to terminate
5 years ago
Vladimir Olteanu
d9a4ff8729
Use std::string_view for towners' names ( #1750 )
5 years ago
Gleb Mazovetskiy
f33f7ae7eb
💨 Do not zero-initalize arrays we write to
...
`std::make_unique<T[]>(size)` always zero-initalizes the array.
C++20 has `std::make_unique_for_overwrite` to avoid that, while
older C++ versions can use the approach applied here.
5 years ago
Anders Jenbo
b177f77d21
🎨 Cleanup language.cpp
5 years ago
Anders Jenbo
d83fa8edb3
🌐 Apply plural translation where applicable
5 years ago
thebigMuh
cab62a7dbf
Load item graphics early so they are available for hero selection
5 years ago
Gleb Mazovetskiy
34b4ed759a
🐞 Clean up and fix inventory sprite handling
5 years ago
Gleb Mazovetskiy
5820948761
♻️ Make `SFileRw` own the Storm file handle
...
All of our use-cases for `SDL_RWops` Storm file require closing the file
when closing the `SDL_RWops` -- doing this automatically simplifies the
code.
5 years ago
Gleb Mazovetskiy
8e634ff02c
♻️ Remove `_iAnimWidth`
...
No longer needed as of #1796
We could probably go further and not expose `ItemAnimWidth`,
but it'd be dangerous because sometimes `_iAnimData` is null.
5 years ago
Gleb Mazovetskiy
0b18b8977b
🐞 items.cpp: Fix nullopt access
...
A better fix would probably be to not call this function in the first
place before the graphics are loaded.
5 years ago
Gleb Mazovetskiy
3d03990cb8
♻️ Replace `SBmpLoadImage` with a simpler method
...
The new approach only makes 2 read calls and does not do any seeks.
It is also less general and is internal to `art.cpp`, allowing us to
simplify it somewhat.
5 years ago
Anders Jenbo
93f9b852a2
🐛 Do not stop music when calling sound_stop()
...
Fixes #1782
5 years ago
Gleb Mazovetskiy
7bdfb0655c
🐞 Support multiple playback of the same sound
5 years ago
Anders Jenbo
22d7d41615
🌐 Fix remaning plural form of gold related texts
5 years ago
Gleb Mazovetskiy
c770ae676f
🎉 Stream videos on Linux and FreeBSD
...
Previously, we always loaded entire videos in memory before playing them.
`libsmacker` does not provide a streaming API but it does provide a
`FILE *` file pointer API.
We now take advantage of the `FILE *` API by streaming the videos on
platforms that support `fopencookie`.
This means faster startup and less memory usage on these platforms.
5 years ago
Gleb Mazovetskiy
63e0e60956
Add `MeasureSolidHorizontalBounds`
...
Adds a function to measure the X-coordinates of the solid
(non-transparent) bounding box of a CEL.
5 years ago
Anders Jenbo
639e94b3d6
🌐 Use plural form translation for handeling gold related texts
5 years ago
Gleb Mazovetskiy
5bb6dc928a
🌍 Add some missing /*xgettext:no-c-format*/ annotations
5 years ago
Gleb Mazovetskiy
28182ca5e3
🧹 Fix a couple more compilation warnings
5 years ago
Gleb Mazovetskiy
8257837801
🎨 Fix line endings in Source/qol/*
5 years ago
Gleb Mazovetskiy
47c93c2f9c
🧹 Fix more `-Wformat` warnings
5 years ago
Gleb Mazovetskiy
22ebebb2d1
🎨 Fix line endings in Source/qol/monhealthbar*
5 years ago
Gleb Mazovetskiy
4408ddc127
🧹 Fix some -Wformat warnings
5 years ago
Gleb Mazovetskiy
fe99f79bb0
🎨 Fix line endings in Source/qol/xpbar*
5 years ago
Gleb Mazovetskiy
052b4c12f5
♻️ LoadFileInMem: Remove `nullptr` at call sites
...
This is now the default argument, no need to provide it explicitly.
5 years ago
Gleb Mazovetskiy
1b8b62a8c2
♻️ Store CEL width with the sprite itself
...
Instead of passing the CEL sprite width when drawing, store the CEL
width at load time in the new `CelSprite` struct.
Implemented for most sprites except towners, missiles, or monsters.
5 years ago
Mathieu Maret
f4ef9de2e6
Fix Control Hit Translation
5 years ago
Mathieu Maret
dc28b7464e
Do not translate spacing
5 years ago
Mathieu Maret
e47d80f8df
Fix in-correct c-format in pot
...
Detected as c-format because of % presence
but are used as regular strcpy
checked that clang-format will not break it
5 years ago
Anders Jenbo
38d7b1e3c8
🐛 Do not utilize translations till after it has been initialize
5 years ago
Anders Jenbo
18f3a0c5ea
✨ Support for plural forms in translations
...
The implementation isn't robust, dynamic or pretty, but works for now.
5 years ago
Mathieu Maret
a87f1d8d2e
Avoid a strcpy
...
if _iIdentified is true, the first strcpy was not usefull
5 years ago
Anders Jenbo
c66604c7ad
🐛 Do not render text as UTF8 for now
5 years ago
Anders Jenbo
2b7fad2a68
🐛 Do not render text as UTF8 for now
5 years ago