Skip to content

Commit d57b3cb

Browse files
committed
Note RGB fix + Toggleable note splashes for pre 0.6 mods
1 parent 963e1b9 commit d57b3cb

7 files changed

Lines changed: 36 additions & 22 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- Fixed the result screen accidentally making a camera that becomes the default draw target.
88
- Fixed the result screen occasionally failing to end the song.
99
- Fixed the HXCPP version used when compiling the windows build.
10+
- Fixed note RGB not being disabled on RGB Shader being disabled in the song
11+
- Added 2 checkboxes to the chart editor to disable note RGB or note splashes.
1012

1113
# [Solar Engine 0.6.0](https://github.com/Team-SolarEngine/Universe-Engine-Archive/releases/tag/0.6.0)
1214

source/Note.hx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class Note extends FlxSkewedSprite
7171
public var eventVal1:String = '';
7272
public var eventVal2:String = '';
7373

74-
public var colorSwap:ColorSwap;
7574
public var inEditor:Bool = false;
7675

7776
public var animSuffix:String = '';
@@ -192,12 +191,6 @@ class Note extends FlxSkewedSprite
192191
noteSplashData.texture = PlayState.SONG != null ? PlayState.SONG.splashSkin : 'noteSplashes';
193192

194193
noteSplashTexture = PlayState.SONG.splashSkin;
195-
if (noteData > -1 && noteData < ClientPrefs.arrowHSV.length)
196-
{
197-
colorSwap.hue = ClientPrefs.arrowHSV[noteData][0] / 360;
198-
colorSwap.saturation = ClientPrefs.arrowHSV[noteData][1] / 100;
199-
colorSwap.brightness = ClientPrefs.arrowHSV[noteData][2] / 100;
200-
}
201194

202195
if (noteData > -1 && noteType != value)
203196
{
@@ -207,9 +200,7 @@ class Note extends FlxSkewedSprite
207200
ignoreNote = mustPress;
208201
reloadNote('HURT');
209202
noteSplashTexture = 'HURTnoteSplashes';
210-
colorSwap.hue = 0;
211-
colorSwap.saturation = 0;
212-
colorSwap.brightness = 0;
203+
rgbShader.enabled = false;
213204
lowPriority = true;
214205

215206
if (isSustainNote)
@@ -231,9 +222,6 @@ class Note extends FlxSkewedSprite
231222
}
232223
noteType = value;
233224
}
234-
noteSplashHue = colorSwap.hue;
235-
noteSplashSat = colorSwap.saturation;
236-
noteSplashBrt = colorSwap.brightness;
237225
return value;
238226
}
239227

@@ -329,8 +317,6 @@ class Note extends FlxSkewedSprite
329317
if (noteData > -1)
330318
{
331319
texture = '';
332-
colorSwap = new ColorSwap();
333-
shader = colorSwap.shader;
334320

335321
x += swagWidth * (noteData);
336322
if (!isSustainNote && noteData > -1 && noteData < 4)
@@ -348,8 +334,6 @@ class Note extends FlxSkewedSprite
348334
catch (e)
349335
{
350336
};
351-
if (PlayState.SONG != null && PlayState.SONG.disableNoteRGB)
352-
rgbShader.enabled = useRGBShader = false;
353337
}
354338
else
355339
useRGBShader = false;
@@ -410,6 +394,8 @@ class Note extends FlxSkewedSprite
410394
earlyHitMult = 1;
411395
}
412396
x += offsetX;
397+
if (PlayState.SONG != null && PlayState.SONG.disableNoteRGB)
398+
rgbShader.enabled = useRGBShader = false;
413399
}
414400

415401
var lastNoteOffsetXForPixelAutoAdjusting:Float = 0;

source/PlayState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ class PlayState extends MusicBeatState
11691169
playfieldRenderer.cameras = [camHUD];
11701170
add(playfieldRenderer);
11711171
}
1172-
add(grpNoteSplashes);
1172+
if (!SONG.disableSplashes && ClientPrefs.noteSplashes) add(grpNoteSplashes);
11731173

11741174
camFollow = new FlxPoint();
11751175
camFollowPos = new FlxObject(0, 0, 1, 1);
@@ -5332,7 +5332,7 @@ class PlayState extends MusicBeatState
53325332

