Skip to content

Commit 9b51916

Browse files
committed
Revert "e"
This reverts commit 9cc8fc2.
1 parent 9cc8fc2 commit 9b51916

File tree

5 files changed

+44
-116
lines changed

5 files changed

+44
-116
lines changed

source/archipelago/CustomAPLogic.hx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,8 +1196,6 @@ class APHScriptProcessor {
11961196
return;
11971197
}
11981198

1199-
trace('Executing AP script: ${scriptPath} for mod: ${modInfo.name}');
1200-
12011199
var scriptContent = File.getContent(scriptPath);
12021200
var parser = new Parser();
12031201
var interpreter = new Interp();

source/objects/NoteSplash.hx

Lines changed: 9 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import backend.animation.PsychAnimationController;
44
import shaders.RGBPalette;
55
import flixel.system.FlxAssets.FlxShader;
66
import objects.charting.ChartingStrumNote;
7-
import flixel.FlxSprite;
8-
import flixel.animation.FlxBaseAnimation;
9-
import flixel.graphics.frames.FlxAtlasFrames;
10-
import flixel.util.FlxColor;
11-
import shaders.ColorSwap.ColorSwap;
12-
import objects.NoteObject;
137

148
typedef RGB = {
159
r:Null<Int>,
@@ -34,13 +28,14 @@ typedef NoteSplashConfig = {
3428
rgb:Array<Null<RGB>>
3529
}
3630

37-
class NoteSplash extends NoteObject
31+
class NoteSplash extends FlxSprite
3832
{
3933
public var rgbShader:PixelSplashShaderRef;
4034
public var texture:String;
4135
public var config(default, set):NoteSplashConfig;
4236
public var babyArrow:StrumNote;
4337
public var babyArrowCharting:ChartingStrumNote;
38+
public var noteData:Int = 0;
4439

4540
public var copyX:Bool = true;
4641
public var copyY:Bool = true;
@@ -165,37 +160,10 @@ class NoteSplash extends NoteObject
165160
}
166161
}
167162

