internal static void Write(int version, BinaryWriter bw, talk_proc talk_proc) { bw.Write(talk_proc.id_talk); GlobalFunctions.WriteNameChars(bw, talk_proc.text); bw.Write(talk_proc.num_window); for (int i = 0; i < talk_proc.num_window; i++) { window.Write(version, bw, talk_proc.windows[i]); } }
internal static void Read(int version, BinaryReader br, int Id, talk_proc talk_proc) { talk_proc.crypt_key = Id; talk_proc.id_talk = br.ReadInt32(); talk_proc.text = GlobalFunctions.ReadNameChars(64, br); talk_proc.num_window = br.ReadInt32(); talk_proc.windows = new window[talk_proc.num_window]; for (int i = 0; i < talk_proc.num_window; i++) { talk_proc.windows[i] = new window(); talk_proc.windows[i].crypt_key = talk_proc.crypt_key; window.Read(version, br, talk_proc.windows[i]); } }
private void Set_talk_proc_Text(talk_proc talk_proc, int value) { string DialogText = talk_proc.DialogText; talk_proc.crypt_key = value; talk_proc.DialogText = DialogText; for (int i1 = 0; i1 < talk_proc.windows.Length; i1++) { string TalkText = talk_proc.windows[i1].talktext; talk_proc.windows[i1].crypt_key = value; talk_proc.windows[i1].talktext = TalkText; for (int i2 = 0; i2 < talk_proc.windows[i1].options.Length; i2++) { string OptionText = talk_proc.windows[i1].options[i2].optiontext; talk_proc.windows[i1].options[i2].crypt_key = value; talk_proc.windows[i1].options[i2].optiontext = OptionText; } } }