commit cc4fee7a34972940e4ce95a9723f222e7b5da0c2 Author: Avery Norris Date: Mon Jan 19 13:56:50 2026 -0500 Initial commit diff --git a/.idea/.idea.Awperative/.idea/.gitignore b/.idea/.idea.Awperative/.idea/.gitignore new file mode 100644 index 0000000..5c63dfb --- /dev/null +++ b/.idea/.idea.Awperative/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/.idea.Awperative.iml +/contentModel.xml +/projectSettingsUpdater.xml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.Awperative/.idea/indexLayout.xml b/.idea/.idea.Awperative/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.Awperative/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.Awperative/.idea/vcs.xml b/.idea/.idea.Awperative/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.Awperative/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Awperative.sln b/Awperative.sln new file mode 100644 index 0000000..b046489 --- /dev/null +++ b/Awperative.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Awperative", "Awperative\Awperative.csproj", "{0130E4FD-B03B-4A9F-8431-B602C98BE466}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0130E4FD-B03B-4A9F-8431-B602C98BE466}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0130E4FD-B03B-4A9F-8431-B602C98BE466}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0130E4FD-B03B-4A9F-8431-B602C98BE466}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0130E4FD-B03B-4A9F-8431-B602C98BE466}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Awperative.sln.DotSettings.user b/Awperative.sln.DotSettings.user new file mode 100644 index 0000000..13e04fa --- /dev/null +++ b/Awperative.sln.DotSettings.user @@ -0,0 +1,4 @@ + + <AssemblyExplorer> + <Assembly Path="/Users/averynorris/Programming/Test/Awperative/Awperative/bin/Debug/net8.0/Awperative.dll" /> +</AssemblyExplorer> \ No newline at end of file diff --git a/Awperative/.config/dotnet-tools.json b/Awperative/.config/dotnet-tools.json new file mode 100644 index 0000000..b345335 --- /dev/null +++ b/Awperative/.config/dotnet-tools.json @@ -0,0 +1,30 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-mgcb-editor": { + "version": "3.8.4", + "commands": [ + "mgcb-editor" + ] + }, + "dotnet-mgcb-editor-linux": { + "version": "3.8.4", + "commands": [ + "mgcb-editor-linux" + ] + }, + "dotnet-mgcb-editor-windows": { + "version": "3.8.4", + "commands": [ + "mgcb-editor-windows" + ] + }, + "dotnet-mgcb-editor-mac": { + "version": "3.8.4", + "commands": [ + "mgcb-editor-mac" + ] + } + } +} \ No newline at end of file diff --git a/Awperative/Awperative.csproj b/Awperative/Awperative.csproj new file mode 100644 index 0000000..ab81ce1 --- /dev/null +++ b/Awperative/Awperative.csproj @@ -0,0 +1,11 @@ + + + net8.0 + Library + + + + All + + + \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Bodies/Components.cs b/Awperative/Kernel/Entities/Bodies/Components.cs new file mode 100644 index 0000000..b655d27 --- /dev/null +++ b/Awperative/Kernel/Entities/Bodies/Components.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; + + +namespace Gravity.Kernel; + +public sealed partial class Body +{ + + public Generic AddComponent(object[] args) where Generic : Component { + + if (SingletonExists()) + throw new Exception("Cannot add component when singleton exists!"); + + Generic component = (Generic) Activator.CreateInstance(typeof(Generic), args); + + if(component == null) + throw new Exception("Failed to create component!"); + + components.Add(component); + component.Initiate(this); + + ComponentCreatedEvent?.Invoke(this, new ComponentCreateEvent(component, this, scene)); + + return component; + } + + public Generic AddComponent() where Generic : Component { + + if (SingletonExists()) + throw new Exception("Cannot add component when singleton exists!"); + + Generic component = (Generic) Activator.CreateInstance(typeof(Generic)); + + if(component == null) + throw new Exception("Failed to create component!"); + + components.Add(component); + component.Initiate(this); + + ComponentCreatedEvent?.Invoke(this, new ComponentCreateEvent(component, this, scene)); + + return component; + } + + public Generic[] GetComponents() where Generic : Component { + + List foundComponents = components.FindAll(x => x.GetType() == typeof(Generic)); + + if(foundComponents.Count == 0) + throw new Exception("Scene has no components of that type!"); + + return foundComponents.ToArray() as Generic[]; + } + + public Generic GetComponent() where Generic : Component { + + Component foundComponent = components.Find(x => x.GetType() == typeof(Generic)); + + if(foundComponent == null) + throw new Exception("Scene has no components of that type!"); + + return foundComponent as Generic; + } + + public void RemoveComponent(Component __component) { + __component.End(); + components.Remove(__component); + } + + public void RemoveComponents() where Generic : Component { + + Component[] foundComponents = GetComponents(); + + if(foundComponents.Length == 0) + throw new Exception("Scene has no components of that type!"); + + foreach (Component component in foundComponents) { + component.End(); + components.Remove(component); + ComponentDestroyedEvent?.Invoke(this, new ComponentDestroyEvent(component, this, scene)); + } + } + + public void RemoveComponent() where Generic : Component { + + Component foundComponent = GetComponent(); + + if(foundComponent == null) + throw new Exception("Scene has no components of that type!"); + + foundComponent.End(); + components.Remove(foundComponent); + ComponentDestroyedEvent?.Invoke(this ,new ComponentDestroyEvent(foundComponent, this, scene)); + } + + public Generic FindSingleton() where Generic : Component + { + foreach (Component component in components) + if (component.GetType() == typeof(Generic)) + if(component.EnforceSingleton) + return (Generic) component; + else + throw new Exception("Component is not a singleton"); + + throw new Exception("Component not found"); + return null; + } + + public bool SingletonExists() where Generic : Component + { + + foreach (Component __component in components) + if (__component.GetType() == typeof(Generic)) + if (__component.EnforceSingleton) + return true; + else + return false; + + return false; + } + + public void RecompileComponentOrder() { + components.Sort((a, b) => a.Priority.CompareTo(b.Priority)); + components.Reverse(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Bodies/Core.cs b/Awperative/Kernel/Entities/Bodies/Core.cs new file mode 100644 index 0000000..bc8dd47 --- /dev/null +++ b/Awperative/Kernel/Entities/Bodies/Core.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; + + +namespace Gravity.Kernel; + +public sealed partial class Body +{ + + public readonly Scene scene; + public readonly Transform transform = new Transform(); + + public readonly List tags = []; + + public readonly List components = []; + + + public Body(Scene __scene) { + scene = __scene; + } + + public Body(Scene __scene, Transform __transform) { + scene = __scene; + transform = __transform; + } + + + //todo: make internal +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Bodies/Events.cs b/Awperative/Kernel/Entities/Bodies/Events.cs new file mode 100644 index 0000000..45b3bef --- /dev/null +++ b/Awperative/Kernel/Entities/Bodies/Events.cs @@ -0,0 +1,12 @@ +using System; + + +namespace Gravity.Kernel; + +public sealed partial class Body +{ + //todo: add component events to scene in v5 + + public event EventHandler ComponentCreatedEvent; + public event EventHandler ComponentDestroyedEvent; +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Bodies/Time.cs b/Awperative/Kernel/Entities/Bodies/Time.cs new file mode 100644 index 0000000..25d9ccd --- /dev/null +++ b/Awperative/Kernel/Entities/Bodies/Time.cs @@ -0,0 +1,19 @@ +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + + +public sealed partial class Body +{ + public void Initialize() { foreach (Component component in components) component.Initialize(); } + public void Terminate() { foreach (Component component in components) component.Terminate(); } + + public void Load() { foreach (Component component in components) { component.Load(); } } + + public void Update(GameTime __gameTime) { foreach (Component component in components) { component.Update(__gameTime); } } + public void Draw(GameTime __gameTime) { foreach (Component component in components) { component.Draw(__gameTime); } } + + public void Destroy() { foreach(Component component in components) component.Destroy(); } + public void Create() { foreach (Component component in components) component.Create(); } +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Scenes/Behaviors.cs b/Awperative/Kernel/Entities/Scenes/Behaviors.cs new file mode 100644 index 0000000..e69ca5e --- /dev/null +++ b/Awperative/Kernel/Entities/Scenes/Behaviors.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; + + +namespace Gravity.Kernel; + + +public sealed partial class Scene +{ + + public List behaviors { get; private set; } = []; + + //todo: use extern keyword to make transform ambiguous to support potential 3D games + + + public Generic AddBehavior(object[] args) where Generic : Behavior { + + if (SingletonExists()) + throw new Exception("Cannot add behavior when singleton exists!"); + + Generic behavior = (Generic) Activator.CreateInstance(typeof(Generic), args); + + if(behavior == null) + throw new Exception("Failed to create behavior!"); + + behaviors.Add(behavior); + behavior.Initiate(this); + + BehaviorCreatedEvent?.Invoke(this, new BehaviorCreateEvent(behavior, this)); + + return behavior; + } + + public Generic AddBehavior() where Generic : Behavior { + + if (SingletonExists()) + throw new Exception("Cannot add behavior when singleton exists!"); + + Generic behavior = (Generic) Activator.CreateInstance(typeof(Generic)); + + if(behavior == null) + throw new Exception("Failed to create behavior!"); + + behaviors.Add(behavior); + behavior.Initiate(this); + + BehaviorCreatedEvent?.Invoke(this, new BehaviorCreateEvent(behavior, this)); + + return behavior; + } + + public Generic[] GetBehaviors() where Generic : Behavior { + + List foundBehaviors = behaviors.FindAll(x => x.GetType() == typeof(Generic)); + + if(foundBehaviors.Count == 0) + throw new Exception("Scene has no behaviors of that type!"); + + return foundBehaviors.ToArray() as Generic[]; + } + + public Generic GetBehavior() where Generic : Behavior { + + Behavior foundBehavior = behaviors.Find(x => x.GetType() == typeof(Generic)); + + if(foundBehavior == null) + throw new Exception("Scene has no behaviors of that type!"); + + return foundBehavior as Generic; + } + + public void RemoveBehaviors() where Generic : Behavior { + + Behavior[] foundBehaviors = GetBehaviors(); + + if(foundBehaviors.Length == 0) + throw new Exception("Scene has no behaviors of that type!"); + + foreach (Behavior behavior in foundBehaviors) { + behavior.End(); + behaviors.Remove(behavior); + BehaviorDestroyedEvent?.Invoke(this, new BehaviorDestroyEvent(behavior, this)); + } + } + + public void RemoveBehavior() where Generic : Behavior { + + Behavior foundBehavior = GetBehavior(); + + if(foundBehavior == null) + throw new Exception("Scene has no behaviors of that type!"); + + foundBehavior.End(); + behaviors.Remove(foundBehavior); + BehaviorDestroyedEvent?.Invoke(this ,new BehaviorDestroyEvent(foundBehavior, this)); + } + + public void RemoveBehavior(Behavior __behavior) { + __behavior.End(); + behaviors.Remove(__behavior); + BehaviorDestroyedEvent?.Invoke(this, new BehaviorDestroyEvent(__behavior, this)); + } + + public Generic FindSingleton() where Generic : Behavior + { + foreach (Behavior __behavior in behaviors) + if (__behavior.GetType() == typeof(Generic)) + if(__behavior.EnforceSingleton) + return (Generic) __behavior; + else + throw new Exception("Behavior is not a singleton"); + + throw new Exception("Behavior not found"); + return null; + } + + public bool SingletonExists() where Generic : Behavior + { + + foreach (Behavior __behavior in behaviors) + if (__behavior.GetType() == typeof(Generic)) + if (__behavior.EnforceSingleton) + return true; + else + return false; + + return false; + } + + public void RecompileBehaviorOrder() { + behaviors.Sort((a, b) => a.Priority.CompareTo(b.Priority)); + behaviors.Reverse(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Scenes/Bodies.cs b/Awperative/Kernel/Entities/Scenes/Bodies.cs new file mode 100644 index 0000000..77b80d4 --- /dev/null +++ b/Awperative/Kernel/Entities/Scenes/Bodies.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; + + +namespace Gravity.Kernel; + + +public sealed partial class Scene +{ + public List bodies { get; private set; } = []; + + public Body AddBody(Transform __transform) { + Body body = new Body(this, __transform); + bodies.Add(body); + body.Create(); + + BodyCreatedEvent?.Invoke(this, new BodyCreateEvent(body, this)); + + return body; + } + + public Body AddBody() { + Body body = new Body(this, new Transform()); + bodies.Add(body); + body.Create(); + + BodyCreatedEvent?.Invoke(this, new BodyCreateEvent(body, this)); + + return body; + } + + public Body[] GetBodies(string tag) { + List _bodies = new List(); + + foreach (Body body in bodies) + if (body.tags.Contains(tag)) + _bodies.Add(body); + + + if(_bodies.Count == 0) + throw new Exception("No Bodies found with the tag " + tag); + + return _bodies.ToArray(); + } + + public Body GetBody(string tag) { + foreach (Body body in bodies) + if (body.tags.Contains(tag)) + return body; + + throw new Exception("No Body found with the tag " + tag); + } + + public void DestroyBody(Body __body) { + __body.Destroy(); + BodyDestroyedEvent?.Invoke(this, new BodyDestroyEvent(__body, this)); + if (!bodies.Remove(__body)) + throw new Exception("Removal Failed! Does the Body Exist?"); + } + + //todo: add destroying and creating bodies with tags + + + //TAG SYSTEM IN V4 + +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Scenes/Core.cs b/Awperative/Kernel/Entities/Scenes/Core.cs new file mode 100644 index 0000000..144a14b --- /dev/null +++ b/Awperative/Kernel/Entities/Scenes/Core.cs @@ -0,0 +1,10 @@ + + +namespace Gravity.Kernel; + +public sealed partial class Scene +{ + + + //todo: add scene.destroy in v5 +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Scenes/Events.cs b/Awperative/Kernel/Entities/Scenes/Events.cs new file mode 100644 index 0000000..28035a6 --- /dev/null +++ b/Awperative/Kernel/Entities/Scenes/Events.cs @@ -0,0 +1,15 @@ +using System; + + +namespace Gravity.Kernel; + + +public sealed partial class Scene +{ + public event EventHandler BehaviorCreatedEvent; + public event EventHandler BehaviorDestroyedEvent; + + + public event EventHandler BodyCreatedEvent; + public event EventHandler BodyDestroyedEvent; +} \ No newline at end of file diff --git a/Awperative/Kernel/Entities/Scenes/Time.cs b/Awperative/Kernel/Entities/Scenes/Time.cs new file mode 100644 index 0000000..688d633 --- /dev/null +++ b/Awperative/Kernel/Entities/Scenes/Time.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + +public sealed partial class Scene +{ + public void Initialize() { + foreach (Behavior behavior in behaviors) behavior.Initialize(); + foreach (Body body in bodies) body.Initialize(); + } + + public void Terminate() { + foreach (Behavior behavior in behaviors) behavior.Terminate(); + foreach (Body body in bodies) body.Terminate(); + } + + public void Load() { + foreach (Behavior behavior in behaviors) { behavior.Load(); } + foreach (Body body in bodies) { body.Load(); } + } + + public void Update(GameTime __gameTime) { + foreach (Behavior behavior in behaviors) { behavior.Update(__gameTime); } + foreach (Body body in bodies) { body.Update(__gameTime); } + } + + public void Draw(GameTime __gameTime) { + foreach (Behavior behavior in behaviors) { behavior.Draw(__gameTime); } + foreach (Body body in bodies) { body.Draw(__gameTime); } + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Behaviors/BehaviorCreateEvent.cs b/Awperative/Kernel/Events/Behaviors/BehaviorCreateEvent.cs new file mode 100644 index 0000000..b3a77f8 --- /dev/null +++ b/Awperative/Kernel/Events/Behaviors/BehaviorCreateEvent.cs @@ -0,0 +1,15 @@ +namespace Gravity.Kernel; + +public sealed record BehaviorCreateEvent +{ + public readonly Behavior behavior; + public readonly Scene scene; + + internal BehaviorCreateEvent() {} + + internal BehaviorCreateEvent(Behavior __behavior, Scene __scene) + { + behavior = __behavior; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Behaviors/BehaviorDestroyEvent.cs b/Awperative/Kernel/Events/Behaviors/BehaviorDestroyEvent.cs new file mode 100644 index 0000000..13518e5 --- /dev/null +++ b/Awperative/Kernel/Events/Behaviors/BehaviorDestroyEvent.cs @@ -0,0 +1,15 @@ +namespace Gravity.Kernel; + +public sealed record BehaviorDestroyEvent +{ + public readonly Behavior behavior; + public readonly Scene scene; + + internal BehaviorDestroyEvent() {} + + internal BehaviorDestroyEvent(Behavior __behavior, Scene __scene) + { + behavior = __behavior; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Bodies/BodyCreateEvent.cs b/Awperative/Kernel/Events/Bodies/BodyCreateEvent.cs new file mode 100644 index 0000000..0ec322a --- /dev/null +++ b/Awperative/Kernel/Events/Bodies/BodyCreateEvent.cs @@ -0,0 +1,15 @@ +namespace Gravity.Kernel; + +public sealed record BodyCreateEvent +{ + public readonly Body body; + public readonly Scene scene; + + internal BodyCreateEvent() {} + + internal BodyCreateEvent(Body __body, Scene __scene) + { + body = __body; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Bodies/BodyDestroyEvent.cs b/Awperative/Kernel/Events/Bodies/BodyDestroyEvent.cs new file mode 100644 index 0000000..4244b63 --- /dev/null +++ b/Awperative/Kernel/Events/Bodies/BodyDestroyEvent.cs @@ -0,0 +1,15 @@ +namespace Gravity.Kernel; + +public sealed record BodyDestroyEvent +{ + public readonly Body body; + public readonly Scene scene; + + internal BodyDestroyEvent() {} + + internal BodyDestroyEvent(Body __body, Scene __scene) + { + body = __body; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Components/ComponentCreateEvent.cs b/Awperative/Kernel/Events/Components/ComponentCreateEvent.cs new file mode 100644 index 0000000..c8f8183 --- /dev/null +++ b/Awperative/Kernel/Events/Components/ComponentCreateEvent.cs @@ -0,0 +1,17 @@ +namespace Gravity.Kernel; + +public sealed record ComponentCreateEvent +{ + public readonly Component component; + public readonly Body body; + public readonly Scene scene; + + internal ComponentCreateEvent() {} + + internal ComponentCreateEvent(Component __component, Body __body, Scene __scene) + { + component = __component; + body = __body; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Components/ComponentDestroyEvent.cs b/Awperative/Kernel/Events/Components/ComponentDestroyEvent.cs new file mode 100644 index 0000000..a0941e4 --- /dev/null +++ b/Awperative/Kernel/Events/Components/ComponentDestroyEvent.cs @@ -0,0 +1,17 @@ +namespace Gravity.Kernel; + +public sealed record ComponentDestroyEvent +{ + public readonly Component component; + public readonly Body body; + public readonly Scene scene; + + internal ComponentDestroyEvent() {} + + internal ComponentDestroyEvent(Component __component, Body __body, Scene __scene) + { + component = __component; + body = __body; + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Scenes/SceneCreateEvent.cs b/Awperative/Kernel/Events/Scenes/SceneCreateEvent.cs new file mode 100644 index 0000000..2e0e0b9 --- /dev/null +++ b/Awperative/Kernel/Events/Scenes/SceneCreateEvent.cs @@ -0,0 +1,14 @@ +namespace Gravity.Kernel; + + +public sealed record SceneCreateEvent +{ + public Scene scene; + + internal SceneCreateEvent() {} + + internal SceneCreateEvent(Scene __scene) + { + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Scenes/SceneDestroyEvent.cs b/Awperative/Kernel/Events/Scenes/SceneDestroyEvent.cs new file mode 100644 index 0000000..e29c93e --- /dev/null +++ b/Awperative/Kernel/Events/Scenes/SceneDestroyEvent.cs @@ -0,0 +1,14 @@ +namespace Gravity.Kernel; + + +public sealed record SceneDestroyEvent +{ + public Scene scene; + + internal SceneDestroyEvent() {} + + internal SceneDestroyEvent(Scene __scene) + { + scene = __scene; + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Events/Transform/TransformModifyEvent.cs b/Awperative/Kernel/Events/Transform/TransformModifyEvent.cs new file mode 100644 index 0000000..1dbeebe --- /dev/null +++ b/Awperative/Kernel/Events/Transform/TransformModifyEvent.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + +public sealed record TransformModifyEvent +{ + public readonly Transform before; + public readonly Transform after; + + internal TransformModifyEvent() {} + + internal TransformModifyEvent(Transform __before, Transform __after) + { + before = __before; + after = __after; + } + + internal static TransformModifyEvent FromTransforms(Transform __previous, Transform __after) + { + Transform before = __previous; + Transform after = new Transform(__after.Origin, __after.Position, __after.Depth, __after.Rotation, __after.Scale); + return new TransformModifyEvent(before, after); + } + + internal static TransformModifyEvent FromOrigin(Transform __previous, Vector2 __origin) + { + Transform before = __previous; + Transform after = new Transform(__origin, __previous.Position, __previous.Depth, __previous.Rotation, __previous.Scale); + return new TransformModifyEvent(before, after); + } + + internal static TransformModifyEvent FromPosition(Transform __previous, Vector2 __position) + { + Transform before = __previous; + Transform after = new Transform(__previous.Origin, __position, __previous.Depth, __previous.Rotation, __previous.Scale); + return new TransformModifyEvent(before, after); + } + + internal static TransformModifyEvent FromDepth(Transform __previous, float __depth) + { + Transform before = __previous; + Transform after = new Transform(__previous.Origin, __previous.Position, __depth, __previous.Rotation, __previous.Scale); + return new TransformModifyEvent(before, after); + } + + internal static TransformModifyEvent FromRotation(Transform __previous, float __rotation) + { + Transform before = __previous; + Transform after = new Transform(__previous.Origin, __previous.Position, __previous.Depth, __rotation, __previous.Scale); + return new TransformModifyEvent(before, after); + } + + internal static TransformModifyEvent FromScale(Transform __previous, Vector2 __scale) + { + Transform before = __previous; + Transform after = new Transform(__previous.Origin, __previous.Position, __previous.Depth, __previous.Rotation, __scale); + return new TransformModifyEvent(before, after); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Kernel.txt b/Awperative/Kernel/Kernel.txt new file mode 100644 index 0000000..c54ca12 --- /dev/null +++ b/Awperative/Kernel/Kernel.txt @@ -0,0 +1,3 @@ +ESSENTIAL TO THE FUNCTION OF THE GAME, + +Component entity system! \ No newline at end of file diff --git a/Awperative/Kernel/Overhead/AwperativeClass.cs b/Awperative/Kernel/Overhead/AwperativeClass.cs new file mode 100644 index 0000000..7354f25 --- /dev/null +++ b/Awperative/Kernel/Overhead/AwperativeClass.cs @@ -0,0 +1,10 @@ +namespace Gravity.Kernel; + +public interface AwperativeHook +{ + //DONT LOAD ASSETS HERE + public void Initialize() {} + public void Terminate() {} + + public void Load() {} +} \ No newline at end of file diff --git a/Awperative/Kernel/Overhead/Base.cs b/Awperative/Kernel/Overhead/Base.cs new file mode 100644 index 0000000..f10d88f --- /dev/null +++ b/Awperative/Kernel/Overhead/Base.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; + + +namespace Gravity.Kernel; + +//todo: make static +public class Base : Game +{ + public static GraphicsDeviceManager GraphicsDeviceManager; + + public static ContentManager ContentManager { get; private set; } + public static SpriteBatch SpritesBatch; + + public static List LoadedScenes { get; private set; } = []; + + public static Scene MainScene { get; private set; } + + public Base() + { + + //todo: move this asshole to camera + GraphicsDeviceManager = new GraphicsDeviceManager(this); + GraphicsDeviceManager.PreferredBackBufferWidth = 1920; + GraphicsDeviceManager.PreferredBackBufferHeight = 1080; + GraphicsDeviceManager.IsFullScreen = true; + Content.RootDirectory = "Content"; + IsMouseVisible = true; + } + + protected override void Initialize() + { + + + ContentManager = Content; + SpritesBatch = new SpriteBatch(GraphicsDevice); + + MainScene = new Scene(); + LoadedScenes.Add(MainScene); + + //todo: generalize initialization, load a json file containing scripts to run and try running them + //intptr.size + //Marshal.Sizeof + + foreach (AwperativeHook hook in Core.ScriptingHooks) + hook.Initialize(); + + // TODO: Add your initialization logic here + foreach(Scene scene in LoadedScenes) + scene.Initialize(); + + base.Initialize(); + } + + protected override void LoadContent() + { + foreach (AwperativeHook hook in Core.ScriptingHooks) + hook.Load(); + + foreach(Scene scene in LoadedScenes) + scene.Load(); + } + + protected override void Update(GameTime gameTime) + { + + if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || + Keyboard.GetState().IsKeyDown(Keys.Escape)) + Exit(); + + // TODO: Add your update logic here + //TODO: add specific error codes so i know when json went wrong + foreach(Scene scene in LoadedScenes) + scene.Update(gameTime); + base.Update(gameTime); + } + + protected override void Draw(GameTime gameTime) + { + GraphicsDevice.Clear(Color.Black); + + // TODO: Add your drawing code here + //collider.Center += Vector2.One; + + + + + //ADD MOVING COLLIDERS + + foreach(Scene scene in LoadedScenes) + scene.Draw(gameTime); + base.Draw(gameTime); + } + + protected override void EndRun() + { + foreach (AwperativeHook hook in Core.ScriptingHooks) + hook.Terminate(); + + foreach (Scene scene in LoadedScenes) + scene.Terminate(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Overhead/Core.cs b/Awperative/Kernel/Overhead/Core.cs new file mode 100644 index 0000000..04a2b4f --- /dev/null +++ b/Awperative/Kernel/Overhead/Core.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; + + +namespace Gravity.Kernel; + + +public static class Core +{ + public static Base Base; + public static List LoadedScenes => Base.LoadedScenes; + + public static List ScriptingHooks; + + //hooks are called in order + public static void Start(List __hooks) { + ScriptingHooks = __hooks; + + Base = new Base(); + Base.Run(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Scripting/Behaviors/Behavior.cs b/Awperative/Kernel/Scripting/Behaviors/Behavior.cs new file mode 100644 index 0000000..054f52d --- /dev/null +++ b/Awperative/Kernel/Scripting/Behaviors/Behavior.cs @@ -0,0 +1,65 @@ + + +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + +public abstract class Behavior +{ + public Scene scene; + + public bool Enabled = false; + public bool EnforceSingleton = false; + + public int Priority = 0; + + + //scene relay + protected Body AddBody() => scene.AddBody(); + protected Body AddBody(Transform __transform) => scene.AddBody(__transform); + + protected Body GetBody(string __tag) => scene.GetBody(__tag); + protected Body[] GetBodies(string __tag) => scene.GetBodies(__tag); + + protected void DestroyBody(Body __body) => scene.DestroyBody(__body); + + + + protected Generic AddBehavior() where Generic : Behavior => scene.AddBehavior(); + protected Generic AddBehavior(object[] __args) where Generic : Behavior => scene.AddBehavior(__args); + + protected Generic GetBehavior() where Generic : Behavior => scene.GetBehavior(); + protected Generic[] GetBehaviors() where Generic : Behavior => scene.GetBehaviors(); + + protected void RemoveBehavior() where Generic : Behavior => scene.RemoveBehavior(); + + + + //GAME HAS JUST BEGUN/ended + public virtual void Initialize() {} + public virtual void Terminate() {} + + //WE ARE LOADING STUFF + public virtual void Load() {} + + //You know what these do + public virtual void Update(GameTime __gameTime) {} + public virtual void Draw(GameTime __gameTime) {} + + //component/body/scene is being created or destroyed + public virtual void Create() {} + public virtual void Destroy() {} + + //New behavior functionality + internal void Initiate(Scene __scene) { + scene = __scene; + Create(); + } + + //destroy behavior functionality + internal void End() + { + Destroy(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Scripting/Components/Component.cs b/Awperative/Kernel/Scripting/Components/Component.cs new file mode 100644 index 0000000..57133d2 --- /dev/null +++ b/Awperative/Kernel/Scripting/Components/Component.cs @@ -0,0 +1,82 @@ +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + +public abstract class Component +{ + public Scene scene; + public Body body; + + public bool Enabled = false; + public bool EnforceSingleton = false; + + //0 = default highest priority called first, lowest priority called last + //todo: add optional parameter for priority at creation + public int Priority { + get => _priority; + set { _priority = value; body.RecompileComponentOrder(); } + } private int _priority = 0; + + + protected Transform transform => body.transform; + + protected Body AddBody() => scene.AddBody(); + protected Body AddBody(Transform __transform) => scene.AddBody(__transform); + + protected Body GetBody(string __tag) => scene.GetBody(__tag); + protected Body[] GetBodies(string __tag) => scene.GetBodies(__tag); + + protected void DestroyBody(Body __body) => scene.DestroyBody(__body); + + + + public Generic AddBehavior() where Generic : Behavior => scene.AddBehavior(); + public Generic AddBehavior(object[] __args) where Generic : Behavior => scene.AddBehavior(__args); + + public Generic GetBehavior() where Generic : Behavior => scene.GetBehavior(); + public Generic[] GetBehaviors() where Generic : Behavior => scene.GetBehaviors(); + + + public void RemoveBehavior() where Generic : Behavior => scene.RemoveBehavior(); + + + + public Generic AddComponent() where Generic : Component => body.AddComponent(); + public Generic AddComponent(object[] __args) where Generic : Component => body.AddComponent(__args); + + public Generic GetComponent() where Generic : Component => body.GetComponent(); + public Generic[] GetComponents() where Generic : Component => body.GetComponents(); + + public void RemoveComponent() where Generic : Component => body.RemoveComponent(); + + + + //GAME HAS JUST BEGUN/ended + public virtual void Initialize() {} + public virtual void Terminate() {} + + //WE ARE LOADING STUFF + public virtual void Load() {} + + //You know what these do + public virtual void Update(GameTime __gameTime) {} + public virtual void Draw(GameTime __gameTime) {} + + //component/body/scene is being created or destroyed + public virtual void Create() {} + public virtual void Destroy() {} + + //creation logic + internal void Initiate(Body __body) + { + body = __body; + scene = __body.scene; + Create(); + } + + internal void End() + { + Destroy(); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/Types/Transform/Transform.cs b/Awperative/Kernel/Types/Transform/Transform.cs new file mode 100644 index 0000000..066125d --- /dev/null +++ b/Awperative/Kernel/Types/Transform/Transform.cs @@ -0,0 +1,92 @@ +using System; +using Microsoft.Xna.Framework; + + +namespace Gravity.Kernel; + +public sealed class Transform +{ + + public event EventHandler OnTransformChangedEvent; + + + public Vector2 Origin { + get => _origin; set { + if(!value.Equals(_origin)) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromPosition(this, value)); _origin = value; + } + } + private Vector2 _origin = Vector2.Zero; + + public Vector2 Position { + get => _position; set { + if(!value.Equals(_position)) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromPosition(this, value)); _position = value; + } + } + private Vector2 _position = Vector2.Zero; + + public float Depth { + get => _depth; set { + if(!value.Equals(_depth)) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromDepth(this, value)); _depth = value; + } + } + private float _depth = 0f; + + public float Rotation { + get => _rotation; set { + if(!value.Equals(_rotation)) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromRotation(this, value)); _rotation = value; + } + } + private float _rotation = 0f; + + public Vector2 Scale { + get => _scale; set { + if(!value.Equals(_scale)) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromScale(this, value)); _scale = value; + } + } + private Vector2 _scale = Vector2.One; + + public void Set(Vector2 __origin, Vector2 __position, float __depth, float __rotation, Vector2 __scale) + { + //todo: rename to previous and check names` + var previous = Clone(); + bool changed = false; + + if (!_origin.Equals(_origin)) { _origin = __origin; changed = true; } + if (!_position.Equals(_position)) { _position = __position; changed = true; } + if (!_depth.Equals(_depth)) { _depth = __depth; changed = true; } + if (!_rotation.Equals(_rotation)) { _rotation = __rotation; changed = true; } + if (!_scale.Equals(_scale)) { _scale = __scale; changed = true; } + + if (changed) + OnTransformChangedEvent?.Invoke(this, TransformModifyEvent.FromTransforms(this, previous)); + } + + public Transform() {} + + public Transform(Vector2 __origin, Vector2 __position, float __depth, float __rotation, Vector2 __scale) { + Origin = __origin; Position = __position; Depth = __depth; Rotation = __rotation; Scale = __scale; + } + + + //todo: operators? + + public Transform Clone() + { + return new Transform(Origin, Position, Depth, Rotation, Scale); + } + + public Matrix ToMatrix() + { + return + Matrix.CreateTranslation(new Vector3(-Position, 0f)) * + Matrix.CreateTranslation(new Vector3(-Origin, 0f)) * + Matrix.CreateRotationZ(Rotation) * + Matrix.CreateScale(new Vector3(Scale, 1f)) * + Matrix.CreateTranslation(new Vector3(Origin, 0f)); + } +} \ No newline at end of file diff --git a/Awperative/Kernel/todo.txt b/Awperative/Kernel/todo.txt new file mode 100644 index 0000000..1926cc7 --- /dev/null +++ b/Awperative/Kernel/todo.txt @@ -0,0 +1,24 @@ +events system + +json parser + +cool lossless compressor to make my files look more complex + +name save files something like ansf + + //todo: spinny loady wheel, error graphic and make it so multiple scenes can be loaded and modularized, make it so behaviors can be enabled and disabled and merging scenes loading + +body tags, behavior and component tags search methods add a way to enforce one component between all scenes, behaviors and components upgrade base script + +show colliders option + +streamline asset registries + +make the grass go in blocks kinda +and add a fading border to the edge of grass + +add multiple languages + +add collision layers and triggers + +add aabb change events \ No newline at end of file diff --git a/Awperative/bin/Debug/net8.0/Awperative.deps.json b/Awperative/bin/Debug/net8.0/Awperative.deps.json new file mode 100644 index 0000000..f7dc231 --- /dev/null +++ b/Awperative/bin/Debug/net8.0/Awperative.deps.json @@ -0,0 +1,173 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v8.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v8.0": { + "Awperative/1.0.0": { + "dependencies": { + "MonoGame.Framework.DesktopGL": "3.8.4.1" + }, + "runtime": { + "Awperative.dll": {} + } + }, + "MonoGame.Framework.DesktopGL/3.8.4.1": { + "dependencies": { + "MonoGame.Library.OpenAL": "1.24.3.2", + "MonoGame.Library.SDL": "2.32.2.1", + "NVorbis": "0.10.4" + }, + "runtime": { + "lib/net8.0/MonoGame.Framework.dll": { + "assemblyVersion": "3.8.4.1", + "fileVersion": "3.8.4.1" + } + } + }, + "MonoGame.Library.OpenAL/1.24.3.2": { + "runtimeTargets": { + "runtimes/android-arm/native/libopenal.so": { + "rid": "android-arm", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/android-arm64/native/libopenal.so": { + "rid": "android-arm64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/android-x64/native/libopenal.so": { + "rid": "android-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/android-x86/native/libopenal.so": { + "rid": "android-x86", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/ios-arm64/native/libopenal.a": { + "rid": "ios-arm64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/iossimulator-arm64/native/libopenal.a": { + "rid": "iossimulator-arm64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/iossimulator-x64/native/libopenal.a": { + "rid": "iossimulator-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/linux-arm64/native/libopenal.so": { + "rid": "linux-arm64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/linux-x64/native/libopenal.so": { + "rid": "linux-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/osx/native/libopenal.dylib": { + "rid": "osx", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/win-x64/native/openal.dll": { + "rid": "win-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + } + } + }, + "MonoGame.Library.SDL/2.32.2.1": { + "runtimeTargets": { + "runtimes/linux-x64/native/libSDL2-2.0.so.0": { + "rid": "linux-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/osx/native/libSDL2-2.0.0.dylib": { + "rid": "osx", + "assetType": "native", + "fileVersion": "0.0.0.0" + }, + "runtimes/win-x64/native/SDL2.dll": { + "rid": "win-x64", + "assetType": "native", + "fileVersion": "0.0.0.0" + } + } + }, + "NVorbis/0.10.4": { + "dependencies": { + "System.Memory": "4.5.3", + "System.ValueTuple": "4.5.0" + }, + "runtime": { + "lib/netstandard2.0/NVorbis.dll": { + "assemblyVersion": "0.10.4.0", + "fileVersion": "0.10.4.0" + } + } + }, + "System.Memory/4.5.3": {}, + "System.ValueTuple/4.5.0": {} + } + }, + "libraries": { + "Awperative/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "MonoGame.Framework.DesktopGL/3.8.4.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-YybxIIT5+Ky78E/XdkS0glyluMr2EeDZwx2LqXULAOCqiKt1+aDrjPZaqLL5qpNgBcMEHUeZJ4YjWe4TAZlWLw==", + "path": "monogame.framework.desktopgl/3.8.4.1", + "hashPath": "monogame.framework.desktopgl.3.8.4.1.nupkg.sha512" + }, + "MonoGame.Library.OpenAL/1.24.3.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-nGRsXQXs+NSUC3C5w90hFQfyKdZPpBnHnyg2w+Dw/2pUH7s+CoRWTJNYbzzdJf3+aeUvfvG4rTbFvMKDDj5olA==", + "path": "monogame.library.openal/1.24.3.2", + "hashPath": "monogame.library.openal.1.24.3.2.nupkg.sha512" + }, + "MonoGame.Library.SDL/2.32.2.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-T4E2ppGlSTC2L9US1rxtdg3qTbarRzNId31xZoumUW9cf9Nq8nRQPMu9GzvZGrhfSySf0+UWPEj1rlicps+P/w==", + "path": "monogame.library.sdl/2.32.2.1", + "hashPath": "monogame.library.sdl.2.32.2.1.nupkg.sha512" + }, + "NVorbis/0.10.4": { + "type": "package", + "serviceable": true, + "sha512": "sha512-WYnil3DhQHzjCY0dM9I2B3r1vWip90AOuQd25KE4NrjPQBg0tBJFluRLm5YPnO5ZLDmwrfosY8jCQGQRmWI/Pg==", + "path": "nvorbis/0.10.4", + "hashPath": "nvorbis.0.10.4.nupkg.sha512" + }, + "System.Memory/4.5.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==", + "path": "system.memory/4.5.3", + "hashPath": "system.memory.4.5.3.nupkg.sha512" + }, + "System.ValueTuple/4.5.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==", + "path": "system.valuetuple/4.5.0", + "hashPath": "system.valuetuple.4.5.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/Awperative/bin/Debug/net8.0/Awperative.dll b/Awperative/bin/Debug/net8.0/Awperative.dll new file mode 100644 index 0000000..0d4bf70 Binary files /dev/null and b/Awperative/bin/Debug/net8.0/Awperative.dll differ diff --git a/Awperative/bin/Debug/net8.0/Awperative.pdb b/Awperative/bin/Debug/net8.0/Awperative.pdb new file mode 100644 index 0000000..ef94919 Binary files /dev/null and b/Awperative/bin/Debug/net8.0/Awperative.pdb differ diff --git a/Awperative/obj/Awperative.csproj.nuget.dgspec.json b/Awperative/obj/Awperative.csproj.nuget.dgspec.json new file mode 100644 index 0000000..d950c54 --- /dev/null +++ b/Awperative/obj/Awperative.csproj.nuget.dgspec.json @@ -0,0 +1,84 @@ +{ + "format": 1, + "restore": { + "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj": {} + }, + "projects": { + "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj", + "projectName": "Awperative", + "projectPath": "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj", + "packagesPath": "/Users/averynorris/.nuget/packages/", + "outputPath": "/Users/averynorris/Programming/Test/Awperative/Awperative/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/averynorris/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net8.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "MonoGame.Framework.DesktopGL": { + "suppressParent": "All", + "target": "Package", + "version": "[3.8.*, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[8.0.20, 8.0.20]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[8.0.20, 8.0.20]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json" + } + } + } + } +} \ No newline at end of file diff --git a/Awperative/obj/Awperative.csproj.nuget.g.props b/Awperative/obj/Awperative.csproj.nuget.g.props new file mode 100644 index 0000000..3e128ba --- /dev/null +++ b/Awperative/obj/Awperative.csproj.nuget.g.props @@ -0,0 +1,15 @@ + + + + True + NuGet + $(MSBuildThisFileDirectory)project.assets.json + /Users/averynorris/.nuget/packages/ + /Users/averynorris/.nuget/packages/ + PackageReference + 6.14.0 + + + + + \ No newline at end of file diff --git a/Awperative/obj/Awperative.csproj.nuget.g.targets b/Awperative/obj/Awperative.csproj.nuget.g.targets new file mode 100644 index 0000000..6a2cdf1 --- /dev/null +++ b/Awperative/obj/Awperative.csproj.nuget.g.targets @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Awperative/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/Awperative/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs new file mode 100644 index 0000000..dca70aa --- /dev/null +++ b/Awperative/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfo.cs b/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfo.cs new file mode 100644 index 0000000..76a227e --- /dev/null +++ b/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Awperative")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("Awperative")] +[assembly: System.Reflection.AssemblyTitleAttribute("Awperative")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfoInputs.cache b/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfoInputs.cache new file mode 100644 index 0000000..03a8bfe --- /dev/null +++ b/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +5ba9dc33764c600be126a717504a7b55bb9ffa034b1ff0e7811e1287f2a9c3ab diff --git a/Awperative/obj/Debug/net8.0/Awperative.GeneratedMSBuildEditorConfig.editorconfig b/Awperative/obj/Debug/net8.0/Awperative.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..f39e7ae --- /dev/null +++ b/Awperative/obj/Debug/net8.0/Awperative.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,15 @@ +is_global = true +build_property.TargetFramework = net8.0 +build_property.TargetPlatformMinVersion = +build_property.UsingMicrosoftNETSdkWeb = +build_property.ProjectTypeGuids = +build_property.InvariantGlobalization = +build_property.PlatformNeutralAssembly = +build_property.EnforceExtendedAnalyzerRules = +build_property._SupportedPlatformList = Linux,macOS,Windows +build_property.RootNamespace = Awperative +build_property.ProjectDir = /Users/averynorris/Programming/Test/Awperative/Awperative/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 8.0 +build_property.EnableCodeStyleSeverity = diff --git a/Awperative/obj/Debug/net8.0/Awperative.assets.cache b/Awperative/obj/Debug/net8.0/Awperative.assets.cache new file mode 100644 index 0000000..d246e1c Binary files /dev/null and b/Awperative/obj/Debug/net8.0/Awperative.assets.cache differ diff --git a/Awperative/obj/Debug/net8.0/Awperative.csproj.AssemblyReference.cache b/Awperative/obj/Debug/net8.0/Awperative.csproj.AssemblyReference.cache new file mode 100644 index 0000000..5aa557f Binary files /dev/null and b/Awperative/obj/Debug/net8.0/Awperative.csproj.AssemblyReference.cache differ diff --git a/Awperative/obj/Debug/net8.0/Awperative.csproj.CoreCompileInputs.cache b/Awperative/obj/Debug/net8.0/Awperative.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8a8e9eb --- /dev/null +++ b/Awperative/obj/Debug/net8.0/Awperative.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +3d3cd94cc6ff921649579972de5d9d85adfae4ebd2a2b7b55363a005bf98f949 diff --git a/Awperative/obj/Debug/net8.0/Awperative.csproj.FileListAbsolute.txt b/Awperative/obj/Debug/net8.0/Awperative.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..3f9dc8d --- /dev/null +++ b/Awperative/obj/Debug/net8.0/Awperative.csproj.FileListAbsolute.txt @@ -0,0 +1,12 @@ +/Users/averynorris/Programming/Test/Awperative/Awperative/bin/Debug/net8.0/Awperative.deps.json +/Users/averynorris/Programming/Test/Awperative/Awperative/bin/Debug/net8.0/Awperative.dll +/Users/averynorris/Programming/Test/Awperative/Awperative/bin/Debug/net8.0/Awperative.pdb +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.csproj.AssemblyReference.cache +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.GeneratedMSBuildEditorConfig.editorconfig +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfoInputs.cache +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.AssemblyInfo.cs +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.csproj.CoreCompileInputs.cache +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.dll +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/refint/Awperative.dll +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/Awperative.pdb +/Users/averynorris/Programming/Test/Awperative/Awperative/obj/Debug/net8.0/ref/Awperative.dll diff --git a/Awperative/obj/Debug/net8.0/Awperative.dll b/Awperative/obj/Debug/net8.0/Awperative.dll new file mode 100644 index 0000000..0d4bf70 Binary files /dev/null and b/Awperative/obj/Debug/net8.0/Awperative.dll differ diff --git a/Awperative/obj/Debug/net8.0/Awperative.pdb b/Awperative/obj/Debug/net8.0/Awperative.pdb new file mode 100644 index 0000000..ef94919 Binary files /dev/null and b/Awperative/obj/Debug/net8.0/Awperative.pdb differ diff --git a/Awperative/obj/Debug/net8.0/ref/Awperative.dll b/Awperative/obj/Debug/net8.0/ref/Awperative.dll new file mode 100644 index 0000000..40fa95f Binary files /dev/null and b/Awperative/obj/Debug/net8.0/ref/Awperative.dll differ diff --git a/Awperative/obj/Debug/net8.0/refint/Awperative.dll b/Awperative/obj/Debug/net8.0/refint/Awperative.dll new file mode 100644 index 0000000..40fa95f Binary files /dev/null and b/Awperative/obj/Debug/net8.0/refint/Awperative.dll differ diff --git a/Awperative/obj/project.assets.json b/Awperative/obj/project.assets.json new file mode 100644 index 0000000..e8ed7c2 --- /dev/null +++ b/Awperative/obj/project.assets.json @@ -0,0 +1,354 @@ +{ + "version": 3, + "targets": { + "net8.0": { + "MonoGame.Framework.DesktopGL/3.8.4.1": { + "type": "package", + "dependencies": { + "MonoGame.Library.OpenAL": "1.24.3.2", + "MonoGame.Library.SDL": "2.32.2.1", + "NVorbis": "0.10.4" + }, + "compile": { + "lib/net8.0/MonoGame.Framework.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/net8.0/MonoGame.Framework.dll": { + "related": ".xml" + } + }, + "build": { + "build/MonoGame.Framework.DesktopGL.targets": {} + } + }, + "MonoGame.Library.OpenAL/1.24.3.2": { + "type": "package", + "runtimeTargets": { + "runtimes/android-arm/native/libopenal.so": { + "assetType": "native", + "rid": "android-arm" + }, + "runtimes/android-arm64/native/libopenal.so": { + "assetType": "native", + "rid": "android-arm64" + }, + "runtimes/android-x64/native/libopenal.so": { + "assetType": "native", + "rid": "android-x64" + }, + "runtimes/android-x86/native/libopenal.so": { + "assetType": "native", + "rid": "android-x86" + }, + "runtimes/ios-arm64/native/libopenal.a": { + "assetType": "native", + "rid": "ios-arm64" + }, + "runtimes/iossimulator-arm64/native/libopenal.a": { + "assetType": "native", + "rid": "iossimulator-arm64" + }, + "runtimes/iossimulator-x64/native/libopenal.a": { + "assetType": "native", + "rid": "iossimulator-x64" + }, + "runtimes/linux-arm64/native/libopenal.so": { + "assetType": "native", + "rid": "linux-arm64" + }, + "runtimes/linux-x64/native/libopenal.so": { + "assetType": "native", + "rid": "linux-x64" + }, + "runtimes/osx/native/libopenal.dylib": { + "assetType": "native", + "rid": "osx" + }, + "runtimes/win-x64/native/openal.dll": { + "assetType": "native", + "rid": "win-x64" + } + } + }, + "MonoGame.Library.SDL/2.32.2.1": { + "type": "package", + "runtimeTargets": { + "runtimes/linux-x64/native/libSDL2-2.0.so.0": { + "assetType": "native", + "rid": "linux-x64" + }, + "runtimes/osx/native/libSDL2-2.0.0.dylib": { + "assetType": "native", + "rid": "osx" + }, + "runtimes/win-x64/native/SDL2.dll": { + "assetType": "native", + "rid": "win-x64" + } + } + }, + "NVorbis/0.10.4": { + "type": "package", + "dependencies": { + "System.Memory": "4.5.3", + "System.ValueTuple": "4.5.0" + }, + "compile": { + "lib/netstandard2.0/NVorbis.dll": { + "related": ".xml" + } + }, + "runtime": { + "lib/netstandard2.0/NVorbis.dll": { + "related": ".xml" + } + } + }, + "System.Memory/4.5.3": { + "type": "package", + "compile": { + "ref/netcoreapp2.1/_._": {} + }, + "runtime": { + "lib/netcoreapp2.1/_._": {} + } + }, + "System.ValueTuple/4.5.0": { + "type": "package", + "compile": { + "ref/netcoreapp2.0/_._": {} + }, + "runtime": { + "lib/netcoreapp2.0/_._": {} + } + } + } + }, + "libraries": { + "MonoGame.Framework.DesktopGL/3.8.4.1": { + "sha512": "YybxIIT5+Ky78E/XdkS0glyluMr2EeDZwx2LqXULAOCqiKt1+aDrjPZaqLL5qpNgBcMEHUeZJ4YjWe4TAZlWLw==", + "type": "package", + "path": "monogame.framework.desktopgl/3.8.4.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "README-packages.md", + "build/MonoGame.Framework.DesktopGL.targets", + "lib/net8.0/MonoGame.Framework.dll", + "lib/net8.0/MonoGame.Framework.xml", + "monogame.framework.desktopgl.3.8.4.1.nupkg.sha512", + "monogame.framework.desktopgl.nuspec" + ] + }, + "MonoGame.Library.OpenAL/1.24.3.2": { + "sha512": "nGRsXQXs+NSUC3C5w90hFQfyKdZPpBnHnyg2w+Dw/2pUH7s+CoRWTJNYbzzdJf3+aeUvfvG4rTbFvMKDDj5olA==", + "type": "package", + "path": "monogame.library.openal/1.24.3.2", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE", + "README.md", + "monogame.library.openal.1.24.3.2.nupkg.sha512", + "monogame.library.openal.nuspec", + "runtimes/android-arm/native/libopenal.so", + "runtimes/android-arm64/native/libopenal.so", + "runtimes/android-x64/native/libopenal.so", + "runtimes/android-x86/native/libopenal.so", + "runtimes/ios-arm64/native/libopenal.a", + "runtimes/iossimulator-arm64/native/libopenal.a", + "runtimes/iossimulator-x64/native/libopenal.a", + "runtimes/linux-arm64/native/libopenal.so", + "runtimes/linux-x64/native/libopenal.so", + "runtimes/osx/native/libopenal.dylib", + "runtimes/win-x64/native/openal.dll" + ] + }, + "MonoGame.Library.SDL/2.32.2.1": { + "sha512": "T4E2ppGlSTC2L9US1rxtdg3qTbarRzNId31xZoumUW9cf9Nq8nRQPMu9GzvZGrhfSySf0+UWPEj1rlicps+P/w==", + "type": "package", + "path": "monogame.library.sdl/2.32.2.1", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "Icon.png", + "LICENSE.txt", + "README.md", + "monogame.library.sdl.2.32.2.1.nupkg.sha512", + "monogame.library.sdl.nuspec", + "runtimes/linux-x64/native/libSDL2-2.0.so.0", + "runtimes/osx/native/libSDL2-2.0.0.dylib", + "runtimes/win-x64/native/SDL2.dll" + ] + }, + "NVorbis/0.10.4": { + "sha512": "WYnil3DhQHzjCY0dM9I2B3r1vWip90AOuQd25KE4NrjPQBg0tBJFluRLm5YPnO5ZLDmwrfosY8jCQGQRmWI/Pg==", + "type": "package", + "path": "nvorbis/0.10.4", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE", + "lib/net45/NVorbis.dll", + "lib/net45/NVorbis.xml", + "lib/netstandard2.0/NVorbis.dll", + "lib/netstandard2.0/NVorbis.xml", + "nvorbis.0.10.4.nupkg.sha512", + "nvorbis.nuspec" + ] + }, + "System.Memory/4.5.3": { + "sha512": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==", + "type": "package", + "path": "system.memory/4.5.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/netcoreapp2.1/_._", + "lib/netstandard1.1/System.Memory.dll", + "lib/netstandard1.1/System.Memory.xml", + "lib/netstandard2.0/System.Memory.dll", + "lib/netstandard2.0/System.Memory.xml", + "ref/netcoreapp2.1/_._", + "system.memory.4.5.3.nupkg.sha512", + "system.memory.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + }, + "System.ValueTuple/4.5.0": { + "sha512": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ==", + "type": "package", + "path": "system.valuetuple/4.5.0", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net461/System.ValueTuple.dll", + "lib/net461/System.ValueTuple.xml", + "lib/net47/System.ValueTuple.dll", + "lib/net47/System.ValueTuple.xml", + "lib/netcoreapp2.0/_._", + "lib/netstandard1.0/System.ValueTuple.dll", + "lib/netstandard1.0/System.ValueTuple.xml", + "lib/netstandard2.0/_._", + "lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll", + "lib/portable-net40+sl4+win8+wp8/System.ValueTuple.xml", + "lib/uap10.0.16299/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net461/System.ValueTuple.dll", + "ref/net47/System.ValueTuple.dll", + "ref/netcoreapp2.0/_._", + "ref/netstandard2.0/_._", + "ref/portable-net40+sl4+win8+wp8/System.ValueTuple.dll", + "ref/uap10.0.16299/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "system.valuetuple.4.5.0.nupkg.sha512", + "system.valuetuple.nuspec", + "useSharedDesignerContext.txt", + "version.txt" + ] + } + }, + "projectFileDependencyGroups": { + "net8.0": [ + "MonoGame.Framework.DesktopGL >= 3.8.*" + ] + }, + "packageFolders": { + "/Users/averynorris/.nuget/packages/": {} + }, + "project": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj", + "projectName": "Awperative", + "projectPath": "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj", + "packagesPath": "/Users/averynorris/.nuget/packages/", + "outputPath": "/Users/averynorris/Programming/Test/Awperative/Awperative/obj/", + "projectStyle": "PackageReference", + "configFilePaths": [ + "/Users/averynorris/.nuget/NuGet/NuGet.Config" + ], + "originalTargetFrameworks": [ + "net8.0" + ], + "sources": { + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + }, + "restoreAuditProperties": { + "enableAudit": "true", + "auditLevel": "low", + "auditMode": "direct" + }, + "SdkAnalysisLevel": "9.0.300" + }, + "frameworks": { + "net8.0": { + "targetAlias": "net8.0", + "dependencies": { + "MonoGame.Framework.DesktopGL": { + "suppressParent": "All", + "target": "Package", + "version": "[3.8.*, )" + } + }, + "imports": [ + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "net481" + ], + "assetTargetFallback": true, + "warn": true, + "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[8.0.20, 8.0.20]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[8.0.20, 8.0.20]" + } + ], + "frameworkReferences": { + "Microsoft.NETCore.App": { + "privateAssets": "all" + } + }, + "runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json" + } + } + } +} \ No newline at end of file diff --git a/Awperative/obj/project.nuget.cache b/Awperative/obj/project.nuget.cache new file mode 100644 index 0000000..a43b9fc --- /dev/null +++ b/Awperative/obj/project.nuget.cache @@ -0,0 +1,17 @@ +{ + "version": 2, + "dgSpecHash": "50jaUrtOXhI=", + "success": true, + "projectFilePath": "/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj", + "expectedPackageFiles": [ + "/Users/averynorris/.nuget/packages/monogame.framework.desktopgl/3.8.4.1/monogame.framework.desktopgl.3.8.4.1.nupkg.sha512", + "/Users/averynorris/.nuget/packages/monogame.library.openal/1.24.3.2/monogame.library.openal.1.24.3.2.nupkg.sha512", + "/Users/averynorris/.nuget/packages/monogame.library.sdl/2.32.2.1/monogame.library.sdl.2.32.2.1.nupkg.sha512", + "/Users/averynorris/.nuget/packages/nvorbis/0.10.4/nvorbis.0.10.4.nupkg.sha512", + "/Users/averynorris/.nuget/packages/system.memory/4.5.3/system.memory.4.5.3.nupkg.sha512", + "/Users/averynorris/.nuget/packages/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg.sha512", + "/Users/averynorris/.nuget/packages/microsoft.netcore.app.ref/8.0.20/microsoft.netcore.app.ref.8.0.20.nupkg.sha512", + "/Users/averynorris/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.20/microsoft.aspnetcore.app.ref.8.0.20.nupkg.sha512" + ], + "logs": [] +} \ No newline at end of file diff --git a/Awperative/obj/project.packagespec.json b/Awperative/obj/project.packagespec.json new file mode 100644 index 0000000..890866e --- /dev/null +++ b/Awperative/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj","projectName":"Awperative","projectPath":"/Users/averynorris/Programming/Test/Awperative/Awperative/Awperative.csproj","outputPath":"/Users/averynorris/Programming/Test/Awperative/Awperative/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"9.0.300"}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MonoGame.Framework.DesktopGL":{"suppressParent":"All","target":"Package","version":"[3.8.*, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[8.0.20, 8.0.20]"},{"name":"Microsoft.NETCore.App.Ref","version":"[8.0.20, 8.0.20]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/Awperative/obj/rider.project.restore.info b/Awperative/obj/rider.project.restore.info new file mode 100644 index 0000000..b3f2120 --- /dev/null +++ b/Awperative/obj/rider.project.restore.info @@ -0,0 +1 @@ +17687727448637213 \ No newline at end of file