Commit Graph

481 Commits (5bd2b15e863eaf54bfee4dfebb280d6884169354)

Author SHA1 Message Date
peter1138 5bd2b15e86 Codechange: Replace NULL with nullptr in squirrel interface. 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
peter1138 f0336f1f17 Codechange: Remove ship max order distance from script API. 5 years ago
glx d0e8060182 Fix 6fc60d8c4f: forgot to update API changelog 5 years ago
PeterN e1069eee05
Codechange: Check airport layout would fit within map bounds before iterating tiles. (#7429) 5 years ago
PeterN b6e3e30d86
Codechange: Distance between town and airport has already just been found, so use it. (#7427)
Previously the distance was thrown away, only to be expensively recalculated again.
5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Henry Wilson 03ca3190c9 Codechange: Use range-based for-loop in Auto[Free|Delete]SmallVector 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 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 4b349c0f90 Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged
SmallVector now requires that items be default constructible
This isn't an issue since some contained items were previously created
uninitialized.

Temporary default constructors are added to the following structs
- SmallPair
- SmallStackItem
- GRFPresence

Where vector<bool> is required, transition immediately to std::vector
to avoid returning proxy object references.
5 years ago
glx f8e6cd10ef Add: script API functions for build with refit feature 5 years ago
peter1138 d54b6ac09b Feature: When filtering purchase list by cargo type, make buy button perform a refit if required. 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
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
Peter Nelson 8b1b3fd0f9 Feature: Non-rectangular sparse station catchment area. 5 years ago
peter1138 ed6084523d Codechange: Convert StationList from SmallVector to std::set. 5 years ago
glx22 dae35188ab
Fix 13962a847, 00d28a500: forgotten squirrel_export run (#7345) 5 years ago
PeterN 41563a871b
Add: AI API for vehicle group colours (#7336) 5 years ago
frosch a67ee02529
Change: Heading for 1.10 now (#7319) 5 years ago
Peter Nelson 5a5944867d Add: Add parent_group_id parameter to CreateGroup() 5 years ago
Peter Nelson 5d3ccae6c5 Add: AI function to get current usage of a group. 5 years ago
Peter Nelson e0c2ad1b65 Add: AI functions to get/set company colours. 5 years ago
Peter Nelson 3c047b124e Add: AI functions to get current and last year profit of a group. 5 years ago
Peter Nelson b62452903a Add: AI functions to set/get vehicle group parent. 5 years ago
Niels Martin Hansen 13962a8475 Change: Framerate window can now scroll and resize 5 years ago
Peter Nelson fde5bd0ccf Change: Add scrollbar to cargo legend in cargo payment rates window. 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
Samu ba55f93f41 Doc: [AI] UnshareOrders empties the orders list of the vehicle. 5 years ago
PeterN 5dc377244d
Fix #7224: AI could no longer create groups. (#7233) 5 years ago
glx 70e1c57f81 Fix: line ending issues with MSYS2 5 years ago
Peter Nelson bfdad9ad1b Fix #7108: Missed generate_widget script run for livery changes. 5 years ago
Samu 011257dc88 Change: Allow AI companies to start immediately.
Allow multiple AIs to possibly start in the same tick.
start_date = 0 becomes a special case, where random deviation does not occur.
If start_date was not already 0, then a minimum value of 1 must apply.
5 years ago
SamuXarick 1e5a6765d9 Change: Give AI/GSBridge::GetName an extra parameter to refer the vehicle type (#6988) 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
glx22 b28a678436 Fix #7112, fef8b831a9: incorrect precondition check (#7127) 5 years ago
glx 7292591967 Add: generate_widget.vbs to allow script_window.hpp enums generation for users unable to run bash/gawk scripts 6 years ago
glx 636fcc2cc0 Fix: keep the line ending when generating widget enums with bash/gawk on windows 6 years ago
glx 9f0ad7e269 Fix: BSD find used by OSX requires explicit path 6 years ago
glx 3f28e0cf53 Add: squirrel_export.vbs for users unable to run bash/gawk scripts 6 years ago
glx 8e5a8d3ec3 Cleanup: remove svn references in squirrel_export.sh 6 years ago
glx 2cf9405aa2 Fix: remove manual single file generation in squirrel_export.sh as it's broken 6 years ago
glx 34c438d7ad Fix: keep line endings when running squirrel_export.sh on windows 6 years ago
Eddi-z 13056aedbc Add: Conditional order for max. reliability (patch by Cirdan, #6360) (#7017) 6 years ago
Niels Martin Hansen 12ba56c5a3 Fix 6accbf9: Silence warnings about unused fread() result 6 years ago
Alberth 4a255e879a Fix #6966: Only allow switching to a valid company. 6 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
Joan Josep 8890926b0d Fix #6974: Add save-load filter widget to api 6 years ago