Skip to content

Commit 7c6e8ca

Browse files
committed
Merge branch 'AP-CustomEx' of https://github.com/Z11Coding/Mixtape-Engine-Rework into AP-CustomEx
2 parents 1022bf9 + a505727 commit 7c6e8ca

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

source/objects/Note.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,15 @@ class Note extends NoteObject
765765
ignoreNote = mustPress;
766766
reloadNote('noteSkins/mechanicsmod/KILLNOTE_assets');
767767
noteSplashData.texture = 'noteSplashes/HURTnoteSplashes';
768-
doRGBShader = false;
768+
rgbShader.enabled = false;
769769
missHealth = FlxMath.MAX_VALUE_FLOAT;
770770
lowPriority = true;
771771
hitCausesMiss = true;
772772
case 'Burst Note':
773773
ignoreNote = mustPress;
774774
reloadNote('noteSkins/mechanicsmod/BURSTNOTE_assets');
775775
noteSplashData.disabled = true;
776-
doRGBShader = false;
776+
rgbShader.enabled = false;
777777
if (isSustainNote)
778778
{
779779
missHealth = 0.0475 / 2;
@@ -788,7 +788,7 @@ class Note extends NoteObject
788788
ignoreNote = mustPress;
789789
reloadNote('noteSkins/mechanicsmod/SLEEPYNOTE_assets');
790790
noteSplashData.disabled = true;
791-
doRGBShader = false;
791+
rgbShader.enabled = false;
792792
if (isSustainNote)
793793
{
794794
missHealth = 0.0475 / 2;

source/objects/StrumNote.hx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@ class StrumNote extends NoteObject
143143
}
144144
}
145145

146+
//Now lets do a psych 0.6.x and below check to see if the notes ARE there, just not in a noteSkins folder
147+
var pixelFolder:String = PlayState.isPixelStage ? 'pixelUI/' : '';
148+
var skinPostfix:String = Note.getNoteSkinPostfix();
149+
if (Paths.fileExists('images/$pixelFolder$texture$skinPostfix.png', IMAGE)) { // If a varient of a skin exists and is selected, load it
150+
skin = texture + skinPostfix;
151+
} else if (Paths.fileExists('images/${pixelFolder}noteSkins/$texture.png', IMAGE)) { // If a noteSkins folder exists and the note is in it, use that
152+
skin = 'noteSkins/$texture$skinPostfix';
153+
}
154+
146155
if (PlayState.isPixelStage || postfix.toLowerCase() == '-retribution')
147156
useRGBShader = false;
148157

@@ -156,12 +165,12 @@ class StrumNote extends NoteObject
156165

