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
Patric Stout
30172fc037
Codechange: cleanup CargoPacket in terms of variable/function names ( #11278 )
...
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.
1 year ago
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
1 year ago
Tyler Trahan
9a602ff304
Fix #10334 : Store separate newgrf-safe version of date_of_last_service. ( #11124 )
...
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.
Co-authored-by: Peter Nelson <peter1138@openttd.org>
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
rubidium42
9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days ( #11112 )
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
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Rubidium
19ec4e8beb
Codechange: replace ClampToI32/U16 with ClampTo<int32_t/uint16_t>
1 year ago
Peter Nelson
7ccdefa1c1
Change: Increase vehicle random data from 8 to 16 bits.
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Rubidium
7088f5b7c7
Codechange: use string/fmt instead of printf for grfmsg
1 year ago
Rubidium
90f1768006
Codechange: add non-nullptr asserts in cases where it should never be nullptr
...
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
2 years ago
Peter Nelson
efa20dd969
Change: Support engine property 0xC6 in purchase list.
2 years ago
frosch
111a47af0d
Codechange: rename 'info_view' to 'rotor_in_gui', because it is only used by helicopters.
3 years ago
frosch
bc984d9af5
Codechange: remove redundant 'info_view' parameter, it can be derived from 'image_type'.
3 years ago
Michael Lutz
ee333a9549
Fix 2183fd4d: [NewGRF] Use divide instead of right shift for signed numbers. ( #9480 )
...
"For negative a, the value of a >> b is implementation-defined (in most implementations, this performs arithmetic right shift, so that the result remains negative)."
3 years ago
Vít Šefl
2183fd4dab
Feature: [NewGRF] Maximum curve speed modifier for rail vehicles ( #9346 )
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
Peter Nelson
f785a70a2b
Cleanup: Use std::vector in RealSpriteGroup.
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
Johannes E. Krause
3ac43582c2
Codechange: [NewGRF] Make it more explicit which parts of the TTD vehicle structure (var 80+) are not implemented
4 years ago
Johannes E. Krause
f1bc4d8407
Add: [NewGRF] Vehicle variable 4A now also returns, whether the current tile has catenary.
4 years ago
frosch
868d84bbfc
Add: [NewGRF] vehicle variable 63 to test the tracktype of the current tile against a given tracktype.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
4 years ago
Niels Martin Hansen
c8779fb311
Feature: NewGRF callback profiling ( #7868 )
...
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
5 years ago
glx
1f6b3a37f9
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
6 years ago
glx
801cbea9cc
Codechange: use std::sort() for all std::vector types
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
2bc2de9034
Codechange: Replaced SmallVector::Find() with std::find()
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
097328c3d7
Codechange: Replaced SmallVector::Get() const with std alternatives
6 years ago
Henry Wilson
f3938fdb83
Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
frosch
d9d669dcf8
(svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent.
7 years ago
frosch
82ae414e8d
(svn r27928) -Fix: [NewGRF] While executing random triggers, var 5F should include the new triggers.
...
-Fix: [NewGRF] Reset used random triggers only after all A123 chains have been resolved, so that all RA2 in all chains can test the shard triggers. This also includes multiple RA2 in the same A123 chain.
-Fix: [NewGRF] Industry random triggers are stored per tile, even when randomising the shared random bits of the parent industry.
7 years ago
frosch
117e73751c
(svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites.
8 years ago
frosch
d2393b4f6c
(svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq.
8 years ago
frosch
c97d3c322f
(svn r27075) -Fix [FS#6182]: Variable 47 used the carge translation table of the wrong GRF in case of callback 1D.
10 years ago
peter1138
759e963083
(svn r27060) -Doc: Remove obsolete comment (64KB LUT would be 8GB with current limits)
10 years ago
frosch
54a5b1b0d0
(svn r26988) -Add: [NewGRF] Allow callback 160 to access variable 61.
10 years ago
rubidium
c0771b1657
(svn r26866) -Change: make aircraft ascend/descend when they are too close to the ground or too far away (based on patch by ic111)
10 years ago