Commit Graph

36577 Commits (dbdab67cdaf74c357bb36f144edffd97671ed4ed)

Author SHA1 Message Date
Jonathan G Rennison d830a34394 Fix: Violation of strict weak ordering in engine name sorter
This could be caused by an engine being renamed, and the old
name being cached from a previous sort.

See: #7838
4 years ago
Jonathan G Rennison 084b073e57 Codechange: Use template type for GUIList::Sort comparator 4 years ago
frosch d8182b7e15 Change: Allow command cost-estimation while paused. 4 years ago
Niels Martin Hansen 9895ced6af Fix: Silence some warnings when building with clang-cl on VS 2019
Clang-cl presents as both _MSC_VER and __clang__ in the preprocessor which makes some things confusing.
4 years ago
nikolas c9aff698d0
Fix #8104: Always add WINDOW_RESIZABLE flag to SDL2 (#8211)
This fixes a bug that can reproduced with these steps:
* Start openttd in fullscreen mode
* Turn off fullscreen mode
* Try to resize the window. The window can't be resized.
4 years ago
Jonathan G Rennison 147d9aef87 Crashlog: Remove unused variables 4 years ago
translators 208614343f Update: Translations from eints
polish: 1 change by MaksOPENTTD1
danish: 1 change by beruic
4 years ago
Jonathan G Rennison 663886843c Win32: Wine: Oversize buffer for WSAIoctl/SIO_GET_INTERFACE_LIST
This is a workaround for https://bugs.winehq.org/show_bug.cgi?id=49371

See also: 1e7a73b2
4 years ago
Jonathan G Rennison 3eb8d62148 Fix #157: Integer overflow in town GetNormalGrowthRate 4 years ago
TechGeekNZ ee570e1b6d Cleanup: Fix typos in code comments. 4 years ago
TechGeekNZ 8652a4db76 Cleanup: Give `SetDirtyBlocks` a more descriptive name. 4 years ago
arikover caab095e4e Fix: [CMake] SDL2 Sound was not included 4 years ago
Miguel Horta 40436019fd Fix: Display banlist's indexes correctly
Bug introduced via commit ab711e6942
4 years ago
Jonathan G Rennison 12c25be778 Debug: Add station delete counter to NewGRF debug 4 years ago
Jonathan G Rennison 271fac01a7 Add setting to scale station cargo capacity and rating tolerance by size 4 years ago
Jonathan G Rennison 1917a3e0f8 Station: Add field for number of station tiles 4 years ago
TechGeekNZ fe1925931d Cleanup: Correct typographic errors in code comments. 4 years ago
TechGeekNZ 3d8597d42e Cleanup: Add undocumented parameter to GetSpriteSize. 4 years ago
Patric Stout 4d04009d12 Codechange: remove #ifdef from .cpp files to exclude features
With CMake, these files are simply not compiled to start with.
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
Jonathan G Rennison 43c538fa7d Merge branch 'master' into jgrpp
# Conflicts:
#	src/town_cmd.cpp
4 years ago
Marcus Calhoun-Lopez eeed3a7613 Fix: unbreak building with ICU on macOS
A symbol clash breaks building ICU on macOS, and although it isn't
necessary, it might as well be possible.
4 years ago
TechGeekNZ 937b366546 Cleanup: StationCargoList::AreMergable doxygen comment references Vehicle instead of Station. 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
TechGeekNZ cdd2892c49 Codechange: Realign SDL driver with SDL2 driver to ease maintenance and emphasise differences. 4 years ago
Yexo 1507902d00 Codechange: remove has_newindustries global 4 years ago
Yexo ce618bf7e9 Codechange: replace custom timer and OnGameTick() with OnHundrethTick() 4 years ago
Yexo a82572d0f5 Codechange: remove has_newhouses global 4 years ago
Jonathan G Rennison 677940cfc6 Merge branch 'master' into jgrpp 4 years ago
Michael Lutz 1c0ba07c3c Add: [Script] Native priority queue; useful e.g. for pathfinders. 4 years ago
Jonathan G Rennison 52e0d44c8a Revert "Fix recursive faults in Window crash logger due to message box event loop."
This reverts commit 2b1b7f8b135968cb88d8e65fcb89cdff8d203838.

