diff --git a/assets/images/UI/forever/base/combo.png b/assets/images/UI/forever/base/combo.png new file mode 100644 index 000000000..767a04ac9 Binary files /dev/null and b/assets/images/UI/forever/base/combo.png differ diff --git a/assets/images/UI/forever/pixel/combopixel.png b/assets/images/UI/forever/pixel/combopixel.png new file mode 100644 index 000000000..315a6d18f Binary files /dev/null and b/assets/images/UI/forever/pixel/combopixel.png differ diff --git a/assets/images/characters/bfPixel.png b/assets/images/characters/bfPixel.png index 42925d982..3787a2577 100644 Binary files a/assets/images/characters/bfPixel.png and b/assets/images/characters/bfPixel.png differ diff --git a/source/Init.hx b/source/Init.hx index d527e1b57..20257d912 100644 --- a/source/Init.hx +++ b/source/Init.hx @@ -84,7 +84,7 @@ class Init extends FlxState NOT_FORCED ], 'Use Forever Chart Editor' => [ - true, + false, Checkmark, 'When enabled, uses the custom Forever Engine chart editor!', NOT_FORCED diff --git a/source/Main.hx b/source/Main.hx index 8b234e476..2585f7d9f 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -245,8 +245,10 @@ class Main extends Sprite obj.destroy(); } } + Assets.cache.clear("songs"); // */ } + function onCrash(e:UncaughtErrorEvent):Void { diff --git a/source/gameFolder/gameObjects/userInterface/notes/Strumline.hx b/source/gameFolder/gameObjects/userInterface/notes/Strumline.hx index ebc7dd83d..d1dcacfd6 100644 --- a/source/gameFolder/gameObjects/userInterface/notes/Strumline.hx +++ b/source/gameFolder/gameObjects/userInterface/notes/Strumline.hx @@ -165,8 +165,7 @@ class Strumline extends FlxTypedGroup staticArrow.alpha = 0; FlxTween.tween(staticArrow, {y: staticArrow.initialY, alpha: staticArrow.setAlpha}, 1, {ease: FlxEase.circOut, startDelay: 0.5 + (0.2 * i)}); - if (noteSplashes) - { + if (noteSplashes) { var noteSplash:NoteSplash = ForeverAssets.generateNoteSplashes('noteSplashes', PlayState.assetModifier, 'UI', i); splashNotes.add(noteSplash); } diff --git a/source/gameFolder/meta/data/Timings.hx b/source/gameFolder/meta/data/Timings.hx index 36d937457..b34c7af3d 100644 --- a/source/gameFolder/meta/data/Timings.hx +++ b/source/gameFolder/meta/data/Timings.hx @@ -19,14 +19,23 @@ class Timings "sick" => [0, 50, 350, 100, ' [SFC]'], "good" => [1, 100, 150, 75, ' [GFC]'], "bad" => [2, 120, 0, 25, ' [FC]'], - "shit" => [3, 160, -50, -150], - "miss" => [4, 200, -100, -175], + "shit" => [3, 140, -50, -150], + "miss" => [4, 180, -100, -175], ]; public static var msThreshold:Float = 0; // set the score judgements for later use - public static var scoreRating:Map = ["s" => 90, "a" => 80, "b" => 70, "c" => 50, "d" => 40, "e" => 20, "f" => 0,]; + public static var scoreRating:Map = [ + "S+" => 100, + "S" => 95, + "A" => 90, + "b" => 85, + "c" => 80, + "d" => 75, + "e" => 70, + "f" => 65, + ]; public static var ratingFinal:String = "f"; public static var notesHit:Int = 0; diff --git a/source/gameFolder/meta/state/PlayState.hx b/source/gameFolder/meta/state/PlayState.hx index 8912086f7..947bcb5ec 100644 --- a/source/gameFolder/meta/state/PlayState.hx +++ b/source/gameFolder/meta/state/PlayState.hx @@ -289,8 +289,7 @@ class PlayState extends MusicBeatState camFollow = new FlxObject(0, 0, 1, 1); camFollow.setPosition(camPos.x, camPos.y); // check if the camera was following someone previously - if (prevCamFollow != null) - { + if (prevCamFollow != null) { camFollow = prevCamFollow; prevCamFollow = null; } diff --git a/source/gameFolder/meta/state/charting/OriginalChartingState.hx b/source/gameFolder/meta/state/charting/OriginalChartingState.hx index 19338fb15..4dbbc11e5 100644 --- a/source/gameFolder/meta/state/charting/OriginalChartingState.hx +++ b/source/gameFolder/meta/state/charting/OriginalChartingState.hx @@ -206,7 +206,7 @@ class OriginalChartingState extends MusicBeatState if (check_mute_inst.checked) vol = 0; - FlxG.sound.music.volume = vol; + songMusic.volume = vol; }; var saveButton:FlxButton = new FlxButton(110, 8, "Save", function() @@ -364,31 +364,44 @@ class OriginalChartingState extends MusicBeatState // I'm genuinely tempted to go around and remove every instance of the word "sus" it is genuinely killing me inside } + var songMusic:FlxSound; + function loadSong(daSong:String):Void { - if (FlxG.sound.music != null) - { - FlxG.sound.music.stop(); - // vocals.stop(); - } + if (songMusic != null) + songMusic.stop(); - FlxG.sound.playMusic(Paths.inst(daSong), 0.6); + if (vocals != null) + vocals.stop(); - // WONT WORK FOR TUTORIAL OR TEST SONG!!! REDO LATER - vocals = new FlxSound().loadEmbedded(Paths.voices(daSong)); + songMusic = new FlxSound().loadEmbedded(Sound.fromFile('./' + Paths.inst(daSong)), false, true); + if (_song.needsVoices) + vocals = new FlxSound().loadEmbedded(Sound.fromFile('./' + Paths.voices(daSong)), false, true); + else + vocals = new FlxSound(); + FlxG.sound.list.add(songMusic); FlxG.sound.list.add(vocals); - FlxG.sound.music.pause(); - vocals.pause(); + songMusic.play(); + vocals.play(); - FlxG.sound.music.onComplete = function() + pauseMusic(); + + songMusic.onComplete = function() { - vocals.pause(); - vocals.time = 0; - FlxG.sound.music.pause(); - FlxG.sound.music.time = 0; - changeSection(); + ForeverTools.killMusic([songMusic, vocals]); + loadSong(daSong); }; + // + } + + function pauseMusic() + { + songMusic.time = Math.max(songMusic.time, 0); + songMusic.time = Math.min(songMusic.time, songMusic.length); + + songMusic.pause(); + vocals.pause(); } function generateUI():Void @@ -491,7 +504,7 @@ class OriginalChartingState extends MusicBeatState { curStep = recalculateSteps(); - Conductor.songPosition = FlxG.sound.music.time; + Conductor.songPosition = songMusic.time; _song.song = typingShit.text; strumLine.y = getYfromStrum((Conductor.songPosition - sectionStartTime()) % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps)); @@ -563,7 +576,7 @@ class OriginalChartingState extends MusicBeatState lastSection = curSection; PlayState.SONG = _song; - FlxG.sound.music.stop(); + songMusic.stop(); vocals.stop(); Main.switchState(this, new PlayState()); } @@ -597,15 +610,15 @@ class OriginalChartingState extends MusicBeatState { if (FlxG.keys.justPressed.SPACE) { - if (FlxG.sound.music.playing) + if (songMusic.playing) { - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); } else { vocals.play(); - FlxG.sound.music.play(); + songMusic.play(); } } @@ -619,49 +632,49 @@ class OriginalChartingState extends MusicBeatState if (FlxG.mouse.wheel != 0) { - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); - FlxG.sound.music.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4); - vocals.time = FlxG.sound.music.time; + songMusic.time -= (FlxG.mouse.wheel * Conductor.stepCrochet * 0.4); + vocals.time = songMusic.time; } if (!FlxG.keys.pressed.SHIFT) { if (FlxG.keys.pressed.W || FlxG.keys.pressed.S) { - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); var daTime:Float = 700 * FlxG.elapsed; if (FlxG.keys.pressed.W) { - FlxG.sound.music.time -= daTime; + songMusic.time -= daTime; } else - FlxG.sound.music.time += daTime; + songMusic.time += daTime; - vocals.time = FlxG.sound.music.time; + vocals.time = songMusic.time; } } else { if (FlxG.keys.justPressed.W || FlxG.keys.justPressed.S) { - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); var daTime:Float = Conductor.stepCrochet * 2; if (FlxG.keys.justPressed.W) { - FlxG.sound.music.time -= daTime; + songMusic.time -= daTime; } else - FlxG.sound.music.time += daTime; + songMusic.time += daTime; - vocals.time = FlxG.sound.music.time; + vocals.time = songMusic.time; } } } @@ -683,7 +696,7 @@ class OriginalChartingState extends MusicBeatState bpmTxt.text = bpmTxt.text = Std.string(FlxMath.roundDecimal(Conductor.songPosition / 1000, 2)) + " / " - + Std.string(FlxMath.roundDecimal(FlxG.sound.music.length / 1000, 2)) + + Std.string(FlxMath.roundDecimal(songMusic.length / 1000, 2)) + "\nSection: " + curSection; super.update(elapsed); @@ -713,11 +726,11 @@ class OriginalChartingState extends MusicBeatState } for (i in 0...Conductor.bpmChangeMap.length) { - if (FlxG.sound.music.time > Conductor.bpmChangeMap[i].songTime) + if (songMusic.time > Conductor.bpmChangeMap[i].songTime) lastChange = Conductor.bpmChangeMap[i]; } - curStep = lastChange.stepTime + Math.floor((FlxG.sound.music.time - lastChange.songTime) / Conductor.stepCrochet); + curStep = lastChange.stepTime + Math.floor((songMusic.time - lastChange.songTime) / Conductor.stepCrochet); updateBeat(); return curStep; @@ -727,19 +740,19 @@ class OriginalChartingState extends MusicBeatState { updateGrid(); - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); // Basically old shit from changeSection??? - FlxG.sound.music.time = sectionStartTime(); + songMusic.time = sectionStartTime(); if (songBeginning) { - FlxG.sound.music.time = 0; + songMusic.time = 0; curSection = 0; } - vocals.time = FlxG.sound.music.time; + vocals.time = songMusic.time; updateCurStep(); updateGrid(); @@ -758,7 +771,7 @@ class OriginalChartingState extends MusicBeatState if (updateMusic) { - FlxG.sound.music.pause(); + songMusic.pause(); vocals.pause(); /*var daNum:Int = 0; @@ -769,8 +782,8 @@ class OriginalChartingState extends MusicBeatState daNum++; }*/ - FlxG.sound.music.time = sectionStartTime(); - vocals.time = FlxG.sound.music.time; + songMusic.time = sectionStartTime(); + vocals.time = songMusic.time; updateCurStep(); } diff --git a/source/gameFolder/meta/state/menus/OptionsMenuState.hx b/source/gameFolder/meta/state/menus/OptionsMenuState.hx index 01aec086d..f303f0412 100644 --- a/source/gameFolder/meta/state/menus/OptionsMenuState.hx +++ b/source/gameFolder/meta/state/menus/OptionsMenuState.hx @@ -204,8 +204,7 @@ class OptionsMenuState extends MusicBeatState activeSubgroup.members[i].targetY = (i - curSelection) / 2; // check for null members and hardcode the dividers - if (categoryMap.get(curCategory)[0][i][1] == null) - { + if (categoryMap.get(curCategory)[0][i][1] == null) { activeSubgroup.members[i].alpha = 1; activeSubgroup.members[i].xTo = Std.int((FlxG.width / 2) - ((activeSubgroup.members[i].text.length / 2) * 40)); }