Commit Graph

39 Commits

Author SHA1 Message Date
Jonathan G Rennison
e02585f68e Add railtype and signals variables for signal vertical clearance 2023-04-04 20:29:22 +01:00
Jonathan G Rennison
57c5cc32d0 VarAction2: Improve handling of feature changes with parent scopes 2023-03-11 16:08:36 +00:00
Jonathan G Rennison
b1ba2bef4b VarAction2: Use const for prev_inference flags 2023-02-22 19:32:42 +00:00
Jonathan G Rennison
439c1208d7 VarAction2: Optimise unknown reads from 0x11 as constant 0 2023-02-22 19:32:26 +00:00
Jonathan G Rennison
c592b38067 VarAction2: Combine object slope ^ foundation_change_tile_slope sequence 2023-02-12 19:32:37 +00:00
Jonathan G Rennison
d793a70dfe VarAction2: Fix reg tracking through previously handled procedures
See: #479
2023-01-29 14:55:10 +00:00
Jonathan G Rennison
87f8e56534 VarAction2: Fix applying station layout reg bits to multiple sprite groups
See: #479
2023-01-29 14:53:27 +00:00
Jonathan G Rennison
ca11c66cb8 VarAction2: Allow DSE with rail stations 2023-01-03 03:57:42 +00:00
Jonathan G Rennison
381b2b536d VarAction2: Implement register tracking for rail station adv tile layouts 2023-01-03 03:57:42 +00:00
Jonathan G Rennison
4b51a3eda8 VarAction2: Mark applicable rail station variables as expensive 2023-01-03 03:55:51 +00:00
Jonathan G Rennison
546ad0b43c VarAction2: Mark applicable road stops variables as expensive 2022-12-24 19:01:32 +00:00
Jonathan G Rennison
0e5a09974a VarAction2: Fix detection of callback handlers which don't inspect var C 2022-11-26 19:42:37 +00:00
Jonathan G Rennison
5a419e4bdd VarAction2: Detect callback switches which include other adjusts 2022-11-24 23:17:46 +00:00
Jonathan G Rennison
bcb917d8c2 VarAction2: Avoid CB quick exit dropping CBID_RANDOM_TRIGGER callbacks 2022-11-24 02:04:52 +00:00
Jonathan G Rennison
51b39b68b7 VarAction2: Fix technical undefined behaviour advancing iterator
Fixes error when using debug mode containers
2022-11-03 19:54:53 +00:00
Jonathan G Rennison
f41624d7b2 VarAction2: Fix parent/child type of sprite register analysis 2022-10-26 23:33:44 +01:00
Jonathan G Rennison
419c356f30 VarAction2: Remove mul and div operations with constant 1 2022-10-08 22:14:39 +01:00
Jonathan G Rennison
311b4ebe9d VarAction2: Avoid marking a duplicate store as a clone of itself 2022-10-05 18:13:07 +01:00
Jonathan G Rennison
9e95b3d807 VarAction2: Limit iteration count when substituting variable loads 2022-10-05 17:41:49 +01:00
Jonathan G Rennison
c2ede2af54 VarAction2: Allow inlining trivial procedures 2022-10-01 22:32:00 +01:00
Jonathan G Rennison
77f25a48a9 Only show/use appropriate parent or child registers in tile layout group
Do not use both
2022-09-30 20:49:50 +01:00
Jonathan G Rennison
6c80944c38 VarAction2: Fix variable propagation when a group had only pending bits 2022-09-20 00:31:07 +01:00
Jonathan G Rennison
f381e45d5b VarAction2: Fix DSE for non-leaf procedure groups 2022-09-19 23:25:50 +01:00
Jonathan G Rennison
2a41854f6b VarAction2: Infer ternary add result is bool if both branches are bool 2022-08-28 11:35:16 +01:00
Jonathan G Rennison
8c94ba0dc8 VarAction2: Infer that multiplying two bools results in bool 2022-08-28 11:27:54 +01:00
Jonathan G Rennison
602ac717aa Initial support for DSE and jumping over procedures with child groups 2022-08-25 00:22:41 +01:00
Jonathan G Rennison
916441d943 VarAction2: Avoid turning skip on zero/LSB set sequences into jumps 2022-08-24 00:58:08 +01:00
Jonathan G Rennison
4fd8634ff9 VarAction2: Remove trivially redundant special stores 2022-08-23 18:37:28 +01:00
Jonathan G Rennison
d9aa2d6138 VarAction2: Extend group cast to bool range elision
Handle opposite arrangement of range and default group
2022-08-22 21:52:15 +01:00
Jonathan G Rennison
df6b9d355f VarAction2: Simplify store, load with bool/invert, ternary sequence in DSE 2022-08-22 21:45:21 +01:00
Jonathan G Rennison
14de8c7f34 VarAction2: Add quick exit case to last-level callback groups if possible 2022-08-22 00:13:23 +01:00
Jonathan G Rennison
35063b2176 VarAction2: Ensure group pruning can't break var 1C via random groups 2022-08-22 00:13:23 +01:00
Jonathan G Rennison
3676b0912d VarAction2: Fix inference handling when pruning ops prior to RST 2022-08-22 00:13:23 +01:00
Jonathan G Rennison
c60e3fed99 VarAction2: Do not re-assign error group
When pruning ranges of group with constant result
2022-08-22 00:13:23 +01:00
Jonathan G Rennison
e335c86e77 VarAction2: Elide group ranges as cast to bool when result is already bool 2022-08-18 19:25:33 +01:00
Jonathan G Rennison
b04d1295cd VarAction2: Infer that unsigned mod 2 results in 0 or 1 2022-08-18 19:24:01 +01:00
Jonathan G Rennison
9c18835bd0 Move ProcessDeterministicSpriteGroupRanges into newgrf.cpp 2022-08-14 21:48:24 +01:00
Jonathan G Rennison
c58b94c376 VarAction2: DSE: Allow setting skip on zero flag on skippable procedures 2022-08-10 19:39:12 +01:00
Jonathan G Rennison
4601a1bfc6 Move NewGRF optimiser functions into a separate file
Create a new header for shared definitions with newgrf.cpp
2022-08-10 19:06:59 +01:00