public int WriteEntryList(MemoryStream m, EntryListStuct el) { int size = 0; size += WriteEntryReplyList(m, el.ReplyList); size += WriteIntArrayProperty(m, "aSpeakerList", el.SpeakerList); size += WriteIntProperty(m, "nSpeakerIndex", el.SpeakerIndex); size += WriteIntProperty(m, "nListenerIndex", el.ListenerIndex); size += WriteBoolProperty(m, "bSkippable", el.Skippable); size += WriteStrProperty(m, "sText", el.Text); size += WriteIntProperty(m, "srText", el.refText, "StringRefProperty"); size += WriteIntProperty(m, "nConditionalFunc", el.ConditionalFunc); size += WriteIntProperty(m, "nConditionalParam", el.ConditionalParam); size += WriteIntProperty(m, "nStateTransition", el.StateTransition); size += WriteIntProperty(m, "nStateTransitionParam", el.StateTransitionParam); size += WriteIntProperty(m, "nExportID", el.ExportID); size += WriteIntProperty(m, "nScriptIndex", el.ScriptIndex); size += WriteIntProperty(m, "nCameraIntimacy", el.CameraIntimacy); size += WriteBoolProperty(m, "bFireConditional", el.FireConditional); size += WriteBoolProperty(m, "bAmbient", el.Ambient); size += WriteBoolProperty(m, "bNonTextLine", el.NonTextline); size += WriteBoolProperty(m, "bIgnoreBodyGestures", el.IgnoreBodyGestures); size += WriteBoolProperty(m, "bAlwaysHideSubtitle", el.AlwaysHideSubtitle); size += WriteByteProperty(m, "eGUIStyle", el.GUIStyleType, el.GUIStyleValue); size += WriteNone(m); return(size); }
public int WriteEntryList(MemoryStream m, EntryListStuct el) { int size = 0; size += WriteEntryReplyList(m, el.ReplyList); size += WriteIntProperty(m, "nSpeakerIndex", el.SpeakerIndex); size += WriteIntProperty(m, "nListenerIndex", el.ListenerIndex); size += WriteBoolProperty(m, "bSkippable", el.Skippable); size += WriteIntArrayProperty(m, "aSpeakerList", el.SpeakerList); size += WriteIntProperty(m, "srText", el.refText, "StringRefProperty"); size += WriteStrProperty(m, "sText", el.Text); size += WriteBoolProperty(m, "bFireConditional", el.FireConditional); size += WriteIntProperty(m, "nConditionalFunc", el.ConditionalFunc); size += WriteIntProperty(m, "nConditionalParam", el.ConditionalParam); size += WriteIntProperty(m, "nStateTransition", el.StateTransition); size += WriteIntProperty(m, "nStateTransitionParam", el.StateTransitionParam); size += WriteIntProperty(m, "nExportID", el.ExportID); size += WriteIntProperty(m, "nScriptIndex", el.ScriptIndex); size += WriteBoolProperty(m, "bAmbient", el.Ambient); size += WriteBoolProperty(m, "bNonTextLine", el.NonTextline); size += WriteByteProperty(m, "eGUIStyle", el.GUIStyleValue); size += WriteIntProperty(m, "nCameraIntimacy", el.CameraIntimacy); size += WriteBoolProperty(m, "bIgnoreBodyGestures", el.IgnoreBodyGestures); size += WriteNone(m); return size; }
private void ReadEntryList() { EntryList = new List <EntryListStuct>(); int f = FindPropByName("m_EntryList"); if (f == -1) { return; } byte[] buff = Props[f].raw; int count = BitConverter.ToInt32(buff, 0x18); int pos = 0x1C; for (int i = 0; i < count; i++) { List <PropertyReader.Property> p = PropertyReader.ReadProp(pcc, buff, pos); EntryListStuct e = new EntryListStuct(); foreach (PropertyReader.Property pp in p) { string name = pcc.getNameEntry(pp.Name); switch (name) { case "ReplyListNew": byte[] buff2 = pp.raw; int count2 = BitConverter.ToInt32(buff2, 0x18); int pos2 = 0x1C; e.ReplyList = new List <EntryListReplyListStruct>(); for (int j = 0; j < count2; j++) { List <PropertyReader.Property> p2 = PropertyReader.ReadProp(pcc, buff2, pos2); EntryListReplyListStruct r = new EntryListReplyListStruct(); foreach (PropertyReader.Property ppp in p2) { switch (pcc.getNameEntry(ppp.Name)) { case "sParaphrase": r.Paraphrase = ppp.Value.StringValue; break; case "nIndex": r.Index = ppp.Value.IntValue; break; case "srParaphrase": r.refParaphrase = ppp.Value.IntValue; break; case "Category": r.CategoryType = BitConverter.ToInt32(ppp.raw, 24); r.CategoryValue = BitConverter.ToInt32(ppp.raw, 32); break; } } e.ReplyList.Add(r); pos2 = p2[p2.Count - 1].offend; } break; case "aSpeakerList": buff2 = pp.raw; count2 = BitConverter.ToInt32(buff2, 0x18); e.SpeakerList = new List <int>(); for (int j = 0; j < count2; j++) { e.SpeakerList.Add(BitConverter.ToInt32(buff2, 0x1C + 4 * j)); } break; case "nSpeakerIndex": e.SpeakerIndex = pp.Value.IntValue; break; case "nListenerIndex": e.ListenerIndex = pp.Value.IntValue; break; case "bSkippable": e.Skippable = (pp.raw[pp.raw.Length - 1] == 1); break; case "sText": e.Text = pp.Value.StringValue; break; case "srText": e.refText = pp.Value.IntValue; break; case "nConditionalFunc": e.ConditionalFunc = pp.Value.IntValue; break; case "nConditionalParam": e.ConditionalParam = pp.Value.IntValue; break; case "nStateTransition": e.StateTransition = pp.Value.IntValue; break; case "nStateTransitionParam": e.StateTransitionParam = pp.Value.IntValue; break; case "nExportID": e.ExportID = pp.Value.IntValue; break; case "nScriptIndex": e.ScriptIndex = pp.Value.IntValue; break; case "nCameraIntimacy": e.CameraIntimacy = pp.Value.IntValue; break; case "bFireConditional": e.FireConditional = (pp.raw[pp.raw.Length - 1] == 1); break; case "bAmbient": e.Ambient = (pp.raw[pp.raw.Length - 1] == 1); break; case "bNonTextLine": e.NonTextline = (pp.raw[pp.raw.Length - 1] == 1); break; case "bIgnoreBodyGestures": e.IgnoreBodyGestures = (pp.raw[pp.raw.Length - 1] == 1); break; case "bAlwaysHideSubtitle": e.AlwaysHideSubtitle = (pp.raw[pp.raw.Length - 1] == 1); break; case "eGUIStyle": e.GUIStyleType = BitConverter.ToInt32(pp.raw, 24); e.GUIStyleValue = BitConverter.ToInt32(pp.raw, 32); break; } } EntryList.Add(e); pos = p[p.Count - 1].offend; } }
private void ReadEntryList() { EntryList = new List<EntryListStuct>(); int f = FindPropByName("m_EntryList"); if (f == -1) return; byte[] buff = Props[f].raw; int count = BitConverter.ToInt32(buff, 0x18); int pos = 0x1C; for (int i = 0; i < count; i++) { List<PropertyReader.Property> p = PropertyReader.ReadProp(pcc, buff, pos); EntryListStuct e = new EntryListStuct(); foreach (PropertyReader.Property pp in p) { switch (pcc.getNameEntry(pp.Name)) { case"ReplyListNew": byte[] buff2 = pp.raw; int count2 = BitConverter.ToInt32(buff2, 0x18); int pos2 = 0x1C; e.ReplyList = new List<EntryListReplyListStruct>(); for (int j = 0; j < count2; j++) { List<PropertyReader.Property> p2 = PropertyReader.ReadProp(pcc, buff2, pos2); EntryListReplyListStruct r = new EntryListReplyListStruct(); foreach(PropertyReader.Property ppp in p2) switch (pcc.getNameEntry(ppp.Name)) { case "sParaphrase": r.Paraphrase = ppp.Value.StringValue; break; case "nIndex": r.Index = ppp.Value.IntValue; break; case "srParaphrase": r.refParaphrase = ppp.Value.IntValue; break; case "Category": r.CategoryValue = BitConverter.ToInt32(ppp.raw, 24); break; case "None": break; } e.ReplyList.Add(r); pos2 = p2[p2.Count - 1].offend; } break; case "aSpeakerList": buff2 = pp.raw; count2 = BitConverter.ToInt32(buff2, 0x18); e.SpeakerList = new List<int>(); for (int j = 0; j < count2; j++) e.SpeakerList.Add(BitConverter.ToInt32(buff2, 0x1C + 4 * j)); break; case "nSpeakerIndex": e.SpeakerIndex = pp.Value.IntValue; break; case "nListenerIndex": e.ListenerIndex = pp.Value.IntValue; break; case "bSkippable": e.Skippable = (pp.Value.IntValue == 1); break; case "sText": e.Text = pp.Value.StringValue; break; case "srText": e.refText = pp.Value.IntValue; break; case "nConditionalFunc": e.ConditionalFunc = pp.Value.IntValue; break; case "nConditionalParam": e.ConditionalParam = pp.Value.IntValue; break; case "nStateTransition": e.StateTransition = pp.Value.IntValue; break; case "nStateTransitionParam": e.StateTransitionParam = pp.Value.IntValue; break; case "nExportID": e.ExportID = pp.Value.IntValue; break; case "nScriptIndex": e.ScriptIndex = pp.Value.IntValue; break; case "nCameraIntimacy": e.CameraIntimacy = pp.Value.IntValue; break; case "bFireConditional": e.FireConditional = (pp.Value.IntValue == 1); break; case "bAmbient": e.Ambient = (pp.Value.IntValue == 1); break; case "bNonTextLine": e.NonTextline = (pp.Value.IntValue == 1); break; case "bIgnoreBodyGestures": e.IgnoreBodyGestures = (pp.Value.IntValue == 1); break; case "eGUIStyle": e.GUIStyleValue = BitConverter.ToInt32(pp.raw, 24); break; case "None": break; } } EntryList.Add(e); pos = p[p.Count - 1].offend; } }