1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-08-20 23:45:04 +00:00

Revert "in-engine shit for new chart format"

This reverts commit 4b5173f9b7.
This commit is contained in:
Cameron Taylor 2021-06-22 16:06:40 -04:00
parent 4b5173f9b7
commit e2fbf5a300
4 changed files with 26 additions and 24 deletions

View file

@ -6,6 +6,7 @@ import Song.SwagSong;
* ...
* @author
*/
typedef BPMChangeEvent =
{
var stepTime:Int;
@ -27,7 +28,9 @@ class Conductor
public static var bpmChangeMap:Array<BPMChangeEvent> = [];
public function new() {}
public function new()
{
}
public static function mapBPMChanges(song:SwagSong)
{
@ -36,11 +39,11 @@ class Conductor
var curBPM:Float = song.bpm;
var totalSteps:Int = 0;
var totalPos:Float = 0;
for (i in 0...song.notes[PlayState.storyDifficulty].length)
for (i in 0...song.notes.length)
{
if (song.notes[PlayState.storyDifficulty][i].changeBPM && song.notes[PlayState.storyDifficulty][i].bpm != curBPM)
if(song.notes[i].changeBPM && song.notes[i].bpm != curBPM)
{
curBPM = song.notes[PlayState.storyDifficulty][i].bpm;
curBPM = song.notes[i].bpm;
var event:BPMChangeEvent = {
stepTime: totalSteps,
songTime: totalPos,
@ -49,7 +52,7 @@ class Conductor
bpmChangeMap.push(event);
}
var deltaSteps:Int = song.notes[PlayState.storyDifficulty][i].lengthInSteps;
var deltaSteps:Int = song.notes[i].lengthInSteps;
totalSteps += deltaSteps;
totalPos += ((60 / curBPM) * 1000 / 4) * deltaSteps;
}

View file

@ -187,7 +187,7 @@ class Note extends FlxSprite
prevNote.animation.play('redhold');
}
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed[PlayState.storyDifficulty];
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * PlayState.SONG.speed;
prevNote.updateHitbox();
// prevNote.setGraphicSize();
}

View file

@ -1594,7 +1594,7 @@ class PlayState extends MusicBeatState
var noteData:Array<SwagSection>;
// NEW SHIT
noteData = songData.notes[storyDifficulty];
noteData = songData.notes;
for (section in noteData)
{
@ -2003,9 +2003,9 @@ class PlayState extends MusicBeatState
changeSection(-1);
#end
if (generatedMusic && SONG.notes[storyDifficulty][Std.int(curStep / 16)] != null)
if (generatedMusic && SONG.notes[Std.int(curStep / 16)] != null)
{
cameraRightSide = SONG.notes[storyDifficulty][Std.int(curStep / 16)].mustHitSection;
cameraRightSide = SONG.notes[Std.int(curStep / 16)].mustHitSection;
cameraMovement();
}
@ -2093,8 +2093,7 @@ class PlayState extends MusicBeatState
}
}
while (unspawnNotes[0] != null
&& unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SONG.speed[PlayState.storyDifficulty])
while (unspawnNotes[0] != null && unspawnNotes[0].strumTime - Conductor.songPosition < 1800 / SONG.speed)
{
var dunceNote:Note = unspawnNotes[0];
notes.add(dunceNote);
@ -2123,7 +2122,7 @@ class PlayState extends MusicBeatState
if (PreferencesMenu.getPref('downscroll'))
{
daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed[storyDifficulty], 2)));
daNote.y = (strumLine.y + (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
if (daNote.isSustainNote)
{
@ -2146,7 +2145,7 @@ class PlayState extends MusicBeatState
}
else
{
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed[storyDifficulty], 2)));
daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2)));
if (daNote.isSustainNote
&& (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit)))
@ -2167,9 +2166,9 @@ class PlayState extends MusicBeatState
var altAnim:String = "";
if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)] != null)
if (SONG.notes[Math.floor(curStep / 16)] != null)
{
if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)].altAnim)
if (SONG.notes[Math.floor(curStep / 16)].altAnim)
altAnim = '-alt';
}
@ -2263,9 +2262,9 @@ class PlayState extends MusicBeatState
var daPos:Float = 0;
for (i in 0...(Std.int(curStep / 16 + sec)))
{
if (SONG.notes[storyDifficulty][i].changeBPM)
if (SONG.notes[i].changeBPM)
{
daBPM = SONG.notes[storyDifficulty][i].bpm;
daBPM = SONG.notes[i].bpm;
}
daPos += 4 * (1000 * 60 / daBPM);
}
@ -2974,17 +2973,17 @@ class PlayState extends MusicBeatState
notes.sort(sortNotes, FlxSort.DESCENDING);
}
if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)] != null)
if (SONG.notes[Math.floor(curStep / 16)] != null)
{
if (SONG.notes[storyDifficulty][Math.floor(curStep / 16)].changeBPM)
if (SONG.notes[Math.floor(curStep / 16)].changeBPM)
{
Conductor.changeBPM(SONG.notes[storyDifficulty][Math.floor(curStep / 16)].bpm);
Conductor.changeBPM(SONG.notes[Math.floor(curStep / 16)].bpm);
FlxG.log.add('CHANGED BPM!');
}
// else
// Conductor.changeBPM(SONG.bpm);
}
// FlxG.log.add('change bpm' + SONG.notes[storyDifficulty][Std.int(curStep / 16)].changeBPM);
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
wiggleShit.update(Conductor.crochet);
// HARDCODING FOR MILF ZOOMS!

View file

@ -10,10 +10,10 @@ using StringTools;
typedef SwagSong =
{
var song:String;
var notes:Array<Array<SwagSection>>;
var notes:Array<SwagSection>;
var bpm:Float;
var needsVoices:Bool;
var speed:Array<Float>;
var speed:Float;
var player1:String;
var player2:String;
@ -26,7 +26,7 @@ class Song
public var notes:Array<SwagSection>;
public var bpm:Float;
public var needsVoices:Bool = true;
public var speed:Array<Float> = [1, 1, 1];
public var speed:Float = 1;
public var player1:String = 'bf';
public var player2:String = 'dad';