Esempio n. 1
0
        internal static W3dMorphAnimChannel Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dMorphAnimChannel();

                ParseChunks(reader, context.CurrentEndPosition, chunkType =>
                {
                    switch (chunkType)
                    {
                    case W3dChunkType.W3D_CHUNK_MORPHANIM_POSENAME:
                        result.PoseName = W3dMorphAnimPoseName.Parse(reader, context);
                        break;

                    case W3dChunkType.W3D_CHUNK_MORPHANIM_KEYDATA:
                        result.KeyData = W3dMorphAnimKeyData.Parse(reader, context);
                        break;

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

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

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

                return result;
            }));
        }