mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-23 08:07:54 -05:00
Merge pull request #522 from FunkinCrew/hxcodec-hmm
hxcodec bump, and some load optimization for LoadingState.preloadLevelAssets()
This commit is contained in:
commit
b83efae7b7
2 changed files with 14 additions and 9 deletions
2
hmm.json
2
hmm.json
|
@ -80,7 +80,7 @@
|
|||
"name": "hxCodec",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "387e1665d6feb5762358134f168e6ebfe46acec8",
|
||||
"ref": "c0c7f2680cc190c932a549c2e2fdd9b0ba2bd10e",
|
||||
"url": "https://github.com/FunkinCrew/hxCodec"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -326,15 +326,20 @@ class LoadingState extends MusicBeatSubState
|
|||
// I will fix this properly later I swear -eric
|
||||
if (!path.endsWith('.png')) continue;
|
||||
|
||||
FunkinSprite.cacheTexture(path);
|
||||
new Future<String>(function() {
|
||||
FunkinSprite.cacheTexture(path);
|
||||
// Another dumb hack: FlxAnimate fetches from OpenFL's BitmapData cache directly and skips the FlxGraphic cache.
|
||||
// Since FlxGraphic tells OpenFL to not cache it, we have to do it manually.
|
||||
if (path.endsWith('spritemap1.png'))
|
||||
{
|
||||
trace('Preloading FlxAnimate asset: ${path}');
|
||||
openfl.Assets.getBitmapData(path, true);
|
||||
}
|
||||
return 'Done precaching ${path}';
|
||||
}, true);
|
||||
|
||||
// Another dumb hack: FlxAnimate fetches from OpenFL's BitmapData cache directly and skips the FlxGraphic cache.
|
||||
// Since FlxGraphic tells OpenFL to not cache it, we have to do it manually.
|
||||
if (path.endsWith('spritemap1.png'))
|
||||
{
|
||||
trace('Preloading FlxAnimate asset: ${path}');
|
||||
openfl.Assets.getBitmapData(path, true);
|
||||
}
|
||||
trace("Queued ${path} for precaching");
|
||||
// FunkinSprite.cacheTexture(path);
|
||||
}
|
||||
|
||||
// FunkinSprite.cacheAllNoteStyleTextures(noteStyle) // This will replace the stuff above!
|
||||
|
|
Loading…
Reference in a new issue