internal override void Read(ResourceReader reader)
        {
            Field140 = reader.ReadInt32();
            Field13C = reader.ReadSingle();
            Field138 = reader.ReadSingle();
            Field134 = reader.ReadSingle();
            Field130 = reader.ReadSingle();

            int entry1Count = reader.ReadInt32(); // r28
            int entry2Count = reader.ReadInt32(); // r21
            int entry3Count = reader.ReadInt32(); // r20

            for (int i = 0; i < entry1Count; i++)
            {
                var entry = new ChunkType000100F9Entry1();
                entry.Field34 = reader.ReadSingle();
                entry.Field38 = reader.ReadSingle();

                if (Version > 0x1104120)
                {
                    entry.Field3C = reader.ReadSingle();
                    entry.Field40 = reader.ReadSingle();
                }
                else
                {
                    entry.Field38 += 20.0f;
                    entry.Field3C  = 0;
                    entry.Field40  = 1.0f;
                }

                if (reader.ReadBoolean())
                {
                    entry.NodeName = reader.ReadStringWithHash(Version);
                }
                else
                {
                    entry.Field10 = reader.ReadSingle();
                    entry.Field08 = reader.ReadSingle();
                    entry.Field04 = reader.ReadSingle();
                }

                Entry1List.Add(entry);
            }

            for (int i = 0; i < entry2Count; i++)
            {
                var entry = new ChunkType000100F9Entry2();

                entry.Field94 = reader.ReadInt16();

                if (entry.Field94 == 0)
                {
                    entry.Field84 = reader.ReadSingle();
                }
                else if (entry.Field94 == 1)
                {
                    entry.Field84 = reader.ReadSingle();
                    entry.Field88 = reader.ReadSingle();
                }

                entry.Field8C = reader.ReadMatrix4x4();
                if (reader.ReadBoolean())
                {
                    entry.NodeName = reader.ReadStringWithHash(Version);
                }

                Entry2List.Add(entry);
            }

            // r24 = 0x1104120

            for (int i = 0; i < entry3Count; i++)
            {
                var entry = new ChunkType000100F9Entry3();
                entry.Field00 = reader.ReadSingle();
                entry.Field04 = reader.ReadSingle();

                if (Version <= 0x1104120)
                {
                    entry.Field0C = reader.ReadInt16();
                    entry.Field0E = reader.ReadInt16();
                }
                else
                {
                    entry.Field08 = reader.ReadSingle();
                    entry.Field0C = reader.ReadInt16();
                    entry.Field0E = reader.ReadInt16();
                }

                Entry3List.Add(entry);
            }
        }
示例#2
0
 public Entry2 Add(Entry2 it)
 {
     Entry2List.Add(it);
     return(it);
 }