Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 262 additions & 0 deletions assets/images/dont delete gerald.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
if you delete gerald the game will fucking crash for some reason
and it has to be that specific gerald too


































































































































































































+*++++-----:.....::::---=--------------::::::::::::::::::::::::::::::::.:.:::::.:::::--===-======---
+++++++*:---:-:.........::---------:-:::::::::::::::::::::::::::::::....::::::.::::-====-========---
+++++++++-----:::::.:..............::.::::::::::::::::.::.:.:::::.:::....::::::::=======-======-====
+++++++++--++-::::::::::......:::::.::.::::::::::.:.:.:.:............:::::::::=====-==============--
++++++++*=-++*:::::::::::::........::.:.:::::..:.:::..:............::::::-==============-===-==-===-
+++++++++--+++++::::::::::....:.....:::......::::::...::::::....:.::.:::======================--=--=
++++++++*=-++++++-:::::::::......:::..::.:::.::::::.........::...:::..============================-=
+++++++++=-++++++++=.::::.:.....:..::::.:.:.::::::::................-===========-=============--=-==
++++++++++-+++++++++++:..:::.:..:::.:.::.....:.::::::.............=========-==-=-===================
++++++++++-++++++++++++==.:.:::..::...:..:...:.::-::...........:==========+==++=+++++++*+===========
+++++++++===++++++++++=+===+-.:::::............:::.......::.==+==---------------:--------------:::::
--------=---======---:::::::::::.......:.......:::.:::.......:........................:::::::::::.:.
-::-:-::::::::-:::::::::::...:::.::::::........:::.:::.............::.................:::::::::::...
:::::::::::::::::::::::.........................:::.................................................
-::::::::::.:::..:.............................:::..................................................
:::.::.........................................:.:..................................................
::::................................................................:.::..::::::::::::::::::::::::::
:::::....:::::................................::.:...............:::::::---::-:-::::::::::::::::::::
::::::::::::::.............................:.::::.................::::--------:-::::::::::::::::::::
::::::::::::::...............................::.::.:........:...::::--------:--:::::::::::::::::::::
:::::::.::::....................:............::::.:.....::.....::::----:---:::::::::::::::::::::::::
:::::::::.....................:.::..........::.::.:.....::....::::---------:::::::::::::::::::::::::
:::::::::....:..................::............:::::...:..:..:::::----------:::::::::::::::::::::::::
:::::::::::.......:.:::.....::..:::...........:::::........::::-------:-:--:::::::::::::::::::::::::
:::::::::::::::........:.:.:.::::::..........:::-:::..:.::.::::------::-:-::::::::::::::::::::::::::
:::::::::::::..:::........::-.:::.:::....:*######**=..::::::::-----------:::::::::::::::::::::::::::
::::::::::::::::::..........:::-::.:+**+########*#*#**:::-:-:-----------::::::::::::::::::::::::::::
:::::::::::::::...:..........:.++*%%+*=+*=#**##**+-+=+#*-=::-------------:::::::::::::::::::::::::::
::::::::::::::::::::.:::.::...=#**=**+=-+==***##***+=+*%####*=----=---::::::::::::::::::::::::::::::
:::::::::::::::::.....::::::####*+++++===+**##***#*++++++==+#**+=-----::::::::::::::::::::::::::::::
:::::::::::::::::::::::::=+#%%%@@@%%#*+=+****#***#*++**%%%%%%%##-----:--::::::::::::::::::::::::::::
::::::::::::::::::.:::::+##**%%@#%%%%##++***+###*##+*#%%%%%%%%%*+*-------:::::::::::::::::::::::::::
:::::::::::::::::.:::#%%#++###%%%#%**%#*#*###########%##@@%@##*#*#+------:::::::::::::::---:::::::::
:::::::::::::::.::.*%#%##*#*=*#*%*##*%%################***+*#%%%%###+----::::::::::::------:-:::::::
::::::::::::::::.*######%%###*##***####%%%%%##*###%#######%#%%#%%#**=-:--::::::::::::--------:::::::
:::::::::::::::::%%%*%%%%######*#####*###%%##################%#####%%#----:::::::::::---------::::::
::::::::::::::::-%#*%%%%%####%##*#####***%@@@@###@@%%+######%%######%%:-:--:::::::::-----------:::::
::::::::::::::::-#*#%#####%#%#%######*##****%#%%%%*+**#####%#########%*-::::::::::---------:----::::
:::::::::::::::::*#%############%###***#++==+*%%#=+++*##%###*####%%##%@:::::-::::---------------::::
:::::::::::::::::::%%%%#**##########**+*+++***%%**#*######*#*#####%#+#--:::::::::---:--:--------::::
:::::::::::::::::::#%%%#***#*#**#*#%###**+****%%#*%##****##%#%*#%%#*---::::::::::----------------:::
:::::::::::::--:::.%%@%#***#**###****##**++*#%#####**###@%##*###%**#-::::-::::::::::----:::::-:-::::
:-::::::::--:::::::-#%%%%%*****###%**#**######**#%%##%#####*#+%%%%+::::......:::::::::::::::::::::::
--:::----::::::-::::%@%%%***%%*%=:#*####*####%**##%*******%###%##%=.:.....:.::.::::::::::::::::::::.
::----::-:::::::::::%@#=%@%%%%%@*#+********%*+**+*#*++++#*#%%%%#%+.................::::::::::::::::.
-----:--::-:::::::::-+#%#%@+#-+%%%%%*%##*****+#++**+*#*%#%##@%%%#:...........::....::::::::::::::::.
:---:----:-::::::::::@%%%%@%%+%%%%%%%#%%%#*#*+#*+**##%%%%%##@@%%-::::::::::::::::::::::::::::::::::.
-----------::::::::::-%%+@#%=%@@%#%%%%%#%%###%%##@@%%#%@%#%#@@%%*====---------:--::::--::::::::.....
-------------::::::::+%#%*@#@@%%#%%#%%%%%%%%%%##%@%@@%%%%%%%@@%%#+++++==+============--------::::...
------------::-:::-:%#%#*%#@@%%%##%%%%%%%%%%%##%%%@@%%%%#%@%%%%%%#+++++++++++=+=+++=++++====---:::::
------------:-:--:=%+%%*%%@@@%@%##%%%%%%%%%%#%#%%%%%%%%%%%%@%%%%###*+*+++++++++==+++++++=====----:--
--------:--------*%*%%%%%%@%@%%%##%%%%#%#%%%%%%#%%%%%%%%*%@@%%%%%%#*++++++++++++++=++++=+=+=--:-----
---------:-----:%%#%%%#%%%@@@@%%%%%%%##%%%%%%#%%%%%%%%%%##%@@%%%%%%%**+++++++++++++++++++===-----:--
--------------=#%#%@%*%#%@@@@@@@%#*#*###%#####%%%%%%%%%%%%%%%%@%%%%%%+*+*++++++++++++++++==-----:::-
===-==-------=#%%%%%%%#%%@@@@%#%###*#####%####%%%%%%%%%%%%%%%%%@%%%%%**+**++*+++++++++++===------:--
-------------%%%%%%%*#%%%@@%%##%%#%#####%**####%%%%%%%%%%%%%%%%%%%%%%%*****+++++++++++++==--:::-:-::
------------=%#%%%%%%%%%@@%%%#%%#####%%%#######%%#%%%%%%%%@%%%%%%%%%%%*****+++*+++++++++===------:--
==----------%%%%%@%*%%@@%%%#%%#%%#%*%%%#**######%%%%%%%@%%%%%%%%%%%%%%#******+*+++++++++===---------
---------::%#%%%%%%#%@@%%%%%%%%%#%#%%#%%*#######%%%#%%%%%%%%%%%%%%%%%%%******++**++++++===------:--:
----::::::###%%%%%#%%%%%%%%@%@%%%%%%%%%#%########%#%%%%%%%%%%%%%%@%%%%%%******+++++++++==-=---------
::----::=#%%%%%%%%%%@%@@@@@%%%%@%%%%%%%%%%###%#%%%%%%%%%%%%%%%@%@@@%@@%%********+*+**++==-----------
----=-=###%%#%%%%%%%%%@@@@@@%%@@@@@@%%#%%%%%#%%%%%%%%%%%%%%%@%@@@@%@%%%%%*******+*+++*+====---------
======#%%%%%%%%%%%%%%%@@%@%%%%%%@%%%%%%%%%%%%%%%%%%%%%@%%%@@@@%@@%%%%@%%%***********++++===---------
====*##%%%%%%%%%%%%%%%@%%%#%@@@@%@%%@%%%%%%%%%%%%%%%%@%@@%@@@@@%%@%%%%%%%#********+**+++===---------
===#%#%#%%%%%%%%%#%%%@%#%%%@@@@@%@%@@%%%@@%%%%%%%%%%@%%%%@@%@@@%%%%%%%%%%#********+*++*+===-------:-
==*#%%%%#%%%%%%%%%%@@%%%%%%%%@@%@@@@%%%%@@%%%#%#%#%%%%%%%%%%%%%%%%%%%%%%%##**********++++===--------
Binary file added assets/images/gerald.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions source/funkin/backend/system/Main.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package funkin.backend.system;

