Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion source/funkin/play/event/SongEventHelper.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package funkin.play.event;
import flixel.tweens.FlxEase;
import openfl.display.BitmapData;
import flixel.FlxSprite;
import funkin.assets.FunkinBitmapFrontend;

class SongEventHelper
{
Expand Down Expand Up @@ -204,7 +205,20 @@ class SongEventHelper

public static function getOrCreateEaseDotSprites(key:String, frameCount:Int = 30, dotRadius:Int = 3, dotWidth:Int = 16):Array<FlxSprite>
{
if (easeDotCache.exists(key)) return easeDotCache.get(key);
if (easeDotCache.exists(key))
{
var valid:Bool = true;
for (spr in easeDotCache.get(key))
{
if (spr == null || !FunkinBitmapFrontend.instance.isValid(spr.graphic))
{
valid = false;
break;
}
}
if (valid) return easeDotCache.get(key);
easeDotCache.remove(key);
}
var baseBd:BitmapData = getEaseBitmap(key);
if (baseBd == null) return null;
var easeFunc:Dynamic = resolveEaseFuncForKey(key);
Expand Down
Loading