1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-17 12:23:36 +00:00

Clean up log spam in the preloader.

This commit is contained in:
EliteMasterEric 2024-05-02 12:45:31 -04:00
parent 1f6a580756
commit dc50a4ba5e

View file

@ -918,43 +918,54 @@ class FunkinPreloader extends FlxBasePreloader
for (i in 0...ellipsisCount) for (i in 0...ellipsisCount)
ellipsis += '.'; ellipsis += '.';
var percentage:Int = Math.floor(percent * 100);
// Render status text // Render status text
switch (currentState) switch (currentState)
{ {
// case FunkinPreloaderState.NotStarted: // case FunkinPreloaderState.NotStarted:
default: default:
updateProgressLeftText('Loading \n0/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Loading \n0/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.DownloadingAssets: case FunkinPreloaderState.DownloadingAssets:
updateProgressLeftText('Downloading assets \n1/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Downloading assets \n1/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.PreloadingPlayAssets: case FunkinPreloaderState.PreloadingPlayAssets:
updateProgressLeftText('Preloading assets \n2/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Preloading assets \n2/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.InitializingScripts: case FunkinPreloaderState.InitializingScripts:
updateProgressLeftText('Initializing scripts \n3/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Initializing scripts \n3/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.CachingGraphics: case FunkinPreloaderState.CachingGraphics:
updateProgressLeftText('Caching graphics \n4/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Caching graphics \n4/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.CachingAudio: case FunkinPreloaderState.CachingAudio:
updateProgressLeftText('Caching audio \n5/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Caching audio \n5/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.CachingData: case FunkinPreloaderState.CachingData:
updateProgressLeftText('Caching data \n6/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Caching data \n6/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.ParsingSpritesheets: case FunkinPreloaderState.ParsingSpritesheets:
updateProgressLeftText('Parsing spritesheets \n7/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Parsing spritesheets \n7/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.ParsingStages: case FunkinPreloaderState.ParsingStages:
updateProgressLeftText('Parsing stages \n8/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Parsing stages \n8/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.ParsingCharacters: case FunkinPreloaderState.ParsingCharacters:
updateProgressLeftText('Parsing characters \n9/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Parsing characters \n9/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.ParsingSongs: case FunkinPreloaderState.ParsingSongs:
updateProgressLeftText('Parsing songs \n10/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Parsing songs \n10/$TOTAL_STEPS $ellipsis');
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
case FunkinPreloaderState.Complete: case FunkinPreloaderState.Complete:
updateProgressLeftText('Finishing up \n$TOTAL_STEPS/$TOTAL_STEPS $ellipsis'); updateProgressLeftText('Finishing up \n$TOTAL_STEPS/$TOTAL_STEPS $ellipsis');
// trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
#if TOUCH_HERE_TO_PLAY #if TOUCH_HERE_TO_PLAY
case FunkinPreloaderState.TouchHereToPlay: case FunkinPreloaderState.TouchHereToPlay:
updateProgressLeftText(null); updateProgressLeftText(null);
// trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
#end #end
} }
var percentage:Int = Math.floor(percent * 100);
trace('Preloader state: ' + currentState + ' (' + percentage + '%, ' + elapsed + 's)');
// Render percent text // Render percent text
progressRightText.text = '$percentage%'; progressRightText.text = '$percentage%';