rgss 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.clang-format +6 -0
- data/.gitignore +167 -0
- data/.yardopts +6 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +9 -0
- data/ext/rgss/cglm-v0.7.9.tar.gz +0 -0
- data/ext/rgss/color.c +599 -0
- data/ext/rgss/entity.c +373 -0
- data/ext/rgss/extconf.rb +53 -0
- data/ext/rgss/font.c +135 -0
- data/ext/rgss/game.c +469 -0
- data/ext/rgss/game.h +99 -0
- data/ext/rgss/gl.c +3217 -0
- data/ext/rgss/glad.c +1140 -0
- data/ext/rgss/glad.h +2129 -0
- data/ext/rgss/glfw.c +1453 -0
- data/ext/rgss/graphics.c +324 -0
- data/ext/rgss/image.c +274 -0
- data/ext/rgss/input.c +745 -0
- data/ext/rgss/khrplatform.h +290 -0
- data/ext/rgss/mat4.c +279 -0
- data/ext/rgss/pax_global_header +1 -0
- data/ext/rgss/point.c +253 -0
- data/ext/rgss/rect.c +449 -0
- data/ext/rgss/rgss.c +56 -0
- data/ext/rgss/rgss.h +241 -0
- data/ext/rgss/stb_image.h +7762 -0
- data/ext/rgss/stb_image_write.h +1690 -0
- data/ext/rgss/stb_rect_pack.h +628 -0
- data/ext/rgss/stb_truetype.h +5011 -0
- data/ext/rgss/utf8.h +1652 -0
- data/ext/rgss/uthash.h +1133 -0
- data/ext/rgss/vec.c +114 -0
- data/ext/rgss/vec.h +192 -0
- data/ext/rgss/vec2.c +489 -0
- data/ext/rgss/vec3.c +751 -0
- data/ext/rgss/vec4.c +681 -0
- data/lib/rgss.rb +140 -0
- data/lib/rgss/batch.rb +57 -0
- data/lib/rgss/blend.rb +47 -0
- data/lib/rgss/game_object.rb +28 -0
- data/lib/rgss/plane.rb +95 -0
- data/lib/rgss/renderable.rb +158 -0
- data/lib/rgss/rgss.so +0 -0
- data/lib/rgss/shader.rb +94 -0
- data/lib/rgss/shaders/sprite-frag.glsl +40 -0
- data/lib/rgss/shaders/sprite-vert.glsl +17 -0
- data/lib/rgss/sprite.rb +139 -0
- data/lib/rgss/stubs/color.rb +318 -0
- data/lib/rgss/stubs/gl.rb +1999 -0
- data/lib/rgss/stubs/glfw.rb +626 -0
- data/lib/rgss/stubs/rect.rb +324 -0
- data/lib/rgss/stubs/rpg.rb +267 -0
- data/lib/rgss/stubs/tone.rb +65 -0
- data/lib/rgss/texture.rb +132 -0
- data/lib/rgss/tilemap.rb +116 -0
- data/lib/rgss/version.rb +3 -0
- data/lib/rgss/viewport.rb +67 -0
- data/rgss.gemspec +44 -0
- data/test.png +0 -0
- metadata +178 -0
@@ -0,0 +1,324 @@
|
|
1
|
+
|
2
|
+
module RGSS
|
3
|
+
|
4
|
+
|
5
|
+
##
|
6
|
+
# @abstract
|
7
|
+
class IVec2
|
8
|
+
|
9
|
+
##
|
10
|
+
# Creates a new instance of the {IVec2} class.
|
11
|
+
# @overload initialize
|
12
|
+
#
|
13
|
+
# @overload initialize(x, y)
|
14
|
+
# @param x [Numeric]
|
15
|
+
# @param y [Numeric]
|
16
|
+
# @overload initialize(other)
|
17
|
+
# @param other [IVec2]
|
18
|
+
def initialize(*args)
|
19
|
+
end
|
20
|
+
|
21
|
+
def [](index)
|
22
|
+
end
|
23
|
+
|
24
|
+
def []=(index, value)
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Creates an array instance that represents this object.
|
29
|
+
# @return [Array(Integer, Integer)] The newly created Array.
|
30
|
+
def to_a
|
31
|
+
end
|
32
|
+
|
33
|
+
##
|
34
|
+
# Creates a hash instance that represents this object.
|
35
|
+
# @return [Hash{Symbol => Integer}] The newly created Hash.
|
36
|
+
def to_h
|
37
|
+
end
|
38
|
+
|
39
|
+
def +(other)
|
40
|
+
end
|
41
|
+
|
42
|
+
def -(other)
|
43
|
+
end
|
44
|
+
|
45
|
+
def set(x, y)
|
46
|
+
end
|
47
|
+
|
48
|
+
def empty?
|
49
|
+
end
|
50
|
+
|
51
|
+
alias_method :add, :+
|
52
|
+
alias_method :subtract, :-
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
class Point < IVec2
|
57
|
+
|
58
|
+
##
|
59
|
+
# @return [Integer]
|
60
|
+
attr_accessor :x
|
61
|
+
|
62
|
+
##
|
63
|
+
# @return [Integer]
|
64
|
+
attr_accessor :y
|
65
|
+
end
|
66
|
+
|
67
|
+
class Size < IVec2
|
68
|
+
|
69
|
+
##
|
70
|
+
# @return [Integer]
|
71
|
+
attr_accessor :width
|
72
|
+
|
73
|
+
##
|
74
|
+
# @return [Integer]
|
75
|
+
attr_accessor :height
|
76
|
+
|
77
|
+
##
|
78
|
+
#
|
79
|
+
# @overload offset(x, y)
|
80
|
+
# @param x [Numeric]
|
81
|
+
# @param y [Numeric]
|
82
|
+
#
|
83
|
+
# @overload offset(other)
|
84
|
+
# @param other [IVec2]
|
85
|
+
#
|
86
|
+
# @return [Point]
|
87
|
+
def offset
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
#
|
92
|
+
# @overload offset!(x, y)
|
93
|
+
# @param x [Numeric]
|
94
|
+
# @param y [Numeric]
|
95
|
+
#
|
96
|
+
# @overload offset!(other)
|
97
|
+
# @param other [IVec2]
|
98
|
+
#
|
99
|
+
# @return [self]
|
100
|
+
def offset!
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
##
|
105
|
+
# Stores a set of four integers that represent the location and size of a rectangle, with the top-left at 0, 0.
|
106
|
+
#
|
107
|
+
# @note All relevant methods implemented in `Object` (i.e. `#dup`, `#clone`, Marshalling, equality) have also been
|
108
|
+
# properly implemented/overridden, but have been omitted from the documentation for brevity.
|
109
|
+
class Rect
|
110
|
+
|
111
|
+
##
|
112
|
+
# @return [Integer] the location of the top-left corner on the x-axis.
|
113
|
+
attr_accessor :x
|
114
|
+
|
115
|
+
##
|
116
|
+
# @return [Integer] the location of the top-left corner on the y-axis.
|
117
|
+
attr_accessor :y
|
118
|
+
|
119
|
+
##
|
120
|
+
# @return [Integer] the size of the rectangle on the x-axis.
|
121
|
+
attr_accessor :width
|
122
|
+
|
123
|
+
##
|
124
|
+
# @return [Integer] the size of the rectangle on the y-axis.
|
125
|
+
attr_accessor :height
|
126
|
+
|
127
|
+
##
|
128
|
+
# @return [Point] the location of the top-left corner of the rectangle.
|
129
|
+
attr_accessor :location
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [Size] the size (width and height) of the rectangle.
|
133
|
+
attr_accessor :size
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [Integer] the location of the left edge of the rectangle on the x-axis.
|
137
|
+
attr_reader :left
|
138
|
+
|
139
|
+
##
|
140
|
+
# @return [Integer] the location of the top edge of the rectangle on the y-axis.
|
141
|
+
attr_reader :top
|
142
|
+
|
143
|
+
##
|
144
|
+
# @return [Integer] the location of the right edge of the rectangle on the x-axis.
|
145
|
+
attr_reader :right
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [Integer] the location of the bottom edge of the rectangle on the y-axis.
|
149
|
+
attr_reader :bottom
|
150
|
+
|
151
|
+
##
|
152
|
+
# Creates and returns a new {Rect} with all values defaulted to `0`.
|
153
|
+
#
|
154
|
+
# @return [Rect] The newly created rectangle.
|
155
|
+
def self.empty
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# Creates a new instance of the {Rect} class.
|
160
|
+
#
|
161
|
+
# @overload initialize
|
162
|
+
# Creates a new empty rectangle.
|
163
|
+
#
|
164
|
+
# @overload initialize(location, size)
|
165
|
+
# Creates a new rectangle with the specified location and size.
|
166
|
+
# @param location [Point]
|
167
|
+
# @param size [Size]
|
168
|
+
#
|
169
|
+
# @overload initialize(x, y, width, height)
|
170
|
+
# Creates a new rectangle with the specified dimensions.
|
171
|
+
# @param x [Numeric]
|
172
|
+
# @param y [Numeric]
|
173
|
+
# @param width [Numeric]
|
174
|
+
# @param height [Numeric]
|
175
|
+
def initialize(*args)
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# Creates a new {Rect} by the specified edges.
|
180
|
+
#
|
181
|
+
# @param left [Numeric] the location of the rectangles left edge on the x-axis.
|
182
|
+
# @param top [Numeric] the location of the rectangles top edge on the y-axis.
|
183
|
+
# @param right [Numeric] the location of the rectangles right edge on the x-axis.
|
184
|
+
# @param bottom [Numeric] the location of the rectangles bottom edge on the y-axis.
|
185
|
+
#
|
186
|
+
# @return [Rect] the newly created {Rect} instance.
|
187
|
+
def self.ltrb(left, right, top, bottom)
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# Provides access to the rectangle components by index.
|
192
|
+
# @param index [Numeric] the index of the component (x, y, width, height) to retrieve.
|
193
|
+
# @return [Integer] the value of the specified component.
|
194
|
+
# @raise [IndexError] if index is less than `0` or greater than `3`.
|
195
|
+
def [](index)
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Provides access to the rectangle components by index.
|
200
|
+
# @param index [Numeric] the index of the component (x, y, width, height) to set.
|
201
|
+
# @return [Integer] the value that was set.
|
202
|
+
# @raise [IndexError] if index is less than `0` or greater than `3`.
|
203
|
+
def []=(index, value)
|
204
|
+
end
|
205
|
+
|
206
|
+
def set(x, y, width, height)
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
#
|
211
|
+
# @return [Boolean]
|
212
|
+
def empty?
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# @overload contains?(x, y)
|
217
|
+
# @param x [Numeric]
|
218
|
+
# @param y [Numeric]
|
219
|
+
#
|
220
|
+
# @overload contains?(point)
|
221
|
+
# @param point [Point]
|
222
|
+
#
|
223
|
+
# @overload contains?(rect)
|
224
|
+
# @param rect [Rect]
|
225
|
+
#
|
226
|
+
# @return [Boolean]
|
227
|
+
def contains?(*args)
|
228
|
+
end
|
229
|
+
|
230
|
+
##
|
231
|
+
# @overload inflate(x, y)
|
232
|
+
# @param x [Numeric]
|
233
|
+
# @param y [Numeric]
|
234
|
+
#
|
235
|
+
# @overload inflate(amount)
|
236
|
+
# @param amount [IVec2]
|
237
|
+
#
|
238
|
+
# @return [Rect]
|
239
|
+
def inflate(*args)
|
240
|
+
end
|
241
|
+
|
242
|
+
##
|
243
|
+
# @overload inflate!(x, y)
|
244
|
+
# @param x [Numeric]
|
245
|
+
# @param y [Numeric]
|
246
|
+
#
|
247
|
+
# @overload inflate!(amount)
|
248
|
+
# @param amount [IVec2]
|
249
|
+
#
|
250
|
+
# @return [self]
|
251
|
+
def inflate!(*args)
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
#
|
256
|
+
# @param other [Rect]
|
257
|
+
#
|
258
|
+
# @return [Rect]
|
259
|
+
def intersect(other)
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
#
|
264
|
+
# @param other [Rect]
|
265
|
+
#
|
266
|
+
# @return [self]
|
267
|
+
def intersect!(other)
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# @param other [Rect]
|
272
|
+
#
|
273
|
+
# @return [Boolean]
|
274
|
+
def intersects?(other)
|
275
|
+
end
|
276
|
+
|
277
|
+
##
|
278
|
+
# @overload offset(x, y)
|
279
|
+
# @param x [Numeric]
|
280
|
+
# @param y [Numeric]
|
281
|
+
#
|
282
|
+
# @overload offset(amount)
|
283
|
+
# @param amount [IVec2]
|
284
|
+
#
|
285
|
+
# @return [Rect]
|
286
|
+
def offset(*args)
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# @overload offset(x, y)
|
291
|
+
# @param x [Numeric]
|
292
|
+
# @param y [Numeric]
|
293
|
+
#
|
294
|
+
# @overload offset(amount)
|
295
|
+
# @param amount [IVec2]
|
296
|
+
#
|
297
|
+
# @return [self]
|
298
|
+
def offset!(*args)
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# Creates an array instance that represents this object.
|
303
|
+
# @return [Array(Integer, Integer, Integer, Integer)] The newly created Array.
|
304
|
+
def to_a
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# Creates a hash instance that represents this object.
|
309
|
+
# @return [Hash{Symbol => Integer}] The newly created Hash.
|
310
|
+
def to_h
|
311
|
+
end
|
312
|
+
|
313
|
+
alias_method :include?, :contains?
|
314
|
+
end
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
end
|
322
|
+
|
323
|
+
|
324
|
+
|
@@ -0,0 +1,267 @@
|
|
1
|
+
module RGSS
|
2
|
+
|
3
|
+
|
4
|
+
module Input
|
5
|
+
|
6
|
+
def self.trigger?(sym)
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.press?(sym)
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.release?(sym)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.none?(sym)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.repeat?(sym)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.cursor
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.create_cursor(source)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.scroll_x
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.scroll_y
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.bind(sym, keys = nil, mouse = nil, gamepad = nil)
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
KEY_UNKNOWN = -1
|
38
|
+
KEY_SPACE = 32
|
39
|
+
KEY_APOSTROPHE = 39
|
40
|
+
KEY_COMMA = 44
|
41
|
+
KEY_MINUS = 45
|
42
|
+
KEY_PERIOD = 46
|
43
|
+
KEY_SLASH = 47
|
44
|
+
KEY_0 = 48
|
45
|
+
KEY_1 = 49
|
46
|
+
KEY_2 = 50
|
47
|
+
KEY_3 = 51
|
48
|
+
KEY_4 = 52
|
49
|
+
KEY_5 = 53
|
50
|
+
KEY_6 = 54
|
51
|
+
KEY_7 = 55
|
52
|
+
KEY_8 = 56
|
53
|
+
KEY_9 = 57
|
54
|
+
KEY_SEMICOLON = 59
|
55
|
+
KEY_EQUAL = 61
|
56
|
+
KEY_A = 65
|
57
|
+
KEY_B = 66
|
58
|
+
KEY_C = 67
|
59
|
+
KEY_D = 68
|
60
|
+
KEY_E = 69
|
61
|
+
KEY_F = 70
|
62
|
+
KEY_G = 71
|
63
|
+
KEY_H = 72
|
64
|
+
KEY_I = 73
|
65
|
+
KEY_J = 74
|
66
|
+
KEY_K = 75
|
67
|
+
KEY_L = 76
|
68
|
+
KEY_M = 77
|
69
|
+
KEY_N = 78
|
70
|
+
KEY_O = 79
|
71
|
+
KEY_P = 80
|
72
|
+
KEY_Q = 81
|
73
|
+
KEY_R = 82
|
74
|
+
KEY_S = 83
|
75
|
+
KEY_T = 84
|
76
|
+
KEY_U = 85
|
77
|
+
KEY_V = 86
|
78
|
+
KEY_W = 87
|
79
|
+
KEY_X = 88
|
80
|
+
KEY_Y = 89
|
81
|
+
KEY_Z = 90
|
82
|
+
KEY_LEFT_BRACKET = 91
|
83
|
+
KEY_BACKSLASH = 92
|
84
|
+
KEY_RIGHT_BRACKET = 93
|
85
|
+
KEY_GRAVE_ACCENT = 96
|
86
|
+
KEY_WORLD_1 = 161
|
87
|
+
KEY_WORLD_2 = 162
|
88
|
+
KEY_ESCAPE = 256
|
89
|
+
KEY_ENTER = 257
|
90
|
+
KEY_TAB = 258
|
91
|
+
KEY_BACKSPACE = 259
|
92
|
+
KEY_INSERT = 260
|
93
|
+
KEY_DELETE = 261
|
94
|
+
KEY_RIGHT = 262
|
95
|
+
KEY_LEFT = 263
|
96
|
+
KEY_DOWN = 264
|
97
|
+
KEY_UP = 265
|
98
|
+
KEY_PAGE_UP = 266
|
99
|
+
KEY_PAGE_DOWN = 267
|
100
|
+
KEY_HOME = 268
|
101
|
+
KEY_END = 269
|
102
|
+
KEY_CAPS_LOCK = 280
|
103
|
+
KEY_SCROLL_LOCK = 281
|
104
|
+
KEY_NUM_LOCK = 282
|
105
|
+
KEY_PRINT_SCREEN = 283
|
106
|
+
KEY_PAUSE = 284
|
107
|
+
KEY_F1 = 290
|
108
|
+
KEY_F2 = 291
|
109
|
+
KEY_F3 = 292
|
110
|
+
KEY_F4 = 293
|
111
|
+
KEY_F5 = 294
|
112
|
+
KEY_F6 = 295
|
113
|
+
KEY_F7 = 296
|
114
|
+
KEY_F8 = 297
|
115
|
+
KEY_F9 = 298
|
116
|
+
KEY_F10 = 299
|
117
|
+
KEY_F11 = 300
|
118
|
+
KEY_F12 = 301
|
119
|
+
KEY_F13 = 302
|
120
|
+
KEY_F14 = 303
|
121
|
+
KEY_F15 = 304
|
122
|
+
KEY_F16 = 305
|
123
|
+
KEY_F17 = 306
|
124
|
+
KEY_F18 = 307
|
125
|
+
KEY_F19 = 308
|
126
|
+
KEY_F20 = 309
|
127
|
+
KEY_F21 = 310
|
128
|
+
KEY_F22 = 311
|
129
|
+
KEY_F23 = 312
|
130
|
+
KEY_F24 = 313
|
131
|
+
KEY_F25 = 314
|
132
|
+
KEY_KP_0 = 320
|
133
|
+
KEY_KP_1 = 321
|
134
|
+
KEY_KP_2 = 322
|
135
|
+
KEY_KP_3 = 323
|
136
|
+
KEY_KP_4 = 324
|
137
|
+
KEY_KP_5 = 325
|
138
|
+
KEY_KP_6 = 326
|
139
|
+
KEY_KP_7 = 327
|
140
|
+
KEY_KP_8 = 328
|
141
|
+
KEY_KP_9 = 329
|
142
|
+
KEY_KP_DECIMAL = 330
|
143
|
+
KEY_KP_DIVIDE = 331
|
144
|
+
KEY_KP_MULTIPLY = 332
|
145
|
+
KEY_KP_SUBTRACT = 333
|
146
|
+
KEY_KP_ADD = 334
|
147
|
+
KEY_KP_ENTER = 335
|
148
|
+
KEY_KP_EQUAL = 336
|
149
|
+
KEY_LEFT_SHIFT = 340
|
150
|
+
KEY_LEFT_CONTROL = 341
|
151
|
+
KEY_LEFT_ALT = 342
|
152
|
+
KEY_LEFT_SUPER = 343
|
153
|
+
KEY_RIGHT_SHIFT = 344
|
154
|
+
KEY_RIGHT_CONTROL = 345
|
155
|
+
KEY_RIGHT_ALT = 346
|
156
|
+
KEY_RIGHT_SUPER = 347
|
157
|
+
KEY_MENU = 348
|
158
|
+
KEY_LAST = KEY_MENU
|
159
|
+
|
160
|
+
MOD_SHIFT = 0x0001
|
161
|
+
MOD_CONTROL = 0x0002
|
162
|
+
MOD_ALT = 0x0004
|
163
|
+
MOD_SUPER = 0x0008
|
164
|
+
MOD_CAPS_LOCK = 0x0010
|
165
|
+
MOD_NUM_LOCK = 0x0020
|
166
|
+
|
167
|
+
MOUSE_BUTTON_1 = 0
|
168
|
+
MOUSE_BUTTON_2 = 1
|
169
|
+
MOUSE_BUTTON_3 = 2
|
170
|
+
MOUSE_BUTTON_4 = 3
|
171
|
+
MOUSE_BUTTON_5 = 4
|
172
|
+
MOUSE_BUTTON_6 = 5
|
173
|
+
MOUSE_BUTTON_7 = 6
|
174
|
+
MOUSE_BUTTON_8 = 7
|
175
|
+
MOUSE_BUTTON_LAST = MOUSE_BUTTON_8
|
176
|
+
MOUSE_BUTTON_LEFT = MOUSE_BUTTON_1
|
177
|
+
MOUSE_BUTTON_RIGHT = MOUSE_BUTTON_2
|
178
|
+
MOUSE_BUTTON_MIDDLE = MOUSE_BUTTON_3
|
179
|
+
|
180
|
+
JOYSTICK_1 = 0
|
181
|
+
JOYSTICK_2 = 1
|
182
|
+
JOYSTICK_3 = 2
|
183
|
+
JOYSTICK_4 = 3
|
184
|
+
JOYSTICK_5 = 4
|
185
|
+
JOYSTICK_6 = 5
|
186
|
+
JOYSTICK_7 = 6
|
187
|
+
JOYSTICK_8 = 7
|
188
|
+
JOYSTICK_9 = 8
|
189
|
+
JOYSTICK_10 = 9
|
190
|
+
JOYSTICK_11 = 10
|
191
|
+
JOYSTICK_12 = 11
|
192
|
+
JOYSTICK_13 = 12
|
193
|
+
JOYSTICK_14 = 13
|
194
|
+
JOYSTICK_15 = 14
|
195
|
+
JOYSTICK_16 = 15
|
196
|
+
JOYSTICK_LAST = JOYSTICK_16
|
197
|
+
|
198
|
+
GAMEPAD_BUTTON_A = 0
|
199
|
+
GAMEPAD_BUTTON_B = 1
|
200
|
+
GAMEPAD_BUTTON_X = 2
|
201
|
+
GAMEPAD_BUTTON_Y = 3
|
202
|
+
GAMEPAD_BUTTON_LEFT_BUMPER = 4
|
203
|
+
GAMEPAD_BUTTON_RIGHT_BUMPER = 5
|
204
|
+
GAMEPAD_BUTTON_BACK = 6
|
205
|
+
GAMEPAD_BUTTON_START = 7
|
206
|
+
GAMEPAD_BUTTON_GUIDE = 8
|
207
|
+
GAMEPAD_BUTTON_LEFT_THUMB = 9
|
208
|
+
GAMEPAD_BUTTON_RIGHT_THUMB = 10
|
209
|
+
GAMEPAD_BUTTON_DPAD_UP = 11
|
210
|
+
GAMEPAD_BUTTON_DPAD_RIGHT = 12
|
211
|
+
GAMEPAD_BUTTON_DPAD_DOWN = 13
|
212
|
+
GAMEPAD_BUTTON_DPAD_LEFT = 14
|
213
|
+
GAMEPAD_BUTTON_LAST = GAMEPAD_BUTTON_DPAD_LEFT
|
214
|
+
|
215
|
+
GAMEPAD_BUTTON_CROSS = GAMEPAD_BUTTON_A
|
216
|
+
GAMEPAD_BUTTON_CIRCLE = GAMEPAD_BUTTON_B
|
217
|
+
GAMEPAD_BUTTON_SQUARE = GAMEPAD_BUTTON_X
|
218
|
+
GAMEPAD_BUTTON_TRIANGLE = GAMEPAD_BUTTON_Y
|
219
|
+
|
220
|
+
GAMEPAD_AXIS_LEFT_X = 0
|
221
|
+
GAMEPAD_AXIS_LEFT_Y = 1
|
222
|
+
GAMEPAD_AXIS_RIGHT_X = 2
|
223
|
+
GAMEPAD_AXIS_RIGHT_Y = 3
|
224
|
+
GAMEPAD_AXIS_LEFT_TRIGGER = 4
|
225
|
+
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
226
|
+
GAMEPAD_AXIS_LAST = GAMEPAD_AXIS_RIGHT_TRIGGER
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
|
231
|
+
module Graphics
|
232
|
+
|
233
|
+
def self.fps
|
234
|
+
end
|
235
|
+
|
236
|
+
def self.render
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
module Game
|
241
|
+
|
242
|
+
class << self
|
243
|
+
|
244
|
+
attr_accessor :title
|
245
|
+
attr_accessor :fullscreen
|
246
|
+
end
|
247
|
+
|
248
|
+
def self.init
|
249
|
+
end
|
250
|
+
|
251
|
+
def self.create(width, height, title, **opts)
|
252
|
+
end
|
253
|
+
|
254
|
+
def self.center
|
255
|
+
end
|
256
|
+
|
257
|
+
def self.close(flag = true)
|
258
|
+
end
|
259
|
+
|
260
|
+
def self.closing?
|
261
|
+
end
|
262
|
+
|
263
|
+
def self.terminate
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|