Commit Graph

558 Commits (4767641c8c2f156d9db9b670361c35a8543642b7)

Author SHA1 Message Date
Patric Stout f0f2073006 Feature: allow a toggle to enable/disable vsync
Vsync should be off by default, as for most players it will be
better to play without vsync. Exception exist, mainly people who
play in fullscreen mode.
3 years ago
Niels Martin Hansen 785e42a6f9 Feature: Volume sliders in Game Options window 3 years ago
Niels Martin Hansen 88c92f7b7c Codechange: Move volume control slider logic to separate functions 3 years ago
Didac Perez Parera ca783d447a
Feature: Button to reset game settings to their default values (#8958) 3 years ago
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
3 years ago
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
This is an indication value; the game tries to get as close as it
can, but due to the complex tropic rules, that is unlikely to be
exact.

In the end, it picks a height-level to base the desert/tropic
line on. This is strictly seen not needed, as we can convert any
tile to either. But it is the simplest way to get started with
this without redoing all related functions.
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
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 3 years ago
sean 160a5f2fdd
Codechange: Misleading function name for selecting refresh rate (#8836)
Co-authored-by: pnda <43609023+ThePNDA@users.noreply.github.com>
3 years ago
Patric Stout b21ba566ae
Codechange: remove special strings for language and resolutions (#8824)
As OpenTTD grew, we found other ways to do this, and we are no
longer in need for a hack like this.
3 years ago
sean 0464a50ab8
Add: Display refresh rate game option (#8813) 3 years ago
Patric Stout b93d7dd3cb
Add: Option to (dis-)allow accelerated video drivers. (#8819)
The video drivers using the OpenGL backend are currently our only
accelerated drivers. The options defaults to off for macOS builds and
to on everywhere else.

Co-authored-by: Michael Lutz <michi@icosahedron.de>
3 years ago
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
3 years ago
Michael Lutz 46e13313e4 Fix #8731: Always use a 32bpp blitter if font anti-aliasing is enabled. 3 years ago
frosch 5a1fa18509 Change: move the 'road drive side' selection to settings tree, and give it the same 'basic' visibilty as 'signal side'. 3 years ago
frosch c71d0f5e7f Change: move townname generator selection to mapgen GUI. 3 years ago
frosch f513a807db Codechange: move non-GUI code to non-GUI source files. 3 years ago
frosch 4ce941bbc2 Codechange: turn a constant variable into a real constant. 3 years ago
Michael Lutz 33099355b8 Codechange: Re-init GUI zoom only when really changed. 3 years ago
Michael Lutz 22f5aeab07 Feature: Automatic UI and font zoom levels when supported by the OS. 3 years ago
Charles Pigott 188bf0fbc9 Change: Remove disable_unsuitable_building setting
This setting is no longer useful, as you can now always build roads,
canals, etc.
4 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
Kuhnovic a3a7928372
Feature: option to auto remove signals when in the way during rail construction (#8274) 4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Pavel Stupnikov b2895dfcd0
Change: extend the allowed range for max loan setting (#8386) 4 years ago
Pavel Stupnikov c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures (#8282) 4 years ago
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 4 years ago
Jonathan G Rennison c3223903ed Codechange: Cache resolved town, station and industry name strings 5 years ago
stormcone b524f1ae21 Feature: Show the name of the NewGRF in the build vehicle window. 5 years ago
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jack Baron 7c9dedb94f Feature: Configure minimum share trading years 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
Niels Martin Hansen 37daf43037 Change: Zoom title game by UI zoom level 5 years ago
glx 9195f2337a Codechange: use std::vector for _resolutions 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz c7b9987d08 Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 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 a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 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
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
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
peter1138 c2e4a8c9bf Fix 195fd0dc60: Sprite cache must still be cleared when using bitmap fonts. 5 years ago
PeterN 195fd0dc60
Fix #7266: Reorder reinitialization of caches when changing font zoom level. (#7273) 5 years ago
Greg Carlin 00d28a500d Feature: Add option to adjust font size separately from GUI size. (#7003)
Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
5 years ago
glx 8418e27403 Fix: close Textfile windows when closing Option window 5 years ago
glx b22fbfbe3d Add: allow opening of one TextfileWindow per type 5 years ago
Gabda87 a0293d313d Add #4115: default company colour setting (#6998)
Works only in single player.
6 years ago
Niels Martin Hansen 19f5a6cbb0 Feature #6090: Change music set during gameplay 6 years ago
PeterN cfe6a8ea4f
Add: Replace independment map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling. (#6756) 6 years ago
frosch 610bdbd68b (svn r27827) -Codechange (r27819): Deduplicate code. (adf88) 7 years ago
peter1138 d934ef9b00 (svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire) 7 years ago
peter1138 c5660b58d9 (svn r27819) -Fix (r26990): Update viewport sign dimensions when changing GUI zoom level. 7 years ago
frosch bdf090b406 (svn r27366) -Fix [FS#6358]: Clickareas in settings tree were misaligned when the filter warning was displayed, if the setting height was defined by the icons instead of the font. 9 years ago
frosch 0982762c22 (svn r27365) -Fix: Center settings filter warning also vertically, and also in case of multiple lines. 9 years ago
rubidium d1429cd936 (svn r27026) -Fix: some (older-ish) GCC compiler warnings 10 years ago
peter1138 1088ad48fc (svn r27004) -Codechange: Make GUI size apply to (sprite-font) text as well. 10 years ago
peter1138 253c91b17d (svn r26990) -Feature: Add option to choose normal, double or quad-size interface. 10 years ago
frosch 33f4f0b464 (svn r26986) -Change: Rename 'Advanced Settings' to just 'Settings'. 10 years ago
peter1138 42c65264f8 (svn r26959) -Codechange: GUI-scale for settings window. 10 years ago
rubidium d600334c09 (svn r26886) -Change (r26885): the max height setting belongs more in the limitations section of the settings 10 years ago
rubidium c72d362840 (svn r26885) -Feature-ish: user interface for limiting the maximum height of a map 10 years ago
rubidium ce04c49e3d (svn r26882) -Feature: allow limiting the height of bridges (ic111) 10 years ago
peter1138 e353ef5908 (svn r26858) -Codechange: Rearrange smallmap filter and settings expand/collapse buttons to fix frame borders and allow buttons to fit height of resize button. 10 years ago
planetmaker 61e129cc22 (svn r26815) -Change: Allow to set the granularity of the tooltip hover time in milliseconds instead of seconds. New default value is 250ms 10 years ago
frosch c3c966fd79 (svn r26678) -Codechange: Simplify settings widget layout. (Juanjo) 10 years ago
frosch 06b210ff42 (svn r26629) -Fix [FS#6012]: If the video driver fails to supply a list of resolutions, display an error message. 10 years ago
frosch 31095e4181 (svn r26623) -Codechange: Make SettingsEntry and SettingsPage polymorphic classes. 10 years ago
frosch 7e928a6b80 (svn r26622) -Codechange: Construct settings tree on the heap instead of using static arrays. 10 years ago
frosch 0d565ae612 (svn r26614) -Add: Adv. settings window can handle the autosave setting as well. 10 years ago
frosch 0c9e666d96 (svn r26604) -Add: Most of the mapgen settings to advances settings window. 10 years ago
frosch 01d9c7b336 (svn r26536) -Change: Reshuffle advanced settings tree. 10 years ago
frosch 380a1de250 (svn r26533) -Codechange: Rename some strings 10 years ago
frosch 0ba81bff17 (svn r26528) -Remove: A bunch of archaic settings from the advanced settings GUI. 10 years ago
frosch ebd2d3ccef (svn r26525) -Remove: Screenshot format setting from GUI. 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 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 10 years ago
alberth 77e62f0b98 (svn r26322) -Feature: Warn the user about empty setting search results too. 11 years ago
alberth 202f21f262 (svn r26321) -Feature: Warn the user about missing setting search results due to filtering. 11 years ago
alberth 75504d24bf (svn r26320) -Add: Label for both the filter category and filter type in the advanced settings window. 11 years ago
rubidium 2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
rubidium 83eeba28b7 (svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns 11 years ago
frosch 12ddbb7cb1 (svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets. 11 years ago
rubidium f9c9ff6ec3 (svn r25508) -Change: split unit localisation choice into a choice per type of unit, and move it to the advanced settings
-Feature [FS#5482]: have tractive effort in imperial (lbf) and metric (kgf) units
-Feature: have weights and volumes in imperial units (short tons, gallons)
11 years ago
fonsinchen a49a4eec6e (svn r25351) -Add: settings for link graph 11 years ago
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 11 years ago
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 11 years ago
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 11 years ago
planetmaker fae3cbae9f (svn r25075) -Codechange: Allow for more than 32 currencies 11 years ago
planetmaker bd301e8475 (svn r25074) -Cleanup: Simplify currency selection code slightly 11 years ago
planetmaker c22bbf5293 (svn r25072) -Codechange: Don't require the custom currency to be the last defined one 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch 2161747eb7 (svn r24863) -Remove: Now redundant method to filter for non-local settings differing from default settings. 12 years ago
frosch c4c3d00578 (svn r24862) -Add: Settings type filter to adv. settings GUI. 12 years ago
frosch dbe46698ff (svn r24861) -Codechange: Put all filters for settings into a single struct. 12 years ago
frosch 0efd29b71b (svn r24860) -Codechange: Add SettingDesc::GetType(). 12 years ago
frosch 9bce12a0ce (svn r24859) -Codechange: Make the dropdown handling of the adv. settings GUI more generic. 12 years ago