Gleb Mazovetskiy
affd7e86e6
Move MPQs from init to engine/assets
...
Untangles some of the dependencies.
1 year ago
Gleb Mazovetskiy
b68f59d002
OSX: Fix base/pref/config paths on Tiger
1 year ago
Gleb Mazovetskiy
a838078341
macOS 10.4: Guard non-existing APIs
...
Based on @AJenbo's patch.
1 year ago
qndel
24f108f193
fix many typos ( #7322 )
2 years ago
Gleb Mazovetskiy
e9c29fa806
Switch to ankerl::unordered_dense
2 years ago
Gleb Mazovetskiy
040c4fe82f
Generalize support for Windows without wchar APIs
...
Replaces `NXDK` ifdefs that relate to the lack of wchar APIs
with the more general `DEVILUTIONX_WINDOWS_NO_WCHAR` ifdefs.
This should make it much easier to port to Windows 98.
3 years ago
Gleb Mazovetskiy
43dbd8cb57
Bump libfmt
...
Hopefully we'll be able to get rid of the custom nxdk fork soon.
3 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
c19bfe87fa
Remove utils/stdcompat/algorithm.hpp
3 years ago
Gleb Mazovetskiy
f2c42924fe
Fix SDL.h includes
3 years ago
Gleb Mazovetskiy
9d96eea86b
De-duplicate extra fonts version check code
...
Co-authored-by: Stephen C. Wills <swills@gridprotectionalliance.org>
3 years ago
staphen
22fdeaf2f0
Use JNI to check VERSION file in fonts.mpq
3 years ago
staphen
bf9331733e
[Vita] Use SDL_RegisterEvents() to assign custom event type
3 years ago
Gleb Mazovetskiy
5bf0b8bc96
Add more missing <cstdint> includes
...
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
3 years ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
Gleb Mazovetskiy
6dca019de2
Use `function_ref` instead of `function`
...
`function_ref` is a lightweight function pointer,
whereas `std::function` always involves a heap allocation.
3 years ago
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
4 years ago
Anders Jenbo
0312bae93f
Remove more miniwin code
4 years ago
Gleb Mazovetskiy
197e1180b2
Add StrCat and StrAppend
...
Adds simple string / integer concatenation functions.
Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.
`StrCat` is an easier-to-read alternative to such uses of `fmt`.
4 years ago
Gleb Mazovetskiy
4063afb792
Xbox NXDK platform
4 years ago
Andrew James
812d9f83dd
Remove duplicate defines
...
included in both #4757 and #4755
4 years ago
Gleb Mazovetskiy
01ad1814ea
Make path finding index-based
...
Reduces the size of the `PathNodes` array from 28 KiB to just 8 KiB.
Also reduces the size of `pnode_tblptr` from `300 * sizeof(void *)` to
`300 * 2` bytes.
4 years ago
Gleb Mazovetskiy
c54ddbc98d
locale.cpp: Fix windows.h include
4 years ago
ephphatha
771beeb82d
Use string_view for UiValidPlayerName
4 years ago
ephphatha
6a0fc6627e
Use LANGUAGE as a preference list if available
4 years ago
Gleb Mazovetskiy
d500886293
Use env or <clocale> to get the locale
...
The C++ `std::locale("")` constructor performs a static
initialization of all the facets on the first call.
For example, this includes things like currency formatting.
Avoid all of that by using the environment variables with a fallback to
the equivalent C locale call.
4 years ago
Gleb Mazovetskiy
2386fd12a9
Fix a few warnings
4 years ago
ephphatha
42033f82f4
Use enum instead of int as bool for docking mode
4 years ago
ephphatha
7f15aa730d
Move definition of ghMainWnd to utils/display.cpp
...
This variable is controlled/set by the code in that file, this also lets other files have more specific/relevant includes instead of the monolith that is diablo.h
4 years ago
John Törnblom
a41dcbf78a
ps4: avoid using std::locale to detect language, and fallback to English on first run
4 years ago
staphen
56af849632
Use romfs on Switch for devilutionx.mpq
4 years ago
ephphatha
19478b9aea
Use string_view for vita keyboard input
4 years ago
ephphatha
9a07c734eb
Remove unnecessary copy
...
Was this meant to reset the output? It should never be changed unless the user confirms input. In practice this was calling memcpy with the same src and dest pointers, which is undefined behaviour.
4 years ago
ephphatha
8cfd530acf
Use string_view for 3ds keyboard input
4 years ago
ephphatha
f9ce2108f6
Use string_view for switch keyboard input
4 years ago
ephphatha
c1c56c111f
Handle runtime_errors thrown by std::locale constructor
...
Appears some implementations don't support unknown locales and throw errors instead, causing the language detection to error and not complete.
4 years ago
ephphatha
6a1091ce09
Rename Korean/Romanian translation files so they are used in fallback resolution
4 years ago
Anders Jenbo
6b2481a76c
Touch support on all SDL2 platforms
4 years ago
Andrew James
ab95a29697
Get user preferred languages on apple devices ( #3875 )
...
Co-authored-by: Bubio <bubio66@gmail.com>
4 years ago
Andrew James
fb8467b045
Move platform specific locale lookup code to platform directory ( #3862 )
4 years ago
Gleb Mazovetskiy
cacf55bb34
CMake: Split out platform libraries
4 years ago
staphen
8a6feeb231
Reduce stack size on 3DS
4 years ago
Gleb Mazovetskiy
d0ed505765
Move platforms `asio` includes to Source
4 years ago
JBerg
f31258400a
[ios] Expose app's data
4 years ago
Gleb Mazovetskiy
7e1fea6f76
clang-format all files in {Source,test}/
...
Also includes a few manual tweaks to comments and newlines for better results.
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
4 years ago
Anders Jenbo
799f1763af
Performce UTF8 aware limited string copies
4 years ago
staphen
9413d0046b
Increase stack size on 3DS
4 years ago
staphen
dd901e3c2c
Do not disable backlight on o2DS
4 years ago
Ivan Epifanov
525c57431d
Fix Vita IME input languages
4 years ago