Expanded ANIM support in the converter

This commit is contained in:
MattNL
2023-11-11 15:46:44 -05:00
parent c5a4969d9d
commit fd9ecad8ae
2 changed files with 41 additions and 1 deletions

View File

@@ -348,6 +348,16 @@ namespace PckStudio.Conversion.Bedrock
geometry.TextureWidth = 64;
geometry.TextureHeight = IsClassicRes ? 32 : 64;
geometry.AnimationArmsDown = ANIM.GetFlag(ANIM_EFFECTS.STATIC_ARMS);
geometry.AnimationArmsOutFront = ANIM.GetFlag(ANIM_EFFECTS.ZOMBIE_ARMS);
geometry.AnimationDontShowArmor = ANIM.GetFlag(ANIM_EFFECTS.ALL_ARMOR_DISABLED);
geometry.AnimationInvertedCrouch = ANIM.GetFlag(ANIM_EFFECTS.DO_BACKWARDS_CROUCH);
geometry.AnimationNoHeadBob = ANIM.GetFlag(ANIM_EFFECTS.HEAD_BOBBING_DISABLED);
geometry.AnimationSingleArmAnimation = ANIM.GetFlag(ANIM_EFFECTS.SYNCED_ARMS);
geometry.AnimationSingleLegAnimation = ANIM.GetFlag(ANIM_EFFECTS.SYNCED_LEGS);
geometry.AnimationStationaryLegs = ANIM.GetFlag(ANIM_EFFECTS.STATIC_LEGS);
geometry.AnimationStatueOfLibertyArms = ANIM.GetFlag(ANIM_EFFECTS.STATUE_OF_LIBERTY);
geometry.AnimationUpsideDown = ANIM.GetFlag(ANIM_EFFECTS.DINNERBONE);
string capepath = file.Properties.Find(o => o.Key == "CAPEPATH").Value;

View File

@@ -92,7 +92,37 @@ namespace PckStudio.Conversion.Common.JsonDefinitions
visibleBounds.Offset.CopyTo(VisibleBoundsOffset);
}
// yeah the property name has no space, it's annoying - Matt
[JsonProperty("animationArmsDown")]
public bool AnimationArmsDown { get; set; }
[JsonProperty("animationArmsOutFront")]
public bool AnimationArmsOutFront { get; set; }
[JsonProperty("animationDontShowArmor")]
public bool AnimationDontShowArmor { get; set; }
[JsonProperty("animationInvertedCrouch")]
public bool AnimationInvertedCrouch { get; set; }
[JsonProperty("animationNoHeadBob")]
public bool AnimationNoHeadBob { get; set; }
[JsonProperty("animationSingleArmAnimation")]
public bool AnimationSingleArmAnimation { get; set; }
[JsonProperty("animationSingleLegAnimation")]
public bool AnimationSingleLegAnimation { get; set; }
[JsonProperty("animationStationaryLegs")]
public bool AnimationStationaryLegs { get; set; }
[JsonProperty("animationStatueOfLibertyArms")]
public bool AnimationStatueOfLibertyArms { get; set; }
[JsonProperty("animationUpsideDown")]
public bool AnimationUpsideDown { get; set; }
// yeah the property name has no underscore, it's annoying - Matt
[JsonProperty("texturewidth")]
public int TextureWidth { get; set; }