Jonathan G Rennison
3d42e36f89
VarAction2: Avoid pessimising DSE when a procedure returns a callback result
2022-06-04 02:12:23 +01:00
Jonathan G Rennison
9e414a1eab
VarAction2: Move optimiser flags to a separate setting
2022-06-04 02:12:23 +01:00
Jonathan G Rennison
6ff8066d34
VarAction2: Ensure that a temp store var can't reference a clobbered var
2022-06-04 02:12:23 +01:00
Jonathan G Rennison
fe6ab0f19f
VarAction2: Don't track var copies through temporary storage for stations
...
Except for copies of other temporary storage vars
2022-06-03 23:28:43 +01:00
Jonathan G Rennison
db7f29b07c
VarAction2: Deduplicate loads from expensive uncached variables
...
Currently only some vehicle variables
2022-06-03 20:14:30 +01:00
Jonathan G Rennison
6a17f00a27
VarAction2: Ensure dead store elimination doesn't break variable 0x7B
2022-06-03 19:13:07 +01:00
Jonathan G Rennison
813146a78f
VarAction2: Track value inferences through temp storage in more cases
2022-06-03 16:04:57 +01:00
Jonathan G Rennison
ccef3646db
VarAction2: Set value inferences for operations with eq/neq adjust types
2022-06-03 16:04:44 +01:00
Jonathan G Rennison
04a9c73ec2
VarAction2: Combine RST, UMIN sequence to load with neq 0 adjust
2022-06-03 15:34:50 +01:00
Jonathan G Rennison
9116ca6bb0
VarAction2: Track copies of variables through temporary storage
2022-06-03 15:23:33 +01:00
Jonathan G Rennison
263a87f5da
VarAction2: Add adjust types for combined (in)equality with constant
2022-06-03 14:17:15 +01:00
Jonathan G Rennison
1e52e51ce1
VarAction2: Add bounds checks to previous adjust accesses
2022-06-03 14:00:00 +01:00
Jonathan G Rennison
c2fde53495
VarAction2: Remove redundant variable loads
2022-06-03 12:51:58 +01:00
Jonathan G Rennison
30f74c5b74
Sprite group: Add getter function for sprite groups
2022-06-01 23:47:03 +01:00
Jonathan G Rennison
d8f9641dc9
VarAction2: Remove redundant UMIN operation on already boolean values
2022-06-01 23:01:50 +01:00
Jonathan G Rennison
3c9201ebd5
VarAction2: Fix dead store elimination through randomised sprite groups
2022-06-01 22:36:04 +01:00
Jonathan G Rennison
e0581db2a1
VarAction2: Remove dead stores and redundant adjusts in more cases
2022-05-31 03:26:45 +01:00
Jonathan G Rennison
d71e38446e
Improve performance of string lookup in AddGRFString
2022-05-30 23:51:44 +01:00
Jonathan G Rennison
994dc683a2
VarAction2: Fix calculated result groups being incorrectly pruned
2022-05-30 17:24:26 +01:00
Jonathan G Rennison
b102e912b3
VarAction2: Allow temp store dead store elmination with industries
2022-05-29 23:48:46 +01:00
Jonathan G Rennison
4687a8c2a4
VarAction2: Prune group ranges for constant values
...
Add chicken bit to control pruning
2022-05-29 22:40:35 +01:00
Jonathan G Rennison
c894d5a86d
VarAction2: Add temp store dead store elimination
2022-05-29 22:40:35 +01:00
Niels Martin Hansen
5587e439a9
Fix: Industry layouts with zero regular tiles should be invalid
2022-05-29 16:34:30 +02:00
Jonathan G Rennison
a8eb52f061
VarAction2: Simplify handling of first adjustment
2022-05-29 13:33:47 +01:00
Jonathan G Rennison
a5f5be2dff
VarAction2: Detect ops on previous constants which become loads
2022-05-29 12:57:23 +01:00
Jonathan G Rennison
1fec7d6ddb
VarAction2: Detect and replace reversed commutative op via temp storage
2022-05-29 12:08:49 +01:00
Jonathan G Rennison
762cfb3df7
VarAction2: Track temp store loads with respect to stores
2022-05-29 03:30:38 +01:00
Jonathan G Rennison
6953150898
VarAction2: Move optimisation pass to separate function
...
Simplify logic slightly
2022-05-29 01:25:01 +01:00
Jonathan G Rennison
145536e1fd
VarAction2: Detect and replace reverse subtract via temp storage
2022-05-27 03:14:07 +01:00
Jonathan G Rennison
dd2e1fe956
Add chicken bit to disable varact2 optimisation
2022-05-27 00:39:57 +01:00
Jonathan G Rennison
f0a0b2e200
VarAction2: Flatten constant operations on constants in more cases
2022-05-26 22:31:02 +01:00
Jonathan G Rennison
2360b3e93e
VarAction2: Detect and replace scaled reads of train/RV/ship current speed
2022-05-26 21:31:20 +01:00
Jonathan G Rennison
13cdef2a2d
VarAction2: Remove redundant and with 1 when value is already bool
2022-05-26 00:36:19 +01:00
Jonathan G Rennison
2f09eff404
VarAction2: Convert boolean, invert sequence to ternary
2022-05-26 00:12:54 +01:00
Jonathan G Rennison
90a2aa57fc
VarAction2: Detect and replace signed relational comparisons
2022-05-25 23:58:44 +01:00
Jonathan G Rennison
e732042785
VarAction2: Remove redundant constant loads
2022-05-25 22:50:10 +01:00
Jonathan G Rennison
74e1a40f7c
VarAction2: Remove trivially resolvable deterministic sprite groups
2022-05-25 20:29:18 +01:00
Jonathan G Rennison
3b5eede3fc
VarAction2: Detect and replace operations which always produce 0
2022-05-25 20:04:36 +01:00
Jonathan G Rennison
a21ae12c90
VarAction2: Remove redundant temp store loads after stores
2022-05-25 19:17:15 +01:00
Jonathan G Rennison
db5be4f92e
VarAction2: Remove constant parameter redirection via variable 7B
2022-05-25 04:12:44 +01:00
Jonathan G Rennison
da629e4cfa
VarAction2: Replace divs of powers of 2 with shifts where possible
2022-05-25 03:49:29 +01:00
Jonathan G Rennison
fad5973161
VarAction2: Reduce shift right and mask ops into adjust shift/mask
2022-05-25 02:53:35 +01:00
Jonathan G Rennison
012d73ef34
VarAction2: Detect equality comparisons
...
Remove redundant equality with 0 comparison before ternary
2022-05-25 02:23:25 +01:00
Jonathan G Rennison
7283825638
VarAction2: Detect and replace ternary operator pattern
2022-05-25 01:52:22 +01:00
Jonathan G Rennison
e3df522111
VarAction2: Delete provably zero adjustment operations
2022-05-24 23:40:29 +01:00
Jonathan G Rennison
a54416afbc
Add GRF variable to use extra station names even when default names remain
2022-04-18 20:06:21 +01:00
Jonathan G Rennison
34af4844d1
Merge branch 'master' into jgrpp
2022-04-02 14:16:32 +01:00
Michael Lutz
08a5478a93
Add: [NewGRF] Map seed as global variable.
...
This is useful to provide a feature-agnostic, stable random value that differs between games.
One of the possible uses is to e.g. use it to create pseudo-random regions for towns or industries.
2022-03-13 14:20:23 +01:00
Jonathan G Rennison
cb573a1523
Add road stop property to set cost multipliers
2022-02-24 21:13:46 +00:00
Jonathan G Rennison
5a2cc24190
Fix initialisation of new road stop specs
2022-02-24 00:02:47 +00:00