diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index 45eb534e..c6663f78 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -154,7 +154,7 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I { if (__shouldDoScaleProcedure()) { - __oldScale = FlxPoint.get(scrollFactor.x, scrollFactor.y); + __oldScrollFactor.set(scrollFactor.x, scrollFactor.y); var requestedZoom = FlxMath.lerp(initialZoom, camera.zoom, zoomFactor); var diff = requestedZoom / camera.zoom; @@ -162,9 +162,7 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I var r = super.getScreenPosition(point, Camera); - scrollFactor.set(__oldScale.x, __oldScale.y); - __oldScale.put(); - __oldScale = null; + scrollFactor.set(__oldScrollFactor.x, __oldScrollFactor.y); return r; } @@ -231,14 +229,15 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I private inline function __shouldDoScaleProcedure() return zoomFactor != 1; - var __oldScale:FlxPoint; + static var __oldScrollFactor:FlxPoint = new FlxPoint(); + static var __oldScale:FlxPoint = new FlxPoint(); var __skipZoomProcedure:Bool = false; private function __doPreZoomScaleProcedure(camera:FlxCamera) { if (__skipZoomProcedure = !__shouldDoScaleProcedure()) return; - __oldScale = FlxPoint.get(scale.x, scale.y); + __oldScale.set(scale.x, scale.y); var requestedZoom = FlxMath.lerp(initialZoom, camera.zoom, zoomFactor); var diff = requestedZoom * camera.zoom; @@ -250,8 +249,6 @@ class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements I if (__skipZoomProcedure) return; scale.set(__oldScale.x, __oldScale.y); - __oldScale.put(); - __oldScale = null; } #end diff --git a/source/funkin/backend/system/framerate/FlixelInfo.hx b/source/funkin/backend/system/framerate/FlixelInfo.hx index 03da6c2e..5535c962 100644 --- a/source/funkin/backend/system/framerate/FlixelInfo.hx +++ b/source/funkin/backend/system/framerate/FlixelInfo.hx @@ -21,6 +21,11 @@ class FlixelInfo extends FramerateCategory { _text += '\nSounds Count: ${FlxG.sound.list.length}'; _text += '\nFlxG.game Childs Count: ${FlxG.game.numChildren}'; // _text += '\nCached objects count: ${cachedObjects}'; + #if FLX_POINT_POOL + var points = flixel.math.FlxPoint.FlxBasePoint.pool; + //_text += '\nPoint Count: ${points._count} | +${points.made} | -${points.gotten} | ${points.balance} | >${points.putted}'; + _text += '\nPoint Count: ${points._count}'; + #end } this.text.text = _text; diff --git a/source/funkin/game/HudCamera.hx b/source/funkin/game/HudCamera.hx index a88f9ff5..9c59e08b 100644 --- a/source/funkin/game/HudCamera.hx +++ b/source/funkin/game/HudCamera.hx @@ -48,10 +48,7 @@ class HudCamera extends FlxCamera { public override function alterScreenPosition(spr:FlxObject, pos:FlxPoint) { if (downscroll) { - var oldPoint = FlxPoint.get(pos.x, pos.y); pos.set(pos.x, height - pos.y - spr.height); - - oldPoint.put(); } return pos; } diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index b030b5ff..d5339904 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -218,6 +218,7 @@ class Note extends FlxSprite } static var __notePosFrameOffset:FlxPoint = new FlxPoint(); + static var __posPoint:FlxPoint = new FlxPoint(); override function draw() { @:privateAccess var oldDefaultCameras = FlxCamera._defaultCameras; @@ -227,7 +228,7 @@ class Note extends FlxSprite if (negativeScroll) offset.y *= -1; if (__strum != null && strumRelativePos) { - var pos = FlxPoint.get(x, y); + var pos = __posPoint.set(x, y); setPosition(__strum.x, __strum.y); @@ -246,7 +247,7 @@ class Note extends FlxSprite frameOffset.y += __notePosFrameOffset.y; setPosition(pos.x, pos.y); - pos.put(); + //pos.put(); } else { __notePosFrameOffset.set(0, 0); super.draw(); diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index d57adcd7..1d4a10fc 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1160,7 +1160,7 @@ class PlayState extends MusicBeatState pos.x += cpos.x; pos.y += cpos.y; r++; - cpos.put(); + //cpos.put(); } if (r > 0) { pos.x /= r;