Commit Graph

796 Commits

Author SHA1 Message Date
Michael Lutz a8b6e9f23c Codechange: Refactor the Freetype font cache into a generic part that does not depend on Freetype and into one that does.
This makes it easier to add other TrueType font rendering engines.
2019-05-14 11:21:36 +01:00
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.
2019-05-11 15:34:33 +02:00
Michael Lutz 0344e7a0a1 Fix #7463: Promote scroll mode setting to basic category. 2019-05-11 14:05:52 +02:00
peter1138 51dd751f4a Fix #7565: Incorrect cursor used for placing road/tram tunnels. 2019-05-09 11:51:04 +01:00
Corns McGowan 4d0ee65b51 Change: Set default setting in server browser of "Advertised" to "Yes". (#7568) 2019-05-05 15:18:52 +01:00
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Charles Pigott 644f4c3547 Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly 2019-04-29 17:40:22 +01:00
Charles Pigott 96097b34a5 Codechange: Remove Direction*Byte types 2019-04-29 17:40:22 +01:00
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 2019-04-29 17:40:22 +01:00
stormcone 79343762a4 Fix: Typos. (#7517) 2019-04-15 22:06:41 +02:00
peter1138 c0836bccef Codechange: NULL -> nullptr in settings files. 2019-04-11 13:00:55 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
kiwitreekor bc9b47d2e5 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 2019-04-08 18:41:07 +01:00
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.
2019-03-24 16:10:04 +01:00
peter1138 c34f07d5fd Fix #7390: Extra line removed by mistake caused server_password to disappear from settings. 2019-03-20 23:55:38 +00:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
Charles Pigott fe448a2616 Remove: OPF 2019-03-16 22:30:11 +00:00
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.
2019-03-08 18:30:44 +00:00
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 2019-03-08 16:52:08 +01:00
nikolas a7e335c0b3 Fix: spelling for a few real town names (#7338)
Added special characters to mostly Slovak towns, a few Spanish, and one Turkish.
2019-03-07 17:52:57 +00:00
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.
2019-03-04 20:19:44 +01:00
SamuXarick 03264059e4 Change: Decrease minimum permitted value for script_max_opcode_till_suspend setting (#7243) 2019-02-28 17:37:50 +00:00
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.
2019-02-23 08:27:46 +00:00
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
2019-02-02 21:39:06 +00:00
Peter Nelson ea4ea62816 Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared. 2019-02-02 21:39:06 +00:00
Peter Nelson 12b6fe47c7 Fix: Set MU flag on some default engines. 2019-02-01 07:08:55 +00:00
PeterN 23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* Change: Replace checkbox in livery selection window with Default option in drop down selection.

This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired.

* Feature: Add vehicle group liveries.
2019-01-31 14:57:44 +01:00
nikolas 8334a57332 Fix: unicode characters in Romanian town names (#7141)
Many of these town names were using the 'a with ~ above it' character,
which should actually by 'a with u above it'. There were other missing
accents as well which I've added.
2019-01-30 14:52:56 +01:00
Nikolas Nyby 4158c077cd Fix: Remove duplicate French and Slovak town names
I've replaced some of the duplicate real town names with new real town
names in the French and Slovak sets.

Also, some Slovak town names were missing accents, so I've fixed those.
2019-01-24 21:47:13 +00:00
Niels Martin Hansen 48b334cf97 Add: Houses can accept up to 16 different cargo types via NewGRF.
New Action0 property 23 for feature 07, variable length, format B n*(B B). Initial byte is number of structures following. First byte in structure is cargo id, second is acceptance level in 1/8 units.
2019-01-21 16:06:25 +01:00
Peter Nelson 4daaec1a94 Change: Invalidate ship path caches if pathfinder choice or forbid-90-degree turns are changed. 2019-01-19 23:11:17 +00:00
nikolas 82e530b517 Fix: Remove duplicate town name "Huacho" (#7038)
Huacho appears twice in the Spanish town names list. This change removes
the second one, and replaces it with a new one: Medellin.
2019-01-12 08:33:13 +01:00
Nikolas Nyby 65746a0275 Fix: Spelling fixes on some Latin American town names 2019-01-11 20:24:12 +00:00
Gabda87 a0293d313d Add #4115: default company colour setting (#6998)
Works only in single player.
2019-01-10 10:45:38 +01:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 2018-11-03 21:43:54 +01:00
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 2018-11-03 21:43:54 +01:00
Samu eff09c43cd Fix #4109: Add more water checks to the Oil Rig layout
Prevents Oil Rig docking tile from becoming unreachable by ships when spawning next to each other.
2018-10-25 20:09:42 +02:00
Charles Pigott 2aacddd412 Codechange: lengthof is not defined for runtime-length strings, use sizeof instead 2018-06-27 22:54:46 +02:00
Niels Martin Hansen 4fb76db42f Feature #986: Automatic save when losing connection to a network game 2018-06-23 15:22:31 +02:00
PeterN cfe6a8ea4f
Add: Replace independment map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling. (#6756) 2018-04-28 22:27:14 +01:00
PeterN 3b32075e8a
Add: {PUSH_COLOUR} and {POP_COLOUR} control codes to handle switching colours. (#6737)
This replaces the internal SCC_PREVIOUS_COLOUR swap.
2018-04-19 19:33:21 +01:00
Pavel Stupnikov 9175c349da Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726) 2018-04-17 18:41:31 +01:00
frosch 59dd7be686 (svn r27978) -Fix [FS#6673] (r18541): Store the map variety setting in the samegame like the other mapgen settings, so restarting maps considers it. (Samu) 2018-03-11 12:11:09 +00:00
peter1138 86829c54c4 (svn r27972) -Fix (r15271) [FS#6670]: Catenary sprites got mixed up for depots. 2018-03-05 21:24:48 +00:00
adf88 6dec889306 (svn r27908) -Codechange: Mark airport tile tables and FTAs "const" to be sure that they are really constant 2017-08-31 06:55:38 +00:00
peter1138 d934ef9b00 (svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire) 2017-03-24 18:55:16 +00:00
frosch 1b9139efe8 (svn r27760) -Change: Enable realisitic train and road vehicle acceleration by default. 2017-02-26 20:31:02 +00:00
frosch b25afb239a (svn r27706) -Feature: [NewGRF] String command 9A 1E to print the name of a cargo type. 2016-12-23 13:38:50 +00:00
frosch 2c8b84f21d (svn r27705) -Doc: Add the hex codes to the SCC_NEWGRF_ enum entries. 2016-12-22 20:47:40 +00:00