Skip to content

Commit

Permalink
fixes and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshubs authored and Yoshubs committed Sep 24, 2021
1 parent 2203717 commit 9f61be2
Show file tree
Hide file tree
Showing 58 changed files with 102 additions and 1,227 deletions.
Binary file added assets/images/UI/default/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 removed assets/images/UI/default/base/numbers/num-.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num0.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num1.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num2.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num3.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num4.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num5.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num6.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num7.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num8.png
Binary file not shown.
Binary file removed assets/images/UI/default/base/numbers/num9.png
Binary file not shown.
Binary file not shown.
36 changes: 0 additions & 36 deletions assets/images/UI/default/base/speech_bubble_talking.xml

This file was deleted.

Binary file added assets/images/UI/default/pixel/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 removed assets/images/UI/default/pixel/dialogueBox-evil.png
Binary file not shown.
17 changes: 0 additions & 17 deletions assets/images/UI/default/pixel/dialogueBox-evil.xml

This file was deleted.

Binary file removed assets/images/UI/default/pixel/dialogueBox-pixel.png
Binary file not shown.
10 changes: 0 additions & 10 deletions assets/images/UI/default/pixel/dialogueBox-pixel.xml

This file was deleted.

Binary file not shown.
13 changes: 0 additions & 13 deletions assets/images/UI/default/pixel/dialogueBox-senpaiMad.xml

This file was deleted.

Binary file removed assets/images/UI/default/pixel/hand_textbox.png
Binary file not shown.
Binary file added assets/images/UI/default/pixel/judgements.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 removed assets/images/UI/default/pixel/num-.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num0.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num1.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num2.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num3.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num4.png
Binary file not shown.
Binary file removed assets/images/UI/default/pixel/num5.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/num6.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/num7.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/num8.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/num9.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/bad-timings.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/bad.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/combo.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/good-timings.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/good.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/miss.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/shit-timings.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/shit.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/sick-perfect.png
Diff not rendered.
Binary file removed assets/images/UI/default/pixel/ratings/sick.png
Diff not rendered.
Binary file added assets/images/UI/forever/pixel/judgements.png
Binary file removed assets/images/UI/forever/pixel/ratings/bad.png
Diff not rendered.
Binary file removed assets/images/UI/forever/pixel/ratings/good.png
Diff not rendered.
Binary file removed assets/images/UI/forever/pixel/ratings/miss.png
Diff not rendered.
Binary file removed assets/images/UI/forever/pixel/ratings/shit.png
Diff not rendered.
Binary file removed assets/images/UI/forever/pixel/ratings/sick-perfect.png
Diff not rendered.
Binary file removed assets/images/UI/forever/pixel/ratings/sick.png
Diff not rendered.
63 changes: 36 additions & 27 deletions source/ForeverAssets.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,21 @@ using StringTools;
class ForeverAssets
{
//
public static function generateCombo(asset:String, assetModifier:String = 'base', changeableSkin:String = 'default', baseLibrary:String, negative:Bool,
createdColor:FlxColor, scoreInt:Int):FlxSprite
public static function generateCombo(asset:String, number:String, allSicks:Bool, assetModifier:String = 'base', changeableSkin:String = 'default',
baseLibrary:String, negative:Bool, createdColor:FlxColor, scoreInt:Int):FlxSprite
{
var newSprite:FlxSprite = new FlxSprite().loadGraphic(Paths.image(ForeverTools.returnSkinAsset(asset, assetModifier, changeableSkin, baseLibrary)));
var width = 100;
var height = 140;

if (assetModifier == 'pixel')
{
width = 10;
height = 12;
}
var newSprite:FlxSprite = new FlxSprite().loadGraphic(Paths.image(ForeverTools.returnSkinAsset(asset, assetModifier, changeableSkin, baseLibrary)),
true, width, height);
switch (assetModifier)
{
case 'pixel':
newSprite.alpha = 1;
newSprite.screenCenter();
newSprite.x += (43 * scoreInt) + 20;
newSprite.y += 60;

newSprite.color = FlxColor.WHITE;
if (negative)
newSprite.color = createdColor;

newSprite.setGraphicSize(Std.int(newSprite.width * PlayState.daPixelZoom));
newSprite.updateHitbox();

newSprite.acceleration.y = FlxG.random.int(200, 300);
newSprite.velocity.y = -FlxG.random.int(140, 160);
newSprite.velocity.x = FlxG.random.float(-5, 5);

default:
newSprite.alpha = 1;
newSprite.screenCenter();
Expand All @@ -55,23 +47,40 @@ class ForeverAssets
if (negative)
newSprite.color = createdColor;

newSprite.antialiasing = (!Init.trueSettings.get('Disable Antialiasing'));
newSprite.setGraphicSize(Std.int(newSprite.width * 0.5));
newSprite.updateHitbox();
newSprite.animation.add('base', [
(Std.parseInt(number) != null ? Std.parseInt(number) + 1 : 0) + (!allSicks ? 0 : 11)
], 0, false);
newSprite.animation.play('base');
}

newSprite.acceleration.y = FlxG.random.int(200, 300);
newSprite.velocity.y = -FlxG.random.int(140, 160);
newSprite.velocity.x = FlxG.random.float(-5, 5);
if (assetModifier == 'pixel')
newSprite.setGraphicSize(Std.int(newSprite.width * PlayState.daPixelZoom));
else
{
newSprite.antialiasing = (!Init.trueSettings.get('Disable Antialiasing'));
newSprite.setGraphicSize(Std.int(newSprite.width * 0.5));
}
newSprite.updateHitbox();

newSprite.acceleration.y = FlxG.random.int(200, 300);
newSprite.velocity.y = -FlxG.random.int(140, 160);
newSprite.velocity.x = FlxG.random.float(-5, 5);

return newSprite;
}

public static function generateRating(asset:String, perfectSick:Bool, timing:String, assetModifier:String = 'base', changeableSkin:String = 'default',
baseLibrary:String):FlxSprite
{
var width = 500;
var height = 163;
if (assetModifier == 'pixel')
{
width = 72;
height = 32;
}
var rating:FlxSprite = new FlxSprite().loadGraphic(Paths.image(ForeverTools.returnSkinAsset('judgements', assetModifier, changeableSkin,
baseLibrary)), true, 500, 163);
baseLibrary)), true, width, height);
switch (assetModifier)
{
default:
Expand Down
8 changes: 6 additions & 2 deletions source/Init.hx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ class Init extends FlxState
0,
"Fixes the judgements to the camera instead of to the world itself, making them easier to read."
],
'Display Miss Count' => [false, 0, "When enabled, displays the amount of misses you have in a song."],
'Display Miss Count' => [
false,
0,
"When enabled, displays the amount of combo breaks you have in a song."
],
];

