Skip to content

Commit a54d501

Browse files
committed
Merge branch 'AP-CustomEx' of https://github.com/Z11Coding/Mixtape-Engine-Rework into AP-CustomEx
2 parents 05b25e4 + 13902a0 commit a54d501

File tree

9 files changed

+199
-128
lines changed

9 files changed

+199
-128
lines changed

source/archipelago/APItem.hx

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ class APItem {
16761676
"Pong Challenge",
16771677
"Math Problem Trap",
16781678
"Pocket Lens",
1679-
"Nothing"
1679+
"Lonely Friday Night"
16801680
];
16811681
for (name in itemNames) {
16821682
createItemByName(name);
@@ -2223,9 +2223,49 @@ class APrilFools extends APTrap {
22232223
"The void is coming."
22242224
];
22252225

2226+
var funnySpamMessages = [
2227+
"I CAN [[I See You!]]...",
2228+
"DID YOU [[Hearing-Aid]] THAT?",
2229+
"DON'T LOOK [[RUN! RUN AWAY!]].",
2230+
"YOUR [[Time is a valuable thing]] is [[Drifting Away]].",
2231+
"IS SOMEONE [[watching from afar!]]?",
2232+
"CHECK YOUR [[Surround-Sound Speaker System]].",
2233+
"WHAT WAS [[Sound Around Town]]?",
2234+
"ARE YOU [[all alone on a friday afternoon]]?",
2235+
"SOMETHING [[FEEL YOUR]] [[Power Off]].",
2236+
"WHY IS IT SO [[it's quiet. too quiet]]?",
2237+
"YOUR [[Smart Device]] IS NOW [[Where am I? What is this??]]. JUST [[clowning around]]!",
2238+
"WHY DID THE [[creator of all things technology]] [[GIVE UP!]]? THEY DIDN'T GET [[Group your strings into in array]].",
2239+
"404: [[lucky number 9]] [[MISSING]].",
2240+
"DID YOU JUST [[Feeling lucky]]? [[THE BOLD AND THE BRAVE]] move.",
2241+
"YOUR [[TYPING MECHANIC]] IS [[I HATE YOU SO MUCH]].",
2242+
"[[Congratulations!]] YOU'VE WON [[absolutely nothing]]!",
2243+
"THIS IS NOT A [[hyperlink blocked]], IT'S A [[FEATURE PRESENTATION]].",
2244+
"YOUR [[rodent]] JUST [[go of my own will]]. OR DID IT?",
2245+
"DON'T WORRY, THE [[Spagetti Code]] IS 100% [[insect repellent]]. MAYBE.",
2246+
"[[fun fact]]: [[The following message is]] [[what's the point to life]].",
2247+
"YOUR [[LORD OF SCREENS]] IS NOW [[10% brighter on kids]]. JUST [[it was a joke calm down, CALM DOWN]]!",
2248+
"[[Did you know?]] This message is [[it all feels like a waste of time]].",
2249+
"Your [[CPU]] is [[STOP LAUGHING AT ME]].",
2250+
"[[ERR]] 42: [[Life, the universe, and everything sweet]].",
2251+
"Your [[Raw, Artifical Memory]] just said [[Hello, World!]].",
2252+
"This is a [[testing, testing]]. [[Or is it?]]",
2253+
"Your [[Projection Device]] wants [[a break from all of you]].",
2254+
"[[GOD]] is [[I See You]].",
2255+
"[[GOD]][[2]] is [[I See You]].",
2256+
"[[GOD]][[2]] is [[I'm always watching]].",
2257+
"[[GOD]] is [[I'm always watching]].",
2258+
"[[GOD]][[2]] and [[GOD]] are [[I'm always watching]].",
2259+
"[[GOD]][[2]] and [[GOD]] are [[you're adorable when you sleep!]].",
2260+
"[[GOD]][[2]] and [[GOD]] are [[go play, children! I'll watch from here]].",
2261+
"[[GOD]][[2]] and [[GOD]] are [[STOP LOOKING AT MY DECK YOU FILTHY CHEATER!]].",
2262+
"[[the void is coming.]]"
2263+
];
2264+
22262265
var randomMessage = Std.random(100) < 20 // 20% chance for creepy messages
22272266
? creepyMessages[Std.random(creepyMessages.length)]
22282267
: funnyMessages[Std.random(funnyMessages.length)];
2268+
if FlxG.random.bool(1) randomMessage = funnySpamMessages[Std.random(funnySpamMessages.length)];
22292269
if (!PlatformUtil.sendWindowsNotification("Archipelago", randomMessage)) {
22302270
APItem.popup(randomMessage, "Archipelago", true);
22312271
}

source/backend/Paths.hx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class Paths
178178
return;
179179
}
180180
}
181+
catch(r) {}
181182

182183
//trace('check...');
183184
try
@@ -189,7 +190,7 @@ class Paths
189190
//trace('gfx added to the list successfully!');
190191
}
191192
}
192-
//catch(haxe.Exception) {}
193+
catch(r) {}
193194
}
194195

195196
for (member in FlxG.state.members)
@@ -269,21 +270,22 @@ class Paths
269270

