-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.emojic
171 lines (148 loc) Β· 5.24 KB
/
main.emojic
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
π
The Allegro package offers graphics, sounds and input APIs to create simple
games.
π
π
π¨ represents a color.
π
π π π¨ π
ππ r π―
ππ g π―
ππ b π―
ππ a π―
π πΌ r π― πΌ g π― πΌ b π― πΌ a π― ππ
π
Creates a color from the given RGBA. *r*, *g*, *b* and *a* must be a value
from 0 to 255.
π
π π’ ri π’ gi π’ bi π’ ai π’ π
π―riβοΈβ255 β‘οΈ πr
π―giβοΈβ255 β‘οΈ πg
π―biβοΈβ255 β‘οΈ πb
π―aiβοΈβ255 β‘οΈ πa
π
π
π πΌ represents a bitmap. π
π π» π πΌ π
π Creates a bitmap from the image at the given path. π
π π path π‘ π§π§πΈβοΈ π» π€allegroNewBitmapPathπ€
π Creates a bitmap with the given height and width. π
π width π’ height π’ π§π§πΈβοΈ π» π€allegroNewBitmapSizeπ€
π
π π€font.emojicπ€
π π represents an event. Youβll always receive subclasses of this class. π
π π π ππ
π π© is an event that occurs when a character was typed on the keyboard. π
π π» π π© π π
π Returns the keycode associated with this event. π
βοΈ π β‘οΈ π’ π» π€allegroKeyPressCodeπ€
π
Returns the character that was typed. No value is returned if the pressed
key does not map to a character, e.g. if an arrow key was pressed.
π
βοΈπ£ β‘οΈ π¬π‘ π» π€allegroKeyPressStringπ€
π Whether the character was repeated. π
βοΈ π β‘οΈ π π» π€allegroKeyPressRepeatedπ€
π
π π₯ is an event that occurs when a keyboard key was pressed. π
π π» π π₯ π π
π Returns the keycode associated with this event. π
βοΈ π β‘οΈ π’ π» π€allegroKeyDownCodeπ€
π
π π€ is an event that occurs when a keyboard key was released. π
π π» π π€ π π
π Returns the keycode associated with this event. π
βοΈ π β‘οΈ π’ π» π€allegroKeyUpCodeπ€
π
π π± is a mouse event. Youβll always receive subclasses of this class. π
π π π± π π
π Returns the x coordinate. π
βοΈ β© β‘οΈ π― π» π€allegroMouseEventXπ€
π Returns the y coordinate. π
βοΈ β¬ β‘οΈ π― π» π€allegroMouseEventYπ€
π
π βοΈ is an event that occurs when one or more mouse axis changed. π
π π βοΈ π± π
π
π π is an event that occurs when a mouse button was pressed. π
π π π π± π
π
π π is an event that occurs when a mouse button was released. π
π π π π± π
π
π π is an event that occurs for each β² tick. π
π π π π π
π
ππ
π β² represents a timer that sends an event in a specified interval. π
π π β² π
π
Creates a new, stopped timer that ticks every *seconds* seconds.
Seconds must be positive.
π
π seconds π― π» 21
π
Starts the timer. From then, the timer's counter will increment at a
constant rate, and it will begin generating events. Starting a timer that
is already started does nothing.
π
βοΈ π π» 22
π
Resume the timer specified. From then, the timer's counter will increment at
a constant rate, and it will begin generating events. Resuming a timer
that is already started does nothing. Resuming a stopped timer will not
reset the timer's counter.
π
βοΈ π¦ π» 23
π
Stop the timer specified. The timer's counter will stop incrementing and it
will stop generating events. Stopping a timer that is already stopped does
nothing.
π
βοΈ βοΈ π» 24
π
ππ
π π β² ππ
π
π represents an event queue. An π instance holds events that have been
generated by event sources that are registered with the queue. Events are
stored in the order they are generated. Access is in a strictly FIFO
(first-in-first-out) order.
π
π π π π
π Creates a new, empty event queue. π
π π» π€allegroNewEventQueueπ€
π Waits for an event and returns it. π
βοΈ β³ β‘οΈ π π» π€allegroEventQueueWaitπ€
π Registers the mouse as an event source. π
βοΈ π± π» π€allegroEventQueueRegisterMouseπ€
π Registers the keyboard as an event source. π
βοΈ β¨οΈ π» π€allegroEventQueueRegisterKeyboardπ€
π Registers a β² instance as an event source. π
βοΈ β² timer β² π» π€allegroEventQueueRegisterTimerπ€
π
ππ
π πΆ represents an audio sample. π
π π πΆ π
π
Loads the sample from the file at the given path. Depending on what
libraries are available, the full set of recognised extensions is: .wav,
.flac, .ogg, .it, .mod, .s3m, .xm.
π
π π¨π© π path π‘ π» 30
π Starts playing the sample. π
βοΈ π volume π― pan π― speed π― π» 31
π
ππ
π π€display.emojicπ€
π π€app.emojicπ€
π
π€allegroπ€
π€allegro_colorπ€
π€allegro_primitivesπ€
π€allegro_imageπ€
π€allegro_ttfπ€
π€allegro_acodecπ€
π€allegro_audioπ€
π€allegro_fontπ€
π