53335333
public function spawnNoteSplashOnNote(note:Note)
53345334
{
5335-
if (ClientPrefs.noteSplashes && note != null)
5335+
if (ClientPrefs.noteSplashes && !SONG.disableSplashes && note != null)
53365336
{
53375337
var strum:StrumNote = playerStrums.members[note.noteData];
53385338
if (strum != null)

source/Song.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ typedef SwagSong =
3030
var splashSkin:String;
3131

3232
@:optional var disableNoteRGB:Bool;
33+
@:optional var disableSplashes:Bool;
3334
}
3435

3536
class Song
@@ -47,6 +48,9 @@ class Song
4748
public var player2:String = 'dad';
4849
public var gfVersion:String = 'gf';
4950

51+
public var disableNoteRGB:Bool = false;
52+
public var disableSplashes:Bool = false;
53+
5054
private static function onLoadJson(songJson:Dynamic) // Convert old charts to newest format
5155
{
5256
if(songJson.gfVersion == null)

source/editors/ChartingState.hx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,25 @@ class ChartingState extends MusicBeatState
501501
// trace('CHECKED!');
502502
};
503503

504+
var check_rgbEnable = new FlxUICheckBox(10, 45, null, null, "Disable Note RGB", 100);
505+
check_rgbEnable.checked = _song.disableNoteRGB;
506+
// _song.needsVoices = check_voices.checked;
507+
check_rgbEnable.callback = function()
508+
{
509+
_song.disableNoteRGB = check_rgbEnable.checked;
510+
updateGrid();
511+
// trace('CHECKED!');
512+
};
513+
514+
var check_splashEnable = new FlxUICheckBox(110, 80, null, null, "Disable Note Splashes", 100);
515+
check_splashEnable.checked = _song.disableSplashes;
516+
// _song.needsVoices = check_voices.checked;
517+
check_splashEnable.callback = function()
518+
{
519+
_song.disableSplashes = check_splashEnable.checked;
520+
// trace('CHECKED!');
521+
};
522+
504523
var saveButton:FlxButton = new FlxButton(110, 8, "Save", function()
505524
{
506525
saveLevel();
@@ -570,7 +589,7 @@ class ChartingState extends MusicBeatState
570589
clear_notes.color = FlxColor.RED;
571590
clear_notes.label.color = FlxColor.WHITE;
572591

573-
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 70, 1, 1, 1, 400, 3);
592+
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 1, 1, 1, 400, 3);
574593
stepperBPM.value = Conductor.bpm;
575594
stepperBPM.name = 'song_bpm';
576595
blockPressWhileTypingOnStepper.push(stepperBPM);
@@ -726,6 +745,8 @@ class ChartingState extends MusicBeatState
726745
tab_group_song.add(UI_songTitle);
727746

728747
tab_group_song.add(check_voices);
748+
tab_group_song.add(check_rgbEnable);
749+
tab_group_song.add(check_splashEnable);
729750
tab_group_song.add(clear_events);
730751
tab_group_song.add(clear_notes);
731752
tab_group_song.add(saveButton);
@@ -740,7 +761,6 @@ class ChartingState extends MusicBeatState
740761
tab_group_song.add(noteSkinInputText);
741762
tab_group_song.add(noteSplashesInputText);
742763
tab_group_song.add(new FlxText(stepperBPM.x, stepperBPM.y - 15, 0, 'Song BPM:'));
743-
tab_group_song.add(new FlxText(stepperBPM.x + 100, stepperBPM.y - 15, 0, 'Song Offset:'));
744764
tab_group_song.add(new FlxText(stepperSpeed.x, stepperSpeed.y - 15, 0, 'Song Speed:'));
745765
tab_group_song.add(new FlxText(player2DropDown.x, player2DropDown.y - 15, 0, 'Opponent:'));
746766
tab_group_song.add(new FlxText(gfVersionDropDown.x, gfVersionDropDown.y - 15, 0, 'Girlfriend:'));

source/import.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import Paths;
33
#if VIDEOS_ALLOWED
44
#if (hxCodec <= "2.5.1") // hxcodec fix *yay sound effect*
55
import vlc.MP4Handler;
6-
#else
6+
#elseif (hxCodec <= "2.6.1")
77
import hxcodec.VideoHandler as MP4Handler;
8+
#else
9+
import hxcodec.FlxVideo as MP4Handler;
810
#end
911
#end
1012
import flixel.FlxSprite;

0 commit comments

Comments
 (0)