Skip to content

Commit

Permalink
Updated version of Schema that's used.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeltyPlayer committed Jan 13, 2024
1 parent a3d63e8 commit e63b6b2
Show file tree
Hide file tree
Showing 77 changed files with 164 additions and 186 deletions.
2 changes: 1 addition & 1 deletion FinModelUtility/Fin/Fin/Fin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
<PackageReference Include="SubstreamSharp" Version="1.0.3" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="19.2.51" />
<PackageReference Include="schema" Version="0.3.10" />
<PackageReference Include="schema" Version="0.3.11" />
</ItemGroup>
</Project>
13 changes: 1 addition & 12 deletions FinModelUtility/Fin/Fin/src/data/Keyframes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,10 @@
using System.Runtime.CompilerServices;

namespace fin.data {
public readonly struct Keyframe<T> : IComparable<Keyframe<T>> {
public int Frame { get; }
public T Value { get; }

public Keyframe(int frame, T value) {
this.Frame = frame;
this.Value = value;
}

public readonly record struct Keyframe<T>(int Frame, T Value) : IComparable<Keyframe<T>> {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public int CompareTo(Keyframe<T> other)
=> this.Frame - other.Frame;

public override string ToString()
=> $"{{ Frame: {this.Frame}, Value: {this.Value} }}";
}

public interface IReadOnlyKeyframes<T> {
Expand Down
1 change: 0 additions & 1 deletion FinModelUtility/Fin/Fin/src/io/FinDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

using fin.data.stacks;
using fin.util.asserts;
using fin.util.enumerables;

namespace fin.io {
public readonly struct FinDirectory : ISystemDirectory {
Expand Down
21 changes: 5 additions & 16 deletions FinModelUtility/Fin/Fin/src/model/AnimationTrackInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
using fin.math.interpolation;

namespace fin.model {
public readonly struct ValueAndTangents<T> {
public T IncomingValue { get; }
public T OutgoingValue { get; }
public float? IncomingTangent { get; }
public float? OutgoingTangent { get; }

public readonly record struct ValueAndTangents<T>(
T IncomingValue,
T OutgoingValue,
float? IncomingTangent,
float? OutgoingTangent) {
public ValueAndTangents(T value) : this(value, null) { }

public ValueAndTangents(T value, float? tangent)
Expand All @@ -23,16 +22,6 @@ public ValueAndTangents(T value,
value,
incomingTangent,
outgoingTangent) { }

public ValueAndTangents(T incomingValue,
T outgoingValue,
float? incomingTangent,
float? outgoingTangent) {
this.IncomingValue = incomingValue;
this.OutgoingValue = outgoingValue;
this.IncomingTangent = incomingTangent;
this.OutgoingTangent = outgoingTangent;
}
}


Expand Down
9 changes: 5 additions & 4 deletions FinModelUtility/Fin/Fin/src/model/OrientationInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,19 @@ public interface IReadOnlyVector4 {
float W { get; }
}


public interface IVector4 : IReadOnlyVector4 {
float IReadOnlyVector4.X => this.X;
float X { get; set; }
new float X { get; set; }

float IReadOnlyVector4.Y => this.Y;
float Y { get; set; }
new float Y { get; set; }

float IReadOnlyVector4.Z => this.Z;
float Z { get; set; }
new float Z { get; set; }

float IReadOnlyVector4.W => this.W;
float W { get; set; }
new float W { get; set; }
}


Expand Down
10 changes: 5 additions & 5 deletions FinModelUtility/Fin/Fin/src/schema/color/Rgb24.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ public partial class Rgb24 : IColor, IBinaryConvertible {
public byte Gb { get; set; }
public byte Bb { get; set; }

[Ignore]
[Skip]
public byte Ab => 255;

[Ignore]
[Skip]
public float Rf => this.Rb / 255f;

[Ignore]
[Skip]
public float Gf => this.Gb / 255f;

[Ignore]
[Skip]
public float Bf => this.Bb / 255f;

[Ignore]
[Skip]
public float Af => this.Ab / 255f;
}
}
8 changes: 4 additions & 4 deletions FinModelUtility/Fin/Fin/src/schema/color/Rgba32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ public partial struct Rgba32 : IColor, IBinaryConvertible {
public byte Bb { get; private set; }
public byte Ab { get; private set; }

[Ignore]
[Skip]
public float Rf => this.Rb / 255f;

[Ignore]
[Skip]
public float Gf => this.Gb / 255f;

[Ignore]
[Skip]
public float Bf => this.Bb / 255f;

[Ignore]
[Skip]
public float Af => this.Ab / 255f;
}

Expand Down
8 changes: 4 additions & 4 deletions FinModelUtility/Fin/Fin/src/schema/color/Rgba4f.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ public partial class Rgba4f : IColor, IBinaryConvertible {
public float Bf { get; set; }
public float Af { get; set; }

[Ignore]
[Skip]
public byte Rb => (byte) (this.Rf * 255);

[Ignore]
[Skip]
public byte Gb => (byte) (this.Gf * 255);

[Ignore]
[Skip]
public byte Bb => (byte) (this.Bf * 255);

[Ignore]
[Skip]
public byte Ab => (byte) (this.Af * 255);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ public AutoMagicUInt32SizedSection(ISwitchMagicConfig<TMagic, TData> config,
this.impl_ = new(config, data);
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public TMagic Magic => this.impl_.Magic;

[Ignore]
[Skip]
public uint Size => this.impl_.Size;

[Ignore]
[Skip]
public TData Data => this.impl_.Data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public AutoStringMagicJankSizedSection(string magic) {
this.impl_ = new(magic, new T());
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public string Magic => this.impl_.Magic;

[Ignore]
[Skip]
public uint Size => this.impl_.Size;

[Ignore]
[Skip]
public T Data => this.impl_.Data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public AutoStringMagicUInt32SizedSection(string magic) {
this.impl_ = new(magic, new T());
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public string Magic => this.impl_.Magic;

[Ignore]
[Skip]
public uint Size => this.impl_.Size;

[Ignore]
[Skip]
public T Data => this.impl_.Data;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public partial class AutoUInt32SizedSection<T> : ISizedSection<T>
where T : IBinaryConvertible, new() {
private readonly PassThruUInt32SizedSection<T> impl_;

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public T Data => this.impl_.Data;

public AutoUInt32SizedSection() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class PassThruStringMagicJankSizedSection<T>
: IMagicSection<T> where T : IBinaryConvertible {
private string MagicAsserter_ => this.Magic;

[Ignore]
[Skip]
public string Magic { get; set; }

private readonly PassThruJankSizedSection<T> impl_;
Expand All @@ -17,16 +17,16 @@ public PassThruStringMagicJankSizedSection(string magic, T data) {
this.impl_ = new PassThruJankSizedSection<T>(data);
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public uint Size => this.impl_.Size;

[Ignore]
[Skip]
public T Data {
get => this.impl_.Data;
set => this.impl_.Data = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public partial class PassThruStringMagicUInt32SizedSection<T>
: IMagicSection<T> where T : IBinaryConvertible {
private string MagicAsserter_ => this.Magic;

[Ignore]
[Skip]
public string Magic { get; set; }

private readonly PassThruUInt32SizedSection<T> impl_;
Expand All @@ -17,16 +17,16 @@ public PassThruStringMagicUInt32SizedSection(string magic, T data) {
this.impl_ = new PassThruUInt32SizedSection<T>(data);
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public uint Size => this.impl_.Size;

[Ignore]
[Skip]
public T Data {
get => this.impl_.Data;
set => this.impl_.Data = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ namespace fin.schema.data {
[BinarySchema]
public partial class SwitchMagicStringUInt32SizedSection<T> : IMagicSection<T>
where T : IBinaryConvertible {
[Ignore]
[Skip]
private readonly int magicLength_;

[Ignore]
[Skip]
private readonly Func<string, T> createTypeHandler_;

private readonly PassThruStringMagicUInt32SizedSection<T> impl_ =
Expand All @@ -29,16 +29,16 @@ public SwitchMagicStringUInt32SizedSection(
this.createTypeHandler_ = createTypeHandler;
}

[Ignore]
[Skip]
public int TweakReadSize {
get => this.impl_.TweakReadSize;
set => this.impl_.TweakReadSize = value;
}

[Ignore]
[Skip]
public string Magic => this.impl_.Magic;

[Ignore]
[Skip]
public T Data => this.impl_.Data;

public void Read(IBinaryReader br) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private ConsecutiveLists2(List<T1> list1, List<T2> list2) {

public (T1, T2) GetDefault() => (new(), new());

[Ignore]
[Skip]
public int Count => this.list1_.Count;

public void Clear() {
Expand All @@ -54,7 +54,7 @@ public void ResizeInPlace(int newLength) {
.ToList());
}

[Ignore]
[Skip]
public (T1 First, T2 Second) this[int index] {
get => (this.list1_[index], this.list2_[index]);
set => (this.list1_[index], this.list2_[index]) = value;
Expand Down
2 changes: 1 addition & 1 deletion FinModelUtility/Formats/Ast/Ast/Ast.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="schema" Version="0.3.10" />
<PackageReference Include="schema" Version="0.3.11" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion FinModelUtility/Formats/Cmb/Cmb/Cmb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="schema" Version="0.3.10" />
<PackageReference Include="schema" Version="0.3.11" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class Mats : IBinaryConvertible {
[SequenceLengthSource(SchemaIntegerType.UINT32)]
public Material[] Materials { get; set; }

[Ignore]
[Skip]
private uint TotalCombinerCount_
=> (uint) this.Materials
.SelectMany(material => material.texEnvStagesIndices)
Expand Down
Loading

0 comments on commit e63b6b2

Please sign in to comment.