Jonathan G Rennison
759b00262e
VarAction2: Allow more than one JZ to end on the same end block adjust
2022-06-26 23:30:14 +01:00
Jonathan G Rennison
229613b06a
VarAction2: Resolve jumps in advance to avoid needing to track nesting
2022-06-22 02:09:13 +01:00
Jonathan G Rennison
387e646439
VarAction2: Add group flag for whether to run jump insert pass
2022-06-20 18:46:31 +01:00
Jonathan G Rennison
3714fad790
VarAction2: Fix jump insertion using mul with bool as last value
2022-06-20 18:41:09 +01:00
Jonathan G Rennison
13fcde9ea0
VarAction2: Add a JZ operation, use for ternary style mul masking
2022-06-14 02:23:23 +01:00
Jonathan G Rennison
77963c5e64
Debug: Add misc_debug bit for extra detail in sprite group dump
2022-06-14 01:23:05 +01:00
Jonathan G Rennison
65236bacc7
Debug: Fix crash when dumping null sprite group
2022-06-13 01:07:16 +01:00
Jonathan G Rennison
34cd547325
Debug: Show if action 2s have been modified by action 6 in debug window
2022-06-11 02:34:08 +01:00
Jonathan G Rennison
6214d0d20d
VarAction2: Add an ABS opcode
2022-06-11 02:33:09 +01:00
Jonathan G Rennison
4553c22cee
Debug: Move DeterministicSpriteGroupAdjust dumping to separate function
2022-06-08 21:33:34 +01:00
Jonathan G Rennison
45798fa533
Debug: Add scroll to sprite number to debug window
2022-06-08 01:57:10 +01:00
Jonathan G Rennison
65407210a6
VarAction2: Allow DSGA_OP_STO_NC to be used with DSGA_TYPE_EQ/NEQ
2022-06-07 22:21:51 +01:00
Jonathan G Rennison
86324e0fda
Debug: Add mode to sprite dump window to show unoptimised
2022-06-07 18:54:42 +01:00
Jonathan G Rennison
e41a5d2f63
VarAction2: Add flags to skip adjust if value is 0 or LSB set
2022-06-06 23:04:45 +01:00
Jonathan G Rennison
9b0a7ac85e
Debug: Don't unnecessarily show numeric value of adjust operator
2022-06-06 22:06:52 +01:00
Jonathan G Rennison
7a61b5d820
VarAction2: Cache refit capacity callback results which depend only on cargo
2022-06-06 18:34:30 +01:00
Jonathan G Rennison
a9ca89d0f8
VarAction2: Move cb_result_found to a flags var in AnalyseCallbackOperation
2022-06-06 17:44:47 +01:00
Jonathan G Rennison
f5f48e89dc
Debug: Show all sprite groups for vehicles in debug window
2022-06-06 02:07:21 +01:00
Jonathan G Rennison
c3bc05f7b9
VarAction2: Add access to variable 1A to inline/fast path switch
2022-06-06 01:27:53 +01:00
Jonathan G Rennison
cf640cc0cf
Debug: Add sprite group collapsing to sprite group dump window
2022-06-04 21:08:35 +01:00
Jonathan G Rennison
bbc1e28b24
VarAction2: Re-use allocated callback result sprite groups
2022-06-04 20:31:09 +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
263a87f5da
VarAction2: Add adjust types for combined (in)equality with constant
2022-06-03 14:17:15 +01:00
Jonathan G Rennison
c238bd5012
Debug: Add temp store highlighting to sprite group dump window
...
Add tooltip
2022-06-02 20:07:18 +01:00
Jonathan G Rennison
564d7e5029
Debug: Allow clicking to highlight group in sprite group dump window
2022-06-01 21:31:05 +01:00
Jonathan G Rennison
42e20d3d99
Industry: Determine which tiles in industry layouts are not animated
...
Do not set these as animated tiles for new industries
2022-06-01 01:13:46 +01:00
Jonathan G Rennison
304f88dc40
VarAction2: Fix callback result detection in AnalyseEngineCallbacks
2022-05-31 17:41:35 +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
b74873a2fb
Debug: Show industry production sprite group registers/values
2022-05-29 23:36:04 +01:00
Jonathan G Rennison
d9358efc3d
VarAction2: Handle zero adjusts simple case in callback analyser
2022-05-29 22:40:35 +01:00
Jonathan G Rennison
c38d0d0458
Debug: Show tile layout sprite group register flags/values
2022-05-29 20:50:53 +01:00
Jonathan G Rennison
862d955320
Debug: Include var 7E procedures in sprite dump output
2022-05-29 03:25:14 +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
2360b3e93e
VarAction2: Detect and replace scaled reads of train/RV/ship current speed
2022-05-26 21:31:20 +01:00
Jonathan G Rennison
90a2aa57fc
VarAction2: Detect and replace signed relational comparisons
2022-05-25 23:58:44 +01:00
Jonathan G Rennison
74e1a40f7c
VarAction2: Remove trivially resolvable deterministic sprite groups
2022-05-25 20:29:18 +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
502980ba61
Support railtype-dependant GRF train speed limits with realistic braking
...
See: #389
2022-05-24 21:50:38 +01:00
Jonathan G Rennison
a3c003546b
Implement extended NewGRF variable parameter support
2022-02-13 22:57:30 +00:00
Jonathan G Rennison
812933ffd4
Debug: Show names of remapped action 2 variables in sprite group dumper
2022-01-26 18:43:13 +00:00
Jonathan G Rennison
33dc6c9688
Add NewGRF VarAction2 variable remapping infrastructure
2022-01-24 02:01:09 +00:00
Jonathan G Rennison
aaf5cd1091
Debug: Fix dumping of randomised sprite groups
2021-12-03 18:55:00 +00:00
Jonathan G Rennison
da282c3ecc
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# CMakeLists.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/misc_gui.cpp
# src/newgrf.cpp
2021-10-28 23:51:24 +01: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
Jonathan G Rennison
6f10b01ba2
Debug: Add general mechanism to dump a sprite group chain
2021-05-21 19:35:22 +01:00
Jonathan G Rennison
7c706923f8
Fix a15e26f3
: Leftover debugging statement
2021-05-20 22:07:38 +01:00
Jonathan G Rennison
55915d8d55
Elide vehicle random trigger callbacks
2021-05-18 22:14:19 +01:00
Jonathan G Rennison
a15e26f369
NewGRF: Elide unmasked vehicle callbacks where possible
...
This includes:
* CBID_VEHICLE_32DAY_CALLBACK
* CBID_VEHICLE_REFIT_COST
* CBID_VEHICLE_MODIFY_PROPERTY
This is on a per-property basis
The main benefit of this is to avoid callbacks not handled by the
vehicle's current sprite group from using the full graphics chain as
the "default" branch in the callback switch.
In the case where the graphics chain is long/expensive, a lot of work
had to be done before a callback failure result was eventually returned.
2021-05-18 19:07:44 +01:00