From 29e52eb9b3e373e6c7e6439c745a7db71a9f0f6e Mon Sep 17 00:00:00 2001 From: JordanSantiagoYT Date: Sat, 21 Oct 2023 12:57:10 -0400 Subject: [PATCH] Performance improvements and Android Android changes: You can now pause the game Adding and deleting notes now works EZ Spam now works General changes: Added TANKMAN ASCEND Maybe fixed a memory leak related to ScoreTxt? Fixed a bug where notes that caused a miss if hit counted to totalNotes Added additional debug details --- source/ClientPrefs.hx | 20 ++++ source/ColorSwap.hx | 9 ++ source/Main.hx | 2 + source/Paths.hx | 30 ++++++ source/PlayState.hx | 131 ++++++++++++++++++++++--- source/StrumNote.hx | 5 + source/editors/ChartingState.hx | 12 +++ source/flixel/text/FlxText.hx | 3 + source/openfl/display/FPS.hx | 12 +++ source/options/SuperSecretDebugMenu.hx | 29 ++++++ source/options/VisualsUISubState.hx | 7 ++ 11 files changed, 249 insertions(+), 11 deletions(-) diff --git a/source/ClientPrefs.hx b/source/ClientPrefs.hx index 5bbe0c145de..0e04960a85b 100644 --- a/source/ClientPrefs.hx +++ b/source/ClientPrefs.hx @@ -42,6 +42,8 @@ class ClientPrefs { //default settings if it can't find a save file containing y public static var moreMaxHP:Bool = false; public static var songPercentage:Bool = true; public static var autosaveInterval:Float = 5.0; + public static var noteMotionBlur:Bool = false; + public static var noteMBMult:Float = 1; public static var comboMultLimit:Float = 5; public static var minCGBMS:Int = 5; public static var maxCGBMS:Int = 5; @@ -68,6 +70,7 @@ class ClientPrefs { //default settings if it can't find a save file containing y public static var resultsScreen:Bool = true; public static var botTxtFade:Bool = true; public static var hideHud:Bool = false; + public static var debugInfo:Bool = false; public static var hideScore:Bool = false; public static var voiidTrollMode:Bool = false; public static var compactNumbers:Bool = false; @@ -75,6 +78,7 @@ class ClientPrefs { //default settings if it can't find a save file containing y public static var longFCName:Bool = false; public static var holdNoteHits:Bool = false; public static var comboScoreEffect:Bool = false; + public static var noGunsRNG:Bool = false; public static var comboMultiType:String = 'osu!'; public static var noteOffset:Int = 0; public static var arrowHSV:Array> = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]; @@ -219,6 +223,7 @@ class ClientPrefs { //default settings if it can't find a save file containing y FlxG.save.data.noteSplashes = noteSplashes; FlxG.save.data.oppNoteSplashes = oppNoteSplashes; FlxG.save.data.songLoading = songLoading; + FlxG.save.data.debugInfo = debugInfo; FlxG.save.data.lowQuality = lowQuality; FlxG.save.data.shaders = shaders; FlxG.save.data.ezSpam = ezSpam; @@ -227,6 +232,7 @@ class ClientPrefs { //default settings if it can't find a save file containing y //FlxG.save.data.cursing = cursing; //FlxG.save.data.violence = violence; FlxG.save.data.progAudioLoad = progAudioLoad; + FlxG.save.data.noGunsRNG = noGunsRNG; FlxG.save.data.camZooms = camZooms; FlxG.save.data.daMenuMusic = daMenuMusic; FlxG.save.data.maxSplashLimit = maxSplashLimit; @@ -237,6 +243,8 @@ class ClientPrefs { //default settings if it can't find a save file containing y FlxG.save.data.fasterChartLoad = fasterChartLoad; FlxG.save.data.longFCName = longFCName; FlxG.save.data.botTxtFade = botTxtFade; + FlxG.save.data.noteMotionBlur = noteMotionBlur; + FlxG.save.data.noteMBMult = noteMBMult; FlxG.save.data.showNotes = showNotes; FlxG.save.data.skipResultsScreen = skipResultsScreen; FlxG.save.data.timeBounce = timeBounce; @@ -378,6 +386,9 @@ class ClientPrefs { //default settings if it can't find a save file containing y if(FlxG.save.data.flashing != null) { flashing = FlxG.save.data.flashing; } + if(FlxG.save.data.debugInfo != null) { + debugInfo = FlxG.save.data.debugInfo; + } if(FlxG.save.data.ezSpam != null) { ezSpam = FlxG.save.data.ezSpam; } @@ -396,6 +407,9 @@ class ClientPrefs { //default settings if it can't find a save file containing y if(FlxG.save.data.communityGameBot != null) { communityGameBot = FlxG.save.data.communityGameBot; } + if(FlxG.save.data.noGunsRNG != null) { + noGunsRNG = FlxG.save.data.noGunsRNG; + } if(FlxG.save.data.showRamUsage != null) { showRamUsage = FlxG.save.data.showRamUsage; } @@ -441,6 +455,12 @@ class ClientPrefs { //default settings if it can't find a save file containing y if(FlxG.save.data.rainbowNotes != null) { rainbowNotes = FlxG.save.data.rainbowNotes; } + if(FlxG.save.data.noteMotionBlur != null) { + noteMotionBlur = FlxG.save.data.noteMotionBlur; + } + if(FlxG.save.data.noteMBMult != null) { + noteMBMult = FlxG.save.data.noteMBMult; + } if(FlxG.save.data.comboMultLimit != null) { comboMultLimit = FlxG.save.data.comboMultLimit; } diff --git a/source/ColorSwap.hx b/source/ColorSwap.hx index 526d96e2a95..33b1704e914 100644 --- a/source/ColorSwap.hx +++ b/source/ColorSwap.hx @@ -47,6 +47,11 @@ class ColorSwapShader extends FlxShader { uniform bool hasTransform; uniform bool hasColorTransform; + uniform bool blurEnabled; + uniform int passes; + uniform float x; + uniform float y; + uniform bool isNote; vec4 flixel_texture2D(sampler2D bitmap, vec2 coord) { @@ -213,5 +218,9 @@ class ColorSwapShader extends FlxShader { public function new() { super(); + var motion_blur = ClientPrefs.noteMotionBlur; + this.blurEnabled.value = [motion_blur]; + this.y.value = [0.0075]; + this.passes.value = [10]; } } \ No newline at end of file diff --git a/source/Main.hx b/source/Main.hx index de97373bfc0..90d1118d004 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -45,6 +45,8 @@ class Main extends Sprite { public static var fpsVar:FPS; public static var changeID:Int = 0; + public static var textGenerations:Int = 0; + public static var __superCoolErrorMessagesArray:Array = [ "A fatal error has occ- wait what?", "missigno.", diff --git a/source/Paths.hx b/source/Paths.hx index 7d7e6d1cb5c..8faa7ac02e4 100644 --- a/source/Paths.hx +++ b/source/Paths.hx @@ -287,6 +287,7 @@ class Paths public static var currentTrackedAssets:Map = []; static public function image(key:String, ?library:String = null, ?allowGPU:Bool = true):FlxGraphic { + if (ClientPrefs.cacheOnGPU) { var bitmap:BitmapData = null; var file:String = null; @@ -333,6 +334,35 @@ class Paths trace('oh no its returning null NOOOO ($file)'); return null; + } else { + #if MODS_ALLOWED + var modKey:String = modsImages(key); + if(FileSystem.exists(modKey)) { + if(!currentTrackedAssets.exists(modKey)) { + var newBitmap:BitmapData = BitmapData.fromFile(modKey); + var newGraphic:FlxGraphic = FlxGraphic.fromBitmapData(newBitmap, false, modKey); + newGraphic.persist = true; + currentTrackedAssets.set(modKey, newGraphic); + } + localTrackedAssets.push(modKey); + return currentTrackedAssets.get(modKey); + } + #end + + var path = getPath('images/$key.png', IMAGE, library); + //trace(path); + if (OpenFlAssets.exists(path, IMAGE)) { + if(!currentTrackedAssets.exists(path)) { + var newGraphic:FlxGraphic = FlxG.bitmap.add(path, false, path); + newGraphic.persist = true; + currentTrackedAssets.set(path, newGraphic); + } + localTrackedAssets.push(path); + return currentTrackedAssets.get(path); + } + trace('oh no its returning null NOOOO (' + modKey + ')'); + return null; + } } static public function getTextFromFile(key:String, ?ignoreMods:Bool = false):String diff --git a/source/PlayState.hx b/source/PlayState.hx index 992611d4e09..63e38e315ae 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -88,6 +88,8 @@ import vlc.MP4Handler; #end #end +import ColorSwap.ColorSwapShader; //for motion blur + using StringTools; @@ -188,6 +190,8 @@ class PlayState extends MusicBeatState public static var deathanim:Bool = false; public static var dead:Bool = false; + var tankmanAscend:Bool = false; // funni (2021 nostalgia oh my god) + public var notes:FlxTypedGroup; public var unspawnNotes:Array = []; public var unspawnNotesCopy:Array = []; @@ -323,6 +327,10 @@ class PlayState extends MusicBeatState var secretsong:FlxSprite; var SPUNCHBOB:FlxSprite; + public var scoreTxtUpdateFrame:Int = 0; + public var judgeCountUpdateFrame:Int = 0; + public var compactUpdateFrame:Int = 0; + var notesHitArray:Array = []; var oppNotesHitArray:Array = []; var notesHitDateArray:Array = []; @@ -1731,11 +1739,7 @@ class PlayState extends MusicBeatState add(strumLineNotes); add(grpNoteSplashes); - if(ClientPrefs.timeBarType == 'Song Name') - { - timeTxt.size = 24; - timeTxt.y += 3; - } + if(ClientPrefs.timeBarType == 'Song Name' && ClientPrefs.hudType == 'VS Impostor') { timeTxt.size = 14; @@ -1753,6 +1757,19 @@ class PlayState extends MusicBeatState if (!ClientPrefs.fasterChartLoad) generateSong(SONG.song); if (ClientPrefs.fasterChartLoad) generateSongOptim(SONG.song); + if (curSong.toLowerCase() == "guns") // added this to bring back the old 2021 fnf vibes, i wish the fnf fandom revives one day :( + { + var randomVar:Int = 0; + if (!ClientPrefs.noGunsRNG) randomVar = Std.random(15); + if (ClientPrefs.noGunsRNG) randomVar = 8; + trace(randomVar); + if (randomVar == 8) + { + trace('AWW YEAH, ITS ASCENDING TIME'); + tankmanAscend = true; + } + } + // After all characters being loaded, it makes then invisible 0.01s later so that the player won't freeze when you change characters // add(strumLine); @@ -2168,6 +2185,7 @@ class PlayState extends MusicBeatState dadGroup.destroy(); boyfriendGroup.destroy(); } + if (!ClientPrefs.hideScore) updateScore(); judgementCounter = new FlxText(0, FlxG.height / 2 - (ClientPrefs.hudType != 'Box Funkin' || ClientPrefs.hudType != "Mic'd Up" ? 80 : 350), 0, "", 20); judgementCounter.setFormat(Paths.font("vcr.ttf"), 20, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); @@ -3478,6 +3496,7 @@ class PlayState extends MusicBeatState private function updateCompactNumbers():Void { + compactUpdateFrame++; compactCombo = formatCompactNumber(combo); compactMaxCombo = formatCompactNumber(maxCombo); compactScore = formatCompactNumber(songScore); @@ -3978,6 +3997,7 @@ class PlayState extends MusicBeatState }); } moving this to popupscore so that it doesn't just break scoretxt*/ callOnLuas('onUpdateScore', [miss]); + scoreTxtUpdateFrame++; } public function setSongTime(time:Float) @@ -4240,7 +4260,7 @@ class PlayState extends MusicBeatState { songNotes[3] = 'Behind Note'; } - if (gottaHitNote) + if (gottaHitNote && !songNotes.hitCausesMiss) { totalNotes += 1; } @@ -4904,6 +4924,14 @@ class PlayState extends MusicBeatState } } + if (tankmanAscend) + { + if (curStep > 895 && curStep < 1151) + { + camGame.zoom = 0.8; + } + } + switch (curStage) { case 'tank': @@ -5072,6 +5100,9 @@ if (ClientPrefs.showNPS) { if (notesToRemoveCount > 0) { notesHitDateArray.splice(0, notesToRemoveCount); notesHitArray.splice(0, notesToRemoveCount); + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame == 0 && judgementCounter != null) updateRatingCounter(); + if (!ClientPrefs.hideScore && scoreTxtUpdateFrame == 0 && scoreTxt != null) updateScore(); + if (ClientPrefs.compactNumbers && compactUpdateFrame == 0) updateCompactNumbers(); } // Calculate sum of NPS values @@ -5095,6 +5126,8 @@ if (ClientPrefs.showNPS) { if (oppNotesToRemoveCount > 0) { oppNotesHitDateArray.splice(0, oppNotesToRemoveCount); oppNotesHitArray.splice(0, oppNotesToRemoveCount); + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame == 0 && judgementCounter != null) updateRatingCounter(); + if (ClientPrefs.compactNumbers && compactUpdateFrame == 0) updateCompactNumbers(); } // Calculate sum of NPS values for the opponent @@ -5126,6 +5159,9 @@ if (ClientPrefs.showNPS) { maxCombo = combo; super.update(elapsed); + judgeCountUpdateFrame = 0; + compactUpdateFrame = 0; + scoreTxtUpdateFrame = 0; shownScore = FlxMath.lerp(shownScore, songScore, .4/(ClientPrefs.framerate / 60)); if (Math.abs(shownScore - songScore) <= 10) @@ -5152,9 +5188,6 @@ if (ClientPrefs.showNPS) { setOnLuas('curDecStep', curDecStep); setOnLuas('curDecBeat', curDecBeat); - if (ClientPrefs.ratingCounter) updateRatingCounter(); - if (!ClientPrefs.hideScore) updateScore(); - if (ClientPrefs.compactNumbers) updateCompactNumbers(); if(botplayTxt != null && ClientPrefs.hudType != "Mic'd Up" && ClientPrefs.hudType != 'Kade Engine' && ClientPrefs.botTxtFade) { botplaySine += 180 * elapsed; @@ -5254,7 +5287,7 @@ if (ClientPrefs.showNPS) { } } - if (controls.PAUSE && startedCountdown && canPause && !softlocked) + if ((controls.PAUSE #if android || FlxG.android.justReleased.BACK #end) && startedCountdown && canPause && !softlocked) { if (!ClientPrefs.noPausing) { var ret:Dynamic = callOnLuas('onPause', [], false); @@ -6143,6 +6176,8 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi oppNotesHitDateArray.push(Date.now()); } enemyHits += 1 * polyphony; + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame == 0) updateRatingCounter(); + if (ClientPrefs.compactNumbers && compactUpdateFrame == 0) updateCompactNumbers(); if (shouldKillNotes) { daNote.kill(); @@ -6186,6 +6221,7 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi if (ClientPrefs.showNPS) { //i dont think we should be pushing to 2 arrays at the same time but oh well notesHitArray.push(1 * polyphony); notesHitDateArray.push(Date.now()); + } if (shouldKillNotes) { daNote.kill(); @@ -6196,7 +6232,6 @@ if (unspawnNotes[0] != null && (Conductor.songPosition + 1800 / songSpeed) >= fi } } } - } } } @@ -8932,6 +8967,10 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT } } + if (ClientPrefs.ratingCounter && judgeCountUpdateFrame == 0) updateRatingCounter(); + if (!ClientPrefs.hideScore && scoreTxtUpdateFrame == 0) updateScore(); + if (ClientPrefs.compactNumbers && compactUpdateFrame == 0) updateCompactNumbers(); + if(cpuControlled) { if (ClientPrefs.botLightStrum) { @@ -9237,6 +9276,75 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT override function stepHit() { super.stepHit(); + + if (tankmanAscend) + { + if (curStep >= 896 && curStep <= 1152) moveCameraSection(); + switch (curStep) + { + case 896: + { + opponentStrums.forEachAlive(function(daNote:FlxSprite) + { + FlxTween.tween(daNote, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + }); + FlxTween.tween(EngineWatermark, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(timeBar, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(judgementCounter, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(scoreTxt, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(healthBar, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(healthBarBG, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(iconP1, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(iconP2, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(timeTxt, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + dad.velocity.y = -35; + } + case 906: + { + playerStrums.forEachAlive(function(daNote:FlxSprite) + { + FlxTween.tween(daNote, {alpha: 0}, 0.5, {ease: FlxEase.expoOut,}); + }); + } + case 1020: + { + playerStrums.forEachAlive(function(daNote:FlxSprite) + { + FlxTween.tween(daNote, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + }); + } + case 1024: + dad.velocity.y = 0; + boyfriend.velocity.y = -33.5; + case 1151: + cameraSpeed = 100; + case 1152: + { + FlxG.camera.flash(FlxColor.WHITE, 1); + opponentStrums.forEachAlive(function(daNote:FlxSprite) + { + FlxTween.tween(daNote, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + }); + FlxTween.tween(EngineWatermark, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(timeBar, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(judgementCounter, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(healthBar, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(healthBarBG, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(scoreTxt, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(iconP1, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(iconP2, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + FlxTween.tween(timeTxt, {alpha: 1}, 0.5, {ease: FlxEase.expoOut,}); + dad.x = 100; + dad.y = 280; + boyfriend.x = 810; + boyfriend.y = 450; + dad.velocity.y = 0; + boyfriend.velocity.y = 0; + } + case 1153: + cameraSpeed = 1; + } + } var gamerValue = 20 * playbackRate; if (!ClientPrefs.noSyncing && ClientPrefs.songLoading && playbackRate < 256) //much better resync code, doesn't just resync every step!! { @@ -9590,6 +9698,7 @@ if (!allSicks && ClientPrefs.colorRatingFC && songMisses > 0 && ClientPrefs.hudT } public function updateRatingCounter() { + judgeCountUpdateFrame++; if (!ClientPrefs.noMarvJudge) { judgementCounter.text = 'Combo (Max): ' + (!ClientPrefs.compactNumbers ? FlxStringUtil.formatMoney(combo, false) : compactCombo) + ' (' + (!ClientPrefs.compactNumbers ? FlxStringUtil.formatMoney(maxCombo, false) : compactMaxCombo) + ')\nHits: ' + (!ClientPrefs.compactNumbers ? FlxStringUtil.formatMoney(totalNotesPlayed, false) : compactTotalPlays) + ' / ' + FlxStringUtil.formatMoney(totalNotes, false) + ' (' + FlxMath.roundDecimal((totalNotesPlayed/totalNotes) * 100, 2) + '%)\nMarvelous!!!: ' + marvs + '\nSicks!!: ' + sicks + '\nGoods!: ' + goods + '\nBads: ' + bads + '\nShits: ' + shits + '\nMisses: ' + songMisses + (ClientPrefs.comboScoreEffect ? '\nScore Multiplier: ' + comboMultiplier + 'x' : ''); diff --git a/source/StrumNote.hx b/source/StrumNote.hx index 207f7a7ae65..d6a8ef27255 100644 --- a/source/StrumNote.hx +++ b/source/StrumNote.hx @@ -9,6 +9,7 @@ using StringTools; class StrumNote extends FlxSprite { public var colorSwap:ColorSwap; + public var notes_angle:Null = null; public var noteThing:Note; public var resetAnim:Float = 0; private var noteData:Int = 0; @@ -28,6 +29,10 @@ class StrumNote extends FlxSprite return value; } + public function getAngle() { + return (notes_angle == null ? angle : notes_angle); + } + public function new(x:Float, y:Float, leData:Int, player:Int) { colorSwap = new ColorSwap(); shader = colorSwap.shader; diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 923783b9893..95a297f3b8f 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -1926,6 +1926,8 @@ class ChartingState extends MusicBeatState if (touch.overlaps(note)) { // trace('tryin to delete note...'); deleteNote(note); + updateGrid(false); + updateNoteUI(); } }); } else { @@ -1935,6 +1937,16 @@ class ChartingState extends MusicBeatState && touch.y < gridBG.y + (GRID_SIZE * getSectionBeats() * 4) * zoomList[curZoom]) { FlxG.log.add('added note'); addNote(); + var addCount:Int = 0; + if (check_stackActive.checked) { + addCount = (Math.floor(stepperStackNum.value)) * Math.floor(stepperStackOffset.value) - 1; + } + // var funnySnap:Float = ((GRID_SIZE * getSectionBeats() * 4 * zoomList[curZoom]) + Conductor.stepCrochet / stepperStackOffset.value); + for(i in 0...Std.int(addCount)) { + addNote(curSelectedNote[0] + (_song.notes[curSec].changeBPM ? 15000/_song.notes[curSec].bpm : 15000/_song.bpm)/stepperStackOffset.value, curSelectedNote[1] + Math.floor(stepperStackSideOffset.value), currentType); + } + updateGrid(false); + updateNoteUI(); } } } diff --git a/source/flixel/text/FlxText.hx b/source/flixel/text/FlxText.hx index 7a5f4b3579d..e361d0687f1 100644 --- a/source/flixel/text/FlxText.hx +++ b/source/flixel/text/FlxText.hx @@ -146,6 +146,8 @@ class FlxText extends FlxSprite */ var _regen:Bool = true; + var mainThing:Main; + /** * Helper vars to draw border styles with transparency. */ @@ -814,6 +816,7 @@ class FlxText extends FlxSprite _flashRect.y = 0; _flashRect.width = newWidth; _flashRect.height = newHeight; + Main.textGenerations++; } else // Else just clear the old buffer before redrawing the text { diff --git a/source/openfl/display/FPS.hx b/source/openfl/display/FPS.hx index e66ad25471d..50215a07745 100644 --- a/source/openfl/display/FPS.hx +++ b/source/openfl/display/FPS.hx @@ -9,6 +9,7 @@ import flixel.math.FlxMath; import openfl.display._internal.stats.Context3DStats; import openfl.display._internal.stats.DrawCallContext; #end +import flixel.FlxG; #if flash import openfl.Lib; #end @@ -16,6 +17,7 @@ import external.memory.Memory; #if openfl import openfl.system.System; #end +import Main; /** The FPS class provides an easy-to-use monitor to display @@ -37,6 +39,8 @@ class FPS extends TextField @:noCompletion private var currentTime:Float; @:noCompletion private var times:Array; + public static var mainThing:Main; + public function new(x:Float = 10, y:Float = 10, color:Int = 0x000000) { super(); @@ -88,6 +92,14 @@ class FPS extends TextField if (ClientPrefs.showRamUsage) text += "\nMemory: " + CoolUtil.formatBytes(Memory.getCurrentUsage()) + (ClientPrefs.showMaxRamUsage ? " / " + CoolUtil.formatBytes(Memory.getPeakUsage()) : ""); + if (ClientPrefs.debugInfo) { + text += '\nState: ${Type.getClassName(Type.getClass(FlxG.state))}'; + if (FlxG.state.subState != null) + text += '\nSubstate: ${Type.getClassName(Type.getClass(FlxG.state.subState))}'; + text += "\nSystem: " + '${lime.system.System.platformLabel} ${lime.system.System.platformVersion}'; + text += "\nText bitmaps generated: " + Main.textGenerations; + } + textColor = 0xFFFFFFFF; if (currentFPS <= ClientPrefs.framerate / 2) { diff --git a/source/options/SuperSecretDebugMenu.hx b/source/options/SuperSecretDebugMenu.hx index 7f05887237c..47b18003408 100644 --- a/source/options/SuperSecretDebugMenu.hx +++ b/source/options/SuperSecretDebugMenu.hx @@ -45,6 +45,13 @@ class SuperSecretDebugMenu extends BaseOptionsMenu false); addOption(option); + var option:Option = new Option('No Ascend RNG', + "If checked, makes the RNG Guns ascend part play every time.", + 'noGunsRNG', + 'bool', + false); + addOption(option); + var option:Option = new Option('Playback Rate Controls', "If checked, allows you to control the playback rate in PlayState \nwithout the need for the Pause Menu.", 'pbRControls', @@ -52,6 +59,28 @@ class SuperSecretDebugMenu extends BaseOptionsMenu false); addOption(option); + /* + var option:Option = new Option('Note Motion Blur', + "If checked, notes will go BLURRRR", + 'noteMotionBlur', + 'bool', + false); + addOption(option); + + var option:Option = new Option('Motion Blur Mult: ', + "Multiplier for motion blur. If you still feel like the notes stutter, this can help.\nHigher values mean blurrier notes.", + 'noteMBMult', + 'float', + 1); + addOption(option); + */ //while this did work the hsv behaved incorrectly + option.scrollSpeed = 2.2; + option.minValue = 0.1; + option.maxValue = 10; + option.changeValue = 0.1; + option.decimals = 2; + option.displayFormat = '%vx'; + var option:Option = new Option('Crash the Engine', "Select this to crash the engine.", 'crashEngine', diff --git a/source/options/VisualsUISubState.hx b/source/options/VisualsUISubState.hx index 7f6c49bfbed..900142dc8c7 100644 --- a/source/options/VisualsUISubState.hx +++ b/source/options/VisualsUISubState.hx @@ -519,6 +519,13 @@ class VisualsUISubState extends BaseOptionsMenu true); addOption(option); + var option:Option = new Option('Show Debug Info', + "If checked, the game will show additional debug info.\nNote: Turn on FPS Counter before using this!", + 'debugInfo', + 'bool', + false); + addOption(option); + var option:Option = new Option('NPS with Speed in Mind', "If unchecked, the NPS won't have Playback Rate in mind.\n(Pretty dumb option to add, if you ask me!\nThat's why this is in the bottom of the Visuals & UI menu!)", 'npsWithSpeed',