Пример #1
0
        public void Load(byte[] file, int address, uint imageBase, int count, GeometryType geometry_type)
        {
            for (int i = 0; i < count; i++)
            {
                Mesh new_mesh = new Mesh(file, address, imageBase, cur_attributes);

                if (new_mesh.Parameters.Exists(x => x.ParameterType == ParameterType.IndexAttributeFlags))
                {
                    cur_attributes = (IndexAttributeParameter)new_mesh.Parameters.Find(x => x.ParameterType == ParameterType.IndexAttributeFlags);
                }

                if (geometry_type == GeometryType.Translucent)
                {
                    TranslucentMeshes.Add(new_mesh);
                }
                else
                {
                    OpaqueMeshes.Add(new_mesh);
                }

                address += 16;
            }
        }