Skip to content

Commit

Permalink
YESYES!!!
Browse files Browse the repository at this point in the history
APPLIED RED NOTE STUFF TO NOTE SPLASHES
some.. fixings
  • Loading branch information
JordanSantiagoYT committed Nov 22, 2023
1 parent ee7de70 commit ef47a38
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 93 deletions.
Binary file added assets/shared/images/RED_TGTNOTE_assets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions assets/shared/images/RED_TGTNOTE_assets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="QUANTNOTE_assets.png">
<!-- Created with Adobe Animate version 20.0.3.25487 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="arrowDOWN0000" x="640" y="560" width="160" height="160"/>
<SubTexture name="arrowLEFT0000" x="800" y="560" width="160" height="160"/>
<SubTexture name="arrowRIGHT0000" x="960" y="560" width="160" height="160"/>
<SubTexture name="arrowUP0000" x="560" y="720" width="160" height="160"/>
<SubTexture name="blue0000" x="0" y="1120" width="160" height="160"/>
<SubTexture name="blue hold end0000" x="560" y="1040" width="46" height="58"/>
<SubTexture name="blue hold piece0000" x="560" y="560" width="46" height="43"/>
<SubTexture name="down confirm0000" x="0" y="0" width="280" height="280"/>
<SubTexture name="down confirm0001" x="280" y="0" width="280" height="280"/>
<SubTexture name="down confirm0002" x="560" y="0" width="280" height="280"/>
<SubTexture name="down confirm0003" x="560" y="0" width="280" height="280"/>
<SubTexture name="down press0000" x="560" y="880" width="160" height="160"/>
<SubTexture name="down press0001" x="560" y="880" width="160" height="160"/>
<SubTexture name="down press0002" x="640" y="1040" width="160" height="160"/>
<SubTexture name="down press0003" x="640" y="1040" width="160" height="160"/>
<SubTexture name="green0000" x="160" y="1120" width="160" height="160"/>
<SubTexture name="green hold end0000" x="560" y="1040" width="46" height="58"/>
<SubTexture name="green hold piece0000" x="560" y="560" width="46" height="43"/>
<SubTexture name="left confirm0000" x="840" y="0" width="280" height="280"/>
<SubTexture name="left confirm0001" x="0" y="280" width="280" height="280"/>
<SubTexture name="left confirm0002" x="0" y="560" width="280" height="280"/>
<SubTexture name="left confirm0003" x="0" y="560" width="280" height="280"/>
<SubTexture name="left press0000" x="720" y="720" width="160" height="160"/>
<SubTexture name="left press0001" x="720" y="720" width="160" height="160"/>
<SubTexture name="left press0002" x="720" y="880" width="160" height="160"/>
<SubTexture name="left press0003" x="720" y="880" width="160" height="160"/>
<SubTexture name="pruple end hold0000" x="560" y="1040" width="46" height="58"/>
<SubTexture name="purple0000" x="320" y="1120" width="160" height="160"/>
<SubTexture name="purple hold piece0000" x="560" y="560" width="46" height="43"/>
<SubTexture name="red0000" x="480" y="1120" width="160" height="160"/>
<SubTexture name="red hold end0000" x="560" y="1040" width="46" height="58"/>
<SubTexture name="red hold piece0000" x="560" y="560" width="46" height="43"/>
<SubTexture name="right confirm0000" x="0" y="840" width="280" height="280"/>
<SubTexture name="right confirm0001" x="280" y="280" width="280" height="280"/>
<SubTexture name="right confirm0002" x="560" y="280" width="280" height="280"/>
<SubTexture name="right confirm0003" x="560" y="280" width="280" height="280"/>
<SubTexture name="right press0000" x="800" y="1040" width="160" height="160"/>
<SubTexture name="right press0001" x="800" y="1040" width="160" height="160"/>
<SubTexture name="right press0002" x="960" y="720" width="160" height="160"/>
<SubTexture name="right press0003" x="960" y="720" width="160" height="160"/>
<SubTexture name="up confirm0000" x="840" y="280" width="280" height="280"/>
<SubTexture name="up confirm0001" x="280" y="560" width="280" height="280"/>
<SubTexture name="up confirm0002" x="280" y="840" width="280" height="280"/>
<SubTexture name="up confirm0003" x="280" y="840" width="280" height="280"/>
<SubTexture name="up press0000" x="880" y="880" width="160" height="160"/>
<SubTexture name="up press0001" x="880" y="880" width="160" height="160"/>
<SubTexture name="up press0002" x="960" y="1040" width="160" height="160"/>
<SubTexture name="up press0003" x="960" y="1040" width="160" height="160"/>
</TextureAtlas>
3 changes: 2 additions & 1 deletion source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Note extends FlxSprite
public static var colArray:Array<String> = ['purple', 'blue', 'green', 'red'];
private var pixelInt:Array<Int> = [0, 1, 2, 3];
public static var beats:Array<Int> = [4, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192,256,384,512,768,1024,1536,2048,3072,6144];
public var arrowAngles:Array<Int> = [180, 90, 270, 0]; //This is used for quantized note colors

// Lua shit
public var noteSplashDisabled:Bool = false;
Expand Down Expand Up @@ -343,7 +344,7 @@ class Note extends FlxSprite
texture = 'NOTE_assets_' + ClientPrefs.noteStyleThing.toLowerCase();
}
if(ClientPrefs.noteColorStyle == 'Quant-Based' || ClientPrefs.rainbowNotes) {
texture = 'RED_NOTE_assets';
texture = ClientPrefs.noteStyleThing == 'TGT V4' ? 'RED_TGTNOTE_assets' : 'RED_NOTE_assets';
}
if(ClientPrefs.noteColorStyle == 'Char-Based') {
texture = 'NOTE_assets_colored';
Expand Down
28 changes: 18 additions & 10 deletions source/NoteSplash.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import NoteShader.ColoredNoteShader;
import flixel.util.FlxColor;

class NoteSplash extends FlxSprite
{
Expand All @@ -20,7 +22,7 @@ class NoteSplash extends FlxSprite

colorSwap = new ColorSwap();
shader = colorSwap.shader;
if (!ClientPrefs.colorQuants)
if (ClientPrefs.noteColorStyle == 'Normal')
{
colorSwap.hue = ClientPrefs.arrowHSV[note][0] / 360;
colorSwap.saturation = ClientPrefs.arrowHSV[note][1] / 100;
Expand All @@ -29,9 +31,10 @@ class NoteSplash extends FlxSprite

setupNoteSplash(x, y, note);
antialiasing = ClientPrefs.globalAntialiasing;
if (ClientPrefs.noteColorStyle == 'Char-Based') shader = new ColoredNoteShader(255, 255, 255, false);
}

public function setupNoteSplash(x:Float, y:Float, note:Int = 0, texture:String = null, hueColor:Float = 0, satColor:Float = 0, brtColor:Float = 0) {
public function setupNoteSplash(x:Float, y:Float, note:Int = 0, texture:String = null, hueColor:Float = 0, satColor:Float = 0, brtColor:Float = 0, color:FlxColor = null) {
setPosition(x - Note.swagWidth * 0.95, y - Note.swagWidth);
alpha = 0.6;

Expand All @@ -57,35 +60,40 @@ class NoteSplash extends FlxSprite
if(textureLoaded != texture) {
loadAnims(texture);
}
if (!ClientPrefs.colorQuants)
if (ClientPrefs.noteColorStyle != 'Char-Based')
{
colorSwap.hue = hueColor;
colorSwap.saturation = satColor;
colorSwap.brightness = brtColor;
colorSwap.hue = hueColor;
colorSwap.saturation = satColor;
colorSwap.brightness = brtColor;
} else if (color != null && ClientPrefs.noteColorStyle == 'Char-Based') { //null check
cast(shader, ColoredNoteShader).enabled.value = [true];
cast(shader, ColoredNoteShader).setColors(color.red, color.green, color.blue);
}
if (ClientPrefs.splashType != 'Base Game') {
offset.set(10, 10);
} else {
offset.set(-10, 0);
}

var splashToPlay:Int = note;
if (ClientPrefs.noteColorStyle == 'Quant-Based' || ClientPrefs.noteColorStyle == 'Char-Based' || ClientPrefs.rainbowNotes)
splashToPlay = (ClientPrefs.splashType != 'TGT V4' ? 3 : 1); //for tgt noteskin, the down note is the red splash
var animNum:Int = 0;
if (ClientPrefs.splashType != 'Doki Doki+' && ClientPrefs.splashType != 'Base Game')
{
animNum = FlxG.random.int(1, 2);
animation.play('note' + note + '-' + animNum, true);
animation.play('note' + splashToPlay + '-' + animNum, true);
if(animation.curAnim != null)animation.curAnim.frameRate = 24 + FlxG.random.int(-2, 2);
}
if (ClientPrefs.splashType == 'Doki Doki+')
{
animNum = 1;
animation.play('note' + note, true);
animation.play('note' + splashToPlay, true);
if(animation.curAnim != null)animation.curAnim.frameRate = 24 + FlxG.random.int(-2, 2);
}
if (ClientPrefs.splashType == 'Base Game')
{
animNum = FlxG.random.int(0, 1);
animation.play('note' + note + '-' + animNum, true);
animation.play('note' + splashToPlay + '-' + animNum, true);
if(animation.curAnim != null)animation.curAnim.frameRate = 24 + FlxG.random.int(-2, 2);
}
}
Expand Down
Loading

0 comments on commit ef47a38

Please sign in to comment.