Commit Graph

161 Commits (05f4e7360886e36b221ef5c3af4426625a3de686)

Author SHA1 Message Date
Michael Lutz 05f4e73608 Codechange: Replace custom mutex code with C++11 mutex'es.
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
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 aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
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
frosch 7b553d255e (svn r27732) -Change: Turn the message about 'missing baseset sprites' from a popup into a static message that only shows in non-release versions, just like the 'missing translations' message. 8 years ago
frosch a3b356e057 (svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG instead, which does the same in all use-cases. 8 years ago
frosch b363a639aa (svn r27723) -Codechange: Simplify tests by using GCF_SYSTEM. 8 years ago
frosch b6b02108f7 (svn r27721) -Fix: Testing GRFs for static-safety (when reloading the config) invalidated file slot 62, which may be in use by an active GRF. 8 years ago
frosch 31f046bd9b (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 8 years ago
frosch 861b9bc85e (svn r27063) -Fix [FS#6172]: Some lists did not use natural string sorting. 10 years ago
rubidium 771dcf3b7b (svn r27003) -Cleanup: fix the use of spaces and asterices "around" some comments 10 years ago
alberth 3c9d3f5ecd (svn r26612) -Add: Method to copy newgrf parameters. 10 years ago
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 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
rubidium 1b9e32664f (svn r26070) -Fix: prevent extremely huge size for data (1+GiB) 11 years ago
rubidium 78a316d349 (svn r26061) -Fix: negative result of ftell wasn't handled correctly in some cases 11 years ago
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 11 years ago
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 11 years ago
frosch c3ca57c42b (svn r24318) -Feature: Add dropdowns to NewGRF configurations, if all values have labels. 12 years ago
rubidium 58269b7ad2 (svn r23935) -Codechange: generalise GetTextfile 13 years ago
michi_cc 6db39410a1 (svn r23887) -Feature: [NewGRF] Support for container version 2. 13 years ago
frosch 92700c1262 (svn r23807) -Codechange: GRFError::num_params is not needed, remove it. 13 years ago
truebrain 561b25d031 (svn r23601) -Fix: fix the conflict in window number 13 years ago
yexo 7a7d9a7b6b (svn r23494) -Feature: [NewGRF] action14 node INFO->URL_ to add an url 13 years ago
frosch 0d901d599f (svn r23249) -Feature: Also allow viewing of the other two textfiles supplied by BaNaNaS tars, i.e. changelog and license. 13 years ago
frosch b725913f3b (svn r23248) -Codechange: Rename everything related to the NewGRF 'readme' to 'textfile', so it is more generic. 13 years ago
rubidium 4ae8bbea07 (svn r23222) -Codechange: reduce tar scanning calls to the bare minimum 13 years ago
rubidium 6d991b3b10 (svn r23217) -Codechange: introduce the concept of scanning only in a limited set of sub directories 13 years ago
yexo d6bf0d10d0 (svn r23182) -Feature: allow translatable readme files 13 years ago
rubidium 514d887690 (svn r23178) -Feature [FS#4780]: in-game readme.txt readmer (LordAro) 13 years ago
rubidium 414c397000 (svn r22904) -Codechange: add tar filename to file scanning 13 years ago
rubidium 8e5f433b22 (svn r22826) -Codechange: pass sub directory to NewGRF loading functions 13 years ago
rubidium 0061b5f184 (svn r22822) -Codechange: make a distinction between base sets and newgrfs for their directory 13 years ago
rubidium 70179db81e (svn r22820) -Codechange: perform a full (re)draw cycle in the first draw during progress instead of waiting 200ms 13 years ago
rubidium 38ad276acc (svn r22819) -Fix: include the header where it should be included 13 years ago
rubidium 9fe4b959ac (svn r22818) -Fix [FS#4742] (r22796, rlongago): don't spawn threads for world generation and NewGRF scanning when using the dedicated or null video driver regardless of the used blitter 13 years ago
rubidium c10d415723 (svn r22800) -Fix (r22796): don't run the scanning threaded when there is no reason to do so (no UI to update) 13 years ago
rubidium dc5f44883b (svn r22797) -Add: progress bar for scanning NewGRFs 13 years ago
rubidium 2987bcc79b (svn r22796) -Codechange: run the NewGRF scanning in a separate thread 13 years ago
rubidium d7593d8815 (svn r22790) -Codechange: add callback for when NewGRF scanning is complete 13 years ago
rubidium 327c5dd10c (svn r22771) -Codechange: unify some NewGRFScan calling code 13 years ago
frosch bfd09004fe (svn r22417) -Add: an advanced setting to specify the default palette to use for NewGRFs without action 14 palette information; this makes the default choice independent from the used base graphics and '-i' option. 13 years ago
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 13 years ago
yexo 93533b603a (svn r22162) -Fix [FS#4533]: No update of NewGRF window when unknown GRF name becomes available 13 years ago
frosch 6e4dd56158 (svn r21814) -Fix/Add: Check GRF version from action 8, and disallow usage of GRFs with versions above 7. 14 years ago
rubidium ab31493dc2 (svn r21125) -Fix (r20248): static NewGRFs shouldn't be added non-statically to a game 14 years ago