rubidium42
ea9715d970
Codechange: split Write_ValidateSetting to get separate functions for making ints valid and writing ints
3 years ago
rubidium42
208952f2ba
Codechange: split Write_ValidateSetting to get separate functions for making strings valid and writing strings
3 years ago
rubidium42
8372c679e3
Codechange: add helper functions to read an int setting value
3 years ago
rubidium42
ac99a38175
Cleanup: remove and/or fix some confusing comments
...
The comments for SettingDescType; it is a byte, so not 4 bytes and since it is not a flag there are about 250 other possibilities left instead of 9.
SettingGuiFlag is uint16 so has 2 bytes allocated.
SettingDescGlobVarList and related comments imply that global vars cannot be used elsewhere, but they are used for settings just fine. Even then the type is not used anywhere else but the definition of the table.
3 years ago
rubidium42
86c9ef8134
Codechange: remove SettingDescType in lieu of the actual classes
3 years ago
rubidium42
3bb6ce8827
Codechange: use initializer_lists for the settings tables
...
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
3 years ago
rubidium42
8ffb4122df
Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company
3 years ago
rubidium42
e666a962b1
Codechange: let OneOfMany and ManyOfMany be their own classes as well
3 years ago
rubidium42
425d50372f
Codechange: let SettingDesc extend SettingDescBase
3 years ago
rubidium42
860003458f
Codechange: make BoolSettingDesc its own sub class
3 years ago
rubidium42
72ec81325b
Cleanup: remove unneeded temporary variables and casts
3 years ago
rubidium42
0d6597a9e6
Codechange: move bits of SettingDesc down to the appropriate sub classes
...
And by doing so remove the hack where ints were put into pointers so "def" could either be an int or a string
3 years ago
rubidium42
f6723b53da
Codechange: make parsing of IniItems overridable functions of SettingDesc
3 years ago
rubidium42
1f8ff0e4f9
Codechange: make Write_ValidateSetting a function of StringSettingDesc
3 years ago
rubidium42
be28c95b30
Codechange: make Write_ValidateSetting a function of IntSettingDesc
3 years ago
rubidium42
c3cd4a683d
Codechange: make formatting of values into strings a method of SettingDesc
3 years ago
rubidium42
d8125fa46e
Codechange: make sub classes of SettingDesc for the different types of settings
3 years ago
rubidium42
91b3d697c5
Codechange: make SettingDesc an instance in the setting table to allow for sub classes
3 years ago
rubidium42
0f062b3882
Codechange: clean up C-string support from settings
3 years ago
Jonathan G Rennison
f39b6f4ba3
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/cheat_gui.cpp
# src/genworld_gui.cpp
# src/landscape.cpp
# src/lang/english.txt
# src/saveload/afterload.cpp
# src/screenshot.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/table/settings.ini
# src/tile_type.h
# src/widgets/genworld_widget.h
3 years ago
Patric Stout
cafe4eed6e
Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
...
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.
Maps can never be 100% snow, as we do not have sprites for coastal
tiles.
Internally, this calculates the best snow line height to approach
this coverage as close as possible.
3 years ago
Jonathan G Rennison
e95216b59d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/core/geometry_func.cpp
# src/date.cpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/object_gui.cpp
# src/openttd.cpp
# src/settings_type.h
# src/video/allegro_v.cpp
# src/video/dedicated_v.cpp
# src/video/null_v.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
3 years ago
Michael Lutz
00c66e7096
Codechange: Allow early-load settings that are not misc settings.
3 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
a49fdb7ebb
Codechange: Store base set related texts in std::strings.
4 years ago
Jonathan G Rennison
8176da3f62
Saveload: Add value conversion support to settings xref
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
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
79e49cf4a9
Setting: Add setting flag: no new game (in game use only)
5 years ago
Jonathan G Rennison
8b1ee39ace
Setting: Add support for enum type settings
5 years ago
Charles Pigott
644f4c3547
Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly
5 years ago
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
5 years ago
Jonathan G Rennison
0d2be99827
Merge branch 'save_ext' into jgrpp
...
# Conflicts:
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
7 years ago
Jonathan G Rennison
a3d1585826
Add settings callback field to re-order setting options in GUI
7 years ago
Jonathan G Rennison
6fcb156989
Add generic mechanism to cross-ref settings at load time.
...
This is useful for loading settings from legacy/special versions,
where the corresponding setting is somewhere else and/or a PATX setting,
with duplicating all the info.
(cherry picked from commit b5c453b21e
)
7 years ago
Jonathan G Rennison
842728bd17
Settings GUI: Add support for DECIMAL1 settings.
8 years ago
Jonathan G Rennison
b5c453b21e
Add generic mechanism to cross-ref settings at load time.
...
This is useful for loading settings from legacy/special versions,
where the corresponding setting is somewhere else and/or a PATX setting,
with duplicating all the info.
Use this to load SpringPP settings which have a corresponding setting.
9 years ago
Jonathan G Rennison
c57ffc64bc
Settings update: add PATX chunk to store additional settings
...
in an unordered format which is tolerant of extra, missing or reordered
settings.
9 years ago
planetmaker
f00d9976f9
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
frosch
2670b05fb5
(svn r24862) -Add: Settings type filter to adv. settings GUI.
12 years ago
frosch
c4c3d00578
(svn r24862) -Add: Settings type filter to adv. settings GUI.
12 years ago
frosch
af74f3bb2d
(svn r24860) -Codechange: Add SettingDesc::GetType().
12 years ago
frosch
0efd29b71b
(svn r24860) -Codechange: Add SettingDesc::GetType().
12 years ago
frosch
6516c85c82
(svn r24787) -Fix: Unify checks for editability of settings.
12 years ago
frosch
22dc45738d
(svn r24787) -Fix: Unify checks for editability of settings.
12 years ago
frosch
b4c70a51da
(svn r24671) -Feature [FS#5355]: Add basic/advanced/expert filters to adv. settings GUI. (Eagle_rainbow)
12 years ago
frosch
69a62452be
(svn r24671) -Feature [FS#5355]: Add basic/advanced/expert filters to adv. settings GUI. (Eagle_rainbow)
12 years ago
alberth
cc6b16a4c1
(svn r24234) -Add: Add help-string infrastructure to the ini files
12 years ago
alberth
1d58838a97
(svn r24234) -Add: Add help-string infrastructure to the ini files
12 years ago
alberth
ce210ac66d
(svn r24233) -Codechange: Rename 'val_str' to 'str_val' to better match with 'strval' in the ini files.
12 years ago
alberth
34a11d4b8d
(svn r24233) -Codechange: Rename 'val_str' to 'str_val' to better match with 'strval' in the ini files.
12 years ago
alberth
f6ccaa01c0
(svn r24210) -Feature: Split the renew-months setting text in two string values (one before life time and one after).
12 years ago
alberth
88224d001d
(svn r24210) -Feature: Split the renew-months setting text in two string values (one before life time and one after).
12 years ago
alberth
0c80091daa
(svn r24209) -Cleanup: Remove now unused SGF_NOCOMMA value.
12 years ago
alberth
8c585e5ad6
(svn r24209) -Cleanup: Remove now unused SGF_NOCOMMA value.
12 years ago
rubidium
0cfe86cead
(svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
13 years ago
rubidium
e40eb8177a
(svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
13 years ago
frosch
c1b1513815
(svn r22626) -Fix [FS#4622]: Also initialise _old_vds with newgame settings; TTD savegames do not contain these settings.
13 years ago
frosch
d29def43b0
(svn r22626) -Fix [FS#4622]: Also initialise _old_vds with newgame settings; TTD savegames do not contain these settings.
13 years ago
frosch
ea311e7904
(svn r22522) -Fix (r22489): (size_t)(uint32)(-1) != (size_t)-1
13 years ago
frosch
615e435677
(svn r22522) -Fix (r22489): (size_t)(uint32)(-1) != (size_t)-1
13 years ago
alberth
a7e7e76f7f
(svn r22210) -Add: Add a variable for the value strings in the settings tables.
14 years ago
alberth
9fe65f93fe
(svn r22210) -Add: Add a variable for the value strings in the settings tables.
14 years ago
alberth
0b0127b13d
(svn r21593) -Codechange: endif comment correcttions.
14 years ago
alberth
f65a9a5515
(svn r21593) -Codechange: endif comment correcttions.
14 years ago
alberth
f2a59e197c
(svn r21467) -Doc: Add a few doxygen comments to config file settings code.
14 years ago
alberth
997551c599
(svn r21467) -Doc: Add a few doxygen comments to config file settings code.
14 years ago
frosch
c18839704b
(svn r20286) -Codechange: Unify end of doxygen comments.
14 years ago
frosch
4bd32799f1
(svn r20286) -Codechange: Unify end of doxygen comments.
14 years ago
frosch
5b86c79fce
(svn r20283) -Codechange: Unify start of doygen comments.
14 years ago
frosch
ed4f806f1d
(svn r20283) -Codechange: Unify start of doygen comments.
14 years ago
rubidium
779722505f
(svn r19865) -Fix [FS#3830]: crash when changing locale settings from console due to strcpy-ing a string into a pointer
14 years ago
rubidium
dd743bcea1
(svn r19865) -Fix [FS#3830]: crash when changing locale settings from console due to strcpy-ing a string into a pointer
14 years ago
smatz
d2e99657fa
(svn r19507) -Codechange: remove semicolon after DECLARE_POSTFIX_INCREMENT and DECLARE_ENUM_AS_BIT_SET
14 years ago
smatz
53aaabe6e9
(svn r19507) -Codechange: remove semicolon after DECLARE_POSTFIX_INCREMENT and DECLARE_ENUM_AS_BIT_SET
14 years ago
yexo
504cf35de0
(svn r18943) -Feature [FS#2885]: make it possible to change newgame settings from within a game via the console (use setting_newgame instead of setting)
15 years ago
yexo
d75b9f1642
(svn r18943) -Feature [FS#2885]: make it possible to change newgame settings from within a game via the console (use setting_newgame instead of setting)
15 years ago
rubidium
9467b7c6d6
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
rubidium
82fc28f77f
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
rubidium
27ef5b3255
(svn r17644) -Fix [FS#3219]: some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor.
15 years ago
rubidium
ac99610a05
(svn r17644) -Fix [FS#3219]: some inconsistencies with the difficulty settings in the scenario editor. Also re-enable changing some difficulty settings (e.g. max loan) in the scenario editor.
15 years ago
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
yexo
f044ad6f80
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
15 years ago
yexo
0d56cfabfa
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
15 years ago
yexo
7eb9ad0415
(svn r16429) -Change: Make the company settings behave like all others settings: the default set in the main menu / config file is now really the default for a new company, and changing the value in game will no longer change the default for new companies.
15 years ago
yexo
a10e5f707a
(svn r16429) -Change: Make the company settings behave like all others settings: the default set in the main menu / config file is now really the default for a new company, and changing the value in game will no longer change the default for new companies.
15 years ago
rubidium
87dfc2a881
(svn r16428) -Codechange: use the less bloated SimpleTinyEnumT instead of TinyEnumT if the stuff provided by TinyEnumT but not SimpleTinyEnumT is not used.
15 years ago
rubidium
b19d0e0254
(svn r16428) -Codechange: use the less bloated SimpleTinyEnumT instead of TinyEnumT if the stuff provided by TinyEnumT but not SimpleTinyEnumT is not used.
15 years ago
rubidium
08655368eb
(svn r16297) -Codechange: silence more ICC warnings
15 years ago
rubidium
5f81ba886c
(svn r16297) -Codechange: silence more ICC warnings
15 years ago
rubidium
283b3d16ab
(svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability.
16 years ago
rubidium
377ce6c5bf
(svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability.
16 years ago
smatz
e3216e4b4b
(svn r15334) -Codechange: reset setting to old value when the callback procedure returns false
16 years ago
smatz
496b541cb1
(svn r15334) -Codechange: reset setting to old value when the callback procedure returns false
16 years ago
smatz
91233ea596
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
smatz
7368c740a6
(svn r14828) -Codechange: move most of save/load-specific code to separate files
16 years ago
rubidium
7ceb1252a2
(svn r14153) -Codechange: split ini file reading/saving from settings.cpp.
16 years ago