Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 88f7a1c

Browse files
committed
Minor fixes and more credit removal
1 parent 496f465 commit 88f7a1c

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

Project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<define name="TRANSLATIONS_ALLOWED" />
2929
<define name="IRIS_DEBUG"/>
3030

31-
<define name="MULTITHREADED_LOADING" /> <!-- UNCOMMENTING THIS LINE WILL ENABLE MULTITHREADED LOADING, WHICH IMPROVES LOADING TIMES, BUT WITH A LOW CHANCE FOR THE GAME FREEZE ON SONG LOAD -->
31+
<define name="MULTITHREADED_LOADING" /> <!-- UNCOMMENTING THIS LINE WILL ENABLE MULTITHREADED LOADING, WHICH IMPROVES LOADING TIMES, BUT APPARENTLY CAN FREEZE THE GAME ON SONG LOAD IN OLDER PCs? -->
3232
<define name="SHOW_LOADING_SCREEN" />
3333
<define name="PSYCH_WATERMARKS"/> <!-- DELETE THIS TO REMOVE THE PSYCH LOGO FROM LOADING SCREEN -->
3434

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ There you can learn how to use the 212 PlayState funcions in your mod!
3434
* SqirraRNG - Crash Handler and Base code for Chart Editor's Waveform.
3535
* EliteMasterEric - Runtime Shaders support and Other PRs.
3636
* MAJigsaw77 - .MP4 Video Loader Library (hxvlc).
37-
* Tahir Toprak Karabekiroglu - Note Splash Editor and Other PRs.
3837
* iFlicky - Composer of Psync, Tea Time and some sound effects.
3938
* KadeDev - Fixed some issues on Chart Editor and Other PRs.
4039
* superpowers04 - LUA JIT Fork.

source/backend/Mods.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ class Mods
9494
inline public static function directoriesWithFile(path:String, fileToFind:String, mods:Bool = true)
9595
{
9696
var foldersToCheck:Array<String> = [];
97+
//Main folder
9798
if(FileSystem.exists(path + fileToFind))
9899
foldersToCheck.push(path + fileToFind);
99100

101+
// Week folder
100102
if(Paths.currentLevel != null && Paths.currentLevel != path)
101103
{
102104
var pth:String = Paths.getFolderPath(fileToFind, Paths.currentLevel);
103-
if(FileSystem.exists(pth))
105+
if(!foldersToCheck.contains(pth) && FileSystem.exists(pth))
104106
foldersToCheck.push(pth);
105107
}
106108

source/psychlua/FunkinLua.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,15 +1799,15 @@ class FunkinLua {
17991799
Lua_helper.add_callback(lua, name, null); //just so that it gets called
18001800
}
18011801

1802-
#if (MODS_ALLOWED && !flash && sys)
1802+
#if (!flash && sys)
18031803
public var runtimeShaders:Map<String, Array<String>> = new Map<String, Array<String>>();
18041804
#end
18051805

18061806
public function initLuaShader(name:String)
18071807
{
18081808
if(!ClientPrefs.data.shaders) return false;
18091809

1810-
#if (MODS_ALLOWED && !flash && sys)
1810+
#if (!flash && sys)
18111811
if(runtimeShaders.exists(name))
18121812
{
18131813
var shaderData:Array<String> = runtimeShaders.get(name);

source/psychlua/ShaderFunctions.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ShaderFunctions
2424
funk.addLocalCallback("setSpriteShader", function(obj:String, shader:String) {
2525
if(!ClientPrefs.data.shaders) return false;
2626

27-
#if (!flash && MODS_ALLOWED && sys)
27+
#if (!flash && sys)
2828
if(!funk.runtimeShaders.exists(shader) && !funk.initLuaShader(shader))
2929
{
3030
FunkinLua.luaTrace('setSpriteShader: Shader $shader is missing!', false, false, FlxColor.RED);

source/states/LoadingState.hx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,13 @@ class LoadingState extends MusicBeatState
410410
static var dontPreloadDefaultVoices:Bool = false;
411411
static function _startPool()
412412
{
413-
threadPool = new FixedThreadPool(#if MULTITHREADED_LOADING #if cpp getCPUThreadsCount() #else 8 #end #else 1 #end);
413+
#if MULTITHREADED_LOADING
414+
// Due to the Main thread and Discord thread, we decrease it by 2.
415+
var threadCount:Int = Std.int(Math.max(1, getCPUThreadsCount() - #if DISCORD_ALLOWED 2 #else 1 #end));
416+
#else
417+
var threadCount:Int = 1;
418+
#end
419+
threadPool = new FixedThreadPool(threadCount);
414420
}
415421

416422
public static function prepareToSong()

source/states/PlayState.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,7 @@ class PlayState extends MusicBeatState
29142914
//subtract += 0.385; // you take more damage if playing with this gameplay changer enabled.
29152915
// i mean its fair :p -Crow
29162916
subtract *= note.tail.length + 1;
2917-
// i think it would be fair if damage multiplied based on how long the sustain is -Tahir
2917+
// i think it would be fair if damage multiplied based on how long the sustain is -[REDACTED]
29182918
}
29192919

29202920
if (note.missed)
@@ -3575,11 +3575,12 @@ class PlayState extends MusicBeatState
35753575

35763576
#if (!flash && sys)
35773577
public var runtimeShaders:Map<String, Array<String>> = new Map<String, Array<String>>();
3578+
#end
35783579
public function createRuntimeShader(shaderName:String):ErrorHandledRuntimeShader
35793580
{
3581+
#if (!flash && sys)
35803582
if(!ClientPrefs.data.shaders) return new ErrorHandledRuntimeShader(shaderName);
35813583

3582-
#if (!flash && MODS_ALLOWED && sys)
35833584
if(!runtimeShaders.exists(shaderName) && !initLuaShader(shaderName))
35843585
{
35853586
FlxG.log.warn('Shader $shaderName is missing!');
@@ -3598,7 +3599,7 @@ class PlayState extends MusicBeatState
35983599
{
35993600
if(!ClientPrefs.data.shaders) return false;
36003601

3601-
#if (MODS_ALLOWED && !flash && sys)
3602+
#if (!flash && sys)
36023603
if(runtimeShaders.exists(name))
36033604
{
36043605
FlxG.log.warn('Shader $name was already initialized!');
@@ -3641,5 +3642,4 @@ class PlayState extends MusicBeatState
36413642
#end
36423643
return false;
36433644
}
3644-
#end
36453645
}

0 commit comments

Comments
 (0)