public Event(BinaryReader br) { TotalSize = br.ReadUInt32(); long end = br.BaseStream.Position + TotalSize; ObjSize = br.ReadUInt32(); Name = br.ReadCString(Constants.SizeName); ObjectId = br.ReadInt32(); ParentId = br.ReadInt32(); Flags = (GENOBJECTFLAGS)br.ReadUInt32(); LoadTracks(br); while (br.BaseStream.Position < end && !br.AtEnd()) { string tagname = br.ReadString(4); switch (tagname) { case "KEVT": EventKeys = new SimpleTrack(br, false); break; default: br.BaseStream.Position -= 4; return; } } }
public Layer(BinaryReader br, int priorityplane) { PriorityPlane = priorityplane; TotalSize = br.ReadUInt32(); long end = br.BaseStream.Position + TotalSize; BlendMode = (MDLTEXOP)br.ReadInt32(); Flags = (MDLGEO)br.ReadUInt32(); TextureId = br.ReadUInt32(); TextureAnimationId = br.ReadInt32(); CoordId = br.ReadUInt32(); Alpha = br.ReadSingle(); while (br.BaseStream.Position < end && !br.AtEnd()) { string tagname = br.ReadString(4); switch (tagname) { case "KMTA": AlphaKeys = new Track <float>(br); break; case "KMTF": FlipKeys = new SimpleTrack(br, true); break; default: br.BaseStream.Position -= 4; return; } } }
public RibbonEmitter(BinaryReader br) { TotalSize = br.ReadUInt32(); long end = br.BaseStream.Position + TotalSize; ObjSize = br.ReadUInt32(); Name = br.ReadCString(Constants.SizeName); ObjectId = br.ReadInt32(); ParentId = br.ReadInt32(); Flags = (GENOBJECTFLAGS)br.ReadUInt32(); LoadTracks(br); NodeSize = br.ReadUInt32(); HeightAbove = br.ReadSingle(); HeightBelow = br.ReadSingle(); Alpha = br.ReadSingle(); Color = new CVector3(br); Lifetime = br.ReadSingle(); TextureSlot = br.ReadUInt32(); EdgesPerSecond = br.ReadUInt32(); TextureRows = br.ReadUInt32(); TextureColumns = br.ReadUInt32(); MaterialId = br.ReadUInt32(); Gravity = br.ReadSingle(); while (br.BaseStream.Position < end && !br.AtEnd()) { string tagname = br.ReadString(4); switch (tagname) { case "KRHA": HeightAboveKeys = new Track <float>(br); break; case "KRHB": HeightBelowKeys = new Track <float>(br); break; case "KRAL": AlphaKeys = new Track <float>(br); break; case "KVIS": VisibilityKeys = new Track <float>(br); break; case "KRCO": ColorKeys = new Track <CVector3>(br, true); break; case "KRTX": TextureKeys = new SimpleTrack(br, true); break; default: br.BaseStream.Position -= 4; return; } } }