public void RegisterSectionBlock(BSEQSectionBlock sectionBlock) { if (sectionBlock != null) { BSEQManager.GetInstance().AddSectionBlock(SequenceID, sectionBlock); } }
public override string ToString() { BSEQSectionBlock block = BSEQManager.GetInstance().GetSectionBlockForSequenceID(SequenceID); if (block == null) { return(SequenceID.ToString()); } else { return(block.Name.ToString()); } }
public override string ToString() { BSEQSectionBlock block = BSEQManager.GetInstance().GetSectionBlockForSequenceID(OwnSequenceID.SequenceID); if (block == null || !(block is BSEQSecuenceSectionBlock)) { return(PrintBasicInfo()); } BSEQSecuenceSectionBlock seqBlock = block as BSEQSecuenceSectionBlock; BSEQSectionBlock srcBlock = (srcSubSeq == -1) ? seqBlock : BSEQManager.GetInstance().GetSectionBlockForSequenceID(seqBlock.SequenceBlock.SubSectionTable.Entries[srcSubSeq].SequenceID.SequenceID); BSEQSectionBlock dstBlock = (dstSubSeq == -1) ? seqBlock : BSEQManager.GetInstance().GetSectionBlockForSequenceID(seqBlock.SequenceBlock.SubSectionTable.Entries[dstSubSeq].SequenceID.SequenceID); String srcName = srcBlock.Name.ToString() + "::" + srcBlock.ExitCodeList.GetEntryFromID(srcID).NameOffset.ToString(); String dstName = dstBlock.Name.ToString() + "::" + dstBlock.EnterCodeList.GetEntryFromID(dstID).NameOffset.ToString(); return(srcName + " -> " + dstName); }
public BSEQ(byte[] Data) { EndianBinaryReaderEx er = new EndianBinaryReaderEx(new MemoryStream(Data), Endianness.LittleEndian); Header = new BSEQHeader(er); UInt32[] sectionBlockOffsets = er.ReadUInt32s(Header.SectionBlockCount); er.BaseStream.Position = Header.NameTableOffset; NameTable = new BSEQNameTable(er); er.BaseStream.Position = Header.EngineCreatorTableOffset; EngineCreatorEntries = new List <BSEQEngineCreatorEntry>(); for (int i = 0; i < Header.EngineCreatorCount; i++) { EngineCreatorEntries.Add(new BSEQEngineCreatorEntry(er, NameTable)); } SectionBlocks = new List <BSEQSectionBlock>(); for (int i = 0; i < sectionBlockOffsets.Length; i++) { er.BaseStream.Position = sectionBlockOffsets[i]; UInt16 BlockType = BSEQSectionBlock.GetBlockType(er); switch ((BSEQSectionBlockType)BlockType) { case BSEQSectionBlockType.PracticalSectionTask: case BSEQSectionBlockType.PracticalSectionPage: SectionBlocks.Add(new BSEQPracticalSectionBlock(er, NameTable)); break; case BSEQSectionBlockType.SequenceSection: SectionBlocks.Add(new BSEQSecuenceSectionBlock(er, NameTable)); break; case BSEQSectionBlockType.SceneSequenceProxySection: SectionBlocks.Add(new BSEQSceneSequenceProxySectionBlock(er, NameTable)); break; default: throw new NotImplementedException("Unknown BlockType (" + BlockType + ") at position 0x" + String.Format("0x{0:X}", er.BaseStream.Position)); } } }