mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Add some NACP enums
This commit is contained in:
parent
a7c733f96c
commit
ff23a9179c
2 changed files with 71 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -21,7 +22,15 @@ namespace LibHac.Common
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A reference to the first element in this collection.
|
/// A reference to the first element in this collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ref T Value => ref MemoryMarshal.GetReference(_buffer);
|
public ref T Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Debug.Assert(_buffer.Length > 0);
|
||||||
|
|
||||||
|
return ref MemoryMarshal.GetReference(_buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A reference to the element at index <paramref name="index"/>.
|
/// A reference to the element at index <paramref name="index"/>.
|
||||||
|
|
|
@ -24,14 +24,14 @@ namespace LibHac.Ns
|
||||||
|
|
||||||
[FieldOffset(0x0000)] private byte _titles;
|
[FieldOffset(0x0000)] private byte _titles;
|
||||||
[FieldOffset(0x3000)] private byte _isbn;
|
[FieldOffset(0x3000)] private byte _isbn;
|
||||||
[FieldOffset(0x3025)] public byte StartupUserAccount;
|
[FieldOffset(0x3025)] public StartupUserAccount StartupUserAccount;
|
||||||
[FieldOffset(0x3026)] public byte UserAccountSwitchLock;
|
[FieldOffset(0x3026)] public byte UserAccountSwitchLock;
|
||||||
[FieldOffset(0x3027)] public byte AddOnContentRegistrationType;
|
[FieldOffset(0x3027)] public byte AddOnContentRegistrationType;
|
||||||
[FieldOffset(0x3028)] public int ApplicationAttribute;
|
[FieldOffset(0x3028)] public ApplicationAttribute ApplicationAttribute;
|
||||||
[FieldOffset(0x302C)] public uint SupportedLanguages;
|
[FieldOffset(0x302C)] public uint SupportedLanguages;
|
||||||
[FieldOffset(0x3030)] public uint ParentalControl;
|
[FieldOffset(0x3030)] public ParentalControlFlagValue ParentalControl;
|
||||||
[FieldOffset(0x3034)] public byte Screenshot;
|
[FieldOffset(0x3034)] public ScreenshotValue Screenshot;
|
||||||
[FieldOffset(0x3035)] public byte VideoCaptureMode;
|
[FieldOffset(0x3035)] public VideoCaptureValue VideoCaptureMode;
|
||||||
[FieldOffset(0x3036)] public byte DataLossConfirmation;
|
[FieldOffset(0x3036)] public byte DataLossConfirmation;
|
||||||
[FieldOffset(0x3037)] public byte PlayLogPolicy;
|
[FieldOffset(0x3037)] public byte PlayLogPolicy;
|
||||||
[FieldOffset(0x3038)] public ulong PresenceGroupId;
|
[FieldOffset(0x3038)] public ulong PresenceGroupId;
|
||||||
|
@ -46,8 +46,8 @@ namespace LibHac.Ns
|
||||||
[FieldOffset(0x30A0)] public long BcatDeliveryCacheStorageSize;
|
[FieldOffset(0x30A0)] public long BcatDeliveryCacheStorageSize;
|
||||||
[FieldOffset(0x30A8)] private byte _applicationErrorCodeCategory;
|
[FieldOffset(0x30A8)] private byte _applicationErrorCodeCategory;
|
||||||
[FieldOffset(0x30B0)] private ulong _localCommunicationIds;
|
[FieldOffset(0x30B0)] private ulong _localCommunicationIds;
|
||||||
[FieldOffset(0x30F0)] public byte LogoType;
|
[FieldOffset(0x30F0)] public LogoType LogoType;
|
||||||
[FieldOffset(0x30F1)] public byte LogoHandling;
|
[FieldOffset(0x30F1)] public LogoHandling LogoHandling;
|
||||||
[FieldOffset(0x30F2)] public byte RuntimeAddOnContentInstall;
|
[FieldOffset(0x30F2)] public byte RuntimeAddOnContentInstall;
|
||||||
[FieldOffset(0x30F3)] public byte _reserved30F3;
|
[FieldOffset(0x30F3)] public byte _reserved30F3;
|
||||||
[FieldOffset(0x30F6)] public byte CrashReport;
|
[FieldOffset(0x30F6)] public byte CrashReport;
|
||||||
|
@ -66,7 +66,7 @@ namespace LibHac.Ns
|
||||||
[FieldOffset(0x3180)] public long CacheStorageMaxSizeAndMaxJournalSize;
|
[FieldOffset(0x3180)] public long CacheStorageMaxSizeAndMaxJournalSize;
|
||||||
[FieldOffset(0x3188)] public long CacheStorageMaxIndex;
|
[FieldOffset(0x3188)] public long CacheStorageMaxIndex;
|
||||||
[FieldOffset(0x3190)] private ulong _playLogQueryableApplicationId;
|
[FieldOffset(0x3190)] private ulong _playLogQueryableApplicationId;
|
||||||
[FieldOffset(0x3210)] public byte PlayLogQueryCapability;
|
[FieldOffset(0x3210)] public PlayLogQueryCapability PlayLogQueryCapability;
|
||||||
[FieldOffset(0x3211)] public byte RepairFlag;
|
[FieldOffset(0x3211)] public byte RepairFlag;
|
||||||
[FieldOffset(0x3212)] public byte ProgramIndex;
|
[FieldOffset(0x3212)] public byte ProgramIndex;
|
||||||
[FieldOffset(0x3213)] public byte RequiredNetworkServiceLicenseOnLaunchFlag;
|
[FieldOffset(0x3213)] public byte RequiredNetworkServiceLicenseOnLaunchFlag;
|
||||||
|
@ -133,4 +133,57 @@ namespace LibHac.Ns
|
||||||
|
|
||||||
public Span<byte> Key => SpanHelpers.CreateSpan(ref _key, 0x10);
|
public Span<byte> Key => SpanHelpers.CreateSpan(ref _key, 0x10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum StartupUserAccount : byte
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Required = 1,
|
||||||
|
RequiredWithNetworkServiceAccountAvailable = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LogoHandling : byte
|
||||||
|
{
|
||||||
|
Auto = 0,
|
||||||
|
Manual = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LogoType : byte
|
||||||
|
{
|
||||||
|
LicensedByNintendo = 0,
|
||||||
|
DistributedByNintendo = 1,
|
||||||
|
Nintendo = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum ApplicationAttribute
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Demo = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum PlayLogQueryCapability : byte
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
WhiteList = 1,
|
||||||
|
All = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ParentalControlFlagValue
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
FreeCommunication = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ScreenshotValue : byte
|
||||||
|
{
|
||||||
|
Allow = 0,
|
||||||
|
Deny = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum VideoCaptureValue : byte
|
||||||
|
{
|
||||||
|
Deny = 0,
|
||||||
|
Allow = 1,
|
||||||
|
Automatic = 2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue