Revert "Adjust naming conventions and general refactoring in HLE Project (#490)" (#526)

This reverts commit 85dbb9559a.
This commit is contained in:
gdkchan 2018-12-04 22:52:39 -02:00 committed by GitHub
parent 85dbb9559a
commit 3615a70cae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
299 changed files with 12276 additions and 12268 deletions

View file

@ -11,62 +11,62 @@ namespace Ryujinx.HLE.Loaders.Npdm
{
private const int MetaMagic = 'M' << 0 | 'E' << 8 | 'T' << 16 | 'A' << 24;
public byte MmuFlags { get; }
public bool Is64Bits { get; }
public byte MainThreadPriority { get; }
public byte DefaultCpuId { get; }
public int PersonalMmHeapSize { get; }
public int ProcessCategory { get; }
public int MainThreadStackSize { get; }
public string TitleName { get; }
public byte[] ProductCode { get; }
public byte MmuFlags { get; private set; }
public bool Is64Bits { get; private set; }
public byte MainThreadPriority { get; private set; }
public byte DefaultCpuId { get; private set; }
public int PersonalMmHeapSize { get; private set; }
public int ProcessCategory { get; private set; }
public int MainThreadStackSize { get; private set; }
public string TitleName { get; private set; }
public byte[] ProductCode { get; private set; }
public Aci0 Aci0 { get; }
public Acid Acid { get; }
public ACI0 ACI0 { get; private set; }
public ACID ACID { get; private set; }
public Npdm(Stream stream)
public Npdm(Stream Stream)
{
BinaryReader reader = new BinaryReader(stream);
BinaryReader Reader = new BinaryReader(Stream);
if (reader.ReadInt32() != MetaMagic)
if (Reader.ReadInt32() != MetaMagic)
{
throw new InvalidNpdmException("NPDM Stream doesn't contain NPDM file!");
}
reader.ReadInt64();
Reader.ReadInt64();
MmuFlags = reader.ReadByte();
MmuFlags = Reader.ReadByte();
Is64Bits = (MmuFlags & 1) != 0;
reader.ReadByte();
Reader.ReadByte();
MainThreadPriority = reader.ReadByte();
DefaultCpuId = reader.ReadByte();
MainThreadPriority = Reader.ReadByte();
DefaultCpuId = Reader.ReadByte();
reader.ReadInt32();
Reader.ReadInt32();
PersonalMmHeapSize = reader.ReadInt32();
PersonalMmHeapSize = Reader.ReadInt32();
ProcessCategory = reader.ReadInt32();
ProcessCategory = Reader.ReadInt32();
MainThreadStackSize = reader.ReadInt32();
MainThreadStackSize = Reader.ReadInt32();
byte[] tempTitleName = reader.ReadBytes(0x10);
byte[] TempTitleName = Reader.ReadBytes(0x10);
TitleName = Encoding.UTF8.GetString(tempTitleName, 0, tempTitleName.Length).Trim('\0');
TitleName = Encoding.UTF8.GetString(TempTitleName, 0, TempTitleName.Length).Trim('\0');
ProductCode = reader.ReadBytes(0x10);
ProductCode = Reader.ReadBytes(0x10);
stream.Seek(0x30, SeekOrigin.Current);
Stream.Seek(0x30, SeekOrigin.Current);
int aci0Offset = reader.ReadInt32();
int aci0Size = reader.ReadInt32();
int acidOffset = reader.ReadInt32();
int acidSize = reader.ReadInt32();
int ACI0Offset = Reader.ReadInt32();
int ACI0Size = Reader.ReadInt32();
int ACIDOffset = Reader.ReadInt32();
int ACIDSize = Reader.ReadInt32();
Aci0 = new Aci0(stream, aci0Offset);
Acid = new Acid(stream, acidOffset);
ACI0 = new ACI0(Stream, ACI0Offset);
ACID = new ACID(Stream, ACIDOffset);
}
}
}