Skip to content

Commit e37fdf0

Browse files
if only i ca add ourple fox
1 parent a425042 commit e37fdf0

File tree

10 files changed

+73
-32
lines changed

10 files changed

+73
-32
lines changed

Project.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156
<!--Macro fixes-->
157157
<haxeflag name="--macro" value="allowPackage('flash')" />
158158
<haxeflag name="--macro" value="include('my.pack')" />
159+
<haxeflag name="--macro" value="macros.Keep.keepClasses()" />
160+
159161
<haxeflag name="-dce" value="std" unless="HSCRIPT_ALLOWED" />
160162
<haxeflag name="-dce" value="no" if="HSCRIPT_ALLOWED" />
161163

source/macros/Keep.hx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package macros;
2+
3+
#if macro
4+
import haxe.macro.Compiler;
5+
6+
using StringTools;
7+
8+
class Keep
9+
{
10+
// JUST WRITE THE CLASS PACKAGE AS STRING (e.g "flixel.effects.particles.FlxParticle") IT'S AS SIMPLE AS THAT
11+
public static var classesToKeep:Array<String> = [];
12+
13+
public static function keepClasses(){
14+
var packagesArray = [];
15+
for(clas in classesToKeep){
16+
var dotsSplit = clas.split('.');
17+
var pack = '';
18+
for(i in 0...dotsSplit.length-1) pack += dotsSplit[i] + '.';
19+
if(pack.endsWith('.')) pack = pack.substr(0, pack.length-1);
20+
packagesArray.push(pack);
21+
}
22+
for(pack in packagesArray) Compiler.include(pack);
23+
Compiler.keep(null, classesToKeep, true);
24+
}
25+
}
26+
#end

source/objects/NoteSplash.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class NoteSplash extends FlxSprite
3333
precacheConfig(skin);
3434
_configLoaded = skin;
3535
scrollFactor.set();
36-
//setupNoteSplash(x, y, 0);
36+
setupNoteSplash(x, y, 0);
3737
}
3838

3939
override function destroy()
@@ -181,7 +181,7 @@ class NoteSplash extends FlxSprite
181181
return animation.getByName(name) != null;
182182
}
183183

184-
static var aliveTime:Float = 0;
184+
private var aliveTime:Float = 0;
185185
static var buggedKillTime:Float = 0.5; //automatically kills note splashes if they break to prevent it from flooding your HUD
186186
override function update(elapsed:Float) {
187187
aliveTime += elapsed;

source/objects/StrumNote.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ class StrumNote extends FlxSprite
8181
case 0:
8282
animation.add('static', [0]);
8383
animation.add('pressed', [4, 8], 12, false);
84-
animation.add('confirm', [12, 16], 24, false);
84+
animation.add('confirm', [12, 16], 12, false);
8585
case 1:
8686
animation.add('static', [1]);
8787
animation.add('pressed', [5, 9], 12, false);
88-
animation.add('confirm', [13, 17], 24, false);
88+
animation.add('confirm', [13, 17], 12, false);
8989
case 2:
9090
animation.add('static', [2]);
9191
animation.add('pressed', [6, 10], 12, false);
9292
animation.add('confirm', [14, 18], 12, false);
9393
case 3:
9494
animation.add('static', [3]);
9595
animation.add('pressed', [7, 11], 12, false);
96-
animation.add('confirm', [15, 19], 24, false);
96+
animation.add('confirm', [15, 19], 12, false);
9797
}
9898
}
9999
else

source/options/NotesSubState.hx

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -653,18 +653,17 @@ class NotesSubState extends MusicBeatSubstate
653653

