Commit Graph

17462 Commits (9e7c5235e89095b328bdd9528984a19e1716aac7)

Author SHA1 Message Date
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 5 years ago
glx 1c92ba8ebe Codechange: Replace FOR_ALL_CARGO_PAYMENTS with range-based for loops 5 years ago
glx fa9769f81a Codechange: Replace FOR_ALL_DEPOTS with range-based for loops 5 years ago
glx 5fce5fa300 Codechange: Replace FOR_ALL_CARGOPACKETS with range-based for loops 5 years ago
glx 60e3cf8aff Codechange: Replace FOR_ALL_ENGINE_RENEWS with range-based for loops 5 years ago
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
glx 68f22134cb Add: Allow iteration of pools in range-based for loops 5 years ago
translators 379402f02e Update: Translations from eints
croatian: 9 changes by VoyagerOne
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
translators e54184d18b Update: Translations from eints
portuguese: 16 changes by mcbanhas
5 years ago
glx e001d87569 Add #7801: [Script] more error mappings 5 years ago
translators 94cc0edb70 Update: Translations from eints
portuguese: 225 changes by mcbanhas
5 years ago
translators df2a19ec87 Update: Translations from eints
german: 9 changes by planetmaker
portuguese: 19 changes by mcbanhas
5 years ago
translators f7bf8e2da9 Update: Translations from eints
german: 11 changes by mini1025
5 years ago
Jonathan G Rennison 35dc377a58 Fix: Infrastructure total update when removing tram road stop
The wrong road owner was used when updating the tram infrastructure total.
This could result in desyncs, negative infrastructure totals, etc.
5 years ago
translators 03bbae7fe9 Update: Translations from eints
ukrainian: 56 changes by nsergiy
5 years ago
Niels Martin Hansen 9900af38f5
Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.

