-
-
Notifications
You must be signed in to change notification settings - Fork 363
Expand file tree
/
Copy pathMacros.hx
More file actions
52 lines (46 loc) · 1.67 KB
/
Copy pathMacros.hx
File metadata and controls
52 lines (46 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package funkin.backend.system.macros;
#if macro
import haxe.macro.*;
import haxe.macro.Expr;
/**
* Macros containing additional help functions to expand HScript capabilities.
*/
class Macros {
public static function addAdditionalClasses() {
for(inc in [
// FLIXEL
"flixel.util", "flixel.ui", "flixel.tweens", "flixel.tile", "flixel.text",
"flixel.system", "flixel.sound", "flixel.path", "flixel.math", "flixel.input",
"flixel.group", "flixel.graphics", "flixel.effects", "flixel.animation",
// FLIXEL ADDONS
"flixel.addons.api", "flixel.addons.display", "flixel.addons.effects", "flixel.addons.ui",
"flixel.addons.plugin", "flixel.addons.text", "flixel.addons.tile", "flixel.addons.transition",
"flixel.addons.util",
// OTHER LIBRARIES & STUFF
#if THREE_D_SUPPORT "away3d", "flx3d", #end
#if VIDEO_CUTSCENES "hxvlc.flixel", "hxvlc.openfl", #end
#if NAPE_ENABLED "nape", "flixel.addons.nape", #end
"flxsvg",
// BASE HAXE
"DateTools", "EReg", "Lambda", "StringBuf", "haxe.crypto", "haxe.display", "haxe.exceptions", "haxe.extern", "scripting"
])
Compiler.include(inc);
var isHl = Context.defined("hl");
if(Context.defined("sys")) {
for(inc in ["sys", "openfl.net", "funkin.backend.system.net"]) {
if(!isHl)
Compiler.include(inc);
else {
// TODO: Hashlink
//Compiler.include(inc, ["sys.net.UdpSocket", "openfl.net.DatagramSocket"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast
}
}
}
Compiler.include("funkin", [#if !UPDATE_CHECKING 'funkin.backend.system.updating' #end]);
}
public static function initMacros() {
if(Context.defined("hl"))
HashLinkFixer.init();
}
}
#end