summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
AgeCommit message (Collapse)Author
2021-02-21Fix #8276: Crash when a NewGRF object's size was not setCharles Pigott
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-27Add: [NewGRF] Patch flag to test if inflation is on or off.Michael Lutz
2020-12-15Fix: [NewGRF] Action 7/9 conditions 0x0F to 0x12 failed, if 'param' was ↵frosch
0x88. (#8382) Fix: [NewGRF] Action 7/9 conditions 0x0B to 0x12 failed, if 'param' was 0x85. These conditions are supposed to ignore 'param' entirely.
2020-12-15Codechange: Make use of the improved C++17 emplace_back function.Michael Lutz
2020-06-01Codechange: remove has_newindustries globalYexo
2020-06-01Codechange: remove has_newhouses globalYexo
2020-06-01Fix #8166: don't crash on loading an invalid roadtype newgrfYexo
Initialization code for GRFFile::roadtype_map was copied from railtype_map. But while RailType is a byte-sized enum and could thus be initialized via memset, RoadType doesn't have a defined size.
2020-05-21Codechange: Use std::string for storing GRF error messages.Michael Lutz
2020-05-21Codechange: Use std::string when translating TTDP NewGRF string codes.Michael Lutz
2020-05-21Codechange: Replace custom linked list for GRF texts with STL vectors and ↵Michael Lutz
strings.
2020-05-21Codechange: Replace SmallPair with std::pair.Michael Lutz
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
2020-01-26Feature: NewGRF callback profiling (#7868)Niels Martin Hansen
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
2019-12-23Fix: Action7/9 conditions 0F..12 reported roadtypes as valid tramtypes and ↵frosch
vice versa.
2019-12-23Cleanup: Properties 12 and 15 do not exist for road/tramtypes.frosch
2019-12-21Codechange: Replace FOR_ALL_ENGINES with range-based for loopsglx
2019-11-23Fix #7836: Check coherency of NewGRF parameter min/max (#7840)glx22
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-10-19Codechange: Use std::vector for industry tile layoutsNiels Martin Hansen
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-05-01Feature: Add NotRoadTypes (NRT)peter1138
2019-04-29Codechange: Set VehicleType's base type to byte instead of using VehicleTypeByteCharles Pigott
2019-04-20Fix: Bounds check access to railtype_map. (#7529)PeterN
2019-04-13Cleanup: Fix alignment after NULL -> nullptr change.peter1138
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-30Fix #7447, 3357cac847: Action 4 has feature 48 'original strings'. (#7449)frosch
2019-03-28Fix: MSVC warnings (#7423)glx22
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + nHenry Wilson
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-21Fix: Bounds check NewGRF feature.Peter Nelson
2019-03-21Codechange: NewGRF features are documented in hex, so display as hex.Peter Nelson
2019-03-15Fix e66cec8f86: Permit loading of industry production callback with invalid ↵peter1138
cargo type. It is only an error if the invalid result is actually used. This will be silently ignored at the moment. It is still an error if a duplicate cargo type is returned.
2019-02-28Cleanup: spurious TODOs in newgrf.cpp (#7297)Eddi-z
2019-02-01Fix: Don't consider engines not in the current climate towards used livery ↵Peter Nelson
classes.
2019-01-21Add: Houses can accept up to 16 different cargo types via NewGRF.Niels Martin Hansen
New Action0 property 23 for feature 07, variable length, format B n*(B B). Initial byte is number of structures following. First byte in structure is cargo id, second is acceptance level in 1/8 units.
2018-11-03Add: NewGRF support for 16-in-16-out industriesNiels Martin Hansen
2018-10-31Fix: Remove various dead or unnecessary assignmentsCharles Pigott
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2018-09-02Feature: [NewGRF] Increase size of persistent storage to 256.Michael Lutz
2018-09-02Fix: Variable 0x85 had no bounds checks.frosch
2018-06-15Codechange: Address some MSVC compiler warningsNiels Martin Hansen
2018-05-21Change: Add CargoTypes type for cargo masks. (#6790)PeterN
2018-04-16Codechange #6729: mute bogus GCC 7 warning (#6733)Patric Stout
We do a memset of (byte - byte), which strictly seen ranges from -254 .. 255, for which GCC warns. But just before this memset is an if() which says the first byte has to be bigger than the second. So this is a bogus warning.
2018-03-11(svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:frosch
- nvar=0 is meant to return the calculated result. - Missing references resolve to NULL and got identified with the default result. - Missing 'break' broke overlapping cases. - Splitting into non-overlapping cases could result in more than 256 cases.