Commit Graph

943 Commits (eab18f06a47e558fe313cb86c855e8949b01feed)

Author SHA1 Message Date
Michael Lutz a2c3197f42 Codechange: Make the settings for min/max zoom early load settings. 3 years ago
Michael Lutz e5c3253642 Add: [OSX] Setting to disable HiDPI graphics rendering. 3 years ago
Michael Lutz 84636fc2af Codechange: Remove all remaining uses of cpp_offset. 3 years ago
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.
3 years ago
SamuXarick 36ab9c64ef Fix: Desert/rainforest data coordinate 'y' is off by 1 when their 'x' coordinate is negative 3 years ago
Michael Lutz fa60c1f8b9
Feature: Choose a sensible window size on a fresh OTTD config file. (#8536) 4 years ago
frosch 8dda0ec4ff Add: [NewGRF] new GUI sprites for 'rename' and 'go to location'. 4 years ago
frosch f6abc81cf1 Fix: add missing variables to NewGRF inspect window. 4 years ago
frosch 868d84bbfc Add: [NewGRF] vehicle variable 63 to test the tracktype of the current tile against a given tracktype. 4 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
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.
4 years ago
Patric Stout d9ec8053d7 Fix #8050: ending-year of 5000000 allows you to get to year 5000001 and beyond
MAX_YEAR is set to 5000000, but having an ending-year set to the
same meant you could bypass this, and play till the uint32 wrapped.

The game can either show highscore or wrap year, not both. When
you would do both, every year you get the highscore dialog.

By changing the maximum value of ending-year to 4999999 we prevent
this issue.
4 years ago
Kuhnovic a3a7928372
Feature: option to auto remove signals when in the way during rail construction (#8274) 4 years ago
2TallTyler fe51051b7c Change: Default settings improved for new players 4 years ago
Michael Lutz 024a3f6259 Codechange: Use automatic memory management for language pack reading. 4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Michael Lutz 5a5d613ee3 Change: Disable changing the inflation setting in network games. 4 years ago
frosch 2bb691f50e Change: Remove the LAN/Internet combobox from the server list in favour of adding two separate search buttons. 4 years ago
Pavel Stupnikov 22b9dec960
Feature: Add an option to disable tree growth completely (#8415) 4 years ago
Xaroth Brook d05be2cff5 Cleanup: Rework the CargoSpec macro for improved readability. 4 years ago
Pavel Stupnikov b2895dfcd0
Change: extend the allowed range for max loan setting (#8386) 4 years ago
Tyler Trahan f2a93dba0d
Change: set the default setting for autorenew to on for new games (#8352) 4 years ago
jostephd b1cf79da5b
Feature: new velocity unit "tiles/day" (#8278) 4 years ago
Pavel Stupnikov c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures (#8282) 4 years ago
Patric Stout 68f9925cd4
Codechange: use \u to indicate unicode chars in strings (#8379)
With \x, we sometimes had to do the "" trick, as the length is not
predefined. With C++11 bringing \u to the specs, which has a preset
length, we no longer need the "" trick.

We set the strings to u8, to ensure all compilers use UTF-8 encoding
for the \u characters.

This was triggered by newer CLangs, which start to warn if you
use "" in the middle of a string, wondering if that was your
intention. It is a good question. And this is our answer :)
4 years ago
glx22 a06fe8e8a7 Fix: [CMake] cross-compiling requires native tools 4 years ago
dP a2e1102b15 Feature: Increase max possible distance from border for oil refineries and rigs 4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
TechGeekNZ 012fea301d Cleanup: Add note explaining how settings.h is generated from source. 4 years ago
TechGeekNZ f246f8faef Cleanup: Fix typo in settings.h.preamble. 4 years ago
Michael Lutz 37bc2f8064 Codechange: Use std::string in the driver and blitter selection code. 4 years ago
Michael Lutz a49fdb7ebb Codechange: Store base set related texts in std::strings. 4 years ago
Niels Martin Hansen 9e632355f1 Fix #7525: Move autorenew setting to Basic category 4 years ago
kiwitreekor 5df01bf95e
Add: [NewGRF] Station variable 6A, querying GRFID of nearby station tiles (#7956) 4 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
Samu f0ff7003fd Fix: Snowline height interval is now 1, in both World Generation and Settings windows
- Previously, it was 1 in World Gen window, but 5 in Settings window
5 years ago
Samu 96f8c13543 Fix: Custom sea level default value is now equal to minimum value, not lower
Custom sea level default value was lower than the minimum
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jack McKiernan f52e605b51 Fix: Solved helicopter takeoff issue with international airports
Helicopters can now take off from just outside the hangars.
5 years ago
Jack McKiernan 9479f45d1a Codechange: Replaced 255's with an enum entry TERMGROUP 5 years ago
Jack McKiernan d39f889775 Codechange: Replaced 0's in heading field with TO_ALL 5 years ago
Jack McKiernan d843b73280 Fix #6219: Allow taking off from hangar in commuter airport
Previously, a helicopter in the hangar of a commuter airport would have to wait until HELIPAD2 was free before it could takeoff. Now, a helicopter in the hangar can takeoff from just outside the hangar.
5 years ago
Jack Baron f159d91572 Fix: add savegame version to trading age setting 5 years ago
Jack Baron 7c9dedb94f Feature: Configure minimum share trading years 5 years ago
Niels Martin Hansen 53f8d0b815 Codechange: Use std::vector for industry tile layouts 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
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.
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
Michael Lutz 0344e7a0a1 Fix #7463: Promote scroll mode setting to basic category. 5 years ago
peter1138 51dd751f4a Fix #7565: Incorrect cursor used for placing road/tram tunnels. 5 years ago
Corns McGowan 4d0ee65b51 Change: Set default setting in server browser of "Advertised" to "Yes". (#7568) 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
Charles Pigott 644f4c3547 Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly 5 years ago
Charles Pigott 96097b34a5 Codechange: Remove Direction*Byte types 5 years ago
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 5 years ago
stormcone 79343762a4 Fix: Typos. (#7517) 5 years ago
peter1138 c0836bccef Codechange: NULL -> nullptr in settings files. 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
kiwitreekor bc9b47d2e5 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 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
peter1138 c34f07d5fd Fix #7390: Extra line removed by mistake caused server_password to disappear from settings. 5 years ago
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.
5 years ago
Charles Pigott fe448a2616 Remove: OPF 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
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 5 years ago
nikolas a7e335c0b3 Fix: spelling for a few real town names (#7338)
Added special characters to mostly Slovak towns, a few Spanish, and one Turkish.
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
SamuXarick 03264059e4 Change: Decrease minimum permitted value for script_max_opcode_till_suspend setting (#7243) 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
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
5 years ago
Peter Nelson ea4ea62816 Codechange: Make saveload version upper bound exclusive, i.e. version object was removed instead of version object last appeared. 5 years ago
Peter Nelson 12b6fe47c7 Fix: Set MU flag on some default engines. 5 years ago
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.
5 years ago
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.
5 years ago
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.
6 years ago
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.
6 years ago
Peter Nelson 4daaec1a94 Change: Invalidate ship path caches if pathfinder choice or forbid-90-degree turns are changed. 6 years ago
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.
6 years ago
Nikolas Nyby 65746a0275 Fix: Spelling fixes on some Latin American town names 6 years ago
Gabda87 a0293d313d Add #4115: default company colour setting (#6998)
Works only in single player.
6 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
Niels Martin Hansen e66cec8f86 Add: NewGRF support for 16-in-16-out industries 6 years ago
Niels Martin Hansen 8859381d30 Add: Industries can produce and accept up to 16 different cargoes 6 years ago
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.
6 years ago
Charles Pigott 2aacddd412 Codechange: lengthof is not defined for runtime-length strings, use sizeof instead 6 years ago
Niels Martin Hansen 4fb76db42f Feature #986: Automatic save when losing connection to a network game 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
PeterN 3b32075e8a
Add: {PUSH_COLOUR} and {POP_COLOUR} control codes to handle switching colours. (#6737)
This replaces the internal SCC_PREVIOUS_COLOUR swap.
6 years ago
Pavel Stupnikov 9175c349da Fix #6465: Add {NORMAL_FONT} and {MONO_FONT} control codes to GS strings (#6726) 6 years ago
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) 6 years ago
peter1138 86829c54c4 (svn r27972) -Fix (r15271) [FS#6670]: Catenary sprites got mixed up for depots. 6 years ago
adf88 6dec889306 (svn r27908) -Codechange: Mark airport tile tables and FTAs "const" to be sure that they are really constant 7 years ago
peter1138 d934ef9b00 (svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire) 7 years ago
frosch 1b9139efe8 (svn r27760) -Change: Enable realisitic train and road vehicle acceleration by default. 7 years ago
frosch b25afb239a (svn r27706) -Feature: [NewGRF] String command 9A 1E to print the name of a cargo type. 8 years ago
frosch 2c8b84f21d (svn r27705) -Doc: Add the hex codes to the SCC_NEWGRF_ enum entries. 8 years ago
frosch d9bfe88261 (svn r27676) -Codechange: Rename catenary functions, so that they refer unambiguously to either RoadCatenary or RailCatenary. 8 years ago
frosch ac6793dace (svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro) 8 years ago
michi_cc 2b8bb12d62 (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 9 years ago
alberth d818e1779c (svn r27378) -Codechange: Fix indentation of the table values, allow Doxygen to link to the TextColour enum. 9 years ago
frosch 4830497f0b (svn r27340) -Fix [FS#6338]: Silence warning by moving _string_colourmap to a file no its own. (Cif) 9 years ago
frosch 50a3f44539 (svn r27295) -Add: [strgen] Default plural subparameter positions for CARGO_xxx string control codes. 9 years ago
alberth a91f74dbb3 (svn r27231) -Codechange: Replace magic numbers for the smoothness setting (chillcore) 9 years ago
rubidium 13e3ef53e3 (svn r27183) -Fix: GCC5 compilation 9 years ago
frosch c639fb0d8e (svn r27163) -Fix [FS#6204]: Toolbars were not invalidated when changing max-vehicles settings. (adf88) 9 years ago
frosch 310258f283 (svn r27151) -Add: Allow changing max heightlevel in scenario editor. 10 years ago
frosch 2f7de4fd99 (svn r27144) -Change: The chatbox-width setting now uses percent of screen width instead of pixels. 10 years ago
frosch 4846c7ed6b (svn r27137) -Fix (r0): Oilrig empty-tile checks were incorrect due to wrong TileIndexDiff->TileIndexDiffC conversion. 10 years ago
peter1138 c2dbe23c88 (svn r27048) -Fix (r26158): Position in articulated vehicle is 4D, not 4A. 10 years ago
rubidium d534c80e94 (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 10 years ago
rubidium 8d90e86c2c (svn r27009) -Add: extra level of general map heightness (ChillCore) 10 years ago
rubidium fddeeb5e49 (svn r27002) -Fix-ish: replace some non-ASCII characters with ASCII characters, e.g. @þaram to @param 10 years ago
peter1138 253c91b17d (svn r26990) -Feature: Add option to choose normal, double or quad-size interface. 10 years ago
peter1138 5a924dcbbc (svn r26965) -Codechange: Add palette bit to indicate that palette is actually a text colour remap, and draw closebox as a sprite, using said bit. Change news popup to use closebox widget for its closebox. 10 years ago
rubidium b08b3bd8e3 (svn r26930) -Add: extra shadings to he heightmap colour tables (Chillcore) 10 years ago
rubidium 0176ef274f (svn r26928) -Change: scale the heightmap colours over the whole range of heights (based on patch by ic111) 10 years ago
rubidium f192045796 (svn r26927) -Codechange: split the heightmap colour tables into their own file in the table folder 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
rubidium f41b55f0ff (svn r26880) -Add: stub settings for limiting bridge and map height 10 years ago
rubidium 2361aaf601 (svn r26869) -Add: support for an all black palette to prevent the need of having a black tile of all different slopes (ic111) 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 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 0ba81bff17 (svn r26528) -Remove: A bunch of archaic settings from the advanced settings GUI. 10 years ago
frosch 631e8b45fd (svn r26522) -Add: A config-file-only setting to disable usage of 8bpp video modes.
-Remove: [win32] fullscreen_bpp setting, which is replaced by above setting.
-Change: Disable usage of 8bpp blitters and video modes by default. Many modern OS and hardware cause issues with those.
10 years ago
frosch 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch 62b22bfd2b (svn r26374) -Fix [FS#5928]: Mixed up callback mask flags in station inspect window. (adf88) 10 years ago
fonsinchen e4c7c8876b (svn r26323) -Fix: update some constants related to map size. 11 years ago
frosch e9c22ef16f (svn r26244) -Feature: [NewGRF] Add StringCodes 9A 1B, 9A 1C and 9A 1D to display amounts of cargo. 11 years ago
frosch bc86bf9b12 (svn r26237) -Cleanup: Remove unused SCC_STRING_ID. 11 years ago
frosch 7247ecf172 (svn r26206) -Fix [FS#5829]: Run everything from ini, obg, obs, obs, ... files through str_validate. 11 years ago
frosch a12fa22a75 (svn r26158) -Fix: NewGRF inspect window lacked several newer variables. 11 years ago
rubidium d2ba772f6a (svn r26130) -Codechange: add some guards against using invalid image indices 11 years ago
rubidium 6f21593bf6 (svn r26050) -Fix: possible, but currently untriggered, out of bounds access in strgen 11 years ago
frosch 103b6fffbb (svn r25916) -Add: GUI sprite for the smallmap cargoflow button. (frosch, planetmaker, V453000) 11 years ago
planetmaker 8033162bb8 (svn r25876) -Codechange: Unify object placement during map creation 11 years ago
planetmaker 547b1fba45 (svn r25874) -Add: [NewGRF] NewObject property 0x10, bit 13 indicating that object amount scales with water content of map border (e.g. used for lighthouses) 11 years ago
planetmaker 88286d33ab (svn r25873) -Codechange: Add property for the amount of generated objects upon map creation to default objects 11 years ago
planetmaker 6f62458e3b (svn r25872) -Codechange: Add climate property to default objects 11 years ago
planetmaker f5e408fa1c (svn r25868) -Fix (r25650): Initialization of default objects swapped costs and dates 11 years ago
planetmaker 5cc4d240f1 (svn r25775) -Fix [FS#5746]: Some spelling corrections to Catalan town names (juanjo) 11 years ago
planetmaker eecb4b3506 (svn r25774) -Fix [FS#5746]: Some spelling corrections to Latin American town names (juanjo) 11 years ago
rubidium 1e715bfbea (svn r25557) -Fix [FS#5524]: one could build bridges over owned land of another company 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
rubidium 6e97b7a6e8 (svn r25507) -Cleanup: double definition 11 years ago
rubidium 7c0f34130c (svn r25454) -Remove/Fix/Cleanup: SETX(Y) does not work at all with other than default fonts, so get rid of it 11 years ago
rubidium 94a5fe6b92 (svn r25437) -Codechange: rework the FreeTypeSettings structure to make it better grouped 11 years ago
fonsinchen 0fc198cb00 (svn r25365) -Feature: show cargo by next hops and final destinations in the station GUI 11 years ago