示例#1
0
        internal static W3dMorphAnimation Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dMorphAnimation();

                ParseChunks(reader, context.CurrentEndPosition, chunkType =>
                {
                    switch (chunkType)
                    {
                    case W3dChunkType.W3D_CHUNK_MORPHANIM_HEADER:
                        result.Header = W3dMorphAnimHeader.Parse(reader, context);
                        break;

                    case W3dChunkType.W3D_CHUNK_MORPHANIM_CHANNEL:
                        result.AnimChannel = W3dMorphAnimChannel.Parse(reader, context);
                        break;

                    case W3dChunkType.W3D_CHUNK_MORPHANIM_PIVOTCHANNELDATA:
                        result.PivotChannelData = W3dMorphAnimPivotChannelData.Parse(reader, context);
                        break;

                    default:
                        throw CreateUnknownChunkException(chunkType);
                    }
                });

                return result;
            }));
        }
示例#2
0
        internal static W3dMorphAnimPivotChannelData Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dMorphAnimPivotChannelData
                {
                    UnknownBytes = reader.ReadBytes((int)context.CurrentEndPosition - (int)reader.BaseStream.Position)
                };

                // TODO: Determine W3dMorphAnimPivotChannelData Chunk Structure (Currently Unknown)

                return result;
            }));
        }