Skip to content

Commit

Permalink
additional fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealJake12 committed Nov 12, 2023
1 parent 7dd4f83 commit 9e561ca
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 58 deletions.
1 change: 1 addition & 0 deletions source/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Init extends MusicBeatState

CustomNoteHelpers.Skin.updateNoteskins();
CustomNoteHelpers.Splash.updateNotesplashes();


if (FlxG.save.data.volDownBind == null)
FlxG.save.data.volDownBind = "MINUS";
Expand Down
81 changes: 33 additions & 48 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,10 @@ class Note extends FlxSprite
{
case 'hurt':
{
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand All @@ -187,13 +184,10 @@ class Note extends FlxSprite
}
}
case 'mustpress':
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand Down Expand Up @@ -238,13 +232,10 @@ class Note extends FlxSprite
{
case 'hurt':
{
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand All @@ -257,13 +248,10 @@ class Note extends FlxSprite

case 'mustpress':
{
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand Down Expand Up @@ -300,13 +288,10 @@ class Note extends FlxSprite
{
case 'hurt':
{
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/hurt_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/hurt_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand All @@ -316,25 +301,25 @@ class Note extends FlxSprite
}

case 'mustpress':
switch (FlxG.save.data.noteskin)
{
default:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
case 1:
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
}
if (CustomNoteHelpers.Skin.getNoteskinByID(FlxG.save.data.noteskin).contains("Circles"))
frames = Paths.getSparrowAtlas("notetypes/mustpress_Circles", 'shared');
else
frames = Paths.getSparrowAtlas("notetypes/mustpress_Arrows", 'shared');
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
animation.addByPrefix(dataColor[i] + 'hold', dataColor[i] + ' hold'); // Hold
animation.addByPrefix(dataColor[i] + 'holdend', dataColor[i] + ' tail'); // Tails
}
default:
{
if (isPlayer)
frames = PlayState.noteskinSprite;
else
frames = PlayState.cpuNoteskinSprite;
{
switch (isPlayer)
{
case true:
frames = PlayState.noteskinSprite;
case false:
frames = PlayState.cpuNoteskinSprite;
}
for (i in 0...4)
{
animation.addByPrefix(dataColor[i] + 'Scroll', dataColor[i] + ' alone'); // Normal notes
Expand Down Expand Up @@ -422,7 +407,7 @@ class Note extends FlxSprite
prevNote.scale.y *= (stepHeight / prevNote.height);
prevNote.updateHitbox();

if (antialiasing)
if (noteTypeCheck != 'pixel')
prevNote.scale.y *= 1.0 + (1.0 / prevNote.frameHeight);

prevNote.updateHitbox();
Expand Down
6 changes: 6 additions & 0 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -4214,6 +4214,12 @@ class PlayState extends MusicBeatState
{
var bpmRatio = Conductor.bpm / 100;

if (PlayStateChangeables.zoom < 0.8)
PlayStateChangeables.zoom = 0.8;
if (PlayStateChangeables.zoom > 1.2)
PlayStateChangeables.zoom = 1.2;
// this motherfucker fucks me so much.

FlxG.camera.zoom = FlxMath.lerp(zoomForTweens, FlxG.camera.zoom,
CoolUtil.boundTo(1 - (elapsed * 3.125 * bpmRatio * songMultiplier * zoomMultiplier), 0, 1));
camHUD.zoom = FlxMath.lerp(PlayStateChangeables.zoom * zoomForHUDTweens, camHUD.zoom,
Expand Down
8 changes: 4 additions & 4 deletions source/ResultsScreen.hx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ResultsScreen extends FlxSubState
text = new FlxText(20, -55, 0, "Song Cleared!");
text.size = 34;
text.font = Paths.font("vcr.ttf");
text.setBorderStyle(FlxTextBorderStyle.OUTLINE, FlxColor.BLACK, 4, 1);
text.setBorderStyle(FlxTextBorderStyle.OUTLINE_FAST, FlxColor.BLACK, 2, 2);
text.color = FlxColor.WHITE;
text.scrollFactor.set();
add(text);
Expand All @@ -95,15 +95,15 @@ class ResultsScreen extends FlxSubState
');
comboText.size = 28;
comboText.font = Paths.font("vcr.ttf");
comboText.setBorderStyle(FlxTextBorderStyle.OUTLINE, FlxColor.BLACK, 4, 1);
comboText.setBorderStyle(FlxTextBorderStyle.OUTLINE_FAST, FlxColor.BLACK, 2, 2);
comboText.color = FlxColor.WHITE;
comboText.scrollFactor.set();
add(comboText);

contText = new FlxText(FlxG.width - 475, FlxG.height + 50, 0, 'Press ENTER to continue.');
contText.font = Paths.font("vcr.ttf");
contText.size = 28;
contText.setBorderStyle(FlxTextBorderStyle.OUTLINE, FlxColor.BLACK, 4, 1);
contText.setBorderStyle(FlxTextBorderStyle.OUTLINE_FAST, FlxColor.BLACK, 2, 2);
contText.color = FlxColor.WHITE;
contText.scrollFactor.set();
add(contText);
Expand Down Expand Up @@ -166,7 +166,7 @@ class ResultsScreen extends FlxSubState
'Mean: ${mean}ms (MARV:${Ratings.timingWindows[4]}ms,SICK:${Ratings.timingWindows[3]}ms,GOOD:${Ratings.timingWindows[2]}ms,BAD:${Ratings.timingWindows[1]}ms,SHIT:${Ratings.timingWindows[0]}ms)');
settingsText.size = 16;
settingsText.font = Paths.font("vcr.ttf");
settingsText.setBorderStyle(FlxTextBorderStyle.OUTLINE, FlxColor.BLACK, 2, 1);
settingsText.setBorderStyle(FlxTextBorderStyle.OUTLINE_FAST, FlxColor.BLACK, 2, 2);
settingsText.color = FlxColor.WHITE;
settingsText.scrollFactor.set();
add(settingsText);
Expand Down
19 changes: 13 additions & 6 deletions source/debug/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import openfl.events.Event;
import openfl.events.IOErrorEvent;
import openfl.media.Sound;
import openfl.net.FileReference;
import CoolUtil.CoolText;
#if FEATURE_DISCORD
import Discord.DiscordClient;
#end
Expand Down Expand Up @@ -69,7 +70,7 @@ class ChartingState extends MusicBeatState

var noteShit:Int = 0;
var shits:Array<String> = ['normal', 'hurt', 'mustpress'];
var notetypetext:FlxText;
var notetypetext:CoolText;

public var beatsShown:Float = 1; // for the zoom factor
public var zoomFactor:Float = 0.4;
Expand All @@ -81,7 +82,7 @@ class ChartingState extends MusicBeatState
// var curSection:Int = 0;
public static var lastSection:Int = 0;

var bpmTxt:FlxText;
var bpmTxt:CoolText;

var strumLine:FlxSprite;
var curSong:String = 'Dad Battle';
Expand Down Expand Up @@ -373,13 +374,17 @@ class ChartingState extends MusicBeatState
leftIcon.scrollFactor.set();
rightIcon.scrollFactor.set();

bpmTxt = new FlxText(985, 25, 0, "", 16);
bpmTxt.font = Paths.font("vcr.ttf");
bpmTxt = new CoolText(985, 25, 16, 16, Paths.bitmapFont('fonts/vcr'));
bpmTxt.autoSize = true;
bpmTxt.antialiasing = true;
bpmTxt.updateHitbox();
bpmTxt.scrollFactor.set();
add(bpmTxt);

notetypetext = new FlxText(825, 650, "", 28);
notetypetext.font = Paths.font("vcr.ttf");
notetypetext = new CoolText(825, 650, 28, 28, Paths.bitmapFont('fonts/vcr'));
notetypetext.autoSize = true;
notetypetext.antialiasing = true;
notetypetext.updateHitbox();
notetypetext.scrollFactor.set();
add(notetypetext);

Expand Down Expand Up @@ -3106,6 +3111,7 @@ class ChartingState extends MusicBeatState
+ (doSnapShit ? "Snap enabled" : "Snap disabled")
+
(FlxG.save.data.showHelp ? "\n\nHelp:\nCtrl-MWheel : Zoom in/out\nShift-Left/Right :\n Change playback speed\nCtrl-Drag Click : Select notes\nCtrl-C : Copy notes\nCtrl-V : Paste notes\nCtrl-Z : Undo\nDelete : Delete selection\nCTRL-Left/Right :\n Change Snap\nHold Shift : Disable Snap\nClick:\n Place notes\nUp/Down :\n Move selected notes 1 step\nShift-Up/Down :\n Move selected notes 1 beat\nSpace: Play Music\nEnter : Preview\n Z/X Change Notetype.\nPress F1 to hide/show this!" : "");
bpmTxt.updateHitbox();

super.update(elapsed);
}
Expand Down Expand Up @@ -3800,6 +3806,7 @@ class ChartingState extends MusicBeatState
notename = "Must Press";
}
notetypetext.text = "Note Type: " + notename;
notetypetext.updateHitbox();
}

function cleanObjects()
Expand Down

0 comments on commit 9e561ca

Please sign in to comment.