Rubidium
8b7c92dfe3
Codechange: explicitly initialise NewGRF-pool-object member variables
2025-02-22 15:34:44 +01:00
Rubidium
af00b835a1
Codechange: remove transitional supports from the pool
2025-02-16 19:31:37 +01:00
Rubidium
5ca5790ac8
Codechange: strongly type SpriteGroupID
2025-02-09 15:07:29 +01:00
Rubidium
89d0a688a9
Codechange: Use EnumBitSet for pool types
2025-02-01 17:04:04 +01:00
Rubidium
45444f9666
Codechange: rename DECLARE_POSTFIX_INCREMENT to DECLARE_INCREMENT_DECREMENT_OPERATORS
2025-01-28 18:56:58 +01:00
Rubidium
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Peter Nelson
9bc64b553b
Codechange: Cache callback spritegroups. ( #13111 )
...
Each callback result requires a pool memory allocation, each of which is 24 bytes.
Build a cache of results so that if the same result is used later it refers to the same group.
2024-11-27 23:25:35 +00:00
Peter Nelson
70d63f87b8
Codechange: Re-order ResultSpriteGroup to reduce its size.
2024-07-10 13:22:22 +01:00
Peter Nelson
db0ae42d45
Codechange: Set base type of spritegroup related enums.
...
This has a small impact on SpriteGroup object sizes.
2024-07-10 13:22:22 +01:00
Loïc Guilloux
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
2024-05-18 17:04:16 +02:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
2024-01-06 13:37:33 +01:00
Peter Nelson
49dae08a3b
Codechange: Add missing override specifiers.
2023-09-25 21:27:45 +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
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
2023-05-14 23:31:03 +02:00
PeterN
f24286a1ae
Fix: Ensure 31-bit shifts are unsigned. ( #10128 )
...
Shifting a signed 32-bit integer by 31 bits is undefined behaviour.
A few more than necessary are switched to unsigned for consistentency.
2022-11-04 07:15:59 +00:00
Peter Nelson
913d8a7f28
Cleanup: Use std::vector in RandomSpriteGroup.
2021-05-02 09:41:01 +01:00
Peter Nelson
1aeaf39954
Cleanup: Use std::vector in DeterministicSpriteGroup.
2021-05-02 09:41:01 +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
peter1138
fc5f67123a
Fix e66cec8f86: Permit loading of industry production callback with invalid 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-03-15 17:43:10 +00:00
Niels Martin Hansen
e66cec8f86
Add: NewGRF support for 16-in-16-out industries
2018-11-03 21:43:54 +01:00
frosch
55a503e6f2
(svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:
...
- 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.
2018-03-11 15:08:51 +00:00
frosch
07d841d0ef
(svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges, sort them and resolve them using binary search. Speedup sprite resolving by about 7 percent.
2018-03-11 13:21:27 +00: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
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.
2017-10-25 15:38:14 +00:00
frosch
6b61c4608f
(svn r26388) -Codechange: Move resolving of Action 3 into ResolverObject constructor.
2014-03-03 20:02:31 +00:00
frosch
b935cb8415
(svn r26387) -Cleanup (r26173): No need to manually clear registers before resolving.
2014-03-03 19:32:53 +00:00
frosch
3eea1befa7
(svn r26172) -Codechange: Make SpriteGroup::Resolve aware of nested calls.
2013-12-23 18:08:16 +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
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
2013-01-08 22:46:42 +00:00
frosch
b65ece1ea9
(svn r24695) -Fix/Cleanup: Remove remaining (incorrect) usages of ResolverObject::scope and count.
2012-11-11 12:57:27 +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
69e07c3e00
(svn r24691) -Codechange: Add resolver classes for vehicles.
2012-11-10 20:45:04 +00:00
alberth
e087503fd6
(svn r24690) -Codechange: Add resolver classes for industry tiles.
2012-11-10 20:44:38 +00:00
alberth
348ef7f12c
(svn r24688) -Codechange: Add resolver classes for generics.
2012-11-10 20:43:40 +00:00
alberth
c83db1395b
(svn r24687) -Codechange: Add resolver classes for airports.
2012-11-10 20:42:50 +00:00
alberth
82e6001451
(svn r24685) -Codechange: Add resolver classes for rail types.
2012-11-10 20:41:45 +00:00
alberth
c417efc962
(svn r24684) -Codechange: Add resolver classes for stations.
2012-11-10 20:41:08 +00:00
alberth
a9b8b22daf
(svn r24683) -Codechange: Add resolver classes for objects.
2012-11-10 20:40:46 +00:00
alberth
d7b62da87b
(svn r24682) -Codechange: Add resolver classes for houses.
2012-11-10 20:40:05 +00:00
alberth
0885a2370a
(svn r24681) -Codechange: Add resolver classes for cargoes.
2012-11-10 20:39:39 +00:00
alberth
35cee8315a
(svn r24680) -Codechange: Add resolver classes for canals.
2012-11-10 20:39:11 +00:00
alberth
b985c4c0f8
(svn r24679) -Codechange: Add resolver classes for towns.
2012-11-10 20:38:46 +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
e40eb8177a
(svn r23735) -Codechange: remove ~50 includes from headers that weren't needed
2012-01-03 20:26:05 +00:00