Gleb Mazovetskiy
e6a432bc5e
Add `MakeSdlRect` helper function for -Wnarrowing
5 years ago
Anders Jenbo
0227519267
Enable mouse emulation for Android
...
As a temporarly solution untill we implement a proper virtual controller
5 years ago
Vladimir Olteanu
02ffada9b8
constexpr version of abs
5 years ago
Kalebe Alves
49b21afb73
Clean up cstddef.hpp
5 years ago
Kalebe Alves
0461529176
Move byte from engine.h
5 years ago
Gleb Mazovetskiy
b76f7656f3
🧹 LoadArt: BYTE -> uint8_t
...
The change in include order necessitated a couple of other minor
cleanups, one in stubs.h and one in sdl2_to_1_2_backports.h
5 years ago
Gleb Mazovetskiy
e72def02e6
🔨 Add `STREAM_ALL_AUDIO` build setting
...
For extremely memory-constrained devices. Gets into town on RG99 (18 FPS -> 14 FPS).
5 years ago
Anders Jenbo
9e2206a673
Format code
5 years ago
Gleb Mazovetskiy
c79ec673f4
♻️ Implement std's Lockable for SDL mutex wrapper
...
Rather than rolling our own lock guard, implement the requirements for
using `std::lock_guard` et al and use that.
5 years ago
Trihedraf
2544bec7f3
Fix PWD ini check for GCC 5.5
5 years ago
Trihedraf
de3f30623b
if Writeable diablo.ini in PWD use that and save saves to PWD
5 years ago
Trihedraf
38cf99a423
Add IsWriteable to file_util.cpp
5 years ago
Anders Jenbo
34744c068f
♻️ Consitantly use %i and not %d
5 years ago
Gleb Mazovetskiy
cb9da2cadc
🎉 SDL1: An option to render directly to video mem
...
Now that we no longer have a buffer border, we can render directly to
the video memory if the output surface is 8-bit and double buffering is
enabled.
Also adds a flag to force this even when double buffering is disabled,
because some systems emulate 8-bit mode with something else, so the
output is always buffered.
This required a tweak to the cursor to make sure that we clear it after
`SDL_Flip`.
5 years ago
Anders Jenbo
a095bc0bf7
♻️ Migrate more code away from miniwin
5 years ago
Gleb Mazovetskiy
f624b9788c
🔥 Mark `dun_render` functions as `hot`
5 years ago
Gleb Mazovetskiy
4d10642b3d
🧹 Add and use a DVL_ALWAYS_INLINE macro
...
Also moves attribute macros out of miniwin into a new header.
5 years ago
Stephen C. Wills
081a077f6f
Custom message box for 3DS ( #1932 )
5 years ago
Gleb Mazovetskiy
1181cc68ac
🎉 Remove buffer padding
...
The padding is no longer needed
5 years ago
Gleb Mazovetskiy
6a27b37d62
Windows: Handle Unicode paths in language.cpp
5 years ago
Gleb Mazovetskiy
a3423cbc92
🧹 Move Storm code out of file_util
5 years ago
obligaron
58becefada
Define UNICODE/_UNICODE for StormLib and use SFileOpenArchive with wchar_t (TCHAR) on Windows
5 years ago
obligaron
2932da8950
CreateFileStream - Use ToWideChar on Windows
5 years ago
obligaron
60bfd5db34
Move SFileOpenArchive calls to new helper SFileOpenArchiveDiablo
5 years ago
obligaron
f70582ef87
log.hpp: Fix app_fatal local definition
5 years ago
obligaron
a64f94d580
Move creation of file stream to new helper CreateFileStream
5 years ago
obligaron
cfd72b68a0
Revert "remove windows specific code because stat works for this on windows"
...
This reverts commit 0987f8b479 .
5 years ago
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