157166
if(PlayState.isPixelStage)
158167
{
159-
loadGraphic(Paths.image('pixelUI/noteSkins/' + skin));
168+
loadGraphic(Paths.image('pixelUI/' + skin));
160169
pxDV = Note.pixelNotesDivisionValue[width == 306 ? 1 : 0];
161170
width = width / pxDV;
162171
height = height / 5;
163172
antialiasing = false;
164-
loadGraphic(Paths.image('pixelUI/noteSkins/' + skin), true, Math.floor(width), Math.floor(height));
173+
loadGraphic(Paths.image('pixelUI/' + skin), true, Math.floor(width), Math.floor(height));
165174
var daFrames:Array<Int> = Note.keysShit.get(PlayState.mania).get('pixelAnimIndex');
166175

167176
setGraphicSize(Std.int(width * PlayState.daPixelZoom * Note.pixelScales[PlayState.mania]));

source/psychlua/ReflectionFunctions.hx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package psychlua;
22

33
import Type.ValueType;
44
import haxe.Constraints;
5-
65
import substates.GameOverSubstate;
76

87
//
@@ -33,14 +32,15 @@ class ReflectionFunctions
3332
});
3433
Lua_helper.add_callback(lua, "getPropertyFromClass", function(classVar:String, variable:String, ?allowMaps:Bool = false) {
3534
var trueVar:String = variable;
35+
if (trueVar == "globalAntialiasing") trueVar = "antialiasing";
3636
switch(classVar) {
3737
case "PlayState":
3838
classVar = "states.PlayState";
3939
case "ClientPrefs":
4040
classVar = "backend.ClientPrefs";
4141
variable = 'data.$trueVar';
4242
}
43-
43+
4444
var myClass:Dynamic = Type.resolveClass(classVar);
4545
if(myClass == null)
4646
{
@@ -67,7 +67,7 @@ class ReflectionFunctions
6767
classVar = "backend.ClientPrefs";
6868
variable = 'data.$trueVar';
6969
}
70-
70+
7171
var myClass:Dynamic = Type.resolveClass(classVar);
7272
if(myClass == null)
7373
{
@@ -214,7 +214,7 @@ class ReflectionFunctions
214214
if(destroy) obj.destroy();
215215
}
216216
});
217-
217+
218218
Lua_helper.add_callback(lua, "callMethod", function(funcToRun:String, ?args:Array<Dynamic>) {
219219
var parent:Dynamic = PlayState.instance;
220220
var split:Array<String> = funcToRun.split('.');
@@ -224,13 +224,13 @@ class ReflectionFunctions
224224
funcToRun = split.join('.').trim();
225225
parent = varParent;
226226
}
227-
227+
228228
if(funcToRun.length > 0) {
229229
return callMethodFromObject(parent, funcToRun, parseInstances(args));
230230
}
231231
return Reflect.callMethod(null, parent, parseInstances(args));
232232
});
233-
233+
234234
Lua_helper.add_callback(lua, "callMethodFromClass", function(className:String, funcToRun:String, ?args:Array<Dynamic>) {
235235
return callMethodFromObject(Type.resolveClass(className), funcToRun, parseInstances(args));
236236
});
@@ -242,7 +242,7 @@ class ReflectionFunctions
242242
{
243243
if(args == null) args = [];
244244
var myType:Dynamic = Type.resolveClass(className);
245-
245+
246246
if(myType == null)
247247
{
248248
FunkinLua.luaTrace('createInstance: Class $className not found', false, false, FlxColor.RED);
@@ -292,23 +292,23 @@ class ReflectionFunctions
292292
// obj = LuaUtils.getVarInArray(LuaUtils.getTargetInstance(), variable);
293293
// cpp.Pointer.addressOf(obj);
294294
// #if cpp
295-
// return cpp.RawPointer.addressOf(obj);
295+
// return cpp.RawPointer.addressOf(obj);
296296
// #else
297297
// return obj;
298298
// #end
299299
// });
300300
// Lua_helper.add_callback(lua, "getPointerRef", function(pointer:Dynamic) {
301301
// if(pointer == null) return null;
302302
// #if cpp
303-
// return cpp.Pointer.fromRaw(cpp.RawPointer.addressOf(pointer)).ref;
303+
// return cpp.Pointer.fromRaw(cpp.RawPointer.addressOf(pointer)).ref;
304304
// #else
305305
// return pointer;
306306
// #end
307307
// });
308308
// Lua_helper.add_callback(lua, "getRefromPointer", function(pointer:Dynamic) {
309309
// if(pointer == null) return null;
310310
// #if cpp
311-
// return cpp.Pointer.fromRaw((pointer)).ref;
311+
// return cpp.Pointer.fromRaw((pointer)).ref;
312312
// #else
313313
// return pointer;
314314
// #end
@@ -317,13 +317,13 @@ class ReflectionFunctions
317317
Lua_helper.add_callback(lua, "newInstance", function(className:String, ?args:Array<Dynamic>) {
318318
if (!Std.isOfType(args, Array)) args = [];
319319
var myType:Dynamic = Type.resolveClass(className);
320-
320+
321321
if(myType == null)
322322
{
323323
FunkinLua.luaTrace('newInstance: Class $className not found', false, false, FlxColor.RED);
324324
return null;
325325
}
326-
326+
327327
var obj:Dynamic = null;
328328
try {
329329
obj = Type.createInstance(myType, parseInstances(args));
@@ -334,7 +334,7 @@ class ReflectionFunctions
334334
return instArray[instArray.push(obj) - 1];
335335
else
336336
FunkinLua.luaTrace('newInstance: Failed to create instance of $className, arguments are possibly wrong.', false, false, FlxColor.RED);
337-
337+
338338
return null;
339339
});
340340
}
@@ -349,7 +349,7 @@ class ReflectionFunctions
349349
}
350350
public static function parseInstances(arg:Dynamic):Dynamic {
351351
if (arg == null) return null;
352-
352+
353353
if (Std.isOfType(arg, Array)) {
354354
return parseInstanceArray(arg);
355355
} else {

source/states/PlayState.hx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,10 +2604,9 @@ class PlayState extends MusicBeatState
26042604
insert(members.indexOf(dadGroup2) + 1, obj);
26052605
}
26062606

2607-
26082607
public function addNoteToField(note:Note, ?field:Int = 0)
26092608
{
2610-
if (field < 0 || field >= playfields.length)
2609+
if (field < 0 || field >= playfields.members.length)
26112610
field = if (note.mustPress) 0 else 1;
26122611
playfields.members[field].queue(note);
26132612
}

source/states/freeplay/FreeplayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ class FreeplayState extends MusicBeatState
13921392

13931393
switch (fpManager.songList[curSelected].songName)
13941394
{
1395-
case 'Small Argument' | 'Beat Battle 2' | 'GeoStar' | 'Zeventeen' | 'Tag And Seek' | 'Rawr' | 'Funky Fanta' | 'Fightback' | 'Fangirl Frenzy' | 'Slowdown' | 'Pack-A-Punch' | 'Slowdown':
1395+
case 'Small Argument' | 'Beat Battle 2' | 'GeoStar' | 'Zeventeen' | 'Tag And Seek' | 'Rawr' | 'Funky Fanta' | 'Fightback' | 'Fangirl Frenzy' | 'Slowdown' | 'Pack-A-Punch':
13961396
Difficulty.list = ['Hard'];
13971397
case 'Rise' | 'Test Field' | 'Pack A Punch' | 'Driller':
13981398
Difficulty.list = ['Normal'];

0 commit comments

Comments
 (0)