public static void GmEneHariSenboBuild() { AppMain.gm_ene_harisenbo_obj_3d_list = AppMain.GmGameDBuildRegBuildModel(AppMain.readAMBFile(AppMain.GmGameDatGetEnemyData(658)), AppMain.readAMBFile(AppMain.GmGameDatGetEnemyData(659)), 0U); AppMain.AMS_AMB_HEADER header = AppMain.readAMBFile(AppMain.GmGameDatGetEnemyData(659)); AppMain.AmbChunk ambChunk = AppMain.amBindGet(header, header.file_num - 1, out header.dir); AppMain.gm_ene_harisenbo_r_obj_3d_list = AppMain.GmGameDBuildRegBuildModel(AppMain.readAMBFile(AppMain.GmGameDatGetEnemyData(658)), AppMain.readAMBFile(AppMain.GmGameDatGetEnemyData(659)), 0U, AppMain.readTXBfile(ambChunk.array, ambChunk.offset)); }
public static void amPreLoadAmbItems(AppMain.AMS_AMB_HEADER amb) { AppMain.AmbChunk ambChunk = new AppMain.AmbChunk(amb.data, 0, 0, amb); for (int index = 0; index < amb.files.Length; ++index) { ambChunk.offset = amb.offsets[index]; ambChunk.length = amb.lengths[index]; string extension = Path.GetExtension(amb.files[index]); if (extension.Equals(".INM", StringComparison.OrdinalIgnoreCase) || extension.Equals(".INV", StringComparison.OrdinalIgnoreCase)) { AppMain.NNS_MOTION motion; AppMain.amMotionSetup(out motion, ambChunk); amb.buf[index] = (object)motion; } else if (extension.Equals(AppMain.g_dm_buy_screen_amb_ext, StringComparison.OrdinalIgnoreCase)) { amb.buf[index] = (object)AppMain.readAMBFile(ambChunk); AppMain.amPreLoadAmbItems((AppMain.AMS_AMB_HEADER)amb.buf[index]); } else if (extension.Equals(".AME", StringComparison.OrdinalIgnoreCase)) { amb.buf[index] = (object)AppMain.readAMEfile(ambChunk); } } }
private void fileLoading() { bool flag = true; for (int index = 0; index < 2; ++index) { if (!AppMain.amFsIsComplete(this.m_fs[index])) { flag = false; break; } } if (!flag) { return; } for (int index = 0; index < 2; ++index) { this.m_file[index] = (object)this.m_fs[index]; } for (uint index = 0; index < 6U; ++index) { AppMain.CMain.SLocalUnfoldTable slocalUnfoldTable = AppMain.CMain.c_local_unfold_table[(int)index]; if (slocalUnfoldTable.file < AppMain.CMain.EMemFile.Type.Max) { AppMain.AmbChunk buf = AppMain.amBindGet(this.m_fs[(int)slocalUnfoldTable.file], (int)slocalUnfoldTable.index, out string _); object obj = !AppMain.AoActIsAma(buf.array, buf.offset) ? (object)AppMain.readAMBFile(buf) : (object)AppMain.readAMAFile((object)buf); this.m_file[(int)index] = obj; } } this.m_flag[4] = true; this.m_pTaskLink.DetachTask(); }
// Token: 0x06001D5C RID: 7516 RVA: 0x00137D98 File Offset: 0x00135F98 public GMS_EVE_DATA_DC_HEADER(AppMain.AmbChunk data) { using (MemoryStream memoryStream = new MemoryStream(data.array, data.offset, data.array.Length - data.offset)) { using (BinaryReader binaryReader = new BinaryReader(memoryStream)) { this.width = binaryReader.ReadUInt16(); this.height = binaryReader.ReadUInt16(); int num = (int)(this.width * this.height); this.ofst = new uint[num]; for (int i = 0; i < num; i++) { this.ofst[i] = binaryReader.ReadUInt32(); } this.dc_list = AppMain.New <AppMain.GMS_EVE_DATA_DC_LIST>(num); for (int j = 0; j < num; j++) { binaryReader.BaseStream.Seek(( long )(( ulong )this.ofst[j]), 0); this.dc_list[j].dec_num = binaryReader.ReadUInt16(); if (this.dc_list[j].dec_num > 0) { this.dc_list[j].dec_data = AppMain.New <AppMain.GMS_EVE_RECORD_DECORATE>(( int )this.dc_list[j].dec_num); for (int k = 0; k < ( int )this.dc_list[j].dec_num; k++) { this.dc_list[j].dec_data[k].pos_x = binaryReader.ReadByte(); this.dc_list[j].dec_data[k].pos_y = binaryReader.ReadByte(); this.dc_list[j].dec_data[k].id = binaryReader.ReadUInt16(); } } } } } }
private static AppMain.AMS_AMB_HEADER readAMBFile(AppMain.AmbChunk buf) { byte[] array = buf.array; int offset = buf.offset; AppMain.AMS_AMB_HEADER amsAmbHeader = AppMain.searchPreloadedAmb(buf.amb, buf.offset); if (amsAmbHeader != null) { return(amsAmbHeader); } AppMain.AMS_AMB_HEADER amb = new AppMain.AMS_AMB_HEADER(); using (Stream input = (Stream) new MemoryStream(array, offset, array.Length - offset)) { if (offset == 0) { amb.data = new byte[input.Length]; input.Read(amb.data, 0, amb.data.Length); } else { amb.data = array; } input.Position = 0L; readAmbHeader(input, ref amb); amb.parent = buf.amb; AppMain.amPreLoadAmbItems(amb); } return(amb); }
// Token: 0x06000A80 RID: 2688 RVA: 0x0005CD10 File Offset: 0x0005AF10 public static void amPreLoadAmbItems(AppMain.AMS_AMB_HEADER amb) { AppMain.AmbChunk ambChunk = new AppMain.AmbChunk(amb.data, 0, 0, amb); for (int i = 0; i < amb.files.Length; i++) { ambChunk.offset = amb.offsets[i]; ambChunk.length = amb.lengths[i]; string extension = Path.GetExtension(amb.files[i]); if (extension == ".INM" || extension == ".INV") { AppMain.NNS_MOTION nns_MOTION; AppMain.amMotionSetup(out nns_MOTION, ambChunk); amb.buf[i] = nns_MOTION; } else if (extension == ".AMB") { amb.buf[i] = AppMain.readAMBFile(ambChunk); AppMain.amPreLoadAmbItems((AppMain.AMS_AMB_HEADER)amb.buf[i]); } else if (extension == ".AME") { amb.buf[i] = AppMain.readAMEfile(ambChunk); } } }
public GMS_EVE_DATA_DC_HEADER(AppMain.AmbChunk data) { using (MemoryStream memoryStream = new MemoryStream(data.array, data.offset, data.array.Length - data.offset)) { using (BinaryReader binaryReader = new BinaryReader((Stream)memoryStream)) { this.width = binaryReader.ReadUInt16(); this.height = binaryReader.ReadUInt16(); int n = (int)this.width * (int)this.height; this.ofst = new uint[(int)(uint)n]; for (int index = 0; index < n; ++index) { this.ofst[index] = binaryReader.ReadUInt32(); } this.dc_list = AppMain.New <AppMain.GMS_EVE_DATA_DC_LIST>(n); for (int index1 = 0; index1 < n; ++index1) { binaryReader.BaseStream.Seek((long)this.ofst[index1], SeekOrigin.Begin); this.dc_list[index1].dec_num = binaryReader.ReadUInt16(); if (this.dc_list[index1].dec_num > (ushort)0) { this.dc_list[index1].dec_data = AppMain.New <AppMain.GMS_EVE_RECORD_DECORATE>((int)this.dc_list[index1].dec_num); for (int index2 = 0; index2 < (int)this.dc_list[index1].dec_num; ++index2) { this.dc_list[index1].dec_data[index2].pos_x = binaryReader.ReadByte(); this.dc_list[index1].dec_data[index2].pos_y = binaryReader.ReadByte(); this.dc_list[index1].dec_data[index2].id = binaryReader.ReadUInt16(); } } } } } }
public static void amMotionSetup(out AppMain.NNS_MOTION motion, AppMain.AmbChunk buf) { motion = (AppMain.NNS_MOTION)null; using (MemoryStream memoryStream = new MemoryStream(buf.array, buf.offset, buf.array.Length - buf.offset)) { BinaryReader reader = new BinaryReader((Stream)memoryStream); AppMain.NNS_BINCNK_FILEHEADER bincnkFileheader = AppMain.NNS_BINCNK_FILEHEADER.Read(reader); long ofsData; reader.BaseStream.Seek(ofsData = (long)bincnkFileheader.OfsData, SeekOrigin.Begin); AppMain.NNS_BINCNK_DATAHEADER bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); long data0Pos = ofsData; reader.BaseStream.Seek((long)bincnkFileheader.OfsNOF0, SeekOrigin.Begin); AppMain.NNS_BINCNK_NOF0HEADER.Read(reader); int nChunk = bincnkFileheader.nChunk; while (nChunk > 0) { switch (bincnkDataheader.Id) { case 1095584078: case 1129138510: case 1330465102: reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin); motion = AppMain.NNS_MOTION.Read(reader, data0Pos); break; case 1145980238: return; } ++nChunk; reader.BaseStream.Seek(ofsData += (long)(8 + bincnkDataheader.OfsNextId), SeekOrigin.Begin); bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); } } }
public static AppMain.AMS_AME_HEADER readAMEfile(AppMain.AmbChunk data) { using (MemoryStream memoryStream = new MemoryStream(data.array, data.offset, data.array.Length - data.offset)) { using (BinaryReader br = new BinaryReader((Stream)memoryStream)) return(AppMain.readAMEfile(br)); } }
public static AppMain.A2S_AMA_HEADER readAMAFile(object data) { if (data is AppMain.A2S_AMA_HEADER) { return((AppMain.A2S_AMA_HEADER)data); } AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)data; return(AppMain.readAMAFile(ambChunk.array, ambChunk.offset)); }
// Token: 0x06001A28 RID: 6696 RVA: 0x000EA8A8 File Offset: 0x000E8AA8 public static int amMotionSetup(AppMain.ArrayPointer <AppMain.NNS_MOTION> motion, object _buf) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)_buf; int result; using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset)) { BinaryReader binaryReader = new BinaryReader(memoryStream); AppMain.ArrayPointer <AppMain.NNS_MOTION> pointer = motion; int num = 0; pointer.SetPrimitive(null); AppMain.NNS_BINCNK_FILEHEADER nns_BINCNK_FILEHEADER = AppMain.NNS_BINCNK_FILEHEADER.Read(binaryReader); long num2; binaryReader.BaseStream.Seek(num2 = ( long )nns_BINCNK_FILEHEADER.OfsData, 0); AppMain.NNS_BINCNK_DATAHEADER nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); long num3 = num2; binaryReader.BaseStream.Seek(( long )nns_BINCNK_FILEHEADER.OfsNOF0, 0); AppMain.NNS_BINCNK_NOF0HEADER.Read(binaryReader); int i = nns_BINCNK_FILEHEADER.nChunk; while (i > 0) { uint id = nns_BINCNK_DATAHEADER.Id; if (id <= 1129138510U) { if (id == 1095584078U || id == 1129138510U) { goto IL_C8; } } else { if (id == 1145980238U) { break; } if (id == 1330465102U) { goto IL_C8; } } IL_FF: i++; binaryReader.BaseStream.Seek(num2 += ( long )(8 + nns_BINCNK_DATAHEADER.OfsNextId), 0); nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); continue; IL_C8: binaryReader.BaseStream.Seek(num3 + ( long )nns_BINCNK_DATAHEADER.OfsMainData, 0); pointer.SetPrimitive(AppMain.NNS_MOTION.Read(binaryReader, num3)); pointer = ++pointer; num++; goto IL_FF; } result = num; } return(result); }
public static void AoTexBuild(AppMain.AOS_TEXTURE tex, AppMain.AMS_AMB_HEADER amb) { if (tex == null || amb == null) { return; } AppMain.aoTexInitTex(tex); tex.amb = amb; AppMain.AmbChunk ambChunk = AppMain.amBindSearchEx(amb, ".txb"); tex.txb = AppMain.readTXBfile(ambChunk.array, ambChunk.offset, amb.dir); AppMain.TXB_HEADER txb = tex.txb; }
// Token: 0x0600074B RID: 1867 RVA: 0x0003FD6C File Offset: 0x0003DF6C private static AppMain.AmbChunk amBindSearchEx(AppMain.AMS_AMB_HEADER header, string exname) { AppMain.AmbChunk result = null; for (int i = 0; i < header.file_num; i++) { if (header.files[i].IndexOf(exname, 0, StringComparison.OrdinalIgnoreCase) != -1) { result = new AppMain.AmbChunk(header.data, header.offsets[i], header.lengths[i], header); break; } } return(result); }
// Token: 0x06000746 RID: 1862 RVA: 0x0003FC40 File Offset: 0x0003DE40 private static object amBindGet(AppMain.AMS_AMB_HEADER header, int index) { string dir; AppMain.AmbChunk ambChunk = AppMain.amBindGet(header, index, out dir); if (header.files[index].IndexOf(".amb", StringComparison.OrdinalIgnoreCase) != -1) { AppMain.AMS_AMB_HEADER ams_AMB_HEADER = AppMain.readAMBFile(ambChunk); ams_AMB_HEADER.dir = dir; return(ams_AMB_HEADER); } return(ambChunk); }
// Token: 0x060018C7 RID: 6343 RVA: 0x000E21DC File Offset: 0x000E03DC private static void dmTitleOpLoadPostFuncMapFar(AppMain.DMS_LOGO_COM_LOAD_CONTEXT context) { AppMain.dm_titleop_data[context.no] = context.fs_req; AppMain.AMS_AMB_HEADER ams_AMB_HEADER = AppMain.readAMBFile(AppMain.dm_titleop_data[context.no]); for (int i = 0; i < ams_AMB_HEADER.file_num; i++) { string dir; AppMain.AmbChunk buf = AppMain.amBindGet(ams_AMB_HEADER, i, out dir); AppMain.AMS_AMB_HEADER ams_AMB_HEADER2 = AppMain.readAMBFile(buf); ams_AMB_HEADER2.dir = dir; AppMain.dm_titleop_mapfar_data[i] = ams_AMB_HEADER2; } }
// Token: 0x06000A7D RID: 2685 RVA: 0x0005CA5E File Offset: 0x0005AC5E private static AppMain.AMS_AMB_HEADER readAMBFile(object data) { if (data is AppMain.AMS_AMB_HEADER) { return((AppMain.AMS_AMB_HEADER)data); } if (data is AppMain.AmbChunk) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)data; return(AppMain.readAMBFile(data)); } return(AppMain.readAMBFile((AppMain.AMS_FS)data)); }
private static object amBindGet(AppMain.AMS_AMB_HEADER header, int index) { string sPath; AppMain.AmbChunk buf = AppMain.amBindGet(header, index, out sPath); if (header.files[index].IndexOf(".amb", StringComparison.OrdinalIgnoreCase) == -1) { return((object)buf); } AppMain.AMS_AMB_HEADER amsAmbHeader = AppMain.readAMBFile(buf); amsAmbHeader.dir = sPath; return((object)amsAmbHeader); }
// Token: 0x06000747 RID: 1863 RVA: 0x0003FC80 File Offset: 0x0003DE80 private static AppMain.AmbChunk amBindGet(AppMain.AMS_AMB_HEADER header, int index, out string sPath) { sPath = null; AppMain.AmbChunk result = null; if (index < header.file_num) { result = new AppMain.AmbChunk(header.data, header.offsets[index], header.lengths[index], header); } else { AppMain.mppAssertNotImpl(); } return(result); }
private static byte[] ObjDataLoad( AppMain.OBS_DATA_WORK data_work, string filename, object archive) { byte[] buf1 = (byte[])null; AppMain.sFile = filename; if (data_work != null) { if (data_work.pData == null) { if (archive != null) { AppMain.AmbChunk ambChunk = AppMain.amBindSearch((AppMain.AMS_AMB_HEADER)archive, AppMain.sFile); byte[] numArray = new byte[ambChunk.length]; Buffer.BlockCopy((Array)ambChunk.array, ambChunk.offset, (Array)numArray, 0, ambChunk.length); data_work.pData = (object)numArray; data_work.num = (ushort)32768; ++data_work.num; } else { byte[] buf2; AppMain.amFsRead(AppMain.sFile, out buf2); data_work.pData = (object)buf2; if (data_work.pData != null) { ++data_work.num; } } } else { ++data_work.num; } return((byte[])data_work.pData); } if (archive != null) { AppMain.AmbChunk ambChunk = AppMain.amBindSearch((AppMain.AMS_AMB_HEADER)archive, AppMain.sFile); buf1 = new byte[ambChunk.length]; Buffer.BlockCopy((Array)ambChunk.array, ambChunk.offset, (Array)buf1, 0, ambChunk.length); } else { AppMain.amFsRead(AppMain.sFile, out buf1); } return(buf1); }
private static AppMain.AmbChunk amBindSearchEx( AppMain.AMS_AMB_HEADER header, string exname) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)null; for (int index = 0; index < header.file_num; ++index) { if (header.files[index].IndexOf(exname, 0, StringComparison.OrdinalIgnoreCase) != -1) { ambChunk = new AppMain.AmbChunk(header.data, header.offsets[index], header.lengths[index], header); break; } } return(ambChunk); }
private static void gmGmkGearChangeCol(AppMain.GMS_GMK_GEAR_WORK gear_work) { byte[] numArray; if (AppMain.gm_gmk_gear_add_data[(int)(gear_work.col_type * 2U)] is AppMain.AmbChunk) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)AppMain.gm_gmk_gear_add_data[(int)(gear_work.col_type * 2U)]; numArray = new byte[ambChunk.length]; Buffer.BlockCopy((Array)ambChunk.array, ambChunk.offset, (Array)numArray, 0, ambChunk.length); AppMain.gm_gmk_gear_add_data[(int)(gear_work.col_type * 2U)] = (object)numArray; } else { numArray = (byte[])AppMain.gm_gmk_gear_add_data[(int)(gear_work.col_type * 2U)]; } gear_work.gmk_work.ene_com.col_work.obj_col.diff_data = numArray; }
// Token: 0x06001A27 RID: 6695 RVA: 0x000EA778 File Offset: 0x000E8978 public static void amMotionSetup(out AppMain.NNS_MOTION motion, AppMain.AmbChunk buf) { motion = null; using (MemoryStream memoryStream = new MemoryStream(buf.array, buf.offset, buf.array.Length - buf.offset)) { BinaryReader binaryReader = new BinaryReader(memoryStream); AppMain.NNS_BINCNK_FILEHEADER nns_BINCNK_FILEHEADER = AppMain.NNS_BINCNK_FILEHEADER.Read(binaryReader); long num; binaryReader.BaseStream.Seek(num = ( long )nns_BINCNK_FILEHEADER.OfsData, 0); AppMain.NNS_BINCNK_DATAHEADER nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); long num2 = num; binaryReader.BaseStream.Seek(( long )nns_BINCNK_FILEHEADER.OfsNOF0, 0); AppMain.NNS_BINCNK_NOF0HEADER.Read(binaryReader); int i = nns_BINCNK_FILEHEADER.nChunk; while (i > 0) { uint id = nns_BINCNK_DATAHEADER.Id; if (id <= 1129138510U) { if (id == 1095584078U || id == 1129138510U) { goto IL_B3; } } else { if (id == 1145980238U) { break; } if (id == 1330465102U) { goto IL_B3; } } IL_D4: i++; binaryReader.BaseStream.Seek(num += ( long )(8 + nns_BINCNK_DATAHEADER.OfsNextId), 0); nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); continue; IL_B3: binaryReader.BaseStream.Seek(num2 + ( long )nns_BINCNK_DATAHEADER.OfsMainData, 0); motion = AppMain.NNS_MOTION.Read(binaryReader, num2); goto IL_D4; } } }
public TVX_FILE(AppMain.AmbChunk data) { this.header = new AppMain.TVXS_HEADER(data.array, data.offset); this.textures = new AppMain.TVXS_TEXTURE[(int)this.header.tex_num]; this.vertexes = new AppMain.AOS_TVX_VERTEX[(int)this.header.tex_num][]; for (int index1 = 0; index1 < this.textures.Length; ++index1) { int offset1 = (int)((long)this.header.tex_tbl_ofst + (long)(index1 * AppMain.TVXS_TEXTURE.SizeBytes)) + data.offset; this.textures[index1] = new AppMain.TVXS_TEXTURE(data.array, offset1); this.vertexes[index1] = new AppMain.AOS_TVX_VERTEX[(int)this.textures[index1].vtx_num]; for (int index2 = 0; (long)index2 < (long)this.textures[index1].vtx_num; ++index2) { int offset2 = (int)((long)this.textures[index1].vtx_tbl_ofst + (long)(index2 * (int)AppMain.AOS_TVX_VERTEX.SizeBytes)) + data.offset; this.vertexes[index1][index2] = new AppMain.AOS_TVX_VERTEX(data.array, offset2); } } }
// Token: 0x06001948 RID: 6472 RVA: 0x000E483C File Offset: 0x000E2A3C private static byte[] ObjDataLoad(AppMain.OBS_DATA_WORK data_work, string filename, object archive) { byte[] array = null; AppMain.sFile = filename; if (data_work != null) { if (data_work.pData == null) { if (archive != null) { AppMain.AmbChunk ambChunk = AppMain.amBindSearch((AppMain.AMS_AMB_HEADER)archive, AppMain.sFile); array = new byte[ambChunk.length]; Buffer.BlockCopy(ambChunk.array, ambChunk.offset, array, 0, ambChunk.length); data_work.pData = array; data_work.num = 32768; data_work.num += 1; } else { byte[] pData; AppMain.amFsRead(AppMain.sFile, out pData); data_work.pData = pData; if (data_work.pData != null) { data_work.num += 1; } } } else { data_work.num += 1; } return(( byte[] )data_work.pData); } if (archive != null) { AppMain.AmbChunk ambChunk2 = AppMain.amBindSearch((AppMain.AMS_AMB_HEADER)archive, AppMain.sFile); array = new byte[ambChunk2.length]; Buffer.BlockCopy(ambChunk2.array, ambChunk2.offset, array, 0, ambChunk2.length); } else { AppMain.amFsRead(AppMain.sFile, out array); } return(array); }
// Token: 0x0600205A RID: 8282 RVA: 0x0013E04C File Offset: 0x0013C24C private void fileLoading() { bool flag = true; for (int i = 0; i < 2; i++) { if (!AppMain.amFsIsComplete(this.m_fs[i])) { flag = false; break; } } if (flag) { for (int j = 0; j < 2; j++) { this.m_file[j] = this.m_fs[j]; } for (uint num = 0U; num < 6U; num += 1U) { AppMain.CMain.SLocalUnfoldTable slocalUnfoldTable = AppMain.CMain.c_local_unfold_table[(int)((UIntPtr)num)]; int file = (int)slocalUnfoldTable.file; int num2 = 2; if (file < num2) { string text; AppMain.AmbChunk ambChunk = AppMain.amBindGet(this.m_fs[(int)slocalUnfoldTable.file], (int)slocalUnfoldTable.index, out text); object obj; if (AppMain.AoActIsAma(ambChunk.array, ambChunk.offset)) { obj = AppMain.readAMAFile(ambChunk); } else { obj = AppMain.readAMBFile(ambChunk); } this.m_file[( int )(( UIntPtr )num)] = obj; } } this.m_flag[4] = true; this.m_pTaskLink.DetachTask(); } }
// Token: 0x06002599 RID: 9625 RVA: 0x0014DB3C File Offset: 0x0014BD3C public TVX_FILE(AppMain.AmbChunk data) { this.header = new AppMain.TVXS_HEADER(data.array, data.offset); this.textures = new AppMain.TVXS_TEXTURE[this.header.tex_num]; this.vertexes = new AppMain.AOS_TVX_VERTEX[this.header.tex_num][]; for (int i = 0; i < this.textures.Length; i++) { int offset = (int)((ulong)this.header.tex_tbl_ofst + (ulong)((long)(i * AppMain.TVXS_TEXTURE.SizeBytes))) + data.offset; this.textures[i] = new AppMain.TVXS_TEXTURE(data.array, offset); this.vertexes[i] = new AppMain.AOS_TVX_VERTEX[this.textures[i].vtx_num]; int num = 0; while (( long )num < ( long )(( ulong )this.textures[i].vtx_num)) { offset = ( int )(( ulong )this.textures[i].vtx_tbl_ofst + ( ulong )(( long )(num * ( int )AppMain.AOS_TVX_VERTEX.SizeBytes))) + data.offset; this.vertexes[i][num] = new AppMain.AOS_TVX_VERTEX(data.array, offset); num++; } } }
public static void amObjectSetup( out AppMain.NNS_OBJECT _object, out AppMain.NNS_TEXFILELIST texfilelist, object _buf) { _object = (AppMain.NNS_OBJECT)null; texfilelist = (AppMain.NNS_TEXFILELIST)null; AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)_buf; using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset)) { BinaryReader reader = new BinaryReader((Stream)memoryStream); AppMain.NNS_BINCNK_FILEHEADER bincnkFileheader = AppMain.NNS_BINCNK_FILEHEADER.Read(reader); long ofsData; reader.BaseStream.Seek(ofsData = (long)bincnkFileheader.OfsData, SeekOrigin.Begin); AppMain.NNS_BINCNK_DATAHEADER bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); long data0Pos = ofsData; reader.BaseStream.Seek((long)bincnkFileheader.OfsNOF0, SeekOrigin.Begin); AppMain.NNS_BINCNK_NOF0HEADER.Read(reader); int nChunk = bincnkFileheader.nChunk; while (nChunk > 0) { switch (bincnkDataheader.Id) { case 1112492366: reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin); _object = AppMain.NNS_OBJECT.Read(reader, data0Pos); break; case 1145980238: return; case 1280592206: reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin); texfilelist = AppMain.NNS_TEXFILELIST.Read(reader, data0Pos); break; } --nChunk; reader.BaseStream.Seek(ofsData += (long)(8 + bincnkDataheader.OfsNextId), SeekOrigin.Begin); bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); } } }
// Token: 0x06001145 RID: 4421 RVA: 0x000972F4 File Offset: 0x000954F4 public static void amObjectSetup(out AppMain.NNS_OBJECT _object, out AppMain.NNS_TEXFILELIST texfilelist, object _buf) { _object = null; texfilelist = null; AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)_buf; using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset)) { BinaryReader binaryReader = new BinaryReader(memoryStream); AppMain.NNS_BINCNK_FILEHEADER nns_BINCNK_FILEHEADER = AppMain.NNS_BINCNK_FILEHEADER.Read(binaryReader); long num; binaryReader.BaseStream.Seek(num = ( long )nns_BINCNK_FILEHEADER.OfsData, 0); AppMain.NNS_BINCNK_DATAHEADER nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); long num2 = num; binaryReader.BaseStream.Seek(( long )nns_BINCNK_FILEHEADER.OfsNOF0, 0); AppMain.NNS_BINCNK_NOF0HEADER.Read(binaryReader); int i = nns_BINCNK_FILEHEADER.nChunk; while (i > 0) { uint id = nns_BINCNK_DATAHEADER.Id; if (id != 1112492366U) { if (id == 1145980238U) { break; } if (id == 1280592206U) { binaryReader.BaseStream.Seek(num2 + ( long )nns_BINCNK_DATAHEADER.OfsMainData, 0); texfilelist = AppMain.NNS_TEXFILELIST.Read(binaryReader, num2); } } else { binaryReader.BaseStream.Seek(num2 + ( long )nns_BINCNK_DATAHEADER.OfsMainData, 0); _object = AppMain.NNS_OBJECT.Read(binaryReader, num2); } i--; binaryReader.BaseStream.Seek(num += ( long )(8 + nns_BINCNK_DATAHEADER.OfsNextId), 0); nns_BINCNK_DATAHEADER = AppMain.NNS_BINCNK_DATAHEADER.Read(binaryReader); } } }
public static int amMotionSetup(AppMain.ArrayPointer <AppMain.NNS_MOTION> motion, object _buf) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)_buf; using (MemoryStream memoryStream = new MemoryStream(ambChunk.array, ambChunk.offset, ambChunk.array.Length - ambChunk.offset)) { BinaryReader reader = new BinaryReader((Stream)memoryStream); AppMain.ArrayPointer <AppMain.NNS_MOTION> arrayPointer = motion; int num = 0; arrayPointer.SetPrimitive((AppMain.NNS_MOTION)null); AppMain.NNS_BINCNK_FILEHEADER bincnkFileheader = AppMain.NNS_BINCNK_FILEHEADER.Read(reader); long ofsData; reader.BaseStream.Seek(ofsData = (long)bincnkFileheader.OfsData, SeekOrigin.Begin); AppMain.NNS_BINCNK_DATAHEADER bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); long data0Pos = ofsData; reader.BaseStream.Seek((long)bincnkFileheader.OfsNOF0, SeekOrigin.Begin); AppMain.NNS_BINCNK_NOF0HEADER.Read(reader); int nChunk = bincnkFileheader.nChunk; while (nChunk > 0) { switch (bincnkDataheader.Id) { case 1095584078: case 1129138510: case 1330465102: reader.BaseStream.Seek(data0Pos + (long)bincnkDataheader.OfsMainData, SeekOrigin.Begin); arrayPointer.SetPrimitive(AppMain.NNS_MOTION.Read(reader, data0Pos)); ++arrayPointer; ++num; break; case 1145980238: goto label_6; } ++nChunk; reader.BaseStream.Seek(ofsData += (long)(8 + bincnkDataheader.OfsNextId), SeekOrigin.Begin); bincnkDataheader = AppMain.NNS_BINCNK_DATAHEADER.Read(reader); } label_6: return(num); } }
// Token: 0x0600170A RID: 5898 RVA: 0x000C9174 File Offset: 0x000C7374 public static AppMain.TXB_HEADER readTXBfile(object data) { AppMain.AmbChunk ambChunk = (AppMain.AmbChunk)data; return(AppMain.readTXBfile(ambChunk.array, ambChunk.offset)); }