Jonathan G Rennison
0a31a3b923
Fix for crash when exiting whilst NewGRF scan still in progress
...
See: https://github.com/OpenTTD/OpenTTD/issues/8760
2021-03-01 18:04:12 +00:00
Jonathan G Rennison
68a0a4d1b9
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/newgrf_config.cpp
2021-02-19 20:34:14 +00:00
Patric Stout
8bf8c0f251
Fix d437445c
: also use std::chrono for the GRFFileScanner modal window
...
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-02-19 19:56:40 +01:00
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
2021-02-01 17:07:34 +00:00
Jonathan G Rennison
6c3e5642f8
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/crashlog.cpp
# src/fileio.cpp
# src/fileio_func.h
# src/fios_gui.cpp
# src/ini_load.cpp
# src/ini_type.h
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/network/network_client.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/os/windows/win32.cpp
# src/road_cmd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/table/settings.ini
# src/tree_cmd.cpp
# src/tree_gui.cpp
# src/vehicle_base.h
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/event.mm
# src/video/cocoa/wnd_quartz.mm
# src/viewport.cpp
# src/widgets/tree_widget.h
2021-01-31 01:08:35 +00:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Michael Lutz
b408fe77f7
Codechange: Use std::string in file scanners.
2020-12-27 13:19:25 +01:00
Jonathan G Rennison
f0c3a4b42e
Saveload: Store NewGRF name in savegame, include in missing GRF message
2020-12-16 02:06:48 +00:00
Jonathan G Rennison
f8d6e781ba
Merge branch 'master' into jgrpp
...
# Conflicts:
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj.filters
# src/base_consist.h
# src/company_base.h
# src/newgrf_config.cpp
# src/newgrf_config.h
# src/openttd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/settings.cpp
# src/signs_base.h
# src/string.cpp
# src/string_func.h
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/town_cmd.cpp
# src/vehicle.cpp
# src/vehicle_cmd.cpp
# src/video/cocoa/cocoa_v.mm
# src/video/null_v.cpp
2020-05-21 22:24:01 +01:00
Michael Lutz
9c2e47d03c
Codechange: Use std::string for storing GRF error messages.
2020-05-21 20:02:34 +02:00
Michael Lutz
43cd892e0c
Codechange: Replace custom linked list for GRF texts with STL vectors and strings.
2020-05-21 20:02:34 +02:00
Michael Lutz
f2b40f40aa
Codechange: Replace SmallPair with std::pair.
...
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
2020-05-21 20:02:34 +02:00
Jonathan G Rennison
e2ab622a14
Avoid data race in modal progress mode
2020-04-12 00:12:58 +01:00
Jonathan G Rennison
6ada7c3c7f
Logging: Log full file names of opened GRFs
2019-12-11 20:34:04 +00:00
Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
2019-11-12 18:43:10 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Jonathan G Rennison
beeab28e78
Fix 66b32df7
: Use after free in GRFFileScanner::AddFile
2019-11-03 23:59:25 +00:00
Jonathan G Rennison
2ba5b2531e
Fix compilation on MinGW
2019-10-12 01:17:41 +01:00
Jonathan G Rennison
66b32df7cc
Use multiple threads for NewGRF scan MD5 calculations, on multi-CPU machines
2019-09-25 02:54:07 +01:00
Jonathan G Rennison
bd2fdde759
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/sort_func.hpp
# src/rail_cmd.cpp
# src/timetable_cmd.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
2019-04-23 08:11:52 +01:00
glx
9388fa2aa1
Codechange: use std::vector to sort _all_grfs linked list
2019-04-18 21:49:34 +02:00
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
2019-04-11 18:14:13 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Jonathan G Rennison
361758b516
Merge branches 'crashlog_improvements', 'save_ext' into jgrpp
...
# Conflicts:
# Makefile.src.in
# projects/openttd_vs140.vcxproj
# projects/openttd_vs140.vcxproj.filters
# projects/openttd_vs141.vcxproj
# projects/openttd_vs141.vcxproj.filters
# projects/openttd_vs142.vcxproj
# projects/openttd_vs142.vcxproj.filters
# src/core/smallstack_type.hpp
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/linkgraphjob.h
# src/misc.cpp
# src/network/network_udp.cpp
# src/openttd.cpp
# src/saveload/saveload.cpp
2019-04-09 19:06:26 +01:00
Michael Lutz
05bc2ed7cb
Codechange: Replace custom thread code with C++11 thread objects.
...
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-06 11:27:39 +02:00
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.
2019-04-06 11:27:39 +02:00
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
2019-03-27 18:12:04 +00:00
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
aa7ca7fe64
Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n
2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
2019-03-26 20:15:57 +00:00
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.
2019-03-24 16:10:04 +01:00
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
Jonathan G Rennison
3fde2cb5b1
Remove unused constant from newgrf_config.cpp
2017-03-04 13:20:21 +00:00
Jonathan G Rennison
90cd312428
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/fios.h
2017-01-17 19:11:09 +00:00
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.
2017-01-14 18:30:26 +00:00
frosch
050271ed2d
(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.
2017-01-14 18:30:26 +00:00
frosch
a3b356e057
(svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG instead, which does the same in all use-cases.
2017-01-07 21:36:25 +00:00
frosch
a76847f362
(svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG instead, which does the same in all use-cases.
2017-01-07 21:36:25 +00:00
frosch
b363a639aa
(svn r27723) -Codechange: Simplify tests by using GCF_SYSTEM.
2017-01-07 21:22:26 +00:00
frosch
373a6d3497
(svn r27723) -Codechange: Simplify tests by using GCF_SYSTEM.
2017-01-07 21:22:26 +00:00
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.
2017-01-07 21:18:17 +00:00
frosch
4955e71ee0
(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.
2017-01-07 21:18:17 +00:00
Jonathan G Rennison
20a090b077
Show warning dialog if NewGRFs use too many string IDs.
...
Show when reloading/changing NewGRF config, or starting new game.
2016-12-08 23:48:53 +00:00
frosch
31f046bd9b
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
2016-10-30 17:29:33 +00:00
frosch
3f75b8bca2
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
2016-10-30 17:29:33 +00:00
Jonathan G Rennison
a3768d3a29
Label threads with a descriptive name where supported (pthreads).
2015-11-26 17:48:47 +00:00
frosch
e4063cb6d4
(svn r27063) -Fix [FS#6172]: Some lists did not use natural string sorting.
2014-11-18 20:12:42 +00:00
frosch
861b9bc85e
(svn r27063) -Fix [FS#6172]: Some lists did not use natural string sorting.
2014-11-18 20:12:42 +00:00
rubidium
660a95e5d2
(svn r27003) -Cleanup: fix the use of spaces and asterices "around" some comments
2014-10-12 18:41:53 +00:00