diff options
author | frosch <frosch@openttd.org> | 2018-03-11 15:08:51 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2018-03-11 15:08:51 +0000 |
commit | 55a503e6f225a3c1dba3dbc1effa7e0d6942dd96 (patch) | |
tree | c60b80c025c69edbfa919518d81b84c354fcbe7f /src/newgrf_spritegroup.h | |
parent | c6eb633d189f12fa3dd95243a5dcc021cb0e930b (diff) | |
download | openttd-55a503e6f225a3c1dba3dbc1effa7e0d6942dd96.tar.xz |
(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.
Diffstat (limited to 'src/newgrf_spritegroup.h')
-rw-r--r-- | src/newgrf_spritegroup.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index b2e764599..6adf7c2ac 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -174,7 +174,8 @@ struct DeterministicSpriteGroup : SpriteGroup { VarSpriteGroupScope var_scope; DeterministicSpriteGroupSize size; uint num_adjusts; - byte num_ranges; + uint num_ranges; + bool calculated_result; DeterministicSpriteGroupAdjust *adjusts; DeterministicSpriteGroupRange *ranges; // Dynamically allocated |