Esempio n. 1
0
        private void OnYakChildElementSelected(YakChildTreeViewItem childEntry)
        {
            SelectedNodeImage = TexDecoder.Decode(childEntry.YakFile.FileData, childEntry.Value.TextureOffset + childEntry.Value.VifOffset,
                                                  childEntry.Value.VifLength - childEntry.Value.TextureOffset);
            var log = new StringLogger();

            _modelViewModel.Texture  = SelectedNodeImage;
            _modelViewModel.AnimData = null;
            Model model = new Model();

            model.meshList = VifDecoder.Decode(
                log,
                childEntry.YakFile.FileData,
                childEntry.Value.VifOffset,
                childEntry.Value.TextureOffset,
                SelectedNodeImage.PixelWidth,
                SelectedNodeImage.PixelHeight);
            _modelViewModel.VifModel = model;

            LogText += log.ToString();

            _window.tabControl.SelectedIndex = 1; // Model View
            _window.ResetCamera();
            _window.SetViewportText(1, childEntry.Text + " of " + ((YakTreeViewItem)childEntry.Parent).Text, "");
        }
        private void OnYakChildElementSelected(YakChildTreeViewItem childEntry)
        {
            SelectedNodeImage = TexDecoder.Decode(childEntry.YakFile.FileData, childEntry.Value.TextureOffset + childEntry.Value.VifOffset,
                childEntry.Value.VifLength - childEntry.Value.TextureOffset);
            var log = new StringLogger();
            _modelViewModel.Texture = SelectedNodeImage;
            _modelViewModel.AnimData = null;
            Model model = new Model();
            model.meshList = VifDecoder.Decode(
                log,
                childEntry.YakFile.FileData,
                childEntry.Value.VifOffset,
                childEntry.Value.TextureOffset,
                SelectedNodeImage.PixelWidth,
                SelectedNodeImage.PixelHeight);
            _modelViewModel.VifModel = model;

            LogText += log.ToString();

            _window.tabControl.SelectedIndex = 1; // Model View
            _window.ResetCamera();
            _window.SetViewportText(1, childEntry.Text + " of " + ((YakTreeViewItem)childEntry.Parent).Text, "");
        }