168-
// Get current key count from PlayState or default to 4
169-
var keyCount:Int = 4; // Default fallback
170-
if (PlayState.instance != null && PlayState.instance.playfields != null && PlayState.instance.playfields.members.length > 0) {
171-
keyCount = PlayState.instance.playfields.members[0].keyCount;
172-
} else if (PlayState.mania >= 0 && PlayState.mania < Note.ammo.length) {
173-
keyCount = Note.ammo[PlayState.mania];
174-
}
175-
176-
// Get the appropriate color array for the current key count
177-
var colArray:Array<String> = [];
178-
if (PlayState.mania >= 0 && PlayState.mania < Note.ammo.length && Note.keysShit.exists(PlayState.mania)) {
179-
var keyData = Note.keysShit.get(PlayState.mania);
180-
if (keyData.exists("letters") && keyData.get("letters") is Array) {
181-
var letters:Array<String> = cast keyData.get("letters");
182-
colArray = letters.map(letter -> letter.toLowerCase()); // Convert to lowercase for consistency
183-
}
184-
}
185-
186-
// Fallback to default if no proper key data found
187-
if (colArray.length == 0) {
188-
colArray = Note.colArray.copy();
189-
// Extend if we need more keys
190-
while (colArray.length < keyCount) {
191-
colArray.push('key${colArray.length}');
192-
}
193-
}
194-
195163
var failedToFind:Bool = false;
196164
while (true)
197165
{
198-
for (v in colArray)
166+
for (v in Note.colArray)
199167
{
200168
if (!checkForAnim('$anim $v ${maxAnims+1}'))
201169
{
@@ -209,9 +177,9 @@ class NoteSplash extends NoteObject
209177

210178
for (animNum in 0...maxAnims)
211179
{
212-
for (i => col in colArray)
180+
for (i => col in Note.colArray)
213181
{
214-
var data:Int = i % colArray.length + (animNum * colArray.length);
182+
var data:Int = i % Note.colArray.length + (animNum * Note.colArray.length);
215183
var name:String = animNum > 0 ? '$col' + (animNum + 1) : col;
216184
var offset:Array<Float> = offsets[FlxMath.wrap(data, 0, Std.int(offsets.length-1))];
217185
addAnimationToConfig(tempConfig, 1, name, '$anim $col ${animNum + 1}', fps, offset, [], data);
@@ -249,40 +217,16 @@ class NoteSplash extends NoteObject
249217
if (note != null)
250218
noteData = note.noteData;
251219

252-
// Get current key count for proper noteData calculation
253-
var keyCount:Int = 4; // Default fallback
254-
var colArray:Array<String> = Note.colArray.copy();
255-
256-
if (PlayState.instance != null && PlayState.instance.playfields != null && PlayState.instance.playfields.members.length > 0) {
257-
keyCount = PlayState.instance.playfields.members[0].keyCount;
258-
} else if (PlayState.mania >= 0 && PlayState.mania < Note.ammo.length) {
259-
keyCount = Note.ammo[PlayState.mania];
260-
}
261-
262-
// Get the appropriate color array for the current key count
263-
if (PlayState.mania >= 0 && PlayState.mania < Note.ammo.length && Note.keysShit.exists(PlayState.mania)) {
264-
var keyData = Note.keysShit.get(PlayState.mania);
265-
if (keyData.exists("letters") && keyData.get("letters") is Array) {
266-
var letters:Array<String> = cast keyData.get("letters");
267-
colArray = letters.map(letter -> letter.toLowerCase());
268-
}
269-
}
270-
271-
// Extend color array if needed
272-
while (colArray.length < keyCount) {
273-
colArray.push('key${colArray.length}');
274-
}
275-
276220
if (randomize && maxAnims > 1)
277-
noteData = noteData % colArray.length + (FlxG.random.int(0, maxAnims - 1) * colArray.length);
221+
noteData = noteData % Note.colArray.length + (FlxG.random.int(0, maxAnims - 1) * Note.colArray.length);
278222

279223
this.noteData = noteData;
280224
var anim:String = playDefaultAnim();
281225

282226
var tempShader:RGBPalette = null;
283227
if (config.allowRGB)
284228
{
285-
Note.initializeGlobalRGBShader(noteData % colArray.length);
229+
Note.initializeGlobalRGBShader(noteData % Note.colArray.length);
286230
if (inEditor || (note == null || note.noteSplashData.useRGBShader) && (PlayState.SONG == null || !PlayState.SONG.disableNoteRGB))
287231
{
288232
tempShader = new RGBPalette();
@@ -296,17 +240,8 @@ class NoteSplash extends NoteObject
296240
{
297241
if (i > 2) break;
298242

299-
var rgbIndex = noteData % colArray.length;
300-
var arr:Array<FlxColor> = null;
301-
// Ensure we don't go out of bounds for RGB arrays
302-
if (rgbIndex < ClientPrefs.data.arrowRGB.length) {
303-
arr = ClientPrefs.data.arrowRGB[rgbIndex];
304-
if (PlayState.isPixelStage && rgbIndex < ClientPrefs.data.arrowRGBPixel.length)
305-
arr = ClientPrefs.data.arrowRGBPixel[rgbIndex];
306-
} else {
307-
// Fallback to default RGB values for extended keys
308-
arr = [FlxColor.WHITE, FlxColor.WHITE, FlxColor.WHITE];
309-
}
243+
var arr:Array<FlxColor> = ClientPrefs.data.arrowRGB[noteData % Note.colArray.length];
244+
if (PlayState.isPixelStage) arr = ClientPrefs.data.arrowRGBPixel[noteData % Note.colArray.length];
310245

311246
var rgb = colors[i];
312247
if (rgb == null)

source/objects/playfields/NoteField.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class NoteField extends FieldBase
278278

279279

280280
// draw notesplashes
281-
for (obj in field.grpNoteSplashes.members)
281+
/*for (obj in field.grpNoteSplashes.members)
282282
{
283283
if (!obj.exists || !obj.visible)
284284
continue;
@@ -290,7 +290,7 @@ class NoteField extends FieldBase
290290
object.zIndex += 0.5;
291291
lookupMap.set(obj, object);
292292
drawQueue.push(object);
293-
}
293+
}*/
294294

295295
// draw strumattachments
296296
for (obj in field.strumAttachments.members)

source/objects/playfields/PlayField.hx

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,11 @@ class PlayField extends FlxTypedGroup<FlxBasic>
216216
strumAttachments.visible = false;
217217
add(strumAttachments);
218218

219-
// Pre-allocate a few note splashes for better performance
220-
for (i in 0...4) {
221-
var splash:NoteSplash = new NoteSplash();
222-
splash.handleRendering = false;
223-
splash.alpha = 0.0;
224-
splash.kill(); // Start them as killed objects in the pool
225-
grpNoteSplashes.add(splash);
226-
}
219+
/*var splash:NoteSplash = new NoteSplash(100, 100, 0);
220+
splash.handleRendering = false;
221+
grpNoteSplashes.add(splash);
222+
grpNoteSplashes.visible = false; // so they dont get drawn
223+
splash.alpha = 0.0;*/
227224

228225
////
229226
noteField = new NoteField(this, modMgr);
@@ -919,35 +916,33 @@ class PlayField extends FlxTypedGroup<FlxBasic>
919916

920917
// spawns a notesplash w/ specified skin. optional note to derive the skin and colours from.
921918

922-
public function spawnSplash(note:Note, ?splashSkin:String):NoteSplash {
923-
if (note == null) return null;
924-
925-
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
926-
if (splash == null) {
927-
splash = new NoteSplash();
928-
grpNoteSplashes.add(splash);
929-
}
930-
931-
// Set position based on the strum/note position
932-
var strumX:Float = 0;
933-
var strumY:Float = 0;
934-
if (note.column < strumNotes.length) {
935-
var strum = strumNotes[note.column];
936-
if (strum != null) {
937-
strumX = strum.x;
938-
strumY = strum.y;
939-
}
919+
/*public function spawnSplash(note:Note, splashSkin:String){
920+
var skin:String;
921+
var hue:Float;
922+
var sat:Float;
923+
var brt:Float;
924+
925+
if (note != null) {
926+
skin = note.noteSplashTexture;
927+
hue = note.noteSplashHue;
928+
sat = note.noteSplashSat;
929+
brt = note.noteSplashBrt;
930+
}else{
931+
skin = splashSkin;
932+
hue = sat = brt = 0.0;
933+
934+
/*var hsb = ClientPrefs.arrowHSV[note.column % 4];
935+
hue = hsb[0] / 360;
936+
sat = hsb[1] / 100;
937+
brt = hsb[2] / 100;
940938
}
941-
942-
splash.spawnSplashNote(strumX, strumY, note.noteData, note);
939+
940+
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
941+
splash.setupNoteSplash(0, 0, note.column, skin, hue, sat, brt, note);
943942
splash.handleRendering = false;
944-
943+
grpNoteSplashes.add(splash);
945944
return splash;
946-
}
947-
948-
public function spawnNoteSplashOnNote(note:Note):NoteSplash {
949-
return spawnSplash(note);
950-
}
945+
}*/
951946

952947
// spawns notes, deals w/ hold inputs, etc.
953948
override public function update(elapsed:Float){

source/states/PlayState.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8150,8 +8150,8 @@ class PlayState extends MusicBeatState
81508150
note.rating = daRating.name;
81518151
score = daRating.score;
81528152

8153-
if(daRating.noteSplash && !note.noteSplashData.disabled && !note.isSustainNote)
8154-
note.field.spawnNoteSplashOnNote(note);
8153+
//if(daRating.noteSplash && !note.noteSplashData.disabled)
8154+
//note.field.spawnNoteSplashOnNote(note);
81558155

81568156
if(!cpuControlled) {
81578157
comboManager.songScore += Math.ceil(score * MechanicManager.multiplier);
@@ -8330,8 +8330,8 @@ class PlayState extends MusicBeatState
83308330
note.rating = daRating.name;
83318331
score = daRating.score;
83328332

8333-
if(daRating.noteSplash && !note.noteSplashData.disabled && !note.isSustainNote)
8334-
note.field.spawnNoteSplashOnNote(note);
8333+
//if(daRating.noteSplash && !note.noteSplashData.disabled)
8334+
//note.field.spawnNoteSplashOnNote(note);
83358335

83368336
if(!cpuControlled) {
83378337
comboManager.songScore += score;

0 commit comments

Comments
 (0)