Example #1
0
        public void Load(Stream stream)
        {
            CanSave = true;

            IsSaveDialog = IFileInfo != null && IFileInfo.InArchive;

            aampFile = AampFile.LoadFile(stream);
        }
Example #2
0
        static void Main(string[] args)
        {
            var aamp = "g3ds_packunslider.bgenv";

            AampFile file = AampFile.LoadFile(aamp);

            GetChildNodes(file.RootNode);
            ToYaml(file);
            file.Save("New.aamp");

            Console.Read();
        }
Example #3
0
        public AglLightMap(Stream stream)
        {
            var aamp = AampFile.LoadFile(stream);

            LightAreas.Clear();

            foreach (var ob in aamp.RootNode.paramObjects)
            {
                if (ob.HashString == "lut_param")
                {
                    //32 curves.
                    for (int i = 0; i < 32; i++)
                    {
                        LUTParameter param = new LUTParameter();
                        param.Name      = ob.GetEntryValue <StringEntry>($"name{i}").ToString();
                        param.Intensity = GetCurve(ob, $"intensity{i}")[0];
                        LutTable[i]     = param;
                    }
                }
            }
            foreach (var lightAreaParam in aamp.RootNode.childParams)
            {
                var lightArea = new LightArea();
                LightAreas.Add(lightArea);

                foreach (var ob in lightAreaParam.paramObjects)
                {
                    if (ob.HashString == "setting")
                    {
                        lightArea.Settings = new LightSettings(ob);
                    }
                }
                foreach (var c in lightAreaParam.childParams)
                {
                    if (c.HashString == "env_obj_ref_array")
                    {
                        foreach (var childObj in c.paramObjects)
                        {
                            lightArea.Lights.Add(new LightEnvObject(childObj));
                        }
                    }
                }
            }
            Console.WriteLine();
        }
Example #4
0
        private ColorCorrection LoadColorCorrection(Stream file)
        {
            var aamp = AampFile.LoadFile(file);

            return(new ColorCorrection(aamp));
        }
Example #5
0
        private CubeMapGraphics LoadCubemapGraphics(Stream file)
        {
            var aamp = AampFile.LoadFile(file);

            return(new CubeMapGraphics(aamp));
        }
Example #6
0
        private ShadowGraphics LoadShadowGraphics(Stream file)
        {
            var aamp = AampFile.LoadFile(file);

            return(new ShadowGraphics(aamp));
        }
Example #7
0
        private EnvironmentGraphics LoadEnvironmentGraphics(Stream file)
        {
            var aamp = AampFile.LoadFile(file);

            return(new EnvironmentGraphics(aamp));
        }
 public static void Prepare(byte[] fileData)
 {
     ProbeLighting = new ProbeLighting();
     ProbeLighting.LoadValues(AampFile.LoadFile(new System.IO.MemoryStream(fileData)));
 }