Tyler Trahan
98d809c33b
Codechange: Don't use macros for DAYS_TILL and friends ( #10746 )
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Peter Nelson
4a5e413a6c
Cleanup: Remove unnecessary VehicleRandomBits()
...
Simple Random() assignment to byte does the same.
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
Tyler Trahan
97cfd40649
Fix #10630 : Don't allow shifting service date earlier than 0 ( #10643 )
1 year ago
Tyler Trahan
3719f60de0
Add: Use specific error message when vehicle cannot go to station/waypoint
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
1 year ago
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
1 year ago
SamuXarick
b2a5ebcfc4
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI ( #10227 )
...
* Change: Store "all time" and "since minimum age" last year profits on groups
* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace
* Codechange: Refactor profit last year
* Change: Rename some group related items for clarity
* Change: Reorder the fields in GroupStatistics
That way less memory gets wasted.
1 year ago
Rubidium
375a5b8e3f
Codechange: refactor FindClosestDepot to not use pointers, but return a struct
2 years ago
Bernard Teo
8a78fa7121
Feature: Contextual actions for vehicles grouped by shared orders ( #8425 )
2 years ago
Henry Wilson
59dbcdb5ba
Feature: Display power-to-weight ratio in ground vehicle details GUI
2 years ago
Nicolas Chappe
f8a7b76675
Fix #9665 : [Linkgraph] Fix travel times of non-direct journeys
2 years ago
Charles Pigott
146827c458
Fix #9877 : GS could trigger 'Cost: 0' cost message ( #9878 )
2 years ago
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
2 years ago
Tyler Trahan
9c18236f2c
Fix: Suppress vehicle age warnings for stopped vehicles
3 years ago
Michael Lutz
41fa16f325
Codechange: Don't use globals for return values from vehicle command procs.
3 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
e08b3abe7f
Codechange: Un-bitstuff group and autoreplace commands.
3 years ago
Michael Lutz
21675ec7e2
Codechange: Un-bitstuff vehicle/engine commands.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
nchappe
2cb6351af5
Fix: Update last servicing dates when using the date cheat ( #9694 )
3 years ago
SamuXarick
a57c2b073a
Feature: Display icon/text whether vehicle is lost in vehicle (list) window ( #9543 )
3 years ago
Nicolas Chappe
977604ef08
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
...
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
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
Matt Kimber
520595ff87
Fix 3d7ab09: stopped trains not updating viewport hash when reversed for a second time ( #9165 )
3 years ago
Charles Pigott
dd798d688b
Fix #8919 : Release builds with asserts enabled ( #8925 )
3 years ago
Patric Stout
fece1c57ca
Codechange: Suppress warnings when asserts are disabled ( #8917 )
3 years ago
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
3 years ago
SamuXarick
a4035af337
Codechange: Apply coding style ( #8640 )
...
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
3 years ago
Matt Kimber
40d5fe1631
Fix eeb88e8: Trains reversed while paused do not correctly update sprite bounds ( #8540 )
3 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
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Matt Kimber
5728f9c7d0
Codechange: consider vehicle co-ordinates when identifying viewport candidate as using only the hash generates false positives
4 years ago
Matt Kimber
9b28b15e67
Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods
4 years ago
Matt Kimber
eeb88e87d8
Codechange: improve performance for complex vehicle chains by resolving sprites less often
4 years ago
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
4 years ago
Galigator
933d02dce2
Change: Service depot also reset breakdown chance.
4 years ago
TechGeekNZ
a10013dd00
Codechange: Spell 'Viewport' consistently
...
Some places in the codebase misspell 'Viewport' as 'ViewPort' or 'view_port'.
This patch makes everything consistent.
4 years ago
Charles Pigott
218db00c4c
Fix #8216 : Don't show floating text on autoreplace if cost is 0
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