funny commit

This commit is contained in:
KadeDev 2021-04-04 18:08:19 -07:00
parent 5aad3d7818
commit fb55d993e1
8 changed files with 50 additions and 32 deletions

View File

@ -1,6 +1,7 @@
package;
import Song.SwagSong;
import flixel.FlxG;
/**
* ...
@ -24,7 +25,8 @@ class Conductor
public static var offset:Float = 0;
public static var safeFrames:Int = 10;
public static var safeZoneOffset:Float = (safeFrames / 60) * 1000; // is calculated in create(), is safeFrames in milliseconds
public static var safeZoneOffset:Float = Math.floor((safeFrames / 60) * 1000); // is calculated in create(), is safeFrames in milliseconds
public static var timeScale:Float = Conductor.safeZoneOffset / 166;
public static var bpmChangeMap:Array<BPMChangeEvent> = [];
@ -32,6 +34,13 @@ class Conductor
{
}
public static function recalculateTimings()
{
Conductor.safeFrames = FlxG.save.data.frames;
Conductor.safeZoneOffset = Math.floor((Conductor.safeFrames / 60) * 1000);
Conductor.timeScale = Conductor.safeZoneOffset / 166;
}
public static function mapBPMChanges(song:SwagSong)
{
bpmChangeMap = [];

View File

@ -54,8 +54,7 @@ class KadeEngineData
if (FlxG.save.data.frames == null)
FlxG.save.data.frames = 10;
Conductor.safeFrames = FlxG.save.data.frames;
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
Conductor.recalculateTimings();
(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
}

View File

@ -36,9 +36,9 @@ class MainMenuState extends MusicBeatState
var newGaming2:FlxText;
var newInput:Bool = true;
public static var nightly:String = "";
public static var nightly:String = "-Nightly2";
public static var kadeEngineVer:String = "1.4" + nightly;
public static var kadeEngineVer:String = "1.4.1" + nightly;
public static var gameVer:String = "0.2.7.1";
var magenta:FlxSprite;

View File

@ -48,7 +48,7 @@ class Note extends FlxSprite
x += 50;
// MAKE SURE ITS DEFINITELY OFF SCREEN?
y -= 2000;
this.strumTime = strumTime + FlxG.save.data.offset;
this.strumTime = strumTime;
if (this.strumTime < 0 )
this.strumTime = 0;
@ -172,7 +172,7 @@ class Note extends FlxSprite
prevNote.animation.play('redhold');
}
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.8 * PlayState.SONG.speed;
prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.8 * FlxG.save.data.scrollSpeed;
prevNote.updateHitbox();
// prevNote.setGraphicSize();
}

View File

@ -181,31 +181,39 @@ class Judgement extends Option
}
override function left():Bool {
if (Conductor.safeFrames == 1)
return false;
Conductor.safeFrames -= 1;
FlxG.save.data.frames = Conductor.safeFrames;
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
Conductor.recalculateTimings();
OptionsMenu.versionShit.text = "Current Safe Frames: " + Conductor.safeFrames + " - Description - " + description +
" - SIK: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.25, 0) +
"ms GD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.40, 0) +
"ms BD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.50, 0) +
"ms SHT: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.70, 0) +
" - SIK: " + OptionsMenu.truncateFloat(45 * Conductor.timeScale, 0) +
"ms GD: " + OptionsMenu.truncateFloat(90 * Conductor.timeScale, 0) +
"ms BD: " + OptionsMenu.truncateFloat(135 * Conductor.timeScale, 0) +
"ms SHT: " + OptionsMenu.truncateFloat(155 * Conductor.timeScale, 0) +
"ms TOTAL: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
return true;
}
override function right():Bool {
if (Conductor.safeFrames == 20)
return false;
Conductor.safeFrames += 1;
FlxG.save.data.frames = Conductor.safeFrames;
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
Conductor.recalculateTimings();
OptionsMenu.versionShit.text = "Current Safe Frames: " + Conductor.safeFrames + " - Description - " + description +
" - SIK: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.25, 0) +
"ms GD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.40, 0) +
"ms BD: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.50, 0) +
"ms SHT: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset * 0.70, 0) +
" - SIK: " + OptionsMenu.truncateFloat(45 * Conductor.timeScale, 0) +
"ms GD: " + OptionsMenu.truncateFloat(90 * Conductor.timeScale, 0) +
"ms BD: " + OptionsMenu.truncateFloat(135 * Conductor.timeScale, 0) +
"ms SHT: " + OptionsMenu.truncateFloat(155 * Conductor.timeScale, 0) +
"ms TOTAL: " + OptionsMenu.truncateFloat(Conductor.safeZoneOffset,0) + "ms";
return true;
}

View File

@ -24,7 +24,7 @@ class OptionsMenu extends MusicBeatState
new DFJKOption(controls),
new Judgement("Customize your Hit Timings (LEFT or RIGHT)"),
#if !html
new FPSCapOption("Cap your FPS (Left for -10, Right for -10. SHIFT to go faster)"),
new FPSCapOption("Cap your FPS (Left for -10, Right for +10. SHIFT to go faster)"),
#end
new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If its at 1, it will be chart dependent)"),
new OffsetMenu("Get a note offset based off of your inputs!"),

View File

@ -259,7 +259,7 @@ class PlayState extends MusicBeatState
Conductor.mapBPMChanges(SONG);
Conductor.changeBPM(SONG.bpm);
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset);
trace('INFORMATION ABOUT WHAT U PLAYIN WIT:\nFRAMES: ' + Conductor.safeFrames + '\nZONE: ' + Conductor.safeZoneOffset + '\nTS: ' + Conductor.timeScale);
switch (SONG.song.toLowerCase())
{
@ -1233,7 +1233,9 @@ class PlayState extends MusicBeatState
for (songNotes in section.sectionNotes)
{
var daStrumTime:Float = songNotes[0];
var daStrumTime:Float = songNotes[0] + FlxG.save.data.offset;
if (daStrumTime < 0)
daStrumTime = 0;
var daNoteData:Int = Std.int(songNotes[1] % 4);
var gottaHitNote:Bool = section.mustHitSection;
@ -2158,7 +2160,7 @@ class PlayState extends MusicBeatState
private function popUpScore(daNote:Note):Void
{
var noteDiff:Float = Math.abs(Conductor.songPosition - daNote.strumTime);
var wife:Float = EtternaFunctions.wife3(noteDiff, 1.7);
var wife:Float = EtternaFunctions.wife3(noteDiff, Conductor.timeScale);
// boyfriend.playAnim('hey');
vocals.volume = 1;

View File

@ -3,27 +3,27 @@ class Ratings
public static function CalculateRating(noteDiff:Float, ?customSafeZone:Float):String
{
if (customSafeZone == null)
{
Conductor.safeZoneOffset = (Conductor.safeFrames / 60) * 1000;
customSafeZone = Conductor.safeZoneOffset;
}
var customTimeScale = Conductor.timeScale;
if (customSafeZone != null)
customTimeScale = customSafeZone / 166;
// trace(customTimeScale + ' vs ' + Conductor.timeScale);
// I HATE THIS IF CONDITION
// IF LEMON SEES THIS I'M SORRY :(
if (noteDiff > customSafeZone * 0.50) // way early
if (noteDiff > 135 * customTimeScale) // way early
return "shit";
else if (noteDiff > customSafeZone * 0.26) // early
else if (noteDiff > 90 * customTimeScale) // early
return "bad";
else if (noteDiff > customSafeZone * 0.20) // your kinda there
else if (noteDiff > 45 * customTimeScale) // your kinda there
return "good";
else if (noteDiff < customSafeZone * -0.20) // little late
else if (noteDiff < -45 * customTimeScale) // little late
return "good";
else if (noteDiff < customSafeZone * -0.26) // late
else if (noteDiff < -90 * customTimeScale) // late
return "bad";
else if (noteDiff < customSafeZone * -0.50) // late as fuck
else if (noteDiff < -135 * customTimeScale) // late as fuck
return "shit";
return "sick";
}