public LgbModelEntry(IO.PackCollection packs, byte[] buffer, int offset) { this.Header = buffer.ToStructure<HeaderData>(offset); this.Name = buffer.ReadString(offset + Header.NameOffset); var mdlFilePath = buffer.ReadString(offset + Header.ModelFileOffset); if (!string.IsNullOrWhiteSpace(mdlFilePath)) { SaintCoinach.Graphics.ModelFile mdlFile = (SaintCoinach.Graphics.ModelFile)packs.GetFile(mdlFilePath); this.Model = new TransformedModel(mdlFile.GetModelDefinition(), Header.Translation, Header.Rotation, Header.Scale); } }
public LgbGimmickEntry(IO.PackCollection packs, byte[] buffer, int offset) { this.Header = buffer.ToStructure<HeaderData>(offset); this.Name = buffer.ReadString(offset + Header.NameOffset); var gimmickFilePath = buffer.ReadString(offset + Header.GimmickFileOffset); if (!string.IsNullOrWhiteSpace(gimmickFilePath)) { var file = packs.GetFile(gimmickFilePath); this.Gimmick = new Sgb.SgbFile(file); } }