Commit Graph

1082 Commits

Author SHA1 Message Date
Patric Stout ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" (#10653)
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.

While at it, also ported this part over to the new timer system.
2023-04-16 20:14:22 +02:00
Tyler Trahan 646a7e625b
Change: Use seconds for Linkgraph update settings (#10610) 2023-04-14 22:49:12 +02:00
Tyler Trahan 0de5eb53fa
Codechange: Use constants for service interval max/min/default values (#10611) 2023-04-08 18:04:30 +00:00
Tyler Trahan 1691640603
Fix: Specify units for value of share trading age setting (#10612) 2023-04-08 17:51:52 +00:00
PeterN f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. (#10594)
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00
Michael Lutz 178249e7cc Codechange: Saveload macros for entries with a custom table name. 2023-02-26 21:41:24 +01:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
Rubidium a409e4b026 Add: documention to large functions that have too little documentation according to CodeQL 2023-02-25 23:57:36 +01:00
glx22 b080f24bd8 Codechange: move windows common to AI and GS out of ai_gui 2023-02-05 19:27:25 +01:00
Rubidium bf8b32d193 Change: explicitly allow initial loan of 0, however show warning in UI 2023-02-01 21:41:18 +01:00
Rubidium b7b7c11b90 Change #10077: make maximum loan a positive multiple of the loan interval
And set the minimum maximum loan to the value of loan interval, so there is
always an amount of money to lend. Compared to being allowed to set max loan
to 0 and never be allowed to lend any money.
2023-02-01 21:41:18 +01:00
Michael Lutz 2d73076056 Add: [NewGRF] Second vehicle property for additional callback flags. 2023-01-30 22:00:56 +01:00
PeterN 2355882ec1
Codechange: Remove object `enabled` flag and shuffle members. (#10358)
`enabled` flag is replaced with IsEnabled() which checks if views is
non-zero.

ObjectSpec is shuffled to reduce its memory footprint.
2023-01-15 10:58:03 +00:00
Tyler Trahan 2206c73156
Feature: Set a custom number of industries in map generation window (#10340) 2023-01-14 05:12:29 -05:00
PeterN 1b1aa682a6
Fix: Don't assume engclass 2 should be elrail. (#10315)
When disabling/enabling elrail, there is an assumption that `engclass` of 2
means the engine will run on elrail. While this holds for default engines,
NewGRFs can do other things.

To resolve this we store the intended railtype so that toggling elrail will
restore to the correct type.
2023-01-06 00:44:57 +00:00
Francis Herne 6caed5f15e
Add: Slope-aware and roadtype-specific one-way sprites. (#10282) 2022-12-26 15:06:21 -05:00
Peter Nelson 3485709f53 Add: Additional vehicle flags to control variants. 2022-12-25 16:41:58 +00:00
peter1138 d7f561a400 Change: Add variant property to engines. 2022-12-25 16:41:58 +00:00
PeterN 7b5edba76c
Change: Support flipping shorter engines without NewGRF support. (#10262)
* Change: Support flipping shorter engines without NewGRF support.
* Cleanup: Remove write-only prop27_set temporary flag.
2022-12-23 21:02:14 +00:00
PeterN dde15a403c
Fix #10257: Incorrect wire position on sloped bridge heads. (#10258) 2022-12-19 20:16:26 +00:00
stormcone e29547a3a2
Feature: Show the cargoes the vehicles can carry in the vehicle list window (#8304) 2022-11-24 20:58:10 +00:00
Peter Nelson 9666e46739 Feature: Variable GUI scale.
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2022-11-12 18:28:39 +00:00
Peter Nelson dd90d79e7b Add: Setting to toggle thin vs chunky (scaled) bevels. 2022-11-12 18:28:39 +00:00
Joel-Milligan 59645c6733
Change: Remove scrollbar from town authority actions panel (#9928) 2022-11-11 23:52:38 +01:00
Henry Wilson 59dbcdb5ba Feature: Display power-to-weight ratio in ground vehicle details GUI 2022-11-08 21:02:08 +01:00
PeterN f24286a1ae
Fix: Ensure 31-bit shifts are unsigned. (#10128)
Shifting a signed 32-bit integer by 31 bits is undefined behaviour.
A few more than necessary are switched to unsigned for consistentency.
2022-11-04 07:15:59 +00:00
Rubidium d5aafaee15 Codechange: rename and move some strings to make them more consistent with the rest of the strings 2022-11-02 17:58:44 +01:00
PeterN 4031894aef
Cleanup: Remove svn-style `$Id$` comments. (#10122) 2022-11-01 18:24:31 -06:00
Tyler Trahan c19abebf8d
Feature: Multi-track level crossings (#9931) 2022-11-01 16:51:23 -04:00
Tyler Trahan 3d45bc4abe Feature: Build objects by area 2022-10-16 18:28:08 +02:00
frosch f4e2a462fe Cleanup: Remove unused flag sprites. 2022-10-16 14:56:52 +02:00
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2022-09-25 18:34:24 +01:00
glx22 fb1ac307a4 Fix 44f2ef1: [strgen] Allow gender for {CARGO_SHORT} 2022-04-30 20:38:35 +02:00
Tyler Trahan 41de69c5b7 Feature: Improved Finance window 2022-04-25 21:51:51 +02:00
Tyler Trahan e79724ea22
Feature: Alternative linkgraph colour schemes (#9866) 2022-04-25 19:32:55 +02:00
Loïc Guilloux ef4b699f40
Fix #9853, 648ee88: incorrect merge of guiflags and flags for osk_activation (#9855) 2022-04-15 22:57:47 +02:00
Tyler Trahan f92cf38ab5 Feature: Allow disabling local authority control of company actions 2022-04-02 22:50:28 +02:00
ALEX11BR 61c6fd3055 Fix: correct some mistaken Romanian real towns 2022-03-26 09:08:46 +01:00
Tyler Trahan 7f0efbe00e
Feature: Remember the last-used signal between games (#9792) 2022-02-02 21:26:46 +00:00
Michael Lutz 33ca4f2b99 Codechange: Let the compile generate the master command table out of templated command traits.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2021-12-16 22:28:32 +01:00
dP ad90e88ebd
Change: Make pf.yapf.rail_firstred_twoway_eol on by default (#9544) 2021-11-19 00:08:06 +00:00
Jonathan G Rennison fc58ed9987
Codechange: Remove CargoSpec::multipliertowngrowth which is unused (#9701)
This is set by cargo property 19.
This property is only implemented in TTDPatch.
2021-11-16 22:48:21 +00:00
Guillaume Renoult c38af72978
Update: add setting to hide news about competitors vehicle crash (#9653) 2021-11-07 19:54:50 +01:00
Patric Stout b8f9e24189
Fix #9484: update locale currencies settings mapping (#9559) 2021-09-19 22:44:28 +02:00
Tyler Trahan 7469f00c5b
Feature: Hide block signals in GUI by default (#8688) 2021-09-05 20:22:27 +02:00
Rubidium 92559e6f3a Fix #9388: thread unsafe use of NetworkAdminConsole/IConsolePrint 2021-09-01 22:40:44 +02:00
Vít Šefl 2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles (#9346) 2021-08-15 11:17:05 +02:00
Patric Stout 4c1ea4020d
Change: remove the ability to control "max spectators" (#9466)
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
2021-08-10 20:03:13 +02:00
Patric Stout fa1e27994d Feature: allow the use of TURN to connect client and server together
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.

It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
2021-07-20 19:57:23 +02:00
Patric Stout b6a116a247
Add: allow setting your server visibility to "invite-only" (#9434)
In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
2021-07-11 21:57:05 +02:00
Patric Stout e4d216e44b Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
2021-07-11 20:38:42 +02:00
Rubidium ede3f79475 Codechange: use the name string in SaveLoad for the name of the Setting as well 2021-07-09 22:53:30 +02:00
Rubidium 94881f5a34 Codechange: name a few unnamed settings as to not to have to check for that being empty 2021-07-09 22:53:30 +02:00
Patric Stout 8f5d0ecde3
Codechange: split settings.ini over several files (#9421)
This reduced the load on compilers, as currently for example MacOS
doesn't like the huge settings-tables.

Additionally, nobody can find settings, as the list is massive and
unordered. By splitting it, it becomes a little bit more sensible.
2021-07-09 21:16:03 +02:00
rubidium42 25ca6a75bc Codechange: split off the settings table and all the callbacks from the main settings handling logic 2021-07-06 21:32:47 +02:00
Patric Stout 1ed2405907 Cleanup: remove SLE_NULL and friends
We no longer need them. If you want to remove a field .. just
remove it! Because of the headers in the savegame, on loading,
it will do the right thing and skip the field.

Do remember to bump the savegame version, as otherwise older
clients can still load the game, but will reset the field you
have removed .. that might be unintentially.
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 75b6051b7a Change: move sensitive information to secrets.cfg and private information to private.cfg
We often ask people for their openttd.cfg, which now includes their
passwords, usernames, etc. It is easy for people to overlook this,
unwillingly sharing information they shouldn't.

By splitting this information over either private.cfg or secrets.cfg,
we make it more obvious they shouldn't be sharing those files, and
hint to what is inside them.
2021-07-02 14:30:14 +02:00
Patric Stout a42251fc72 Codechange: move network-related settings out of settings.ini
This to prepare the code to split up network-related settings
into private / secrets / generic.
2021-07-02 14:30:14 +02:00
embeddedt 883e4ea325
Change: [Emscripten] set default scrolling mode to non-pointer-locking (#9191) 2021-06-28 18:39:09 +02:00
rubidium42 98e653dacc Fix #9386: compilers failing to compile with LTO by using variants instead of new + unique_ptr
With std::variant all memory can be figured out at compile time, so the compiler needs to keep track of fewer elements. It also saves out a unique_ptr and its memory management, over a slight impact for resolving a setting.
2021-06-26 20:28:34 +02:00
rubidium42 f35e6c1c7f Codechange: use C-style strings instread of std::string in the SettingDesc constructor
This as using std::string causes much more variables to be tracked, potentially causing problemes for certain compilers in certain situations
2021-06-26 20:28:34 +02:00
rubidium42 f029fd0f3b Codechange: remove overloading on UpdateServiceInterval
One UpdateServiceInterval has two parameters to update the service interval for a vehicle type, the other for all vehicle types at once. Rename the latter to help with function resolution for the introduction of variants.
2021-06-26 20:28:34 +02:00
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.
2021-06-15 16:45:04 +02:00
rubidium42 bf500c39c9 Codechange: make the name of SettingDesc a std::string 2021-06-13 10:26:58 +02:00
Tyler Trahan d09210e1c6 Feature: Configurable subsidy duration 2021-06-10 23:26:16 +02:00
Patric Stout 648ee88a02 Codechange: merge guiflags and flags in settings .ini files
It was rather confusing which one was for what, especially as some
SaveLoad flags were settings-only. Clean up this mess a bit by
having only Setting flags.
2021-06-06 21:45:01 +02:00
Patric Stout feb2ddbefa
Codechange: rename SettingGuiFlag to SettingFlag (#9332)
It is a lovely organicly grown enum, where it started off with
GUI-only flags, and after that a few flags got added that can be
considered GUI-only (the GUI disables/enables based on them), to
only have flags added that has nothing to do with the GUI.

So be less confusing, and rename them to what they do.

Additionally, I took this opportunity to rename 0ISDISABLED to
reflect what it really does.
2021-06-03 21:18:29 +02:00
Patric Stout e9e4588db1
Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311) 2021-05-30 10:40:59 +02:00
Patric Stout d70fb74ac6
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
2021-05-29 23:27:01 +02:00
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
Patric Stout b0f44d7eb1 Doc: describe what each settings-file is about 2021-05-29 11:27:00 +02:00
Patric Stout e58046c947 Codechange: move all settings.ini files to table/settings 2021-05-29 11:27:00 +02:00
rubidium42 4c0e083128 Cleanup: set the base in the setting templates, instead of defining the base for every setting
This has the added benefit of not getting mistaken that multiple bases can be used for the same SettingTable
2021-05-29 10:32:32 +02:00
rubidium42 4144e949ed Fix: [Network] Prevent an empty server name to be set anywhere 2021-05-29 10:07:30 +02:00
rubidium42 08308d808c Codechange: use separate pre and post callbacks for int settings 2021-05-29 10:07:30 +02:00
rubidium42 e2f5d9e561 Codechange: use separate pre and post callbacks for string settings 2021-05-29 10:07:30 +02:00
rubidium42 86c9ef8134 Codechange: remove SettingDescType in lieu of the actual classes 2021-05-27 18:49:43 +02:00
rubidium42 e666a962b1 Codechange: let OneOfMany and ManyOfMany be their own classes as well 2021-05-27 18:49:43 +02:00
rubidium42 860003458f Codechange: make BoolSettingDesc its own sub class 2021-05-27 18:49:43 +02:00
rubidium42 d8125fa46e Codechange: make sub classes of SettingDesc for the different types of settings 2021-05-27 18:49:43 +02:00
rubidium42 91b3d697c5 Codechange: make SettingDesc an instance in the setting table to allow for sub classes 2021-05-27 18:49:43 +02:00
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.
2021-05-27 18:49:43 +02:00
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.
2021-05-27 18:49:43 +02:00
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
frosch a9ff296c3d Codechange: add constant for number of original cargoes. 2021-05-13 23:28:43 +02:00
rubidium42 0f062b3882 Codechange: clean up C-string support from settings 2021-05-13 23:13:17 +02:00
rubidium42 95386dc2b8 Codechange: move misc settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 77330d09fd Codechange: move font settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 65cbde4b30 Codechange: move currency settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 2022e34824 Codechange: move locale settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 02fdb5b210 Codechange: move server name/id in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 cc6c078dec Codechange: move hostnames in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 c73d64adf9 Codechange: move passwords in settings to std::string 2021-05-13 23:13:17 +02:00
Paweł Świątkowski 56a46f5cae Fix: Correct name of Golub-Dobrzyn 2021-05-13 10:05:07 +02:00
Paweł Świątkowski 6ee8690b47 Fix: Replace Susz with Leszno
Susz is masculine, not neuter, so it should result in "Susz Mazowiecki",
"Susz Morski", and not "Susz Mazowieckie" or "Susz Morskie". However,
because order of the names whould not be changed, it was replaced with
Leszno, which is neuter.
2021-05-13 10:05:07 +02:00
PeterN ba193f2e23
Fix #9186: Fix incorrect bounding box height causing station sprite glitch. (#9187)
Increased height of small station building bounding box to cover the build rather than just the platform.
2021-05-12 21:35:48 +01:00
rubidium42 e7581fd42d Change: [Network] Update server's NetworkServerGameInfo only when needed
Split the updating in a "static" version that only needs to be called when a new map is loaded or some settings are changed, and a "dynamic" version that updates everything that changes regularly such as the current game date or the number of spectators.
2021-05-05 21:01:23 +02:00
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
2021-04-29 20:12:11 +02:00
rubidium42 b54d8a49fb Feature: allow non-ASCII currency separators 2021-04-27 19:41:51 +02:00
Patric Stout fda1a590f6 Change: use icons to indicate you/host in Online Players GUI 2021-04-24 21:43:58 +02:00
Patric Stout 5266359424 Feature: rework in-game Online Players GUI
The GUI now more clearly shows some basic information about the
server you joined, your client name (and the ability to change it),
and what players are in which company.

It also contains useful buttons to press to join companies, chat
with other people, and for admins to kick/ban people.

Additionally, renamed "advertised" to "visibility"; this has to
do with future additions, but also because it is more clear in
wording.
2021-04-24 21:43:58 +02:00
Patric Stout 05612d60ae Remove: "language" field from server/client
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:

- the client also sends his "language" to the server, but nothing
  is doing anything with this.
- flags are a bad way to represent languages, and over the years
  we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
  servername with the language it is about. This is a much more
  efficient way to do the same.

All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
2021-04-20 17:24:38 +02:00
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.
2021-04-11 14:26:00 +02:00
frosch c6781cbd44
Fix d4c3d01d: add plural form 14 to strgen. (#8999) 2021-04-10 18:09:04 +02:00
Niels Martin Hansen 49d370185b Change: Default music and sound effects volume to be lower 2021-04-09 12:18:52 +02:00
Patric Stout 13a5264438 Fix: store the recent new game_creation settings in savegames
This allows us to later on see what someone did, and makes sure
that "restart" command still knows how the game was created.
2021-03-26 12:22:32 +01:00
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
2021-03-26 12:22:32 +01:00
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
2021-03-26 12:22:32 +01:00
Patric Stout 422e132845 Feature: auto-detect map height limit based on generated map
This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.

In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.

People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.

Cheats still allow you to change this value.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 2021-03-13 10:00:53 +01:00
frosch 28589db664 Fix: front/back sprites of action5 tram catenary were swapped. 2021-03-11 00:21:09 +01:00
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>
2021-03-08 15:42:39 +01:00
Patric Stout 74aa934441 Codechange: validate that "max" value of settings fit in their storage
This is an easy mistake to make, so protect us against making such
mistakes, by validating it doesn't happen.
2021-03-01 23:17:47 +01:00
Patric Stout d7a70c67ba Fix: old snow_line_height had a higher maximum value than could be stored
So any old game made with this setting was overflowing anyway;
not really a lot we can do about that now.
2021-03-01 23:17:47 +01:00
Patric Stout a0c298a539 Fix: three max-values for settings could exceed their storage size 2021-03-01 23:17:47 +01:00
Patric Stout 8bc0089fc4
Fix c3dc27e3: put the max-value of fast-forward-speed-limit to within the storage size (#8769) 2021-02-28 21:53:14 +01:00
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
2021-02-28 18:04:51 +00:00
Michael Lutz e1e8cc3851
Fix #8734: [OpenGL] Apply palette remap to cursor sprites. (#8742) 2021-02-24 22:10:25 +01:00
Michael Lutz 6bcc4884c2 Add: [OpenGL] Accelerated mouse cursor drawing. 2021-02-22 22:16:07 +01:00
Michael Lutz e8fc050b6e Add: [OpenGL] Support for 8bpp blitters. 2021-02-22 22:16:07 +01:00
Michael Lutz 320072c8dc Codechange: [OpenGL] Explicitly assign which framebuffer target receives the colour values. 2021-02-22 22:16:07 +01:00
Michael Lutz 821f30f735 Codechange: [OpenGL] Use GLSL version 1.50 if available. 2021-02-22 22:16:07 +01:00
Michael Lutz 90fd8f8cda Codechange: [OpenGL] Use generic vertex attributes in the shader program. 2021-02-22 22:16:07 +01:00
Michael Lutz acf59f6b68 Codechange: [OpenGL] Use shaders to display the video buffer on screen. 2021-02-22 22:16:07 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
Patric Stout 7996fadb91 Change: [Win32] Remove force_full_redraw and display_hz settings
These were special settings only for the win32-drivers, and
introduced in the very first version we track.

Time kinda had caught up with those variables, so it is time to
say farewell.

force_full_redraw was most likely a debug functionality "in case
our dirty-rect fails". This should no longer be needed.

display_hz was cute, as it had a max of 120. That is kinda
out-dated information, but I also doubt anyone was really using
this.
2021-02-20 17:08:44 +01:00
Patric Stout fa170b9ace Feature: configurable refresh-rate and change default to 60fps
Most modern games run on 60 fps, and for good reason. This gives
a much smoother experiences.

As some people have monitors that can do 144Hz or even 240Hz, allow
people to configure the refresh rate. Of course, the higher you
set the value, the more time the game spends on drawing pixels
instead of simulating the game, which has an effect on simulation
speed.

The simulation will still always run at 33.33 fps, and is not
influences by this setting.
2021-02-19 10:43:15 +01:00
Tyler Trahan fa88cb62e1
Fix cc39fa9: New orders are non-stop by default (#8689) 2021-02-18 18:42:28 +01:00
Michael Lutz 8bd2349ab6 Fix #8676, a2c3197f: GUI-visible settings may not be part of misc settings. 2021-02-17 21:01:21 +01:00
Michael Lutz 00c66e7096 Codechange: Allow early-load settings that are not misc settings. 2021-02-17 21:01:21 +01:00
frosch 5a1fa18509 Change: move the 'road drive side' selection to settings tree, and give it the same 'basic' visibilty as 'signal side'. 2021-02-14 23:14:07 +01:00
frosch 81e47277e7 Change: move the 'tree placer algorithm' selection to the settings tree window, and give it the same 'basic' visibility as 'in-game tree placement'. 2021-02-14 23:14:07 +01:00
Michael Lutz 22f5aeab07 Feature: Automatic UI and font zoom levels when supported by the OS. 2021-02-14 14:16:40 +01:00
Michael Lutz a2c3197f42 Codechange: Make the settings for min/max zoom early load settings. 2021-02-14 14:16:40 +01:00
Michael Lutz e5c3253642 Add: [OSX] Setting to disable HiDPI graphics rendering. 2021-02-14 11:50:18 +01:00
Michael Lutz 84636fc2af Codechange: Remove all remaining uses of cpp_offset. 2021-02-13 20:08:53 +01:00
Michael Lutz 7845434270 Codechange: Don't use cpp_offsetof in the save/load code.
Many of the member variables that are used in save/load are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.

Unfortunately, the trickery employed for saving linkgraph settings causes quite some
clutter in the settings ini files.
2021-02-13 20:08:53 +01:00
SamuXarick 36ab9c64ef Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative 2021-02-13 19:18:41 +01:00
Michael Lutz fa60c1f8b9
Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) 2021-01-14 21:53:06 +01:00
frosch 8dda0ec4ff Add: [NewGRF] new GUI sprites for 'rename' and 'go to location'. 2021-01-11 22:15:58 +01:00
frosch f6abc81cf1 Fix: add missing variables to NewGRF inspect window. 2021-01-10 21:24:38 +01:00
frosch 868d84bbfc Add: [NewGRF] vehicle variable 63 to test the tracktype of the current tile against a given tracktype. 2021-01-10 21:24:38 +01:00
Charles Pigott 188bf0fbc9 Change: Remove disable_unsuitable_building setting
This setting is no longer useful, as you can now always build roads,
canals, etc.
2021-01-08 16:43:51 +01:00
Patric Stout ef6b17baf7 Fix 2fd871e2af5: load correct ending-year for old (pre 0.7) savegames
Despite what it looked like, you could never really change the
ending-year (it was always reset to 2050 on start-up). See commit
683b65ee1 for details. As a side-effect, the variable that was
suppose to store the ending-year was just zero, never containing
a real ending-year.
2021-01-08 11:17:08 +01:00