Commit Graph

32 Commits

Author SHA1 Message Date
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.
2019-03-20 19:24:55 +01:00
Charles Pigott
5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 2018-06-27 22:54:46 +02:00
Alberth
1a5a95aa49 Fix: Make switch on MD5File::ChecksumResult complete to avoid compiler warning 2018-06-23 14:00:41 +02:00
Niels Martin Hansen
5ab06ef8a3 Fix: Don't complain if CAT music files are missing entirely
Just complain if an index into a CAT file that exists is invalid.
2018-06-15 23:09:17 +02:00
Charles Pigott
5c5267726f Fix: Warning about base set template instantiations with clang 2018-04-21 16:28:50 +02:00
rubidium
29c2e73ba6 (svn r26637) -Fix [FS#6038]: segmentation fault when encountering a .obg/.obs/.obm with empty string/zero length/ MD5 checksums 2014-06-09 17:43:59 +00:00
rubidium
9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium
d336bf65df (svn r26073) -Cleanup: unneeded check against NULL 2013-11-23 18:13:46 +00:00
planetmaker
c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
rubidium
945469f993 (svn r24870) -Change: make the duplicate base set message slightly more verbose, and mention files with wrong md5 checksums or files that are missing explicitly 2012-12-29 10:35:33 +00:00
frosch
c9bcc42aa6 (svn r24496) -Fix [FS#5276]: Make sure all template functions are instantiated by at least one compilation unit. 2012-08-23 18:30:46 +00:00
yexo
fe31aa28c4 (svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro) 2012-08-20 21:01:40 +00:00
michi_cc
a9b6c5cd86 (svn r23886) -Codechange: Allow limiting the MD5 file hash to the first x bytes of the file. 2012-02-04 13:29:00 +00:00
rubidium
2b897b4fa0 (svn r23219) -Change: different directories for basesets and newgrfs. So data to baseset or newgrf, and gm to baseset 2011-11-14 21:34:27 +00:00
rubidium
15f671279d (svn r23214) -Codechange: for base media sets pass the "search in tars" parameter to determine what to do 2011-11-14 19:24:22 +00:00
rubidium
414c397000 (svn r22904) -Codechange: add tar filename to file scanning 2011-09-08 09:48:52 +00:00
rubidium
05300a00b1 (svn r22824) -Codechange: pass sub directory to ini loading 2011-08-24 13:38:26 +00:00
rubidium
ff143c6708 (svn r22413) -Document: even more stuff 2011-05-02 20:59:54 +00:00
rubidium
6c9078fd30 (svn r21844) -Codechange: move documentation towards the code to make it more likely to be updates [a-c]. 2011-01-18 22:17:15 +00:00
rubidium
5e08df7689 (svn r20607) -Fix: retain information about all base sets that are found and not only the latest version. This to stop confusing people that use newer versions of the base sets than those available via BaNaNaS. 2010-08-23 23:49:14 +00:00
rubidium
83e40b8ced (svn r19674) -Fix [FS#3774]: crash when the music/graphics metadata files were unreadable 2010-04-19 09:34:56 +00:00
yexo
3b9da089e5 (svn r19212) -Fix: base graphics set with an empty filename in the obg file caused segfaults 2010-02-22 20:18:59 +00:00
rubidium
03e5434e63 (svn r19206) -Add: concept of fallback base sets, i.e. do not automatically load the NoMusic/NoSound sets when there is another set 2010-02-22 16:24:23 +00:00
alberth
33a96b5ef3 (svn r19132) -Codechange: No need to end a line with ;;. 2010-02-14 16:31:35 +00:00
yexo
f709290220 (svn r19095) -Fix: segfault when a baseset has an empty metadata field 2010-02-11 15:08:55 +00:00
rubidium
82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium
a8d6d18b22 (svn r18608) -Change: add the concept of music sets 2009-12-22 21:40:29 +00:00
rubidium
d5d2354296 (svn r17790) -Feature: translatable base sound/graphics set descriptions 2009-10-17 20:34:09 +00:00
rubidium
984efae368 (svn r17291) -Fix [FS#3147]: crash after upgrading base graphics/sound set when opening the game options menu and you were using the upgraded set 2009-08-26 20:26:40 +00:00
rubidium
7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium
2fd1b000e5 (svn r17241) -Change: make a distinction between missing and corrupted data files. If (at least) one data file is missing do not consider the set to be useable. Do also no autodetect sets with missing files. 2009-08-20 17:02:44 +00:00
rubidium
f118932643 (svn r17133) -Codechange: generalise the code that searches for base graphics 2009-08-09 16:54:03 +00:00