Jonathan G Rennison
82803b98e0
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/game/game_gui.cpp
# src/graph_gui.cpp
# src/linkgraph/linkgraph_gui.h
# src/newgrf.cpp
# src/order_gui.cpp
# src/saveload/engine_sl.cpp
# src/saveload/saveload.h
# src/script/api/script_text.cpp
# src/script/script_gui.cpp
# src/settings_table.cpp
# src/strings.cpp
# src/table/settings/economy_settings.ini
# src/table/settings/locale_settings.ini
# src/timetable_gui.cpp
1 year ago
Peter Nelson
65e0b0dcb7
Codechange: Be consistent with how company masks are set to all.
2 years ago
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
3 years ago
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
3 years ago
glx22
2c941cd8b3
Codechange: Use ChunkHandlers sub-classes
3 years ago
glx22
c1a9fe6fbd
Codechange: Use static array of references to ChunkHandler
3 years ago
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.
3 years ago
Patric Stout
8e91527251
Codechange: mark chunks that are not stored as CH_READONLY
...
This makes it easier to spot chunks that have a save_proc that
is a nullptr, but also prevents confusion, where it looks like
the CH_ type of a chunk has influence on how it is being read.
It is not, it is only used for saving.
3 years ago
Patric Stout
97b94bdc9a
Change: prefix SL_ARR with the length of the array
...
This means that during loading we can validate that what is saved
is also that what is expected. Additionally, this makes all list
types similar to how they are stored on disk:
First a gamma to indicate length, followed by the data.
The size still depends on the type.
3 years ago
glx22
c27afdf3f6
Codechange: Remove FOR_ALL_CHUNK_HANDLERS
...
Co-Authored-By: Patric Stout <truebrain@openttd.org>
3 years ago
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.
3 years ago
Jonathan G Rennison
a15e26f369
NewGRF: Elide unmasked vehicle callbacks where possible
...
This includes:
* CBID_VEHICLE_32DAY_CALLBACK
* CBID_VEHICLE_REFIT_COST
* CBID_VEHICLE_MODIFY_PROPERTY
This is on a per-property basis
The main benefit of this is to avoid callbacks not handled by the
vehicle's current sprite group from using the full graphics chain as
the "default" branch in the callback switch.
In the case where the graphics chain is long/expensive, a lot of work
had to be done before a callback failure result was eventually returned.
3 years ago
Jonathan G Rennison
43980639de
Merge branch 'master' into jgrpp
...
# Conflicts:
# .gitignore
# CMakeLists.txt
# src/3rdparty/optional/optional.hpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/misc_gui.cpp
# src/video/sdl2_v.cpp
4 years ago
Michael Lutz
79240eab1e
Codechange: Make use of the improved C++17 emplace_back function.
4 years ago
Jonathan G Rennison
5243cfd6d0
Use TinyString for custom name fields which are almost always empty
4 years ago
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
4 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
glx
1f6b3a37f9
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
peter1138
4f052fc2a4
Cleanup: Fix alignment after NULL -> nullptr change.
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
Peter Nelson
9de12521ec
Codechange: Convert saveload numbers to enum values.
...
(This was mostly achieved with a few in-place regexes)
6 years ago
Peter Nelson
ea4ea62816
Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared.
6 years ago
frosch
8ffe068c11
(svn r27243) -Fix (r26816) [FS#6285]: Duplicate frees due to pool item classes not having copy constructors.
10 years ago
frosch
e53d97b4f8
(svn r26816) -Fix [FS#6109]: Properly zero-initialise data in _temp_engine.
10 years ago
alberth
f72ad87540
(svn r26802) -Add: Command to set visibility of an engine for a company (based on patch by Juanjo).
10 years ago
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
11 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
frosch
0e4b212c45
(svn r24810) -Fix: Make engine preview offers more robust wrt. changes in the company ranking.
12 years ago
smatz
77fe95f552
(svn r20860) -Cleanup: remove some unused functions and variables
14 years ago
yexo
dff871b40d
(svn r20311) -Codechange: don't reserve extra space in the savegame that is never used
14 years ago
frosch
62ac138154
(svn r19973) -Codechange: Add another procedure to chunk handlers for checking savegames (empty for now).
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
35aabc1d4c
(svn r16586) -Codechange: don't store lifelength in the savegame; it can easily be calculated, it isn't used often and now changing extend_vehicle_life in game has some effect.
16 years ago
smatz
570af0ce44
(svn r16338) -Codechange: split loading of references to two phases
...
In the first phase, indexes are stored. In the second phase, indexes are checked for validity and converted to pointers
16 years ago
frosch
987e72f4f2
(svn r15645) -Fix (r12924)[FS#2612]: Add an EngineOverrideManager to give the term 'compatible newgrf' again some sense and to not crash because of trivial changes.
16 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
smatz
7368c740a6
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago