Skip to content

Commit

Permalink
what the hell
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Mar 19, 2024
1 parent 6b08410 commit df6ac34
Show file tree
Hide file tree
Showing 20 changed files with 215 additions and 79 deletions.
Binary file added art/flashFiles/RECOVER_NOTE_splashes.fla
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/shared/images/HURTNOTE_assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<SubTexture name="green hold piece0000" x="60" y="5" width="50" height="44"/>
<SubTexture name="green0000" x="277" y="5" width="157" height="154"/>
<SubTexture name="purple0000" x="5" y="164" width="154" height="157"/>
<SubTexture name="pruple end hold0000" x="5" y="5" width="50" height="64"/>
<SubTexture name="purple end hold0000" x="5" y="5" width="50" height="64"/>
<SubTexture name="purple hold piece0000" x="60" y="5" width="50" height="44"/>
<SubTexture name="red hold end0000" x="5" y="5" width="50" height="64"/>
<SubTexture name="red hold piece0000" x="60" y="5" width="50" height="44"/>
Expand Down
2 changes: 1 addition & 1 deletion assets/shared/images/NOTE_assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<SubTexture name="left press0017" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press0018" x="1898" y="150" width="146" height="149"/>
<SubTexture name="left press0019" x="1898" y="150" width="146" height="149"/>
<SubTexture name="pruple end hold0000" x="1117" y="452" width="51" height="64"/>
<SubTexture name="purple end hold0000" x="1117" y="452" width="51" height="64"/>
<SubTexture name="purple hold piece0000" x="1337" y="457" width="51" height="44"/>
<SubTexture name="purple0000" x="0" y="398" width="154" height="157"/>
<SubTexture name="red hold end0000" x="952" y="452" width="51" height="64"/>
Expand Down
Binary file added assets/shared/images/splashes/diamond.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions assets/shared/images/splashes/diamond.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="diamond.png">
<!-- Created with Adobe Animate version 24.0.1.329 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="note splash blue 10000" x="0" y="0" width="382" height="304"/>
<SubTexture name="note splash blue 10001" x="382" y="0" width="382" height="304"/>
<SubTexture name="note splash blue 10002" x="764" y="0" width="382" height="304"/>
<SubTexture name="note splash blue 10003" x="1146" y="0" width="382" height="304"/>
<SubTexture name="note splash blue 20000" x="1528" y="0" width="382" height="305"/>
<SubTexture name="note splash blue 20001" x="1910" y="0" width="382" height="305"/>
<SubTexture name="note splash blue 20002" x="2292" y="0" width="382" height="305"/>
<SubTexture name="note splash blue 20003" x="2674" y="0" width="382" height="305"/>
<SubTexture name="note splash green 10000" x="3056" y="0" width="382" height="304"/>
<SubTexture name="note splash green 10001" x="3438" y="0" width="382" height="304"/>
<SubTexture name="note splash green 10002" x="0" y="305" width="382" height="304"/>
<SubTexture name="note splash green 10003" x="382" y="305" width="382" height="304"/>
<SubTexture name="note splash green 20000" x="764" y="305" width="382" height="304"/>
<SubTexture name="note splash green 20001" x="1146" y="305" width="382" height="304"/>
<SubTexture name="note splash green 20002" x="1528" y="305" width="382" height="304"/>
<SubTexture name="note splash green 20003" x="1910" y="305" width="382" height="304"/>
<SubTexture name="note splash purple 10000" x="2292" y="305" width="382" height="304"/>
<SubTexture name="note splash purple 10001" x="2674" y="305" width="382" height="304"/>
<SubTexture name="note splash purple 10002" x="3056" y="305" width="382" height="304"/>
<SubTexture name="note splash purple 10003" x="3438" y="305" width="382" height="304"/>
<SubTexture name="note splash purple 20000" x="0" y="609" width="382" height="304"/>
<SubTexture name="note splash purple 20001" x="382" y="609" width="382" height="304"/>
<SubTexture name="note splash purple 20002" x="764" y="609" width="382" height="304"/>
<SubTexture name="note splash purple 20003" x="1146" y="609" width="382" height="304"/>
<SubTexture name="note splash red 10000" x="1528" y="609" width="382" height="304"/>
<SubTexture name="note splash red 10001" x="1910" y="609" width="382" height="304"/>
<SubTexture name="note splash red 10002" x="2292" y="609" width="382" height="304"/>
<SubTexture name="note splash red 10003" x="2674" y="609" width="382" height="304"/>
<SubTexture name="note splash red 20000" x="3056" y="609" width="382" height="304"/>
<SubTexture name="note splash red 20001" x="3438" y="609" width="382" height="304"/>
<SubTexture name="note splash red 20002" x="0" y="913" width="382" height="304"/>
<SubTexture name="note splash red 20003" x="382" y="913" width="382" height="304"/>
</TextureAtlas>
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="HURTnoteSplashes.png">
<TextureAtlas imagePath="hurt.png">
<!-- Created with Adobe Animate version 21.0.6.41649 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="note splash blue 10000" x="5" y="5" width="273" height="199" frameX="-42" frameY="-73" frameWidth="349" frameHeight="255"/>
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="noteSplashes.png">
<TextureAtlas imagePath="normal.png">
<!-- Created with Adobe Animate version 21.0.7.42652 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="note splash blue 10000" x="0" y="0" width="194" height="186" frameX="-77" frameY="-87" frameWidth="291" frameHeight="303"/>
Expand Down
2 changes: 2 additions & 0 deletions source/backend/funkinLua/FunkinLua.hx
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ class FunkinLua {
set('scriptName', scriptName);
set('currentModDirectory', backend.utils.Paths.currentModDirectory);

set('scoreBarType', backend.utils.ClientPrefs.data.scoreBarType);


set('buildTarget', LuaUtils.getBuildTarget());

Expand Down
5 changes: 5 additions & 0 deletions source/backend/utils/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import backend.utils.Controls;
public var showFPS:Bool = true;
public var flashing:Bool = true;
public var noteSplashes:Bool = true;
public var noteSplashesType:String = 'normal';
public var forceNoteSplashes:Bool = false;
public var opnoteSplashes:Bool = true;
public var lowQuality:Bool = false;
public var hideFullHUD:Bool = false;
Expand Down Expand Up @@ -56,7 +58,10 @@ import backend.utils.Controls;
public var goodWindow:Int = 90;
public var badWindow:Int = 135;
public var safeFrames:Float = 10;

// Astro Engine
public var discordRPC:Bool = true;
public var scoreBarType:String = 'Astro';
}

