Пример #1
0
 internal static void Write(int version, BinaryWriter bw, window window)
 {
     bw.Write(window.id);
     bw.Write(window.id_parent);
     bw.Write(window.talk_text_len);
     GlobalFunctions.WriteNameChars(bw, window.talk_text);
     bw.Write(window.num_option);
     for (int i = 0; i < window.num_option; i++)
     {
         option.Write(version, bw, window.options[i]);
     }
 }
Пример #2
0
 internal static void Read(int version, BinaryReader br, window window)
 {
     window.id            = br.ReadInt32();
     window.id_parent     = br.ReadInt32();
     window.talk_text_len = br.ReadInt32();
     window.talk_text     = GlobalFunctions.ReadNameChars(window.talk_text_len, br);
     window.num_option    = br.ReadInt32();
     window.options       = new option[window.num_option];
     for (int i = 0; i < window.num_option; i++)
     {
         window.options[i]           = new option();
         window.options[i].crypt_key = window.crypt_key;
         option.Read(version, br, window.options[i]);
     }
 }