Ejemplo n.º 1
0
            public static GClass1 ReadDecal(this SCMap scMap)
            {
                GClass1 gClass1 = new GClass1();

                gClass1.unk0   = scMap.ReadInt();
                gClass1.gEnum7 = scMap.ReadInt();

                int texturesCount = scMap.ReadInt();

                gClass1.texturePaths = new string[texturesCount];
                for (int i = 0; i < texturesCount; i++)
                {
                    int strLenght = scMap.ReadInt();
                    gClass1.texturePaths[i] = scMap.ReadString(strLenght);
                }

                gClass1.scale    = scMap.ReadVector3();
                gClass1.position = scMap.ReadVector3();
                Vector3 rot = scMap.ReadVector3();

                gClass1.rotation      = Quaternion.Euler(rot);
                gClass1.cutOffLOD     = scMap.ReadFloat();
                gClass1.nearCutOffLOD = scMap.ReadFloat();
                gClass1.id            = scMap.ReadInt();

                return(gClass1);
            }
Ejemplo n.º 2
0
            public static GClass70 ReadGClass70(this SCMap scMap)
            {
                GClass70 gClass70 = new GClass70();

                gClass70.int_0 = scMap.ReadInt();
                gClass70.group = scMap.ReadString();
                int lenght = scMap.ReadInt();

                gClass70.int_1 = scMap.ReadInts(lenght);
                return(gClass70);
            }
Ejemplo n.º 3
0
            public static MapHeader ReadMapHeader(this SCMap scMap)
            {
                MapHeader mapHeader = new MapHeader();

                mapHeader.containerName = scMap.ReadString(4);
                mapHeader.int0          = scMap.ReadInt();
                mapHeader.int1          = scMap.ReadInt();
                mapHeader.int2          = scMap.ReadInt();
                mapHeader.mapSize       = scMap.ReadVector2();
                mapHeader.int3          = scMap.ReadInt();
                mapHeader.sh4           = scMap.ReadShort();
                mapHeader.preview       = scMap.ReadDDS();
                mapHeader.version       = scMap.ReadInt();
                return(mapHeader);
            }
Ejemplo n.º 4
0
            public static DDSTexture ReadDDS(this SCMap scMap)
            {
                int length = scMap.ReadInt();

                byte[]     ddsBytes   = scMap.ReadBytes(length);
                DDSTexture ddsTexture = new DDSTexture(ddsBytes);

                return(ddsTexture);
            }
Ejemplo n.º 5
0
 public static Vector2 ReadVector2i(this SCMap scMap)
 {
     return(new Vector2(scMap.ReadInt(), scMap.ReadInt()));
 }