// Token: 0x0600170E RID: 5902 RVA: 0x000C9214 File Offset: 0x000C7414 public static AppMain.TXB_HEADER readTXBfile(BinaryReader br, string sPath) { AppMain.TXB_HEADER txb_HEADER = new AppMain.TXB_HEADER(); txb_HEADER.file_id = br.ReadBytes(4); txb_HEADER.texfilelist_offset = AppMain._amConvertEndian(br.ReadInt32()); txb_HEADER.pad = br.ReadBytes(8); br.BaseStream.Position = ( long )txb_HEADER.texfilelist_offset; txb_HEADER.texfilelist.nTex = AppMain._amConvertEndian(br.ReadInt32()); txb_HEADER.texfilelist.tex_list_offset = AppMain._amConvertEndian(br.ReadInt32()); if (txb_HEADER.texfilelist.tex_list_offset != 0) { br.BaseStream.Position = ( long )txb_HEADER.texfilelist.tex_list_offset; txb_HEADER.texfilelist.pTexFileList = new AppMain.TXB_TEXFILE[txb_HEADER.texfilelist.nTex]; for (int i = 0; i < txb_HEADER.texfilelist.nTex; i++) { txb_HEADER.texfilelist.pTexFileList[i] = new AppMain.TXB_TEXFILE(); txb_HEADER.texfilelist.pTexFileList[i].fType = AppMain._amConvertEndian(br.ReadUInt32()); ((AppMain.TXB_TEXFILE)txb_HEADER.texfilelist.pTexFileList[i]).name_offset = AppMain._amConvertEndian(br.ReadInt32()); txb_HEADER.texfilelist.pTexFileList[i].MinFilter = AppMain._amConvertEndian(br.ReadUInt16()); txb_HEADER.texfilelist.pTexFileList[i].MagFilter = AppMain._amConvertEndian(br.ReadUInt16()); txb_HEADER.texfilelist.pTexFileList[i].GlobalIndex = AppMain._amConvertEndian(br.ReadUInt32()); txb_HEADER.texfilelist.pTexFileList[i].Bank = AppMain._amConvertEndian(br.ReadUInt32()); } for (int j = 0; j < txb_HEADER.texfilelist.nTex; j++) { br.BaseStream.Position = ( long )((AppMain.TXB_TEXFILE)txb_HEADER.texfilelist.pTexFileList[j]).name_offset; txb_HEADER.texfilelist.pTexFileList[j].Filename = AmFs.readChars(br); string filename = txb_HEADER.texfilelist.pTexFileList[j].Filename.Replace(".PVR", ".PNG"); txb_HEADER.texfilelist.pTexFileList[j].Filename = filename; } } return(txb_HEADER); }
// Token: 0x0600251D RID: 9501 RVA: 0x0014BAC8 File Offset: 0x00149CC8 public YSDS_HEADER(byte[] data) { using (MemoryStream memoryStream = new MemoryStream(data)) { using (BinaryReader binaryReader = new BinaryReader(memoryStream)) { this.masic = binaryReader.ReadBytes(4); this.page_num = binaryReader.ReadUInt32(); this.pages = AppMain.New <AppMain.YSDS_PAGE>(( int )this.page_num); int num = 0; while (( long )num < ( long )(( ulong )this.page_num)) { this.pages[num].time = binaryReader.ReadUInt32(); this.pages[num].show = binaryReader.ReadInt32(); this.pages[num].hide = binaryReader.ReadInt32(); this.pages[num].option = binaryReader.ReadUInt32(); this.pages[num].line_num = binaryReader.ReadUInt32(); this.pages[num].line_tbl_ofst = binaryReader.ReadUInt32(); this.pages[num].lines = AppMain.New <AppMain.YSDS_LINE>(( int )this.pages[num].line_num); num++; } int num2 = 0; while (( long )num2 < ( long )(( ulong )this.page_num)) { binaryReader.BaseStream.Seek(( long )(( ulong )this.pages[num2].line_tbl_ofst), 0); int num3 = 0; while (( long )num3 < ( long )(( ulong )this.pages[num2].line_num)) { this.pages[num2].lines[num3].id = binaryReader.ReadUInt32(); this.pages[num2].lines[num3].str_ofst = binaryReader.ReadUInt32(); num3++; } num2++; } int num4 = 0; while (( long )num4 < ( long )(( ulong )this.page_num)) { int num5 = 0; while (( long )num5 < ( long )(( ulong )this.pages[num4].line_num)) { binaryReader.BaseStream.Seek(( long )(( ulong )this.pages[num4].lines[num5].str_ofst), 0); this.pages[num4].lines[num5].s = AmFs.readChars(binaryReader); num5++; } num4++; } } } }