Commit graph

62 commits

Author SHA1 Message Date
Kp 7cb34fda0c Use enum class for network_game_type 2021-11-01 03:37:19 +00:00
Kp bb29e6fca8 Propagate canvas through more layers 2021-09-12 16:20:52 +00:00
Dmitry Grigoryev fbd05a1592 optimize include files (include what you use) 2021-02-06 21:38:50 +01:00
Kp 115c38cd77 Remove kmatrix_poll2
After the previous commit, its only purpose is to automatically dismiss
the window after 3 seconds.  Users may be surprised by this, and the
automatic dismissal has limited value.  Remove it and let the user
remain at the cancel dialog until a decision is made.
2020-12-27 22:03:09 +00:00
Kp 1c2fcf86e0 Convert multi_leave_game to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp e2c95058db Convert multi_endlevel to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp 5e4047ce2a Convert disconnect_player to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp 955ce55661 Convert kick_player to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp 2007257064 Convert get_multi_endlevel_poll2 to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp 407678dfdf Convert multi_send_endlevel_packet to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp ea6504e60b Convert multi_level_sync to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp 2f90d7a208 Convert multi_do_protocol_frame to dispatch through a vtable 2020-12-20 20:39:07 +00:00
Kp d070377e6b Convert multi_objnum_is_past to dispatch through a vtable
This reduces the call depth by one, and eliminates a load of a global
variable that always has the value MULTI_PROTO_UDP.  It adds a load of
the address of the empty dispatch object.  Overall, this should be an
improvement.
2020-12-20 20:39:07 +00:00
Kp 97315725fa Move get_multi_endlevel_poll2 into dsx 2020-08-28 00:18:45 +00:00
Kp 8839f538e0 Refer to <array> directly, not through "compiler-array.h" 2020-05-02 21:18:42 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Chris 44212ed77b Changed default tracker host address from dxxtracker.hopto.org to tracker.dxx-rebirth.com as requested by A Future Pilot 2019-05-17 15:36:58 +02:00
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 4ff9027b31 Add const-qualifiers to some multi functions 2017-08-11 23:43:53 +00:00
Chris Taylor a418f8caec Remove call to window_close(Game_wind) when multiplayer level syncing fails
Replace call to window_close(Game_wind) with returning window_event_result::close to game_handler. Applies to when there is a failure in net_udp_level_sync(). Closing a window within its handler is problematic - it can result in an unstable state.
2017-01-10 13:02:59 +08:00
Chris Taylor 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
zico 730879d733 Updated handling of data sent by tracker. Added support for handling ACKs from tracker and Hole punching between game clients via tracker. Changed udp_dns_filladdr to not perform DNS lookup if requested which is used for broadcasts and IPs sent by tracker. Added text display on NETGAMES menu to indicating if a connection is in progress. Fixed issue allowing to select an invalid game on NETGAMES list. Upon cancelling a forming netgame, made sure tracke runregister packet is sent. Added function to verify tracker address to make sure incoming packets originate from expected trtacker address (and port). Slightly improved handling game data from tracker to be less prone to crash if receiving unexpected data. 2016-11-02 04:20:41 +01:00
Chris Taylor 48e9061960 Make the listbox handlers return a window_event_result
Make the listbox handlers and all sub-handlers (when_selected callbacks) return a window_event_result. Makes code more readable and removes one use of window_close, making it easier to inform event system if a window closes in future.
2016-10-27 15:22:41 +08:00
Kp 8327d85c76 Remove unused get_multi_endlevel_poll1
The only caller for get_multi_endlevel_poll1 was DoEndLevelScoreGlitz,
which only called it on an unreachable path.  That path is now gone, so
remove get_multi_endlevel_poll1.
2016-10-15 00:53:14 +00:00
zico 63ca86698e Added communication for tracker written by A Future Pilot 2016-10-10 18:19:56 +02:00
Kp 7c8c2b5aa4 Move USE_TRACKER to dxxsconf.h; rename to DXX_USE_TRACKER
Rename symbol USE_TRACKER to DXX_USE_TRACKER to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -l USE_TRACKER -- '*.h' '*.cpp' | xargs sed -i -e 's/^#ifdef \(USE_TRACKER\)$/#if DXX_\1/' -e 's/#\(el\)\?if \(.*\)defined(\(USE_TRACKER\))/#\1if \2DXX_\3/'
2016-09-11 18:49:15 +00:00
Kp ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp 99bbd0cf26 Mark global constants as constexpr
s/^const \([^*]*=.*;\)/constexpr \1/
2016-07-23 04:10:42 +00:00
Kp 124a2ee09c Move net_udp.cpp specific defines out of header 2016-01-26 03:45:06 +00:00
Kp b4556d13fa Move UDP_netgame_info_lite into D1||D2
UDP_netgame_info_lite has a member that is only defined if D1||D2.
Guard the whole structure since it cannot be used in common code.
2015-10-13 02:43:24 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Matt Vandermeulen a59daa64c6 ಠ_ಠ 2015-03-20 17:31:22 -04:00
Kp 1580a274f2 Use array<> for net_udp buffers 2015-02-28 19:36:01 +00:00
zico eef3dc03a7 Due to flexible size of game/lite info packets only check for maximum size of these packets 2015-02-21 18:21:34 +01:00
Kp 7f2974ea69 Make default ports uint16_t
Fixes a clang warning formatting %hu with the result of
(condition ? short : int).
2015-02-08 17:43:29 +00:00
Kp d5d416c62c Use ntstring for Netgame.mission_name 2015-01-03 23:44:32 +00:00
Kp 03370ed3e5 Use ntstring for Netgame.mission_name 2014-12-22 04:35:48 +00:00
Kp e166846dd1 Use ntstring for Netgame.game_name 2014-12-22 04:35:48 +00:00
Kp f206b3b127 Reduce inclusion of object.h 2014-11-23 04:36:58 +00:00
Kp 62dc7a874f Pass sockaddr by const &, not value 2014-10-18 23:37:34 +00:00
Kp 486707a9ef Fix argument to net_udp_send_mdata_direct
Use argument, not global
2014-10-17 02:23:40 +00:00
Kp 7c76c68255 Make unused_newmenu_userdata_t const 2014-10-16 02:13:09 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp e259857fea List initialize UDP mdata pkt_num array 2014-07-04 04:12:45 +00:00
Kp 39a56ae244 Unpack UDP_mdata_store 2014-06-27 03:11:39 +00:00
Kp 6091496b28 Unpack UDP_mdata_info 2014-06-26 03:17:23 +00:00
Kp c7b161cf2d Unpack UDP_frame_info 2014-06-26 03:17:23 +00:00
Kp 291d11d17e Unpack UDP_sequence_packet 2014-06-26 03:17:23 +00:00