public static AppMain.NNS_MOTION Read(BinaryReader reader, long data0Pos) { AppMain.NNS_MOTION nnsMotion = new AppMain.NNS_MOTION(); nnsMotion.fType = reader.ReadUInt32(); nnsMotion.StartFrame = reader.ReadSingle(); nnsMotion.EndFrame = reader.ReadSingle(); nnsMotion.nSubmotion = reader.ReadInt32(); uint num = reader.ReadUInt32(); if (num != 0U) { long position = reader.BaseStream.Position; reader.BaseStream.Seek(data0Pos + (long)num, SeekOrigin.Begin); nnsMotion.pSubmotion = new AppMain.NNS_SUBMOTION[nnsMotion.nSubmotion]; for (int index = 0; index < nnsMotion.nSubmotion; ++index) { nnsMotion.pSubmotion[index] = AppMain.NNS_SUBMOTION.Read(reader, nnsMotion.fType & 31U, data0Pos); } reader.BaseStream.Seek(position, SeekOrigin.Begin); } nnsMotion.FrameRate = reader.ReadSingle(); nnsMotion.Reserved0 = reader.ReadUInt32(); nnsMotion.Reserved1 = reader.ReadUInt32(); return(nnsMotion); }
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); } } }
// Token: 0x060020F1 RID: 8433 RVA: 0x00140420 File Offset: 0x0013E620 public static AppMain.NNS_MOTION Read(BinaryReader reader, long data0Pos) { AppMain.NNS_MOTION nns_MOTION = new AppMain.NNS_MOTION(); nns_MOTION.fType = reader.ReadUInt32(); nns_MOTION.StartFrame = reader.ReadSingle(); nns_MOTION.EndFrame = reader.ReadSingle(); nns_MOTION.nSubmotion = reader.ReadInt32(); uint num = reader.ReadUInt32(); if (num != 0U) { long position = reader.BaseStream.Position; reader.BaseStream.Seek(data0Pos + ( long )(( ulong )num), 0); nns_MOTION.pSubmotion = new AppMain.NNS_SUBMOTION[nns_MOTION.nSubmotion]; for (int i = 0; i < nns_MOTION.nSubmotion; i++) { nns_MOTION.pSubmotion[i] = AppMain.NNS_SUBMOTION.Read(reader, nns_MOTION.fType & 31U, data0Pos); } reader.BaseStream.Seek(position, 0); } nns_MOTION.FrameRate = reader.ReadSingle(); nns_MOTION.Reserved0 = reader.ReadUInt32(); nns_MOTION.Reserved1 = reader.ReadUInt32(); return(nns_MOTION); }
private void amMotionMaterialGetFrames( AppMain.AMS_MOTION motion, int motion_id, out float start, out float end) { AppMain.NNS_MOTION nnsMotion = motion.mmtn[motion.mmotion_id]; start = nnsMotion.StartFrame; end = nnsMotion.EndFrame; }
private void amMotionGetFrames( AppMain.AMS_MOTION motion, int motion_id, out float start, out float end) { AppMain.NNS_MOTION nnsMotion = motion.mtnfile[motion_id >> 16].motion[motion_id & (int)ushort.MaxValue]; start = nnsMotion.StartFrame; end = nnsMotion.EndFrame; }
public NNS_MOTION(AppMain.NNS_MOTION motion) { this.fType = motion.fType; this.StartFrame = motion.StartFrame; this.EndFrame = motion.EndFrame; this.nSubmotion = motion.nSubmotion; this.pSubmotion = motion.pSubmotion; this.FrameRate = motion.FrameRate; this.Reserved0 = motion.Reserved0; this.Reserved1 = motion.Reserved1; }
public void Clear() { this._object = (AppMain.NNS_OBJECT)null; this.mtx = (AppMain.NNS_MATRIX)null; this.texlist = (AppMain.NNS_TEXLIST)null; this.sub_obj_type = 0U; this.flag = 0U; this.material_func = (AppMain.NNS_MATERIALCALLBACK_FUNC)null; this.motion = (AppMain.NNS_MOTION)null; this.frame = 0.0f; this.trslist = (AppMain.NNS_TRS[])null; this.mmotion = (AppMain.NNS_MOTION)null; this.mframe = 0.0f; }
public AppMain.NNS_MOTION Assign(AppMain.NNS_MOTION motion) { if (this != motion) { this.fType = motion.fType; this.StartFrame = motion.StartFrame; this.EndFrame = motion.EndFrame; this.nSubmotion = motion.nSubmotion; this.pSubmotion = motion.pSubmotion; this.FrameRate = motion.FrameRate; this.Reserved0 = motion.Reserved0; this.Reserved1 = motion.Reserved1; } return(this); }
// 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; } } }
// Token: 0x06001996 RID: 6550 RVA: 0x000E8374 File Offset: 0x000E6574 private uint nnCheckObjectClipMotion(AppMain.NNS_OBJECT obj, AppMain.NNS_MOTION mot, float frame, NNS_MATRIX basemtx) { AppMain.mppAssertNotImpl(); return(uint.MaxValue); }
// Token: 0x06001A46 RID: 6726 RVA: 0x000EB280 File Offset: 0x000E9480 private void amMotionGetFrames(AppMain.AMS_MOTION motion, int motion_id, out float start, out float end) { AppMain.NNS_MOTION nns_MOTION = motion.mtnfile[motion_id >> 16].motion[motion_id & 65535]; start = nns_MOTION.StartFrame; end = nns_MOTION.EndFrame; }