diff --git a/source/objects/Note.hx b/source/objects/Note.hx index 5473827d..bfd96f5f 100644 --- a/source/objects/Note.hx +++ b/source/objects/Note.hx @@ -240,36 +240,28 @@ class Note extends FlxSprite if (rgbShader != null && rgbShader.enabled) defaultRGB(); if(noteData > -1 && noteType != value) { - switch(value) { - case 'Hurt Note': - ignoreNote = mustPress; - //reloadNote('HURTNOTE_assets'); - //this used to change the note texture to HURTNOTE_assets.png, - //but i've changed it to something more optimized with the implementation of RGBPalette: - - // note colors - rgbShader.r = 0xFF101010; - rgbShader.g = 0xFFFF0000; - rgbShader.b = 0xFF990022; - - // splash data and colors - //noteSplashData.r = 0xFFFF0000; - //noteSplashData.g = 0xFF101010; - noteSplashData.texture = 'noteSplashes-electric'; - - // gameplay data - lowPriority = true; - missHealth = isSustainNote ? 0.25 : 0.1; - hitCausesMiss = true; - hitsound = 'cancelMenu'; - hitsoundChartEditor = false; - case 'Alt Animation': - animSuffix = '-alt'; - case 'No Animation': - noAnimation = true; - noMissAnimation = true; - case 'GF Sing': - gfNote = true; + if (value == 'Hurt Note') { + ignoreNote = mustPress; + //reloadNote('HURTNOTE_assets'); + //this used to change the note texture to HURTNOTE_assets.png, + //but i've changed it to something more optimized with the implementation of RGBPalette: + + // note colors + rgbShader.r = 0xFF101010; + rgbShader.g = 0xFFFF0000; + rgbShader.b = 0xFF990022; + + // splash data and colors + //noteSplashData.r = 0xFFFF0000; + //noteSplashData.g = 0xFF101010; + noteSplashData.texture = 'noteSplashes-electric'; + + // gameplay data + lowPriority = true; + missHealth = isSustainNote ? 0.25 : 0.1; + hitCausesMiss = true; + hitsound = 'cancelMenu'; + hitsoundChartEditor = false; } if (value != null && value.length > 1) NoteTypesConfig.applyNoteTypeData(this, value); if (hitsound != 'hitsound' && hitsoundVolume > 0) Paths.sound(hitsound); //precache new sound for being idiot-proof @@ -687,11 +679,9 @@ class Note extends FlxSprite isSustainEnds = toBool(target.noteData & (1<<10)); // isHoldEnd gfNote = toBool(target.noteData & (1<<11)); // gfNote animSuffix = toBool(target.noteData & (1<<12)) ? "-alt" : ""; // altAnim - noAnimation = toBool(target.noteData & (1<<13)); // noAnim - noMissAnimation = toBool(target.noteData & (1<<14)); // noMissAnim + noAnimation = noMissAnimation = toBool(target.noteData & (1<<13)); // noAnim blockHit = toBool(target.noteData & (1<<15)); // blockHit noteData = target.noteData & 3; - noteType = target.noteType; // Absoluty should be here, or messing pixel texture glitches... if (!PlayState.isPixelStage) { @@ -704,6 +694,9 @@ class Note extends FlxSprite rgbShader.g = colorRef.g; rgbShader.b = colorRef.b; + if (target.noteType is String) noteType = target.noteType; // applying note color on damage notes + else noteType = defaultNoteTypes[Std.parseInt(target.noteType)]; + if (PlayState.SONG != null && PlayState.SONG.disableNoteRGB) rgbShader.enabled = false; sustainLength = target.holdLength ?? 0; diff --git a/source/options/OptimizeSettingsSubState.hx b/source/options/OptimizeSettingsSubState.hx index 49dcb403..e9c409ea 100644 --- a/source/options/OptimizeSettingsSubState.hx +++ b/source/options/OptimizeSettingsSubState.hx @@ -93,7 +93,7 @@ class OptimizeSettingsSubState extends BaseOptionsMenu addOption(option); var option:Option = new Option('Process Notes before Spawning', - "If checked, it process notes before they spawn.\nIt boosts game performance vastly.\n It is recommended to enable this option.", + "If checked, it process notes before they spawn.\nIt boosts game performance vastly.\nIt is recommended to enable this option.", 'processFirst', BOOL); addOption(option); @@ -123,13 +123,13 @@ class OptimizeSettingsSubState extends BaseOptionsMenu addOption(option); var option:Option = new Option('spawnNoteEvent', - "If unchecked, the game will not send any event on Lua/HScript for spawned notes.\nImproves performance.", + "If unchecked, the game will not send spawn event\non Lua/HScript for spawned notes. Improves performance.", 'spawnNoteEvent', BOOL); addOption(option); var option:Option = new Option('noteHitEvents for Skipped Notes', - "If unchecked, the game will not send any event on Lua/HScript for skipped notes.\nImproves performance.", + "If unchecked, the game will not send any hit event\non Lua/HScript for skipped notes. Improves performance.", 'skipNoteEvent', BOOL); addOption(option); diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index b908399f..5a93b8b3 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -1782,12 +1782,11 @@ class PlayState extends MusicBeatState } holdLength = songNotes[2]; - noteType = songNotes[3]; swagNote = { strumTime: songNotes[0], noteData: noteColumn, - noteType: Math.isNaN(songNotes[3]) ? songNotes[3] : null, + noteType: songNotes[3], holdLength: holdLength, noteSkin: SONG.arrowSkin ?? null }; @@ -1795,8 +1794,7 @@ class PlayState extends MusicBeatState swagNote.noteData |= gottaHitNote ? 1<<8 : 0; // mustHit swagNote.noteData |= (section.gfSection && (songNotes[1]<4) || songNotes[3] == 'GF Sing' || songNotes[3] == 4) ? 1<<11 : 0; // gfNote swagNote.noteData |= (section.altAnim || (songNotes[3] == 'Alt Animation' || songNotes[3] == 1)) ? 1<<12 : 0; // altAnim - swagNote.noteData |= (songNotes[3] == 'No Animation' || songNotes[3] == 5) ? 3<<13 : 0; // noAnimation & noMissAnimaiton - swagNote.noteData |= (songNotes[3] == 'Hurt Note' || songNotes[3] == 3) ? 1<<15 : 0; + swagNote.noteData |= (songNotes[3] == 'No Animation' || songNotes[3] == 5) ? 1<<13 : 0; // noAnimation & noMissAnimaiton unspawnNotes.push(swagNote);