Commit Graph

49 Commits

Author SHA1 Message Date
Rubidium 4f2412a272 Codechange: range based for loops instead of C-style for loops 2024-04-11 07:05:04 +02:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
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
2023-07-19 19:30:14 +02:00
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 2023-05-17 10:14:41 +01:00
Peter Nelson e6740046ee Codechange: Use range-for iteration. 2023-05-11 07:58:55 +01:00
Rubidium 7b539fa7c9 Fix: fmt's {:#04X} yields '0X00', not '0x0000'
Technically the 0X vs 0x is not a big problem, just not pretty. However, the
length also including the 0x results in unexpected behaviour, so it probably
better to not use it.
2023-04-20 21:39:57 +02:00
Rubidium 7088f5b7c7 Codechange: use string/fmt instead of printf for grfmsg 2023-04-18 23:21:08 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
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.
2021-06-12 08:05:59 +01:00
Peter Nelson f785a70a2b Cleanup: Use std::vector in RealSpriteGroup. 2021-05-02 09:41:01 +01:00
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.
2020-01-26 13:45:51 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
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.
2019-03-24 16:10:04 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch d9d669dcf8 (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 2018-03-11 13:19:41 +00:00
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 2014-04-23 20:13:33 +00:00
frosch 6b61c4608f (svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor. 2014-03-03 20:02:31 +00:00
frosch db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 2013-11-24 14:41:19 +00:00
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
alberth 33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 2012-11-10 20:46:39 +00:00
alberth 4c9bea2a71 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 2012-11-10 20:45:59 +00:00
alberth 348ef7f12c (svn r24688) -Codechange: Add resolver classes for generics. 2012-11-10 20:43:40 +00:00
alberth 438495b433 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 2012-11-10 20:37:31 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
yexo 5f79b4c5d1 (svn r23724) -Codechange: split of the check to see if ambient sounds are enabled to a header file allowing compilers to inline that check 2012-01-03 00:45:22 +00:00
frosch 7c7285ea9b (svn r23157) -Change: [NewGRF v8] Format of extra callback info for callback 144. (michi_cc) 2011-11-08 17:29:32 +00:00
frosch 1ad7239247 (svn r23138) -Feature: [NewGRF] Allow passing 32bit parameters to 60+x variables (using var 7B). Currently most useful for vehicle var 60. 2011-11-08 17:23:30 +00:00
michi_cc 707b0f48e6 (svn r23114) -Feature: [NewGRF] Ambient sound effect callback. 2011-11-04 21:05:08 +00:00
frosch c9765caf6a (svn r22867) -Fix (r12122): Variables 40 and 81 of callback 18 are not the same as 80. 2011-09-01 19:43:37 +00:00
frosch cbf3bae992 (svn r22866) -Fix (r16396): Generic callbacks shall chain to the next GRF when the callback fails. 2011-09-01 19:40:51 +00:00
frosch 406bea5303 (svn r22865) -Fix (r13885): The GRFFile parameter for generic callbacks is a return parameter. 2011-09-01 19:37:21 +00:00
frosch 8b18292a2e (svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'. 2011-07-04 20:31:57 +00:00
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 2011-05-02 16:14:23 +00:00
rubidium a6a2fbd937 (svn r21198) -Fix: don't call variables properties in debug messages 2010-11-15 16:43:46 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
frosch 9060a7ac00 (svn r20108) -Change: [NewGRF] Report substitute industry type in AI railstation selection callback. 2010-07-10 10:55:16 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium f2317d0d9d (svn r16402) -Codechange: make Resolve a function of SpriteGroup 2009-05-23 15:25:52 +00:00
rubidium f490394aa8 (svn r16396) -Codechange: split NewGRF spritegroup into multiple subclasses instead of using a big union 2009-05-23 12:13:42 +00:00
peter1138 fd6a480004 (svn r15513) -Cleanup: Unavailable varaction variable value does not matter, but at least it can be consistent. 2009-02-18 09:14:41 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
frosch 93d0ca8731 (svn r13885) -Fix [FS#2168]: Var 0x7F is not feature-specific. 2008-07-30 18:23:12 +00:00
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. 2008-05-06 15:11:33 +00:00
rubidium 5ef8c01ce7 (svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits. 2008-04-21 14:33:33 +00:00
glx bbdb831301 (svn r12452) -Feature: [NewGRF] Add random action 2 type 84. For vehicles only. 2008-03-27 21:36:16 +00:00
peter1138 4d0c443953 (svn r12122) -Codechange: Add framework for generic feature callbacks, along with some parts for AI use. 2008-02-12 13:23:57 +00:00