Replaced by b5ca2161d9.
4 years ago
Niels Martin Hansen 764497206a Fix #8066: Try another fallback colourspace if first one fails 4 years ago
glx b3ddf2c907 Fix: [Win32] Crash message not fitting in crash dialog 4 years ago
glx b5ca2161d9 Fix #7970: [Win32] Disable event loop on crash to prevent recursive faults 4 years ago
Yexo f827bc8c1a Fix #8166: don't crash on loading an invalid roadtype newgrf
Initialization code for GRFFile::roadtype_map was copied from
railtype_map. But while RailType is a byte-sized enum and could thus
be initialized via memset, RoadType doesn't have a defined size.
4 years ago
Yexo a9b3312d1a Fix #8024: make online content gui more responsive while loading
Previously the internal content list was invalidated and sorted for
every new item added. Now the sorting is delayed until the GUI is
drawn, which means we only sort once per GUI tick.

Since the amount of incoming items per GUI tick is not controlled by
the GUI but rather by network speed, we were previously doing a lot
of duplicate work per tick, causing the mouse cursor to lag while
the list was initialized.
4 years ago
translators 281d93f600 Update: Translations from eints
croatian: 1 change by VoyagerOne
4 years ago
TechGeekNZ 16e5f610f7 Cleanup: Correct typographic errors in code comments. 4 years ago
Jonathan G Rennison b018ebf268 Pathfinder: Fix incorrect handling of rail type 90° turns
Due to parenthesis/editing error
4 years ago
Jonathan G Rennison f11cd8f2d0 Fix: Compilation warnings in story_gui and script_story_page
See: #7896
4 years ago
Jonathan G Rennison 14e7d43c62 Merge branch 'master' into jgrpp 4 years ago
TechGeekNZ df0f9193da Fix some typographical errors in comments
Fixes: #153
Applied from: #153
4 years ago
Jonathan G Rennison 8d454cd006 Merge branch 'cargo_type_order' into jgrpp 4 years ago
Jonathan G Rennison 2e93ca9409 Increase verbosity of chosen track assert in TrainController 4 years ago
Jonathan G Rennison 42acbbb936 Debug: Show rail type flags in debug window 4 years ago
translators 71e9c2a71b Update: Translations from eints
chinese (traditional): 2 changes by ww9980
chinese (simplified): 1 change by ww9980
4 years ago
TechGeekNZ 082404e443 Fix: Vehicle leaves station without loading if there is a per-cargo "no load" order for the currently fitted cargo. 4 years ago
Niels Martin Hansen 800ade7702
Feature: Push-buttons on storybook pages (#7896)
Allow more direct player-initiated interaction for Game Scripts, by letting the GS put push-buttons on storybook pages. These buttons can either trigger an immediate event, or require the player to first select a tile on the map, or a vehicle.

Additionally this reworks how the storybook pages are layouted and rendered, to allow for slightly more complex layouts, and maybe speeding drawing up a bit.
4 years ago
Jonathan G Rennison 5243cfd6d0 Use TinyString for custom name fields which are almost always empty 4 years ago
Jonathan G Rennison 81e69fcbbe Add TinyString: SLE_STR compatible c-string wrapper 4 years ago
Jonathan G Rennison f8d6e781ba Merge branch 'master' into jgrpp
# Conflicts:
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj.filters
#	src/base_consist.h
#	src/company_base.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/station_sl.cpp
#	src/settings.cpp
#	src/signs_base.h
#	src/string.cpp
#	src/string_func.h
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/null_v.cpp
4 years ago
Michael Lutz c972a63c8c Codechange: Store info about the dedicated server log file in globals with automatic destruction to simplify control flow in openttd_main. 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
Michael Lutz 715aa67a9c Codechange: Use std::string in INI file parsing. 4 years ago
Michael Lutz 8aef14386f Add: Optional implementation of std::optional for pre-C++17 compilers.
Sourced from https://github.com/akrzemi1/Optional, Boost Software License, Version 1.0.
4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
Michael Lutz 9b6f5e3bb8 Codechange: Store GS lang texts in std::strings. 4 years ago
Michael Lutz 9c2e47d03c Codechange: Use std::string for storing GRF error messages. 4 years ago
Michael Lutz c082f570ce Codechange: Use std::string when translating TTDP NewGRF string codes. 4 years ago
Michael Lutz 808c8198d5 Codechange: Consistently use WChar when passing characters around, and also define it as char32_t. 4 years ago
Michael Lutz 43cd892e0c Codechange: Replace custom linked list for GRF texts with STL vectors and strings. 4 years ago
Michael Lutz f2b40f40aa Codechange: Replace SmallPair with std::pair.
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
4 years ago
translators 7309bdec48 Update: Translations from eints
latvian: 9 changes by Tranzistors
4 years ago
dP 82572754dd Fix: Trees disappear completely after a few years when they're not allowed to spread 4 years ago
Yexo 587d8e716b
Fix #8155: Roadtype speed limit in toolbar dropdown in scenario editor was doubled 4 years ago
Jonathan G Rennison ea06a0670d Add rail ground type support for rail custom bridge heads
See: #146
4 years ago
translators b8a896d52c Update: Translations from eints
latvian: 35 changes by Tranzistors
4 years ago
dP 93d1d8773f Fix: Desync after house replacement 4 years ago
translators d11bae58a0 Update: Translations from eints
spanish (mexican): 7 changes by Absay
4 years ago
translators 70ccd34fa0 Update: Translations from eints
latvian: 13 changes by Tranzistors
4 years ago
translators edc7ee2cda Update: Translations from eints
indonesian: 1 change by fanioz
dutch: 1 change by JanWillem
latvian: 39 changes by Tranzistors
spanish (mexican): 1 change by Absay
4 years ago
translators 9b8d5ea074 Update: Translations from eints
spanish (mexican): 16 changes by Absay
russian: 3 changes by Lone_Wolf
4 years ago
Jonathan G Rennison 212f6f4dcb Improve link refresher handling of conditional orders 4 years ago
Jonathan G Rennison d37d08ebb3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/industry_cmd.cpp
#	src/station_cmd.cpp
#	src/station_func.h
4 years ago
Jonathan G Rennison a94a8da990 Suppress warning about using operator ^ on bool 4 years ago
translators 83cd040c61 Update: Translations from eints
latvian: 21 changes by Tranzistors
korean: 5 changes by telk5093
4 years ago
Jonathan G Rennison 77673b731c Merge branch 'master' into jgrpp
# Conflicts:
#	src/industry_cmd.cpp
#	src/openttd.cpp
#	src/station_cmd.cpp
#	src/station_func.h
4 years ago
Jonathan G Rennison e67669d6ed Add missing include to ini_type.h 4 years ago
dP f2a9a1e2a5 Fix #8137: New clients can't join (desync) after funding an industry 4 years ago
dP 7bd52970a1 Codechange: Refactor FindStationsAroundTiles to avoid code duplication 4 years ago
translators 6dcc99edab Update: Translations from eints
latvian: 45 changes by Tranzistors
spanish (mexican): 9 changes by Absay
4 years ago
glx22 cca613e3b8
Fix #8142, 5aa6351: Buoy owner and tile owner can be different (#8143) 4 years ago
glx22 d15c7dbdeb
Add: stations_near and industries_near cache check (#8139) 4 years ago
translators 48c61c1da1 Update: Translations from eints
latvian: 54 changes by Tranzistors
spanish (mexican): 4 changes by Absay
4 years ago
Ilayaraja 48d2eb703c
Add: INR currency (#8136)
Co-authored-by: ilayarja97 <ilayarja97@gmail.com>
4 years ago
Jonathan G Rennison 763a2826b6 Merge branch 'master' into jgrpp
# Conflicts:
#	src/gamelog.cpp
4 years ago
Jonathan G Rennison 0202211514 Conditional orders: Add slot acquire modes to train in slot conditional 4 years ago
glx 39092ee13b Fix #8119: Update docking area when clearing a shore rail tile 4 years ago
glx 5aa6351042 Fix #8132: Corrupted savegame crashing OpenTTD on load 4 years ago
glx 0ed00ae111 Fix: Stop any gamelog action when recovering from SlError() 4 years ago
translators 3ba34a72aa Update: Translations from eints
latvian: 80 changes by Tranzistors
spanish (mexican): 10 changes by Absay
4 years ago
Jonathan G Rennison 0dd9562ead Continue waiting at rail waypoint if next order is a wait order for the same waypoint 4 years ago
Jonathan G Rennison 0100ea4e32 Conditional orders: Add mode to check waiting station cargo via next node 4 years ago
Jonathan G Rennison 1c768705a1 Use lower_bound instead of equal_range in StationCargoList::ShiftCargo
Calling erase could potentially invalidate the upper_bound iterator
4 years ago
Jonathan G Rennison ea8a89e377 Reset conditional order comp operator when switching to load % or waiting cargo amount. 4 years ago
SamuXarick a95fbd59a3
Fix #8119, f538179: Update docking tile area when placing a diagonal rail next to a dock end (#8124) 4 years ago
translators 61e1a45100 Update: Translations from eints
latvian: 8 changes by Tranzistors
spanish (mexican): 1 change by Absay
4 years ago
Niels Martin Hansen 2c84549db0 Fix: Two issues in MIDI file writer
Variable-length values would write threshold values with a byte too many.
System Exclusive messages would cause write to fail since the end byte was treated as part of next message.
4 years ago
Jonathan G Rennison 07c9621fcf Merge branch 'master' into jgrpp 4 years ago
Jonathan G Rennison 58c02030c2 Network: Avoid racy use of flags in TCPConnecter::CheckCallbacks 4 years ago
Jonathan G Rennison ef7e658dee Network: Remove static buffer form of NetworkAddress::GetAddressAsString
This is used in multiple threads concurrently
4 years ago
Jonathan G Rennison af09391bfb Use atomic load for _realtime_tick in _SetGeneratingWorldProgress 4 years ago
Jonathan G Rennison a1d85b812b Network: Use unique_ptr for packets, use deque for packet queues 4 years ago
Jonathan G Rennison caa27cfa39 Network: Fix locking issues around server map PacketWriter 4 years ago
translators 170f3f9b2b Update: Translations from eints
latvian: 38 changes by Tranzistors
4 years ago
glx22 82573a5e73
Fix #8117: Memory leak in admin port (#8122) 4 years ago
glx22 86e9326b7f
Add: docking tiles cache check (#8120) 4 years ago
glx bc8333723c Fix #8021: limit savegame range for docking tiles fixing 4 years ago
Yexo 64278fd598 Fix: reset roadtype/streetcartype info for non-road bridges 4 years ago
translators 364f6806c8 Update: Translations from eints 4 years ago
glx f0747c8c51 Update: Lang files 4 years ago
glx e0d20a44d2 Codechange: Use a dynamic copyright year 4 years ago
Jonathan G Rennison 197a4f2e3e fcitx: Use XLookupString instead of XLookupKeysym to fix modifier keys
See: #142
4 years ago
Jonathan G Rennison b11852a076 Fix insufficient YAPF cost added when reversing behind signal
Fix 29520437, which was an insufficient fix

See: #150
4 years ago
Yexo 19dc31e0b3 Fix #8108: always update tile_hash after updating v->tile 4 years ago
SamuXarick 8edbb42fe8 Fix c01a2e2: crash on loading old savegames with invalid animated tile information 4 years ago
SamuXarick c01803cd42 Fix #8108: possible crash on loading TTD savegames with phantom oil rigs 4 years ago
translators aa91c0666e Update: Translations from eints
korean: 1 change by telk5093
4 years ago
frosch 9f2e23d8ba Fix #8093: Build+Refit changed game-state in command test run, and thus caused desyncs.
Use DC_AUTOREPLACE for actions that shall be reversibe, in this case:
- Do not rearrange free wagons in test-run.
- Do not discard OrderBackups.
The latter was not triggered by actual auto-replace, since it does not set a 'user'.
4 years ago
frosch 0f9dc88834 Fix: When build+refit an engine, do not refit any free wagons that may get attached. 4 years ago
frosch 68244393f1 Codechange: Unify the tests whether build+refit is in simulation-test or real-run. 4 years ago
Jonathan G Rennison 74b6981d97 Merge branch 'master' into jgrpp
# Conflicts:
#	src/os/macosx/macos.mm
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/fullscreen.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/video/cocoa/wnd_quickdraw.mm
4 years ago
Jonathan G Rennison e559bb98c4 Viewport: Fix scroll region sort comparison not meeting strict weak ordering
fa90b567 was not a proper fix
4 years ago
Jonathan G Rennison cba9b56ff7 Custom bridge heads: Fix secondary rail track type when removing piece
In case when new configuration is parallel tracks
4 years ago
Jonathan G Rennison b458c0c88d Fix free wagon re-arrangement when estimating train build and refit cost
See: #149
4 years ago
Jonathan G Rennison 686ff03817 Fix graphical glitch when rendering narrow viewport slices 4 years ago
Jonathan G Rennison 669b68d140 Crashlog: Suffix crash file names with date/time 4 years ago
Jonathan G Rennison 60dabc68a0 Add a scope info logger for DoSetViewportPosition calls 4 years ago
Jonathan G Rennison b03889d7e6 Add DumpWindowInfo function 4 years ago
Jonathan G Rennison bee840bc44 Increase verbosity of height asserts in Blitter_32bppBase::ScrollBuffer 4 years ago
Jonathan G Rennison ad72fad68e Fix #148: Rename STR_MONEY_CHEAT_MULTIPLAYER* strings 4 years ago
Michael Lutz 1f1345de09 Codechange: [Script] Improve copying a list into another empty list. 4 years ago
Jonathan G Rennison 563037e401 Add brackets around bitmath macro definitions 4 years ago
Jonathan G Rennison a3652b998e
Merge pull request #145 from telk5093/jgrpp
ko-KR: Update translations
4 years ago
Jonathan G Rennison 2952043748 Fix insufficient YAPF cost added when reversing behind signal
Distance to target cost compensation was too small in case where target
was perfectly in line with reversing track due to exit direction offset
added in PfCalcEstimate.

See: #147
4 years ago
Jonathan G Rennison eef6ad7b2a Crash log: Save config file in new crash save chunk 5 years ago
Jonathan G Rennison 850f860f2d Fix dump_load_debug_log console command overwriting data 5 years ago
Jonathan G Rennison 6821c0e945 Use builtins for overflow detection in OverflowSafeInt on gcc/clang 5 years ago
TELK 951b687f5e ko-KR: Fix typo 5 years ago
TELK e236d938a9 ko-KR: Update translations 5 years ago
Jonathan G Rennison be3f03358f Departure boards: Fix handling of waiting orders
See: #144
5 years ago
Jonathan G Rennison 59d84975e0 Fix length limit of waiting cargo amount cond order text input 5 years ago
Jonathan G Rennison 3cb521afb3 Viewport: Fix screen bounds of empty bounding box sprites when splitting 5 years ago
Jonathan G Rennison 89902f2f4a Debug: Add viewport debug flags for sprite split control 5 years ago
Jonathan G Rennison 4b374cb84a Add half-tile margin when horizontally splitting viewport drawing region 5 years ago
Jonathan G Rennison e0902c93a4 Revert "Viewport: Trim parent sprites to redraw area before sorting"
This reverts commit f563dfe194.

This caused rendering issues with vehicles passing under bridges
at the very edge of the drawing area.
5 years ago
Jonathan G Rennison 1506479f56 Cheat: Add cheats to set inflation income and cost factors
See: #124
5 years ago
Jonathan G Rennison 3e7618f519 Save/load: Add extra cheats savegame chunk 5 years ago