rubysdl 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/NEWS.en +36 -0
- data/NEWS.ja +36 -0
- data/README.en +1 -1
- data/README.ja +1 -1
- data/doc-en/Makefile +1 -1
- data/doc-en/cdrom.rsd +31 -0
- data/doc-en/event.rsd +6 -2
- data/doc-en/font.rsd +141 -4
- data/doc-en/general.rsd +14 -0
- data/doc-en/init.rsd +3 -3
- data/doc-en/mixer.rsd +68 -0
- data/doc-en/mpeg.rsd +24 -0
- data/doc-en/sdlskk.rsd +5 -0
- data/doc-en/video.rsd +35 -0
- data/doc-en/wm.rsd +6 -0
- data/doc/cdrom.rsd +29 -0
- data/doc/event.rsd +5 -2
- data/doc/font.rsd +250 -4
- data/doc/general.rsd +12 -0
- data/doc/mixer.rsd +68 -0
- data/doc/mpeg.rsd +24 -0
- data/doc/sdlskk.rsd +5 -1
- data/doc/video.rsd +35 -0
- data/doc/wm.rsd +10 -0
- data/extconf.rb +9 -0
- data/lib/rubysdl_aliases.rb +9 -0
- data/lib/sdl.rb +19 -32
- data/rubysdl.h +37 -4
- data/rubysdl_cdrom.c +14 -1
- data/rubysdl_event.c +14 -0
- data/rubysdl_image.c +1 -1
- data/rubysdl_joystick.c +0 -1
- data/rubysdl_kanji.c +86 -11
- data/rubysdl_main.c +8 -1
- data/rubysdl_mixer.c +17 -4
- data/rubysdl_sdlskk.c +19 -0
- data/rubysdl_sge_video.c +44 -12
- data/rubysdl_smpeg.c +7 -2
- data/rubysdl_time.c +13 -1
- data/rubysdl_ttf.c +92 -13
- data/rubysdl_video.c +10 -4
- data/rubysdl_wm.c +9 -3
- data/sample/font.rb +1 -0
- data/sample/load_from_io.rb +2 -2
- data/sample/plaympeg.rb +1 -5
- metadata +3 -3
data/NEWS.en
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
version 2.1.0
|
2
|
+
add following methods
|
3
|
+
* SDL::TTF#close
|
4
|
+
* SDL::TTF#closed?
|
5
|
+
* SDL::BMFont#close
|
6
|
+
* SDL::BMFont#closed?
|
7
|
+
* SDL::Kanji#close
|
8
|
+
* SDL::Kanji#closed?
|
9
|
+
* SDL::Surface#destroyed?
|
10
|
+
* SDL::Joystick#closed?
|
11
|
+
* SDL::Mixer::Wave#destroyed?
|
12
|
+
* SDL::Mixer::Music#destroyed?
|
13
|
+
* SDL::Kanji#get_coding_system
|
14
|
+
modify documents
|
15
|
+
Async following methods on Ruby 1.9
|
16
|
+
* SDL::Event#wait
|
17
|
+
* SDL.delay
|
18
|
+
Ruby m17n support on Ruby 1.9
|
19
|
+
* SDL::WM.set_caption
|
20
|
+
* SDL::WM.caption
|
21
|
+
* SDL::TTF#draw_solid
|
22
|
+
* SDL::TTF#draw_blended
|
23
|
+
* SDL::TTF#draw_shaded
|
24
|
+
* SDL::TTF#render_solid
|
25
|
+
* SDL::TTF#render_blended
|
26
|
+
* SDL::TTF#render_shaded
|
27
|
+
* SDL::Kanji#put
|
28
|
+
* SDL::Kanji#putTate
|
29
|
+
* SDL::SDLSKK#str
|
30
|
+
Fix the bug of following methods
|
31
|
+
* SDL::MPEG#move
|
32
|
+
|
33
|
+
version 2.0.1b
|
34
|
+
fix sample bug
|
35
|
+
fix SDL::MPEG.info
|
36
|
+
|
1
37
|
version 2.0.1
|
2
38
|
fix some compile errors/warnings
|
3
39
|
raise SDL::Surface::VideoMemoryLost when video memory is lost when calling SDL::Surface.blit
|
data/NEWS.ja
CHANGED
@@ -1,3 +1,39 @@
|
|
1
|
+
version 2.1.0
|
2
|
+
$B0J2<$N%a%=%C%I$rDI2C(B
|
3
|
+
* SDL::TTF#close
|
4
|
+
* SDL::TTF#closed?
|
5
|
+
* SDL::BMFont#close
|
6
|
+
* SDL::BMFont#closed?
|
7
|
+
* SDL::Kanji#close
|
8
|
+
* SDL::Kanji#closed?
|
9
|
+
* SDL::Surface#destroyed?
|
10
|
+
* SDL::Joystick#closed?
|
11
|
+
* SDL::Mixer::Wave#destroyed?
|
12
|
+
* SDL::Mixer::Music#destroyed?
|
13
|
+
* SDL::Kanji#get_coding_system
|
14
|
+
$B%I%-%e%a%s%H$N=$@5(B
|
15
|
+
$B0J2<$N%a%=%C%I$N8F$S$@$7Cf$K(B1.9$B$G%9%l%C%I@Z$jBX$(2DG=$KJQ99(B
|
16
|
+
* SDL::Event#wait
|
17
|
+
* SDL.delay
|
18
|
+
$B0J2<$N%a%=%C%I$G(BRuby$B$N(Bm17n$B5!G=$rMxMQ$9$k$h$&$KJQ99(B
|
19
|
+
* SDL::WM.set_caption
|
20
|
+
* SDL::WM.caption
|
21
|
+
* SDL::TTF#draw_solid
|
22
|
+
* SDL::TTF#draw_blended
|
23
|
+
* SDL::TTF#draw_shaded
|
24
|
+
* SDL::TTF#render_solid
|
25
|
+
* SDL::TTF#render_blended
|
26
|
+
* SDL::TTF#render_shaded
|
27
|
+
* SDL::Kanji#put
|
28
|
+
* SDL::Kanji#putTate
|
29
|
+
* SDL::SDLSKK#str
|
30
|
+
$B0J2<$N%a%=%C%I$N%P%0$r=$@5(B
|
31
|
+
* SDL::MPEG#move
|
32
|
+
|
33
|
+
version 2.0.1b
|
34
|
+
$B%5%s%W%k$N%P%0$r=$@5(B
|
35
|
+
SDL::MPEG.info$B$r=$@5(B
|
36
|
+
|
1
37
|
version 2.0.1
|
2
38
|
$B%3%s%Q%$%k$G$-$J$$>l9g$,$"$k$N$r=$@5(B
|
3
39
|
SDL::Surface.blit$B$G%S%G%*%a%b%j$,%m%9%H$7$?>l9g$K(B
|
data/README.en
CHANGED
data/README.ja
CHANGED
data/doc-en/Makefile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
RSD = ruby ../doc/rsd.rb -e
|
3
3
|
RDFILES = general.rd init.rd video.rd opengl.rd wm.rd event.rd joystick.rd cdrom.rd mixer.rd time.rd font.rd collision.rd sdlskk.rd mpeg.rd
|
4
4
|
RD2 = rd2
|
5
|
-
RD2OPT = -r rd/rd2html-lib.rb --html-lang=
|
5
|
+
RD2OPT = -r rd/rd2html-lib.rb --html-lang=en --html-charset=UTF-8
|
6
6
|
|
7
7
|
|
8
8
|
rubysdl_ref.en.html: rubysdl_ref.en.rd
|
data/doc-en/cdrom.rsd
CHANGED
@@ -413,5 +413,36 @@ Convert minitus/seconds/frames into frames and returns frames.
|
|
413
413
|
SEEALSO
|
414
414
|
CD.frames_to_msf
|
415
415
|
|
416
|
+
%%
|
417
|
+
NAME close
|
418
|
+
MOD CD
|
419
|
+
TYPE #
|
420
|
+
PURPOSE Closes a CD handle
|
421
|
+
|
422
|
+
PROTO
|
423
|
+
close
|
424
|
+
|
425
|
+
DESC
|
426
|
+
Closes $[self].
|
427
|
+
|
428
|
+
SEEALSO
|
429
|
+
CD.open
|
430
|
+
CD#closed?
|
431
|
+
|
432
|
+
%%
|
433
|
+
NAME closed?
|
434
|
+
MOD CD
|
435
|
+
TYPE #
|
436
|
+
PURPOSE Returns whether CD is closed
|
437
|
+
|
438
|
+
PROTO
|
439
|
+
closed?
|
440
|
+
|
441
|
+
DESC
|
442
|
+
Returns whether CD handle is closed by
|
443
|
+
@[CD#close]
|
444
|
+
|
445
|
+
SEEALSO
|
446
|
+
CD#close
|
416
447
|
|
417
448
|
|
data/doc-en/event.rsd
CHANGED
@@ -451,8 +451,12 @@ Raise @[Error] if there was an error while waiting
|
|
451
451
|
for events.
|
452
452
|
|
453
453
|
NOTES
|
454
|
-
|
455
|
-
|
454
|
+
In Ruby 1.9 and above, this method releases the global VM lock (GVL) prior to
|
455
|
+
calling the underlying SDL_WaitEvent function. This allows other Ruby threads to
|
456
|
+
continue executing while waiting for an event.
|
457
|
+
|
458
|
+
In Ruby 1.8 and below, there is no way to release the GVL, so all Ruby threads
|
459
|
+
suspend execution until this method finishes.
|
456
460
|
|
457
461
|
SEEALSO
|
458
462
|
Event.poll
|
data/doc-en/font.rsd
CHANGED
@@ -120,6 +120,40 @@ EXAMPLE
|
|
120
120
|
SDL::TTF.init
|
121
121
|
font = SDL::TTF.open("font.ttf", 32, 0)
|
122
122
|
|
123
|
+
%%
|
124
|
+
NAME close
|
125
|
+
MOD TTF
|
126
|
+
TYPE #
|
127
|
+
DEP SDL_ttf
|
128
|
+
PURPOSE Closes a font
|
129
|
+
|
130
|
+
PROTO
|
131
|
+
close
|
132
|
+
|
133
|
+
DESC
|
134
|
+
Closes a font and free related resources.
|
135
|
+
|
136
|
+
SEEALSO
|
137
|
+
TTF#closed?
|
138
|
+
|
139
|
+
%%
|
140
|
+
NAME closed?
|
141
|
+
MOD TTF
|
142
|
+
TYPE #
|
143
|
+
DEP SDL_ttf
|
144
|
+
PURPOSE Returns whether a font is closed or not
|
145
|
+
RVAL true/false
|
146
|
+
|
147
|
+
PROTO
|
148
|
+
closed?
|
149
|
+
|
150
|
+
DESC
|
151
|
+
Returns whether a font is closed by @[TTF#close]
|
152
|
+
|
153
|
+
SEEALSO
|
154
|
+
TTF#close
|
155
|
+
|
156
|
+
|
123
157
|
%%
|
124
158
|
NAME style
|
125
159
|
MOD TTF
|
@@ -354,7 +388,7 @@ NAME text_size
|
|
354
388
|
MOD TTF
|
355
389
|
TYPE #
|
356
390
|
DEP SDL_ttf
|
357
|
-
PURPOSE Get size of
|
391
|
+
PURPOSE Get size of text string as would be rendered
|
358
392
|
RVAL [Integer, Integer]
|
359
393
|
|
360
394
|
PROTO
|
@@ -366,6 +400,10 @@ Calculate the resulting surface size of the UTF8 encoded text rendered using fon
|
|
366
400
|
No actual rendering is done, however correct kerning is done to get the actual
|
367
401
|
width. The height returned in h is the same as you can get using @[TTF#height].
|
368
402
|
|
403
|
+
NOTES
|
404
|
+
If Ruby/SDL m17n support is enabled,
|
405
|
+
$[text] will be converted to suitable encoding.
|
406
|
+
|
369
407
|
RET
|
370
408
|
Returns a 2 element array as [w, h].
|
371
409
|
|
@@ -587,6 +625,40 @@ $[flags] is OR'd combination of following values:
|
|
587
625
|
font surface will be a bit slower but @[BMFont#set_color]
|
588
626
|
will be faster (O(1) instead of O(n^2)).
|
589
627
|
|
628
|
+
%%
|
629
|
+
NAME close
|
630
|
+
MOD BMFont
|
631
|
+
TYPE #
|
632
|
+
DEP SGE
|
633
|
+
PURPOSE Closes a font.
|
634
|
+
|
635
|
+
PROTO
|
636
|
+
close
|
637
|
+
|
638
|
+
DESC
|
639
|
+
Closes a font and release the resources.
|
640
|
+
|
641
|
+
SEEALSO
|
642
|
+
BMFont.open
|
643
|
+
BMFont#closed?
|
644
|
+
|
645
|
+
%%
|
646
|
+
NAME closed?
|
647
|
+
MOD BMFont
|
648
|
+
TYPE #
|
649
|
+
DEP SGE
|
650
|
+
PURPOSE Returns whether a font is closed.
|
651
|
+
RVAL true/false
|
652
|
+
|
653
|
+
PROTO
|
654
|
+
closed?
|
655
|
+
|
656
|
+
DESC
|
657
|
+
Returns whether a font is closed by @[BMFont#close].
|
658
|
+
|
659
|
+
SEEALSO
|
660
|
+
BMFont#close
|
661
|
+
|
590
662
|
%%
|
591
663
|
NAME set_color
|
592
664
|
MOD BMFont
|
@@ -696,6 +768,39 @@ $[size] is the height of one character.
|
|
696
768
|
SEEALSO
|
697
769
|
Kanji#add
|
698
770
|
|
771
|
+
%%
|
772
|
+
NAME close
|
773
|
+
MOD Kanji
|
774
|
+
TYPE #
|
775
|
+
PURPOSE Closes bdf font data
|
776
|
+
|
777
|
+
PROTO
|
778
|
+
close
|
779
|
+
|
780
|
+
DESC
|
781
|
+
Closes bdf font data and release
|
782
|
+
the resouces and memories.
|
783
|
+
|
784
|
+
SEEALSO
|
785
|
+
Kanji.open
|
786
|
+
Kanji#closed?
|
787
|
+
|
788
|
+
%%
|
789
|
+
NAME closed?
|
790
|
+
MOD Kanji
|
791
|
+
TYPE #
|
792
|
+
PURPOSE Returns whether bdf font is closed
|
793
|
+
|
794
|
+
PROTO
|
795
|
+
closed?
|
796
|
+
|
797
|
+
DESC
|
798
|
+
Returns whether bdf font is closed by @[Kanji#close]
|
799
|
+
|
800
|
+
SEEALSO
|
801
|
+
Kanji#close
|
802
|
+
|
803
|
+
|
699
804
|
%%
|
700
805
|
NAME add
|
701
806
|
MOD Kanji
|
@@ -710,7 +815,7 @@ Add font data fromt $[filename] into already loaded font $[self].
|
|
710
815
|
This method combines two or more font files into one.
|
711
816
|
|
712
817
|
SEEALSO
|
713
|
-
Kanji
|
818
|
+
Kanji.open
|
714
819
|
|
715
820
|
%%
|
716
821
|
NAME set_coding_system
|
@@ -729,6 +834,29 @@ Set encoding. $[sys] is one of following:
|
|
729
834
|
* SDL::Kanji::JIS
|
730
835
|
Default is SDL::Kanji::JIS.
|
731
836
|
|
837
|
+
SEEALSO
|
838
|
+
Kanji#get_coding_system
|
839
|
+
|
840
|
+
%%
|
841
|
+
NAME get_coding_system
|
842
|
+
MOD Kanji
|
843
|
+
TYPE #
|
844
|
+
PURPOSE Get character encoding
|
845
|
+
|
846
|
+
PROTO
|
847
|
+
get_coding_system
|
848
|
+
getCodingSystem
|
849
|
+
|
850
|
+
DESC
|
851
|
+
Get encoding. A return value is one of following:
|
852
|
+
* SDL::Kanji::SJIS
|
853
|
+
* SDL::Kanji::EUC
|
854
|
+
* SDL::Kanji::JIS
|
855
|
+
Default is SDL::Kanji::JIS.
|
856
|
+
|
857
|
+
SEEALSO
|
858
|
+
Kanji#set_coding_system
|
859
|
+
|
732
860
|
%%
|
733
861
|
NAME height
|
734
862
|
MOD Kanji
|
@@ -771,7 +899,7 @@ DESC
|
|
771
899
|
Returns the width of one character.
|
772
900
|
|
773
901
|
SEEALSO
|
774
|
-
textwidth
|
902
|
+
Kanji#textwidth
|
775
903
|
|
776
904
|
%%
|
777
905
|
NAME put
|
@@ -786,8 +914,13 @@ DESC
|
|
786
914
|
Renders $[text] at ($[x], $[y]) in $[surface]
|
787
915
|
with ($[r], $[g], $[b]) color.
|
788
916
|
|
917
|
+
NOTES
|
918
|
+
If Ruby/SDL m17n support is enabled, $[text]
|
919
|
+
will be converted to suitable encoding.
|
920
|
+
|
789
921
|
SEEALSO
|
790
922
|
Kanji#put_tate
|
923
|
+
Kanji#set_coding_system
|
791
924
|
|
792
925
|
%%
|
793
926
|
NAME put_tate
|
@@ -805,7 +938,11 @@ with ($[r], $[g], $[b]) color.
|
|
805
938
|
|
806
939
|
`Half-width' character is not rendered.
|
807
940
|
|
941
|
+
NOTES
|
942
|
+
If Ruby/SDL m17n support is enabled, $[text]
|
943
|
+
will be converted to suitable encoding.
|
944
|
+
|
808
945
|
SEEALSO
|
809
946
|
Kanji#put
|
810
|
-
|
947
|
+
Kanji#set_coding_system
|
811
948
|
|
data/doc-en/general.rsd
CHANGED
@@ -33,6 +33,20 @@ Ruby/SDL has following functions.
|
|
33
33
|
* ((<MPEG playback>)) with ((<SMPGE|URL:http://www.icculus.org/smpeg/>))
|
34
34
|
* ((<Window Management>)) and ((<Collision Detection>))
|
35
35
|
|
36
|
+
= m17n on Ruby 1.9
|
37
|
+
On ruby 1.9, strings have encoding information
|
38
|
+
but many methods of Ruby/SDL ignore this information
|
39
|
+
since SDL doesn't define the treatment of multibyte
|
40
|
+
encodings.
|
41
|
+
Only some methods use encoding information such as
|
42
|
+
@[WM.set_caption] and @[Kanji#put].
|
43
|
+
|
44
|
+
Please see items in this reference for more details.
|
45
|
+
|
46
|
+
You can enable/disable Ruby/SDL m17n support
|
47
|
+
to use --enable-m17n/--disable-m17n when you
|
48
|
+
run extconf.rb.
|
49
|
+
|
36
50
|
== SDL::Error
|
37
51
|
A Exception class for SDL specific errors.
|
38
52
|
This class is subclass of StandardError.
|
data/doc-en/init.rsd
CHANGED
@@ -21,11 +21,11 @@ Ruby/SDL methods. The $[flags] parameter specifies what
|
|
21
21
|
:SDL::INIT_AUDIO
|
22
22
|
Initialize autio subsystems.
|
23
23
|
:SDL::INIT_VIDEO
|
24
|
-
Initialize
|
24
|
+
Initialize ((<Video>)) subsystem.
|
25
25
|
:SDL::INIT_CDROM
|
26
|
-
Initialize
|
26
|
+
Initialize ((<CD-ROM>)) subsystem.
|
27
27
|
:SDL::INIT_JOYSTICK
|
28
|
-
Initialize
|
28
|
+
Initialize ((<Joystick>)) subsystem.
|
29
29
|
:SDL::INIT_EVERYTHING
|
30
30
|
Initialize all of the avobe.
|
31
31
|
|
data/doc-en/mixer.rsd
CHANGED
@@ -215,6 +215,39 @@ this conversion at load time. Therefore you should pay attention to memory consu
|
|
215
215
|
|
216
216
|
EXCEPTION *
|
217
217
|
|
218
|
+
%%
|
219
|
+
NAME destroy
|
220
|
+
MOD Mixer::Wave
|
221
|
+
TYPE #
|
222
|
+
PURPOSE Frees an audio chunk.
|
223
|
+
|
224
|
+
PROTO
|
225
|
+
destroy
|
226
|
+
|
227
|
+
DESC
|
228
|
+
Frees an audio chunk previously loaded.
|
229
|
+
If this method is called, all operations are forbidden.
|
230
|
+
|
231
|
+
SEEALSO
|
232
|
+
Mixer::Wave#destroyed?
|
233
|
+
|
234
|
+
%%
|
235
|
+
NAME destroyed?
|
236
|
+
MOD Mixer::Wave
|
237
|
+
TYPE #
|
238
|
+
PURPOSE Returns whether an audio chunk is destroyed.
|
239
|
+
RVAL true/false
|
240
|
+
|
241
|
+
PROTO
|
242
|
+
destroyed?
|
243
|
+
|
244
|
+
DESC
|
245
|
+
Returns whether au audio chunk is destroyed by
|
246
|
+
@[Mixer::Wave#destroy]
|
247
|
+
|
248
|
+
SEEALSO
|
249
|
+
Mixer::Wave#destroy
|
250
|
+
|
218
251
|
%%
|
219
252
|
NAME load
|
220
253
|
MOD Mixer::Music
|
@@ -259,6 +292,41 @@ On Windows, it may be impossible to use this method.
|
|
259
292
|
|
260
293
|
EXCEPTION *
|
261
294
|
|
295
|
+
%%
|
296
|
+
NAME destroy
|
297
|
+
MOD Mixer::Music
|
298
|
+
TYPE #
|
299
|
+
PURPOSE Frees an music data.
|
300
|
+
|
301
|
+
PROTO
|
302
|
+
destroy
|
303
|
+
|
304
|
+
DESC
|
305
|
+
Frees an music data previously loaded.
|
306
|
+
If this method is called, all operations are forbidden.
|
307
|
+
|
308
|
+
SEEALSO
|
309
|
+
Mixer::Music#destroyed?
|
310
|
+
Mixer::Wave#destroy
|
311
|
+
|
312
|
+
%%
|
313
|
+
NAME destroyed?
|
314
|
+
MOD Mixer::Music
|
315
|
+
TYPE #
|
316
|
+
PURPOSE Returns whether an music data is destroyed.
|
317
|
+
RVAL true/false
|
318
|
+
|
319
|
+
PROTO
|
320
|
+
destroyed?
|
321
|
+
|
322
|
+
DESC
|
323
|
+
Returns whether a music data is destroyed by
|
324
|
+
@[Mixer::Music#destroy]
|
325
|
+
|
326
|
+
SEEALSO
|
327
|
+
Mixer::Music#destroy
|
328
|
+
Mixer::Wave#destroyed?
|
329
|
+
|
262
330
|
%%
|
263
331
|
NAME set_volume
|
264
332
|
MOD Mixer::Wave
|