Commit Graph

138 Commits (e9c8c36af74057bee8767413364fdd170ee11048)

Author SHA1 Message Date
Jonathan G Rennison e9c8c36af7 Add missing include to src/sl/saveload.cpp 6 months ago
Jonathan G Rennison 16577279a1 Saveload: Save to temporary file name and rename to target on success 6 months ago
Jonathan G Rennison 4d0af08aad Saveload: Log number of bytes/blocks serialised during save 6 months ago
Jonathan G Rennison 26cb47935e Saveload: Raise error if fclose fails in FileWriter 6 months ago
Peter Nelson 64bc95722b Codechange: Cache train curve speed limit can be stored in 16 bits.
Cache curve speed modifier and max curve speed are both 16 bit values so can be stored in 16 bit types instead of 32 bit types.

(cherry picked from commit 3fc7b3b9a0)
6 months ago
Jonathan G Rennison 20b8cb3059 Add setting to use object land ground for purchased land
Default on
6 months ago
Jonathan G Rennison 041e71ec05 Merge branch 'master' into jgrpp
# Conflicts:
#	src/crashlog.cpp
#	src/gfx.cpp
#	src/network/network_client.cpp
#	src/openttd.cpp
#	src/openttd.h
#	src/saveload/saveload.cpp
#	src/survey.cpp
6 months ago
Jonathan G Rennison 9f205727bf Extend industry production/transported totals to 32 bits 6 months ago
Jonathan G Rennison fe730bce31 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/codeql.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows.yml
#	src/map.cpp
#	src/music/midifile.hpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/pbs.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_text.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_func.h
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/viewport.cpp
#	src/waypoint_cmd.cpp
6 months ago
Jonathan G Rennison ba79f7b2ba Merge branch 'master' into jgrpp
# Conflicts:
#	src/base_station_base.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_station.cpp
#	src/object_gui.cpp
#	src/saveload/settings_sl.cpp
#	src/saveload/station_sl.cpp
#	src/settings.cpp
#	src/settings_internal.h
#	src/timer/timer_game_calendar.cpp
7 months ago
Jonathan G Rennison 9d65fd9c2a Adjust handling of vehicles introduced before vehicle expiry stop year
See: #646
7 months ago
Jonathan G Rennison 828d2146eb Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/ai/ai_info.cpp
#	src/company_base.h
#	src/economy.cpp
#	src/game/game_info.cpp
#	src/gfx_type.h
#	src/linkgraph/linkgraph_gui.cpp
#	src/palette.cpp
#	src/palette_func.h
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
#	src/window.cpp
#	src/window_func.h
7 months ago
Jonathan G Rennison 93bf033107 Add whether the vehicle is non-front to the vehicle pool pointer tag
Add iteration filters which check this
7 months ago
Jonathan G Rennison 05e237f8d1 Add wrapper to iterate vehicle pool with vehicle type filter
Without needing to dereference vehicle pointers if using tagged pointers
7 months ago
Jonathan G Rennison 528aae3f3b Saveload: Remove unused engine save/load desc 7 months ago
Jonathan G Rennison 090656bd7f Adjust handling of year display in wallclock mode and company inauguration years
See: #657
7 months ago
Jonathan G Rennison 593a81d421 Saveload: Rename IsSavegameVersionUntil to IsSavegameVersionBeforeOrAt
To match upstream
7 months ago
Jonathan G Rennison 53b06a3d04 Add event flag for removing invalid RVs during load 7 months ago
Jonathan G Rennison f52d56249d Saveload: Use table format for industry build data chunks 7 months ago
Jonathan G Rennison 0e262620d2 Saveload: Use table format for NewGRF/ID mapping chunks 7 months ago
Jonathan G Rennison b3bd1bb5ad Use upstream load for non-table script chunks 7 months ago
Jonathan G Rennison a92377fe98 Use upstream save/load for various unchanged chunks 7 months ago
Jonathan G Rennison b178be36f3 Saveload: Maintain map of chunk ID to (first byte) block mode 7 months ago
Jonathan G Rennison dadbad2bfc Saveload: Log changes in SlExecWithSlVersion 7 months ago
Jonathan G Rennison 6dec7a5b35 Saveload: Add PeekByte method to ReadBuffer 7 months ago
Jonathan G Rennison bd2358f6cc Saveload: Tidy up logging of chunk IDs
Add helper to dump chunk IDs as strings
Avoid duplicate logging of load steps for upstream load paths
7 months ago
Jonathan G Rennison ba1fa3ad29 Saveload: Fix SlNullPointers with upstream chunks 7 months ago
Jonathan G Rennison b58ecb0cd8 Saveload: Remove unnecessary auto-length use for tracerestrict 7 months ago
Jonathan G Rennison 8e8d698b24 Fix comment spelling errors 7 months ago
Jonathan G Rennison a98a56669b Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/autoreplace_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/network/network_content.cpp
#	src/newgrf_roadstop.cpp
#	src/pathfinder/yapf/yapf_ship.cpp
#	src/road_gui.cpp
#	src/saveload/ai_sl.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_gui.cpp
#	src/video/cocoa/cocoa_ogl.h
#	src/video/sdl2_opengl_v.h
#	src/video/video_driver.hpp
#	src/video/win32_v.h
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
#	src/window.cpp
7 months ago
Jonathan G Rennison 4097fc4e33 Saveload: Enable upstream mode SlAutolength
Use non-upstream implementation for SlCopyBytes
7 months ago
Jonathan G Rennison 8a85055c68 Saveload: Use std::span for autosave temporary buffer view 7 months ago
Jonathan G Rennison 1040f9612f Saveload: Tag duplicate detection in SlTableHeader as maybe unused 7 months ago
Jonathan G Rennison a874bb70b1 Remove unused saveload desc in cheats_sl.cpp 7 months ago
Jonathan G Rennison 8581808952 Merge tag '14.0-beta2' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	src/cargotype.cpp
#	src/console_cmds.cpp
#	src/graph_gui.cpp
#	src/industry_cmd.cpp
#	src/industrytype.h
#	src/misc_gui.cpp
#	src/network/network_client.cpp
#	src/newgrf.cpp
#	src/newgrf_town.cpp
#	src/object_cmd.cpp
#	src/openttd.cpp
#	src/pathfinder/water_regions.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/table/build_industry.h
#	src/table/engines.h
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
7 months ago
Jonathan G Rennison c6893388ab Fix order flags collision in OT_GOTO_DEPOT
Move depot wait is timetabled flag to xflags
7 months ago
Jonathan G Rennison fdd666f66a Merge tag '14.0-beta1' into jgrpp
# Conflicts:
#	src/3rdparty/squirrel/squirrel/sqcompiler.cpp
#	src/aircraft.h
#	src/animated_tile.h
#	src/base_consist.h
#	src/cargotype.h
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/engine_gui.cpp
#	src/industry_gui.cpp
#	src/lang/english.txt
#	src/music/extmidi.cpp
#	src/network/core/network_game_info.cpp
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_industries.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/order_type.h
#	src/os/macosx/misc_osx.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rail_gui.cpp
#	src/rail_gui.h
#	src/roadveh.h
#	src/roadveh_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/saveload_error.hpp
#	src/script/api/script_town.cpp
#	src/settingsgen/settingsgen.cpp
#	src/ship.h
#	src/ship_cmd.cpp
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/strgen/strgen.h
#	src/table/settings/script_settings.ini
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_cmd.h
#	src/town_gui.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehicle_cmd.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/waypoint_base.h
#	src/widget.cpp
7 months ago
Jonathan G Rennison 838b166726 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_base.h
#	src/debug.cpp
#	src/debug.h
#	src/economy.cpp
#	src/engine_type.h
#	src/graph_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_cmd.h
#	src/network/core/os_abstraction.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings_type.h
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/tests/bitmath_func.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
7 months ago
Jonathan G Rennison 1f5b35fac4 Change link graph join and compression times to use scaled tick counter 7 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
7 months ago
Jonathan G Rennison 7460e73252 SaveLoad: Fix crash when joining network server which used GRF custom town zones 7 months ago
Jonathan G Rennison 903adceab5 Maintain map of targeted road vehicles to small UFO disaster vehicle 7 months ago
Jonathan G Rennison 1e2834a422 Use upstream/table format for game log chunk 7 months ago
Jonathan G Rennison b05738284b Windows: Avoid destruction of unjoined std::thread on ExitProcess
See: #649
8 months ago
Jonathan G Rennison 11f75933bf Saveload: Use table format for DATE, VIEW, MAPS chunks
Merge MISC into DATE
8 months ago
Jonathan G Rennison 195b3b6d1d Saveload: Add initial table chunk support to non-upstream save backend 8 months ago
Jonathan G Rennison 5aaff39164 Fix wrong saveload types for std::string 8 months ago
Jonathan G Rennison 60e59a8233 Saveload: Add wrapper to simplify conditionally upstream chunks
Where they're always saved as upstream and conditional on a feature
8 months ago
Jonathan G Rennison cfebbfac8c Merge branch 'master' into jgrpp
# Conflicts:
#	src/autoreplace_cmd.cpp
#	src/company_base.h
#	src/company_gui.cpp
#	src/cpu.cpp
#	src/debug.h
#	src/group.h
#	src/group_cmd.cpp
#	src/house.h
#	src/industry.h
#	src/newgrf_house.cpp
#	src/news_type.h
#	src/openttd.cpp
#	src/saveload/company_sl.cpp
#	src/settings_type.h
#	src/sl/oldloader_sl.cpp
#	src/story.cpp
#	src/table/town_land.h
#	src/viewport.cpp
8 months ago
Jonathan G Rennison d39236d50c Store state ticks directly in savegame instead of the offset
Initialise the state ticks value to a constant for new games,
instead of using an implicit offset of 0
8 months ago