public ReadNullTerminatedString ( ) : string | ||
Результат | string |
public Node(EndianReader reader, bool loadMesh) { mainAddress = (int)reader.Position; xF000 = reader.ReadInt16(); reader.ReadInt32(); //address _B903 = new Block_B903(reader); if (reader.PeekUInt16() != 0xF900) ReadGeomBlocks(reader, loadMesh); Transform = new MatrixBlock_F900(reader); #region Block FA00 reader.ReadInt16(); //FA00 reader.ReadInt32(); //EOB address BoneIndex = reader.ReadInt32(); //node data index #endregion if (reader.PeekUInt16() == 0x8304) //used on zone/path objects _8304 = new ScriptRefBlock_8304(reader); if (reader.PeekUInt16() == 0xFD00) //used on template root node _FD00 = new Block_FD00(reader); #region Block 1501 reader.ReadInt16(); //1501 reader.ReadInt32(); //EOB address reader.ReadNullTerminatedString(); #endregion if (_2E01 != null) { reader.ReadInt16(); //0701 reader.ReadInt32(); //address to 1601 after submeshes reader.ReadInt16(); //F300 reader.ReadInt32(); //address to 0401 reader.ReadInt32(); //struct count (always 5 so far) unkC1 = new int[5]; //aformentioned struct for (int i = 0; i < 5; i++) { reader.ReadInt16(); //0301 reader.ReadInt32(); //address to 0100 unkC1[i] = reader.ReadInt32(); //count (always 0?) reader.ReadInt16(); //0100 reader.ReadInt32(); //address to next } #region Read Submesh Data [0401] reader.ReadInt16(); //0401 reader.ReadInt32(); //address to 0100 after submeshes (end of submesh data) subAddress = (int)reader.Position; var count = reader.ReadInt32(); Submeshes = new List<Submesh>(); for (int i = 0; i < count; i++) Submeshes.Add(new Submesh(reader)); #endregion reader.ReadInt16(); //0100 reader.ReadInt32(); //address if (Submeshes[0]._3201 != null) { reader.ReadInt16(); //1601 reader.ReadInt32(); //EOB offset reader.ReadInt16(); //1701 reader.ReadInt32(); //EOB offset unk0 = reader.ReadInt32(); unk1 = reader.ReadInt32(); _3301 = new Block_3301(reader, loadMesh, Vertices.Data); if (reader.PeekUInt16() == 0x1A01) _1A01 = new Block_1A01(reader, loadMesh, Vertices.Data); reader.ReadInt16(); //0100 reader.ReadInt32(); //address } } if (reader.PeekUInt16() == 0x2B01) { reader.ReadInt16(); //2B01 reader.ReadInt32(); //EOB offset ParentID = reader.ReadInt32(); } reader.ReadInt16(); //0100 reader.ReadInt32(); //address }
public StringBlock_BA01(EndianReader reader) : base(reader, 0xBA01) { Data = reader.ReadNullTerminatedString(); }
public MatRefBlock_5601(EndianReader reader) : base(reader, 0x5601) { Reference = reader.ReadNullTerminatedString(); }
public Block_FD00(EndianReader reader) : base(reader, 0xFD00) { reader.ReadInt16(); //BA01 reader.ReadInt32(); //address Data = reader.ReadNullTerminatedString(); }
public Block_B903(EndianReader reader) : base(reader, 0xB903) { Name = reader.ReadNullTerminatedString(); ID = reader.ReadInt16(); x2400 = reader.ReadInt16(); unk0 = reader.ReadByte(); unk1 = reader.ReadInt16(); //possibly flags unk2 = reader.ReadInt16(); //possibly flags VertCount = reader.ReadInt32(); FaceCount = reader.ReadInt32(); }
private void ReadFolderTable(EndianReader reader) { // Seek to the beginning of the folder list reader.Format = EndianFormat.Big; reader.SeekTo(FolderListStart); // Read the number of folders int folderCount = reader.ReadInt32(); // Sort the folders into a list sorted by offset SortedList<int, int> folderOffsets = new SortedList<int, int>(); // Maps offset -> ID, sorted by offset for (int i = 0; i < folderCount; i++) { int offset = reader.ReadInt32(); int id = reader.ReadInt32(); folderOffsets.Add(offset, id); } // Read the folder names and create wrappers for them foreach (KeyValuePair<int, int> offset in folderOffsets) { reader.SeekTo(FolderListStart + offset.Key); // The name's offset is relative to the start of the folder list string name = reader.ReadNullTerminatedString(); _foldersById[offset.Value] = new SoundPackFolder(name); } }