By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
5 years ago
translators f91c701ffe Update: Translations from eints
hungarian: 1 change by Brumi
5 years ago
stormcone 40ebf3c765 Fix: Do not refer to a function in the documentation that was removed years ago (#7844)
The 'DoDrawString' was removed with this commit: f11300d
5 years ago
glx22 d865916a07 Fix #7836: Check coherency of NewGRF parameter min/max (#7840) 5 years ago
translators ef8455f549 Update: Translations from eints
vietnamese: 73 changes by myquartz
5 years ago
frosch 61dba850af Revert #7837, 7e22f243e: OpenTTD tries to replicate the original game mechanics.
Making numbers look nice and correlate is no goal, and in this case they actually did not correlate.
5 years ago
translators c7b703d426 Update: Translations from eints
vietnamese: 36 changes by myquartz
5 years ago
Yourself 7e22f243ed Fix: typo in town growth rates (#7837) 5 years ago
translators d242b1824c Update: Translations from eints
vietnamese: 19 changes by myquartz
russian: 5 changes by Lone_Wolf
korean: 5 changes by telk5093, 1 change by kevinhigh
5 years ago
translators 70f8c729d4 Update: Translations from eints
french: 7 changes by glx
5 years ago
Charles Pigott 60cbddbb5f Fix #7606: Game crash when trying to clean up a crashed script
Also fix another possible memory leak
5 years ago
Charles Pigott cf354f6668 Codechange: new instead of malloc 5 years ago
glx22 ddffe32f15 Fix #7646: Incomplete cleanup for non-threaded world generation failure (#7805) 5 years ago
glx22 0bdbd509be Fix #7673: [Script] Allow removal of custom town text (#7834) 5 years ago
translators b533c66f42 Update: Translations from eints
finnish: 5 changes by hpiirai
galician: 183 changes by Michi
polish: 5 changes by azabost
dutch: 6 changes by JanWillem
spanish (mexican): 5 changes by Absay
5 years ago
Jonathan G Rennison a1d6354caf Fix: Out of bounds tile access in ErrmsgWindow::OnInitialPosition
This fixes part A of #7619, but not part B.

Vehicle::x_pos and Vehicle::y_pos are not required to be within the map bounds.

See also: GetTileHeightBelowAircraft()
5 years ago
translators b8abd54181 Update: Translations from eints
czech: 5 changes by djst
5 years ago
glx 9fc6329066 Cleanup: Remove unused strings 5 years ago
glx fa657c8360 Fix #7631: 16 out cargo support for industry directory 5 years ago
translators 4eab70f84e Update: Translations from eints
polish: 115 changes by azabost
vietnamese: 5 changes by nglekhoi
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison a15ace0f5b Fix #7783, Fix #7816: [SDL2] Fix input handling in edit context
In particular this fixes handling of the shift key
5 years ago
Jonathan G Rennison 1dba06656d Codechange: Add utility function for whether the focused window is a console 5 years ago
Jonathan G Rennison 81f159434d Codechange: Add EditBoxGainedFocus method to VideoDriver base class 5 years ago
Jonathan G Rennison 46f7c6a641 Change: [SDL2] Add an "unprintable" flag to struct VkMapping
SDL_Keysym::sym is not suitable for checking whether the character
is printable or not
5 years ago
Jonathan G Rennison d41378c00a Fix: [SDL2] Page down key not handled
SDLK_PAGEUP and SDLK_PAGEDOWN are not sequential
They must have separate entries in _vk_mapping
5 years ago
Jonathan G Rennison 3db399d7d9 Fix: [SDL2] Detection of backtick scancode
SDL_Keysym::scancode is a SDL_SCANCODE_* constant, not a raw scan code
5 years ago
Samu 3d362f2513 Fix #7697: Add a Missing AddProducedCargo proc for HQ
On TileLoop_Object, HQs are able to produce and move passengers and mail to stations, but querying the HQ tiles for cargo supplied was returning nothing. This makes it so that they return +1 to both passengers and mail.
5 years ago
Jonathan G Rennison 2be619ea88 Fix #7820: Heap use after free when removing oil rig 5 years ago
translators 460f73cd2d Update: Translations from eints
tamil: 22 changes by aswn
5 years ago
Charles Pigott 6929429f0f
Fix ccb4c37: Use of possibly uninitialised pointer (#7818) 5 years ago
SamuXarick ccb4c3797f Fix #5405: Aircraft could route to depots outside their range (#7104) 5 years ago
Nikolas Nyby 4884dcacba Fix #7784: up/down/home/end key behavior in SDL2
Closes #7784.
5 years ago
Michael Lutz d5a9bd404a Codechange: [OSX] Use std::unique_ptr with a custom deleter to simply memory management of Core Foundation types. 5 years ago
translators 58122983fb Update: Translations from eints
korean: 6 changes by telk5093
5 years ago
translators 1a13e03c49 Update: Translations from eints
korean: 2 changes by telk5093
5 years ago
Charles Pigott a407db54cf Add: Me 5 years ago
James103 f1204f0d9d Fix: spelling/grammar in script_tile.hpp (#7804) 5 years ago
translators 90682f8623 Update: Translations from eints
spanish (mexican): 2 changes by Absay
5 years ago
Charles Pigott 2f4de0a0fe Fix #7733: Crash when removing a dock next to an industry without a station 5 years ago
glx22 880680304d
Fix 53f8d0b81: signed/unsigned warnings (#7803) 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
Juriy Petrochenkov 8c6a16ba28 Fix: Possible double path separator in FiosMakeFilename 5 years ago
Nikolas Nyby f13b184588 Codechange: Don't use SDL_CreateRGBSurfaceWithFormat()
This function requires libSDL 2.0.5 or higher. It looks like we don't
need to use it, and can just use the original SDL_CreateRGBSurface(),
with the masks set to 0, to trigger the default 8-bit format, which is
SDL_PIXELFORMAT_INDEX8.

Closes #7785

Note: this code path is activated by using an 8-bit blitter, like:

    ./bin/openttd -b 8bpp-simple
5 years ago
glx 12e43c697d Add: [Script] ScriptEventVehicleAutoReplaced. 5 years ago
dorobouNeko cbefc1d994 Fix #7561: Fix power/running-cost vehicle sorter 5 years ago
translators 81272000f8 Update: Translations from eints
finnish: 6 changes by hpiirai
tamil: 62 changes by aswn
dutch: 2 changes by JanWillem
5 years ago
translators 0d599e155f Update: Translations from eints
russian: 2 changes by Lone_Wolf
5 years ago
Jack Baron f159d91572 Fix: add savegame version to trading age setting 5 years ago
Jack Baron e4f08f2880 Fix: Bump savegame version 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
translators c95c349dd5 Update: Translations from eints
french: 1 change by glx
5 years ago
abmyii ac21118736 Fix #7703: Prevent sounds being produced by inactive industries (#7752) 5 years ago
translators e2e112baaa Update: Translations from eints
chinese (traditional): 1 change by firetimer
chinese (simplified): 66 changes by firetimer
5 years ago
stormcone f1712a54b2 Fix #6407: Show snowy ground sprites for depots (#7671)
This is a quick fix by @KeldorKatarn:
65e656b9d6

It has the drawback that snow is draw to the inside the depots as well, as the removed comment suggests.
5 years ago
Gabda 652fb40652 Codechange: Performance improvement in k-d tree FindNearest() 5 years ago
stormcone 1e5029563c Fix #7635: Game crash on exit scenario editor. 5 years ago
Joe Stringer b4f1056097 Fix: [Cygwin] Fix missing AI_ADDRCONFIG declaration
Fixes the following complaints:

src/network/core/address.cpp: In member function 'const sockaddr_storage* NetworkAddress::GetAddress()':
src/network/core/address.cpp:134:55: error: 'AI_ADDRCONFIG' was not declared in this scope
   this->Resolve(this->address.ss_family, SOCK_STREAM, AI_ADDRCONFIG, nullptr, ResolveLoopProc);

Signed-off-by: Joe Stringer <joe@wand.net.nz>
5 years ago
Joe Stringer 51f8c8a568 Fix: [Cygwin] Fix missing declaration of strdup()
src/depend/depend.cpp: In constructor 'File::File(const char*)':
src/depend/depend.cpp:170:19: error: 'strdup' was not declared in this scope
   this->dirname = strdup(filename);
                   ^~~~~~

Signed-off-by: Joe Stringer <joe@wand.net.nz>
5 years ago
Joe Stringer 66c32533ec Fix: [Cygwin] Fix missing definitions in stdafx
Fix the following compile errors:

In file included from openttd/src/debug.h:15:0,
                 from openttd/src/string.cpp:13:
openttd/src/cpu.h:35:19: error: 'uint' was not declared in this scope
 bool HasCPUIDFlag(uint type, uint index, uint bit);

openttd/src/string.cpp: In function 'char* strcasestr(const char*, const char*)':
openttd/src/string.cpp:548:7: error: 'strncasecmp' was not declared in this scope
   if (strncasecmp(haystack, needle, needle_len) == 0) return const_cast<char *>(haystack);

openttd/src/strgen/strgen_base.cpp: In function 'void EmitPlural(Buffer*, char*, int)':
openttd/src/core/alloc_func.hpp:136:6: error: 'alloca' was not declared in this scope
  (T*)alloca((num_elements) * sizeof(T)))

Signed-off-by: Joe Stringer <joe@wand.net.nz>
5 years ago
Michael Lutz dd11990ce0 Fix 71a3e8346: strings need to be copied too.
If it's not, iterating on it in a loop is quite pointless.
5 years ago
glx22 4154cf00f4
Fix 71a3e8346: decode_params need to be copied too (#7760) 5 years ago
translators 875419e4ee Update: Translations from eints
estonian: 12 changes by henrikp
5 years ago
translators 865eea8173 Update: Translations from eints
indonesian: 2 changes by fanioz
french: 3 changes by arikover
hungarian: 4 changes by Brumi
5 years ago
translators 2e30601b9c Update: Translations from eints
czech: 91 changes by djst, 6 changes by belaseoci
spanish (mexican): 2 changes by Absay
5 years ago
Charles Pigott 3cc6b7f725 Fix: Signedness issue in midi driver 5 years ago
Charles Pigott fe9731d32c Fix: clang and MSVC warnings (glx) 5 years ago
Charles Pigott 7b400d43c1 Codechange: Fix warning about discarding qualifiers by *really* casting the variable 5 years ago
Charles Pigott b839e355ba Fix: Compilation error on MinGW due to usage of C++17 template deduction 5 years ago
Charles Pigott 6378a78817 Codechange: Explicitly move a few variables to avoid a copy constructor (fixes warning from clang) 5 years ago
Charles Pigott 150884a93f Fix: Remove workaround for clang-3.8, now that GCC9 warns about it 5 years ago
Charles Pigott 73a2cee779 Fix: Quiet a bogus -Wmaybe-unitialized warning from GCC9 5 years ago
Charles Pigott 71a3e83468 Fix: GCC9's warnings about deprecated implicit assignment operators 5 years ago
frosch 041088d317
Fix fbbbc6e1931: Crash when creating orders to stations with relocated station sign. (#7755)
Station::xy is the position of the station sign, and not necessarily a tile of the station.
5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Michael Lutz 316e4e9417 Fix: [OSX] Macro name conflict when trying to compile the QuickTime music driver. 5 years ago
Michael Lutz 61d6fa97cc Fix: [OSX] Wrong allocator usage for creating a CFString. 5 years ago
translators ceb29cef85 Update: Translations from eints
chinese (simplified): 12 changes by ww9980
5 years ago
translators 23168ff3d8 Update: Translations from eints
chinese (simplified): 6 changes by ww9980
5 years ago