void ReadStageDirections() { StageDirections = new List <StageDirectionStruct>(); int f = FindPropByName("m_aStageDirections"); 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); StageDirectionStruct sd = new StageDirectionStruct { Text = p[0].Value.StringValue, StringRef = p[1].Value.IntValue }; StageDirections.Add(sd); pos = p[p.Count - 1].offend; } }
public int WriteStageDirection(MemoryStream m, StageDirectionStruct sd) { int size = 0; size += WriteStrProperty(m, "sText", sd.Text); size += WriteIntProperty(m, "srStrRef", sd.StringRef, "StringRefProperty"); size += WriteNone(m); return(size); }
public int WriteStageDirection(MemoryStream m, StageDirectionStruct sd) { int size = 0; size += WriteStrProperty(m, "sText", sd.Text); size += WriteIntProperty(m, "srStrRef", sd.StringRef, "StringRefProperty"); size += WriteNone(m); return size; }
private void ReadStageDirections() { StageDirections = new List<StageDirectionStruct>(); int f = FindPropByName("m_aStageDirections"); 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); StageDirectionStruct sd = new StageDirectionStruct(); sd.Text = p[0].Value.StringValue; sd.StringRef = p[1].Value.IntValue; StageDirections.Add(sd); pos = p[p.Count - 1].offend; } }