예제 #1
0
        protected override bool ReadInternal()
        {
            // Header
            Reader.BaseStream.Position += 4;

            Version      = new GenericFileFormatVersion(Reader);
            Width        = Reader.ReadUInt32();
            Height       = Reader.ReadUInt32();
            Ratio        = Reader.ReadUInt32();
            TextureCount = Reader.ReadUInt32();
            TextureSize  = Reader.ReadUInt32();

            Textures = new RoGndTextureData[TextureCount];
            for (int i = 0; i < TextureCount; i++)
            {
                Textures[i] = new RoGndTextureData(Reader, Version, mTextureRootPath);
            }

            LightmapCount = Reader.ReadInt32();

            Grid = new RoGndGridData(Reader, Version);

            Lightmaps = new RoGndLitghmapData[LightmapCount];
            for (int i = 0; i < LightmapCount; i++)
            {
                Lightmaps[i] = new RoGndLitghmapData(Reader, Version);
            }


            TileCount = Reader.ReadInt32();
            Tiles     = new RoGndTileData[TileCount];
            for (int i = 0; i < TileCount; i++)
            {
                Tiles[i] = new RoGndTileData(Reader, Version);
            }

            CubeCount = Width * Height;
            Cubes     = new RoGndCubeData[CubeCount];
            for (int i = 0; i < CubeCount; i++)
            {
                Cubes[i] = new RoGndCubeData(Reader, Version);
            }
            return(true);
        }
예제 #2
0
		protected override bool ReadInternal() {
			// Header
			Reader.BaseStream.Position += 4;

			Version = new GenericFileFormatVersion(Reader);
			Width = Reader.ReadUInt32();
			Height = Reader.ReadUInt32();
			Ratio = Reader.ReadUInt32();
			TextureCount = Reader.ReadUInt32();
			TextureSize = Reader.ReadUInt32();

			Textures = new RoGndTextureData[TextureCount];
			for (int i = 0; i < TextureCount; i++) {
				Textures[i] = new RoGndTextureData(Reader, Version, mTextureRootPath);
			}

			LightmapCount = Reader.ReadInt32();

			Grid = new RoGndGridData(Reader, Version);

			Lightmaps = new RoGndLitghmapData[LightmapCount];
			for (int i = 0; i < LightmapCount; i++) {
				Lightmaps[i] = new RoGndLitghmapData(Reader, Version);
			}


			TileCount = Reader.ReadInt32();
			Tiles = new RoGndTileData[TileCount];
			for (int i = 0; i < TileCount; i++) {
				Tiles[i] = new RoGndTileData(Reader, Version);
			}

			CubeCount = Width * Height;
			Cubes = new RoGndCubeData[CubeCount];
			for (int i = 0; i < CubeCount; i++) {
				Cubes[i] = new RoGndCubeData(Reader, Version);
			}
			return true;
		}