public static var trueSettings:Map<String, Dynamic> = [];
Expand Down Expand Up @@ -182,7 +186,7 @@ class Init extends FlxState
FlxG.mouse.useSystemCursor = true; // Use system cursor because it's prettier
FlxG.mouse.visible = false; // Hide mouse on start

// Main.switchState(this, new TestState());
// Main.switchState(this, new ChartingState());
gotoTitleScreen();
}

Expand Down
2 changes: 1 addition & 1 deletion source/gameFolder/gameObjects/userInterface/ClassHUD.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class ClassHUD extends FlxTypedGroup<FlxBasic>
{
scoreBar.text += ' // Accuracy: ' + Std.string(Math.floor(Timings.getAccuracy() * 100) / 100) + '%' + Timings.comboDisplay;
if (Init.trueSettings.get('Display Miss Count'))
scoreBar.text += ' // Misses: ' + Std.string(PlayState.misses);
scoreBar.text += ' // Combo Breaks: ' + Std.string(PlayState.misses);
scoreBar.text += ' // Rank: ' + Std.string(Timings.returnScoreRating().toUpperCase());
}

Expand Down
32 changes: 20 additions & 12 deletions source/gameFolder/meta/state/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ class PlayState extends MusicBeatState

// cache ratings LOL
displayRating('sick', 'early', true);
popUpCombo(true);

stageBuild = new Stage(curStage);
add(stageBuild);
Expand Down Expand Up @@ -486,15 +487,12 @@ class PlayState extends MusicBeatState
}

// spawn in the notes from the array
if (unspawnNotes[0] != null)
if ((unspawnNotes[0] != null) && ((unspawnNotes[0].strumTime - Conductor.songPosition) < 3500))
{
if ((unspawnNotes[0].strumTime - Conductor.songPosition) < 3500)
{
var dunceNote:Note = unspawnNotes[0];
// push note to its correct strumline
strumLines.members[Math.floor((dunceNote.noteData + (dunceNote.mustPress ? 4 : 0)) / numberOfKeys)].push(dunceNote);
unspawnNotes.splice(unspawnNotes.indexOf(dunceNote), 1);
}
var dunceNote:Note = unspawnNotes[0];
// push note to its correct strumline
strumLines.members[Math.floor((dunceNote.noteData + (dunceNote.mustPress ? 4 : 0)) / numberOfKeys)].push(dunceNote);
unspawnNotes.splice(unspawnNotes.indexOf(dunceNote), 1);
}

noteCalls();
Expand Down Expand Up @@ -1014,7 +1012,7 @@ class PlayState extends MusicBeatState

private var createdColor = FlxColor.fromRGB(204, 66, 66);

function popUpCombo()
function popUpCombo(?preload:Bool = false)
{
var comboString:String = Std.string(combo);
var negative = false;
Expand All @@ -1024,9 +1022,19 @@ class PlayState extends MusicBeatState
for (scoreInt in 0...stringArray.length)
{
// numScore.loadGraphic(Paths.image('UI/' + pixelModifier + 'num' + stringArray[scoreInt]));
var numScore = ForeverAssets.generateCombo('numbers/num' + stringArray[scoreInt], assetModifier, changeableSkin, 'UI', negative, createdColor,
scoreInt);
var numScore = ForeverAssets.generateCombo('combo', stringArray[scoreInt], (!negative ? allSicks : false), assetModifier, changeableSkin, 'UI',
negative, createdColor, scoreInt);
add(numScore);
// hardcoded lmao
if (Init.trueSettings.get('SM-like Judgements'))
{
numScore.cameras = [camHUD];
numScore.x += 100;
numScore.y += 50;
}

if (preload)
numScore.visible = false;

FlxTween.tween(numScore, {alpha: 0}, 0.2, {
onComplete: function(tween:FlxTween)
Expand Down Expand Up @@ -1054,13 +1062,13 @@ class PlayState extends MusicBeatState
misses++;

// display negative combo
popUpCombo();
if (popMiss)
{
// doesnt matter miss ratings dont have timings
displayRating("miss", 'late');
healthCall(Timings.judgementsMap.get("miss")[3]);
}
popUpCombo();

// gotta do it manually here lol
Timings.updateFCDisplay();
Expand Down
Loading

0 comments on commit 9f61be2

Please sign in to comment.