diff --git a/RecrownedAthenaeum/Camera/Camera2D.cs b/RecrownedAthenaeum/Camera/Camera2D.cs index 7fa803c..2a6679d 100644 --- a/RecrownedAthenaeum/Camera/Camera2D.cs +++ b/RecrownedAthenaeum/Camera/Camera2D.cs @@ -24,12 +24,12 @@ namespace RecrownedAthenaeum.Camera /// public Matrix Matrix { get; private set; } - private GraphicsDevice graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice; + private GraphicsDevice graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice; /// /// Constructs 2D camera. /// - /// The graphics device to use. Will use graphics device from 's graphics device manager if this is null which it is by default. + /// The graphics device to use. Will use graphics device from 's graphics device manager if this is null which it is by default. public Camera2D(GraphicsDevice graphicsDevice = null) { if (graphicsDevice != null) this.graphicsDevice = graphicsDevice; diff --git a/RecrownedAthenaeum/Setup.cs b/RecrownedAthenaeum/Configuration.cs similarity index 91% rename from RecrownedAthenaeum/Setup.cs rename to RecrownedAthenaeum/Configuration.cs index c7b1398..a1c05c6 100644 --- a/RecrownedAthenaeum/Setup.cs +++ b/RecrownedAthenaeum/Configuration.cs @@ -5,7 +5,7 @@ namespace RecrownedAthenaeum /// /// All variables here should be for RecrownedAthenaeum to use when needed and thus eliminates unessecary passing. /// - public static class Setup + public static class Configuration { /// /// The graphics device that will be used by default. diff --git a/RecrownedAthenaeum/ContentReaders/NinePatchDataReader.cs b/RecrownedAthenaeum/ContentReaders/NinePatchDataReader.cs index 38006f0..38ae1f4 100644 --- a/RecrownedAthenaeum/ContentReaders/NinePatchDataReader.cs +++ b/RecrownedAthenaeum/ContentReaders/NinePatchDataReader.cs @@ -15,7 +15,7 @@ namespace RecrownedAthenaeum.ContentReaders Texture2D texture; using (MemoryStream stream = new MemoryStream(input.ReadBytes(input.ReadInt32()))) { - texture = Texture2D.FromStream(Setup.graphicsDeviceManager.GraphicsDevice, stream); + texture = Texture2D.FromStream(Configuration.graphicsDeviceManager.GraphicsDevice, stream); } NinePatchData ninePatchData = JsonConvert.DeserializeObject(Encoding.ASCII.GetString(input.ReadBytes(input.ReadInt32()))); NinePatch ninePatch = new NinePatch(texture, ninePatchData.left, ninePatchData.right, ninePatchData.bottom, ninePatchData.top); diff --git a/RecrownedAthenaeum/ContentReaders/TextureAtlasDataReader.cs b/RecrownedAthenaeum/ContentReaders/TextureAtlasDataReader.cs index 317da38..cbf9413 100644 --- a/RecrownedAthenaeum/ContentReaders/TextureAtlasDataReader.cs +++ b/RecrownedAthenaeum/ContentReaders/TextureAtlasDataReader.cs @@ -16,7 +16,7 @@ namespace RecrownedAthenaeum.ContentReaders Texture2D atlasTexture; using (MemoryStream stream = new MemoryStream(input.ReadBytes(input.ReadInt32()))) { - atlasTexture = Texture2D.FromStream(Setup.graphicsDeviceManager.GraphicsDevice, stream); + atlasTexture = Texture2D.FromStream(Configuration.graphicsDeviceManager.GraphicsDevice, stream); } string serialized = Encoding.ASCII.GetString(input.ReadBytes(input.ReadInt32())); atlasData = JsonConvert.DeserializeObject(serialized); diff --git a/RecrownedAthenaeum/RecrownedAthenaeum.csproj b/RecrownedAthenaeum/RecrownedAthenaeum.csproj index 21d9d75..46c16e0 100644 --- a/RecrownedAthenaeum/RecrownedAthenaeum.csproj +++ b/RecrownedAthenaeum/RecrownedAthenaeum.csproj @@ -58,7 +58,7 @@ - + diff --git a/RecrownedAthenaeum/Render/PrimitiveBatch.cs b/RecrownedAthenaeum/Render/PrimitiveBatch.cs index c463607..ba12695 100644 --- a/RecrownedAthenaeum/Render/PrimitiveBatch.cs +++ b/RecrownedAthenaeum/Render/PrimitiveBatch.cs @@ -20,7 +20,7 @@ namespace RecrownedAthenaeum.Render BasicEffect basicEffect; PrimitiveType primitiveType; int verticesPerPrimitive; - GraphicsDevice graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice; + GraphicsDevice graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice; bool began; bool disposed; @@ -28,7 +28,7 @@ namespace RecrownedAthenaeum.Render /// Creates a batch used to draw primitives. /// /// The current camera being used. - /// The graphics device used to draw the primitives. Will be using 's graphics device from graphics device manager if null. Default is null. + /// The graphics device used to draw the primitives. Will be using 's graphics device from graphics device manager if null. Default is null. /// The amount of vertices every batch can hold before flushing. Default is 450. Should be changed to be the most optimal number if possible to prevent unnecessary resizing. Especially if using strip primitive types. public PrimitiveBatch(Camera2D camera, GraphicsDevice graphicsDevice = null, int verticesPerBatch = 500) { diff --git a/RecrownedAthenaeum/ScreenSystem/ScreenManager.cs b/RecrownedAthenaeum/ScreenSystem/ScreenManager.cs index c7b9b23..73f1936 100644 --- a/RecrownedAthenaeum/ScreenSystem/ScreenManager.cs +++ b/RecrownedAthenaeum/ScreenSystem/ScreenManager.cs @@ -23,7 +23,7 @@ namespace RecrownedAthenaeum.ScreenSystem /// Called when the first loading screen is done, and needs to show the landing screen. /// public event ShowFirstScreen ShowFirstScreenEvent; - private GraphicsDeviceManager graphics = Setup.graphicsDeviceManager; + private GraphicsDeviceManager graphics = Configuration.graphicsDeviceManager; private Screen previousScreen; private RenderTarget2D previousScreenRenderTarget; private Screen currentScreen; diff --git a/RecrownedAthenaeum/SpecialTypes/TextureAtlas.cs b/RecrownedAthenaeum/SpecialTypes/TextureAtlas.cs index 0f0a90a..99c8984 100644 --- a/RecrownedAthenaeum/SpecialTypes/TextureAtlas.cs +++ b/RecrownedAthenaeum/SpecialTypes/TextureAtlas.cs @@ -65,11 +65,11 @@ namespace RecrownedAthenaeum.SpecialTypes /// Creates or obtains a previously created texture of a region. /// /// Name of region. - /// graphics device to be used. Default is null and will resort to using graphics device from 's graphics device manager. + /// graphics device to be used. Default is null and will resort to using graphics device from 's graphics device manager. /// The texture from the region. public Texture2D ObtainRegionAsTexture(string name, GraphicsDevice graphicsDevice = null) { - if (graphicsDevice == null) graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice; + if (graphicsDevice == null) graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice; return dictionaryOfRegions[name].AsTexture2D(graphicsDevice); } @@ -175,7 +175,7 @@ namespace RecrownedAthenaeum.SpecialTypes /// /// Create or obtains a previously created texture of this region. /// - /// The graphics device to use to create the texture. Will use graphics device from 's graphics device manager if left to null. + /// The graphics device to use to create the texture. Will use graphics device from 's graphics device manager if left to null. /// The texture of the region. public Texture2D AsTexture2D(GraphicsDevice graphicsDevice = null) { @@ -184,7 +184,7 @@ namespace RecrownedAthenaeum.SpecialTypes if (regionTexture == null) { Color[] data = new Color[sourceRectangle.Width * sourceRectangle.Height]; - if (graphicsDevice == null) graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice; + if (graphicsDevice == null) graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice; regionTexture = new Texture2D(graphicsDevice, sourceRectangle.Width, sourceRectangle.Height); atlasTexture.GetData(0, sourceRectangle, data, 0, sourceRectangle.Width * sourceRectangle.Height); regionTexture.SetData(data); diff --git a/RecrownedAthenaeum/UI/Skin/SkinManager.cs b/RecrownedAthenaeum/UI/Skin/SkinManager.cs index 354f44b..07612e0 100644 --- a/RecrownedAthenaeum/UI/Skin/SkinManager.cs +++ b/RecrownedAthenaeum/UI/Skin/SkinManager.cs @@ -106,12 +106,12 @@ namespace RecrownedAthenaeum.UI.Skin /// /// loads a skin asynchronously. /// - /// Graphics device to use for texture creation. Uses graphics device from by default. + /// Graphics device to use for texture creation. Uses graphics device from by default. /// The data to generate from. /// The path pointing to the file with the extension "". public void LoadSkin(SkinData skinData, string path, GraphicsDevice graphicsDevice = null) { - if (graphicsDevice == null) graphicsDevice = Setup.graphicsDeviceManager.GraphicsDevice; + if (graphicsDevice == null) graphicsDevice = Configuration.graphicsDeviceManager.GraphicsDevice; action = Action.LOAD; this.graphicsDevice = graphicsDevice; this.selectedSkinPath = path;