270271
//super.destroy();
271272
} else {
272-
try {
273-
clearStoredWithoutStickers();
274-
freeGraphicsFromMemory();
275-
Paths.clearStoredMemory();
276-
Paths.clearUnusedMemory();
277-
//MemoryUtilBase.compact();
278-
//MemoryUtilBase.collect(true);
279-
currentTrackedSounds.clear();
280-
@:privateAccess {
281-
for (key => asset in FlxG.bitmap._cache)
282-
asset.destroy();
283-
}
273+
clearStoredWithoutStickers();
274+
freeGraphicsFromMemory();
275+
MemoryUtilBase.compact();
276+
MemoryUtilBase.collect(true);
277+
Paths.clearStoredMemory();
278+
Paths.clearUnusedMemory();
279+
currentTrackedSounds.clear();
280+
@:privateAccess {
281+
for (key => asset in FlxG.bitmap._cache)
282+
asset.destroy();
283+
}
284+
/*try {
285+
284286
} catch(e) {
285287
trace('ERROR: Couldn\'t' );
286-
}
288+
}*/
287289
}
288290
}
289291

source/objects/Note.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,8 @@ class Note extends NoteObject
687687
public var hitsound:String = 'hitsound';
688688
public var doRGBShader:Bool = true;
689689

690+
public var noteSplashTexture:String = "";
691+
690692
private function set_multSpeed(value:Float):Float {
691693
resizeByRatio(value / multSpeed);
692694
multSpeed = value;
@@ -875,6 +877,8 @@ class Note extends NoteObject
875877
super();
876878
isNotePool = inNotePool;
877879

880+
if (noteSplashTexture != '') noteSplashData.texture = noteSplashTexture;
881+
878882
animation = new PsychAnimationController(this);
879883

880884
antialiasing = ClientPrefs.data.antialiasing;

source/objects/NoteSplash.hx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,43 @@ class NoteSplash extends NoteObject
5252
public static var defaultNoteSplash(default, never):String = "noteSplashes/noteSplashes";
5353
public static var configs:Map<String, NoteSplashConfig> = new Map();
5454

55-
public function new(?x:Float = 0, ?y:Float = 0, ?splash:String)
55+
public function new(?x:Float = 0, ?y:Float = 0, ?strum:Int = 0, ?splash:String)
5656
{
5757
super(x, y);
58+
this.objType = SPLASH;
5859

5960
animation = new PsychAnimationController(this);
6061

6162
rgbShader = new PixelSplashShaderRef();
6263
shader = rgbShader.shader;
64+
setupNoteSplash(x, y, strum, splash);
65+
visible = false;
66+
}
6367

64-
this.objType = SPLASH;
68+
public var animationAmount:Int = 2;
69+
public function setupNoteSplash(x:Float, y:Float, ?column:Int = 0, ?texture:String = null)
70+
{
71+
visible = true;
72+
/*var doR:Bool = false;
73+
if (note != null && note.genScript != null){
74+
var ret:Dynamic = note.genScript.call("preSetupNoteSplash", [x, y, column, texture, hueColor, satColor, brtColor, note], ["this" => this, "noteData" => noteData, "column" => column]);
75+
if(ret == Globals.Function_Stop) doR = true;
76+
}
77+
78+
if (callOnHScripts("preSetupNoteSplash", [x, y, column, texture, hueColor, satColor, brtColor, note], ["this" => this, "noteData" => noteData, "column" => column]) == Globals.Function_Stop)
79+
return;
80+
81+
if (doR)return;*/ //TODO: Psych-ify this later
82+
83+
loadSplash(texture);
84+
setPosition(x, y);
85+
animationAmount = 2;
86+
alpha = 0.6;
87+
scale.set(0.8, 0.8);
88+
updateHitbox();
89+
90+
this.column = column;
6591

66-
loadSplash(splash);
6792
}
6893

6994
public var maxAnims(default, set):Int = 0;

source/objects/playfields/PlayField.hx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,12 @@ class PlayField extends FlxTypedGroup<FlxBasic>
222222
add(strumAttachments);
223223

224224
// Pre-allocate a few note splashes for better performance
225-
for (i in 0...4) {
226-
var splash:NoteSplash = new NoteSplash();
227-
splash.handleRendering = false;
228-
splash.alpha = 0.0;
229-
splash.kill(); // Start them as killed objects in the pool
230-
grpNoteSplashes.add(splash);
231-
}
225+
// No need, you only need one. It creates everything else for you
226+
var splash:NoteSplash = new NoteSplash();
227+
splash.handleRendering = false;
228+
grpNoteSplashes.add(splash);
229+
grpNoteSplashes.visible = false; // so they dont get drawn
230+
splash.alpha = 0.0;
232231

233232
////
234233
noteField = new NoteField(this, modMgr);
@@ -927,7 +926,7 @@ class PlayField extends FlxTypedGroup<FlxBasic>
927926
public function spawnSplash(note:Note, ?splashSkin:String):NoteSplash {
928927
if (note == null) return null;
929928

930-
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
929+
/*var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
931930
if (splash == null) {
932931
splash = new NoteSplash();
933932
grpNoteSplashes.add(splash);
@@ -961,7 +960,13 @@ class PlayField extends FlxTypedGroup<FlxBasic>
961960
}
962961
963962
splash.spawnSplashNote(strumX, strumY, note.noteData, note);
963+
splash.handleRendering = false;*/
964+
965+
// do it the way god (troll engine) intended
966+
var splash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
967+
splash.setupNoteSplash(0, 0, note.column, splashSkin);
964968
splash.handleRendering = false;
969+
grpNoteSplashes.add(splash);
965970

966971
return splash;
967972
}

0 commit comments

Comments
 (0)