コード例 #1
0
ファイル: DialogueGod.cs プロジェクト: ancientgods/SoG
 public static DialogueGod ReadFile(string sPath)
 {
     DialogueGod ret;
     try
     {
         using (FileStream readStream = new FileStream(sPath, FileMode.Open, FileAccess.Read))
         {
             using (BinaryReader br = new BinaryReader(readStream))
             {
                 br.ReadInt32();
                 ret = DialogueGod.Read(br);
                 br.Close();
             }
         }
     }
     catch
     {
         ret = new DialogueGod();
     }
     return ret;
 }
コード例 #2
0
ファイル: DialogueGod.cs プロジェクト: ancientgods/SoG
 public static DialogueGod Read(BinaryReader br)
 {
     DialogueGod.iLoadedIteration = br.ReadInt32();
     DialogueGod ret = new DialogueGod();
     if (DialogueGod.iLoadedIteration > DialogueGod.iCurrentIteration)
     {
         return ret;
     }
     if (DialogueGod.iLoadedIteration >= 1)
     {
         ret.sVersion = br.ReadString();
     }
     ret.sLanguage = br.ReadString();
     int iCount = br.ReadInt32();
     for (int i = 0; i < iCount; i++)
     {
         string sKey = br.ReadString();
         ret.dsxDialogueCollections[sKey] = DialogueCollection.Read(br);
     }
     return ret;
 }