Commit Graph

248 Commits (sse-blitter-set-alpha)

Author SHA1 Message Date
frosch acf9d786f1
Fix: [NewGRF] Default value of RailVehicleInfo::railveh_type was inconsistent with other default properties. (#9967)
If a NewGRF assigned neither "power" nor "dual-headed" properties,
then "railveh_type" defaulted to "singlehead-engine", while "power=0" said "it's a wagon".
2 years ago
Michael Lutz 21675ec7e2 Codechange: Un-bitstuff vehicle/engine commands. 3 years ago
Michael Lutz 7048e1522f Codechange: Move flags in CommandProc in front of the command arguments. 3 years ago
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.
3 years ago
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
rubidium42 661728558e Codechange: let IsUnique.* functions accept std::string 3 years ago
PeterN 3dbd6475fe
Codechange: Use C++ features for train wagon overrides. (#9141)
This removes the need for C-style array management and allows use of iterators to perform wagon override lookups.
3 years ago
dP 7c7c6cde03 Fix: Do not unlock railtypes when enabling wagons with GameScript 3 years ago
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 3 years ago
dP d8dfa1613f Fix: Recompute road/railtype availability after disabling the engine 3 years ago
Patric Stout 5f591c86fe
Fix 85a49a0d: invalidate airport toolbar when new planes become available (#8532)
Otherwise if the airport button is disabled, it will remain disabled
until you close/open the toolbar again.
4 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
frosch b08d8c7edb Cleanup 9f42358: Make also reliability_start randomised independent of introduction date. 4 years ago
frosch d24a9a9df5 Cleanup 8139b14: Move a comment back to the line it belongs to, and add a comment for new code. 4 years ago
SamuXarick 9f423586ad
Change #8325: Make engine reliability independent of introduction date (#8470) 4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 4 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
Pavel Stupnikov d7a928a08b Feature: GS method to control engine availability for a specific company (#7791)
* Feature: GS method to allow company to use an engine before its introduction date

* Feature: GS method to retire an engine early for a specific company
5 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
glx 1f6b3a37f9 Codechange: Replace FOR_ALL_ENGINES with range-based for loops 5 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
Eddi-z 8139b14e9c Change: Synchronize introduction date and reliability randomness across vehicles with the same base introduction date (#7147) 5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Johannes E. Krause 662dcc3c31 Fix #6920: Make 9.8m/s^2 a common constant for TE-calculation 6 years ago
PeterN 4cebebcf68
Change: Add CargoTypes type for cargo masks. (#6790) 6 years ago
alberth ad88588481 (svn r27797) -Add: Display aircraft type in its vehicle window (patch by Samu) 7 years ago
frosch 4b8b9e1cb1 (svn r27700) -Codechange: Simplify railtype date introduction. A check that is safe to run every day before the last railtype has been introduced, is also safe to run after the last railtype has been introduced. 8 years ago
frosch ee9a54c0a0 (svn r27598) -Fix: Company 0 could accept engine previews before they were offered. 8 years ago
frosch ebb6e38075 (svn r27578) -Fix [FS#6454]: Vehicles could not be hidden from the purchase list when they were in exclusive preview. 8 years ago
alberth f72ad87540 (svn r26802) -Add: Command to set visibility of an engine for a company (based on patch by Juanjo). 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
alberth 24d3594723 (svn r25640) -Fix: Do not suggest a start date for the game when there will be no vehicles available at all. 11 years ago
alberth 46901b73b2 (svn r25639) -Codechange: Rename both 'STR_ERROR_NO_VEHICLES_AVAILABLE*' strings. 11 years ago
rubidium 1efc64fa7d (svn r25553) -Fix [FS#5530]: provide a warning when no vehicles are available, and tell what to do in that case 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch f93602aec9 (svn r24813) -Change: Offer engine previews only to companies which actually use the particular vehicle-type/cargo-type combination. 12 years ago
frosch 51fca5eec7 (svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone. 12 years ago
frosch 5c358c4173 (svn r24811) -Add: Close engine preview window when another client accepts it. 12 years ago
frosch 0e4b212c45 (svn r24810) -Fix: Make engine preview offers more robust wrt. changes in the company ranking. 12 years ago