Commit Graph

2374 Commits (62afd94b47d7c48ef2045540be9a62ec63a4827b)

Author SHA1 Message Date
Niels Martin Hansen b7751c483e
Feature: Influence industry production changes from GS (#7912) 4 years ago
Patric Stout d8c8f4e72d
Fix: next 67 savegame versions are used in PatchPacks; skip them (#8411)
Various of PatchPacks (Spring 2013, Joker, ChillPP) used versions
slightly higher than ours. Of course, as time went by, this
caught up with us, and we are now almost pushing a new version
that would conflict with them. To avoid users creating unneeded
issues about "why can I not load my savegame", lets be ahead of
the curve and flat-out refuse to load them.

Version-wise, this is totally fine. We have ~32k versions to go
before we run out (0x8000 is masked by JGRPP; we should avoid
using that). At the rate we bump savegames, this is not going to
happen in any sane reality.
4 years ago
Jonathan G Rennison 8ac436f507 Add setting to scale primary industry cargo production 4 years ago
Jonathan G Rennison f0c3a4b42e Saveload: Store NewGRF name in savegame, include in missing GRF message 4 years ago
Jonathan G Rennison 207c79a736 Saveload: Fix SLE*_CONDSSTR* macros 4 years ago
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
4 years ago
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 4 years ago
Jonathan G Rennison 840e459601 Revert "Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. (#8356)"
This is not necessary due to 5243cfd6d0.

This reverts commit c558936ec3.
4 years ago
Jonathan G Rennison 4436da7436 Saveload: Skip GetVariableAddress asserts if _DEBUG not defined 4 years ago
Jonathan G Rennison 4da3cfcf56 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/bootstrap_gui.cpp
4 years ago
Patric Stout 731af1f1f3 Codechange: don't do work GetVariableAddress() is already doing 4 years ago
Patric Stout c98717cb45 Fix: do not add an offset to a nullptr
This is, by specs, undefined behaviour. See
https://reviews.llvm.org/D67122

In cases where this is done, optimizations done by LLVM can
generate code that causes crashes.

GetVariableAddress() had two (legit) ways this could happen:
- For SaveLoad set to global
- For SaveLoad set to SLE_VAR_NULL, where sld->address is always
  a nullptr, and object could or could not be a nullptr.
4 years ago
Michael Lutz c558936ec3
Fix 63ccb36ef3: Crash trying to load TTO/TTD savegames. (#8356) 4 years ago
Jonathan G Rennison 3e1ab88323 Fix NRT road/tram type conversion on savegame load from JokerPP v1.27 4 years ago
Jonathan G Rennison 270a748b64 Tracerestrict: Add time/date conditional 4 years ago
Jonathan G Rennison 2ad446369d Cache animated tile speed, use btree map for animated tiles 4 years ago
Jonathan G Rennison 1f54c8a018 Send vehicle caches to network clients to prevent desyncs due to bad GRFs 4 years ago
Jonathan G Rennison 9efeb3551a Tunnel/bridge signal simulation spacing is now a company setting 4 years ago
Jonathan G Rennison 0902243ab3 Allow changing the colour of plans 4 years ago
Jonathan G Rennison 57d47b9bae Add support for overtaking inside (non-custom) bridges/tunnels 4 years ago
Jonathan G Rennison ffe3c769a3 Add road tile cached one way state, one way road section detection 4 years ago
Jonathan G Rennison 3a75f13874 Allow drive-through road stops to be one-way 4 years ago
Jonathan G Rennison de5fb361ad Fix crash when saving order backups 4 years ago
Jonathan G Rennison e1aca1ab34 Extend Order::flags to 16 bits, fixes conditional order target field size
Adjust order packing and CmdInsertOrder

See: #198
4 years ago
Jonathan G Rennison b9f7db9c7e Jump counter is no longer a separate field 4 years ago
Jonathan G Rennison 1716083a30 Use saveload object filtering for order chunks 4 years ago
Jonathan G Rennison bb862100af Fix operator typo in 6dd7b286 in oldloader_sl.cpp 4 years ago
Jonathan G Rennison 6dd7b2869c Increase per-vehicle order limit to 64k
See: #110
4 years ago
Jonathan G Rennison cce6d731a1 TBTR: Delete orphaned virtual trains on client disconnection 4 years ago
Jonathan G Rennison 3b47b7b091 Plans: Improve performance of viewport plan rendering 4 years ago
Jonathan G Rennison 84dd35b685 Add drive-through train depot emulation (default off) 4 years ago
Jonathan G Rennison 4763f441f6 On load, use previous local company or first usable company
Instead of always using the first company slot
4 years ago
Jonathan G Rennison 2ea3a7d6f4 Add setting for default road/tram types, to match default rail type setting 4 years ago
Jonathan G Rennison 2d350d26db Add rate limit for object construction 4 years ago
Jonathan G Rennison ff12051ee1 Only show ship is lost messages if lost for a significant time 4 years ago
Jonathan G Rennison 825190db0c Remove programmable pre-signal calls to DebugPrintProgram 4 years ago
Jonathan G Rennison abb7b69861 Add slot and counter support to programmable pre-signals 4 years ago
Jonathan G Rennison 9ee8091ecc Add conditional order which tests counter value 4 years ago
Jonathan G Rennison 817bc44a3e Initial implementation of tracerestrict counter mechanism 4 years ago
Jonathan G Rennison d2594ece79 Add routing restrictions action to control news reports about stuck trains 4 years ago
Jonathan G Rennison beaeda2990 TBTR: Show empty and full train weights in GUI, and weight ratios if enabled 4 years ago
Jonathan G Rennison e2de103d82 Skip GRF compatibility check when using -K/-q switches 4 years ago
Jonathan G Rennison 5b78090a61 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/saveload/town_sl.cpp
#	src/screenshot.h
#	src/script/api/ai/ai_date.hpp.sq
#	src/script/api/ai/ai_marine.hpp.sq
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_date.hpp.sq
#	src/script/api/game/game_marine.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/game/game_window.hpp.sq
#	src/script/api/script_window.hpp
#	src/script/api/template/template_window.hpp.sq
#	src/signal.cpp
#	src/statusbar_gui.cpp
#	src/toolbar_gui.cpp
#	src/viewport.cpp
#	src/viewport_func.h
4 years ago
Jonathan G Rennison 2b9c633d50 Add leave early if any/all cargoes fully loaded timetable modes 4 years ago
Jonathan G Rennison 1fd9c929ef Increase church/stadium count field size, fix save/load
Fix too many error message
4 years ago
Jonathan G Rennison b7118b60fe Add setting to enable multiple churches/stadiums in scenario editor
See: #177
4 years ago
dP 452e1e3328 Codechange #8258: Remove unused town cargo caches from the savegame 4 years ago
TechGeekNZ a10013dd00 Codechange: Spell 'Viewport' consistently
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Jonathan G Rennison 1f5de8b82c Auto separation: Remove circular linked list, use new algorithm 4 years ago
Jonathan G Rennison 53f9fa139d Remove redundant year/month date globals 4 years ago
Jonathan G Rennison 6288abae56 Saveload: Improve error messages for loading unsupported versions 4 years ago
Jonathan G Rennison f4cf966167 Saveload: Add version label feature to SLXI chunk 4 years ago
Jonathan G Rennison 3adeff1883 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	cmake/CompileFlags.cmake
#	src/bridge_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/town_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/toolbar_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
4 years ago
Jonathan G Rennison d6f785d125 Merge branch 'pr-163' into jgrpp 4 years ago
Jonathan G Rennison 1aefc9d010 Use malloc instead of calloc for MemoryDumper::AllocateBuffer 4 years ago
TechGeekNZ cf8ea74733 Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake 4 years ago
dP 7045186594 Change #8159: Remove now unused town cargo caches without bumping the savegame version 4 years ago
dP ca2604c4e2 Revert #8157: Redundant change 4 years ago
Jonathan G Rennison 7a09413a1a Fix: Incorrect save/load array size of Town::cargo_accepted
In 11ab3c4e the number of cargo types was changed from 32 to 64.
The save/load of Town::cargo_accepted was not updated, such that
only half of the data structure is saved/loaded in savegame versions
199 to 218.
Discard and regenerate data from all savegame versions prior to 219.
4 years ago
Jonathan G Rennison 54237b0e98 Codechange: Move SlSkipBytes to saveload.h 4 years ago
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 4 years ago
Jonathan G Rennison 27b92c3526 Fix #159: Incorrect display date on load for savegame versions < 31 4 years ago
Jonathan G Rennison f5e9805b10 Store time display settings both in savegame and client, add setting 4 years ago
Jonathan G Rennison e6f3e15c32 Fix 63ccb36e: Incorrect string type for OrderBackup::name save/load
In 63ccb36e BaseConsist::name was changed from a malloced char*
to a std::string.
OrderBackup inherits from BaseConsist.
The saveload of OrderBackup::name was not updated.
4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
Jonathan G Rennison 5243cfd6d0 Use TinyString for custom name fields which are almost always empty 4 years ago
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
4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
Michael Lutz 9b6f5e3bb8 Codechange: Store GS lang texts in std::strings. 4 years ago
Jonathan G Rennison ea06a0670d Add rail ground type support for rail custom bridge heads
See: #146
4 years ago
Jonathan G Rennison 77673b731c Merge branch 'master' into jgrpp
# Conflicts:
#	src/industry_cmd.cpp
#	src/openttd.cpp
#	src/station_cmd.cpp
#	src/station_func.h
4 years ago
glx22 cca613e3b8
Fix #8142, 5aa6351: Buoy owner and tile owner can be different (#8143) 4 years ago
Jonathan G Rennison 763a2826b6 Merge branch 'master' into jgrpp
# Conflicts:
#	src/gamelog.cpp
4 years ago
Jonathan G Rennison 0202211514 Conditional orders: Add slot acquire modes to train in slot conditional 4 years ago
glx 5aa6351042 Fix #8132: Corrupted savegame crashing OpenTTD on load 4 years ago
glx 0ed00ae111 Fix: Stop any gamelog action when recovering from SlError() 4 years ago
Jonathan G Rennison 0100ea4e32 Conditional orders: Add mode to check waiting station cargo via next node 4 years ago
Jonathan G Rennison 07c9621fcf Merge branch 'master' into jgrpp 4 years ago
glx bc8333723c Fix #8021: limit savegame range for docking tiles fixing 4 years ago
Yexo 64278fd598 Fix: reset roadtype/streetcartype info for non-road bridges 4 years ago
Yexo 19dc31e0b3 Fix #8108: always update tile_hash after updating v->tile 4 years ago
SamuXarick 8edbb42fe8 Fix c01a2e2: crash on loading old savegames with invalid animated tile information 4 years ago
SamuXarick c01803cd42 Fix #8108: possible crash on loading TTD savegames with phantom oil rigs 4 years ago
Jonathan G Rennison eef6ad7b2a Crash log: Save config file in new crash save chunk 4 years ago
Jonathan G Rennison 1506479f56 Cheat: Add cheats to set inflation income and cost factors
See: #124
4 years ago
Jonathan G Rennison 3e7618f519 Save/load: Add extra cheats savegame chunk 4 years ago
Jonathan G Rennison d210bc4d14 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/korean.txt
#	src/saveload/afterload.cpp

Recalculate docking tile cache due to 57553cd8
4 years ago
SamuXarick 57553cd809 Fix #8020: Add missing docking tiles around industry neutral stations 4 years ago
Jonathan G Rennison ba65a79d09 Enable allowing/disallowing supply to a station, per cargo
Ctrl-click station cargo rating
4 years ago
Jonathan G Rennison 8956b1ab02 Improve performance of tunnel rendering in viewport map mode 4 years ago
Jonathan G Rennison b96e7f78fb Merge branch 'master' into jgrpp 4 years ago
glx 9116b22386 Fix #8011, f5381798: Dock tile in TTD savegame was only 2 bytes 4 years ago
Jonathan G Rennison babe98cdb1 Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/network_server.h
#	src/pathfinder/yapf/yapf_road.cpp
#	src/viewport.cpp
4 years ago
glx 2f264f2c92 Change: Heading for 1.11 now 4 years ago
Johannes E. Krause 107283748a Feature: SLF_HEX to print hexadecimal numbers in the config file 4 years ago
Jonathan G Rennison 76f68c48f5 Cache whether vehicle is currently drawn: Vehicle::IsDrawn() 4 years ago
Jonathan G Rennison dd99fd646d Merge branch 'master' into jgrpp
# Conflicts:
#	src/base_station_base.h
#	src/industry.h
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/lang/korean.txt
#	src/os/macosx/crashlog_osx.cpp
#	src/station_cmd.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_gui.cpp
4 years ago
Jonathan G Rennison 09b13dd484 Add conditional orders for cargo load percentage and waiting cargo amount
See: #90
5 years ago
Jonathan G Rennison bb363695fc YAPF: Prevent user for configuring signal penalties to negative values
Warn if signal penalty polynomial goes negative, and clamp to non-negative
5 years ago
Jonathan G Rennison 424813446f TBTR: Avoid unnecessary iterations of template replacement pool 5 years ago
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 5 years ago
frosch a4be4514c9 Fix #7925: Reset temporary saveload data at the start of loading a savegame instead of at the end.
Otherwise temporary data may be passed from an aborted load action to the next load action.
5 years ago
Jonathan G Rennison 7960db35f2 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	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/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
5 years ago
Charles Pigott d1cead7f25 Fix: When loading old timetabled saves, also reset cached timetable duration 5 years ago
Charles Pigott cddb8a4605 Fix #7587: Crash when loading saves with waypoints with invalid locations 5 years ago
Jonathan G Rennison 6f75d9119d ChillPP: Add support for loading compatible linkgraph settings 5 years ago
Jonathan G Rennison c681a9d5de Fix vehicle timetable automate flag from ChillPP v8 savegames 5 years ago
Jonathan G Rennison b8b84a9a0b Fix leftover PBS reservation on signalled tunnel/bridge entrances in ChillPP savegames 5 years ago
Jonathan G Rennison 4936b3ba51 Add support for loading ChillPP v8 savegames 5 years ago
Jonathan G Rennison 5dc1027c6b Add initial support for loading ChillPP v14.7 savegames 5 years ago
Jonathan G Rennison b4453fac23 Saveload: Log chunk sizes when load fails due to chunk size mismatch 5 years ago
Jonathan G Rennison 796a878b90 Fix town growth rates when loading JokerPP v1.27 savegames
See #123
5 years ago
Jonathan G Rennison ec0b43f231 Clear rail ageing data when loading JokerPP savegames
See #123
5 years ago
Jonathan G Rennison f0754b007e Fix road/tram type handling when loading JokerPP v1.27 savegames
See #123
5 years ago
Jonathan G Rennison 6f7ed57fbd Fix loading of ORDX chunk from JokerPP savegames
See #123
5 years ago
Jonathan G Rennison d56d4ea51f Add initial support for loading JokerPP savegames
See #123
5 years ago
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
5 years ago
Jonathan G Rennison c75ed00f0f Saveload: Allow discarding chunks with a load handler 5 years ago
glx ee7a8eebca Codechange: Replace FOR_ALL_TOWNS with range-based for loops 5 years ago
glx 0b489f9924 Codechange: Replace FOR_ALL_SUBSIDIES with range-based for loops 5 years ago
glx 847e5f33d4 Codechange: Replace story related FOR_ALL with range-based for loops 5 years ago
glx 869581eb23 Codechange: Replace FOR_ALL_SIGNS with range-based for loops 5 years ago
glx b91abd3af9 Codechange: Replace FOR_ALL_ROADSTOPS with range-based for loops 5 years ago
glx 514565fad6 Codechange: Replace FOR_ALL_OBJECTS with range-based for loops 5 years ago
glx 11f178a312 Codechange: Replace FOR_ALL_STORAGES with range-based for loops 5 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
glx 9892d90b26 Codechange: Replace order related FOR_ALL with range-based for loops 5 years ago
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 5 years ago
glx 00c2a98cf3 Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops 5 years ago
glx 4ae829cb27 Codechange: Replace FOR_ALL_GROUPS with range-based for loops 5 years ago
glx f58ce3db19 Codechange: Replace FOR_ALL_GOALS with range-based for loops 5 years ago
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 5 years ago
glx 1c92ba8ebe Codechange: Replace FOR_ALL_CARGO_PAYMENTS with range-based for loops 5 years ago
glx fa9769f81a Codechange: Replace FOR_ALL_DEPOTS with range-based for loops 5 years ago
glx 5fce5fa300 Codechange: Replace FOR_ALL_CARGOPACKETS with range-based for loops 5 years ago
glx 60e3cf8aff Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 5 years ago
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
Jonathan G Rennison 0704fb81a3 Fix narrowing cast error in Load_VESR() in MSVC 5 years ago
Jonathan G Rennison aa8aae9a62 Initial implementation of tracerestrict speed restriction feature 5 years ago
Jonathan G Rennison 030e8bf762 Rename programmable signals to programmable pre-signals
This is to make it less unclear what they actually are and do
5 years ago
Jonathan G Rennison bbd487a2a7 Revert "Avoid unnecessary calls to SettingsDisableElrail in AfterLoadGame"
This reverts commit 5008a09fe9.

This seems to cause regressions with some older savegames/GRF configurations.
5 years ago
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
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison e568100407 Fix SlError exception handling in threaded load mode 5 years ago
Jonathan G Rennison 785eed2958 Fix loading of savegames which use LZO compression 5 years ago
Jonathan G Rennison ca3c72438e Merge branch 'master' into jgrpp
# Conflicts:
#	Makefile.bundle.in
#	src/os/macosx/string_osx.cpp
#	src/station_cmd.cpp
5 years ago
Jonathan G Rennison 91ca46c774 Fix -Wdeprecated-copy and -Wclass-memaccess warnings on GCC 9 5 years ago
Jonathan G Rennison b6e9817edb Link graph: Explicitly flag invalidated flow stats instead of minimising their flows
Entirely exclude invalidated flow stats from link stats

Delete invalidated flow stats if they stay invalid for 32 link graph jobs

This is to prevent large numbers of invalidated flow stats from
unduly influencing link statistics
5 years ago
Jack Baron e4f08f2880 Fix: Bump savegame version 5 years ago
Jonathan G Rennison 2deadabc97 Saveload: Improve SpringPP savegame detection
Trunk savegames will soon reach the range of versions used by SpringPP
5 years ago
Jonathan G Rennison 1bbfd69657 Bump tracerestrict version due to 7332c0b6 5 years ago
Jonathan G Rennison 3b178b6f07 Scheduled dispatch: Add order backup support 5 years ago
Jonathan G Rennison edfd378e93 Merge branch 'master' into jgrpp
# Conflicts:
#	source.list
#	src/blitter/32bpp_anim.cpp
#	src/linkgraph/linkgraphjob.cpp
#	src/order_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_type.h
5 years ago
Jonathan G Rennison 0246d59c8d FlowStat: Replace btree_map with flat map which is inlined in small case
Inline storage for size <= 2
Size = 1 is ~90%
Size = 2 is ~9%
Size >=3 is ~1% and gets a separate allocation
5 years ago
Jonathan G Rennison 90550d9642 FlowStatMap: Replace RB-tree with btree-indexed vector 5 years ago
Jonathan G Rennison 0a1c1809ab Save/load: Pre-filter SaveLoad descriptor arrays for current version/mode, for chunks with many objects 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Jonathan G Rennison 5008a09fe9 Avoid unnecessary calls to SettingsDisableElrail in AfterLoadGame 5 years ago
Jonathan G Rennison b6d755221a Add load filter to perform savegame decompression in a separate thread 5 years ago
Jonathan G Rennison 1391f8fc59 Use insert hints for station flow/share map insertion 5 years ago
Jonathan G Rennison a30638bc4a Merge branch 'jgrpp' into jgrpp-nrt 5 years ago
Jonathan G Rennison 6792495705 Add -K switch to write savegame debug data and exit 5 years ago
Jonathan G Rennison 04ef407ddf Merge branch 'jgrpp' into jgrpp-nrt
# Conflicts:
#	.ottdrev-vc
#	README.md
#	jgrpp-changelog.md
#	src/ship_cmd.cpp
5 years ago
Jonathan G Rennison a1d36b02f0 Network: Add state checksum which is check in network sync 5 years ago
Jonathan G Rennison bc0de9b6ef Rebuild total cargo acceptance on load even for empty acceptance area 5 years ago
Jonathan G Rennison 1365600bed Merge branch 'jgrpp' into jgrpp-nrt 5 years ago
Jonathan G Rennison d3e0c3787f Merge branch 'master' into jgrpp-nrt
Merge trunk multiple docks implementation

# Conflicts:
#	docs/landscape_grid.html
#	src/order_cmd.cpp
#	src/pathfinder/npf/npf.cpp
#	src/pathfinder/yapf/yapf_ship.cpp
#	src/rail_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/oldloader_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_order.cpp
#	src/ship_cmd.cpp
#	src/station.cpp
#	src/station_base.h
#	src/station_cmd.cpp
#	src/tunnelbridge_cmd.cpp
5 years ago
Jonathan G Rennison dbc5f1baed Merge branch 'master' into jgrpp-nrt
# Conflicts:
#	src/fontcache.cpp
#	src/game/game_text.cpp
#	src/lang/korean.txt
#	src/os/macosx/crashlog_osx.cpp
#	src/os/windows/crashlog_win.cpp
#	src/station_cmd.cpp
#	src/viewport.cpp
5 years ago
Jonathan G Rennison ba8ed880c1 Merge branch 'master' into jgrpp-nrt
Merge NRT feature

# Conflicts:
#	docs/landscape.html
#	docs/landscape_grid.html
#	src/bridge_map.h
#	src/build_vehicle_gui.cpp
#	src/company_base.h
#	src/company_cmd.cpp
#	src/misc_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_engine.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/npf/npf.cpp
#	src/road_cmd.cpp
#	src/road_func.h
#	src/road_gui.cpp
#	src/road_map.h
#	src/road_type.h
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/script/api/script_bridge.cpp
#	src/table/newgrf_debug_data.h
#	src/tile_cmd.h
#	src/town_cmd.cpp
#	src/tunnel_map.h
#	src/tunnelbridge_cmd.cpp
5 years ago
Jonathan G Rennison eab5db9769 Fix corruption of conditional order targets when loading SpringPP savegames 5 years ago
Jonathan G Rennison 97221a67f2 Merge branch 'template_train_replacement' into jgrpp
# Conflicts:
#	src/saveload/vehicle_sl.cpp
5 years ago
Jonathan G Rennison bba36aef1b TBTR: Check for mixed virtual/non-virtual consists on load 5 years ago
Jonathan G Rennison 0f6c5ee622 Fix saveload exception handling when gamelog action in progress 5 years ago
Jonathan G Rennison 36eb4165b8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/bridge_map.h
#	src/crashlog.cpp
#	src/industry.h
#	src/linkgraph/linkgraph_type.h
#	src/order_type.h
#	src/saveload/afterload.cpp
#	src/settings.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/table/settings.h.preamble
#	src/train.h
#	src/vehicle.cpp
#	src/viewport.cpp
#	src/viewport_func.h
#	src/widgets/station_widget.h
#	src/zoom_func.h
#	src/zoom_type.h
5 years ago
Jonathan G Rennison f78b72989b Merge branch 'template_train_replacement' into jgrpp
# Conflicts:
#	src/saveload/vehicle_sl.cpp
#	src/train.h
5 years ago
Jonathan G Rennison f1946af707 TBTR: Delete leftover virtual trains on non-network client load 5 years ago
peter1138 f538179878 Feature: Multi-tile docks and docking points. 5 years ago
Jonathan G Rennison 1d5ba98932 Show time and in game date of game load in desync/crash logs 5 years ago
Jonathan G Rennison e21c80ae45 Refresh town cargo acceptance/production on load on NewGRFs mismatch
Also when reloading NewGRFs
5 years ago
Jonathan G Rennison c2470a21af Fix town production and acceptance cache saveload/update handling 5 years ago
Jonathan G Rennison 829c635add Add road layout change counter, add to road veh path caches
Update layout counter when non-leaf road bits are added or removed
5 years ago
Jonathan G Rennison 5a9790a196 Store crash/desync logs in crash/desync savegame
Add console command to dump loaded debug log
5 years ago
Jonathan G Rennison ec1e848a7f Add log of game events since last load and overall
Add console command
Add to crashlog
5 years ago
PeterN 6fabfc3f21 Fix #7577: Check if linkgraph station index is valid before dereferencing. (#7583)
(cherry picked from commit 83c1678f9e)
5 years ago
Jonathan G Rennison b91ee6fb4b Improve performance of name sorting in industry list window 5 years ago
Jonathan G Rennison f6b9395c6a Improve performance of name sorting in town and station list windows 5 years ago
Niels Martin Hansen 140a96b3a0 Change: Limit memory allocations for each Squirrel instance
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
5 years ago
PeterN 83c1678f9e
Fix #7577: Check if linkgraph station index is valid before dereferencing. (#7583) 5 years ago
Charles Pigott 10c8104e70 Fix 5db883f: Railtype bits were moved too late, leading to rails under bridges losing their type
(cherry picked from commit 63a7df027d)
5 years ago
Charles Pigott e334f7db30 Fix #6507: Don't try to load invalid depots from older savegames
(cherry picked from commit d9f9a64389)
5 years ago
Charles Pigott 44911ec254 Fix: Crash when attempting to load old save game with GRFs set
GroupStatistics pool was not initialised before trying to delete vehicles (specifically, trams with no tram track)

(cherry picked from commit 9da1c5bb0b)
5 years ago
Jonathan G Rennison 1ee33c46ef Linkgraph: Allow overriding distribution mode on a per-cargo basis, in game 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
Charles Pigott 63a7df027d Fix 5db883f: Railtype bits were moved too late, leading to rails under bridges losing their type 5 years ago
Charles Pigott d9f9a64389 Fix #6507: Don't try to load invalid depots from older savegames 5 years ago
Charles Pigott 3299d6540b Cleanup: Delete GetSavegameType function since it's been commented out since 2005 5 years ago
Charles Pigott 9da1c5bb0b Fix: Crash when attempting to load old save game with GRFs set
GroupStatistics pool was not initialised before trying to delete vehicles (specifically, trams with no tram track)
5 years ago
Charles Pigott 327ff89808 Codechange: Remove PauseModeByte 5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 5 years ago
Charles Pigott f20b75d712 Codechange: Remove TownLayoutByte type 5 years ago
Charles Pigott 96a4787710 Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte 5 years ago
Jonathan G Rennison f54f549632 Add SlXvCheckSpecialSavegameVersions constants to SaveLoadVersion enum 5 years ago
Jonathan G Rennison a6ea1ea408 Allow articulated road vehicles to overtake other vehicles
Add setting
5 years ago
Jonathan G Rennison 0d93ecb6bf Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/alloc_type.hpp
#	src/group_gui.cpp
#	src/newgrf.cpp
#	src/saveload/economy_sl.cpp
#	src/saveload/map_sl.cpp
#	src/station_cmd.cpp
5 years ago
Michael Lutz 4e85ccf3c0 Codechange: Replace SmallStackSafeStackAlloc with std::array.
The only port that ever used it to make heap allocations instead of stack ones was the NDS port, which got thrown out some time ago.
5 years ago
peter1138 4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison f5747bf753 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
5 years ago
Jonathan G Rennison 8c3d1b1c45 Convert secondary rail types in AfterLoadLabelMaps
Handle missing rail types
5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz 8b1880187a Remove: AutoFreeSmallVector.
The last use was for storing a list of memory blocks. As the way these lists are accessed is very
specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
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
Michael Lutz d3e113eb5f Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling. 5 years ago
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
5 years ago
Jonathan G Rennison d5ee9d34da Merge branch 'cpp-11' into crashlog_improvements
# Conflicts:
#	Makefile.src.in
#	projects/determineversion.vbs
#	source.list
#	src/crashlog.cpp
#	src/misc.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rev.h
#	src/thread/thread.h
#	src/thread/thread_morphos.cpp
#	src/thread/thread_none.cpp
#	src/thread/thread_os2.cpp
#	src/thread/thread_pthread.cpp
#	src/thread/thread_win32.cpp
5 years ago
Jonathan G Rennison 7f80884047 Merge branch 'cpp-11' into save_ext
# Conflicts:
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
5 years ago
Michael Lutz 94c5269fa7 Codechange: Use atomic variables for thread synchronization where useful. 5 years ago
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.
5 years ago
Jonathan G Rennison 53ff27370d Do not update viewport sign kd tree in network dedicated mode, or during savegame conversion 5 years ago
Jonathan G Rennison c7d96d037b Fix RebuildViewportKdtree being called too early in AfterLoadGame 5 years ago
Jonathan G Rennison 58433c7667 Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/smallmap_type.hpp
#	src/lang/korean.txt
#	src/network/network_content.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
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
5 years ago
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 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 f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Peter Nelson f6264e5212 Change: Bump savegame version for tree tile water class conversion. 5 years ago
Peter Nelson 76e77aefad Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally
update the map array for tree tiles.
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
Charles Pigott fe448a2616 Remove: OPF 5 years ago
Jonathan G Rennison 5e6d283463 Merge branch 'master' into jgrpp
Remove the viewport sign cache as this is now superseded by the kd tree
implementation

# Conflicts:
#	src/crashlog.cpp
#	src/lang/english.txt
#	src/misc.cpp
#	src/pathfinder/follow_track.hpp
#	src/pbs.cpp
#	src/rail_cmd.cpp
#	src/saveload/vehicle_sl.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/station.cpp
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/thread/thread_morphos.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
#	src/waypoint.cpp
5 years ago
Patric Stout 7adae09897 Codechange: liblzma is called liblzma, how ever strange that might be
It is the only library we use that calls itself with 'lib' in the
name. This might be confusing, but with the arrival of cmake a lot
of these things are automated. And detection will find 'liblzma',
not 'lzma', like with 'lzo', 'zlib', ..
5 years ago
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 5 years ago
Niels Martin Hansen d84b67e54d Codechange: Make a k-d tree index of stations 5 years ago
Niels Martin Hansen 7b56be0f3a Codechange: Make a k-d tree index of towns 5 years ago
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
PeterN 6c6971fb43
Add: Road vehicle path cache. (#7261) 5 years ago
PeterN dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
5 years ago
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 5 years ago
Niels Martin Hansen 52572cafa6 Add: Option for population-linear town cargo generation
Introduce a new default algorithm for town cargo generation (passengers and mail), and a game setting to choose between the new and original algorithm.

The original town cargo generation algorithm has the property of the generated amount relating to the square of each building's population, meaning large towns easily produce more cargo than can realistically be transported. The problem is excessive cargo is amplified if playing with cargodist.

The new algorithm introduced instead has a linear relation to the population. The result is that smaller towns will produce slightly more cargo, while the largest towns will produce about a fourth of what they would with the original algorithm.

Existing savegames will use the original algorithm, while new games will default to the new algorithm.
5 years ago
Jonathan G Rennison 718554d255 Set tree water class for old savegames for chunnel support 5 years ago
Jonathan G Rennison 7ff252c58d Merge branch 'master' into jgrpp
# Conflicts:
#	Makefile.src.in
#	findversion.sh
#	projects/determineversion.vbs
#	src/aircraft_cmd.cpp
#	src/lang/dutch.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/order_cmd.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.cpp
#	src/town_cmd.cpp
#	src/viewport.cpp
#	src/water_map.h
5 years ago
frosch a67ee02529
Change: Heading for 1.10 now (#7319) 5 years ago
Jonathan G Rennison b3a7a04cf2 Linkgraph: Pause game on load if a link graph join is immediately due 5 years ago