Trihedraf
0987f8b479
remove windows specific code because stat works for this on windows
5 years ago
Gleb Mazovetskiy
f8a2552ac8
RemoveFile: Use DeleteFileW on Windows
5 years ago
Gleb Mazovetskiy
46742824ad
FileExists: Use PathFileExistsW on Windows
5 years ago
Gleb Mazovetskiy
adb5fa49da
🐞 Fix Windows UTF-8-to-16 conversion
...
Follow-up to #1905
5 years ago
Gleb Mazovetskiy
7ed08077f6
♻️ file_util: Cleanup Windows UTF-8-to-16 conversion
5 years ago
staphen
5483b29a31
Set 3DS scaling behavior based on FitToScreen setting.
5 years ago
Anders Jenbo
4a7ba94702
🎨 Run clang-format
5 years ago
Anders Jenbo
c11945e62b
🎨 Fix line endings
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
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
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
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
7bdfb0655c
🐞 Support multiple playback of the same sound
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
Anders Jenbo
34eecd6dac
🐛 Fix handeling of mo-file header
5 years ago
Gleb Mazovetskiy
979bedb8c2
🐞 Fix memory leaks in utils/language.{h,cpp}
...
This is a minimal refactoring to fix the memory leaks which have made
reading debug output impossible.
5 years ago
Gleb Mazovetskiy
c025bf6050
🎨 Fix line endings in utils/language.{h,cpp}
5 years ago
Anders Jenbo
f884ba5340
🔥 Remove more miniwin dependencies
5 years ago
Gleb Mazovetskiy
57172e48ed
🔨 ⚙️ CMake: Add NOSOUND option
...
This option completely disables all audio handling, including audio
loading code and dependencies.
Dialog text length is estimated to be somewhere between
Cain and Griswold speed.
5 years ago
Anders Jenbo
916a12ff3d
🐛 Fix missing sounds
...
When playing the same sound twice with in a short duration then the
sound it self, the secound request would go unfulfilled. The solution is
to simply rewind the stream pointer before requesting a playback.
5 years ago
Ivan Epifanov
e9d4c85fab
Remove vita workaround
5 years ago
Gleb Mazovetskiy
0dd9aeea69
♻️ Cleanup DISABLE_STREAMING_MUSIC handling
...
Extracts `LoadMusic` and `CleanupMusic` functions.
5 years ago
Anders Jenbo
e3526a5ff6
🌐 Convert all src to UTF8
5 years ago
Gleb Mazovetskiy
46a5dc147b
🔨 Restore GCC 5 compatibility
...
We can support this much older compiler with just these few minor
changes.
5 years ago
thebigMuh
5f288cbd43
Fixes small AC malus of less than 1 resulting in a bonus of 1 AC
5 years ago
Gleb Mazovetskiy
acee2ef14c
🎉 Switch from SDL_mixer to SDL_audiolib
...
SDL_mixer can only stream a single music track
SDL_audiolib has unlimited streams.
With this change, we finally have streaming sounds (respecting
sfx_STREAM).
Audio options can now also be set via diablo.ini, which should help us
better diagnose the static noise issues.
5 years ago
Jmgr
d4f62870b8
Remove globals from paths.h
...
Fix for Vita
Update to use free functions
Use std::optional to allow setting empty paths
Change header inclusion order
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Use std::optional to allow setting empty paths
Apply clang-format
Temporary commit
5 years ago
Jmgr
2b672289e1
Fix optional being in experimental/ with some compilers
5 years ago
Gleb Mazovetskiy
807d8528b1
🐞 Fix fmt includes "" -> <>
5 years ago
Gleb Mazovetskiy
c49de0b5f1
🎨 Source/utils/log.hpp: Fix newlines
5 years ago
John Törnblom
102ee9ead1
convert utf8 language strings to latin1
5 years ago
John Törnblom
30db9e7dd0
trim strings from language metadata
5 years ago
John Törnblom
9c61baea9f
parse translation metadata
5 years ago
John Törnblom
0be36898b9
ensure translations are null-terminated
5 years ago
Anders Jenbo
32117dc73b
🔧 Create translation template and update translations
5 years ago
Anders Jenbo
3f30b8db60
Add Danish translation and switch to IETF instead of ISO 639-1 codes
5 years ago
John Törnblom
04269dedcd
add translation macro for msgids defined in the global scope
5 years ago
John Törnblom
51e7a169a6
add initial language support using a simple MO parser
5 years ago
Jmgr
c33182d6de
Modernize deprecated headers
5 years ago
Jmgr
1b7e0d2cb3
Migrate existing log entries
5 years ago
Jmgr
ef0ca794bc
Use system libfmt by default if version >= 7.0.0
...
Allow non-strict ansi functions
Cleanup
5 years ago
Jmgr
af0ea6fdfc
Set Application as the default log category
...
Remove example of logging a container
5 years ago
Jmgr
f3a401b5f6
Add the fmt library as a dependency and add some examples
...
Attempt at fixing missing functions on some platforms
5 years ago
Anders Jenbo
7912e510f0
🎨 Clean up overuse of SDL types
5 years ago
thebigMuh
281533e82d
This fixes exclusively the panning bug, where after a certain distance is exceeded, sound samples get played without panning.
5 years ago