Commit Graph

422 Commits (38729297f98f6abb154a6acd37b6c5a1b9dea134)

Author SHA1 Message Date
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 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
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
Charles Pigott fe448a2616 Remove: OPF 5 years ago
PeterN bcfc9620b0 Change: Use default value for invalid multi-string settings instead of clamping to min or max value. (#7361) 5 years ago
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 5 years ago
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
5 years ago
Peter Nelson 0355f887d9 Fix #6438: Properly invalidate AI Settings window when max no competitor setting is changed. 5 years ago
PeterN 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
5 years ago
Peter Nelson 4daaec1a94 Change: Invalidate ship path caches if pathfinder choice or forbid-90-degree turns are changed. 6 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
peter1138 73ea8cdb21 (svn r27816) -Fix [FS#6421]: Do not search directories when opening ini files as we already have their full path. 7 years ago
alberth b8414c2884 (svn r27285) -Codechange: Use LG_ORIGINAL instead of a magic 0 to indicate the original landscape generator. 9 years ago
frosch c639fb0d8e (svn r27163) -Fix [FS#6204]: Toolbars were not invalidated when changing max-vehicles settings. (adf88) 9 years ago
frosch 310258f283 (svn r27151) -Add: Allow changing max heightlevel in scenario editor. 10 years ago
peter1138 1088ad48fc (svn r27004) -Codechange: Make GUI size apply to (sprite-font) text as well. 10 years ago
peter1138 253c91b17d (svn r26990) -Feature: Add option to choose normal, double or quad-size interface. 10 years ago
alberth c1e7c32f07 (svn r26611) -Feature: Save and load grfid and md5sum of newgrfs in config file (frosch) 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 8960939b22 (svn r26499) -Codechange: replace strndup with stredup 10 years ago
rubidium 24fdd0b7bb (svn r26494) -Codechange: replace some further usages of s(n)printf with seprintf 10 years ago
rubidium b4914b91d9 (svn r26493) -Codechange: use strecat to concatenate script settings instead of manually accounting for the amount of characters that has been written 10 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 10 years ago
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 10 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
frosch 41b7a04a68 (svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity when they are not supposed to, and truncate cargo appropiately if they are allowed to. 11 years ago
fonsinchen 3d0a0e8e48 (svn r25358) -Codechange: save and load link graph jobs and the schedule 11 years ago
frosch 23ba42b66c (svn r25291) -Add: WindowDesc ability to load and store information in a config file. 11 years ago
rubidium ef8d491d8f (svn r24996) -Change: Apply default service interval changes to vehicles without custom interval (peter1138) 12 years ago
rubidium 99a08e1e8c (svn r24968) -Fix [FS#5379]: company window was not updated when shared were enabled/disabled 12 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
planetmaker 89a2ba2a6d (svn r24899) -Fix [FS#5434]: Also the station build window needs redrawing when the station spread changes (based on patch by juanjo) 12 years ago
planetmaker f8e0b22974 (svn r24894) -Fix [FS#5434]: Invalidate station selection window when station spread changes (based on patch by juanjo) 12 years ago
frosch 0efd29b71b (svn r24860) -Codechange: Add SettingDesc::GetType(). 12 years ago
frosch 21b43b63f5 (svn r24843) -Codechange: Move news display options into the general settings framework. (based on patch by eagle_rainbow) 12 years ago
michi_cc c75962e04c (svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum. 12 years ago
frosch d1ab0f03bc (svn r24790) -Remove: Classic difficulty profiles. 12 years ago
frosch 22dc45738d (svn r24787) -Fix: Unify checks for editability of settings. 12 years ago
frosch a499435351 (svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables. 12 years ago
frosch c6ed8c01b3 (svn r24250) -Fix [FS#5154]: Do not immediately display error messages from parsing the cfg file, but schedule them for displaying after the GUI is prepared for it. 12 years ago
frosch c11d80148f (svn r24247) -Fix: If loading of int-list settings fails, use the default. 12 years ago
frosch 599f89e641 (svn r24193) -Fix (r24191): Also update comments accordingly. 12 years ago
frosch ec73ad1145 (svn r24192) -Fix [FS#5153-ish]: Also use default value when reading an invalid integer setting value. 12 years ago
michi_cc 3f267db3a6 (svn r24146) -Fix [FS#5153]: Use default value when reading an invalid setting value. (Eddi) 12 years ago
michi_cc 6c8a16f36e (svn r24145) -Cleanup: Switch coding style. 12 years ago