class ClientPrefs {
Expand Down
4 changes: 0 additions & 4 deletions source/backend/utils/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,9 @@ class Paths

inline static public function voices(song:String):Any
{
#if html5
return 'songs:assets/songs/${formatToSongPath(song)}/Voices.$SOUND_EXT';
#else
var songKey:String = '${formatToSongPath(song)}/Voices';
var voices = returnSound('songs', songKey);
return voices;
#end
}

inline static public function inst(song:String):Any
Expand Down
2 changes: 1 addition & 1 deletion source/game/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class ChartingState extends MusicBeatState
bpm: 150.0,
needsVoices: true,
arrowSkin: '',
splashSkin: 'noteSplashes',//idk it would crash if i didn't
splashSkin: 'normal',//idk it would crash if i didn't
player1: 'bf',
player2: 'dad',
gfVersion: 'gf',
Expand Down
7 changes: 5 additions & 2 deletions source/game/editors/EditorPlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,11 @@ class EditorPlayState extends MusicBeatState
}

function spawnNoteSplash(x:Float, y:Float, data:Int, ?note:Note = null) {
var skin:String = 'noteSplashes';
if(PlayState.SONG.splashSkin != null && PlayState.SONG.splashSkin.length > 0) skin = PlayState.SONG.splashSkin;
var skin:String = 'normal';
if(ClientPrefs.data.noteSplashesType != 'normal')
skin = ClientPrefs.data.noteSplashesType;
else
skin = PlayState.SONG.splashSkin;

var hue:Float = backend.utils.ClientPrefs.data.arrowHSV[data % 4][0] / 360;
var sat:Float = backend.utils.ClientPrefs.data.arrowHSV[data % 4][1] / 100;
Expand Down
4 changes: 2 additions & 2 deletions source/game/objects/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class Note extends FlxSprite
case 'Hurt Note':
ignoreNote = mustPress;
reloadNote('HURT');
noteSplashTexture = 'HURTnoteSplashes';
noteSplashTexture = 'hurt';
colorSwap.hue = 0;
colorSwap.saturation = 0;
colorSwap.brightness = 0;
Expand Down Expand Up @@ -329,7 +329,7 @@ class Note extends FlxSprite

if (isSustainNote)
{
animation.addByPrefix('purpleholdend', 'pruple end hold'); // ?????
animation.addByPrefix('purpleholdend', 'purple end hold'); // ?????
animation.addByPrefix(colArray[noteData] + 'holdend', colArray[noteData] + ' hold end');
animation.addByPrefix(colArray[noteData] + 'hold', colArray[noteData] + ' hold piece');
}
Expand Down
20 changes: 15 additions & 5 deletions source/game/objects/NoteSplash.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ class NoteSplash extends FlxSprite
public function new(x:Float = 0, y:Float = 0, ?note:Int = 0) {
super(x, y);

var skin:String = 'noteSplashes';
if(PlayState.SONG.splashSkin != null && PlayState.SONG.splashSkin.length > 0) skin = PlayState.SONG.splashSkin;
var skin:String = 'normal';
if(ClientPrefs.data.noteSplashesType != 'normal')
skin = ClientPrefs.data.noteSplashesType;
else
skin = PlayState.SONG.splashSkin;

trace(skin);

loadAnims(skin);

Expand All @@ -31,9 +36,14 @@ class NoteSplash extends FlxSprite
setPosition(x - Note.swagWidth * 0.95, y - Note.swagWidth);
alpha = 0.6;

trace(texture);

if(texture == null) {
texture = 'noteSplashes';
if(PlayState.SONG.splashSkin != null && PlayState.SONG.splashSkin.length > 0) texture = PlayState.SONG.splashSkin;
texture = 'normal';
if(ClientPrefs.data.noteSplashesType != 'normal')
texture = ClientPrefs.data.noteSplashesType;
else
texture = PlayState.SONG.splashSkin;
}

if(textureLoaded != texture) {
Expand All @@ -50,7 +60,7 @@ class NoteSplash extends FlxSprite
}

function loadAnims(skin:String) {
frames = backend.utils.Paths.getSparrowAtlas(skin);
frames = backend.utils.Paths.getSparrowAtlas('splashes/${skin}');
for (i in 1...3) {
animation.addByPrefix("note1-" + i, "note splash blue " + i, 24, false);
animation.addByPrefix("note2-" + i, "note splash green " + i, 24, false);
Expand Down
51 changes: 51 additions & 0 deletions source/game/objects/Scorebar.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package game.objects;

import backend.Highscore;

using StringTools;

class Scorebar extends FlxText {

public static var instance:Scorebar;

var inShit = "|";

public function new() {
instance = this;

super(0, PlayState.instance.healthBarBG.y + 36, FlxG.width, "", 20);
scrollFactor.set();
alpha = 0;
borderSize = 1.25;
visible = !ClientPrefs.data.hideFullHUD;

switch(ClientPrefs.data.scoreBarType){
case 'Astro':
setFormat(Paths.font("PhantomMuff.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
inShit = "";
case 'Psych':
setFormat(Paths.font("vcr.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
inShit = "|";
default:
setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
inShit = "";
}
}

public function updateShit() {
if(ClientPrefs.data.scoreBarType != 'Legacy'){
text = 'Score: '
+ PlayState.instance.songScore
+ ' $inShit Misses: '
+ PlayState.instance.songMisses
+ ' $inShit Rating: '
+ PlayState.instance.ratingName
+ (PlayState.instance.ratingName != '?' ? ' (${Highscore.floorDecimal(PlayState.instance.ratingPercent * 100, 2)}%) - ${PlayState.instance.ratingFC}' : '');

} else{
text = 'Score: '+
PlayState.instance.songScore;
}

}
}
1 change: 0 additions & 1 deletion source/game/options/OtherSettingsSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class OtherSettingsSubState extends BaseOptionsMenu
addOption(option);
option.onChange = onChangediscord;
#end


var option:Option = new Option('Hide HUD',
'Hide\'s all HUD elements\nimproves performance.',
Expand Down
24 changes: 24 additions & 0 deletions source/game/options/VisualsUISubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ class VisualsUISubState extends BaseOptionsMenu
true);
addOption(option);

var option:Option = new Option('Note Splashes Type:',
"Dude",
'noteSplashesType',
'string',
'normal',
['normal', 'diamond']);
addOption(option);

var option:Option = new Option('Force Splashes',
"Dude",
'forceNoteSplashes',
'bool',
false);
addOption(option);

var option:Option = new Option('Opponent Note Splashes',
"Dude.",
'opnoteSplashes',
Expand All @@ -59,6 +74,15 @@ class VisualsUISubState extends BaseOptionsMenu
['Time Left', 'Time Elapsed', 'Song Name', 'Disabled']);
addOption(option);


var option:Option = new Option('Score Bar:',
"What should the Score Bar display?",
'scoreBarType',
'string',
'Astro',
['Astro', 'Psych', 'Legacy']);
addOption(option);

var option:Option = new Option('Flashing Lights',
"Uncheck this if you're sensitive to flashing lights!",
'flashing',
Expand Down
Loading

0 comments on commit df6ac34

Please sign in to comment.