From b781f689ac073240936bdb5266f7f7eb37592d1e Mon Sep 17 00:00:00 2001 From: Absolutely disgusting Date: Sun, 8 Mar 2026 19:28:52 +0400 Subject: [PATCH] Deleted unused code. Fixed Torso exception --- 2DGAMELIB/_2DGAMELIB/ModeEventDispatcher.cs | 21 --------------------- 2DGAMELIB/_2DGAMELIB/OrderedDictionary.cs | 1 + 2DGAMELIB/_2DGAMELIB/RenderArea.cs | 5 ++--- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/2DGAMELIB/_2DGAMELIB/ModeEventDispatcher.cs b/2DGAMELIB/_2DGAMELIB/ModeEventDispatcher.cs index ab46825..2f13b24 100644 --- a/2DGAMELIB/_2DGAMELIB/ModeEventDispatcher.cs +++ b/2DGAMELIB/_2DGAMELIB/ModeEventDispatcher.cs @@ -297,26 +297,6 @@ namespace _2DGAMELIB FrameTimeCounter FTC = new FrameTimeCounter(); RealFpsCounter RFC = new RealFpsCounter(); - /* - Action action = delegate - { - if (FPSF.Value > 1.0) - { - Modes[mode].Draw(FPSF); - - if (ShowFPS) - { - baseControl.SetTitle(UITitle + " - FPS: " + System.Math.Round(FPSF.Value, 2)); - } - } - - //DEBUG shows the hit lut - //GD.DrawImage(Hit, new Point(0, 0)); - baseControl.SetBitmap(Display); - }; - - */ - Action action = () => { if (FPSF.Value > 1.0) @@ -337,7 +317,6 @@ namespace _2DGAMELIB } }; - while (Drive) { FPSF.FPSFixed(action); diff --git a/2DGAMELIB/_2DGAMELIB/OrderedDictionary.cs b/2DGAMELIB/_2DGAMELIB/OrderedDictionary.cs index 69fddee..831d6de 100644 --- a/2DGAMELIB/_2DGAMELIB/OrderedDictionary.cs +++ b/2DGAMELIB/_2DGAMELIB/OrderedDictionary.cs @@ -15,6 +15,7 @@ namespace _2DGAMELIB { get { + //TODO: somewhere "Torso" not translated return values[Key]; } set diff --git a/2DGAMELIB/_2DGAMELIB/RenderArea.cs b/2DGAMELIB/_2DGAMELIB/RenderArea.cs index 8650284..fab287d 100644 --- a/2DGAMELIB/_2DGAMELIB/RenderArea.cs +++ b/2DGAMELIB/_2DGAMELIB/RenderArea.cs @@ -37,7 +37,6 @@ namespace _2DGAMELIB Setting(Unit, XRatio, YRatio, Size, DisMag, HitMag); } - public RenderArea(ModeEventDispatcher Med, bool Hit) { if (Hit) @@ -59,7 +58,7 @@ namespace _2DGAMELIB displayOutputSize.Height = (int)(base.LocalHeight * Unit); displayBufferSize.Width = (int)(base.LocalWidth * displayUnitScale); displayBufferSize.Height = (int)(base.LocalHeight * displayUnitScale); - DisplayLayer = new Bitmap((int)((double)displayOutputSize.Width * DisMag), (int)((double)displayOutputSize.Height * DisMag)); + DisplayLayer = new Bitmap(displayBufferSize.Width, displayBufferSize.Height); displayGraphics = Graphics.FromImage(DisplayLayer); @@ -149,7 +148,7 @@ namespace _2DGAMELIB { Vector2D p = GetPosition(); displayGraphics.DrawImage(DisplayLayer, (int)(p.X * unitScale), (int)(p.Y * unitScale), displayOutputSize.Width, displayOutputSize.Height); - if (this.hitGraphics != null) + if (this.hitGraphics != null && hitGraphics != null) { hitGraphics.DrawImage(HitLayer, (int)(p.X * hitUnitScale), (int)(p.Y * hitUnitScale), hitBufferSize.Width, hitBufferSize.Height); }