Skip to content

Commit

Permalink
Somehow every file was updated....
Browse files Browse the repository at this point in the history
/shrug
  • Loading branch information
SuperHackio committed Feb 8, 2021
1 parent f48a7db commit 79df88b
Show file tree
Hide file tree
Showing 48 changed files with 2,591 additions and 2,992 deletions.
14 changes: 7 additions & 7 deletions SpotLight/EditorDrawables/AreaObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
using GL_EditorFramework.Interfaces;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using SpotLight.Database;
using SpotLight.Level;
using SpotLight.ObjectRenderers;
using Spotlight.Database;
using Spotlight.Level;
using Spotlight.ObjectRenderers;
using System;
using System.Collections;
using System.Collections.Generic;
Expand All @@ -19,10 +19,10 @@
using static BYAML.ByamlNodeWriter;
using static GL_EditorFramework.EditorDrawables.EditorSceneBase;
using static GL_EditorFramework.EditorDrawables.EditorSceneBase.PropertyCapture;
using static SpotLight.EditorDrawables.General3dWorldObject;
using static Spotlight.EditorDrawables.General3dWorldObject;
using WinInput = System.Windows.Input;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
public class AreaObject : TransformableObject, I3dWorldObject
{
Expand Down Expand Up @@ -263,7 +263,7 @@ public override void Draw(GL_ControlModern control, Pass pass, EditorSceneBase e
{
if (!Selected)
{
if (!SpotLight.Properties.Settings.Default.DrawAreas)
if (!Spotlight.Properties.Settings.Default.DrawAreas)
{
control.SkipPickingColors(1);
return;
Expand Down Expand Up @@ -364,7 +364,7 @@ public void DoUI(IObjectUIControl control)
#if ODYSSEY
control.PlainText(Convert.ToString(area.ScenarioBitField, 2));
#endif
if (SpotLight.Properties.Settings.Default.AllowIDEdits)
if (Spotlight.Properties.Settings.Default.AllowIDEdits)
area.ID = control.TextInput(area.ID, "Object ID");
else
control.TextInput(area.ID, "Object ID");
Expand Down
14 changes: 7 additions & 7 deletions SpotLight/EditorDrawables/General3dWorldObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using GL_EditorFramework.Interfaces;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using SpotLight.Level;
using SpotLight.Database;
using Spotlight.Level;
using Spotlight.Database;
using Syroot.BinaryData;
using System;
using System.Collections;
Expand All @@ -20,9 +20,9 @@
using static BYAML.ByamlNodeWriter;
using static GL_EditorFramework.EditorDrawables.EditorSceneBase;
using WinInput = System.Windows.Input;
using SpotLight.ObjectRenderers;
using Spotlight.ObjectRenderers;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
/// <summary>
/// General object for SM3DW
Expand Down Expand Up @@ -317,13 +317,13 @@ public override void Draw(GL_ControlModern control, Pass pass, EditorSceneBase e
{
if (!Selected)
{
if (!SpotLight.Properties.Settings.Default.DrawSkyBoxes && ClassName == "SkyProjection")
if (!Spotlight.Properties.Settings.Default.DrawSkyBoxes && ClassName == "SkyProjection")
{
control.SkipPickingColors(1);
return;
}

if (!SpotLight.Properties.Settings.Default.DrawTransparentWalls && ObjectName.Contains("TransparentWall"))
if (!Spotlight.Properties.Settings.Default.DrawTransparentWalls && ObjectName.Contains("TransparentWall"))
{
control.SkipPickingColors(1);
return;
Expand Down Expand Up @@ -588,7 +588,7 @@ public void DoUI(IObjectUIControl control)
#if ODYSSEY
control.PlainText(Convert.ToString(obj.ScenarioBitField, 2));
#endif
if (SpotLight.Properties.Settings.Default.AllowIDEdits)
if (Spotlight.Properties.Settings.Default.AllowIDEdits)
obj.ID = control.TextInput(obj.ID, "Object ID");
else
control.TextInput(obj.ID, "Object ID");
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/I3dWorldObject.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using BYAML;
using GL_EditorFramework.EditorDrawables;
using OpenTK;
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static BYAML.ByamlNodeWriter;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
/// <summary>
/// Interface object for SM3DW Objects
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/LinkingTool3DWScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
using GL_EditorFramework;
using OpenTK;
using WinInput = System.Windows.Input;
using SpotLight.Level;
using Spotlight.Level;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
public class DestinationChangedEventArgs : EventArgs
{
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/ObjectUtils.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using GL_EditorFramework;
using OpenTK;
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static BYAML.ByamlIterator;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
public static class ObjectUtils
{
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/Rail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using GL_EditorFramework;
using GL_EditorFramework.EditorDrawables;
using OpenTK;
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -12,7 +12,7 @@
using static GL_EditorFramework.EditorDrawables.EditorSceneBase;
using static GL_EditorFramework.EditorDrawables.EditorSceneBase.PropertyCapture;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
public class Rail : Path<RailPoint>, I3dWorldObject
{
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/SM3DWorldScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using GL_EditorFramework.Interfaces;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Drawing;
Expand All @@ -19,7 +19,7 @@
using WinInput = System.Windows.Input;
using GL_EditorFramework;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{
public class SM3DWorldScene : EditorSceneBase
{
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/EditorDrawables/ZonePlacement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using GL_EditorFramework.GL_Core;
using GL_EditorFramework.Interfaces;
using OpenTK;
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -12,7 +12,7 @@
using static GL_EditorFramework.EditorDrawables.EditorSceneBase;
using WinInput = System.Windows.Input;

namespace SpotLight.EditorDrawables
namespace Spotlight.EditorDrawables
{


Expand Down
6 changes: 3 additions & 3 deletions SpotLight/GUI/AddObjectForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions SpotLight/GUI/AddObjectForm.HandlerGeneration.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using OpenTK;
using SpotLight.Database;
using SpotLight.EditorDrawables;
using SpotLight.Level;
using Spotlight.Database;
using Spotlight.EditorDrawables;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace SpotLight.GUI
namespace Spotlight.GUI
{
public partial class AddObjectForm : Form
{
Expand Down
14 changes: 7 additions & 7 deletions SpotLight/GUI/AddObjectForm.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using BrightIdeasSoftware;
using OpenTK;
using SpotLight.Database;
using SpotLight.EditorDrawables;
using SpotLight.Level;
using SpotLight.Properties;
using Spotlight.Database;
using Spotlight.EditorDrawables;
using Spotlight.Level;
using Spotlight.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand All @@ -14,10 +14,10 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static SpotLight.GUI.PathShapeSelector;
using static SpotLight.ObjectParameterForm;
using static Spotlight.GUI.PathShapeSelector;
using static Spotlight.ObjectParameterForm;

namespace SpotLight.GUI
namespace Spotlight.GUI
{

public partial class AddObjectForm : Form
Expand Down
4 changes: 2 additions & 2 deletions SpotLight/GUI/AddZoneForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using SpotLight.Level;
using Spotlight.Level;
using System;
using System.Collections.Generic;
using System.IO;
Expand All @@ -7,7 +7,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SpotLight
namespace Spotlight
{
class AddZoneForm : Form
{
Expand Down
6 changes: 3 additions & 3 deletions SpotLight/GUI/LevelEditorForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 24 additions & 24 deletions SpotLight/GUI/LevelEditorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using GL_EditorFramework.EditorDrawables;
using Microsoft.WindowsAPICodePack.Dialogs;
using OpenTK;
using SpotLight.EditorDrawables;
using Spotlight.EditorDrawables;
using System;
using System.Collections.Generic;
using System.Data;
Expand All @@ -12,19 +12,19 @@
using System.Text;
using System.Windows.Forms;
using static GL_EditorFramework.Framework;
using SpotLight.Database;
using SpotLight.Level;
using Spotlight.Database;
using Spotlight.Level;
using System.Threading;
using static GL_EditorFramework.EditorDrawables.EditorSceneBase;
using System.Reflection;
using SpotLight.ObjectRenderers;
using SpotLight.GUI;
using Spotlight.ObjectRenderers;
using Spotlight.GUI;
using System.Drawing;
using SARCExt;
using BYAML;
using Syroot.BinaryData;

namespace SpotLight
namespace Spotlight
{
public partial class LevelEditorForm : Form
{
Expand Down Expand Up @@ -389,28 +389,28 @@ private void SplitContainer2_Panel2_Click(object sender, EventArgs e)
Debugger.Break();
return;

SharpGLTF.Scenes.SceneBuilder scene = new SharpGLTF.Scenes.SceneBuilder(currentScene.ToString());
//SharpGLTF.Scenes.SceneBuilder scene = new SharpGLTF.Scenes.SceneBuilder(currentScene.ToString());

SharpGLTF.Materials.MaterialBuilder material = new SharpGLTF.Materials.MaterialBuilder("Default");
//SharpGLTF.Materials.MaterialBuilder material = new SharpGLTF.Materials.MaterialBuilder("Default");

foreach (General3dWorldObject _obj in currentScene.SelectedObjects)
{
string mdlName = string.IsNullOrEmpty(_obj.ModelName) ? _obj.ObjectName : _obj.ModelName;
//foreach (General3dWorldObject _obj in currentScene.SelectedObjects)
//{
// string mdlName = string.IsNullOrEmpty(_obj.ModelName) ? _obj.ObjectName : _obj.ModelName;

if(BfresModelRenderer.TryGetModel(mdlName, out BfresModelRenderer.CachedModel cachedModel))
{
scene.AddRigidMesh(cachedModel.VaosToMesh(LevelGLControlModern, material), mdlName,
System.Numerics.Matrix4x4.CreateScale(_obj.Scale.X, _obj.Scale.Y, _obj.Scale.Z) *
System.Numerics.Matrix4x4.CreateRotationX(_obj.Rotation.X / 180f * Framework.PI) *
System.Numerics.Matrix4x4.CreateRotationY(_obj.Rotation.Y / 180f * Framework.PI) *
System.Numerics.Matrix4x4.CreateRotationZ(_obj.Rotation.Z / 180f * Framework.PI) *
System.Numerics.Matrix4x4.CreateTranslation(_obj.Position.X, _obj.Position.Y, _obj.Position.Z)
);
}
}
// if(BfresModelRenderer.TryGetModel(mdlName, out BfresModelRenderer.CachedModel cachedModel))
// {
// scene.AddRigidMesh(cachedModel.VaosToMesh(LevelGLControlModern, material), mdlName,
// System.Numerics.Matrix4x4.CreateScale(_obj.Scale.X, _obj.Scale.Y, _obj.Scale.Z) *
// System.Numerics.Matrix4x4.CreateRotationX(_obj.Rotation.X / 180f * Framework.PI) *
// System.Numerics.Matrix4x4.CreateRotationY(_obj.Rotation.Y / 180f * Framework.PI) *
// System.Numerics.Matrix4x4.CreateRotationZ(_obj.Rotation.Z / 180f * Framework.PI) *
// System.Numerics.Matrix4x4.CreateTranslation(_obj.Position.X, _obj.Position.Y, _obj.Position.Z)
// );
// }
//}

var model = scene.ToGltf2();
model.SaveGLTF(currentScene.ToString()+".gltf");
//var model = scene.ToGltf2();
//model.SaveGLTF(currentScene.ToString()+".gltf");
}

private void Scene_ObjectsMoved(object sender, EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion SpotLight/GUI/LevelParameterForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion SpotLight/GUI/LevelParameterForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SpotLight
namespace Spotlight
{
public partial class LevelParameterForm : Form
{
Expand Down
2 changes: 1 addition & 1 deletion SpotLight/GUI/LevelSelectForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79df88b

Please sign in to comment.