-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports conversions of new MLTD animations
- Loading branch information
Showing
16 changed files
with
1,006 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using JetBrains.Annotations; | ||
using OpenMLTD.MillionDance.Entities.Internal; | ||
|
||
namespace OpenMLTD.MillionDance.Core { | ||
public interface IBodyAnimationSource { | ||
|
||
/// <summary> | ||
/// Converts read animation data in to internal, unified body animation data. | ||
/// </summary> | ||
/// <returns>Unified body animation data.</returns> | ||
[NotNull] | ||
BodyAnimation Convert(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
using OpenMLTD.MillionDance.Entities.Mltd; | ||
|
||
namespace OpenMLTD.MillionDance.Entities.Extensions { | ||
internal static class KeyTypeExtension { | ||
|
||
[NotNull] | ||
public static string ToAttributeTextFast(this KeyType k) { | ||
switch (k) { | ||
case KeyType.Const: | ||
return "key_type Const"; | ||
case KeyType.Discrete: | ||
return "key_type Discreate"; // This typo exists in MLTD, not my fault. | ||
case KeyType.FullFrame: | ||
return "key_type FullFrame"; | ||
case KeyType.FCurve: | ||
return "key_type FCurve"; | ||
default: | ||
throw new ArgumentOutOfRangeException(nameof(k), k, null); | ||
} | ||
} | ||
|
||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/MillionDance/Entities/Extensions/PropertyTypeExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
using OpenMLTD.MillionDance.Entities.Mltd; | ||
|
||
namespace OpenMLTD.MillionDance.Entities.Extensions { | ||
internal static class PropertyTypeExtension { | ||
|
||
[NotNull] | ||
public static string ToAttributeTextFast(this PropertyType p) { | ||
switch (p) { | ||
case PropertyType.General: | ||
return "property_type General"; | ||
case PropertyType.AngleX: | ||
return "property_type AngleX"; | ||
case PropertyType.AngleY: | ||
return "property_type AngleY"; | ||
case PropertyType.AngleZ: | ||
return "property_type AngleZ"; | ||
case PropertyType.PositionX: | ||
return "property_type PositionX"; | ||
case PropertyType.PositionY: | ||
return "property_type PositionY"; | ||
case PropertyType.PositionZ: | ||
return "property_type PositionZ"; | ||
default: | ||
throw new ArgumentOutOfRangeException(nameof(p), p, null); | ||
} | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.