Emulation.DiscSystem - cleanup - use built in aliases

This commit is contained in:
adelikat 2020-02-26 14:42:35 -06:00
parent 2afa05d2c7
commit cd9103b412
2 changed files with 20 additions and 20 deletions

View File

@ -55,10 +55,10 @@ namespace BizHawk.Emulation.DiscSystem
#region 16-bit #region 16-bit
public Int16 ToInt16(byte[] data) { public short ToInt16(byte[] data) {
return ToInt16(data, 0); return ToInt16(data, 0);
} }
public Int16 ToInt16(byte[] data, int offset) { public short ToInt16(byte[] data, int offset) {
byte[] corrected; byte[] corrected;
if (swap) { if (swap) {
corrected = (byte[])data.Clone(); corrected = (byte[])data.Clone();
@ -74,10 +74,10 @@ namespace BizHawk.Emulation.DiscSystem
#region 32-bit #region 32-bit
public Int32 ToInt32(byte[] data) { public int ToInt32(byte[] data) {
return ToInt32(data, 0); return ToInt32(data, 0);
} }
public Int32 ToInt32(byte[] data, int offset) { public int ToInt32(byte[] data, int offset) {
byte[] corrected; byte[] corrected;
if (swap) { if (swap) {
corrected = (byte[])data.Clone(); corrected = (byte[])data.Clone();
@ -93,10 +93,10 @@ namespace BizHawk.Emulation.DiscSystem
#region 64-bit #region 64-bit
public Int64 ToInt64(byte[] data) { public long ToInt64(byte[] data) {
return ToInt64(data, 0); return ToInt64(data, 0);
} }
public Int64 ToInt64(byte[] data, int offset) { public long ToInt64(byte[] data, int offset) {
byte[] corrected; byte[] corrected;
if (swap) { if (swap) {
corrected = (byte[])data.Clone(); corrected = (byte[])data.Clone();

View File

@ -87,22 +87,22 @@ namespace BizHawk.Emulation.DiscSystem
/// <summary> /// <summary>
/// Burst Cutting Area data offset /// Burst Cutting Area data offset
/// </summary> /// </summary>
public Int64 BCAOffset; public long BCAOffset;
/// <summary> /// <summary>
/// Offset to disc (DVD?) structures /// Offset to disc (DVD?) structures
/// </summary> /// </summary>
public Int64 StructureOffset; public long StructureOffset;
/// <summary> /// <summary>
/// Offset to the first session block /// Offset to the first session block
/// </summary> /// </summary>
public Int64 SessionOffset; public long SessionOffset;
/// <summary> /// <summary>
/// Data Position Measurement offset /// Data Position Measurement offset
/// </summary> /// </summary>
public Int64 DPMOffset; public long DPMOffset;
/// <summary> /// <summary>
/// Parse mds stream for the header /// Parse mds stream for the header
@ -141,7 +141,7 @@ namespace BizHawk.Emulation.DiscSystem
public byte NonTrackBlocks; /* Number of lead-in data blocks */ public byte NonTrackBlocks; /* Number of lead-in data blocks */
public int FirstTrack; /* First track in session */ public int FirstTrack; /* First track in session */
public int LastTrack; /* Last track in session */ public int LastTrack; /* Last track in session */
public Int64 TrackOffset; /* Offset of lead-in+regular track data blocks. */ public long TrackOffset; /* Offset of lead-in+regular track data blocks. */
} }
/// <summary> /// <summary>
@ -181,12 +181,12 @@ namespace BizHawk.Emulation.DiscSystem
public int PSec; /* PSec */ public int PSec; /* PSec */
public int PFrame; /* PFrame */ public int PFrame; /* PFrame */
public Int64 ExtraOffset; /* Start offset of this track's extra block. */ public long ExtraOffset; /* Start offset of this track's extra block. */
public int SectorSize; /* Sector size. */ public int SectorSize; /* Sector size. */
public Int64 PLBA; /* Track start sector (PLBA). */ public long PLBA; /* Track start sector (PLBA). */
public ulong StartOffset; /* Track start offset (from beginning of MDS file) */ public ulong StartOffset; /* Track start offset (from beginning of MDS file) */
public Int64 Files; /* Number of filenames for this track */ public long Files; /* Number of filenames for this track */
public Int64 FooterOffset; /* Start offset of footer (from beginning of MDS file) */ public long FooterOffset; /* Start offset of footer (from beginning of MDS file) */
/// <summary> /// <summary>
/// Track extra block /// Track extra block
@ -212,8 +212,8 @@ namespace BizHawk.Emulation.DiscSystem
/// </summary> /// </summary>
public class ATrackExtra public class ATrackExtra
{ {
public Int64 Pregap; /* Number of sectors in pregap. */ public long Pregap; /* Number of sectors in pregap. */
public Int64 Sectors; /* Number of sectors in track. */ public long Sectors; /* Number of sectors in track. */
} }
/// <summary> /// <summary>
@ -221,8 +221,8 @@ namespace BizHawk.Emulation.DiscSystem
/// </summary> /// </summary>
public class AFooter public class AFooter
{ {
public Int64 FilenameOffset; /* Start offset of image filename string (from beginning of mds file) */ public long FilenameOffset; /* Start offset of image filename string (from beginning of mds file) */
public Int64 WideChar; /* Seems to be set to 1 if widechar filename is used */ public long WideChar; /* Seems to be set to 1 if widechar filename is used */
} }
/// <summary> /// <summary>
@ -389,7 +389,7 @@ namespace BizHawk.Emulation.DiscSystem
// check for track extra block - this can probably be handled in a separate loop, // check for track extra block - this can probably be handled in a separate loop,
// but I'll just store the current stream position then seek forward to the extra block for this track // but I'll just store the current stream position then seek forward to the extra block for this track
Int64 currPos = stream.Position; long currPos = stream.Position;
// Only CDs have extra blocks - for DVDs ExtraOffset = track length // Only CDs have extra blocks - for DVDs ExtraOffset = track length
if (track.ExtraOffset > 0 && !isDvd) if (track.ExtraOffset > 0 && !isDvd)