Vladimir Olteanu
7271e5558c
Get rid of unchecked calls to malloc
5 years ago
qndel
46c8e550ba
Revert "Revert "Add explicit cast for LogicalToOutput" ( #2334 )"
...
This reverts commit cbfffcbfd4 .
5 years ago
qndel
cbfffcbfd4
Revert "Add explicit cast for LogicalToOutput" ( #2334 )
...
This reverts commit d3c36166df .
5 years ago
ephphatha
b680e3fef1
Align end comment markers for doxygen comments
...
Including a bunch from previous PRs (since I was responsible for the broken formatting for most 😓 )
5 years ago
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
5 years ago
Anders Jenbo
9ebdb6db69
General clean up
5 years ago
ephphatha
d3c36166df
Add explicit cast for LogicalToOutput
...
In practice this function is only called with int arguments, can probably change the specialisation to std::is_integral<T>
5 years ago
ephphatha
08ae390643
Add explicit casts for some implicit conversions
...
Some of these were triggering multiple warnings due to casts applied at times which forced potentially truncating operations.
5 years ago
ephphatha
3520dc4201
Update numeric literals to use appropriate suffix
...
Mainly things like .F for floats instead of doubles in float context.
5 years ago
Anders Jenbo
bc0d1f7ac0
clang-tidy/Android Stuidio cleanups 3
5 years ago
Anders Jenbo
4eabc6024b
Apply various cleanups via Android Studio
5 years ago
Anders Jenbo
372b1dcba2
Clang-tidy: readability-identifier-naming.MemberCase: camelBack
5 years ago
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
5 years ago
Anders Jenbo
8e07ef8fe5
Clang-tidy: misc-unused-parameters
5 years ago
Anders Jenbo
fa54499aeb
Clang-tidy: readability-uppercase-literal-suffix
...
Strip suffixes
5 years ago
Anders Jenbo
51d5c8bcab
Clang-tidy: performance-unnecessary-value-param
5 years ago
Anders Jenbo
f167bd4dfb
Clang-tidy: llvm-include-order
5 years ago
Anders Jenbo
ec8d7bebe2
Clang-tidy: modernize-use-auto
5 years ago
Anders Jenbo
790f42d078
Clang-tidy: readability-inconsistent-declaration-parameter-name
5 years ago
Gleb Mazovetskiy
8a9618aea2
♻️ Clean up `cel_header.hpp`
...
1. Rename `CelGetFrameStart` to `CelGetFrame`, in line with the other 2
functions with the same name and load the `uint32_t` safely.
2. Remove redundant `FrameHeader`, simply use `LoadLE16`.
3. Document all the functions.
5 years ago
Gleb Mazovetskiy
4ea7ba0f5f
🚚 engine.h: Extract `LoadLE32` and `LoadBE32`
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
Anders Jenbo
3affe2eb2a
Fix SDL1 builds
5 years ago
Anders Jenbo
9dd7de027f
Limit screen to landscape mode
5 years ago
Gleb Mazovetskiy
f9d20b44d6
🎉 Hardware cursor (SDL2-only)
...
Disabled by default because of these known issues:
1. When clicking on inventory item, it briefly appears a bit shifted (in the wrong coordinates).
This issue can happen with software cursor as well, but is a lot more
obvious with the hardware cursor.
2. Cursor is scaled with nearest-neighbour scaling, which may look a bit different from
how the rest of the graphics are scaled.
See also previous attempt: https://github.com/diasurgical/devilutionX/pull/955 by @viciious
Co-authored-by: Victor Luchits <vluchits@gmail.com>
5 years ago
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