Misc cleanup (#708)
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
This commit is contained in:
parent
10c74182ba
commit
b2b736abc2
205 changed files with 1020 additions and 1041 deletions
|
@ -34,7 +34,7 @@ namespace Ryujinx.HLE.Loaders.Compression
|
|||
int encCount = (token >> 0) & 0xf;
|
||||
int litCount = (token >> 4) & 0xf;
|
||||
|
||||
//Copy literal chunck
|
||||
// Copy literal chunk
|
||||
litCount = GetLength(litCount);
|
||||
|
||||
Buffer.BlockCopy(cmp, cmpPos, dec, decPos, litCount);
|
||||
|
@ -47,7 +47,7 @@ namespace Ryujinx.HLE.Loaders.Compression
|
|||
break;
|
||||
}
|
||||
|
||||
//Copy compressed chunck
|
||||
// Copy compressed chunk
|
||||
int back = cmp[cmpPos++] << 0 |
|
||||
cmp[cmpPos++] << 8;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
|||
DataOffset = dataMemOffset;
|
||||
BssSize = bssSize;
|
||||
|
||||
//Text segment
|
||||
// Text segment
|
||||
input.Seek(textOffset, SeekOrigin.Begin);
|
||||
|
||||
Text = reader.ReadBytes(textSize);
|
||||
|
@ -85,7 +85,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
|||
Text = Lz4.Decompress(Text, textDecSize);
|
||||
}
|
||||
|
||||
//Read-only data segment
|
||||
// Read-only data segment
|
||||
input.Seek(roOffset, SeekOrigin.Begin);
|
||||
|
||||
Ro = reader.ReadBytes(roSize);
|
||||
|
@ -95,7 +95,7 @@ namespace Ryujinx.HLE.Loaders.Executables
|
|||
Ro = Lz4.Decompress(Ro, roDecSize);
|
||||
}
|
||||
|
||||
//Data segment
|
||||
// Data segment
|
||||
input.Seek(dataOffset, SeekOrigin.Begin);
|
||||
|
||||
Data = reader.ReadBytes(dataSize);
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
|
||||
TitleId = reader.ReadInt64();
|
||||
|
||||
//Reserved.
|
||||
// Reserved.
|
||||
stream.Seek(8, SeekOrigin.Current);
|
||||
|
||||
int fsAccessHeaderOffset = reader.ReadInt32();
|
||||
|
|
|
@ -33,12 +33,12 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
throw new InvalidNpdmException("ACID Stream doesn't contain ACID section!");
|
||||
}
|
||||
|
||||
//Size field used with the above signature (?).
|
||||
// Size field used with the above signature (?).
|
||||
Unknown1 = reader.ReadInt32();
|
||||
|
||||
reader.ReadInt32();
|
||||
|
||||
//Bit0 must be 1 on retail, on devunit 0 is also allowed. Bit1 is unknown.
|
||||
// Bit0 must be 1 on retail, on devunit 0 is also allowed. Bit1 is unknown.
|
||||
Flags = reader.ReadInt32();
|
||||
|
||||
TitleIdRangeMin = reader.ReadInt64();
|
||||
|
|
|
@ -4,9 +4,9 @@ using System.Text;
|
|||
|
||||
namespace Ryujinx.HLE.Loaders.Npdm
|
||||
{
|
||||
//https://github.com/SciresM/hactool/blob/master/npdm.c
|
||||
//https://github.com/SciresM/hactool/blob/master/npdm.h
|
||||
//http://switchbrew.org/index.php?title=NPDM
|
||||
// https://github.com/SciresM/hactool/blob/master/npdm.c
|
||||
// https://github.com/SciresM/hactool/blob/master/npdm.h
|
||||
// http://switchbrew.org/index.php?title=NPDM
|
||||
class Npdm
|
||||
{
|
||||
private const int MetaMagic = 'M' << 0 | 'E' << 8 | 'T' << 16 | 'A' << 24;
|
||||
|
|
|
@ -15,11 +15,11 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
|
||||
BinaryReader reader = new BinaryReader(stream);
|
||||
|
||||
int byteReaded = 0;
|
||||
int bytesRead = 0;
|
||||
|
||||
Dictionary<string, bool> services = new Dictionary<string, bool>();
|
||||
|
||||
while (byteReaded != size)
|
||||
while (bytesRead != size)
|
||||
{
|
||||
byte controlByte = reader.ReadByte();
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
|
||||
services[Encoding.ASCII.GetString(reader.ReadBytes(length))] = registerAllowed;
|
||||
|
||||
byteReaded += length + 1;
|
||||
bytesRead += length + 1;
|
||||
}
|
||||
|
||||
Services = new ReadOnlyDictionary<string, bool>(services);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue