diff --git a/References/RecrownedAthenaeum.dll b/References/RecrownedAthenaeum.dll index 1ec75b1..37272de 100644 Binary files a/References/RecrownedAthenaeum.dll and b/References/RecrownedAthenaeum.dll differ diff --git a/References/RecrownedAthenaeum.xml b/References/RecrownedAthenaeum.xml index 519f94f..4d94792 100644 --- a/References/RecrownedAthenaeum.xml +++ b/References/RecrownedAthenaeum.xml @@ -49,6 +49,11 @@ The graphics device used + + + The basic effect that contains the transformations. + + Constructs 3D camera with an orthographic projection matrix with dimensions of graphics devices viewport. All changes to matrices should have apply called after changes. @@ -60,10 +65,11 @@ Applies the changes to the fields and properties of the camera. - + - Centers the camera to middle of width and height of game window. + Moves camera by the given amount. + A that contains how much in each direction to move. @@ -75,12 +81,23 @@ The 2D position. + + + Places camera in the center given the corner position. + + A 2D camera from the generic . The graphics device to use if not using the one in . + + + Applies for 2D. + Sets where the camera is looking for the view matrix to the position of the camera. + + Lerps to the given position. @@ -89,6 +106,13 @@ The target position to lerp to. Time between this frame and the previous frame. + + + Moves the camera. + Apply needs to be called. + + Magnitude of how much to move per axis. + Wrapper for the content manager that helps with controlling it by adding automated multithreaded content loading. @@ -742,24 +766,36 @@ The used. Needs to be disposed. - + Creates a rectangle renderer with the given . - + Camera to use for . Default will use . + Graphics device to use. Default will use . + + + + Disposes the rectangle renderer. + + + + + Overridable for dispose. + + True when its a player calling the dispose. - Begins the render batch. + Begins a batch for rectangles. - Whether or not to fill the rectangle. + Whether or not this batch should be filled rectangles. Ends the batch. - + Draws a basic rectangle given bottom left and top right. @@ -775,9 +811,9 @@ A batch used to draw primitive shapes by batching together vertices. - + - The maximum vertices expected. The further off this expectancy is from the true value, the less efficient. + Amount of primitives. @@ -809,6 +845,7 @@ Flushes the batch. Automatically called if required if using or . Otherwise, manual flushing is required. + is used if not zero. Is reset to zero every flush. diff --git a/RhythmBullet/Audio/Visualizer/ReflectedHorizontalVisualizer.cs b/RhythmBullet/Audio/Visualizer/ReflectedHorizontalVisualizer.cs index d084ccc..01e77dd 100644 --- a/RhythmBullet/Audio/Visualizer/ReflectedHorizontalVisualizer.cs +++ b/RhythmBullet/Audio/Visualizer/ReflectedHorizontalVisualizer.cs @@ -10,8 +10,7 @@ namespace RhythmBullet.Audio.Visualizer internal class HorizontalVisualizer : UIModule, IDisposable { bool disposed; - private PrimitiveBatch primitiveBatch; - private RectangleRenderer renderer; + private RectangleRenderer rectangleRenderer; private const int BAR_COUNT = 70; private const int SMOOTH_RANGE = 3; private readonly int binsPerBar; @@ -29,8 +28,7 @@ namespace RhythmBullet.Audio.Visualizer binsPerBar = tsp.GetCurrentSpectrum().Length / BAR_COUNT; barValue = new int[BAR_COUNT]; - primitiveBatch = new PrimitiveBatch(camera2D); - renderer = new RectangleRenderer(primitiveBatch); + rectangleRenderer = new RectangleRenderer(); } public override void Update(GameTime gameTime) @@ -44,18 +42,19 @@ namespace RhythmBullet.Audio.Visualizer public override void Draw(SpriteBatch batch) { if (disposed) throw new ObjectDisposedException(this.Name); + rectangleRenderer.Begin(true); for (int i = 0; i < BAR_COUNT; i++) { bar.X = (i * (bar.Width + spaceBetweenBars)) + bounds.X; bar.Y = bounds.Y; - renderer.Begin(true); bar.Height = barValue[i]; - renderer.DrawRectangle(bar.X, bar.Y, bar.Width, bar.Height, color); + rectangleRenderer.Draw(bar.X, bar.Y, bar.Width, bar.Height, color); bar.Height = -barValue[BAR_COUNT - i - 1]; - renderer.DrawRectangle(bar.X, bar.Y, bar.Width, bar.Height, color); + rectangleRenderer.Draw(bar.X, bar.Y, bar.Width, bar.Height, color); } + rectangleRenderer.End(); base.Draw(batch); } @@ -112,7 +111,7 @@ namespace RhythmBullet.Audio.Visualizer { if (disposing && !disposed) { - primitiveBatch.Dispose(); + rectangleRenderer.Dispose(); } disposed = true; } diff --git a/RhythmBullet/Screens/MainMenu/MainPage.cs b/RhythmBullet/Screens/MainMenu/MainPage.cs index d454913..d732602 100644 --- a/RhythmBullet/Screens/MainMenu/MainPage.cs +++ b/RhythmBullet/Screens/MainMenu/MainPage.cs @@ -16,10 +16,9 @@ namespace RhythmBullet.Screens.MainMenu TextButton playButton; TextButton quitButton; - PrimitiveBatch primitiveBatch = new PrimitiveBatch(); - internal MainPage() : base(0, 0) { + Debugging = true; } protected override void Initialize(ContentManagerController assets, ISkin skin) @@ -39,9 +38,6 @@ namespace RhythmBullet.Screens.MainMenu public override void ApplySize(int width, int height) { title.Scale = (width - 40) / title.Texture.Width; - title.CenterOrigin(); - title.bounds.X = (int)(width / 2f); - title.bounds.Y = (int)(height / 2f); base.ApplySize(width, height); } @@ -49,10 +45,6 @@ namespace RhythmBullet.Screens.MainMenu public override void Draw(SpriteBatch batch) { base.Draw(batch); - primitiveBatch.Begin(PrimitiveType.LineList); - primitiveBatch.AddVertex(new Vector2(20, 20), Color.Red); - primitiveBatch.AddVertex(new Vector2(50, 60), Color.Red); - primitiveBatch.End(); } } }