This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
/
gametarget.monkey
79 lines (67 loc) · 2.06 KB
/
gametarget.monkey
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
#If LANG="cpp" Or LANG="java" Or LANG="cs" Or LANG="js" Or LANG="as"
Import "native/gametarget.${LANG}"
#Endif
Const BBWINDOW_FULLSCREEN:=1
Const BBWINDOW_RESIZABLE:=2
Const BBWINDOW_DECORATED:=4
Const BBWINDOW_FLOATING:=8
Const BBWINDOW_DEPTHBUFFER:=16
Const BBWINDOW_SINGLEBUFFER:=32
Const BBWINDOW_SECONDMONITOR:=64
Extern
Class BBDisplayMode
Field width:Int
Field height:Int
Field depth:Int
Field hertz:Int
Field flags:Int
End
Class BBGame Extends Null
Function Game:BBGame()
Method SetDelegate:Void( delegate:BBGameDelegate )
Method SetUpdateRate:Void( hertz:Int )
Method SetKeyboardEnabled:Void( enabled:Bool )
Method Millisecs:Int()
Method GetDate:Void( date:Int[] )
Method CurrentDate:String()
Method CurrentTime:String()
Method SaveState:Int( state:String )
Method LoadState:String()
Method LoadString:String( path:String )
Method CountJoysticks:Int( update:Bool )
Method PollJoystick:Bool( port:Int,joyx:Float[],joyy:Float[],joyz:Float[],buttons:Bool[] )
Method OpenUrl:Void( url:String )
Method SetMouseVisible( visible:Bool )
Method GetDeviceWidth:Int()
Method GetDeviceHeight:Int()
Method SetDeviceWindow:Void( width:Int,height:Int,flags:Int )
Method GetDisplayModes:BBDisplayMode[]()
Method GetDesktopMode:BBDisplayMode()
Method SetSwapInterval:Void( interval:Int )
Method PathToFilePath:String( path:String )
End
Class BBGameDelegate Abstract
Method StartGame:Void() Abstract
Method SuspendGame:Void() Abstract
Method ResumeGame:Void() Abstract
Method UpdateGame:Void() Abstract
Method RenderGame:Void() Abstract
Method KeyEvent:Void( event:Int,data:Int ) Abstract
Method MouseEvent:Void( event:Int,data:Int,x:Float,y:Float ) Abstract
Method TouchEvent:Void( event:Int,data:Int,x:Float,y:Float ) Abstract
Method MotionEvent:Void( event:Int,data:Int,x:Float,y:Float,z:Float ) Abstract
Method DiscardGraphics:Void() Abstract
End
Public
Class BBGameEvent
Const KeyDown:=1
Const KeyUp:=2
Const KeyChar:=3
Const MouseDown:=4
Const MouseUp:=5
Const MouseMove:=6
Const TouchDown:=7
Const TouchUp:=8
Const TouchMove:=9
Const MotionMove:=10
End