-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexternal.monkey
More file actions
50 lines (40 loc) · 1.06 KB
/
external.monkey
File metadata and controls
50 lines (40 loc) · 1.06 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
Strict
Public
' Preprocessor related:
' #If LANG = "cpp"
#If TARGET = "stdcpp" Or TARGET = "sexy" Or TARGET = "glfw" Or TARGET = "xna" Or TARGET = "html5" Or TARGET = "android" Or TARGET = "flash" Or TARGET = "bmax"
#HASH_EXTERNAL_SHIFTING = True
#End
' Imports:
Import config
' Imports (Native):
#If HASH_EXTERNAL_SHIFTING
#If LANG = "cpp" Or LANG = "java"
' All of the C++ targets should support this.
Import "native/hash.${LANG}"
#Else
Import "native/hash.${TARGET}.${LANG}"
#End
#End
' External bindings:
Extern
' Functions:
#If HASH_EXTERNAL_SHIFTING
#If LANG <> "cpp"
Function Lsr:Int(Data:Int, ShiftBy:Int) = "external_hash.Lsr"
Function Lsl:Int(Data:Int, ShiftBy:Int) = "external_hash.Lsl"
#Else
Function Lsr:Int(Data:Int, ShiftBy:Int) = "external_hash::Lsr"
Function Lsl:Int(Data:Int, ShiftBy:Int) = "external_hash::Lsl"
#End
#End
Public
' Fallbacks:
#If Not HASH_EXTERNAL_SHIFTING
Function Lsr:Int(Number:Int, ShiftBy:Int)
Return (Number Shr ShiftBy)
End
Function Lsl:Int(Number:Int, ShiftBy:Int)
Return (Number Shl ShiftBy)
End
#End