Пример #1
0
 private void clearObjectONEsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DFFRenderer.clearObjectONEFiles();
 }
Пример #2
0
        public static void SetTextureForAnimation(string diffuseMapName, string newMapName, BSPRenderer bspRenderer, DFFRenderer dffRenderer)
        {
            List <RenderWareModelFile> models = new List <RenderWareModelFile>();

            models.AddRange(bspRenderer.BSPList);
            models.AddRange(bspRenderer.ShadowColBSPList);
            models.AddRange(dffRenderer.DFFModels.Values);

            foreach (RenderWareModelFile m in models)
            {
                foreach (SharpMesh mesh in m.meshList)
                {
                    foreach (SharpSubSet sub in mesh.SubSets)
                    {
                        if (sub.DiffuseMapName == diffuseMapName)
                        {
                            sub.DiffuseMap = Textures[newMapName];
                        }
                    }
                }
            }
        }
Пример #3
0
 private void addObjectONEToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DFFRenderer.importObjectONEFile();
 }
Пример #4
0
        public static void applyPaths(Paths paths)
        {
            if (paths.isShadow)
            {
                if (paths.levelEditorPath != null)
                {
                    if (File.Exists(paths.levelEditorPath))
                    {
                        Program.levelEditor.OpenONEFolder(paths.levelEditorPath);
                    }
                    else
                    {
                        MessageBox.Show(paths.levelEditorPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            else
            {
                if (paths.configCCpath != null)
                {
                    if (File.Exists(paths.configCCpath))
                    {
                        Program.configEditor.ConfigEditorOpen(paths.configCCpath);
                    }
                    else
                    {
                        MessageBox.Show(paths.configCCpath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }

                if (paths.levelEditorPath != null)
                {
                    if (File.Exists(paths.levelEditorPath))
                    {
                        Program.levelEditor.OpenONEFile(paths.levelEditorPath);
                    }
                    else
                    {
                        MessageBox.Show(paths.levelEditorPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }

                if (paths.visibilityPath != null)
                {
                    if (File.Exists(paths.visibilityPath))
                    {
                        Program.levelEditor.initVisibilityEditor(false, paths.visibilityPath);
                    }
                    else
                    {
                        MessageBox.Show(paths.visibilityPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }

                if (paths.collisionEditorPath != null)
                {
                    if (File.Exists(paths.collisionEditorPath))
                    {
                        Program.collisionEditor.Open(paths.collisionEditorPath);
                    }
                    else
                    {
                        MessageBox.Show(paths.collisionEditorPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }

            if (paths.layoutEditorPath != null)
            {
                if (File.Exists(paths.layoutEditorPath))
                {
                    Program.layoutEditor.OpenLayoutFile(paths.layoutEditorPath);
                }
                else
                {
                    MessageBox.Show(paths.layoutEditorPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            if (paths.cameraEditorPath != null)
            {
                if (File.Exists(paths.cameraEditorPath))
                {
                    Program.cameraEditor.open(paths.cameraEditorPath);
                }
                else
                {
                    MessageBox.Show(paths.cameraEditorPath + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            foreach (string s in paths.DFFONEPaths)
            {
                if (File.Exists(s))
                {
                    DFFRenderer.filePaths.Add(s);
                    DFFRenderer.AddDFFFiles(s);
                }
                else
                {
                    MessageBox.Show(s + " could not be loaded", "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }