Пример #1
0
        public void LoadCameraFile(Course_MapCamera_bin camera, MK8MapCameraEditor editor)
        {
            MapCamera    = camera;
            ParentEditor = editor;

            CameraPoints.Add(new CameraPoint(camera.cameraData, true));
            CameraPoints.Add(new CameraPoint(camera.cameraData, false));

            //Try to load the mini map
            var folder = System.IO.Path.GetDirectoryName(camera.FilePath);

            if (System.IO.File.Exists($"{folder}/course_maptexture.bflim"))
            {
                var fileFormat = STFileLoader.OpenFileFormat($"{folder}/course_maptexture.bflim");
                if (fileFormat is BFLIM)
                {
                    MapCameraTexture = fileFormat as BFLIM;
                }
            }
            if (System.IO.File.Exists($"{folder}/course_maptexture.bntx"))
            {
                var fileFormat = STFileLoader.OpenFileFormat($"{folder}/course_maptexture.bntx");
                if (fileFormat is BNTX)
                {
                    MapCameraTexture = ((BNTX)fileFormat).Textures.Values.FirstOrDefault();
                }
            }
        }
Пример #2
0
        public void LoadFile(Course_MapCamera_bin mapCamera)
        {
            activeCameraFile = mapCamera;

            if (activeCameraFile.BigEndian)
            {
                beBtnRadio.Checked = true;
            }
            else
            {
                leBtnRadio.Checked = true;
            }

            stPropertyGrid1.LoadProperty(activeCameraFile.cameraData, OnPropertyChanged);
        }
        public void LoadFile(Course_MapCamera_bin mapCamera)
        {
            activeCameraFile = mapCamera;

            var cam = mapCamera.cameraData;

            if (activeCameraFile.BigEndian)
            {
                beBtnRadio.Checked = true;
            }
            else
            {
                leBtnRadio.Checked = true;
            }

            stPropertyGrid1.LoadProperty(activeCameraFile.cameraData, OnPropertyChanged);

            glControl2D1.AddCircle(new OpenTK.Vector2(cam.PositionX, cam.PositionZ));
            glControl2D1.AddCircle(new OpenTK.Vector2(cam.TargetX, cam.TargetZ));

            glControl2D1.AddRectangle(cam.BoundingWidth, cam.BoundingHeight, new OpenTK.Vector2(cam.PositionX, cam.PositionZ));
        }