-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdlib.monkey2
More file actions
121 lines (68 loc) · 2.76 KB
/
stdlib.monkey2
File metadata and controls
121 lines (68 loc) · 2.76 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Namespace stdlib
#rem
stdlib version 1.0.0
Mark Sibly, Monkey coders and iDkP from GaragePixel
Please read the licence contained in the LICENCE.TXT file of this distribution.
#end
'Primary plugins:
#Import "plugins/makefile" 'INTEGRATED!
'Main platforms:
#Import "platforms/makefile" 'INTEGRATED!
'Kernel:
#Import "types/types" 'NEW (2025) AND INTEGRATED! Collections integrated (2025)
#Import "limits/limits" 'NEW (2025) AND INTEGRATED!
#Import "system/system" 'THREAD AND REFLECTION MODULE OF Monkey-v2018.07 INTEGRATED!
'Sub-systems:
#Import "math/math" 'pseudo math 'library' (a new math library is coming)
#Import "resources/graphics/pixelformat"
#Import "resources/graphics/pixmap"
#Import "resources/graphics/pixmaploader"
#Import "resources/graphics/pixmapsaver"
#Import "resources/graphics/enums"
' --- Added by iDkP from GaragePixel
#Import "resources/graphics/wrappers/texturewrapper" ' Cross renderer texture wrapper
#Import "resources/graphics/wrappers/imagewrapper" ' Cross renderer image wrapper
#Import "resources/graphics/wrappers/canvaswrapper" ' Cross renderer canvas wrapper
#Import "resources/graphics/buffers/imagebuffer" ' Cross renderer imagebuffer
#Import "resources/graphics/buffers/framebuffer" ' Cross renderer framebuffer
' ---
#import "resources/audio/audioformat"
#import "resources/audio/audiodata"
#import "resources/audio/load_wav"
#import "resources/audio/load_vorbis"
'Algorithms:
#Import "algorithms/compression/compression"
#Import "algorithms/cryptography/crypto"
#Import "algorithms/encoding/base64/base64"
'Front-end io:
#Import "io/io"
#Import "io/stringio"
#Import "io/chartype"
Function Main()
'Capture app start time
stdlib.system.time.Now()
'Add stream handlers
Stream.OpenFuncs["file"]=Lambda:Stream( proto:String,path:String,mode:String )
Return FileStream.Open( path,mode )
End
Stream.OpenFuncs["asset"]=Lambda:Stream( proto:String,path:String,mode:String )
Return FileStream.Open( stdlib.system.io.filesystem.AssetsDir()+path,mode )
End
#If __MOBILE_TARGET__
Stream.OpenFuncs["internal"]=Lambda:Stream( proto:String,path:String,mode:String )
Return FileStream.Open( stdlib.system.io.filesystem.InternalDir()+path,mode )
End
Stream.OpenFuncs["external"]=Lambda:Stream( proto:String,path:String,mode:String )
Return FileStream.Open( stdlib.system.io.filesystem.ExternalDir()+path,mode )
End
#endif
Stream.OpenFuncs["memory"]=Lambda:Stream( proto:String,path:String,mode:String )
Return DataStream.Open( path,mode )
End
#If __DESKTOP_TARGET__
Stream.OpenFuncs["process"]=Lambda:Stream( proto:String,path:String,mode:String )
Return stdlib.system.process.ProcessStream.Open( path,mode )
End
#Endif
Print "stdlib version 1.0.0 - 2025-03-01"
End