Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
7 months ago
Michael Lutz
8b9f59d320
Codechange: Use references for non-optional in/out values of slope functions
7 months ago
Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
7 months ago
merni-ns
b8b80cb42e
Fix #12134 : Use correct error messages if clearing drive-through road stops fails ( #12139 )
7 months ago
Joan Josep
1b33b4058e
Fix: Redraw orders when a station feature is added/removed. ( #12061 )
8 months ago
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
8 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
8 months ago
Rubidium
e3f49ee7a0
Codechange: coding style fixes
9 months ago
Jonathan G Rennison
3e2060f155
Fix #11337 : Station blocked/pylon/wire bits with CBID_STATION_TILE_LAYOUT ( #11656 )
9 months ago
Jonathan G Rennison
3b18877b87
Fix #11629 : AirportGetNearestTown for rotated airports ( #11631 )
...
Add rotation parameter to AirportGetNearestTown
Add wrapper for existing stations
Remove unnecessary iterator cloning
9 months ago
Peter Nelson
c0ea0589b4
Fix: AirportGetNearestTown incorrectly assumed first TileIterator result was origin. ( #11565 )
...
Not all TileIterators are equal, and some do not start at the top-corner, so the perimeter check was wrong. As the caller already has thie origin tile, use that instead.
10 months ago
Peter Nelson
a258833aee
Fix 67d071d: WC_STATION_LIST should be invalidated by owner, not station index. ( #11530 )
10 months ago
Tyler Trahan
1f41e773d6
Codechange: Use consistent name for bay road stops
...
As of #10494 , this is how we describe original dead-end road stops.
10 months ago
Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
11 months ago
Tyler Trahan
49d53c41ab
Doc: Don't use other names for road vehicle bay stops ( #11418 )
11 months ago
Tyler Trahan
2dd2910ab3
Feature: Cheat to fix station ratings at 100% ( #11346 )
11 months ago
Peter Nelson
f06b3e9846
Change: Use CARGO_LIST to show station cargo acceptance changes. ( #11379 )
...
This simplifies construction of the news message and allows for more than
two changes to be show in one line.
12 months ago
Peter Nelson
9602de474d
Codechange: Use iterators and/or range-for on cargo related loops.
12 months ago
Peter Nelson
b5dc9328f2
Change: Store station blocked/wires/pylons flags in map. ( #11337 )
...
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.
This potentially affects rail pathfinding performance.
Savegame version is not bumped, as the flags can just be updated every
time.
1 year ago
Peter Nelson
398c7e5f9d
Codechange: Use new function to get a bitmask of empty cargo types.
1 year ago
Peter Nelson
69ee38bd43
Codechange: Use GetAcceptanceMask() instead of duplicating it.
1 year ago
Peter Nelson
122bfa2afd
Codechange: Use less locals for station free names bitmask.
1 year ago
Peter Nelson
aeaa552385
Codechange: Use std::bitset instead of bool array.
...
This avoids use of C-style pointers and memset.
1 year ago
Peter Nelson
2eacf36d0a
Codechange: List fallback station names by ID instead of magic number.
...
This improves readability and intention of the station name generator.
1 year ago
frosch
baf7cc858b
Codechange: Rename ship docking tile related functions.
1 year ago
frosch
5733145c59
Cleanup: Remove unneeded parameters.
1 year ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Patric Stout
9c49a61249
Fix: base cargo payment on load/unload tile, instead of station sign location ( #11281 )
1 year ago
PeterN
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
1 year ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
1 year ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
1 year ago
Jonathan G Rennison
8df4aa7979
Fix: Road stops should not draw a ground sprite of 0 ( #11214 )
1 year ago
Patric Stout
07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype ( #11190 )
...
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
1 year ago
Patric Stout
a9ed590ca7
Codechange: use TimerGameCalendar::Date for variables in linkgraph that are dates ( #11187 )
1 year ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
Rubidium
3e8f8c55c2
Codechange: make creating temporary StringParameters easier
1 year ago
Rubidium
1d902a97ce
Codechange: move StringParameters to strings_internal.h
1 year ago
Rubidium
0a5e58451b
Codechange: pass string parameters by reference
1 year ago
Rubidium
36aaa9d683
Codechange: let GetStringWithArgs use StringBuilder
1 year ago
PeterN
584faaf064
Change: Reorganise industry accept/produce arrays. ( #10853 )
...
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
1 year ago
Peter Nelson
f177ce7c9a
Codechange: Base CargoArray off std::array.
...
This avoids needing to define array accessors and allows use of
default value initialization.
1 year ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
1 year ago
Peter Nelson
e6740046ee
Codechange: Use range-for iteration.
1 year ago
PeterN
882f06bf14
Fix: Support more than 256 stations/waypoints/roadstops per class. ( #10793 )
...
It was already possible to define more than 256 per class, but not possible
to use them as the index used in GUI and passed through commands was limited
to a byte.
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
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
Tyler Trahan
bc44158f9a
Change: Allow overbuilding station and waypoint tiles ( #10618 )
1 year ago