Commit Graph

52 Commits

Author SHA1 Message Date
Jonathan G Rennison
728971ddbc Road stops: Remove 0x6B as alias of roadstop_road_info_nearby_tiles 2024-02-03 17:52:28 +00:00
Jonathan G Rennison
47393b42dc VarAction2: Fix procedure calls being incorrectly eliminated
In the case where they were only referenced by substitution candidates
2024-02-01 18:17:04 +00:00
Jonathan G Rennison
000ae23eb2 VarAction2: Fix loads of temporary variable 0 not being tracked 2024-02-01 18:13:01 +00:00
Jonathan G Rennison
97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
2024-01-07 17:20:41 +00:00
Jonathan G Rennison
39917e8ab2 VarAction2: Inline procedure calls in more cases
Increase max procedure size limit
Allow all global variables
Allow industry variables: 67, 68
2023-12-23 16:49:31 +00:00
Jonathan G Rennison
f399fc040f VarAction2: Don't set skip CB flag if NGOF_NO_OPT_VARACT2_CB_QUICK_EXIT set 2023-12-17 16:38:31 +00:00
Jonathan G Rennison
5062b35b7d VarAction2: Handle deterministic/CB groups under real sprite groups in optimiser
See: #618
2023-12-17 14:47:02 +00:00
Jonathan G Rennison
f532970014 VarAction2: Add extra DSG flag for early exit when executing CBs
For when some branches of a non CB switch DSG contain CB switches,
but some don't and so would end up on the graphics chain, as there is
no further CB switch to exit at
2023-12-07 17:53:13 +00:00
Jonathan G Rennison
ca23e31986 Add railtype variable for adjacent crossing information 2023-11-26 17:29:27 +00:00
Jonathan G Rennison
c49651ae7b VarAction2: Use reserve and shrink_to_fit for DSG adjusts vector 2023-08-18 13:22:22 +01:00
Jonathan G Rennison
bc00753996 NewGRF stations: Remove extended version of varuiable 68 2023-06-06 21:35:39 +01:00
Jonathan G Rennison
bdb9a72aa4 NewGRF: Add/extend station variables for station info of nearby tiles
In preparation for support of more than 255 stations per GRF
2023-06-01 18:51:51 +01:00
Jonathan G Rennison
1dbbbed9e5 NewGRF: Only extend value of road stops variable 68 if feature tested for 2023-06-01 18:14:23 +01:00
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