Loïc Guilloux
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
1 month ago
Peter Nelson
d2c8b476b5
Codechange: Add functions to test if a station/roadstop class is a waypoint.
...
This is now checked by class label instead of by index.
2 months ago
Peter Nelson
9f8c9724be
Codechange: Add station/roadstop class labels for DFLT/WAYP.
...
This avoids repeating the same multichar literal value.
2 months ago
Peter Nelson
774f811217
Codechange: Use std::optional for town parent scope resolver. ( #12530 )
...
When resolving NewGRF, the parent town_scope is lazily initialised as it does not always need to be used.
Replace the manually managed pointer with std::optional to simplify. Using std::optional avoids extra memory allocation.
2 months ago
Peter Nelson
77f27e0804
Change: Expose NewGRF classes and specs as spans and simplify iteration.
...
This replaces some index-based loops with range loops.
3 months ago
Peter Nelson
668186ca5b
Codechange: Remove macros involved with NewGRFClass. ( #12363 )
...
Use direct class instantiation instead.
3 months ago
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
3 months ago
Peter Nelson
8172e25273
Codechange: Use range-for when iterating station speclists. ( #12212 )
...
This replaces indexed access.
4 months ago
Peter Nelson
278c3a7db1
Codechange: Use reference instead of copy of NewGRF speclist item.
4 months ago
Peter Nelson
4ffe1da540
Fix: NewGRF roadstops were ignored if only in default class. ( #12089 )
...
If a NewGRF defines roadstops in the default class and no other classes are defined, they would be ignored and not selectable.
4 months ago
kiwitreekor
8d62a8f0f0
Add: Station variable 6B to get extended station id of nearby tiles ( #10953 )
5 months ago
Peter Nelson
97e2bc612c
Codechange: Rename and move SpriteGroup-specific cargo types into a namespace.
...
These 'cargo types' have special defined uses and must not be used elsewhere. This makes it clearer that they are special.
6 months ago
Peter Nelson
952d111b94
Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
...
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
6 months ago
Rubidium
e3f49ee7a0
Codechange: coding style fixes
6 months ago
Tyler Trahan
49d53c41ab
Doc: Don't use other names for road vehicle bay stops ( #11418 )
8 months ago
Jonathan G Rennison
4df2640f87
Fix: Tile slope missing from road stops varact2 variable 0x42
8 months ago
Peter Nelson
398c7e5f9d
Codechange: Use new function to get a bitmask of empty cargo types.
9 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
10 months 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
11 months ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
PeterN
bc6a4b1d08
Fix: Set up default station/waypoint classes properly. ( #10789 )
1 year ago
kiwitreekor
3375f25b70
Fix: Var68 for station and roadstop was broken ( #10784 )
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Peter Nelson
912eb68981
Change: Extend entity override manager and station spec lists to support 16 bit IDs.
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
1 year ago