Commit Graph

116 Commits (75dd135e8d8aeb376d6bf8e2e3f71bb8fd88d4d8)

Author SHA1 Message Date
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison ba34ec7ade Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Jonathan G Rennison 5e6d283463 Merge branch 'master' into jgrpp
Remove the viewport sign cache as this is now superseded by the kd tree
implementation

# Conflicts:
#	src/crashlog.cpp
#	src/lang/english.txt
#	src/misc.cpp
#	src/pathfinder/follow_track.hpp
#	src/pbs.cpp
#	src/rail_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/station.cpp
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/thread/thread_morphos.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/waypoint.cpp
5 years ago
Patric Stout f58db44ff2 Remove: BeOS support (deprecated by Haiku)
In 10 years there is no commit to change how BeOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), BeOS is no longer
support. SDL2 suggests to use Haiku instead of BeOS.
5 years ago
Jonathan G Rennison a6c5951b2f Fix flags field not being received in Reply_CLIENT_FIND_SERVER_extended 6 years ago
Jonathan G Rennison 6342099c4d Allow 256 NewGRFs in multiplayer
Add extended network format for server info
Add general UDP packet fragmentation system
Fix map dimensions >= 64k
Increase length of server revision string
Maintain backwards compatibility with trunk for advertisement/server listing
6 years ago
J0an Josep cfb8092397 Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium fad4fa09ba (svn r26046) -Fix: handle a number of failure conditions from methods called in the network code 11 years ago
rubidium e6ae8cf420 (svn r25593) -Cleanup: remove a few stale #defines 11 years ago
rubidium 7251fbb514 (svn r24532) -Change: try to read more UDP packets per game loop 12 years ago
rubidium bd64bf6372 (svn r23193) -Codechange: don't cast away const unneededly 13 years ago
rubidium 536c581923 (svn r22401) -Codechange: replace some defines in the udp code so doxygen can create better documentation 13 years ago
rubidium b6c2216749 (svn r21358) -Codechange: make some network function names conform to coding style 14 years ago
rubidium 9c83a8975f (svn r21357) -Codechange: make it possible to resize the packet's buffer 14 years ago
terkhen 80c43f52e8 (svn r20289) -Codechange: Unify fall through coding style. 14 years ago
terkhen 88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 14 years ago
smatz 837913aa5a (svn r19508) -Codechange: remove semicolon after DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND and DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND 14 years ago
yexo 7ff55502f0 (svn r19256) -Codechange: use a constructor/destructor for GRFConfig to make sure all members are properly initialized 15 years ago
yexo a9c8dbc0a0 (svn r19255) -Codechange: encapsulate GRFIdentifier in GRFConfig instead of subclassing it 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium d79439fb3c (svn r17963) -Codechange: some documentation style 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 9b156c1bd4 (svn r16601) -Fix [FS#2880]: try 2... hopefully better this time 15 years ago
rubidium c0f9af5607 (svn r16000) -Feature: IPv6 support 15 years ago
rubidium 1eb4aa971e (svn r15975) -Codechange: register each of the IPs we have bound to to the masterserver 15 years ago
rubidium c0f8214218 (svn r15972) -Codechange: remove unneeded parameter 15 years ago
rubidium 2a6e9288fd (svn r15971) -Codechange: make it possible for UDP socket handlers to bind to multiple sockets. 15 years ago
rubidium 22d9306889 (svn r15967) -Codechange: do not access NetworkSocketHandler::has_quit directly 15 years ago
rubidium 0678cb561d (svn r15961) -Codechange: prepare the 'client' side for receiving 'session keys' from the masterserver so servers can register with multiple IPs as the same server. 15 years ago
rubidium 632d74c6b1 (svn r15922) -Codechange: unify the ways to listen on a socket 15 years ago
rubidium ba5aafb9bb (svn r15921) -Fix: some OSes don't like sizeof(sockaddr_storage) but want sizeof(sockaddr) or whatever is 'valid' for the given protocol 15 years ago
rubidium beef5da970 (svn r15918) -Fix (r15917): comparing IPs sometimes failed due to 'random' data (as spotted by SpComb) 15 years ago
rubidium c0c6e07081 (svn r15915) -Codechange: let the udp code use NetworkAddress. 15 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 15 years ago
smatz c9bef19043 (svn r14174) -Fix: since now, we are 'losing' things, not 'loosing' 16 years ago
rubidium ab7b05da50 (svn r12637) -Fix [FS#1913]: possible NULL pointer dereference when reading some NewGRF data. 16 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 17 years ago
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style 17 years ago
rubidium 809238e634 (svn r10729) -Fix: some hardware (PS(P|3)) seems to loose the non-blocking state of UDP sockets. 17 years ago
celestar 0ed4b64e64 (svn r8857) -Documentation: Added some doxygen @file tags, repaired others (the @file tag MUST be found before any line of code, that includes preprocessor directives). 18 years ago
rubidium b71d6e1401 (svn r8673) -Codechange: use SetNonBlocking instead of implementing yet another version. 18 years ago
rubidium 500f9a971a (svn r8546) -Codechange: add a seperate (wrapper) functions to send/receive booleans. 18 years ago
rubidium 16ce6def09 (svn r8523) -Codechange: move all the Network(Recv|Send)_(uintXX|string) functions to Packet. 18 years ago
rubidium 99f860e686 (svn r8521) -Codechange: initial step in converting Packet to a class; make and use constructors and functions related to the reading/saving the packet size. 18 years ago
rubidium 291b7925ee (svn r8459) -Codechange: move (Send|Recv)GRFIdentifier to NetworkSocketHandler, so it can also be used the TCP socket handler. 18 years ago
rubidium f72dde5236 (svn r8445) -Cleanup: remove some @params from comments as the parameters did not exist anymore and add comments to several variables/functions. 18 years ago
rubidium 269c1a58a0 (svn r8372) -Fix (8361): NUM_LANDSCAPE comes (via some detour) from openttd.h, which does not exist in the masterserver/updater. 18 years ago
rubidium 3e10a726e5 (svn r8361) -Codechange: make sure the range of the dates coming from the network are valid in OpenTTD
-Codechange: use_password is a boolean variable
-Codechange: move range checking for server_lang and map_set to Recv_NetworkGameInfo
18 years ago
rubidium cf83a9f065 (svn r8316) -Codechange: move the GRF ID and MD5 checksum from GRFConfig to GRFIdentifier so it can be reused. 18 years ago
rubidium f66b373b52 (svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState. 18 years ago
rubidium c48aa5db45 (svn r8078) -Codechange: rewrite UDP part of the network code to make use classes. This is only one of the many steps to really cleanup the network code. 18 years ago
KUDr 33be1ecfb1 (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 18 years ago
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago