aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Common/Memory/StructArrayHelpers.cs')
-rw-r--r--src/Ryujinx.Common/Memory/StructArrayHelpers.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Ryujinx.Common/Memory/StructArrayHelpers.cs b/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
index 1e8976ca..65956ed3 100644
--- a/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
+++ b/src/Ryujinx.Common/Memory/StructArrayHelpers.cs
@@ -791,5 +791,34 @@ namespace Ryujinx.Common.Memory
[Pure]
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
}
+
+ public struct Array140<T> : IArray<T> where T : unmanaged
+ {
+ T _e0;
+ Array64<T> _other;
+ Array64<T> _other2;
+ Array11<T> _other3;
+ public readonly int Length => 140;
+ public ref T this[int index] => ref AsSpan()[index];
+
+ [Pure]
+ public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
+ }
+
+ public struct Array384<T> : IArray<T> where T : unmanaged
+ {
+ T _e0;
+ Array64<T> _other;
+ Array64<T> _other2;
+ Array64<T> _other3;
+ Array64<T> _other4;
+ Array64<T> _other5;
+ Array63<T> _other6;
+ public readonly int Length => 384;
+ public ref T this[int index] => ref AsSpan()[index];
+
+ [Pure]
+ public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
+ }
}
#pragma warning restore CS0169, IDE0051