Commit Graph

51 Commits (jgrpp)

Author SHA1 Message Date
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
4 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.
4 months ago
Rubidium f16399f4c9 Codechange: replace x.size() > 0 with !x.empty() 7 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
10 months ago
Peter Nelson f1328db063 Codechange: Deduplicate ResolveReal() for resolvers that don't use real sprite groups.
This may change behaviour when multiple loading/loaded stages are provided, as the various copies checked in different orders, however only one result is expected in these cases anyway.
3 years ago
Peter Nelson f785a70a2b Cleanup: Use std::vector in RealSpriteGroup. 3 years ago
frosch 0078554d6a Fix: GetCargoTranslation could return out-of-bounds index for old-style NewGRF using cargo-slots. 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
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 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 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 10 years ago
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 11 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 0885a2370a (svn r24681) -Codechange: Add resolver classes for cargoes. 12 years ago
alberth 438495b433 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 12 years ago
frosch 522e5ec86b (svn r24277) -Codechange: Store cargo and railtype translation tables in a SmallVector. 12 years ago
frosch 5a34b744b1 (svn r24273) -Fix: [NewGRF] GetReverseCargoTranslation() was unnecessary complicated and also returned the wrong thing for cargos not present in the translation table. 12 years ago
frosch b42fa8f766 (svn r23917) -Fix (r11252,, r23914, r23915): Also use the CTT for refitmasks for version 6 GRFs. I.e. fix the cursed GetCargoTranslation() function for the fourth time. 12 years ago
frosch b1a3a31a83 (svn r23914) -Fix (r11252, r13855): Don't test validity of cargobits using a mask of cargoslots. 12 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
frosch 1ad7239247 (svn r23138) -Feature: [NewGRF] Allow passing 32bit parameters to 60+x variables (using var 7B). Currently most useful for vehicle var 60. 13 years ago
frosch 8b18292a2e (svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'. 13 years ago
rubidium a6a2fbd937 (svn r21198) -Fix: don't call variables properties in debug messages 14 years ago
alberth 33a96b5ef3 (svn r19132) -Codechange: No need to end a line with ;;. 14 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 15 years ago
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 15 years ago
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 15 years ago
peter1138 fd6a480004 (svn r15513) -Cleanup: Unavailable varaction variable value does not matter, but at least it can be consistent. 15 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 16 years ago
peter1138 81dafb5e69 (svn r13855) -Fix [FS#2157]: Cargo type lookup was incorrect for GRFv7 files without a translation table. 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
glx bbdb831301 (svn r12452) -Feature: [NewGRF] Add random action 2 type 84. For vehicles only. 16 years ago
frosch 4164d2488f (svn r12142) -Fix [FS#1766]: Callback 0x3D always gets a cargobit in var 0x18, independent of grf version. 16 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
glx ac9f287f20 (svn r11252) -Revert r11239, Fix r9620: cargo translation was not done correctly 17 years ago
rubidium 9e3ee0e689 (svn r10690) -Codechange: use the enum that describes all callback IDs in favor of "just" using an untyped integer. 17 years ago
rubidium 283a06e4a1 (svn r10477) -Codechange: add some callbacks to customise the acceptance of industries. 17 years ago
peter1138 c28cffdf67 (svn r9888) -Codechange: [NewGRF] allow non-spec cargo action2s to work, and using the goods sprite if really nothing is returned. 17 years ago
peter1138 59399480b3 (svn r9620) -Codechange: apply cargo translation table to newstation variables 0x60..0x65 17 years ago
peter1138 2afcd1561a (svn r9473) -Codechange: add 'unhandled variable' debug message to newcargo resolver 17 years ago
peter1138 68572f1076 (svn r9418) -Codechange: Implement actions 1/2/3 for cargos, callback handler and custom icon sprites 17 years ago
peter1138 6062004960 (svn r8849) -Codechange: Replace hardcoded global/climate cargo mapping tables with dynamically generated data. Change associated code to use new functions. 17 years ago