Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
2023-02-01 16:06:57 +00:00
Gleb Mazovetskiy
6dca019de2
Use function_ref instead of function
...
`function_ref` is a lightweight function pointer,
whereas `std::function` always involves a heap allocation.
2022-11-02 11:46:15 +00:00
Gleb Mazovetskiy
4cf0053ece
Set underlying type for all the enums
...
Reduces rg99 binary size by 3 KiB.
2022-08-11 01:43:54 +02:00
Anders Jenbo
0312bae93f
Remove more miniwin code
2022-07-10 21:13:39 +02:00
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`.
2022-07-10 06:14:58 +02:00
Gleb Mazovetskiy
4063afb792
Xbox NXDK platform
2022-07-09 18:50:53 +01:00
Andrew James
812d9f83dd
Remove duplicate defines
...
included in both #4757 and #4755
2022-06-20 12:03:17 +02:00
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.
2022-06-20 10:49:16 +01:00
Gleb Mazovetskiy
c54ddbc98d
locale.cpp: Fix windows.h include
2022-06-20 00:37:12 +02:00
ephphatha
771beeb82d
Use string_view for UiValidPlayerName
2022-06-18 14:02:48 +02:00
ephphatha
6a0fc6627e
Use LANGUAGE as a preference list if available
2022-06-16 16:43:22 +02:00
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.
2022-06-16 13:54:29 +01:00
Gleb Mazovetskiy
2386fd12a9
Fix a few warnings
2022-06-15 13:01:20 +02:00
ephphatha
42033f82f4
Use enum instead of int as bool for docking mode
2022-05-08 12:14:33 +02:00
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
2022-05-08 12:09:12 +02:00
John Törnblom
a41dcbf78a
ps4: avoid using std::locale to detect language, and fallback to English on first run
2022-04-30 20:27:33 +02:00
staphen
56af849632
Use romfs on Switch for devilutionx.mpq
2022-04-09 03:23:42 +02:00
ephphatha
19478b9aea
Use string_view for vita keyboard input
2022-03-20 23:55:17 +01:00
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.
2022-03-20 23:55:17 +01:00
ephphatha
8cfd530acf
Use string_view for 3ds keyboard input
2022-03-20 23:55:17 +01:00
ephphatha
f9ce2108f6
Use string_view for switch keyboard input
2022-03-20 23:55:17 +01:00
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.
2022-01-19 03:04:53 +01:00
ephphatha
6a1091ce09
Rename Korean/Romanian translation files so they are used in fallback resolution
2022-01-04 23:20:53 +01:00
Anders Jenbo
6b2481a76c
Touch support on all SDL2 platforms
2022-01-02 11:37:38 +01:00
Andrew James and Bubio
ab95a29697
Get user preferred languages on apple devices ( #3875 )
...
Co-authored-by: Bubio <[email protected] >
2022-01-01 19:31:48 +11:00
Andrew James
fb8467b045
Move platform specific locale lookup code to platform directory ( #3862 )
2021-12-30 15:20:40 +11:00
Gleb Mazovetskiy
cacf55bb34
CMake: Split out platform libraries
2021-12-21 21:01:47 +00:00
staphen
8a6feeb231
Reduce stack size on 3DS
2021-12-19 17:52:37 +01:00
Gleb Mazovetskiy
d0ed505765
Move platforms asio includes to Source
2021-12-07 18:32:25 +01:00
JBerg
f31258400a
[ios] Expose app's data
2021-12-06 22:01:02 +01:00
Gleb Mazovetskiy and Anders Jenbo
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 <[email protected] >
2021-11-24 23:44:12 +01:00
Anders Jenbo
799f1763af
Performce UTF8 aware limited string copies
2021-11-22 03:28:51 +01:00
staphen
9413d0046b
Increase stack size on 3DS
2021-11-19 11:49:41 +00:00
staphen
dd901e3c2c
Do not disable backlight on o2DS
2021-11-12 00:11:42 +01:00
Ivan Epifanov
525c57431d
Fix Vita IME input languages
2021-10-26 14:24:42 +02:00
Ivan Epifanov
8e6f511d6c
Add vita tcp network support
2021-10-20 19:02:47 +02:00
Rafał Mikrut
3ba15a4251
Don't try to close non openend file
2021-10-07 11:36:51 +02:00
staphen
b29141048a
Move existing touch control logic to Vita platform
2021-09-16 19:25:31 +02:00
staphen
1d50db0246
Nintendo Switch: Remove link to rdimon library to fix file truncation
2021-08-28 02:26:06 +02:00
obligaron
82cea78def
Apply clang-format
2021-08-11 20:52:32 +02:00
staphen
703e5a3f14
3DS: Detect system language and select the appropriate translation
2021-08-10 07:50:38 +02:00
Anders Jenbo
903d4bd2e1
Scope all for loops
...
This caused 7 of the loops to be rewriteen using range by clang-tidy
2021-07-08 08:14:03 -07:00
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
2021-07-03 16:41:43 -07:00
staphen
8fbe5efd9e
Switch custom RNG for libsodium
2021-06-26 13:26:56 -07:00
staphen
c5fc37eca2
Stub missing functions for Switch
2021-06-26 13:26:56 -07:00
staphen
c6a9eaaf88
Implement sendmsg and recvmsg
2021-06-20 16:31:25 -07:00
staphen
fea2cbb104
Initialize AC and SOC services at startup
2021-06-20 16:31:25 -07:00
staphen
12cd536259
Stub missing functions for 3DS
2021-06-20 16:31:25 -07:00
staphen
14a0da7fb3
Enable TCP in 3DS build
2021-06-20 16:31:25 -07:00
staphen
57856fa2a6
3DS SOC service initialization functions
2021-06-20 16:31:25 -07:00