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
2024-02-19 03:23:19 +00:00
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
2024-02-18 22:22:29 +00:00
Peter Nelson
2fd9096070
Change: Decouple and remove landscape-dependent cargo types. ( #11719 )
...
Cargo types of default engines, industries and houses are now specified in terms of label.
2024-02-04 10:16:08 +00:00
Peter Nelson
60dcf3b5e2
Codechange: Rename TownEffect to TownAcceptanceEffect.
...
This makes it clearer that TownEffect only affects acceptance behaviour.
2024-02-02 20:37:49 +00:00
Jonathan G Rennison
97e6f3062e
Adding of _t to (u)int types, and WChar to char32_t
...
See: eaae0bb5e
2024-01-07 17:20:41 +00:00
Jonathan G Rennison
2a31095118
Merge branch 'master' into jgrpp
...
# Conflicts:
# regression/regression/result.txt
# src/aircraft_cmd.cpp
# src/airport_gui.cpp
# src/articulated_vehicles.cpp
# src/console_cmds.cpp
# src/date_gui.cpp
# src/engine.cpp
# src/genworld_gui.cpp
# src/gfx_layout_fallback.cpp
# src/group_gui.cpp
# src/hotkeys.cpp
# src/network/core/tcp_connect.cpp
# src/network/core/tcp_listen.h
# src/newgrf.cpp
# src/newgrf.h
# src/newgrf_engine.cpp
# src/newgrf_gui.cpp
# src/newgrf_station.cpp
# src/openttd.cpp
# src/order_gui.cpp
# src/os/macosx/osx_main.cpp
# src/pathfinder/yapf/yapf_node_rail.hpp
# src/rail_gui.cpp
# src/saveload/afterload.cpp
# src/saveload/cargopacket_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/station_sl.cpp
# src/script/api/script_industrytype.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_table.cpp
# src/settingsgen/settingsgen.cpp
# src/station.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_game_calendar.h
# src/timer/timer_manager.h
# src/timer/timer_window.cpp
# src/timetable_cmd.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/vehicle_cmd.h
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_func.h
# src/window_gui.h
2023-11-25 13:30:06 +00:00
Jonathan G Rennison
0d4d4a9cac
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/3rdparty/squirrel/squirrel/sqclosure.h
# src/3rdparty/squirrel/squirrel/sqobject.h
# src/3rdparty/squirrel/squirrel/sqvm.h
# src/aircraft.h
# src/airport_gui.cpp
# src/blitter/32bpp_sse_func.hpp
# src/blitter/null.hpp
# src/bridge_gui.cpp
# src/build_vehicle_gui.cpp
# src/cargotype.h
# src/cheat_gui.cpp
# src/command.cpp
# src/command_func.h
# src/company_gui.cpp
# src/console_gui.cpp
# src/date_gui.cpp
# src/depot_gui.cpp
# src/dock_gui.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/fileio.cpp
# src/fios.cpp
# src/fios_gui.cpp
# src/fontcache/spritefontcache.h
# src/framerate_gui.cpp
# src/game/game_text.cpp
# src/gamelog.cpp
# src/genworld_gui.cpp
# src/gfx_layout_fallback.cpp
# src/group_gui.cpp
# src/highscore_gui.cpp
# src/hotkeys.cpp
# src/industry_cmd.cpp
# src/industry_gui.cpp
# src/landscape.cpp
# src/main_gui.cpp
# src/misc_cmd.cpp
# src/misc_gui.cpp
# src/network/core/tcp_game.cpp
# src/network/core/udp.cpp
# src/network/network_chat_gui.cpp
# src/network/network_content_gui.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf_airport.cpp
# src/newgrf_airport.h
# src/newgrf_airporttiles.cpp
# src/newgrf_airporttiles.h
# src/newgrf_animation_base.h
# src/newgrf_canal.cpp
# src/newgrf_commons.h
# src/newgrf_config.cpp
# src/newgrf_debug_gui.cpp
# src/newgrf_engine.cpp
# src/newgrf_engine.h
# src/newgrf_generic.cpp
# src/newgrf_gui.cpp
# src/newgrf_house.cpp
# src/newgrf_house.h
# src/newgrf_industries.cpp
# src/newgrf_industries.h
# src/newgrf_industrytiles.cpp
# src/newgrf_industrytiles.h
# src/newgrf_object.cpp
# src/newgrf_object.h
# src/newgrf_railtype.cpp
# src/newgrf_railtype.h
# src/newgrf_roadstop.cpp
# src/newgrf_roadstop.h
# src/newgrf_roadtype.cpp
# src/newgrf_roadtype.h
# src/newgrf_spritegroup.cpp
# src/newgrf_spritegroup.h
# src/newgrf_station.cpp
# src/newgrf_station.h
# src/newgrf_town.cpp
# src/newgrf_town.h
# src/news_gui.cpp
# src/object_gui.cpp
# src/order_gui.cpp
# src/os/macosx/crashlog_osx.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/win32.cpp
# src/os/windows/win32_main.cpp
# src/pathfinder/npf/npf.cpp
# src/pathfinder/npf/queue.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/roadveh.h
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/script/api/script_text.hpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_table.cpp
# src/signs_cmd.cpp
# src/signs_gui.cpp
# src/smallmap_gui.cpp
# src/smallmap_gui.h
# src/spriteloader/grf.hpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/station_map.h
# src/statusbar_gui.cpp
# src/stdafx.h
# src/strgen/strgen.cpp
# src/table/newgrf_debug_data.h
# src/terraform_gui.cpp
# src/timer/timer_game_calendar.cpp
# src/timer/timer_window.cpp
# src/town.h
# src/town_cmd.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/transparency_gui.cpp
# src/vehicle_gui.cpp
# src/water_cmd.cpp
# src/waypoint_cmd.cpp
# src/widget.cpp
# src/widget_type.h
# src/widgets/dropdown.cpp
# src/widgets/rail_widget.h
# src/widgets/terraform_widget.h
# src/window.cpp
# src/window_gui.h
2023-11-20 22:27:05 +00:00
Peter Nelson
9602de474d
Codechange: Use iterators and/or range-for on cargo related loops.
2023-10-19 17:03:25 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Jonathan G Rennison
ac2f9a21e8
Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
...
Leave afterload in src/saveload/
2023-06-08 00:01:40 +01:00
Jonathan G Rennison
2028472253
Saveload: Skip VENC/TNNC chunks entirely on non network server saves
2023-03-21 19:18:10 +00:00
Jonathan G Rennison
b7cb4099a6
Add missing cast in Save_TNNC()
2023-03-19 22:23:50 +00:00
Jonathan G Rennison
5dd285b0d9
Don't save TNNC chunk if there are no town zone callback handlers
2023-03-16 20:52:44 +00:00
Jonathan G Rennison
f44d455adc
Send town zone radii to network clients in new TNNC chunk
2023-03-11 22:23:40 +00:00
Jonathan G Rennison
8d6e57799c
Fix various possible integer type conversion issues
2023-02-15 23:05:03 +00:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
Rubidium
3c54344825
Fix: comparison of narrow type with wide type in loop condition
...
Technically this can't be triggered with the currently returned values though.
2023-01-06 19:34:35 +01:00
Jonathan G Rennison
a8361cd608
Allow overriding town settings on a per-town basis
...
Add a setting for whether this is allowed for non-privileged
multiplayer clients
2022-10-23 22:07:51 +01:00
Jonathan G Rennison
81290df946
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/lang/spanish.txt
# src/network/core/tcp_content_type.h
# src/network/network_content.cpp
# src/saveload/cheat_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/settings.cpp
# src/settings_internal.h
# src/table/settings.h.preamble
# src/table/settings/company_settings.ini
# src/table/settings/currency_settings.ini
# src/table/settings/gameopt_settings.ini
# src/table/settings/misc_settings.ini
# src/table/settings/settings.ini
# src/table/settings/win32_settings.ini
# src/table/settings/window_settings.ini
2021-10-28 01:07:51 +01:00
Jonathan G Rennison
ffef1c9e44
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/saveload/cargopacket_sl.cpp
# src/saveload/cheat_sl.cpp
# src/saveload/company_sl.cpp
# src/saveload/engine_sl.cpp
# src/saveload/map_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/station_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/stdafx.h
# src/table/settings/settings.ini
# src/town_cmd.cpp
# src/vehicle.cpp
2021-10-25 18:10:15 +01:00
Jonathan G Rennison
544da99102
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/cargopacket.h
# src/lang/korean.txt
# src/linkgraph/linkgraph.h
# src/linkgraph/linkgraphjob.h
# src/linkgraph/linkgraphschedule.h
# src/network/network_admin.h
# src/network/network_func.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/order_base.h
# src/rail_cmd.cpp
# src/saveload/company_sl.cpp
# src/saveload/depot_sl.cpp
# src/saveload/economy_sl.cpp
# src/saveload/linkgraph_sl.cpp
# src/saveload/map_sl.cpp
# src/saveload/newgrf_sl.cpp
# src/saveload/order_sl.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/saveload/signs_sl.cpp
# src/saveload/station_sl.cpp
# src/saveload/subsidy_sl.cpp
# src/saveload/town_sl.cpp
# src/saveload/vehicle_sl.cpp
# src/script/api/script_object.cpp
# src/settings.cpp
# src/string.cpp
# src/string_func.h
# src/table/CMakeLists.txt
# src/table/settings/settings.ini
# src/viewport_sprite_sorter_sse4.cpp
2021-10-18 18:01:27 +01:00
glx22
7bcc7e11ff
Codechange: Use a common sub-class for NewGRFMapping chunks
2021-07-06 22:29:08 +02:00
glx22
6e627f35ac
Cleanup: Remove now unneeded ChunkHandler members
2021-07-06 22:29:08 +02:00
glx22
2c941cd8b3
Codechange: Use ChunkHandlers sub-classes
2021-07-06 22:29:08 +02:00
glx22
c1a9fe6fbd
Codechange: Use static array of references to ChunkHandler
2021-07-06 22:29:08 +02:00
Patric Stout
3826703bc3
Add: store headers for chunks with SL_STRUCTLIST
2021-07-02 22:21:58 +02:00
Patric Stout
cdb3dd0493
Add: store headers for most savegame chunks
...
When a header is added, the chunk changes from CH_ARRAY type to
CH_TABLE type.
2021-07-02 22:21:58 +02:00
Patric Stout
7dd5fd6ed4
Feature: framework to make savegames self-descriptive
...
We won't be able to make it fully self-descriptive (looking at you
MAP-chunks), but anything else can. With this framework, we can
add headers for each chunk explaining how each chunk looks like
in detail.
They also will all be tables, making it a lot easier to read in
external tooling, and opening the way to consider a database
(like SQLite) to use as savegame format.
Lastly, with the headers in the savegame, you can freely add
fields without needing a savegame version bump; older versions
of OpenTTD will simply ignore the new field. This also means
we can remove all the SLE_CONDNULL, as they are irrelevant.
The next few commits will start using this framework.
2021-07-02 22:21:58 +02:00
Patric Stout
a146bcfe93
Change: store length of SL_STRUCTLIST in the savegame
...
This wasn't consistently done, and often variables were used that
were read by an earlier blob. By moving it next to the struct
itself, the code becomes a bit more self-contained and easier to
read.
Additionally, this allows for external tooling to know how many
structs to expect, instead of having to know where to find the
length-field or a hard-coded value that can change at any moment.
2021-06-15 16:45:04 +02:00
Patric Stout
0bb1d2fa8e
Codechange: use SLE_STRUCT(LIST) for Town chunks
2021-06-14 21:58:05 +02:00
Patric Stout
8f323855b1
Codechange: rename SL_LST to SL_REFLIST to highlight the "reference" part
...
You can easily mistake SlList / SL_LST to be a list of SL_VAR, but
it is a list of SL_REF. With this rename, it hopefully saves a few
people from "wtf?" moments.
2021-06-10 19:18:24 +02:00
glx22
c27afdf3f6
Codechange: Remove FOR_ALL_CHUNK_HANDLERS
...
Co-Authored-By: Patric Stout <truebrain@openttd.org>
2021-06-06 19:35:06 +02:00
Patric Stout
9fff00ba20
Codechange: C++-ify lists for SaveLoad ( #9323 )
...
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant
As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
2021-05-31 22:26:44 +02:00
Jonathan G Rennison
14636d2512
Check multi-tile ID-translated houses after house ID limit change
...
(Or when reloading NewGRFs)
If an overriding house type which newly fit in the limit changed the
tile layout, existing houses on the map could have the wrong layout
See: #243
2021-04-19 23:04:54 +01:00
Jonathan G Rennison
e623560120
Fix 4c2e42fa
: Wrong town caches when loading pre more-houses savegame
2021-04-14 19:49:35 +01:00
Jonathan G Rennison
4c2e42fae0
Add savegame conversion and version bump for more house IDs
2021-04-11 12:32:13 +01:00
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
2020-08-27 18:31:09 +01:00
Jonathan G Rennison
1fd9c929ef
Increase church/stadium count field size, fix save/load
...
Fix too many error message
2020-08-03 20:27:12 +01:00
Jonathan G Rennison
b7118b60fe
Add setting to enable multiple churches/stadiums in scenario editor
...
See: #177
2020-08-03 16:39:03 +01:00
dP
452e1e3328
Codechange #8258 : Remove unused town cargo caches from the savegame
2020-07-27 17:32:00 +01:00
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
2020-06-30 21:43:04 +01:00
dP
7045186594
Change #8159 : Remove now unused town cargo caches without bumping the savegame version
2020-06-28 18:23:59 +02:00
dP
ca2604c4e2
Revert #8157 : Redundant change
2020-06-28 18:23:59 +02:00
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.
2020-06-28 15:32:53 +02:00
Jonathan G Rennison
5243cfd6d0
Use TinyString for custom name fields which are almost always empty
2020-05-22 00:10:09 +01: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
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
2020-05-21 20:02:34 +02:00
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
2020-01-06 18:45:51 +00:00
Jonathan G Rennison
4936b3ba51
Add support for loading ChillPP v8 savegames
2020-01-03 00:08:33 +00:00