VarAction2: Improve handling of feature changes with parent scopes

This commit is contained in:
Jonathan G Rennison
2023-03-11 16:05:28 +00:00
parent 205cb2d3ea
commit 57c5cc32d0
5 changed files with 98 additions and 43 deletions

View File

@@ -120,6 +120,17 @@ enum VarSpriteGroupScope : uint8 {
};
DECLARE_POSTFIX_INCREMENT(VarSpriteGroupScope)
GrfSpecFeature GetGrfSpecFeatureForParentScope(GrfSpecFeature feature);
inline GrfSpecFeature GetGrfSpecFeatureForScope(GrfSpecFeature feature, VarSpriteGroupScope scope)
{
if (scope == VSG_SCOPE_PARENT) {
return GetGrfSpecFeatureForParentScope(feature);
}
return feature;
}
enum DeterministicSpriteGroupSize : uint8 {
DSG_SIZE_BYTE,
DSG_SIZE_WORD,