import haxe.crypto.Sha256;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.transition.TransitionData;
Expand Down Expand Up @@ -157,6 +158,42 @@ class Main extends Sprite
initTransition();
}

private static var _geraldTimer:Float = 0;
private static final GERALD_HASH:String = "1ae87ef72344af9af1850fe64f417c54f3023e3e2b1030a8bd42429fc2ea6f1e";

public static function checkGeraldAsync(elapsed: Float) {
_geraldTimer += elapsed;

if (_geraldTimer >= 2.0) {
_geraldTimer = 0;

ThreadUtil.execAsync(function() {
var path:String = "assets/images/gerald.gif";

if (sys.FileSystem.exists(path)) {
var bytes = sys.io.File.getBytes(path);
var currentHash = Sha256.encode(bytes.toString());

if (currentHash != GERALD_HASH) {
Logs.traceColored([
Logs.getPrefix("Main"),
Logs.logText("Gerald's hash doesn't match ("),
Logs.logText(currentHash, GRAY),
Logs.logText(")")
], ERROR);
Sys.exit(1);
}
} else {
Logs.traceColored([
Logs.getPrefix("Main"),
Logs.logText("Couldn't find Gerald")
], ERROR);
Sys.exit(1);
}
});
}
}

public static function refreshAssets() @:privateAccess {
FunkinCache.instance.clearSecondLayer();

Expand Down Expand Up @@ -200,6 +237,8 @@ class Main extends Sprite

if (PlayerSettings.solo.controls.FPS_COUNTER)
Framerate.debugMode = (Framerate.debugMode + 1) % 3;

checkGeraldAsync(flixel.FlxG.elapsed);
}

private static function onStateSwitchPost() {
Expand Down