diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_spritegroup.cpp | 3 | ||||
-rw-r--r-- | src/newgrf_spritegroup.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp index 19b73c63c..3a543cf0c 100644 --- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -124,6 +124,9 @@ static U EvalAdjustT(const DeterministicSpriteGroupAdjust *adjust, ResolverObjec case DSGA_OP_ROR: return RotateRight(last_value, value); case DSGA_OP_SCMP: return ((S)last_value == (S)value) ? 1 : ((S)last_value < (S)value ? 0 : 2); case DSGA_OP_UCMP: return ((U)last_value == (U)value) ? 1 : ((U)last_value < (U)value ? 0 : 2); + case DSGA_OP_SHL: return (U)last_value << (U)value; + case DSGA_OP_SHR: return (U)last_value >> (U)value; + case DSGA_OP_SAR: return (S)last_value >> (U)value; default: return value; } } diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index ed8eac529..b6dc71d62 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -151,6 +151,9 @@ enum DeterministicSpriteGroupAdjustOperation { DSGA_OP_ROR, ///< rotate a b positions to the right DSGA_OP_SCMP, ///< (signed) comparision (a < b -> 0, a == b = 1, a > b = 2) DSGA_OP_UCMP, ///< (unsigned) comparision (a < b -> 0, a == b = 1, a > b = 2) + DSGA_OP_SHL, ///< a << b + DSGA_OP_SHR, ///< (unsigned) a >> b + DSGA_OP_SAR, ///< (signed) a >> b }; |