rubygame 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/CREDITS +50 -0
  2. data/Changelog +162 -0
  3. data/LICENSE +504 -0
  4. data/README +122 -0
  5. data/Rakefile +380 -0
  6. data/TODO +45 -0
  7. data/doc/extended_readme.rdoc +49 -0
  8. data/doc/getting_started.rdoc +47 -0
  9. data/doc/macosx_install.rdoc +74 -0
  10. data/doc/windows_install.rdoc +124 -0
  11. data/ext/rubygame/MANIFEST +25 -0
  12. data/ext/rubygame/rubygame_event.c +644 -0
  13. data/ext/rubygame/rubygame_event.h +48 -0
  14. data/ext/rubygame/rubygame_gfx.c +951 -0
  15. data/ext/rubygame/rubygame_gfx.h +102 -0
  16. data/ext/rubygame/rubygame_gl.c +154 -0
  17. data/ext/rubygame/rubygame_gl.h +32 -0
  18. data/ext/rubygame/rubygame_image.c +108 -0
  19. data/ext/rubygame/rubygame_image.h +41 -0
  20. data/ext/rubygame/rubygame_joystick.c +247 -0
  21. data/ext/rubygame/rubygame_joystick.h +41 -0
  22. data/ext/rubygame/rubygame_main.c +155 -0
  23. data/ext/rubygame/rubygame_main.h +33 -0
  24. data/ext/rubygame/rubygame_mixer.c +764 -0
  25. data/ext/rubygame/rubygame_mixer.h +62 -0
  26. data/ext/rubygame/rubygame_screen.c +420 -0
  27. data/ext/rubygame/rubygame_screen.h +41 -0
  28. data/ext/rubygame/rubygame_shared.c +152 -0
  29. data/ext/rubygame/rubygame_shared.h +54 -0
  30. data/ext/rubygame/rubygame_surface.c +1107 -0
  31. data/ext/rubygame/rubygame_surface.h +62 -0
  32. data/ext/rubygame/rubygame_time.c +183 -0
  33. data/ext/rubygame/rubygame_time.h +32 -0
  34. data/ext/rubygame/rubygame_ttf.c +600 -0
  35. data/ext/rubygame/rubygame_ttf.h +69 -0
  36. data/lib/rubygame.rb +40 -0
  37. data/lib/rubygame/MANIFEST +12 -0
  38. data/lib/rubygame/clock.rb +128 -0
  39. data/lib/rubygame/constants.rb +238 -0
  40. data/lib/rubygame/event.rb +313 -0
  41. data/lib/rubygame/ftor.rb +370 -0
  42. data/lib/rubygame/hotspot.rb +265 -0
  43. data/lib/rubygame/keyconstants.rb +237 -0
  44. data/lib/rubygame/mediabag.rb +94 -0
  45. data/lib/rubygame/queue.rb +288 -0
  46. data/lib/rubygame/rect.rb +614 -0
  47. data/lib/rubygame/sfont.rb +223 -0
  48. data/lib/rubygame/sprite.rb +477 -0
  49. data/samples/FreeSans.ttf +0 -0
  50. data/samples/GPL.txt +340 -0
  51. data/samples/README +40 -0
  52. data/samples/chimp.bmp +0 -0
  53. data/samples/chimp.rb +313 -0
  54. data/samples/demo_gl.rb +151 -0
  55. data/samples/demo_gl_tex.rb +197 -0
  56. data/samples/demo_music.rb +75 -0
  57. data/samples/demo_rubygame.rb +279 -0
  58. data/samples/demo_sfont.rb +52 -0
  59. data/samples/demo_ttf.rb +193 -0
  60. data/samples/demo_utf8.rb +53 -0
  61. data/samples/fist.bmp +0 -0
  62. data/samples/load_and_blit.rb +22 -0
  63. data/samples/panda.png +0 -0
  64. data/samples/punch.wav +0 -0
  65. data/samples/ruby.png +0 -0
  66. data/samples/term16.png +0 -0
  67. data/samples/whiff.wav +0 -0
  68. metadata +123 -0
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Rubygame -- Ruby code and bindings to SDL to facilitate game creation
3
+ * Copyright (C) 2004-2007 John Croisant
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
+ *
19
+ */
20
+
21
+ #ifndef _RUBYGAME_MIXER_H
22
+ #define _RUBYGAME_MIXER_H
23
+
24
+ #include "SDL_audio.h"
25
+ #include "SDL_mixer.h"
26
+
27
+ extern void Init_rubygame_mixer();
28
+ extern VALUE mMixer;
29
+
30
+ extern VALUE rbgm_mixer_openaudio(int, VALUE*, VALUE);
31
+ extern VALUE rbgm_mixer_closeaudio(VALUE);
32
+ extern VALUE rbgm_mixer_getmixchans();
33
+ extern VALUE rbgm_mixer_setmixchans(VALUE, VALUE);
34
+ extern VALUE rbgm_mixer_getdrivername(VALUE);
35
+
36
+ extern VALUE cSample;
37
+ extern VALUE rbgm_sample_new(VALUE, VALUE);
38
+ extern VALUE rbgm_mixchan_play( VALUE, VALUE, VALUE, VALUE );
39
+ extern VALUE rbgm_mixchan_stop( VALUE, VALUE );
40
+ extern VALUE rbgm_mixchan_pause( VALUE, VALUE );
41
+ extern VALUE rbgm_mixchan_resume( VALUE, VALUE );
42
+
43
+ extern VALUE cMusic;
44
+ extern VALUE rbgm_mixmusic_setcommand(VALUE, VALUE);
45
+ extern VALUE rbgm_mixmusic_new(VALUE, VALUE);
46
+
47
+ extern VALUE rbgm_mixmusic_play(int, VALUE*, VALUE);
48
+ extern VALUE rbgm_mixmusic_stop(VALUE);
49
+ extern VALUE rbgm_mixmusic_resume(VALUE);
50
+ extern VALUE rbgm_mixmusic_pause(VALUE);
51
+ extern VALUE rbgm_mixmusic_rewind(VALUE);
52
+ extern VALUE rbgm_mixmusic_jump(VALUE, VALUE);
53
+ extern VALUE rbgm_mixmusic_paused(VALUE);
54
+ extern VALUE rbgm_mixmusic_playing(VALUE);
55
+
56
+ extern VALUE rbgm_mixmusic_getvolume(VALUE);
57
+ extern VALUE rbgm_mixmusic_setvolume(VALUE, VALUE);
58
+ extern VALUE rbgm_mixmusic_fadein(int, VALUE*, VALUE);
59
+ extern VALUE rbgm_mixmusic_fadeout(VALUE, VALUE);
60
+ extern VALUE rbgm_mixmusic_fading(int, VALUE*, VALUE);
61
+
62
+ #endif
@@ -0,0 +1,420 @@
1
+ /*
2
+ * Screen -- Rubygame-bound SDL display window
3
+ *
4
+ * --
5
+ * Rubygame -- Ruby code and bindings to SDL to facilitate game creation
6
+ * Copyright (C) 2004-2007 John Croisant
7
+ *
8
+ * This library is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU Lesser General Public
10
+ * License as published by the Free Software Foundation; either
11
+ * version 2.1 of the License, or (at your option) any later version.
12
+ *
13
+ * This library is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ * Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public
19
+ * License along with this library; if not, write to the Free Software
20
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
+ * ++
22
+ */
23
+
24
+ #include "rubygame_shared.h"
25
+ #include "rubygame_screen.h"
26
+ #include "rubygame_surface.h"
27
+
28
+ void Rubygame_Init_Screen();
29
+
30
+ VALUE cScreen;
31
+
32
+ VALUE rbgm_screen_setmode(int, VALUE*, VALUE);
33
+ VALUE rbgm_screen_getsurface(VALUE);
34
+
35
+ VALUE rbgm_screen_getcaption(VALUE);
36
+ VALUE rbgm_screen_setcaption(VALUE, VALUE);
37
+
38
+ VALUE rbgm_screen_update(int, VALUE*, VALUE);
39
+ VALUE rbgm_screen_updaterects(VALUE, VALUE);
40
+ VALUE rbgm_screen_flip(VALUE);
41
+
42
+ VALUE rbgm_screen_getshowcursor(VALUE);
43
+ VALUE rbgm_screen_setshowcursor(VALUE, VALUE);
44
+
45
+
46
+ /* call-seq:
47
+ * new(size, depth=0, flags=[SWSURFACE]) -> Screen
48
+ * (aliases: set_mode, instance)
49
+ *
50
+ * Create a new Rubygame window if there is none, or modify the existing one.
51
+ * You cannot create more than one Screen; the existing one will be replaced.
52
+ * (This is a limitation of SDL.)
53
+ * Returns the resulting Screen.
54
+ *
55
+ * This method takes these arguments:
56
+ * size:: requested window size (in pixels), in the form [width,height]
57
+ * depth:: requested color depth (in bits per pixel). If 0 (default), the
58
+ * current system color depth.
59
+ * flags:: an Array of zero or more of the following flags (located under the
60
+ * Rubygame module).
61
+ *
62
+ * SWSURFACE:: Create the video surface in system memory.
63
+ * HWSURFACE:: Create the video surface in video memory.
64
+ * ASYNCBLIT:: Enables the use of asynchronous updates of the
65
+ * display surface. This will usually slow down
66
+ * blitting on single CPU machines, but may provide a
67
+ * speed increase on SMP systems.
68
+ * ANYFORMAT:: Normally, if a video surface of the requested
69
+ * bits-per-pixel (bpp) is not available, Rubygame
70
+ * will emulate one with a shadow surface. Passing
71
+ * +ANYFORMAT+ prevents this and causes Rubygame to
72
+ * use the video surface regardless of its depth.
73
+ * DOUBLEBUF:: Enable hardware double buffering; only valid with
74
+ * +HWSURFACE+. Calling #flip will flip the
75
+ * buffers and update the screen. All drawing will
76
+ * take place on the surface that is not displayed at
77
+ * the moment. If double buffering could not be
78
+ * enabled then #flip will just update the
79
+ * entire screen.
80
+ * FULLSCREEN:: Rubygame will attempt to use a fullscreen mode. If
81
+ * a hardware resolution change is not possible (for
82
+ * whatever reason), the next higher resolution will
83
+ * be used and the display window centered on a black
84
+ * background.
85
+ * OPENGL:: Create an OpenGL rendering context. You must set
86
+ * proper OpenGL video attributes with GL#set_attrib
87
+ * before calling this method with this flag. You can
88
+ * then use separate opengl libraries (for example rbogl)
89
+ * to do all OpenGL-related functions.
90
+ * Please note that you can't blit or draw regular SDL
91
+ * Surfaces onto an OpenGL-mode screen; you must use
92
+ * OpenGL functions.
93
+ * RESIZABLE:: Create a resizable window. When the window is
94
+ * resized by the user, a ResizeEvent is
95
+ * generated and #set_mode can be called again
96
+ * with the new size.
97
+ * NOFRAME:: If possible, create a window with no title bar or
98
+ * frame decoration.
99
+ * Fullscreen modes automatically have this flag set.
100
+ */
101
+ VALUE rbgm_screen_setmode(int argc, VALUE *argv, VALUE module)
102
+ {
103
+ SDL_Surface *screen;
104
+ int w, h, depth;
105
+ Uint32 flags;
106
+ VALUE vsize, vdepth, vflags;
107
+
108
+ rb_scan_args(argc, argv, "12", &vsize, &vdepth, &vflags);
109
+
110
+ vsize = convert_to_array(vsize);
111
+ w = NUM2INT(rb_ary_entry(vsize,0));
112
+ h = NUM2INT(rb_ary_entry(vsize,1));
113
+
114
+ depth = 0;
115
+ if( RTEST(vdepth) )
116
+ {
117
+ depth = NUM2INT(vdepth);
118
+ }
119
+
120
+ flags = collapse_flags(vflags); /* in rubygame_shared */
121
+
122
+ screen = SDL_SetVideoMode( w,h,depth,flags );
123
+
124
+ if( screen==NULL )
125
+ {
126
+ rb_raise(eSDLError,"Couldn't set [%d x %d] %d bpp video mode: %s",
127
+ w, h, depth, SDL_GetError());
128
+ }
129
+ //format = screen->format;
130
+ //printf("New screen will be: %dx%d, %d bpp. Masks: %d, %d, %d, %d\n",w,h,depth,format->Rmask,format->Gmask,format->Bmask,format->Amask);
131
+ return Data_Wrap_Struct( cScreen,0,0,screen );
132
+ }
133
+
134
+ /* call-seq:
135
+ * get_surface
136
+ *
137
+ * Returns the current display window, or raises SDLError if it
138
+ * fails to get it (for example, if it doesn't exist yet).
139
+ */
140
+ VALUE rbgm_screen_getsurface(VALUE module)
141
+ {
142
+ SDL_Surface *surface;
143
+ surface = SDL_GetVideoSurface();
144
+ if(surface==NULL)
145
+ {
146
+ rb_raise(eSDLError,"Couldn't get video surface: %s",SDL_GetError());
147
+ }
148
+ return Data_Wrap_Struct( cScreen,0,0,surface );
149
+ }
150
+
151
+ /* Screen methods: */
152
+
153
+ /* call-seq:
154
+ * title -> String
155
+ *
156
+ * Returns the current window title for the Screen.
157
+ * The default is an empty string.
158
+ */
159
+ VALUE rbgm_screen_getcaption(VALUE self)
160
+ {
161
+ char *title,*icon;
162
+
163
+ SDL_WM_GetCaption( &title,&icon );
164
+ if (title == NULL)
165
+ title = "\0";
166
+ /* We don't really care about icon. */
167
+ return rb_str_new2(title);
168
+ }
169
+
170
+ /* call-seq:
171
+ * title = title
172
+ *
173
+ * Sets the window title for the Screen.
174
+ *
175
+ * title:: a String, (usually) displayed at the top of the Rubygame
176
+ * window (when not in fullscreen mode). If omitted or +nil+,
177
+ * +title+ will be an empty string.
178
+ * How this string is displayed (if at all) is system-dependent.
179
+ */
180
+ VALUE rbgm_screen_setcaption(VALUE self, VALUE title)
181
+ {
182
+ char *title_str;
183
+ title_str = ""; /* default to blank */
184
+
185
+ if( RTEST(title) )
186
+ {
187
+ title_str = StringValuePtr(title);
188
+ }
189
+ SDL_WM_SetCaption(title_str,title_str);
190
+ return self;
191
+ }
192
+
193
+ /* call-seq:
194
+ * update()
195
+ * update(rect)
196
+ * update(x,y,w,h)
197
+ *
198
+ * Updates (refreshes) all or part of the Rubygame window, revealing to the
199
+ * user any changes that have been made since the last update. If you're using
200
+ * a double-buffered display (see Display.set_mode), you should use
201
+ * Screen#flip instead.
202
+ *
203
+ * This method takes these arguments:
204
+ * rect:: a Rubygame::Rect representing the area of the screen to update.
205
+ * Can also be an length-4 Array, or given as 4 separate arguments.
206
+ * If omitted or nil, the entire screen is updated.
207
+ */
208
+ VALUE rbgm_screen_update(int argc, VALUE *argv, VALUE self)
209
+ {
210
+ int x,y,w,h;
211
+ SDL_Surface *screen;
212
+ Data_Get_Struct(self,SDL_Surface,screen);
213
+ VALUE vx, vy, vw, vh;
214
+
215
+ rb_scan_args(argc, argv, "04", &vx, &vy, &vw, &vh);
216
+
217
+ x = y = w = h = 0;
218
+
219
+ if( RTEST(vx) )
220
+ {
221
+ switch( TYPE(vx) ) {
222
+ case T_ARRAY: {
223
+ if( RARRAY(vx)->len < 4 )
224
+ {
225
+ rb_raise(rb_eArgError,"Array is too short to be a Rect (%s for 4)",
226
+ RARRAY(vx)->len);
227
+ }
228
+ x = NUM2INT(rb_ary_entry(vx,0));
229
+ y = NUM2INT(rb_ary_entry(vx,1));
230
+ w = NUM2INT(rb_ary_entry(vx,2));
231
+ h = NUM2INT(rb_ary_entry(vx,3));
232
+ break;
233
+ }
234
+ case T_FLOAT:
235
+ case T_BIGNUM:
236
+ case T_FIXNUM: {
237
+ x = NUM2INT(vx);
238
+ y = NUM2INT(vy);
239
+ w = NUM2INT(vw);
240
+ h = NUM2INT(vh);
241
+ break;
242
+ }
243
+ default: {
244
+ rb_raise(rb_eTypeError,"Unrecognized type for x (wanted Array or Numeric).");
245
+ break;
246
+ }
247
+ }
248
+ }
249
+
250
+ Sint16 left,top,right,bottom;
251
+
252
+ left = min( max( 0, x ), screen->w );
253
+ top = min( max( 0, y ), screen->h );
254
+ right = min( max( left, x + w), screen->w );
255
+ bottom = min( max( top, y + h), screen->h );
256
+
257
+ x = left;
258
+ y = top;
259
+ w = right - left;
260
+ h = bottom - top;
261
+
262
+ SDL_UpdateRect(screen,x,y,w,h);
263
+ return self;
264
+ }
265
+
266
+ /* call-seq:
267
+ * update_rects(rects)
268
+ *
269
+ * Updates (as Screen#update does) several areas of the screen.
270
+ *
271
+ * This method takes these arguments:
272
+ * rects:: an Array containing any number of Rect objects, each
273
+ * rect representing a portion of the screen to update.
274
+ */
275
+ VALUE rbgm_screen_updaterects(VALUE self, VALUE array_rects)
276
+ {
277
+ int i, num_rects;
278
+ VALUE each_rect;
279
+ SDL_Surface *screen;
280
+ SDL_Rect *rects;
281
+
282
+ /* unwrap the Screen instance from self (VALUE) */
283
+ Data_Get_Struct(self,SDL_Surface,screen);
284
+
285
+ /* prepare an (uninitialized) array of Rects */
286
+ array_rects = convert_to_array(array_rects);
287
+ num_rects = RARRAY(array_rects)->len;
288
+ rects = ALLOCA_N(SDL_Rect, num_rects);
289
+
290
+ /* initialize the array of Rects from array_rects */
291
+ for( i=0; i < num_rects; i++ )
292
+ {
293
+ each_rect = rb_ary_entry(array_rects,i);
294
+
295
+ Sint16 x,y,left,top,right,bottom;
296
+ Uint16 w,h;
297
+
298
+ x = NUM2INT(rb_ary_entry(each_rect,0));
299
+ y = NUM2INT(rb_ary_entry(each_rect,1));
300
+ w = NUM2INT(rb_ary_entry(each_rect,2));
301
+ h = NUM2INT(rb_ary_entry(each_rect,3));
302
+
303
+ left = min( max( 0, x ), screen->w );
304
+ top = min( max( 0, y ), screen->h );
305
+ right = min( max( left, x + w), screen->w );
306
+ bottom = min( max( top, y + h), screen->h );
307
+
308
+ rects[i].x = left;
309
+ rects[i].y = top;
310
+ rects[i].w = right - left;
311
+ rects[i].h = bottom - top;
312
+ }
313
+
314
+ /* call the SDL method to update from all these rects */
315
+ SDL_UpdateRects( screen, num_rects, rects );
316
+
317
+ return self;
318
+ }
319
+
320
+ /* call-seq:
321
+ * flip()
322
+ *
323
+ * If the Rubygame display is double-buffered (see #set_mode), flips
324
+ * the buffers and updates the whole screen. Otherwise, just updates the
325
+ * whole screen.
326
+ */
327
+ VALUE rbgm_screen_flip(VALUE self)
328
+ {
329
+ SDL_Surface *screen;
330
+ Data_Get_Struct(self, SDL_Surface, screen);
331
+ SDL_Flip(screen);
332
+ return self;
333
+ }
334
+
335
+ /* call-seq:
336
+ * show_cursor? -> true or false
337
+ *
338
+ * Returns true if the mouse cursor is shown, or false if hidden. See also
339
+ * #show_cursor=
340
+ */
341
+ VALUE rbgm_screen_getshowcursor(VALUE self)
342
+ {
343
+ return SDL_ShowCursor(SDL_QUERY);
344
+ }
345
+
346
+ /* call-seq:
347
+ * show_cursor = value -> true or false or nil
348
+ *
349
+ * Set whether the mouse cursor is displayed or not. If +value+ is true,
350
+ * the cursor will be shown; if false, it will be hidden. See also
351
+ * #show_cursor?
352
+ */
353
+ VALUE rbgm_screen_setshowcursor(VALUE self, VALUE val)
354
+ {
355
+ int state;
356
+
357
+ if(val == Qtrue) { state = SDL_ENABLE; }
358
+ else if(val == Qfalse || val == Qnil) { state = SDL_DISABLE; }
359
+ else { return Qnil; }
360
+
361
+ return SDL_ShowCursor(state);
362
+ }
363
+
364
+ /*
365
+ * Document-class: Rubygame::Screen
366
+ *
367
+ * Screen represents the display window for the game. The Screen is a
368
+ * special Surface that is displayed to the user. By changing and then
369
+ * updating the Screen many times per second, we can create the illusion
370
+ * of continous motion.
371
+ *
372
+ * Screen inherits most of the Surface methods, and can be passed to methods
373
+ * which expect a Surface, including Surface#blit and the Draw functions.
374
+ * However, the Screen cannot have a colorkey or an alpha channel, so
375
+ * Surface#set_colorkey and Surface#set_alpha are not inherited.
376
+ *
377
+ * Please note that only *one* Screen can exist, per application, at a time;
378
+ * this is a limitation of SDL. You *must* use Screen.set_mode to create the
379
+ * Screen or modify its properties.
380
+ *
381
+ * Also note that no changes to the Screen will be seen until it is refreshed.
382
+ * See #update, #update_rects, and #flip for ways to refresh all or part of
383
+ * the Screen.
384
+ *
385
+ */
386
+ void Rubygame_Init_Screen()
387
+ {
388
+ #if 0
389
+ mRubygame = rb_define_module("Rubygame");
390
+ cSurface = rb_define_class_under(mRubygame,"Surface",rb_cObject);
391
+ #endif
392
+
393
+ /* Screen class */
394
+ cScreen = rb_define_class_under(mRubygame,"Screen",cSurface);
395
+ rb_define_singleton_method(cScreen,"new",rbgm_screen_setmode, -1);
396
+ rb_define_alias(rb_singleton_class(cScreen),"set_mode","new");
397
+ rb_define_alias(rb_singleton_class(cScreen),"instance","new");
398
+ rb_define_singleton_method(cScreen,"get_surface",rbgm_screen_getsurface, 0);
399
+
400
+ /* These are inherited from Surface, but should not be called on Screen */
401
+ rb_undef_method(cScreen,"set_alpha");
402
+ rb_undef_method(cScreen,"set_colorkey");
403
+
404
+ /* Screen methods */
405
+ rb_define_method(cScreen,"title",rbgm_screen_getcaption,0);
406
+ rb_define_method(cScreen,"title=",rbgm_screen_setcaption,1);
407
+ rb_define_method(cScreen,"update",rbgm_screen_update,-1);
408
+ rb_define_method(cScreen,"update_rects",rbgm_screen_updaterects,1);
409
+ rb_define_method(cScreen,"flip",rbgm_screen_flip,0);
410
+ rb_define_method(cScreen,"show_cursor?",rbgm_screen_getshowcursor,0);
411
+ rb_define_method(cScreen,"show_cursor=",rbgm_screen_setshowcursor,1);
412
+
413
+ /* Screen initialization flags */
414
+ rb_define_const(mRubygame,"DOUBLEBUF",UINT2NUM(SDL_DOUBLEBUF));
415
+ rb_define_const(mRubygame,"FULLSCREEN",UINT2NUM(SDL_FULLSCREEN));
416
+ rb_define_const(mRubygame,"OPENGL",UINT2NUM(SDL_OPENGL));
417
+ rb_define_const(mRubygame,"OPENGLBLIT",UINT2NUM(SDL_OPENGLBLIT));
418
+ rb_define_const(mRubygame,"RESIZABLE",UINT2NUM(SDL_RESIZABLE));
419
+ rb_define_const(mRubygame,"NOFRAME",UINT2NUM(SDL_NOFRAME));
420
+ }