Skip to content

Commit

Permalink
shut up
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshubs authored and Yoshubs committed Oct 3, 2021
1 parent 1f09496 commit 499f81b
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 53 deletions.
Binary file added assets/images/UI/forever/base/combo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/UI/forever/pixel/combopixel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/characters/bfPixel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ class Main extends Sprite
obj.destroy();
}
}
Assets.cache.clear("songs");
// */
}


function onCrash(e:UncaughtErrorEvent):Void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ class Strumline extends FlxTypedGroup<FlxBasic>
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);
}
Expand Down
15 changes: 12 additions & 3 deletions source/gameFolder/meta/data/Timings.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Int> = ["s" => 90, "a" => 80, "b" => 70, "c" => 50, "d" => 40, "e" => 20, "f" => 0,];
public static var scoreRating:Map<String, Int> = [
"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;
Expand Down
3 changes: 1 addition & 2 deletions source/gameFolder/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
99 changes: 56 additions & 43 deletions source/gameFolder/meta/state/charting/OriginalChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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());
}
Expand Down Expand Up @@ -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();
}
}

Expand All @@ -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;
}
}
}
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -758,7 +771,7 @@ class OriginalChartingState extends MusicBeatState

if (updateMusic)
{
FlxG.sound.music.pause();
songMusic.pause();
vocals.pause();

/*var daNum:Int = 0;
Expand All @@ -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();
}

Expand Down
3 changes: 1 addition & 2 deletions source/gameFolder/meta/state/menus/OptionsMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 499f81b

Please sign in to comment.