Esempio n. 1
0
 public SMDH() : this(true)
 {
     Version = 0;
     Reserved_1 = 0;
     Reserved_2 = 0;
     for (int i = 0; i < 16; i++)
         AppTitles[i] = new AppTitle();
     Settings = new AppSettings();
 }
Esempio n. 2
0
 public static void Write(AppSettings sett, Stream s)
 {
     using (var bw = new BinaryWriter(s, Encoding.ASCII, true))
     {
         for (int i = 0; i < 16; i++)
             AgeRating.Write(sett.AgeRatings[i], s);
         bw.Write((int) sett.RegionLock);
         MatchMakerID.Write(sett.MatchMakerID, s);
         bw.Write((int) sett.Flags);
         EulaVersion.Write(sett.EULA, s);
         bw.Write(sett.Reserved);
         bw.Write(sett.OptimalBannerFrame);
         bw.Write(sett.StreetPassID);
     }
 }
Esempio n. 3
0
 public static AppSettings Read(Stream s)
 {
     AppSettings sett = new AppSettings(true);
     using (var br = new BinaryReader(s, Encoding.ASCII, true))
     {
         for (int i = 0; i < 16; i++)
             sett.AgeRatings[i] = AgeRating.Read(s);
         sett.RegionLock = (RegionLockFlags) br.ReadInt32();
         sett.MatchMakerID = MatchMakerID.Read(s);
         sett.Flags = (SettingFlags) br.ReadInt32();
         sett.EULA = EulaVersion.Read(s);
         sett.Reserved = br.ReadInt16();
         sett.OptimalBannerFrame = br.ReadSingle();
         sett.StreetPassID = br.ReadUInt32();
     }
     return sett;
 }