LP
f295e67b9f
Add multiplayer event logging
4 months ago
Gleb Mazovetskiy
88f706e0d1
SDL3: Add some backports / compat helpers
5 months ago
Anders Jenbo
1c76897f2c
Apply simple const rules using clang-tidy
7 months ago
Gleb Mazovetskiy
d94bc424df
`sgOptions` -> `GetOptions()`
...
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638 , which will statically initialize change
handlers after the Options object has been initialized.
1 year ago
staphen
78eb3c7fe9
Parse TCP host using hostname:port format
2 years ago
staphen
2e958ee546
Avoid sending PT_DISCONNECT packet to dropped player
2 years ago
Anders Jenbo
9c6902b2c4
Fix missing return value in tcp_server::send()
2 years ago
staphen
9d34cb2795
Remove frame queue exceptions from the network layer
3 years ago
staphen
13b5fb82fa
Build ASIO without exceptions
3 years ago
Gleb Mazovetskiy
a7a2b92421
tcp_client: Fix `SDL_SetError` call
...
Can't pass `std::string_view` for the `%s` placeholder.
3 years ago
staphen
bb83d527d2
Change server_exception from dvlnet_exception to PacketError
3 years ago
staphen
d4b33685a2
Prefer ASIO functions that take error codes
3 years ago
Gleb Mazovetskiy
4d0341afb5
net: Replace `packet_exception` with `tl::expected`
...
The network code still has ways to go to get rid of exceptions,
this is but a small first step.
Co-authored-by: Stephen C. Wills <staphen@gmail.com>
3 years ago
Gleb Mazovetskiy
78af369e6e
net: Remove template parameter for cdwrap
...
1. There is no reason for cdwrap to be templated, it can simply store
the factory function reference instead.
2. Marks overriden virtual functions as `override` instead of `virtual`.
3 years ago
staphen
874ccdb69a
Fix TCP join crash when entering password for public game
3 years ago
Gleb Mazovetskiy
1a1a282d9a
Use C FILE instead of C++ streams throughout
...
Reduces binary size by ~2 KiB and may improve compatibility with oddball
systems (e.g. PS2).
3 years ago
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
Stephen C. Wills
ef1821ce57
Apply sequence number to net turns ( #4122 )
4 years ago
obligaron
79b926c375
Move more options to OptionEntryBase
4 years ago
staphen
ffbbcc6d62
Support unencrypted multiplayer games with no password
4 years ago
Vladimir Olteanu
5e5737370f
dvlnet: pass smartptrs to lambdas that free buffers
5 years ago
Anders Jenbo
2ca6e37c46
Clean up sub folders using clang-tidy/Android Studio
5 years ago
Anders Jenbo
db3d1d4054
Revert and disable readability-convert-member-functions-to-static
...
This breaks on GCC 6.3
5 years ago
Anders Jenbo
8c76d45797
Clang-tidy: modernize-avoid-bind
5 years ago
Anders Jenbo
17e67d2b90
Clang-tidy: modernize-use-equals-default
5 years ago
staphen
c4cf3db821
Close TCP client socket when leaving game
5 years ago
Gleb Mazovetskiy
47c93c2f9c
🧹 Fix more `-Wformat` warnings
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
Anders Jenbo
b69d18f12d
🌐 Enable translation of all remaning strings
5 years ago
Anders Jenbo
2969b80163
🎨 Run readability-identifier-naming on all src sub-folders
5 years ago
Anders Jenbo
373f28736f
🎨 Acceptable parts of modernize-*
5 years ago
Anders Jenbo
b978d80119
🎨 llvm-include-order
5 years ago
Anders Jenbo
bb4e1960e7
🎨 modernize-use-nullptr
5 years ago
Anders Jenbo
8c821e98d3
🚚 Restructure files
5 years ago
Anders Jenbo
67a7ff98c5
🚨 Clean up compiler warnings
5 years ago
Xadhoom
867dd96a73
Add ZeroTier support
5 years ago
Anders Jenbo
bfb3c11c2b
🎨 Change namespace to devilution
5 years ago
Juliano Leal Goncalves
800dbce066
♻️ Move options-related structs to new 'options.h' file
5 years ago
Anders Jenbo
9edea1b968
🔧 Make network port configurable
5 years ago
Anders Jenbo
da373f351d
🐛 Only close TCP server if running
5 years ago
Xadhoom
791d400ae3
Close TCP listening socket on leave
5 years ago
Anders Jenbo
b5280dde2b
🐛 Prevent host from crashing at end of game
...
Fixes #900
5 years ago
Marcin Konicki
2a5d3b6c52
Use asio to resolve host name (or IP)
...
Fixes #735
6 years ago
Anders Jenbo
961e7f58c4
Implement UI errors
6 years ago
Xadhoom
0010c9307f
Fix network: creating and joining
6 years ago
Gleb Mazovetskiy
e3cf8af94d
dvlnet: More C++11 compatibility
...
Fixes the following warnings:
SourceX/dvlnet/tcp_client.cpp:104:38: warning: lambda capture initializers only available with -std=c++14 or -std=gnu++14
SourceX/dvlnet/tcp_server.cpp:142:15: warning: lambda capture initializers only available with -std=c++14 or -std=gnu++14
7 years ago
Mathieu Maret
0ac4c1e419
tcp_client: close connections when leaving
...
So you can join another game latter
fix #251
7 years ago
Anders Jenbo
18532e7c9b
Format SourceX and SourceS
...
Fixes #262
7 years ago
Gleb Mazovetskiy
94f62177f1
Make SourceX/dvlnet C++11 compatible
...
std::make_unique is only available in C++17 and above
7 years ago