Alexandria.Platforms.Wii.NintendoOpticalDiscPartition.LoadOffset C# (CSharp) Method

LoadOffset() static private method

static private LoadOffset ( BinaryReader reader, NintendoOpticalDiscSystem system ) : long
reader System.IO.BinaryReader
system NintendoOpticalDiscSystem
return long
        internal static long LoadOffset(BinaryReader reader, NintendoOpticalDiscSystem system)
        {
            switch (system) {
                case NintendoOpticalDiscSystem.Wii: return reader.ReadUInt32() * 4L;
                case NintendoOpticalDiscSystem.GameCube: return reader.ReadUInt32();
                default: throw new NotImplementedException();
            }
        }

Usage Example

コード例 #1
0
 internal NintendoOpticalDiscPartitionFile(FolderAsset parent, int index, int nameOffset, BinaryReader reader, NintendoOpticalDiscSystem system)
     : base(parent, "")
 {
     Index      = index;
     NameOffset = nameOffset;
     DataOffset = NintendoOpticalDiscPartition.LoadOffset(reader, system);
     Size       = reader.ReadUInt32();
 }