654654
function updateNotes(?instant:Bool = false)
655655
{
656-
for (note in modeNotes)
657-
note.alpha = (curSelectedMode == note.ID) ? 1 : 0.6;
656+
for (note in modeNotes) note.alpha = (curSelectedMode == note.ID) ? 1 : 0.6;
658657

659-
for (note in myNotes)
660-
{
658+
for (note in myNotes) {
661659
var newAnim:String = curSelectedNote == note.ID ? 'confirm' : 'pressed';
662660
note.alpha = (curSelectedNote == note.ID) ? 1 : 0.6;
663661
if(note.animation.curAnim == null || note.animation.curAnim.name != newAnim) note.playAnim(newAnim, true);
664662
if(instant) note.animation.curAnim.finish();
665663
}
666664
bigNote.animation.play('note$curSelectedNote', true);
667665
updateColors();
666+
fixColors(); // fixes your gosh dang note colors - DM-kun
668667
}
669668

670669
function updateColors(specific:Null<FlxColor> = null)
@@ -679,26 +678,38 @@ class NotesSubState extends MusicBeatSubstate
679678

680679
colorWheel.color = FlxColor.fromHSB(0, 0, color.brightness);
681680
colorWheelSelector.setPosition(colorWheel.x + colorWheel.width/2, colorWheel.y + colorWheel.height/2);
682-
if(wheelColor.brightness != 0)
683-
{
681+
if(wheelColor.brightness != 0) {
684682
var hueWrap:Float = wheelColor.hue * Math.PI / 180;
685683
colorWheelSelector.x += Math.sin(hueWrap) * colorWheel.width/2 * wheelColor.saturation;
686684
colorWheelSelector.y -= Math.cos(hueWrap) * colorWheel.height/2 * wheelColor.saturation;
687685
}
688686
colorGradientSelector.y = colorGradient.y + colorGradient.height * (1 - color.brightness);
689687

690688
var strumRGB:RGBShaderReference = myNotes.members[curSelectedNote].rgbShader;
691-
switch(curSelectedMode)
692-
{
693-
case 0:
694-
getShader().r = strumRGB.r = color;
695-
case 1:
696-
getShader().g = strumRGB.g = color;
697-
case 2:
698-
getShader().b = strumRGB.b = color;
689+
switch(curSelectedMode) {
690+
case 0: getShader().r = strumRGB.r = color;
691+
case 1: getShader().g = strumRGB.g = color;
692+
case 2: getShader().b = strumRGB.b = color;
699693
}
700694
}
701695

696+
function fixColors()
697+
{
698+
for (i in 0...3) {
699+
var strumRGB:RGBShaderReference = myNotes.members[curSelectedNote].rgbShader;
700+
var color:FlxColor = !onPixel ? ClientPrefs.data.arrowRGB[curSelectedNote][i] :
701+
ClientPrefs.data.arrowRGBPixel[curSelectedNote][i];
702+
switch(i) {
703+
case 0: getShader().r = strumRGB.r = color;
704+
case 1: getShader().g = strumRGB.g = color;
705+
case 2: getShader().b = strumRGB.b = color;
706+
}
707+
dataArray[curSelectedNote][i] = color;
708+
}
709+
setShaderColor(!onPixel ? ClientPrefs.data.arrowRGB[curSelectedNote][curSelectedMode] : ClientPrefs.data.arrowRGBPixel[curSelectedNote][curSelectedMode]);
710+
updateColors();
711+
}
712+
702713
function setShaderColor(value:FlxColor) dataArray[curSelectedNote][curSelectedMode] = value;
703714
function getShaderColor() return dataArray[curSelectedNote][curSelectedMode];
704715
function getShader() return Note.globalRgbShaders[curSelectedNote];

source/psychlua/HScript.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class HScript extends SScript
255255
{
256256
if(funk == null) funk = parentLua;
257257

258-
if(parentLua != null) funk.addLocalCallback(name, func);
258+
if(funk != null) funk.addLocalCallback(name, func);
259259
else FunkinLua.luaTrace('createCallback ($name): 3rd argument is null', false, false, FlxColor.RED);
260260
});
261261

source/psychlua/LuaUtils.hx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ class LuaUtils
3636

3737
public static function setVarInArray(instance:Dynamic, variable:String, value:Dynamic, allowMaps:Bool = false):Any
3838
{
39+
if (value == "true") value = true;
40+
3941
var splitProps:Array<String> = variable.split('[');
4042
if(splitProps.length > 1)
4143
{
4244
var target:Dynamic = null;
43-
if(PlayState.instance.variables.exists(splitProps[0]))
44-
{
45+
if(PlayState.instance.variables.exists(splitProps[0])) {
4546
var retVal:Dynamic = PlayState.instance.variables.get(splitProps[0]);
46-
if(retVal != null)
47-
target = retVal;
47+
if(retVal != null) target = retVal;
4848
}
4949
else target = Reflect.getProperty(instance, splitProps[0]);
5050

@@ -61,19 +61,18 @@ class LuaUtils
6161

6262
if(allowMaps && isMap(instance))
6363
{
64-
//trace(instance);
6564
instance.set(variable, value);
6665
return value;
6766
}
6867

69-
if(PlayState.instance.variables.exists(variable))
70-
{
68+
if(PlayState.instance.variables.exists(variable)) {
7169
PlayState.instance.variables.set(variable, value);
7270
return value;
7371
}
7472
Reflect.setProperty(instance, variable, value);
7573
return value;
7674
}
75+
7776
public static function getVarInArray(instance:Dynamic, variable:String, allowMaps:Bool = false):Any
7877
{
7978
var splitProps:Array<String> = variable.split('[');

source/states/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ class PlayState extends MusicBeatState
19091909

19101910
if(daNote.mustPress)
19111911
{
1912-
if(cpuControlled && !daNote.blockHit && daNote.canBeHit && (daNote.isSustainNote || daNote.strumTime <= Conductor.songPosition))
1912+
if(cpuControlled && !daNote.blockHit && daNote.canBeHit && ((daNote.isSustainNote && daNote.prevNote.wasGoodHit) || daNote.strumTime <= Conductor.songPosition))
19131913
goodNoteHit(daNote);
19141914
}
19151915
else if (daNote.wasGoodHit && !daNote.hitByOpponent && !daNote.ignoreNote)

source/states/editors/EditorPlayState.hx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,8 @@ class EditorPlayState extends MusicBeatSubstate
380380
var songSpeedType:String = ClientPrefs.getGameplaySetting('scrolltype');
381381
switch(songSpeedType)
382382
{
383-
case "multiplicative":
384-
songSpeed = PlayState.SONG.speed * ClientPrefs.getGameplaySetting('scrollspeed');
385-
case "constant":
386-
songSpeed = ClientPrefs.getGameplaySetting('scrollspeed');
383+
case "multiplicative": songSpeed = PlayState.SONG.speed * ClientPrefs.getGameplaySetting('scrollspeed');
384+
case "constant": songSpeed = ClientPrefs.getGameplaySetting('scrollspeed');
387385
}
388386
noteKillOffset = Math.max(Conductor.stepCrochet, 350 / songSpeed * playbackRate);
389387

source/substates/PauseSubState.hx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,20 @@ class PauseSubState extends MusicBeatSubstate
139139
blueballedTxt.alpha = 0;
140140
levelDifficulty.alpha = 0;
141141
levelInfo.alpha = 0;
142+
chartingText.alpha = 0;
143+
practiceText.alpha = 0;
144+
practiceText.y -= 5;
142145

143146
levelInfo.x = FlxG.width - (levelInfo.width + 20);
144147
levelDifficulty.x = FlxG.width - (levelDifficulty.width + 20);
145148
blueballedTxt.x = FlxG.width - (blueballedTxt.width + 20);
146149

147150
FlxTween.tween(bg, {alpha: 0.6}, 0.4, {ease: FlxEase.quartInOut});
151+
FlxTween.tween(chartingText, {alpha: 1}, 0.4, {ease: FlxEase.quartInOut});
148152
FlxTween.tween(levelInfo, {alpha: 1, y: 20}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.3});
149153
FlxTween.tween(levelDifficulty, {alpha: 1, y: levelDifficulty.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.5});
150154
FlxTween.tween(blueballedTxt, {alpha: 1, y: blueballedTxt.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.7});
155+
FlxTween.tween(practiceText, {alpha: 1, y: practiceText.y + 5}, 0.4, {ease: FlxEase.quartInOut, startDelay: 0.9});
151156

152157
grpMenuShit = new FlxTypedGroup<Alphabet>();
153158
add(grpMenuShit);

0 commit comments

Comments
 (0)