Commit Graph

248 Commits (ee333a954934fee206a65795670d15150178c0f3)

Author SHA1 Message Date
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 3 years ago
Johannes E. Krause f1bc4d8407 Add: [NewGRF] Vehicle variable 4A now also returns, whether the current tile has catenary. 3 years ago
frosch 868d84bbfc Add: [NewGRF] vehicle variable 63 to test the tracktype of the current tile against a given tracktype. 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 3 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.
4 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) 5 years ago
glx 801cbea9cc Codechange: use std::sort() for all std::vector types 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 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 2bc2de9034 Codechange: Replaced SmallVector::Find() with std::find() 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 5 years ago
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
frosch d9d669dcf8 (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 6 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
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
frosch 6562ec9402 (svn r26430) -Feature(ette): Add vehicle modflag 1 (unloading in progress). 10 years ago
frosch 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch 9e5fc88499 (svn r26294) -Change: [NewGRF] Make vehicle variable 61 return 'not available' instead of zero when using it in invalid callback contexts. 10 years ago
frosch e0d69933f6 (svn r26157) -Feature: [NewGRF] Vehicle variable 4D for determining the position within an articulated vehicle. 11 years ago
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 years ago
rubidium 13855f0a09 (svn r25705) -Fix: a number of typos (inspired by 90c920601c84975acb694f3673e2beb08b013753) 11 years ago
frosch 5eddbb338b (svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen) 11 years ago
rubidium c77cd1f409 (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
frosch b65ece1ea9 (svn r24695) -Fix/Cleanup: Remove remaining (incorrect) usages of ResolverObject::scope and count. 12 years ago
alberth 33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 12 years ago
alberth 4c9bea2a71 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 12 years ago
alberth 69e07c3e00 (svn r24691) -Codechange: Add resolver classes for vehicles. 12 years ago
alberth 438495b433 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 12 years ago
frosch 38f265c083 (svn r24528) -Fix: [NewGRF] RandomAction 84 should interpret register 100 as signed. 12 years ago
frosch e37e2d92a6 (svn r24527) -Add: [NewGRF] Allow resolving var 5F via vehicle var 61. 12 years ago
michi_cc 6f88071942 (svn r24371) -Add: [NewGRF] Allow vehicle variable 61 for callback 2D (recolour) and re-randomisation. 12 years ago