summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
AgeCommit message (Collapse)Author
2021-03-10Fix: abort GRFFileScanner on exiting the game as soon as possiblePatric Stout
This prevents the window from "freezing" when you close it during the scanning of NewGRFs, as it first would continue the action.
2021-03-10Add: make modal windows update more smoothPatric Stout
Basically, modal windows had their own thread-locking for what drawing was possible. This is a bit nonsense now we have a game-thread. And it makes much more sense to do things like NewGRFScan and GenerateWorld in the game-thread, and not in a thread next to the game-thread. This commit changes that: it removes the threads for NewGRFScan and GenerateWorld, and just runs the code in the game-thread. On regular intervals it allows the draw-thread to do a tick, which gives a much smoother look and feel. It does slow down NewGRFScan and GenerateWorld ever so slightly as it spends more time on drawing. But the slowdown is not measureable on my machines (with 700+ NewGRFs / 4kx4k map and a Debug build). Running without a game-thread means NewGRFScan and GenerateWorld are now blocking.
2021-02-19Fix d437445c: also use std::chrono for the GRFFileScanner modal windowPatric Stout
For some reason I only converted one of the two modal windows we have, and completely forgot the other. While at it, synchronize the way those two modal windows work in terms of "next_update".
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Use std::string in file scanners.Michael Lutz
2020-05-21Codechange: Use std::string for storing GRF error messages.Michael Lutz
2020-05-21Codechange: Replace custom linked list for GRF texts with STL vectors and ↵Michael Lutz
strings.
2020-05-21Codechange: Replace SmallPair with std::pair.Michael Lutz
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-18Codechange: use std::vector to sort _all_grfs linked listglx
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-06Codechange: Replace custom thread code with C++11 thread objects.Michael Lutz
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
2019-04-06Codechange: Replace custom mutex code with C++11 mutex'es.Michael Lutz
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.
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + nHenry Wilson
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-24Codechange: Use override specifer for overriding member declarationsHenry Wilson
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.
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
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.
2017-01-14(svn r27732) -Change: Turn the message about 'missing baseset sprites' from ↵frosch
a popup into a static message that only shows in non-release versions, just like the 'missing translations' message.
2017-01-07(svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG ↵frosch
instead, which does the same in all use-cases.
2017-01-07(svn r27723) -Codechange: Simplify tests by using GCF_SYSTEM.frosch
2017-01-07(svn r27721) -Fix: Testing GRFs for static-safety (when reloading the ↵frosch
config) invalidated file slot 62, which may be in use by an active GRF.
2016-10-30(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) ↵frosch
threads. (JGR)
2014-11-18(svn r27063) -Fix [FS#6172]: Some lists did not use natural string sorting.frosch
2014-10-12(svn r27003) -Cleanup: fix the use of spaces and asterices "around" some ↵rubidium
comments
2014-05-24(svn r26612) -Add: Method to copy newgrf parameters.alberth
2014-04-28(svn r26538) -Codechange: remove double accounting of the driversrubidium
2014-04-25(svn r26509) -Codechange: replace strdup with stredup (the latter ensures ↵rubidium
the return is not NULL)
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-11-23(svn r26070) -Fix: prevent extremely huge size for data (1+GiB)rubidium
2013-11-23(svn r26061) -Fix: negative result of ftell wasn't handled correctly in some ↵rubidium
cases
2013-11-23(svn r26058) -Fix: handle the return value of a number of functions betterrubidium
2013-11-23(svn r26057) -Fix: a number of possibly uninitialised variablesrubidium
2012-06-01(svn r24318) -Feature: Add dropdowns to NewGRF configurations, if all values ↵frosch
have labels.
2012-02-12(svn r23935) -Codechange: generalise GetTextfilerubidium
2012-02-04(svn r23887) -Feature: [NewGRF] Support for container version 2.michi_cc
2012-01-15(svn r23807) -Codechange: GRFError::num_params is not needed, remove it.frosch
2011-12-19(svn r23601) -Fix: fix the conflict in window numbertruebrain
2011-12-11(svn r23494) -Feature: [NewGRF] action14 node INFO->URL_ to add an urlyexo
2011-11-18(svn r23249) -Feature: Also allow viewing of the other two textfiles ↵frosch
supplied by BaNaNaS tars, i.e. changelog and license.
2011-11-18(svn r23248) -Codechange: Rename everything related to the NewGRF 'readme' ↵frosch
to 'textfile', so it is more generic.
2011-11-14(svn r23222) -Codechange: reduce tar scanning calls to the bare minimumrubidium
2011-11-14(svn r23217) -Codechange: introduce the concept of scanning only in a ↵rubidium
limited set of sub directories
2011-11-10(svn r23182) -Feature: allow translatable readme filesyexo
2011-11-10(svn r23178) -Feature [FS#4780]: in-game readme.txt readmer (LordAro)rubidium
2011-09-08(svn r22904) -Codechange: add tar filename to file scanningrubidium
2011-08-24(svn r22826) -Codechange: pass sub directory to NewGRF loading functionsrubidium
2011-08-24(svn r22822) -Codechange: make a distinction between base sets and newgrfs ↵rubidium
for their directory
2011-08-24(svn r22820) -Codechange: perform a full (re)draw cycle in the first draw ↵rubidium
during progress instead of waiting 200ms