mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Use preferred braces style.
This commit is contained in:
@@ -237,7 +237,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
#endif
|
||||
|
||||
foreach(CDTextPack descriptor in response.DataPacks)
|
||||
{
|
||||
if((descriptor.HeaderID1 & 0x80) != 0x80)
|
||||
{
|
||||
// Ignore NOPs
|
||||
@@ -366,7 +365,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
sb.AppendFormat("CRC: 0x{0:X4}", descriptor.CRC).AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -200,7 +200,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
sb.AppendFormat("First complete session number: {0}", response.FirstCompleteSession).AppendLine();
|
||||
sb.AppendFormat("Last complete session number: {0}", response.LastCompleteSession).AppendLine();
|
||||
foreach(TrackDataDescriptor descriptor in response.TrackDescriptors)
|
||||
{
|
||||
if((descriptor.CONTROL & 0x08) == 0x08 ||
|
||||
descriptor.ADR != 1 && descriptor.ADR != 5 && descriptor.ADR != 4 && descriptor.ADR != 6 ||
|
||||
descriptor.TNO != 0)
|
||||
@@ -378,7 +377,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
default:
|
||||
{
|
||||
if(descriptor.POINT >= 0x01 && descriptor.POINT <= 0x63)
|
||||
{
|
||||
if(descriptor.ADR == 4)
|
||||
sb.AppendFormat("Video track {3} starts at: {0:D2}:{1:D2}:{2:D2}",
|
||||
descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME,
|
||||
@@ -424,8 +422,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
|
||||
sb.AppendLine(")");
|
||||
}
|
||||
//sb.AppendFormat("Absolute time: {3:D2}:{0:D2}:{1:D2}:{2:D2}", descriptor.Min, descriptor.Sec, descriptor.Frame, descriptor.HOUR).AppendLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("ADR = {0}", descriptor.ADR).AppendLine();
|
||||
@@ -593,7 +589,6 @@ namespace DiscImageChef.Decoders.CD
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace DiscImageChef.Decoders.DVD
|
||||
}
|
||||
|
||||
if(decoded.MSWI)
|
||||
{
|
||||
switch(decoded.RAMSWI)
|
||||
{
|
||||
case 0: break;
|
||||
@@ -190,7 +189,6 @@ namespace DiscImageChef.Decoders.DVD
|
||||
.AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -279,7 +279,6 @@ namespace DiscImageChef.Decoders.DVD
|
||||
sb.AppendFormat("DDS has been updated {0} times", decoded.UpdateCount).AppendLine();
|
||||
|
||||
if(decoded.Groups == 24)
|
||||
{
|
||||
for(int i = 0; i < decoded.GroupCertificationFlags.Length; i++)
|
||||
{
|
||||
if(decoded.GroupCertificationFlags[i].InProcess)
|
||||
@@ -291,7 +290,6 @@ namespace DiscImageChef.Decoders.DVD
|
||||
if(decoded.GroupCertificationFlags[i].UserCertification)
|
||||
sb.AppendFormat("Group {0} has been certified by an user", i).AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
if(decoded.Groups == 1)
|
||||
{
|
||||
|
||||
@@ -223,10 +223,8 @@ namespace DiscImageChef.Decoders.MMC
|
||||
double unit;
|
||||
|
||||
if((csd.HPIFeatures & 0x01) == 0x01)
|
||||
{
|
||||
if((csd.HPIFeatures & 0x02) == 0x02) sb.AppendLine("\tDevice implements HPI using CMD12");
|
||||
else sb.AppendLine("\tDevice implements HPI using CMD13");
|
||||
}
|
||||
|
||||
if((csd.BackgroundOperationsSupport & 0x01) == 0x01)
|
||||
sb.AppendLine("\tDevice supports background operations");
|
||||
|
||||
@@ -610,15 +610,12 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
descriptor.CodeSet == IdentificationCodeSet.UTF8)
|
||||
sb.AppendFormat("\tSCSI name string identifier: {0}", descriptor.ASCII).AppendLine();
|
||||
else
|
||||
{
|
||||
sb.AppendFormat("\tSCSI name string identifier (hex): {0}",
|
||||
PrintHex.ByteArrayToHexArrayString(descriptor.Binary, 40)).AppendLine();
|
||||
}
|
||||
break;
|
||||
case IdentificationTypes.ProtocolSpecific:
|
||||
{
|
||||
if(descriptor.PIV)
|
||||
{
|
||||
switch(descriptor.ProtocolIdentifier)
|
||||
{
|
||||
case ProtocolIdentifiers.ADT:
|
||||
@@ -705,7 +702,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
@@ -1211,7 +1207,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
if(page.PeripheralDeviceType == PeripheralDeviceTypes.DirectAccess ||
|
||||
page.PeripheralDeviceType == PeripheralDeviceTypes.SCSIZonedBlockDevice)
|
||||
{
|
||||
switch(page.SPT)
|
||||
{
|
||||
case 0:
|
||||
@@ -1240,7 +1235,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
.AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(page.PeripheralDeviceType == PeripheralDeviceTypes.SequentialAccess && page.SPT == 1)
|
||||
sb.AppendLine("Logical unit supports logical block protection");
|
||||
|
||||
@@ -2302,7 +2296,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
Match servoMatch;
|
||||
|
||||
for(int pos = 5; pos < pageResponse.Length; pos++)
|
||||
{
|
||||
if(pageResponse[pos] == 0x00)
|
||||
{
|
||||
string str = StringHandlers.CToString(array.ToArray());
|
||||
@@ -2329,7 +2322,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
array = new List<byte>();
|
||||
}
|
||||
else array.Add(pageResponse[pos]);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
@@ -463,10 +463,8 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if(response.MaxLBAExtents == 0)
|
||||
{
|
||||
if(response.DataLength > 2) sb.AppendLine("Drive can store 256 LBA Extents");
|
||||
else sb.AppendLine("Drive cannot store LBA Extents");
|
||||
}
|
||||
else sb.AppendFormat("Drive can store {0} LBA Extents", response.MaxLBAExtents).AppendLine();
|
||||
|
||||
for(int i = 0; i < response.Extents.Length; i++)
|
||||
|
||||
@@ -426,14 +426,10 @@ namespace DiscImageChef.Decoders.SCSI.MMC
|
||||
if(decoded.DAC_V) sb.AppendFormat("Disc application code: {0}", decoded.DiscApplicationCode).AppendLine();
|
||||
|
||||
if(decoded.OPCTables != null)
|
||||
{
|
||||
foreach(OPCTable table in decoded.OPCTables)
|
||||
{
|
||||
sb.AppendFormat("OPC values for {0}Kbit/sec.: {1}, {2}, {3}, {4}, {5}, {6}", table.Speed,
|
||||
table.OPCValues[0], table.OPCValues[1], table.OPCValues[2], table.OPCValues[3],
|
||||
table.OPCValues[4], table.OPCValues[5]).AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -335,7 +335,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
|
||||
int offset = 8;
|
||||
while(offset < sense.Length)
|
||||
{
|
||||
if(offset + 2 < sense.Length)
|
||||
{
|
||||
byte descType = sense[offset];
|
||||
@@ -349,7 +348,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
offset += descLen;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
@@ -401,7 +399,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
if(decoded.AdditionalLength < 10) return sb.ToString();
|
||||
|
||||
if(decoded.SKSV)
|
||||
{
|
||||
switch(decoded.SenseKey)
|
||||
{
|
||||
case SenseKeys.IllegalRequest:
|
||||
@@ -428,7 +425,6 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
sb.AppendFormat("Actual retry count is {0}", decoded.SenseKeySpecific & 0xFFFF).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -447,14 +443,12 @@ namespace DiscImageChef.Decoders.SCSI
|
||||
if(decoded.Descriptors == null || decoded.Descriptors.Count == 0) return sb.ToString();
|
||||
|
||||
foreach(KeyValuePair<byte, byte[]> kvp in decoded.Descriptors)
|
||||
{
|
||||
switch(kvp.Key)
|
||||
{
|
||||
case 0x00:
|
||||
sb.AppendLine(PrettifyDescriptor00(kvp.Value));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -234,7 +234,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
.AppendLine();
|
||||
IPBinInformation.AppendFormat("Peripherals:").AppendLine();
|
||||
foreach(byte peripheral in ipbin.peripherals)
|
||||
{
|
||||
switch((char)peripheral)
|
||||
{
|
||||
case 'A':
|
||||
@@ -275,11 +274,9 @@ namespace DiscImageChef.Decoders.Sega
|
||||
IPBinInformation.AppendFormat("Game supports unknown peripheral {0}.", peripheral).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IPBinInformation.AppendLine("Regions supported:");
|
||||
foreach(byte region in ipbin.region_codes)
|
||||
{
|
||||
switch((char)region)
|
||||
{
|
||||
case 'J':
|
||||
@@ -296,7 +293,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return IPBinInformation.ToString();
|
||||
}
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
|
||||
IPBinInformation.AppendLine("Regions supported:");
|
||||
foreach(byte region in ipbin.region_codes)
|
||||
{
|
||||
switch((char)region)
|
||||
{
|
||||
case 'J':
|
||||
@@ -192,7 +191,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int iPeripherals = int.Parse(Encoding.ASCII.GetString(ipbin.peripherals), NumberStyles.HexNumber);
|
||||
|
||||
|
||||
@@ -140,7 +140,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
|
||||
IPBinInformation.AppendFormat("Peripherals:").AppendLine();
|
||||
foreach(byte peripheral in ipbin.peripherals)
|
||||
{
|
||||
switch((char)peripheral)
|
||||
{
|
||||
case 'A':
|
||||
@@ -166,11 +165,9 @@ namespace DiscImageChef.Decoders.Sega
|
||||
IPBinInformation.AppendFormat("Game supports unknown peripheral {0}.", peripheral).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IPBinInformation.AppendLine("Regions supported:");
|
||||
foreach(byte region in ipbin.region_codes)
|
||||
{
|
||||
switch((char)region)
|
||||
{
|
||||
case 'J':
|
||||
@@ -190,7 +187,6 @@ namespace DiscImageChef.Decoders.Sega
|
||||
IPBinInformation.AppendFormat("Game supports unknown region {0}.", region).AppendLine();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return IPBinInformation.ToString();
|
||||
}
|
||||
|
||||
@@ -421,7 +421,6 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
}
|
||||
|
||||
if(decoded.DataAreaStartPSN > 0)
|
||||
{
|
||||
if(decoded.DataAreaEndPSN > 0)
|
||||
{
|
||||
sb.AppendFormat("Data area starts at PSN {0:X}h", decoded.DataAreaStartPSN).AppendLine();
|
||||
@@ -430,7 +429,6 @@ namespace DiscImageChef.Decoders.Xbox
|
||||
sb.AppendFormat("Layer 0 ends at PSN {0:X}h", decoded.Layer0EndPSN).AppendLine();
|
||||
}
|
||||
else sb.AppendLine("Disc is empty");
|
||||
}
|
||||
else sb.AppendLine("Disc is empty");
|
||||
|
||||
sb.AppendLine("Challenges:");
|
||||
|
||||
Reference in New Issue
Block a user